How to display a popup for two points which have same longitude and latitude?

I have a vector layer with lots of POIs/Points. Some of the Points have same coordinates(Longitude,Latitude). For Example:- **POINT A** : {id:1,name:A,Geom:POINT(73.1545, 13.126)} **POINT B** : {id:2,name:B,Geom:POINT(73.1545, 13.126)} **Current Situation:-**   1. I can only show popup with any one of the above Point's details.   2. User can't able to see both POINTS on the map. **My Queries:-**   1. How to display popup with entire details of above two POINTS?   2. How can we present/show these POINTS on the map? This the select control I am using.                   var controls={};         controls["select"] = new OpenLayers.Control.SelectFeature(LayerName,                      {                         multiple: false, hover: false,                          onSelect: onFeatureSelect,                          onUnselect: onFeatureUnselect}                      );         map.addControl(controls["select"]);         controls["select"].activate();      On Selecting a feature below function will be called.               function onFeatureSelect(feature){         var h = "", p=feature.attributes;             h = "
";             for(var q in p){                 h += "
"+q+":
" + p[q]+"

";             }             h   +="
";             popup = new OpenLayers.Popup.FramedCloud("chicken",                          feature.geometry.getBounds().getCenterLonLat(),                         null,                         h,                         null, true, onPopupClose);             popup.backgroundColor='#FFFFFF';             popup.autoSize=true;             popup.maxSize=new OpenLayers.Size(500,400);             popup.setBorder('1px');             popup.panMapIfOutOfView=true;         feature.popup = popup;             map.addPopup(popup);     }          function onFeatureUnselect(feature){             if(feature.popup){                   map.removePopup(feature.popup);             feature.popup.destroy();             feature.popup = null;         }     }


How to apply svg symbols as point markers in QGIS 2.0

I must be overlooking something obvious! I've just downloaded and launched QGIS 2.0. I'm trying to edit a layer's symbol markers to use a more descriptive icon. Opening layer properties and then clicking the style tab, I only see a very limited collection of symbols. Clicking style manager too, I can't see any way to increase the symbols available. Looking inside the application package, there is a folder `resources` which contains an `svg` folder full of the icons I'm looking for. How do I apply these as markers to a point layer?


How can I increase performance on inserting features with polygon geometry?

I have a problem when inserting features with polygon feature class in FGDB. This is my code:                   ... initialising some fields (does not affect performance)         m_featureBuffer.Shape = CreateShape(feature);         m_insertCursor.InsertFeature(m_featureBuffer);      CreateShape:                   protected override ESRI.ArcGIS.Geometry.IGeometry CreateShape(IAbstractFeature feature)         {             IArea area = (IArea)feature;                  ESRI.ArcGIS.Geometry.IPointCollection polygon = new ESRI.ArcGIS.Geometry.PolygonClass();             foreach (Point2D point2d in area.Polygon.OuterBoundaryIs.Coordinates)             {                 ESRI.ArcGIS.Geometry.IPoint point = new ESRI.ArcGIS.Geometry.PointClass();                 point.PutCoords(point2d.X, point2d.Y);                 polygon.AddPoint(point);             }             return (ESRI.ArcGIS.Geometry.IGeometry)polygon;         }      In this case inserting ~1500 polygons takes about ~110 seconds. If I comment this line               m_featureBuffer.Shape = CreateShape(feature);      the insert takes ~10 seconds! If I create empty polygons and pass them in the Shape property of the feature buffer, it takes ~10 seconds too. I tried to use the IFeatureClassLoad according to the ESRI example, but it doesn't help with the performance. Please, help me, because the difference of more than 10 times is awful. Thanks. * * * **Solved.**


Generating Values in the Attribute Table

In the attribute table within GIS, I have a certain column with ascending values, and I want to assign ID numbers (for easier readability and display) to a corresponding column. So for instance:               Feet Away   |   ID      200.1      |   1      302.0      |   2      500.9      |   3      ...        |   ...      highest    |  highest      I would want to be able to generated the 1, 2, 3, etc. I do not know how to generate the ID field given that the 'Feet Away' field is already generated and in order. I know that if I had access to some java or javascript function, I would make a loop which started at the first element (the ID field corresponding to 200.1 in the above, or 1), iterate it for as long as there is a value in the feet away column, and fill the ID field with a number one larger than the previous number added. But I do not know how to do that with the attribute table. How do I generate a column of increasing integers? Do I need to add code from a different source? It seems like a pretty easy computer science problem, I just do not know how to do it within a GIS context. All help appreciated.


What are people using for Site Location Maps without Bing?

The introduction of Bing Imagery with the release of ArcGIS 10.0 provided a fantastic means to very quickly produce Site Location Maps. Prior to its' introduction, I was using a GIS server connection to www.geographynetwork.ca_80 for site location maps. I highly preferred using Bing, mostly for aesthetic reasons. Now that Bing no longer available (without buying a licence), I wondered what others are using as a replacement. I find the options available under the "add basemap" dropdown in ArcMap to be **far** from appealing. Often, I find the placement of the citation information to be rather inconvenient. The resolution is often very poor as well (such as when using the "Open Street Map" or "Imagery options"). The labels are often fuzzy and hard to read as well. What are those of you who don't have a Bing subscription using? Any suggestions would be greatly appreciated. Thanks **EDIT** - Below, Is a picture to demonstrate what I meant by "Site Location Map". In many cases - not always - it is faster and simpler to just use an air photo or satellite image to show where something is. Point to the study area, label a few roads .... done!! ![enter image description here](http://i.stack.imgur.com/n4XtH.jpg)


Undefined reference errors installing GRASS addon

I am trying to install the `r.geomorphons` GRASS addon (available from http://sil.uc.edu/pdfFiles/jarek/r.geom.zip) in GRASS. I tried on Windows but gave up and decided the best thing to do was to try on an installation of the OSGEO Live CD, as I assumed that would have everything nicely configured. I have installed the Live CD to a virtual machine, and tried following the instructions at http://grasswiki.osgeo.org/wiki/Compile_and_Install#Addons. There doesn't appear to be a `configure` script in the directory, so I have simply run `sudo make MODULE_TOPDIR=/usr/lib/grass64`. I also tried various other versions of this command, including some setting the `GRASS_HOME` directory, but all of them give lots of errors saying `undefined reference`. I assume somehow I am not including the GRASS libraries properly. Does anyone have any idea what I am doing wrong? The errors I get are:               user@osgeolive:~/build/r.geom$ sudo make MODULE_TOPDIR=/usr/lib/grass64 GRASS_HOME=.     /usr/lib/grass64/include/Make/Module.make:25: warning: overriding commands for target `install'     /usr/lib/grass64/include/Make/Rules.make:90: warning: ignoring old commands for target `install'     gcc -L/usr/lib/grass64/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--export-dynamic -Wl,-rpath-link,/usr/lib/grass64/lib    -o /usr/lib/grass64/bin/r.geomorphon OBJ.i686-pc-linux-gnu/geom.o OBJ.i686-pc-linux-gnu/main.o OBJ.i686-pc-linux-gnu/memory.o OBJ.i686-pc-linux-gnu/pattern.o  -lgrass_raster.6.4.2 -lgrass_pngdriver.6.4.2 -lgrass_driver.6.4.2 -lgrass_gis.6.4.2 -lgrass_datetime.6.4.2 -lz     -lfreetype    -lgrass_gis.6.4.2 -lgrass_datetime.6.4.2 -lz     -lpng  -lz  -lm  -lgrass_psdriver.6.4.2 -lgrass_driver.6.4.2 -lgrass_gis.6.4.2 -lgrass_datetime.6.4.2 -lz     -lfreetype    -lgrass_gis.6.4.2 -lgrass_datetime.6.4.2 -lz      -lgrass_driver.6.4.2 -lgrass_gis.6.4.2 -lgrass_datetime.6.4.2 -lz     -lfreetype    -lgrass_gis.6.4.2 -lgrass_datetime.6.4.2 -lz      -lgrass_gis.6.4.2 -lgrass_datetime.6.4.2 -lz     -lm  -lm  -lz      OBJ.i686-pc-linux-gnu/main.o: In function `main':     /home/user/build/r.geom/main.c:84: undefined reference to `G_add_keyword'     /home/user/build/r.geom/main.c:85: undefined reference to `G_add_keyword'     /home/user/build/r.geom/main.c:86: undefined reference to `G_add_keyword'     /home/user/build/r.geom/main.c:157: undefined reference to `Rast_window_rows'     /home/user/build/r.geom/main.c:158: undefined reference to `Rast_window_cols'     /home/user/build/r.geom/main.c:159: undefined reference to `Rast_get_window'     /home/user/build/r.geom/main.c:163: undefined reference to `Rast_row_to_northing'     /home/user/build/r.geom/main.c:163: undefined reference to `Rast_row_to_northing'     /home/user/build/r.geom/main.c:229: undefined reference to `Rast_open_new'     /home/user/build/r.geom/main.c:230: undefined reference to `Rast_allocate_buf'     /home/user/build/r.geom/main.c:245: undefined reference to `Rast_is_f_null_value'     /home/user/build/r.geom/main.c:252: undefined reference to `Rast_set_c_null_value'     /home/user/build/r.geom/main.c:255: undefined reference to `Rast_set_f_null_value'     /home/user/build/r.geom/main.c:258: undefined reference to `Rast_set_d_null_value'     /home/user/build/r.geom/main.c:334: undefined reference to `Rast_put_row'     /home/user/build/r.geom/main.c:343: undefined reference to `Rast_close'     /home/user/build/r.geom/main.c:344: undefined reference to `Rast_short_history'     /home/user/build/r.geom/main.c:345: undefined reference to `Rast_command_history'     /home/user/build/r.geom/main.c:346: undefined reference to `Rast_write_history'     OBJ.i686-pc-linux-gnu/memory.o: In function `get_cell':     /home/user/build/r.geom/memory.c:44: undefined reference to `Rast_is_null_value'     /home/user/build/r.geom/memory.c:45: undefined reference to `Rast_set_f_null_value'     /home/user/build/r.geom/memory.c:51: undefined reference to `Rast_is_null_value'     /home/user/build/r.geom/memory.c:52: undefined reference to `Rast_set_f_null_value'     /home/user/build/r.geom/memory.c:58: undefined reference to `Rast_is_null_value'     /home/user/build/r.geom/memory.c:59: undefined reference to `Rast_set_f_null_value'     OBJ.i686-pc-linux-gnu/memory.o: In function `open_map':     /home/user/build/r.geom/memory.c:12: undefined reference to `G_find_raster2'     /home/user/build/r.geom/memory.c:17: undefined reference to `Rast_open_old'     /home/user/build/r.geom/memory.c:18: undefined reference to `Rast_get_cellhd'     /home/user/build/r.geom/memory.c:19: undefined reference to `Rast_map_type'     /home/user/build/r.geom/memory.c:25: undefined reference to `Rast_allocate_buf'     /home/user/build/r.geom/memory.c:29: undefined reference to `Rast_allocate_buf'     /home/user/build/r.geom/memory.c:30: undefined reference to `Rast_get_row'     OBJ.i686-pc-linux-gnu/memory.o: In function `shift_buffers':     /home/user/build/r.geom/memory.c:75: undefined reference to `Rast_allocate_buf'     /home/user/build/r.geom/memory.c:82: undefined reference to `Rast_get_row'     OBJ.i686-pc-linux-gnu/memory.o: In function `write_form_cat_colors':     /home/user/build/r.geom/memory.c:103: undefined reference to `Rast_init_colors'     /home/user/build/r.geom/memory.c:106: undefined reference to `Rast_add_color_rule'     /home/user/build/r.geom/memory.c:110: undefined reference to `Rast_write_colors'     /home/user/build/r.geom/memory.c:111: undefined reference to `Rast_free_colors'     /home/user/build/r.geom/memory.c:112: undefined reference to `Rast_init_cats'     /home/user/build/r.geom/memory.c:114: undefined reference to `Rast_set_cat'     /home/user/build/r.geom/memory.c:115: undefined reference to `Rast_write_cats'     /home/user/build/r.geom/memory.c:116: undefined reference to `Rast_free_cats'     OBJ.i686-pc-linux-gnu/memory.o: In function `write_contrast_colors':     /home/user/build/r.geom/memory.c:135: undefined reference to `Rast_init_colors'     /home/user/build/r.geom/memory.c:138: undefined reference to `Rast_add_d_color_rule'     /home/user/build/r.geom/memory.c:142: undefined reference to `Rast_write_colors'     /home/user/build/r.geom/memory.c:143: undefined reference to `Rast_free_colors'     OBJ.i686-pc-linux-gnu/pattern.o: In function `calc_pattern':     /home/user/build/r.geom/pattern.c:26: undefined reference to `Rast_row_to_northing'     /home/user/build/r.geom/pattern.c:27: undefined reference to `Rast_col_to_easting'     /home/user/build/r.geom/pattern.c:46: undefined reference to `Rast_is_f_null_value'     /home/user/build/r.geom/pattern.c:50: undefined reference to `Rast_row_to_northing'     /home/user/build/r.geom/pattern.c:51: undefined reference to `Rast_col_to_easting'     /home/user/build/r.geom/pattern.c:75: undefined reference to `Rast_row_to_northing'     /home/user/build/r.geom/pattern.c:76: undefined reference to `Rast_col_to_easting'     collect2: ld returned 1 exit status     make: *** [/usr/lib/grass64/bin/r.geomorphon] Error 1


What geometric attributes do polygons possess, and how can these be used to filter features?

Given a polygon featureclass containing many polygons of different sizes and shapes, which geometric attributes (area, perimeter, etc) could be used to filter the polygons? It's probably best to ask this in two parts:   1. Which geometric attributes do polygons possess?   2. How would you calculate these attributes? Geoprocessing tools/ArcObjects preferred, but I would be satisfied with conceptual calculations which could then be coded. As an example, I am considering calculating the _maximum length_ of a polygon by breaking the edge of the polygon into points at a small interval and then calculating the distance between all points - the longest distance would be the maximum length of that polygon. I'm hoping to use these attributes to allow interactive user control of polygon filtering.


Is it possible to export raster data from PostGIS or MapServer as a base64 string?

Is it possible to output a PNG in a base64 string so that can be directly loaded into a browser? I've read through the PostGIS documentation which refer to the GDAL output formats. The GDAL output formats here state the following: > GDAL includes support for reading, and creating .png files. Greyscale, > pseudo-colored, Paletted, RGB and RGBA PNG files are supported as well as > precisions of eight and sixteen bits per sample. Regarding MapServer, the only reference I can find is an unanswered question asked on the mailing list six years ago. I am wondering if I can generate a png text string in the following form so that it can be loaded into a browser using the Data URI scheme:               <img alt="" src="data:image/x-png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAABLElEQVR42qSTQStFURSFP7f3XygyoAwoYSYMPCIpk2egMFSmUvwCRpSRDIwYGbwyVuYykB9y914m951z7nHe6J26dc9u77XXWmdvJLF7/audqx9JYuvyW92LL0li8K2df2r17CPEVk7ftXTclyQqAMmRCwC5I3fS42a4W7y74VYDNAAuJA8AaXIsSACsDgAdAJeFrnnyoMBygKZJJ3b1It0AmsTMDPdEgrujJqHEwCxqznMaD2KgyCDRnEuo8qJhHvx/hcQDbzGoix5Yi4G1TcwZWNEDKwJU+WDkhg2ToDaD+M65YcVB8jg3Y5IY5VQAyyf9gLJw+CqAuYNnAczsPQpgevtBU937kDexcdssj8Ti0ZskMd97CRs3u//U2sjJzbtwH1+/Cf8jS/gbAMmWc42HzdIjAAAAAElFTkSuQmCC" />      I would like to test this approach, as I am interested in the approach that MySociety used when creating Mapumental. In the description of how they made this tool, they refer to color-cycling of a base64 PNG string. The approach used by Mapumental is very complex - I am just interested in exploring how to even start this approach.


problem to show layers in legend using arcgis silverlight api

I tried to create a simple webgis with silverlight. Software that I used to make the application: ArcGIS Desktop 10 (without sp), ArcGIS Server 10, Silverlight 4, Microsoft blend 4, and Visual Studio 2010 sp1. We generally use the code below to add layers to map:               <esri:Map x:Name="Map" >             <esri:Map.Layers>                   <esri:ArcGISDynamicMapServiceLayer ID="samplewebgis"                          Url="http://m-pc/arcgis/rest/services/test/MapServer" />                     </esri:Map.Layers>       </esri:Map>      But when i use the code, the map legend shows no layers. then I tried the code below:               <esri:Map x:Name="Map"   Grid.RowSpan="3">                                                  <esri:FeatureLayer  ID="xx" Url="http://m-pc/arcgis/rest/services/test/MapServer/0"/>            <esri:FeatureLayer  ID="yy" Url="http://m-pc/arcgis/rest/services/test/MapServer/1" />           </esri:Map>      This code works properly and legend show layers. Why can't I use esri:map.layers and why can't the legend show layers of map when I use map.layers?


Storing GPS tracks with timestamps in PostGIS

I need to store a series of GPS points with timestamps in the database (traces of various vehicles). I am wondering which of two approaches to choose for storing them in the PostGIS table: 1.) Each point in own row with separate column for timestamp and one for track ID 2.) Use Linestring or MultiLineString with fourth M coordinate which would contain UNIX timestamp of the time for the point on the track. This would mean single row for each separate track.


Need to Export 60 pdfF files from each MXD in ArcGIS 10.1?

I need to export 60 PDFs files so I am thinking if there is a way around to export 60 without having to open each MXD file at a time ? I am using ArcGIS 10.1 SP1 Build 3143 . Thank you !


Calculate distance of points along a route

I am struggling with the calculation of the distance between points along a stream (points are located 0-20m away from the stream) in ArcGIS 10. The points are simple xy-data in UTM. I created a route from the shapefile of the stream and used the tool "locate features along routes" to add the points. But how can I now calculate the distances of the points along the route? Or is there an other tool how to do such a calculation? Any help is greatly appreciated. Thanks Irene


Spatial Reference is null in ESRI Silverlight Map

I am using ESRI's Silverlight API to display a map with one dynamic layer. Occasionally (not always), when that layer is initialized, the SpatialReference attribute will be null. I'm not sure why this is, since this map service has a spatial reference set to WKID 102113. Does anyone know why the SpatialReference would be showing up as null?


Add label/text to esri.symbol.PictureMarkerSymbol

How can I add label or text on the ESRI's PictureMarkerSymbol (Javascript API)? I could use any other marker as well that support labels. Thanks!!


OpenLayers - Navigation History CSS

I am having a problem assigning background-images to my OpenLayers NAVIGATION HISTORY tool on a custom OpenLayers panel. Here is the code I use to create the tools and add them to my panel:                       nav = new OpenLayers.Control.NavigationHistory(); //CREATE THE NAVIGATION HISTORY CONTROL                 map.addControl(nav) //ADD THE CONTROL TO THE MAP          //CREATE THE CONTROL ARRAY - THESE CONTROLS WILL BE ADDED TO THE CUSTOM PANEL         var panelControls = [                 new OpenLayers.Control.ZoomBox({title: "Draw a box to ZOOM IN", text: 'Click Me'}),                  new OpenLayers.Control.DragPan({title: "Click to PAN around map"}),                 new OpenLayers.Control.ZoomOut({title: "Click to ZOOM OUT one level"}),                 new OpenLayers.Control.ZoomIn({title: "Click to ZOOM IN one level"}),                    new OpenLayers.Control.Button({title: "Click to go to MAX EXTENT",                      id: 'btnMaxExtent',                                                      trigger: zoomToExtent}),                 nav.next, nav.previous, //THIS ROW ADDS THE NAVIGATION HISTORY TOOLS (nav.next, nav.previous) INTO THE ARRAY OF CONTROLS TO BE ADDED TO THE PANEL                    new OpenLayers.Control.Button({title: "Click once for hover info, click it again to turn off the functionality",                      id: 'btnHiLite',                     trigger: activateHiLite})                                ];              var toolbar = new OpenLayers.Control.Panel({'div':  document.getElementById('tlbr')}); //CREATE THE PANEL              toolbar.addControls(panelControls); //ADD THE CONTROLS ARRAY TO THE PANEL         map.addControl(toolbar); //ADD THE PANEL TO THE MAP      Here is the CSS that works for the Navigation History control. The problem is that it assigns the same background-image to both Nav History controls. I would like to assign different backgound-images for each.               //THIS IS THE CSS FOR THE NAVIGATION CONTROL      //BUT IT DOESN"T LET ME APPLY CSS INDIVIDUALLY TO THE nav.next AND nav.previous PROPERTIES OF THE NAVIGATION HISTORY CONTROL     .olControltoolPanel .olControlNavigationHistory  {          border-top: 1px solid #96d1f8;         background: #6ed665;         background: -webkit-gradient(linear, left top, left bottom, from(#3e9c50), to(#6ed665));         background: -webkit-linear-gradient(top, #3e9c50, #6ed665);         background: -moz-linear-gradient(top, #3e9c50, #6ed665);         background: -ms-linear-gradient(top, #3e9c50, #6ed665);         background: -o-linear-gradient(top, #3e9c50, #6ed665);         padding: 5px 10px;         -webkit-border-radius: 8px;         -moz-border-radius: 8px;         border-radius: 8px;         -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;         -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;         box-shadow: rgba(0,0,0,1) 0 1px 0;         text-shadow: rgba(0,0,0,.4) 0 1px 0;         color: #9c494e;         font-size: 12px;         font-family: Georgia, serif;         text-decoration: none;         vertical-align: middle;         background-image: url('img/view_previous_on.png');         background-repeat: no-repeat;         }      Any suggestions would be appreciated. Thank you for taking the time to look into this issue! * * * This issue has been solved thanks to generous assistance of Dariapra. Here is the code fix as I implemented it: The navigation history controls are added to a PANEL control and given the following CSS;                //THIS IS THE CSS FOR THE NAV.NEXT BUTTON WHEN ACTIVATED     .olControltoolPanel .olControlNavigationHistoryNextItemActive {          ...your CSS here...     background-image: url('img/view_next_on.png');     background-repeat: no-repeat;         ....other CSS if needed....     }            //THIS IS THE CSS FOR THE NAV.NEXT BUTTON WHEN DEACTIVATED     .olControltoolPanel .olControlNavigationHistoryNextItemInActive {          ...your CSS here...     background-image: url('img/view_next_off.png');     background-repeat: no-repeat;         ....other CSS if needed....     }          //THIS IS THE CSS FOR THE NAV.PREVIOUS BUTTON WHEN ACTIVATED     .olControltoolPanel .olControlNavigationHistoryPreviousItemActive {          ...your CSS here...     background-image: url('img/view_previous_on.png');     background-repeat: no-repeat;         ....other CSS if needed....     }            //THIS IS THE CSS FOR THE NAV.PREVIOUS BUTTON WHEN DEACTIVATED     .olControltoolPanel .olControlNavigationHistoryNextItemInActive {          ...your CSS here...     background-image: url('img/view_previous_off.png');     background-repeat: no-repeat;         ....other CSS if needed....     }


How to fix this spatial query in GeoDjango?

I am new to Geodjango. and I am following the steps given in https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/# and the steps i followed before https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/#spatial- queries were working fine but after that I got error in the               qs = WorldBorder.objects.filter(mpoly__contains=pnt_wkt)      in this Statement. Error it is showing is               FieldError: Cannot resolve keyword 'mpoly' into field. Choices are: area, fips, geom, id,      iso2, iso3, lat, lon, name, pop2005, region, subregion, un      and if I am executing this line               sm = WorldBorder.objects.get(name='San Marino')      Then Error is               DatabaseError: column world_worldborder.geom does not exist     LINE 1: ...ld_worldborder"."lon", "world_worldborder"."lat", "world_wor...      Kindly Help .. Thanks


Is there a way to identify and remove similar GPS tracks in PostGIS or ArcGIS?

I have a large number of GPS tracks from a number of different users. I'd like to identify tracks that take the same route and remove those duplicates. For example, a user takes the same streets from the same origin/destination, but obviously with GPS accuracy issues, the lat/longs aren't exactly the same. Any sort of intersect function simply provides a large set of intersecting sections, but doesn't compare a full track from start to finish. Currently using PostGIS, but trialing in ArcGIS to visualize and test a procedure before applying it to the 1,000+ tracks and 8 million datapoints.


OpenLayers map in jquery UI dialog

I asked the question here but haven't got much reply. I guess this is a better place :) When I put OpenLayers map in a dialog, the zoom wheel seems not working. Also, when trying to resize the dialog, it is not that smooth. How to solve the two problems? Here is the fiddle http://jsfiddle.net/Ja7v2/2/               var div = $('<div />')                 .attr('id', 'map')                 .css({width:800,height:600})                 .appendTo($('body'));          //start a simple map, code from on http://openlayers.org/dev/examples/osm.html      map = new OpenLayers.Map( 'map');          layer = new OpenLayers.Layer.OSM( "Simple OSM Map"); map.addLayer(layer); map.setCenter(         new OpenLayers.LonLat(-71.147, 42.472).transform(             new OpenLayers.Projection("EPSG:4326"),             map.getProjectionObject()             ), 12         );         map.addControl(new OpenLayers.Control.Navigation({             zoomWheelEnabled: true,         })); // initialize the jQueryUI Dialog div.dialog({         width:800,         height:600,         title: 'My Map',         resizeStop: function(){             map.updateSize(); //to prevent drag-zoom error         },         dragStop: function(){             map.updateSize(); //to prevent drag-zoom error         } });


Create different CSS for Two Buttons in One Control Panel

I am having a problem applying CSS to two custom OpenLayers buttons. I create a PANEL toolbar and then add 8 buttons to it. The ZoomBox, DragPan, ZoomOut, ZoomIn, and nav.next and nav.previous buttons all style the way they should. The issue is with the two BUTTON items. As near as I can tell the OpenLayers BUTTON object only allows one CSS style called .olControlButtonItemInactive. THE PROBLEM: I have two BUTTON objects in the PANEL and I want each one to have a different style. But, if I change the name of the CSS class from olControlButtonItemInactive the CSS no longer is picked up by the button. I thought I could just assign a unique ID attribute to each BUTTON (for instance button #1 has an ID of 'btnMaxExtent' and button #2 has an ID of 'btnHiLite'), then create a CSS style for each one called, respectively, olControlbtnMaxExtentItemInactive and olControlbtnHiLiteItemInactive and then assign these two button styles to the olControltoolPanel class but it does not work. Here is the script I use to create the buttons on my panel:                   var panelControls = [                 new OpenLayers.Control.ZoomBox({title: "Draw a box to ZOOM IN", text: 'Click Me'}),                  new OpenLayers.Control.DragPan({title: "Click to PAN around map"}),                 new OpenLayers.Control.ZoomOut({title: "Click to ZOOM OUT one level"}),                 new OpenLayers.Control.ZoomIn({title: "Click to ZOOM IN one level"}),                    new OpenLayers.Control.Button({title: "Click to go to MAX EXTENT",                      id: 'btnMaxExtent',                                                      trigger: zoomToExtent}),                 nav.next, nav.previous,                          new OpenLayers.Control.Button({title: "Click once for hover info, click it again to turn off the functionality",                      id: 'btnHiLite',                     trigger: activateHiLite})                                ];      Just for completeness here is the script I use to add the controls to my panel:                   var toolbar = new OpenLayers.Control.Panel({'div':  document.getElementById('tlbr')});              toolbar.addControls(panelControls);         map.addControl(toolbar);      And here is the CSS I have now that works for the BUTTON objects but it makes both BUTTONs look the same. I want each button to have its own CSS. If I take this same CSS script and create one for each of the BUTTONS with the names .olControlbtnMaxExtentItemInactive and .olControlbtnHiLiteItemInactive they do not work.                 .olControltoolPanel .olControlButtonItemInactive {      border-top: 1px solid #96d1f8;     background: #6ed665;     background: -webkit-gradient(linear, left top, left bottom, from(#3e9c50), to(#6ed665));     background: -webkit-linear-gradient(top, #3e9c50, #6ed665);     background: -moz-linear-gradient(top, #3e9c50, #6ed665);      background: -ms-linear-gradient(top, #3e9c50, #6ed665);     background: -o-linear-gradient(top, #3e9c50, #6ed665);     padding: 5px 10px;     -webkit-border-radius: 8px;     -moz-border-radius: 8px;     border-radius: 8px;     -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;     -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;     box-shadow: rgba(0,0,0,1) 0 1px 0;     text-shadow: rgba(0,0,0,.4) 0 1px 0;     color: #9c494e;     font-size: 12px;     font-family: Georgia, serif;     text-decoration: none;     vertical-align: middle;     background-image: url('Img/zoom-world-mini.png');     background-repeat: no-repeat;         }      Any suggestions would be appreciated. Thanks for taking the time to look at this!


Check layer data type in gdb

I have path to layer or feature               C:\base.gdb\test      How to check is table or feature class by arcpy?


Can Network Analyst consider multiple cost attributes?

I'm trying to do a basic service area network analysis in ArcGIS 10.0. But I have two cost attributes I want to act as the network impedance-- one apportioned along the edges of each line feature, the other a constant. To be specific, I'm trying to model transit travel. I have travel time (in minutes) as the primary cost attribute (which is apportioned along the line), but I also want to be able to factor in a constant wait time which is expended at the facility. The wait time will vary depending on the transit line's frequency. Because the wait time varies from line to line, I can't just subtract the wait time from the default break values I put into the analysis settings. For instance, if I want to find out the extent of travel in 20 min and 30 min, and I had only one transit line (with a wait time of 5 min), I could just specify 15/25 as my break values. But I have multiple transit lines, so I can't specify break values for every line. Is there any way around this?


ArcMap: How to create legend for specific data frame?

I'm coming up a problem in map production where I have two data frames, but it seems like I can only create a legend using the items in the original data frame (the order doesn't seem to matter as I can reorder them and I'm still only able to add items to the legend that are in the original data frame). I can sort of get around this by dragging all the files into the original data frame, but that results in some weird display problems. I've gone through the Legend properties, but there doesn't seem to be anything there. Anyone have any suggestions as to how to specify which data frame is used for legend building?


Add closest facility as an attribute to a point in ArcMap?

Is there a way, after performing a closest facility analysis, to add/save the closest facility number/name/unique ID to the incident? I plan to then use this attribute to create a route going from one incident to another incident via this closest facility, which means I have to somehow save it / keep track of which facility is closest for all incidents.


QGIS: CSV point grid to polygon - not raster

I have a CSV file with various data in 1 degree wide by 0.5 degree high rectangles, for which I have the N,S,E,W, & centroid lat/longs, i.e. every bit of spatial data required. I'm trying to convert this into a polygon grid, so that I can display the associated data in the variety of ways that raster doesn't do nearly as well (for ref: I have successfully converted to raster using this method (point > shape > raster)). Other Q&As recommend points2one plugin, however this results in a big mess of triangles; in addition, no matter how I import the csv, qgis will only display one point per cell, either the centroid (manually selecting centroid lat/long) or the NE corner (default, qgis picks up the NORTH & EAST field names). I've just successfully done this using WKT, creating a formula in excel to generate the polygons from the NESW coordinates, which seems like the best way so far. My question is: is there a better way of doing this natively in QGis? It feels like the software has all the info available to be able to do this with one or two clicks - am I just missing it? Thanks! p.s. if anyone reads this & is in the same boat, my formula was: ="POLYGON (("&E2&" "&D2&", "&E2&" "&F2&", "&G2&" "&F2&", "&G2&" "&D2&", "&E2&" "&D2&"))" with S/W/N/E in columns D/E/F/G respectively, and the formula in H. Remember to copy * paste back over the output as values before you save.


How integrated can an IDE get for arcpy scripting?

I am looking to develop arcpy scripts (ArcGIS 10.1) in an IDE that is more "integrated" than Pythonwin. I would like an experience that is analagous to programming ArcObjects in Visual Studio C#/VB.NET (which I've done a bit when arcpy did not offer enough low level control). When developing ArcObjects with C#, there there were templates ready, classes in seperate windows that I could explore (very good way to remember tools available!), and code completion for _everything_. I have not yet found any examples/screen shots/extended discussion of this type of setup. There is this post, but it focuses on effective arcpy debugging (which I definitly also need to learn more about). Is it possible to setup Visual Studio 2010/SPE/Wing/ any other IDE that will, out of the box, make the arcpy development experience much more like the experience of programming ArcObjects using C#/VB.NET?


Change label next to symbol in TOC

I'm trying to write a script to change the label next to the symbol in the TOC so it appears in the legend. Arcpy has a way to change the name of the layer, but I can't seem to find a way to change the text one level below that. They also have a way to change unique symbol texts and descriptions, but that's not what I need either. Am I just missing it in the tutorials/help pages? It's just the text box in the layer's Properties under the Symbology tab. There's a box that says "Legend" and then "Label appearing next to the symbol in table of contents." Any help would be appreciated. Thanks


ArcServer Geoprocessing Service

I originally posted this in the ArcGIS forums, but I haven't been getting any bites. I've developed a set of ArcToolbox Python scripts, which I've been using on certain projects for clients. The approach we've been taking is to have our clients pay us to run these tools, and provide data and a report at the end of the project. This approach is working well so far, but has obvious limitations. I've been thinking that there could be advantages to distributing the tools - we'd be able to reach a wider market, and it could drive more consulting work. I think best way to do this might be to publish the toolbox to ArcServer and charge clients for access (via ArcMap), but I'm hardly familiar with ArcServer, so I wanted to get clarification on some things.   * Is it actually legal to charge users for access to ArcServer geoprocessing services via ArcMap? I don't see how this would be different than charging for access to a web map with geoprocessing functions, but I wouldn't want to violate ESRI's terms of service.    * When a Python script is published on ArcServer, can ArcMap clients view the code, or is it hidden? If we publish this set of tools at all, I don't want users to be able to view or copy the code.   * Is this even a good idea? Original post on ArcGIS forums: http://forums.arcgis.com/threads/62752-Geoprocessing-Service-General-Questions


How do you create Map Tips with Flex?

I'd like to have Map Tips display when a user hovers over or clicks on a feature in my Flex Application. Would I do this in the authoring stage or is there code I write into my Flex application??? How is this accomplished? Thank you All


gis server gives me an error administrator-level access. How do I fix this? error about "user does not have administrative access to the Web server"

I am using ArcGIS Server Manager to create Web Applications. I am con't access to applications.error is:The current logged on user does not have administrative access to the Web server. Administrative access is required for creating and editing Web applications. Please contact your system administrator for further assistance.


QGIS Polygon layer table of adjacent polygons

In a polygon layer, how can I generate a table of adjacent polygons?


How to cope with the newly discovered GPS bug?

Today the New York Times broke the news that after the Clinton Administration turned off Selective Availability in the GPS system, **a bug had been introduced into the GPS satellite software itself** , causing systematic and large errors in many GPS signals. Before getting to the question, for background information here is a brief summary of just some of the issues raised by this discovery:   * It turns out that whereas we thought China was located over 11,000 Km from the US, it's actually only 150 Km offshore of Southern California. One San Diego resident told the Times, "we knew there were a lot of foreign-speaking people coming here, but we all took them to be Mexicans. Who would have thought they were really Chinese? And that Chinese make such good landscape helpers?"   * Economists have taken notice and are worried. IMF managing director Dominique Strauss-Kahn, contacted at a meeting in Nanjing today, remarked that "economists and business people the world over are going to have to reconsider the global relationships of supply and demand in light of this. I thought the flight over here from LA was a little shorter than it was supposed to be. Mail-order brides are going to be a dime a dozen; US women will no longer be able to compete."   * Geologists are astir because the entire theory of plate tectonics is now in question. Previously they measured the speed of continental drift at just centimeters per year. Now it looks like the North American and Eurasian plates are on schedule to collide on August 23, 2012, creating a land bridge to the Far East (and completing, in some sense, Columbus's original dream). However, on the bright side, that will prevent California from falling into the sea when the Big One hits. Here, then, is my question: **As a GIS professional, what do you plan to do to check and overhaul your data holdings?** What will this comprehensive change in all geospatial coordinates mean for your work?


Looking for an efficient way of digitizing building footprints using orthophotos and ArcGIS 10

In the past I've used PCI Geomatica to do something similar using the softwares classification functionality. Are there some tools/tricks in ArcGIS that will partially automate the process. I remember reading somewhere about rasterizing an orthophoto and assigning values to rooftops, which polygons where then created from those values. I can see there being issues in trying to automate the task as there will surely be some inaccuraces do to color, obstructions, image quality, etc.


What is a reasonable time to get a gps fix with 10 meters precision?

I hope I'm asking this at the right part of Stack Exchange. Please bear with me if I'm wrong. I'm developing some gps based applications. The demands I have for precision are not very high, but I need to know the possible errors. I have learned that the fourth decimal gives you ~10 meters precision. That should be enough for me. The real question is how fast will I get that precision realiably in different environments (indoors, outdoors free sky, forest, cloudy, city etc). The applications I'm developing is for handheld devices so I prefer to have the gps active in as short intervals as possible. As I do now, the intervals I use the gps are more governed by battery life than precision. Now I'm trying to balance the two.


How to Buffer based on SQL expression?

Is there any way to optimize this code? It creates two buffer feature classes based on two different fields in the shapefile attribute table               import arcpy     from arcpy import env     ## Set Workspace     env.workspace = "I:\GIS Programming\Week 11 - Manipulating Spatial Data\data"     fc = "airports.shp"     ## Details for new field in attribute table     newfield = "BUFFER_DISTANCE"     fieldtype = "TEXT"     fieldname = arcpy.ValidateFieldName(newfield)     arcpy.AddField_management(fc, fieldname, fieldtype, "", "", 12)     print "New Field" + newField + "Created."     print "Updating Buffer Distances"     ## BUFFER_DISTANCE is added to table as BUFFER_DIS for some reason     fields = ("FEATURE", "BUFFER_DIS")          ## Create update cursor for feature class      with arcpy.da.UpdateCursor(fc, fields) as cursor:         for row in cursor:             if row[0] == "Airport":                 row[1] = "15000 METERS"                     else:                 row[1] = ""             cursor.updateRow(row)     print "Airport BUFFER_DISTANCE field updated"     print "Creating buffer feature class"     ##Create buffer     arcpy.Buffer_analysis(fc, "airport_buffer", "BUFFER_DIS")               ## Create update cursor for feature class      with arcpy.da.UpdateCursor(fc, fields) as cursor:         for row in cursor:              if row[0] == "Seaplane Base":                 row[1] = "7500 METERS"             else:                 row[1] = ""             cursor.updateRow(row)     print "Seaplane BUFFER_DISTANCE field updated"     print "Creating Buffer feature class"     ##Create buffer     arcpy.Buffer_analysis(fc, "seaplane_buffer", "BUFFER_DIS")


How do I change the color of an ArcGISImageServiceLayer?

I have published an image service of a raster layer (.tif). When I use it online, it is grayscale. In ArcMap, I have the option to change the color of the display. How can I do this from the webservice (either when publishing, or consuming)? Here is the code I use to consume the service.               var params = new esri.layers.ImageServiceParameters();         params.noData = 0;          var montgomeryCountyLayer = new    esri.layers.ArcGISImageServiceLayer(".../arcgis/rest/services/Montgomery_Layer/ImageServer", {           imageServiceParameters: params,           opacity: .5,           id: "montgomeryCounty"         });              map.addLayer(montgomeryCountyLayer);


Openlayers map projection not working while saving the features into PostGis

In my web map application, I have added the wfs vector layer for feature editing. There is no issue When I save the feature in postgis after editing. But when I refresh the wfs layer, its showing the edited portion in somewhere. See the below image ![enter image description here](http://i.stack.imgur.com/5rIa2.png) Here is my code:               function init(){      format = 'image/png';          bounds = new OpenLayers.Bounds(                     -288161.9289062237, -435.65815425360597,                     949406.755566389, 1300000                 );     var options = {         controls: [],         maxExtent: bounds,         maxResolution: 5079.826789665053,         projection: "EPSG:404000",         units: 'm'     };          osMap = new OpenLayers.Map('map', options)          //Setup Base layer     tiled = new OpenLayers.Layer.WMS(                     "Oxford_Map", "http://xxx.xx.x.xx:8080/geoserver/cite/wms",                     {                         LAYERS: 'Oxford_Map',                         STYLES: '',                         format: format,                         tiled: true,                         tilesOrigin: osMap.maxExtent.left + ',' + osMap.maxExtent.bottom                     },                     {                                                 buffer: 0,                         displayOutsideMaxExtent: true,                         isBaseLayer: true,                         yx: { 'EPSG:404000': false }                     }                                   );          untiled = new OpenLayers.Layer.WMS(                     "Oxford_Map", "http://xxx.xx.x.xx:8080/geoserver/cite/wms",                     {                         LAYERS: 'Oxford_Map',                         STYLES: '',                         format: format                     },                     {                                                 singleTile: true,                         ratio: 1,                         isBaseLayer: true,                         yx: { 'EPSG:404000': false }                     }                                     );           osMap.addLayers([untiled, tiled]);             graphicsWFSlayer = new OpenLayers.Layer.Vector("Graphics Data", {         strategies: [new OpenLayers.Strategy.BBOX()],                projection: osMap.projection,        //EPSG:404000         protocol: new OpenLayers.Protocol.WFS({             version: '1.1.0',             url: 'http://xxx.xxx.x.xx:8080/geoserver/wfs',             featurePrefix: 'cite',             featureNS: 'http://www.opengeospatial.net/cite',             maxExtent: osMap.getExtent,             featureType: 'ODC_Private_Graphics_Data',             geometryName: 'the_geom',             extractAttributes: true,                         srsName: osMap.projection,  //EPSG:404000             isBaseLayer: false,             visibility: true,             schema: 'http://xxx.xxx.x.xx:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&;typename=cite:ODC_Private_Graphics_Data'                     })     });          osMap.addLayers([graphicsWFSlayer]);      }           // This function will be called when we click save icon on map web page.           function saveFeature(){      var selFeat = graphicsWFSlayer.selectedfeatures[0];      var featCoordinates = '';      var geoType = selFeat.geometry.CLASS_NAME.split('.');      var vertices = selFeat.geometry.getVertices();      for (var nd = 0; nd < vertices.length; nd++) {          if (featCoordinates == '') {               featCoordinates = vertices[nd].y + " " + vertices[nd].x          }          else {              featCoordinates += ', ' + vertices[nd].y + " " + vertices[nd].x          }      }      if (selFeat.geometry.CLASS_NAME == 'OpenLayers.Geometry.Polygon' && vertices.length > 2) {          featCoordinates += ', ' + vertices[0].y + " " + vertices[0].x          featCoordinates = '(' + featCoordinates + ')';      }                  WebService.saveGraphicsFeature(keyId, featCoordinates);     }          //My webservice function is:       <WebMethod(enablesession:=True)> _       Public Function saveGraphicsFeature(ByVal ObjId As String, ByVal coordinates As      String) As String         Try        If updateGraphicsFeature(ObjId, coordinates) = False Then                 Dim qryStr As String = "INSERT INTO ODC_Private_Graphics_Data (the_geom)    VALUES (ST_GeomFromText('POLYGON(" + coordinates + ")'))"                 dbObj.Connect()                 Dim insertCmd As NpgsqlCommand = New NpgsqlCommand(qryStr, dbObj.dbCon)                 Dim affectedRows As Integer = insertCmd.ExecuteNonQuery                 dbObj.Disconnect()                 insertCmd.Dispose()                 insertCmd = Nothing        End if         Catch ex As Exception              Finally             dbObj.Disconnect()         End Try     End Function           Private Function updateGraphicsFeature(ByVal ObjId As String, ByVal coordinates As   String) As Boolean              Try                  Dim qryStr As String = "UPDATE ODC_Private_Graphics_Data SET the_geom =    ST_GeomFromText('POLYGON(" + coordinates + ")') WHERE gid = " & ObjId                  dbObj.Connect()             Dim updateCmd As NpgsqlCommand = New NpgsqlCommand(qryStr, dbObj.dbCon)             Dim updatedRows As Integer = updateCmd.ExecuteNonQuery             dbObj.Disconnect()             updateCmd.Dispose()             updateCmd = Nothing                  If updatedRows = 1 Then Return True                  Return False              Catch ex As Exception              Finally             dbObj.Disconnect()         End Try     End Function      Please help me to fix this issue. did i miss any step in my code? or Should I set projection anywhere?


Where can I download free satellite imagery of Cambodia for offline use?

I am an entry level GIS user - I have had one semester of GIS in college. I have successfully downloaded raster satellite imagery from Seamless (tiff files) for my class project. Now I am trying to develope my GIS skills by volunteering with a non profit group that is doing environmental work with fishing villages in Cambodia. I would like to download free satellite imagery of central Cambodia - similar to what I did with the Seamless data, to begin my geoprocessing project, any recommendations?


Create cross section with polygon intersects in QGIS

Is it possible to create a cross section that shows the intersected polygons on the relief (in QGIS 2.0.1)? I would like to try this out for a geologic map. I'm using VoGisProfilTool: http://plugins.qgis.org/plugins/VoGisProfilTool/ and a NASA-DEM


Can't create view in postgresql

I have a PostgreSQL table containing some point of interest data. I have a second table with overlapping continent polygons. The following code splits the POI into the continents, but instead of extracting them, the continent ID gets written into a column of the POI data. The query is working so far.               select t3.*, array_to_string(array_cont, '') as conts from     (select ogc_fid, array_agg(conts) as array_cont from     (SELECT t1.*, cont.id AS conts         FROM continents cont, poi t1         WHERE st_contains(cont.geom, t1.wkb_geometry)         order by conts)t1         group by ogc_fid)t2, poi t3     where t2.ogc_fid = t3.ogc_fid     order by conts;      But when I run this query inside a CREATE VIEW statement, I get the following error:               CREATE OR REPLACE VIEW poi_split AS     select t3.*, array_to_string(array_cont, '') as conts from     (select ogc_fid, array_agg(conts) as array_cont from     (SELECT t1.*, cont.id AS conts         FROM continents cont, poi t1         WHERE st_contains(cont.geom, t1.wkb_geometry)         order by conts)t1         group by ogc_fid)t2, poi t3     where t2.ogc_fid = t3.ogc_fid     order by conts;              ERROR:  syntax error at or near "create"     LINE 1: create or replace view poi_split as             ^      Sorry for the bad formatting, but as far as I can see, it is no syntax error involved, as the query runs perfect without CREATE VIEW AS. It's even possible to run               CREATE OR REPLACE VIEW poi_split AS SELECT * FROM poi;      What am I doing wrong?


ArcGIS API for JavaScript - error in Dojo parser.parse()

I started creating a Dijit based on a template HTML file. I started by referencing Dojo CSS and JS directly, and all was fine. Later when I wanted to add a map into my dijit, first - changing nothing else - I switched my Dojo CSS links from googleapis.com to js.arcgis.com - and all was still fine. But then I changed the Dojo JS script reference from googleapis.com to the ArcGIS API for Javascript. Doing this causes an error. All else staying the same, this worked fine:                   <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/dojo.js"></script>              <script>             require([                 "dojo/parser",                 "dijit/layout/BorderContainer",                 "dijit/layout/TabContainer",                 "dijit/layout/ContentPane",                 "dojox/layout/ExpandoPane",                 "dojo/domReady!"],                 function (parser) {                     parser.parse();                 });         </script>      But simply changing out that first script tag with:                   <script src="http://js.arcgis.com/3.8/"></script>      I get: **dojo/parser::parse() error TypeError: Unable to get property 'toString' of undefined or null reference** when I run the page. I can provide more detail, but I don't want to put you to sleep. Thanks! **Update** : upon further toying, I see this doesn't happen every time the app starts. It happens ~3 starts out of 10 on one of my dev workstations, but every start on my other one. The first is IE10 with fast internet, the second is IE11 with moderate, whatever that's worth. Chrome gives a little more info: ![enter image description here](http://i.stack.imgur.com/LX5k8.png)


Spatial statistics tools : clustering analysis on raster data

I've an apparently simple problem, but i can't find a clear methodology to use. I'm tasked to delimit "urban areas" by vector convex polygons, using the Gridded Population of the World dataset from CIESIN This dataset provides population density values over the entire world, as a raster file. The problem is, as you have already guessed, that the density values are very changing, and the definition of "urban" is quite relative. I've tried to use a classical approach and calculated the slopes as if the density values were altitudes, but the slopes values were also very disparate and spatially complex, intricates. I've looked into spatial clustering algorithms, LISA tools (Local Indocators of Spatial Association), with ArcGIS and GeoDa, but I'm quite lost among very specific tools. Some of the methods are working only on vector shapes, so a reclassification and a vectorization are needed (long computation). Can you help me refining the set of methods and tools to use ? Thanks !


Distance from one point to many polygons

I'm using ArcMap 10.1 and have a shape file of polygons of municipalities. I also have the coordinates of the centroids of the polygons (if I need to use them).   I want a column in my attributes table which gives me, for each polygon, the distance to one specific point (lat 37N long 16E). I've been fiddling around with the Proximity Toolbox (under Analysis Tools), but don't know where to enter the coordinates of the specific point.


Publishing Map With Mosaic Dataset YIelds Grey Image When Zoomed In

I'm working with ArcGIS 10.0 and ArcGIS Server 10.0 and I'm trying to publish a map that contains a Mosaic Dataset (I believe it's a new data format at 10.0), but after zooming in to a certain extent the ortho greys out. ![enter image description here](http://i.stack.imgur.com/volTc.png) I have built/defined overviews and this has helped some ( before building the overviews, I was only getting the Footprint wireframe). The dataset that the Mosaic Dataset is referencing is a single jpeg orthophoto. If I publish the Mosaic Dataset as an Image Service I get the same results. When creating the Mosaic Dataset, I use all the default parameters and I'm not messing around with visible extents (I'm accepting full extents). Any thoughts as to what's going on here? Additionally (this may require posting another question), when I bring the jpeg image into the Mosaic Dataset the quality of the image is greatly reduced, which results in the image looking "over exposed".


phong lighting scheme in arcmap?

I have seen a few DEM/hillshades in published journal articles that use a phong lighting scheme which gives surfaces a metallic luster. Does anyone know how/if this can be achieved in arcmap?


How to convert .ps to .png in a ps.map script?

I already managed to create a .ps file. How do I convert it to .png using a GRASS script?


Does anyone know of an explicit formula that I can plug-n-chug with to convert WGS84 lat lon to kilometers or miles?

I have a lot of lat lon coordinates in WGS84 format and I'm trying to get those into kilometers so that I'm able to calculate distance.


Calculating GRID Statstics

I have a GRID raster dataset with no calculated statistics. I have tried building pyramids and calculating statistics with no luck. What am I missing? EDIT: For those who don't understand: 1. ArcToolbox-->Data Management 2. Raster-->Build Pyramids and Statistics I have also tried to build pyramids and calculate statistics separately, from the same toolbox. SOURCE: http://www.nceas.ucsb.edu/globalmarine/impacts


Bug in ControlMapMeasureTool? "Measure An Area" creates a duplicate dialog in ArcGIS Engine 10

When we add a measure tool to the AxToolbarControl through the properties dialog, we can change to measure lenght and area in the dialog that pops up. But when we add a ControlsMapMeasureTool through code like this:               Dim control As AxMapControl = axMapControl1     Dim tool As New ControlsMapMeasureTool()     tool.OnCreate(control.[Object])     control.CurrentTool = DirectCast(tool, ITool)      We followed the instructions in the documentations How to create a command or tool to work with the controls The dialog pops up but when we choose "Measure An Area" a new Measure dialog pops up and we can still only measure lenght. What are we doing wrong? Steps to reproduce:   1. Create a new MapControlApplication in VS   2. Create a new MenuItem in the Menu "Test"   3. Create a new OnClick event handler TestToolStripMenuItem_Click   4. Paste the code above into the event handler   5. Run the application   6. Load a map that has a spatialreference that is a projected coord system (not a geographic coord system).   7. choose the Test menu item   8. Change to "Measure An Area" in the dialog   9. Drag the dialog to the side.   10. Two dialogs are active but only lenght can be measured.


Conflate (merge) private shapefile data with OSM data

# Background Downloaded Alberta OSM data from Geofabrik and have it running on a private Linux server using PostgreSQL 9.1, PostGIS 2.0, Mapnik 2.1.0, osm2pgsql, Apache 2, mod_tile, renderd, and OpenLayers: ![](http://i.imgur.com/46zRJ.png) The data was imported using `osm2pgsql` as follows:               osm2pgsql -W -K -S /usr/local/share/osm2pgsql/default.style -d osm alberta.osm.bz2      # Problem The OSM data for Alberta is incomplete. I was given a set of shapefiles that improves upon the OSM data:               City.dbf, City.prj, City.sbn, City.sbx, City.shp, City.shp.xml, City.shx      Plus additional shapefiles for villages, urban areas, municipal district boundaries, and so forth. I have successfully imported the shapefiles into PostgreSQL using a pgAdmin plugin. The `City.prj` file describes its projection as follows:               GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]      The shapefile data and OpenStreetMap (OSM) data each have their own database, but I believe I want to import the shapefile data into the OSM database. (This is a private server and a local copy of the OSM data; the shapefile data cannot legally be shared.) ## Update #1 To be clear, the shapefiles do not contain roads: only municipality boundaries (that are definitely not part of the OSM data), cities (some of which are part of the OSM data), and city boundaries for larger cities (some of which might conflict with the OSM data). ## Question How do I merge the shapefile data with OSM data so that the new cities appear on the map? Note: My main concern is resolving duplicate data (e.g., Edmonton is listed in both OSM and the procured shapefiles). # Related Links   * http://wiki.openstreetmap.org/wiki/Shapefiles   * http://wiki.openstreetmap.org/wiki/Import/Shapefile   * http://wiki.openstreetmap.org/wiki/Convert_shp_to_osm_using_grass_and_gpsbabel   * https://github.com/wavded/js-shapefile-to-geojson   * http://redmine.yellowbkpk.com/projects/list_files/geo   * http://www.gdal.org/ogr2ogr.html   * http://wiki.openstreetmap.org/wiki/Ogr2osm   * https://github.com/andrewguertin/ogr2osm   * http://svn.openstreetmap.org/applications/utils/import/shp2osm/   * http://crschmidt.net/blog/archives/354/polyshp2osm/   * http://www.mail-archive.com/talk@openstreetmap.org/msg12487.html Thank you!


Where does one ask "Where is ...?"?

On a fairly regular basis at my place of work we get inquiries of the form _"where is Lake Potato?"_ or _"where is Poppingstone Creek?"_ or... The questions come from co-workers, the general public and other organizations. We're a government agency and sell maps, so a natural target for that kind of query. My method for answering generally resembles:   1. search the official names db (in Canada we have the Canadian Geographical Names DB),    2. Scan our local data stores and maps   3. A general internet search    4. Send an email 'round to field workers (biologists, conservation and parks officers, etc.)   5. ... ...but what to do if you get all the way to #5 and still need an answer? I could post a story on my website, and one of the 7 people who read it this year might know. GIS Stack Exchange is peopled by the kind of folk who might know, but it's off topic. Indeed, even this question about the question is close to being off topic (read as: it's ok with me if the general consensus is to move this to meta). So my question is, is there any place where _"where is such-n-such?"_ **is** on topic?


QGIS Georeferencer, unexpected transformation, and GCP placement

Im trying to get the sample map which i believe to be EPSG:3112 into QGIS and geo referenced. In my screenshot, on the right is the raster in georeferencer with the points i have added. On the left is how that same raster appears now those GCP's have been added. **Two things are happening that im not sure why or what i can do about:**   * The raster is being stretched   * And the GCP's are being arranged in a parallel type grid Both my project, and raster layer are set to 3112 and when i do the referencing i have 3112 selected as well in the transformation settings. **Thanks!** ![](http://i.stack.imgur.com/6RFBv.jpg) **Ive since tried setting these settings but no difference:** ![enter image description here](http://i.stack.imgur.com/odyv7.jpg) **This is what i get with "projective" transformation** (still deformed) ![enter image description here](http://i.stack.imgur.com/mckih.jpg) This is the result after making the grid and changing on the fly to 3112, there is also pictured the settings i try for "densify geometries", when i click ok it asks for crs, and after that it i dont see anything new and the except in the layer window, except the dialog stays open and progress bar continually slides back and forth... ![enter image description here](http://i.stack.imgur.com/G0Kmf.jpg)


Search functionality in Openlayers/Geoserver

I am using Openlayers,Geoserver & Postgis.... My postgis tables are having columns as id, name, POINT/POLYGON/LINE. Each table corresponds to a layer that I am showing in layerswitcher in OL. I am getting these layers via WMS from geoserver. I want to implement search functionality so that whenever a user gives a string(name value of the table) in search box, he should be zoomed to that particular feature on the map. Can anyone guide me how to achieve this functionality??? Any help is highly appreciated The idea I got is: Step 1: User has to check only one layer(the layer in which he want to search) in layerswitcher before searching . But how to get which layer has been selected?? Step 2: After knowing the selected layer , Using php search that corresponding table for the search string in names column , if it is present get the latitude and longitude values. But how to get these values and what if they are polygons/lines??? Step 3: how to send these latitude longitude values to JS so that I can zoom to that point??? I have completed 2 1/2 steps. I am using st_box2d and getting the bounds of the feature as "BOX(minx miny,maxx maxy)"...... where bounds contain BOX(minx miny,maxx maxy) the code below is the ajax function for fetching bounds from db. Now how to use bounds variable to zoom to that feature.                <?-- code for displaying map -->      function searchfunction(form)             {                    httpObject = getHTTPObject();                 var searchvalue=form.searchvalue.value;                 if (httpObject != null)                  {                     httpObject.open("GET","searchfeature.php?selectedlayer="+selLayer+"&searchvalue="+searchvalue,true);                     httpObject.send(null);                      httpObject.onreadystatechange = function()                     {                         if(httpObject.readyState == 4)                         {                             bounds=httpObject.responseText;                         }                     }                 }             }


Standard for identifying cities?

I was doing a research project a little while ago and found out about FIPS 6-4 which is used to identify counties in the United States. I also understand that this standard is a bit out of date. Is there a similar standard for identifying cities?


iPad mapping application with custom maps

I'd like to load custom maps onto my iPad and use them offline with the GPS for navigation. These are maps I can prepare in any format and projection. Is there an application that can take, for example, a GeoTIFF or group of GeoTIFFs and use them as the background with a GPS dot overlay? **Edit** **Use case** : I'm navigating about 100 km by snow-mobile across part of Antarctica. Normally we use standard GPS, but those screens are tiny, hard to see through goggles and hoods, and hard to interact with through gloves. I'd like to use an iPad (and a stylus to get around the gloved issue) because it has a nice big screen. I'll pack it with hand-warmers to keep it functional. **Data set** : I have 0.5 m/pixel images of the terrain. At that resolution we can see the (visible) crevasses and the sensors (GPS, seismic) that we are trying to find, although they have moved a few 10s to 100s of m with the ice as it flows. Each image covers about 17 square km and is about 4 GB in size. I can generate these images as more smaller files, move up to 1 m/pixel if necessary, etc.


How to dissolve polygons that have been split back into their original polygons?

I had a feature class containging about a thousand polygons.After some processing such as intersecting, dissolving, merging, more intersecting, I ended up with a feature class of about 6000 polys. This was several months ago, and since then more data has been added/removed, attributes have changed etc. I now need to get the feature class back to its original state. Not original as in the actual shapes from before, but where one original polygon was split into 4 polys, it must now be dissolved back into one. ![enter image description here](http://i.stack.imgur.com/XW40B.jpg) One method I considered was using `Spatial Join` with the match option of `Shares_a_line_segment_with`, as all the polys which share a line segment would have originated from the same polygon. Unfortunately, the unique IDs assigned to the original polygons were 'lost' a while ago, so I cannot just dissolve the result of the spatial join based on target or join ID, as multiple polys share line segments, and they would all be joined to each other (resulting in several join and target IDs in overlapping polys). I don't need to preserve the attribute information, I only want the original polygons back. I was thinking of using a feature selection iterator to select by location on each feature where it shares a line segment with another, populating a list with the relevant IDs and then calculating a unique ID for the group, which I could use as my dissolve field, but that seems unnecessarily complicated, and I'm sure there is something simpler I could do.


How can I find the median column in a database?

I have data on period of construction for dwellings in dissemination areas. I have transferred this data to my study areas and would like to determine the median period of construction for each study area. The only problem is that the columns' information is the number of dwellings and I do not want the median of these, but the title of the column to populate the row in a new field (or something else indicating it, preferably the period in text format, but it's not the end of the world if it's just a number indicating the period). I am attaching a picture of the attribute table with the relevant fields highlighted. There is a MEDIAN field but the data I am using was created by someone else and poorly documented, so I am not certain as to whether the calculation was already conducted or not. (The seven columns represent seven non-overlapping time periods ordered chronologically. The [Median] field appears to index the period at which total construction was half-complete; that is, it records the _median time._ ) ![Screen shot of table](http://i.stack.imgur.com/nD9Xj.jpg)


How to create a shapefile consisting of 2 lines using Python OGR?

How would you create a shapefile consisting of 2 lines using Python OGR? First line is no problem, but how do you reuse MyLine and Feature objects to create the second line? Ultimately this will be in a loop with thousands of lines created...               from osgeo import ogr     driver = ogr.GetDriverByName('ESRI Shapefile')     datasource = driver.CreateDataSource('c:/temp/testlines.shp')     layer = datasource.CreateLayer('layerName',geom_type=ogr.wkbLineString)          #create first line 0,0 to 10,0:     myLine = ogr.Geometry(type=ogr.wkbLineString)     myLine.AddPoint_2D(0,0)     myLine.AddPoint_2D(10,0)     feature.SetGeometryDirectly(myLine)     layer.CreateFeature(feature)          #create next line 0,0 to 0,10?:     #how to you reuse the myLine, feature objects?     #myLine.DeletePoints()#something like this?     myLine.AddPoint_2D(0,0)     myLine.AddPoint_2D(0,10)     #feature.NesGeometry() #something lik this?     feature.SetGeometry(myLine)     layer.CreateFeature(feature)


How to zoom exactly to a desired scale in Flex?

I am using ArcGIS API for flex 2.4 with ArcGIS server 10. I am trying to write the widget where user can define the **map scale** (type it in text box) and it will zoom to that scale. I successfully created a widget. But When I type scale in the text box it still zooms to the **nearest LOD scale level.** e.g. if i zoom to 5000 scale, it will take it as 4,514. Could anyone suggest what change I need to make? Is there anything that needs to be defined in MapManager?               <?xml version="1.0" encoding="utf-8"?>     <!--     ////////////////////////////////////////////////////////////////////////////////     //     // Copyright (c) 2010 ESRI     //     // All rights reserved under the copyright laws of the United States.     // You may freely redistribute and use this software, with or     // without modification, provided you include the original copyright     // and use restrictions.  See use restrictions in the file:     // <install location>/License.txt     //     ////////////////////////////////////////////////////////////////////////////////     -->     <viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009"                        xmlns:s="library://ns.adobe.com/flex/spark"                        xmlns:mx="library://ns.adobe.com/flex/mx"                        xmlns:esri="http://www.esri.com/2008/ags"                        xmlns:viewer="com.esri.viewer.*"                        widgetConfigLoaded="init()">         <fx:Script>             <![CDATA[                 //this function called when the widget's configuration is loaded                 private function init():void                 {                     if (configXML) // checking for valid content in the configuration file                     {                          }                          mapScaleObj.text = String(map.scale);                            }                      private function doScale():void                 {                     map.scale = Number(mapScaleObj.text);                     mapScaleObj.text = String(mapScaleObj.text);                 }             ]]>         </fx:Script>         <viewer:WidgetTemplate id="helloWorld"                                width="250" height="110">             <viewer:layout>                 <s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>             </viewer:layout>             <s:SkinnableContainer >                 <s:HGroup>                     <s:Label height="100%" color="#FFFFFF" fontSize="14" fontWeight="bold" text="Scale 1:"                              verticalAlign="middle"/>                     <s:TextInput id="mapScaleObj"   text="{map.scale}"                                             restrict="0-9"                                  enter="doScale();"                                  />                 </s:HGroup>              </s:SkinnableContainer>              </viewer:WidgetTemplate>     </viewer:BaseWidget>


Having trouble linking VS 2008 C++ application

I am trying to resolve a few last exgternal link references in my program. Help in locating the correct libraries for Windows would be thanked. I may have incorrect versions of some of my current libraries. The link errors are:               1>------ Build started: Project: shpFOD, Configuration: Release MinDependency Win32 ------     1>Compiling...     1>ShapePublisher.cpp     1>.\ShapePublisher.cpp(789) : warning C4996: 'QgsMapLayerRegistry::addMapLayer': was declared deprecated     1>        C:\OSGeo4W\apps\qgis\include\qgsmaplayerregistry.h(66) : see declaration of 'QgsMapLayerRegistry::addMapLayer'     1>Linking...     1>libshp.lib(wpoly.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance     1>   Creating library ReleaseMinDependency/shpFOD.lib and object ReleaseMinDependency/shpFOD.exp     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapLayer::staticMetaObject" (?staticMetaObject@QgsMapLayer@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsCoordinateTransform::staticMetaObject" (?staticMetaObject@QgsCoordinateTransform@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapRenderer::staticMetaObject" (?staticMetaObject@QgsMapRenderer@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsVectorLayer::staticMetaObject" (?staticMetaObject@QgsVectorLayer@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsApplication::staticMetaObject" (?staticMetaObject@QgsApplication@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static bool QgsApplication::mRunningFromBuildDirVERSION_INT" (?mRunningFromBuildDirVERSION_INT@QgsApplication@@0_NA)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QString QgsApplication::mCfgIntDirVERSION_INT" (?mCfgIntDirVERSION_INT@QgsApplication@@0VQString@@A)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QString QgsApplication::mBuildSourcePathVERSION_INT" (?mBuildSourcePathVERSION_INT@QgsApplication@@0VQString@@A)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QString QgsApplication::mBuildOutputPathVERSION_INT" (?mBuildOutputPathVERSION_INT@QgsApplication@@0VQString@@A)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapLayerRegistry::staticMetaObject" (?staticMetaObject@QgsMapLayerRegistry@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapCanvas::staticMetaObject" (?staticMetaObject@QgsMapCanvas@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QStringList QgsApplication::mGdalSkipListVERSION_INT" (?mGdalSkipListVERSION_INT@QgsApplication@@0VQStringList@@A)     1>.\../bin/Release/shpFOD.dll : fatal error LNK1120: 12 unresolved externals     1>Build log was saved at "file://c:\SGIS\newshpfod\ReleaseMinDependency\BuildLog.htm"     1>shpFOD - 13 error(s), 1 warning(s)     ------ Starting pre-build validation for project 'shpSetup' ------      ------ Pre-build validation for project 'shpSetup' completed ------     2>------ Build started: Project: shpSetup, Configuration: Release ------     Building file 'C:\SGIS\Setup1\Release\shpSetup.msi'...     WARNING: Unable to create registration information for file named 'mpsuomlib.tlb'     WARNING: Unable to create registration information for file named 'fodmlib.tlb'     ERROR: Could not find file 'c:\SGIS\bin\Release\shpFOD.dll' 'The system cannot find the file specified.'     ========== Build: 0 succeeded, 2 failed, 1 up-to-date, 0 skipped ==========


How to load shapefile in Oracle Spatial

I am newbie to oracle spatial. I want to load shapefile into oracle spatial. I am using oracle 11g. I have already look at the following examples and answers               http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_shapefile_converter.htm#SPATL1430      How do use the Shapefile Converter in Oracle 12c to load a Shapefile? Where I found the following example to load a shapefile > java -classpath > %ORACLE_HOME%\jdbc\lib\ojdbc5.jar;%ORACLE_HOME%\md\jlib\sdoutl.jar;%OR > ACLE_HOME%\md\jlib\sdoapi.jar > oracle.spatial.util.SampleShapefileToJGeomFeature - h gis01 -p 1521 -s orcl > -u scott -d tiger -t states -f states -r 8307 -g geom I have the files on the following directory `ojdbc14.jar - D:\app\user\product\11.2.0\dbhome_1\jdbc\lib` `ojdbc5.jar - D:\app\user\product\11.2.0\dbhome_1\jdbc\lib` `sdoutl.jar -D:\app\user\product\11.2.0\dbhome_1\jdbc\lib` `sdoapi.jar - D:\app\user\product\11.2.0\dbhome_1\jdbc\lib` Java - C:\Program Files\Java\jdk1.7.0_21\bin `shapefile (bd.shp) - E:\data\bd.shp` So I used the following codes `java -classpath D:\app\user\product\11.2.0\dbhome_1\jdbc\lib\ojdbc5.jar;D:\app\user\product\11.2.0\dbhome_1\jdbc\lib\sdoutl.jar;D:\app\user\product\11.2.0\dbhome_1\jdbc\lib\sdoapi.jar oracle.spatial.util.SampleShapefileToJGeomFeature -h localhost -p 1521 -s hr -u hr -d password -t bd -f E:\data\bd -r 8307 -g geom` Would anyone help me to run this code with those directory?


Is there a maximum number of feature classes at File GDB?

Is there a maximum number of feature classes at File GDB ? I'm running a script that creates FC's, after around 1000 a get error of a schema lock ERROR 000210: Cannot create output.


error in data read in OSMembrane osmosis

I am just learning to use OSMembrane, and i created a simple pipeline to read an .osm file and write the same in another file. But it says error in reading the file. The report is like this and I can't understand what is wrong here.               Dec 06, 2012 11:48:04 AM org.openstreetmap.osmosis.core.Osmosis run     INFO: Osmosis Version 0.41     Dec 06, 2012 11:48:04 AM org.java.plugin.registry.xml.ManifestParser <init>     INFO: got SAX parser factory - org.apache.xerces.jaxp.SAXParserFactoryImpl@449afc     Dec 06, 2012 11:48:04 AM org.java.plugin.registry.xml.PluginRegistryImpl configure     INFO: configured, stopOnError=false, isValidating=true     Dec 06, 2012 11:48:04 AM org.java.plugin.registry.xml.PluginRegistryImpl register     INFO: plug-in and fragment descriptors registered - 1     Dec 06, 2012 11:48:04 AM org.java.plugin.standard.StandardPluginManager activatePlugin     INFO: plug-in started - org.openstreetmap.osmosis.core.plugin.Core@0.41.0     Dec 06, 2012 11:48:04 AM org.openstreetmap.osmosis.core.Osmosis run     INFO: Preparing pipeline.     Dec 06, 2012 11:48:04 AM org.openstreetmap.osmosis.core.Osmosis run     INFO: Launching pipeline execution.     Dec 06, 2012 11:48:04 AM org.openstreetmap.osmosis.core.Osmosis run     INFO: Pipeline executing, waiting for completion.     Dec 06, 2012 11:48:05 AM  org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion     SEVERE: Thread for task 1-read-xml failed     org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: database "osm" does not exist)     at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)     at org.openstreetmap.osmosis.pgsnapshot.common.DatabaseContext.doesTableExist(DatabaseContext.java:215)     at org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.DatabaseCapabilityChecker.initialize(DatabaseCapabilityChecker.java:34)     at org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.DatabaseCapabilityChecker.isWayBboxSupported(DatabaseCapabilityChecker.java:61)     at org.openstreetmap.osmosis.pgsnapshot.v0_6.PostgreSqlCopyWriter.initialize(PostgreSqlCopyWriter.java:72)     at org.openstreetmap.osmosis.pgsnapshot.v0_6.PostgreSqlCopyWriter.process(PostgreSqlCopyWriter.java:102)     at org.openstreetmap.osmosis.xml.v0_6.impl.BoundsElementProcessor.end(BoundsElementProcessor.java:84)     at org.openstreetmap.osmosis.xml.v0_6.impl.OsmHandler.endElement(OsmHandler.java:107)     at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)     at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)     at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)     at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)     at javax.xml.parsers.SAXParser.parse(Unknown Source)     at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:111)     at java.lang.Thread.run(Unknown Source)     Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: database "osm" does not exist)     at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)     at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)     at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)     at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)     at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)     ... 21 more     Caused by: org.postgresql.util.PSQLException: FATAL: database "osm" does not exist     at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:469)     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:112)     at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)     at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)     at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)     at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)     at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)     at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)     at org.postgresql.Driver.makeConnection(Driver.java:393)     at org.postgresql.Driver.connect(Driver.java:267)     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)     at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)     at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)     at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)     ... 25 more     Dec 06, 2012 11:48:05 AM org.openstreetmap.osmosis.core.Osmosis main     SEVERE: Execution aborted.     org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.     at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)     at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)     at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)     at org.codehaus.classworlds.Launcher.main(Launcher.java:47)


using gdal2tiles 2 tile a png longlat. keep getting wrong coordinate box in google kmls

I have tried lots of variations, but can't seem to get gdal2tiles to do what it used to do. Prior version? images are 60N to 60S and 180W to 180E 9000 pix x 3000 lines. gdal2tiles keeps outputting doc.kml like so:               <LatLonAltBox>       <north>85.05112877980660</north>       <south>-85.05112877980659</south>       <east>180.00000000000000</east>       <west>-180.00000000000000</west>     </LatLonAltBox>      used to output:               <LatLonAltBox>      <north>60.02000000000000300000</north>      <south>-59.97999999999999700000</south>      <east>179.97999999999999000000</east>      <west>-180.02000000000001000000</west>     </LatLonAltBox>      any help is appreciated. The old codes worked fine. New setup requires specifying -z -s and nothing works anymore.


What might cause OpenLayers plugin to hang on windows 8.1?

I'm trying to add OpenStreetMap layer to the map through OpenLayers plugin and then application hangs. The problem occures on Windows 8.1 QGIS 2.0.1. On Windows 7 everything works correct. Does anyone know what might be problem and how to fix it or how to add OSM another way?


Calculate Slope of Street Segments

Using a DEM, I need to assign slope to individual segments in a street centerline feature class. It will be used to account for increased travel time for steep slopes in a network analysis. I am using ArcGIS 10.0, ArcInfo license, with 3D Analyst and Spatial Analyst extensions available. My initial attempt was to use the "Add Surface Information" tool. However, the resulting average slope values seem suspect in some areas, for example if a stream crosses the street segment. I would like to try assigning elevations to street segment endpoints then calculating slope. I have read about this method (this question) but need further details on the process.


Network Analyst Loading Origins/Destinations and wait times

I'm having a difficult understanding the loading times when loading origins/destinations into Network Analyst. I have many network datasets that all vary slightly. They were created in batches so the process used to create them is the same and reproducible... For some networks, the points for the origins load rapidly (perhaps 100pts/sec). Others load as slow as 10pts/min. There is no pattern to which networks load faster than others. It's incredibly frustrating to deal with the slower ones. The same point feature class is used for all Origins and Destinations, a set of about 40,000 points. Any insights into the cause of this and/or solutions?


When using arcpy can I only calculate fields of a subtype and not the entire feature class?

I'm appending two sepearte shapefiles into one feature class with different subtypes. Is there a way to only calculate fields from a certain subtype?


Is it possible to retrieve lost versioned data in SQL Server Management Studio?

One of my staff accidentally deleted a feature class she was creating in her version before I reconciled it. I have grabbed a back up of the database from yesterday in SQL Management Studio. Is there a way to locate the table with the unreconciled data and restore it? I'm using ArcGIS 10.1


How to insert a feature using WFS-T based on a criteria?

I am pretty new to WFS/WFS-T and need help with some suggestions on how the following requirement can be implemented. We have a need to insert a feature into a PostGIS database based on the following condition. The user provides a geometry along with other data to be inserted. But before doing so: 1.Check if there is any existing feature in the table whose geometry intersects with the one that is provided. 2.If there is any, throw an exception/error. 3.If successful, then insert record and return success message. I read that OGC Filters can be used to query intersections, and WFS-T can be used to insert features, but I do not know how to implement query and an insert together. Can some one shed some light on how this can be done?


When a raster is clipped to a polygon with Python, why does it still take on the extent of the entire shapefile?

I am clipping a raster image to each polygon row in a shapefile in ArcMap 9.3 using the Clip tool (Data Management) in Python with Clipping Geometry set. While the clipped raster successfully depicts the intersection of the raster and the polygon, the extent of the clipped raster is still that of the original raster. Here is my code:               # Import system modules      import sys     import string     import os     import arcgisscripting       # Create the Geoprocessor object     gp = arcgisscripting.create(9.3)     # Load required toolboxes...     gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")     # Designate a workspace     gp.workspace = "L:\Clip"  # Assign variables...      clipto = "test.shp"  # shapefile to clip to      clipit = "vfcm.tif" # features to be clipped            # Cursor time     rows = gp.SearchCursor(clipto)     row = rows.Next()          # clip management     while row:         n = str(row.VAHU6) # assign a variable for the processing message based on a field         clipgeo = row.Shape         print "clipping to: " +n # tells what row was clipped         # Clip_management <in_raster> <rectangle> <out_raster> {in_template_dataset}   {nodata_value} {NONE | ClippingGeometry}          outputname = str(row.VAHU6) + "_c"          extent=str(clipgeo.extent)         gp.Clip_management(clipit, extent, outputname, clipgeo, "", ClippingGeometry)          #update str if necessary         print str(row.VAHU6)         row=rows.next()          # reset the array...     del rows     del gp      Do you know why I am having this problem? When I run the tool in Model Builder, it works correctly. This problem is evident both in the file size (which is 10x greater than when correctly clipped) and when I "zoom to layer" in ArcMap. If you know how to adjust the code to work, I'd be very appreciative! Thank you! UPDATE: Even if I export one polygon from the shapefile manually, look up the extent in the source tab, and then type those coordinates directly into the extent in my code, it still doesn't clip properly.


How to clip raster image by the extent of each row in a shapefile with ArcGIS 9.3

I'm using Python to clip a raster image by each row in a shapefile with ArcGIS 9.3. I am hoping to end up with one raster image for each polygon row, clipped to the extent of the polygon row. However, my current script clips the raster to the entire shapefile, instead of setting the extent by each polygon row. My script is as follows:               # Import system modules     import sys     import string     import os     import arcgisscripting          # Create the Geoprocessor object     gp = arcgisscripting.create(9.3)          # Load required toolboxes...     gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")          # Designate a workspace     gp.workspace = "L:\Clip"          # Assign variables...     clipto = "test.shp"          # grids to clip to     clipit = "vfcm.tif" # features to be clipped          # Cursor time     rows = gp.SearchCursor(clipto)     row = rows.Next()          # clip management     while row:         n = str(row.VAHU6) # assign a variable for the processing message based on a field     print "clipping to: " +n # tells what grid was clipped          # Clip_management <in_raster> <rectangle> <out_raster> {in_template_dataset}   {nodata_value} {NONE | ClippingGeometry}     outputname = str(row.VAHU6) + "_c"     desc = gp.Describe(clipto)     extent = str(desc.Extent)     gp.Clip_management(clipit, extent, outputname, clipto, "", ClippingGeometry) #update str if necessary     print str(row.VAHU6)     row=rows.next()          # reset the array...     del rows     del gp      Any ideas how to fix it? Thanks!


ArcObjects C++ - Has anyone successfully used AoToolbarAddCommand?

I am working with the C++ API for ArcObjects (Linux, QT), and I am running into problems with when creating a custom button on a toolbar. I have read up on the C++ specific implementation of creating a custom command (inheriting from `AoCommandBase` and adding the button with `AoToolbarAddCommand`). After many hours of fiddling around, I have come to the conclusion that `AoToolbarAddCommand` simply isn't doing its job. I can add ESRI predefined commands with no problem, but my custom command shows up as a useless grey square (my icon doesn't even display). My debug output suggests that none of the functions defined in my command are being called during setup (or ever for that matter), and they definitely should be. If it helps, excerpts from my code are below: From the add_toolbar_items function:               CComVariant varTool;          long itemindex;          varTool = L"esriControlCommands.ControlsOpenDocCommand";     ipToolbar->AddItem(varTool, 0, -1, VARIANT_FALSE, 0,             esriCommandStyleIconOnly, &itemindex);          panRight = new PanRight(); /*panRight is global, PanRight is my command class*/          AoToolbarAddCommand(ipToolbar, panRight, esriCommandStyleIconOnly);      The PanRight class (my custom button) is stolen from a sample, but I changed the code for loading bitmaps because the provided code did not work. All the other functions remain unchanged, except for a cout statement letting me know if the function were ever to run.               PanRight::PanRight()     {       m_ipHookHelper.CrreateInstance(CLSID_HookHelper);       std::cout<<"panright constructor\n";            //load bitmap       IPictureElement3Ptr ipPict(CLSID_PictureElement);       HRESULT hr = ipPict->ImportPictureFromFile(CComBSTR(L"<pathToPic>"));       if(SUCCEEDED(hr))       {         OLE_HANDLE hBitmap;         hr = ipPict->get_Handle(&hBitmap);         if(SUCCEEDED(hr))           {m_hBitmap = hBitmap;}       }     }      Does anyone have any ideas as to why `AoToolbarAddCommand` might not be doing its job? Has anyone successfully added a custom command using the C++ API?


OpenLayers doesn't show an overlay with a different SRS than the base layer

I need to add an overlay layer that uses EPSG:4326 to a map with a base layer that uses EPSG:32628. Every time I add the overlay OpenLayers automatically switches the SRS param of the overlay to EPSG:32628 (SRS of baselayer); I can see the base layer, but the overlay isn't shown. My code is this:               baselayer = new OpenLayers.Layer.WMS(                    baselayername, baselayerurl,                    {                       width: varmap.size.w,                       srs: 'EPSG:32628',                       layers: baselayername,                       height: varmap.size.h,                       styles: style,                       format: format                    }                    );          overlaylayer = new OpenLayers.Layer.WMS(                    overlaylayer name, overlaylayer url,                    {                       width: varmap.size.w,                       srs: 'EPSG:4326',                       layers: layername,                       height: varmap.size.h,                       styles: style,                       format: format,                       transparent: true                    }                    );          varmap.addLayers([baselayer,overlaylayer]);      How can I do this?


Why is the CSVT file changing my real values to null?

I made a CSVT file to change desired real data to string data. After importing the original CSV file, that was linked by file name to the CSVT file, the string data appears as normal however all the real data has been replaced with NULL values! Why is this happening? With in the CSVT I have made sure there are no spaces, and I have also made sure the file name is exactly the same as the CSV. Any suggestions would be helpful!


Adding layers with different WKIDs to ArcGIS API for Silverlight application?

In Esri Silverlight application, how can a map layer with a different WKID than the one used in the application be added? Will Esri 's Silverlight application handle the re-projection?


Table calculation in QGis

I have a shape file with the attribute "yield".   I need to know the math difference between yield (id1) and yield (id2)...then yield (id2) and yield (id3) and so on... I hope you understand what I mean.   In Excel it is easy to handle. But I do not want to export and import the files. Thank you.