WMSGetFeatureInfo : No feature found on click

My map displays well my WMS layers. When i try to get the feature info, the debugger tells me no feature is found `features: Array[0] , length :0` I don't know if it is because of a projection issue: map is in 4326, original data is in 27563 ; or if it comes from geoserver. Here is my simplified code:               function init(){                  map = new OpenLayers.Map({               'map'});                  var base_layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",             "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );             map.addLayer(base_layer);     wmsLayers = {                 'Poly':{                     geoserverName: 'workspace:name'                 },                 'Point':{                     geoserverName: 'workspace:name2'                 }             }                  var geoserver = {                 url: 'http://X.XXX.XXX.XX:8080/geoserver/wms',                 options: {                         isBaseLayer: false,                         displayInLayerSwitcher:true,                         singleTile:false,                         opacity:0.5                     }                 };                  wmsLayerList = [];                  for (var wmsLayerType in wmsLayers) {                 wmsLayer = wmsLayers[wmsLayerType];                 // Create layer for each wmsLayer                 olwmsLayer = wmsLayers['layer'] = new OpenLayers.Layer.WMS(                     wmsLayerType,                     geoserver.url,                     {                     layers: wmsLayer.geoserverName,                     transparent:true,                     format: 'image/png'                     },                     geoserver.options                 );                      // add layer to map                 map.addLayer(olwmsLayer);                      // add to layer list                 wmsLayerList.push(olwmsLayer);             }                  map.addControl(new OpenLayers.Control.LayerSwitcher());                  highlightLayer = new OpenLayers.Layer.Vector("Highlighted Features", {                 displayInLayerSwitcher: true,                 isBaseLayer: false                 }             );             map.addLayer(highlightLayer);                  infoControls = {                 click: new OpenLayers.Control.WMSGetFeatureInfo({                     url: geoserver.url,                     title: 'Identify features by clicking',                     layers: wmsLayerList,                     queryVisible: true                 }),             for (var i in infoControls) {                 infoControls[i].events.register("getfeatureinfo", this, showInfo);                 map.addControl(infoControls[i]);             }                  infoControls.click.activate();         function showInfo(evt) {             alert(evt.xy.x +', '+ evt.xy.y +', length: '+ evt.features.length);         }     }      **EDIT** geoserver log:               Request: getFeatureInfo         QueryLayers = [org.geoserver.wms.MapLayerInfo@XXX, org.geoserver.wms.MapLayerInfo@XXX]         GetMapRequest =      GetMap Request      version: 1.1.1      output format: image/png      width height: 603,460      bbox: ReferencedEnvelope[X : X, X : X]      layers: XXX      styles: green,line         XPixel = 405         YPixel = 232         FeatureCount = 10         InfoFormat = text/html         Exceptions = application/vnd.ogc.se_xml         PropertyNames = null         Get = false         RawKvp = {INFO_FORMAT=text/html, BBOX=X, X, X, X, QUERY_LAYERS= XXX, SERVICE=WMS, HEIGHT=460, REQUEST=GetFeatureInfo, STYLES=,, WIDTH=603, FEATURE_COUNT=10, VERSION=1.1.1, FORMAT=image/png, LAYERS= XXX, Y=232, X=405, SRS=EPSG:4326}         BaseUrl = http://X.XXX.XXX.XX:8080/geoserver/         RequestCharset = null         Version = 1.1.1         Request = GetFeatureInfo


Using distance and transform from geomfromtext from postgis in spatialite

I have the following query which I want to apply on my from postgis to spatialite imported database. The problem is that the result of the distance is always null, while the other selected coloumns are containing the expected values. So how can I use this query in spatial lite? It should calculate the distance from the given point to all in the databases stored points and sort them by the distance.               "select x1, y1, source, st_distance(st_transform(st_geomfromtext('POINT(' || x1 || ' ' || y1 || ')',4326),32633),st_transform(st_geomfromtext('POINT(15.442161 47.068170)',4326),32633)) from tablex order by st_distance asc limit 1;"      I tried it in spatialite with the following query:               "select x1, y1, source, distance(transform(geomfromtext('POINT(' || x1 || ' ' || y1 || ')',4326),32633),transform(geomfromtext('POINT(15.442161 47.068170)',4326),32633)) from tablex order by distance asc limit 1;"      If I do not use the transform function I get the right result, but the distance is in degrees and not in metres, as I would need it.


How can I make PROC GMAP (SAS) run is less time?

I am trying to create a map of Australia, by Local Government Area (LGA), with shaded regions displaying the population for each LGA. The shape file can be downloaded from the Australian Bureau of Statistics (ABS) Website. However, the program will not run in a reasonable time period. If I use a subset of the map (say, 100 observations), the code does run, although I get something that is obviously incomplete. If I run the the code with all observations for the map, SAS crashes. There are around 3 million observations in the map, which is too much for SAS to handle. How can I make Proc GMAP run is less time? Here is my code:               proc mapimport datafile="[insert path]\LGA11aAust.shp" out=mymap;     run;          proc sql;       create table population_by_lga as         select distinct lga_code_2011, sum(total) as total         from caseload2         group by lga_code_2011         order by lga_code_2011;     quit;          proc sql;     create table mymap as          select *, lga_code11 as lga_code_2011          from mymap         order by lga_code_2011;     quit;          proc gmap data = population_by_lga map = mymap;       id lga_code_2011;       choro total;     run;     quit;


What's the easiest way to do a one-time mass geocode? (580,000 addresses)

I am working on a civics related project and I need to be able to display all the properties in the City of Philadelphia on a map, so I'll need to get the latitude & longitude for all 580,000 properties. (Only once) Most APIs like Google/Yahoo have limits of 5,000 per day, and even BatchGeo has a similar limit. Is there a way I can do a one-time geocoding of all these addresses?


ArcGIS fails to import all records from huge CSV file to file geodatabase table despite being within FGDB table size limits

I'm using ArcGIS 10.0 on Windows 7 64-bit with 4GB of RAM. I have some very large tables in CSV format to import to ArcGIS, they all have about 30 fields, upwards of 5 million records per table (a few have double that or more), and file sizes up to about 5 GB. I am trying to import each of them into a file geodatabase as separate tables so I can, ultimately, link them to a feature class and analyze the results in the tables according to their location. The problem is that ArcGIS seems to just quit importing records at a certain point. I'm using the "Table to Table" tool under Conversion > To Geodatabase, but the "Copy Rows" tool has the same problem. Even if I just add the CSV file directly to ArcGIS without trying to convert it to an FGDB table first, the problem is the same. One of my tables has about 11 million records, and ArcGIS only imports about 10 million of them. ArcGIS doesn't tell me that any error has occurred, the tool just finishes as if nothing is wrong. I've tried it a few times now and the number of records that make it into the FGDB table is always the same, and doesn't appear to be a file size limit I've ever heard of (not a square of 2 or 16). ArcGIS was able to import another CSV with about 6 million records and all the records came through (though with the problems I'm having with the larger table, the smaller one is kind of suspect now too). ESRI's web site lists the following size limits in a file geodatabase, and I'm far from hitting any of them: >   * File geodatabase size: No limit >   * Table or feature class size: 1 TB (default), 4 GB or 256 TB with keyword >   * Number of feature classes and tables: 2,147,483,647 >   * Number of fields in a feature class or table: 65,534 >   * **Number of rows in a feature class or table: 2,147,483,647** >   * Geodatabase name length: Number of characters the operating system > allows in a folder >   * Feature class or table name length: 160 characters >   * Field name length: 64 characters >   * Text field width: 2,147,483,647 > All I really need to do to these tables are add a couple fields, delete a couple others, and generate values for the new fields (sums of a few of the existing fields). I'm using ArcGIS for it because I'm familiar with the field calculator and I know (or _knew_ , until now) that it could handle tables consisting of millions of records, whereas most other desktop software I have handy (MS Access/Excel) chokes on that many records. So I'm open to using some other piece of software to manipulate the original table and then exporting the (much smaller) resulting table to ArcGIS. Really, the fact that I'm having this problem and that ArcGIS is not giving me any errors or warnings that the problem is even occurring makes me want to handle this data outside ArcGIS as much as possible.


Why is toolbox of ArcGIS Editor for OpenStreetMap 2.0 not in ArcToolbox of ArcGIS 10.0?

I'm using ArcGIS 10.0 and I tried to install ArcGIS Editor for OSM (version 2.0) on ArcGIS But I couldn't make my ArcToolbox list the tools that **ArcGIS Editor for OSM should've installed**. Any ideas about that? ![OpenStreetMap tools doesn't appear in ArcToolbox](http://i.stack.imgur.com/Va1Ff.png)


How can I prevent label text from overlapping in ArcGIS 10.1?

Using ArcGIS 10.1 Desktop of Home Use (ArcInfo license I believe), I'm getting results like this using the included Maplex labelling engine: https://dl.dropbox.com/u/1282990/Clipboard01%20%282%29.jpg Placement is curved. [Try horizontal position first box is unchecked.] Strategy order for fitting is:   * Stack Label - default settings    * Reduce label in size - Font is 12 pt Arial, lower limit set to 1 pts, step interval is 1.1 pts. Font Width compression is at default (90% lower limit & 5% step interval).    * Abbreviate Label - not enabled    * Overrun feature - not enabled    * Compress label in width - not sure if this enabled or not. The region "Steamboat - Hilltop 16" is properly labeled. As long as the entirety of that text is within the polygon in question I don't care how it might be stacked. The region "Steamboat - Mountain 17" (directly below Hilltop 16 and to the left) is incorrectly labeled. It has written the "- 17" underneath the Mountain and is unreadable. This didn't happen using Maplex in ArcGIS 10. Is there anyway to stop this behavior? Thanks!


FindLabel not Defined

I'm trying to make an advanced label expression using the python parser and I keep getting the following error: ![enter image description here](http://i.stack.imgur.com/7t0qG.jpg)               def FindLabel ( [Direction] ):       return  "{}° {}' {}\"".format( [Direction].split("-"))      Can anyone tell me why FindLabel is not defined?


assign_vertex_id error

I am trying to test if pgrouting works fine or not. To do so I have created a table containing the following attributes. Columns:   gid | length | the_geom | source | target Now my problem is that when I try to execute the assign_vertex_id function it is giving me the following error; PL/pgSQL function "assign_vertex_id" line 15 at EXECUTE statement ERROR: query string argument of EXECUTE is null CONTEXT: PL/pgSQL function "assign_vertex_id" line 32 at EXECUTE statement _**_*** _**Error **_** _*_** ERROR: query string argument of EXECUTE is null SQL state: 22004 Any suggestions what does this mean? Context: PL/pgSQL function "assign_vertex_id" line 32 at EXECUTE statement


How to convert .shp to .csv including attributes AND geometry?

I have a .shp file with 60k+ entries, all of which are polygons with corresponding attributes (acreage totals, landowner names, tax ID #s, etc.). What I ultimately need is a .csv file with all of these attributes and their corresponding geometry (in the .kml compatible xyz format, that is, NOT the WKT format). I know that I can open the .dbf file in excel and get the attributes. I also know that I can open the shape file in QGIS and copy the data into excel, which gets me attributes and WKT geometry. Is there a simple way to convert the .shp to .csv (openable in excel) with attribute and Google Earth friendly geometry? Thanks!


Do OSGeo4W and ArcGIS 10.0 use the same Python installation?

This question was asked several years ago at: Can ArcGIS and OSGeo4W share the same python install?, but it seems that versions have changed since then. I currently have ArcGIS 10.0 installed (not sure when I will upgrade to 10.1) and I would like to install OSGeo4W on my computer as well. ArcGIS 10.0 installs Python 2.6.5 and OSGeo4W wants to install Python 2.7.2. Can these two packages use the same Python installation despite different versions? Otherwise, is there an easy way to install OSGeo4W with the correct Python version and keep the two Python versions completely separate on a single computer?


How to change Symbology of Multiple Layers at once?

Is there a way to change symbology for multiple layers in ArcMap or ArcCatalog. I want to change the symbology of multiple layers at once.


GIS - Beyond Earth

I wanted to open a discussion on GIS beyond Earth. Here are some questions so far.   1. Would the term GIS be changed to something else since the term "geo" means of Earth (e.g. Lunar Information Systems or Martian Information Systems...etc)?   2. Are there specific software packages for handling non earth data/coordinate systems?   3. What are some current web map applications displaying non earth data besides Google Earth's Moon and Mars viewers (e.g. http://webgis2.wr.usgs.gov/Lunar_Global_GIS/)?


Why can't I add numeric(n,m) field values to PostGIS geometries in QGIS 1.7.1?

Actually I'm using QGIS 1.7.1 to create and visualise some geodata hosted by PostgreSQL 8.4 and PostGIS 1.4.0. The geodatatable is defined like this:               CREATE TABLE u2_baum     (         baum_id integer NOT NULL,         kronendurchmesser numeric(3,1),         hoehe numeric(3,1),         art_id integer,         the_geom geometry,         CONSTRAINT baum_id PRIMARY KEY (baum_id )     )     WITH (         OIDS=FALSE     );      I added some datasets on database level, using some simple INSERTs. Everything works fine, except adding attributes to new geometries in QGIS. I am able to define the geometry and all integer attribues using the QGIS tools. The only problems were caused by the attributes with the numerical[n,m] fieldtype. One can't enter new values in these fields after creating a new geometry. The field can be "write activated" in the attribute table, but it isn't possible to enter values. Also it isnt possbile to Copy and Paste some values (like 10.3) into this fields. But it is possible to change existing numerical[n,m] values. Do you know this error and a way to fix it? Best regards Philipp PS: Due to some restictions I cant actually upgarde to QGIS 1.8


Self intersections for polygons, how to solve?

I have a question about repairing a self intersecting polygon shapefile. I have a shapefile containing Polygons (ZM) which have self intersecting features. If I use the "repair geometry" tool, it finds several self intersections and fixes them. Hurray! But when I make an export of this file (or a selection of it), this export contains self intersections again. This happens on all the tries I've done to handle the problem, which include:   1. Use the tool "repair geometry", failed;   2. Dissolve the polygons based on all of their attributes, failed;   3. Dispose of the ZM properties, and then do all of above, failed; Even when I import this shapefile into an Geodatabase using ArcCatalog, it imports correctly, but when I make an export from the database, the self intersections are there again. So any advice on how to fix this problem would be very much appreciated. If anyone could explain why this type of behaviour exists, it would be wonderful. I'm using ArcGIS 9.3.1 build 4000 (SP2). Thanks in advance.


What's the fastest way to search for polygons that intersect with others?

I'm querying the database for searching polygons that intersect with others, but is very slow research, wanted to increase the speed. I thought of using sphinx, solr, elastic search googled but did not find much content on georeferencing, wanted to know if it is possible to manipulate polygons in these tools Im using st_intesects on where clause, using buffer in a polygon because i want search intersetions > 50m


Overlay Shapefile onto Geotiff

I have a Geotiff map and I want to overlay a Shapefile onto it. Ideally I want to specify a 'nice' style for the polygons e.g. have them opaque (for now all polygons should be the same). I want to print it so I don't want any resampling etc. going on. How can I accomplish this? edit: To add a little background: I generated Maps from Openstreetmap using Maperitive. I want to overlay Polygons from Shapefiles to visualize buildings in contrast to the osm buildings. I do not want to resize or resample the maps themselves as the workflow is adjusted exactly for these image sizes. I already converted coordinate systems of raster- and vector files so both are of the same type.


How to place markers on the outline of a circle in google maps?

I have the center of a circle and it's radius and I need to place variable amount of markers on the outline/stroke of the circle. The distance between this markers should kept same, so if I have 8 markers to put on the orbit, each of them has 45 degree space (360 / 8) and also it should not be hard- coded as the number of markers is variable. I wanted to know what is the right way for calculating the Geo-coordinates of each marker? here you can see an example, the outer marker should move on, however I can't calculate the proper LatLng values. ![enter image description here](http://i.stack.imgur.com/uewJ3.jpg) * * * I finally came up with this formula:               var dg = 90;     var lat = Math.sin(dg * Math.PI / 180) * r + center_geo_lat;     var lng = Math.cos(dg * Math.PI / 180) * r + center_geo_lng;      If you look at snapshots you can see that markers at 0 and 180 degree has placed quite fine, but it seems there is something wrong with other markers. It's gonna works fine for me, because I don't need such a perfect accuracy, however I'm wondering what's cause the problem? ![enter image description here](http://i.stack.imgur.com/SXLiZ.jpg) ![enter image description here](http://i.stack.imgur.com/NmRsa.jpg)


Using labels/attributes from arcMap to display information

I am wanting to take the labels/attributes that are used in arcMap and display them in an InfoWindow when the user clicks on the map point. I really have no idea where to start on this so any help would be appreciated. I have attached a screen shot of my arcMap with the labels as well as a screen shot of where I am wanting the labels to appear. If you look at the picture titled 'InfoWindow,' Utah is displayed when the user clicks on the state. Here is the xaml I have used with my maps so far:               <esri:Map x:Name="MyMap" Background="#FFE3E3E3" WrapAround="True" MouseClick="MyMap_MouseClick" MouseRightButtonDown="MyMap_MouseRightButtonDown" Extent="-9834972.92753924,4441899.425293319,-9833977.88119163, 4442762.485358352">                     <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />     <esri:ArcGISDynamicMapServiceLayer  ID="ID" Url="This is where the URL is."/>     </esri:Map>                      <Border Background="{StaticResource PanelGradient}" BorderThickness="1" CornerRadius="5"                 HorizontalAlignment="Left"  VerticalAlignment="Top"                 Margin="20" Padding="5" BorderBrush="Black" >                     <esri:Legend Map="{Binding ElementName=MyMap}"                              LayerIDs="ID"                              LayerItemsMode="Tree"                              ShowOnlyVisibleLayers="False"                              Refreshed="Legend_Refreshed">                         <esri:Legend.MapLayerTemplate>                             <DataTemplate>                                 <StackPanel Orientation="Horizontal">                                     <CheckBox Content="{Binding Label}"                                         IsChecked="{Binding IsEnabled, Mode=TwoWay}"                                         IsEnabled="{Binding IsInScaleRange}" >                                     </CheckBox>                                     <Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" />                                 </StackPanel>                             </DataTemplate>                         </esri:Legend.MapLayerTemplate>                         <esri:Legend.LayerTemplate>                             <DataTemplate>                                 <CheckBox Content="{Binding Label}"                                 IsChecked="{Binding IsEnabled, Mode=TwoWay}"                                 IsEnabled="{Binding IsInScaleRange}" >                                 </CheckBox>                             </DataTemplate>                         </esri:Legend.LayerTemplate>                     </esri:Legend>                 </Border>      If you have any questions, do not hesitate to ask! Thanks again! ![Labels](http://i.stack.imgur.com/1WY8d.png) ![InfoWindow](http://i.stack.imgur.com/Di8eS.png)


Geoprocessing service gets 'dataset does not exist error', but it works fine as a geoprocessing tool

I have a script, which works fine as a standalone script and as a script tool. But when I published it to a geoprocessing service, I got an error message at the very beginning:               ExecuteError: Failed to execute. Parameters are not valid.     ERROR 000732: Input Features: Dataset C:/Users/gisadmin/AppData/Roaming/ESRI/Desktop10.2/ArcCatalog/***.sde\DBO.*** does not exist or is not supported      The script is simply doing a MakeFeatureLayer at this point.               arcpy.MakeFeatureLayer_management(target_lrm, 'target_route', '{0} = \'{1}\''.format(target_lrm_rid_field, target_route_id))      Any Ideas? I am using ArcGIS 10.2.1


How are geocoding scores calculated in ArcGIS?

After a table of addresses is geocoded, ArGIS provides information about each geocoded address, among those the "match score" of the candidate to which the address was matched, which ranges from 0 to 100. According to their documentation "The match score is based on how well the locations found in the reference data match with the address data being searched." It seems intuitive that 100 means an address with the exact name was found in the Address locator and 0 means no such address was found. However, I could not find any information about how exactly this score is calculated, particularly if values are somewhere between the extremes. I this known? I found the pointer to this white paper in the answer to this question, but I could not find any information in that paper that would answer the question.


select (click) labels in openlayers

I have the following style for an OpenLayers vector layer. Color and Name come from Geoserver/PostGIS. I red that setting `labelSelect` to `true`, user can also click the label, not only the point and fire an event such as `featureclick`. But no reaction. Clicking the point works, clicking the label does not. For my case, the following code is for points, lines and polys. What am I missing? Thanks               var style_d = new OpenLayers.Style({     'fillColor': '${p_color}',     'fillOpacity': 0.8,     'fontColor': 'black',     'pointRadius': 12,     'fontWeight':'bold',     'strokeColor': 'black',     'strokeWidth': 1,     'fontFamily': 'Arial',     'fontSize': 15,     'label': '${p_name}',     'labelAlign': 'tc',     'labelOutlineColor':'white',     'labelOutlineWidth':3,     'labelOutlineOpacity':0,     'labelSelect': true,     'labelXOffset': 4,     'labelYOffset':4});


How to convert SHP/POSTGIS data into x, y, z, "cost" data?

Is there a way to convert a line layer (shp or PostGIS) data into (x, y , z, cost) i.e. (From_node, To_node, optional_Elevation, Cost/Weight) ?


How to calculate distance between two locations using stored procedure in MySQL?

I have a database with locations with its lat and long coordinates. The area of locations is quite small with lots of them quite near each other. Im using this stored procedure in my project. http://www.artfulsoftware.com/infotree/queries.php?&bw=1680#109 I'm having troubles with accurancy. I need it to return more accurate results (in metres) instead of just 0 distance. Can it be modified so I get better results? Thank you


How to find line segment between line intersections?

Given 1 non-self-intersecting line (red) and 2 other non-self-intersecting lines (light-green), what is the best way to find the coordinates of the line in between the 2 intersections? I threw this image together to better illustrate what I'm saying. Preferably to be implemented in PHP code, does anyone have an algorithm to offer as to how to find the coordinates of the red line in between the 2 red/light-green line intersections? Coordinates will either be in lat/lon or X/Y plane format though this shouldn't affect the algorithm. Any help is greatly appreciated! ![enter image description here](http://i.stack.imgur.com/Cj7Fa.png)


How to Import ESRI Geodatabase format .gdb into PostGIS

I ran into a problem when loading a ESRI Geodatabase format .gdb into PostGIS. I have data 2.5GB GDB file. I followed some tutorials on the internet, but it seems that doesn't work out.   1. I created a database "SampleNY"   2. I executed this from the console:  ogr2ogr -f "PostgreSQL" PG:"dbname=SampleNY user=postgres" NYPluto/Pluto.gdb But nothing happens, I didn't got neither an error nor a successful operation. Did I miss any steps?


Calculating Length of Linestrings in WGS84 in Miles

I have a few thousand LINESTRING features in a MySQL database. I'm trying to figure out the cumulative length of all the lines -- in miles. Using the `GLength` function I can retrieve the length in (what I assume to be) degrees, but I'm not sure how to get this to miles. I also have QGIS and ArcMap, which both return the same degree values for the lines. From what I've read the data needs to be projected, but I'm unsure what to project it to. I'd like to perform the calculation within MySQL, if possible.


Making a simple 3D map for browsers with my current geodata

I want to try to make a 3D map for a small area (10 square miles) with some housing, some roads and some vegetation on it. My geodata is as follows: Shapes with houses/roads/vegetation. LIDAR pointcloud data over the area (can easily be built to a dem), and a georeferenced aerial image. Any idea where to start to bundle these geodata together and make a neat looking 3D map?


How to set Zoom Level based on Overlays in Ordnance Survey Map?

I am using the Ordnance map as a backdrop in my website. when overlays the WMS from Geoserver, I am unable to increase the zoom level. Please see my code and kindly suggest it.                var options = {                     maxResolution: 0.55804443359375,                     projection: "EPSG:27700",                     units: 'm'                 };                 map = new OpenSpace.Map('map', options);             // Define or get the vector layer to be used     var vlayer = osMap.getVectorLayer();     var mlayer = osMap.getMarkerLayer();     vlayer.displayInLayerSwitcher = false;     mlayer.displayInLayerSwitcher = false;               // setup tiled layer     format = 'image/png';     var tiled = new OpenLayers.Layer.WMS(                     "Oxford_Example",                     "http://192.168.0.126:8080/geoserver/cite/wms",                     {                         transparent: 'true',                         LAYERS: 'cite:Oxford_ExampleCapture',                         STYLES: '',                         format: format,                         tiled: true,                         tilesOrigin: osMap.maxExtent.left + ',' + osMap.maxExtent.bottom                     },                     {                         buffer: 0,                         displayOutsideMaxExtent: true,                         singleTile: true,                         ratio: 1,                         isBaseLayer: false,                         yx: { 'EPSG:27700': false }                     }                 );               osMap.addLayers([tiled]);               //Show Co-Ordinate on mouse over         osMap.addControl(new OpenLayers.Control.MousePosition());          //OverViewMap     var control = new OpenSpace.Control.OverviewMap();     osMap.addControl(control);     control.maximizeControl();          //ScaleBar     osMap.addControl(new OpenLayers.Control.ScaleLine({ displayClass: 'olControlScaleLine'   }));     //    osMap.addControl(new OpenLayers.Control.Scale({ displayClass: 'olControlScale' }));           //Layer Switcher     //    var layerSwitch = new OpenLayers.Control.LayerSwitcher();     var layerSwitch = new OpenLayers.Control.LayerSwitcher({         div: OpenLayers.Util.getElement('layerswitcher')     });     osMap.addControl(layerSwitch)      But i can zoom in this level only. I am unable to the particular feature. See the below image: ![enter image description here](http://i.stack.imgur.com/V2rAE.png)


arcpy.SearchCursor row.var

In arcpy.SearchCursor for row in rows I can return row.fieldname statically, but if fieldname is a variable, I don't know how to return the row.value of that variable dynamically. for example:                   sortfield = something         rows = arcpy.Searchcursor(feature)              fieldlist = arcpy.ListFields(directory)         for row in rows:                for f in fieldlist:             if f.name == something:                                      id = row.something


How to create an array of points in ArcMap?

I have a _master point_ in following projection system:               WGS_1984_UTM_Zone_45N     WKID: 32645 Authority: EPSG          Projection: Transverse_Mercator     False_Easting: 500000.0     False_Northing: 0.0     Central_Meridian: 87.0     Scale_Factor: 0.9996     Latitude_Of_Origin: 0.0     Linear Unit: Meter (1.0)          Geographic Coordinate System: GCS_WGS_1984     Angular Unit: Degree (0.0174532925199433)     Prime Meridian: Greenwich (0.0)     Datum: D_WGS_1984     Spheroid: WGS_1984     Semimajor Axis: 6378137.0     Semiminor Axis: 6356752.314245179     Inverse Flattening: 298.257223563      Now i want to create 15 points toward north,15 points toward east,15 points toward west,15 points toward south at 500m distance interval centering _master point_.These point has attribute to be populated in attribute table Now how to create these points Thanks


Mapserver+openlayers: displaying a shapefile with Cylindrical Equal Area (Lambert) projection

I have some shapefiles in "World Cylindrical Equal Area (Lambert) projection". The .prj reads:               PROJCS["World_Cylindrical_Equal_Area",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_     1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PR     OJECTION["Cylindrical_Equal_Area"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",     0.0],PARAMETER["Central_Meridian",-160.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1     .0]]      In consequence, I wrote the following mapfile:               MAP         NAME "mapTest"         OUTPUTFORMAT           NAME "png"           DRIVER AGG/PNG           MIMETYPE "image/png"           IMAGEMODE RGBA           EXTENSION "png"           FORMATOPTION "GAMMA=0.75"           TRANSPARENT ON         END         SIZE 800 600         EXTENT -20037507.067162 -6363885.331926 20037507.067162 6324287.725856         UNITS meters         SHAPEPATH "/data/"         IMAGECOLOR 255 255 255         FONTSET "/usr/share/fonts/truetype/ubuntu-font-family/bruno_fontsets.list"              WEB           IMAGEPATH "/data/tmp/"           IMAGEURL "/tmp/"           METADATA             wms_title "WMS Demo Server"                 wms_onlineresource  "http://localhost/cgi-bin/mapserv?map=/var/www/ex/mapTest.map&"             wms_enable_request "*"           END # metadata         END # web              PROJECTION           "proj=cea"            "lon_0=-160"            "lat_ts=0"            "x_0=0"            "y_0=0"            "ellps=WGS84"            "datum=WGS84"            "units=m"            "no_defs"         END              #######################"         LAYER           NAME "countries"           STATUS ON           TYPE POLYGON                PROJECTION             "proj=cea"             "lon_0=-160"             "lat_ts=0"             "x_0=0"             "y_0=0"             "ellps=WGS84"             "datum=WGS84"             "units=m"             "no_defs"           END                DATA "/data/data_repo/WRI/Base_Data/Countries/Countries"           LABELITEM "COUNTRY"           PROCESSING "LABEL_NO_CLIP=ON" #avoid repeating labels           CLASS             NAME "countries"             STYLE                OUTLINECOLOR 200 200 200               WIDTH 0.5               ANTIALIAS true             END # style                  LABEL               COLOR 50 50 49               MINFEATURESIZE 20               MINDISTANCE 10000               REPEATDISTANCE 0               BUFFER 5               SIZE 12               FONT "Ubuntu-C"               TYPE truetype               POSITION auto               PARTIALS FALSE             END # label                END # class           METADATA             wms_name "countries"           END # metadata         END # LAYER         ###########################          END # MAP      and the following openlayers code:                                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

                       Unfortunately, the displayed image is completely messed-up: ![mapserver messes-up a CEA-projected shapefile](http://i.stack.imgur.com/D8Nvb.png) Can someone find what is incorrect in my codes?


gdal_retile question

I have been trying to get gdal_retile working with the --optfile command. At first it did not work because in my files.txt I have '-' characters in the filename. I tried adding quotes around the files, and that seemed to work, but then gdal_retile would just freeze. So I have two questions:   1. Would using the --opfile command essentially be the same thing as calling gdal_retile from the command line once for every single file I have? Would I get the exact same results?   2. Does gdal2tiles do the same exact thing? Thanks! Derek


How to find the nearest polygon from a given point?

Basically I have set of points [lat-long pairs] which defines different polygons on map. Now I have a coordinate [lat-long] from which I want to find the nearest polygon from that point. Any help would be appreciated. Thanks.


Convert non-spatial Oracle table to spatial Oracle table in a different database

I'm trying to use ogr2ogr to convert data from a non-spatial table (has X & Y values) in an Oracle database (1) to a spatial format in a different Oracle database (2). This will be scheduled to run daily to overwrite the table in Oracle database (2) each time. I have it working using a ogr2ogr's Virtual File Format, with the file `Oracle.vrt` which is like:               <OGRVRTDataSource>       <OGRVRTLayer name="TEST_X_Y">         <SrcDataSource>OCI:userid_1/password_1@database_instance_1:TEST_X_Y</SrcDataSource>         <SrcLayer>TEST_X_Y</SrcLayer>         <GeometryType>wkbPoint</GeometryType>         <LayerSRS>EPSG:27700</LayerSRS>         <GeometryField encoding="PointFromColumns" x="X_TEXT" y="Y_TEXT"/>       </OGRVRTLayer>     </OGRVRTDataSource>      Then using the following ogr2ogr command:               ogr2ogr -update -overwrite -f OCI OCI:userid_2/password_2@database_instance_2:TEST_OGR_IN Oracle.vrt TEST_X_Y -lco OVERWRITE=YES -lco SRID=27700 -nln TEST_OGR_IN      Now this works and creates the spatial table in the Oracle database (2) fine, but when I run the ogr2ogr command a second time I get an error like:               ERROR 1: ORA-00001: unique constraint (MDSYS.UNIQUE_LAYERS) violated     ORA-06512: at "MDSYS.SDO_GEOM_TRIG_INS1", line 43     ORA-04088: error during execution of trigger 'MDSYS.SDO_GEOM_TRIG_INS1' in       INSERT INTO USER_SDO_GEOM_METADATA VALUES ('TEST_X_Y',     ...      The table (`TEST_OGR_IN`) still gets overwritten/updated in the Oracle database (2) but the problem appears to be that ogr2ogr has inserted values into the `USER_SDO_GEOM_METADATA` table on the Oracle database (1) for the non-spatial table (`TEST_X_Y`) and is violating an index/constraint? Although the process works, I'd like to understand why the error is happening and how I can avoid it. Many thanks for any assistance offered.


How to easily edit attribute data using Regular Expressions?

I am writing a tutorial for MSc students that uses QGIS. One of the tasks requires the attribute data to be modified (see pdf draft of tutorial here if interested ). The question is how to get them to edit the attribute data. I know this question has been asked before, and the answer used to be simple: just use LibreOffice calc to modify it and then save it, ensuring the row order and column titles are kept the same. I have used this approach before to great effect. Unfortunately, the solution no longer works: saving the .dbf file, in LibreOffice (5.4.2) or OpenOffice (3.4.1) Calc scrambles the data from the perspective of QGIS (only random integer numbers appear in the attribute table), and creates an additional .dbt file instead. So to get to the question: how do I tell a class of MSc students to do this next week? I've considered the following options:   1. Use R instead (great for me, but scary for students)   2. Edit the file as a .csv, and then join based on timestamp (fine, but seems overly complex, and could introduce more error in the 2 hour practical)   3. Use an alternative program: I've tried Gnumeric and Excel, neither of which generated good results quickly. To help answer this question, I've created a replicable example. Open the file "points.shp" in QGIS, observer the attribute table then close. Edit a couple of cells in the attribute table "points.dbf" in LibreOffice - save. Re-open "points.shp" in QGIS and observe the scrambled attribute table. The other shapefiles in the .zip folder have already been corrupted by LibreOffice and OpenOffice to illustrate what the problem looks like for me. In short, how do I best solve this problem?


plugin 'hook' when writing with Python

Just a conceptual question... when writing a plugin using Plugin Builder 1.8.3, where does the script get connected to the application instance objects? As an example (taken from eventlayerplugin.py):               class EventLayerPlugin:         def __init__(self,  iface):         self.mIface = iface         ....          def run(self):         dialog = EventLayerDialog( self.mIface )         if dialog.exec_() == QDialog.Accepted:             lineLayer = QgsMapLayerRegistry.instance().mapLayers()[dialog.lineLayer()]             eventLayer = QgsMapLayerRegistry.instance().mapLayers()[dialog.eventLayer()]             ....      where does iface and QgsMapLayerRegistry get assigned to the actual objects in the running instance of QGIS? From my beginner's perspective they seem to 'magically' refer to those objects already existing in the running instance, yet nowhere do I see them assigned to represent the instance objects. I.e. where in the plugin script are the QGIS objects made known to the script? Clear as mud? If so, let me know and I'll try to figure out a better way to phrase this.


php for "selected feature" - Combination of Openlayers and php-Form

I use a postgres db, geoserver and openlayers to display a map with a wfs-t Layer that displays the geometry column of my table. Now I use control select to call a popup which contains a form to edit the other attribute-columns, e.g.:                   //add Popup     var select = new OpenLayers.Control.SelectFeature(garden);             map.addControl(select);             select.activate();          garden.events.on({        featureselected: function(event) {         var feature = event.feature;         feature.popup = new OpenLayers.Popup.FramedCloud         ("pop",         feature.geometry.getBounds().getCenterLonLat(),         null,          <form action="myphp.php" method="post">
 Crop:
<input name="crop" type="text" value=+feature.attributes.crop+>         <input type="submit" name="write">         </form>);      map.addPopup(feature.popup);       },      In my php-script I wrote:               $crop= $_POST['crop'];      and:               $res = pg_query ("UPDATE $tabelle SET crop = '".pg_escape_string ($crop)."' WHERE id = 6;");      This works fine, editing a specific line, in this case the line where the "id=6". **My Question** : What is the php-Code for sth. like "where the id= selected feature id". How can I replace the "WHERE id = 6"-part with a variable that says: always update the attributes of the selected polygon"? Thanks for your help!


ArcObjects: How to create a composite Geotransformation and use with the GeoProcessor

Using arcobjects, I am trying to programmatically create a composite geotransformation and then use to project features with the geoprocessor. Found old VB6 code out there on the web, but I can't get it to work in C# .NET. When I try to use the projection tool in the geoprocessor, it fails and sends back a message saying "Invalid geographic transformation." The code I am using is below. Either I have built the composite transformation incorrectly, or, the geoprocessor cannot find it. Any ideas? EDIT UPDATE:               private void createAndUseCompositeGeoTrans()         {             Geoprocessor gp = new Geoprocessor();             gp.OverwriteOutput = true;             object sev = 2;             object dt = "";                  try             {                 ISpatialReferenceFactory2 spatialReferenceFactory2 = new SpatialReferenceEnvironmentClass();                 ISpatialReference in_spatialReference1 =                      spatialReferenceFactory2.CreateSpatialReference(esriSRProjCSType.esriSRProjCS_NAD1983SPCS_WASouthFT.GetHashCode());                      ISpatialReference out_spatialReference2                    = spatialReferenceFactory2.CreateSpatialReference(esriSRProjCS2Type.esriSRProjCS_WGS1984SphereWebMercator.GetHashCode());                 ICompositeGeoTransformation compGeoTrs = (ICompositeGeoTransformation)new CompositeGeoTransformation();                      //NAD1983_To_WGS1984_1                 IGeoTransformation geoTransformation_A = spatialReferenceFactory2.CreateGeoTransformation((int)esriSRGeoTransformationType.esriSRGeoTransformation_NAD1983_To_WGS1984_1) as IGeoTransformation;                 compGeoTrs.Add(esriTransformDirection.esriTransformForward, geoTransformation_A);                      // WGS_1984_Major_Auxiliary_Sphere_To_WGS_1984                 IGeoTransformation geoTransformation_B = spatialReferenceFactory2.CreateGeoTransformation(108100) as IGeoTransformation;                 compGeoTrs.Add(esriTransformDirection.esriTransformReverse, geoTransformation_B);                      compGeoTrs.Name = "NAD1983_To_WGS_1984_Major_Auxiliary_Sphere";                      IMapGeographicTransformations mapGeotrans = (IMapGeographicTransformations)map;                 IGeoTransformationOperationSet geoTransOperationSet = mapGeotrans.GeographicTransformations;                      geoTransOperationSet.Set(esriTransformDirection.esriTransformForward, compGeoTrs);                 geoTransOperationSet.Set(esriTransformDirection.esriTransformReverse, compGeoTrs);                 ESRI.ArcGIS.Carto.IActiveView activeView = (ESRI.ArcGIS.Carto.IActiveView)map;                 activeView.Refresh();                      ESRI.ArcGIS.DataManagementTools.Project projectTool = new ESRI.ArcGIS.DataManagementTools.Project();                 projectTool.in_dataset = "C:\\projects\\clients\\Freeport\\CAD_Tool\\sampledata\\Point.shp";                 projectTool.out_dataset = "C:\\projects\\clients\\Freeport\\CAD_Tool\\sampledata\\Test_002.shp"; ;                 projectTool.in_coor_system = spatialReferenceFactory2.CreateProjectedCoordinateSystem(in_spatialReference1.FactoryCode);                 projectTool.out_coor_system = spatialReferenceFactory2.CreateProjectedCoordinateSystem(out_spatialReference2.FactoryCode);                 projectTool.transform_method = "NAD1983_To_WGS_1984_Major_Auxiliary_Sphere";                 gp.Execute(projectTool, null);                       }             catch (System.Runtime.InteropServices.COMException CE)             {                 //throw CE;                 printMsg(rTxtBx_console, CE.Message + "\n\nLast GP Message:\n" + gp.GetMessages(ref sev), MsgTypes.err);             }             catch (Exception E)             {                 printMsg(rTxtBx_console, E.Message + "\n\nLast GP Message:\n" + gp.GetMessages(ref sev), MsgTypes.err);             }              }


what is the corresponding projected coordinate system to WGS84?

> **Possible Duplicate:**   >  Global DEM to Slope calculation I want to calculate the slope from my global DEM?the DEM has WGS84 projection(degrees).In order to correctly calculate the slope from DEM,it has to be projected coordinate system not geographic coordinate system.it is really difficult to say which one of the projections under the list : projected coordinate systems is the corresponding to WGS84(world) under the list geographic coordinate systems.Any ideas?


Error while creating a slope

I have a elevation raster (1 arc second) downloaded from USGS site. Before adding it to ArcMap I changed the display units to meters.The projection system for this raster is GCS_1983. When I use the slope tool under the spatial analyst tool , it is unable to create the slope layer.The data type for the image is floatng.What could be possibly be wrong here. ![enter image description here](http://i.stack.imgur.com/IYpCB.jpg) Even after reprojecting it I get the same error. ![enter image description here](http://i.stack.imgur.com/9Sl6G.jpg)


GTOPO30 Slope analysis in ArcGIS 10.1

Using surface - slope analysis tool box. All values for the slope calculation are in between 80 and 89. There are no values below 80. What am I doing wrong?


Relationship of QGIS to its sister programs?

I'v e been using QGIS 2.4 for a number of months now and we are using it a bit at work. I noted that when I did the initial install a number of new icons appeared on my desktop namely MSys QGIS Desktop 2.4.0 QGIS Browser Grass OSGEOWShell Saga GIS (2.0.8) If I need to roll this out to other machines I would prefer just to have the minimum footprint. I can see that I probably need the browser as that looks like it is within QGIS Desktop but Grass / OSGeowShell and Saga as well. I'd be interested if anyone could indicate any interdependencies between the programs and what is the minimum install. I suspect its Desktop and Browser?


How to create working Hyperlinks in OnDemandGrid Cells

I'm creating a simple ArcGIS application that shows a table of data from a feature layer, one of which is a URL string. I'd like to make that string be a clickable hyperlink. Is this possible and if so what am I doing wrong. Below is my code. As you can see in the "UpdateGrid" function I'm creating a tag and inserting it into the cell. This is rendering fine and showing the URL but it's not clickable.               <!DOCTYPE html>                     <title>Stream Gauge Monitors</title>       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">       <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">       <link rel="stylesheet" href="http://js.arcgis.com/3.7/js/dojo/dijit/themes/tundra/tundra.css">       <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.7/js/esri/css/esri.css">

       Total records:        0         |              <button id="prev">Prev Page</button>        &nbsp &nbsp            <button id="next">Next Page</button>


Why do features in WGS84 disappear from the (ArcMap) display when zooming in really close?

I routinely import centerlines and other data from various counties that are in different projections, so I've begun to convert everthing to WGS84 so all is in the same projection. I want to match up topology where centerlines from different counties meet, so in order to do that, I have to zoom in (really) close to see if centerline endpoints match up. However, since I've converted stuff to WGS84, when I zoom in close to features, they disappear from the display, and I can't zoom in close enough for what I need. Anyone else experience this, and is there a fix? Using ArcGIS 10.1 Advanced...    **EDIT** By "really close" I mean sub-centimeter at times, maybe even sub-millimeter... essentially I want to do is be able to create a network dataset so I need the lines to connect, and I need a way to identify places where they don't connect, even from small distances... If WGS84 is not high enough precision, what would you recommend for a "universal" projection (mainly for United States) that is "high precision"? Projections have always been kind of confusing for me (as well as others I'm sure...) Thanks for your response/comments...


How to get the editor's current layer in ArcPy?

In ArcObjects, it is possible to retrieve the currently selected editable layer using `IEditor3.CurrentTemplate.Layer`, or `IEditLayers.CurrentLayer`. Is it possible to do the same thing in ArcPy? In Python add-in extensions, there is an `onCurrentLayerChanged` method, but no corresponding property as far as I can tell to determine the current layer, which begs another question -- what is that method intended to be used for?


Building GDAL With Read/Write Support of FileGDB

Has anyone been successful in building gdal with read/write support of file geodatabases? I am able to build successfully, just never see FileGDB as in the supported vector formats. Here is what I am doing:   1. Download latest gdal trunk (example: gdalsvn-trunk-20110822.zip)   2. Open the makegdal10.sln file in Visual Studio 2010   3. Edit the nmake.opt file, the ONLY thing I modify at this point is the GDAL_HOME variable, the FGDB section is still commented out. Everything else left as is.   4. Build Solution ------>SUCCESS   5. Uncomment the FGDB Section and set path to FGDB SDK   6. Open Visual Studio command line tools and cd to /ogr/ogrsf_frmts/filegdb   7. Execute nmake /f makefile.vc plugin ------>SUCCESS - I now have ogr_FileGDB.dll in that folder Now, I copy the ogr_FileGDB.dll and the FileGDBAPI.dll to the bin folder containing ogr2ogr.exe. When I run ogr2ogr --formats, I never get FileGDB as a format. Am I missing something here?


Mapnik/Python Compatibility

Anyone know what versions of Python Mapnik is compatible with? I'm having trouble getting Mapnik to work. I'm thinking it might be because I am on 64-bit Win 7 and installed the 64-bit Python (v2.7) I looked on the Mapnik docs/wiki but didn't find any info. Any thoughts? Will Mapnik only work with 32-bit Python? Is there a 64-bit Mapnik (couldn't see it).


ArcGIS 10.2 Windows 7 only uses 4Gb of RAM

I have 16Gb and have installed 64-bit background processing, but ArcMap seems to only be able to access 4Gb. I can use more in total with other programs. Is there a setting somewhere in Windows or ArcGIS that is only allowing it to access 4GB? Thanks.


Simplify Shapefile

I have a shapefile that contains neighborhood boundaries that I want to simplify. Right now I am thinking of converting the shapefile to Google maps KML so I can insert the boundaries into the map as an overlay but do not need the precision provided by the shapefile. How can I do this simplification? I may have access to arcgis, although a method that does not require it is better.


Center-to-Center distance

> **Possible Duplicate:**   >  What is the right solution (and map projection) to compute distances > between points located all over the World? I want to know how I could calculate the center-to-center distance between two (or even more) circles, based on their center's Geo-coordinates values? I'm new in this area, gonna use this one for Goolge Maps API 3 via Javascript and PHP. Probably the algorithm should be enough, however more details are appreciated. :) **Update:** The circles are not necessary to mention as part of the problem, as it could apply to two points, instead of two circles' centers. Actually I'm trying to do some overlap detection stuff on a crisis mapping application. The locations are relatively close to each other, however I prefer to go for a fail-safe solution which could apply on most of the cases (if not all). Also it doesn't need an accurate result, as all the visualizations on this web application are somehow approximate by default, so there is no great rush for having a perfect-accurate solution for now, but same as above, I personally prefer to go for the best choice, if it's not gonna add so much difficulties on the solution.


Render vectors from OSM data in POSTGIS database

I'm a newbie when it comes to mapping application. I had successfully loaded my OpenstreetMap data in a Postgresql/PostGIS database. Now my problem is how to render the vector data (the POI's, ways, etc) from the database to the the map. I don't have the slightest idea on how to do it, though I think I knew how they are rendered (OpenLayers use KML/XML files to render vector data, I tried it in their tutorial). Can someone explain to me how it works; do I need to get the data from the database as XML file? I don't know if I'm missing here something. Please help me. Thanks a lot!


How to create a circle in arcpy

Suppose I have a dataset where each record has an x,y and r (the centroid and radius of a circle). How can I create a polygon feature class containing parametric circles? Sorry to those who have a great open source solution, but I'm stuck using python in ArcGIS 10.


Calculate spacing of polylines along transects in ArcGIS

I have a shapefile with a number of roughly parallel lines in it, and I want to calculate the spacing between these lines using a number of transects across the map. How should I go about this? I have a bit of experience writing `arcpy` scripts, so would be happy to write some code to do this, I just can't quite work out where to start. My best guess would be to draw the transect as a line, somehow create points where the transect line intersects with any other lines, and then calculate the average distance between the points. Does this seem like a sensible approach? If not, what would you suggest? **Update:** I need to be able to do this scriptably (from a Python script using ArcPy), which means I won't have access to functions that are only available from toolbar buttons.


How to calculate buffer surface that falls within another layer's borders

The image below shows what two selected layers. One contains a series of borders, and the other a series of buffers. I am trying to obtain the buffered surface within each of the borders in the other layer, preferably using ftools. ![enter image description here](http://i.stack.imgur.com/tmzOJ.png)


How to export a geojson file with correct order of coordinates?

I was testing rendering of data via GitHub in geojson format, because I wanted to use it for INSPIRE data. INSPIRE data are in GML 3.2.1 format. I've downloaded one of datasets from http://services.cuzk.cz/gml/inspire/cp/epsg-4258/ (which is in ETRS). I needed to get json file from it, so I've opened GML file in Quantum GIS (version 1.9) and saved it like geojson file (CRS=EPSG::4326) and then uploaded to my GitHub. Order of coordinates in geojson is (easting, northing), but after saving file from QGIS it's (northing, easting). My data comes from Czech Republic, but it's rendered in Yemen. Does anybody have any experience with this problem? Does anybody know how to switch order of coordinates (or axis) in geojson file? I have much more experience with xml based data formats than with json and because of that I hope that this isn't so silly question.


Map resize displays google layer at incorrect zoom level

This is a screenshot of the icons in the wrong position due to the google layer showing the wrong zoom level. This is how it should look, and how it does look after the user pans the map. How does this happen? I have a menu which opens a panel on the right side of the map. When the panel is displayed, the map div is resized accordingly. Usually this does not produce any problems. However, at certain zoom levels, resizing the map changes the zoom level which the google layer is displayed at. As soon as the user pans the map, the google layer image changes to the correct image for the current zoom level. This behaviour doesn't always occur, and it only seems to happen in IE (8 and 9 at least). Resizing the browser window also resizes the map, and sometimes this causes the same behaviour. However the most predictable way to produce this has been to resize the map. I am using SmartGWT and OpenLayers for the UI, Geoserver for the overlayed WMS layer. The map div is setup in a SmartGWT Canvas. I am handling the canvas resize event and calling `map.updateSize()` from there. As I have mentioned, the base layer is a google hybrid layer. Although this problem doesn't occur 100% of the time, it does happen often, and it happens at the kind of zoom levels which users are likely to view very often.


Calculating tortuosity

I have the geographic locations of a species of fish over a period of time but want to assess how complex its movement path was. How do you calculate fractal tortuosity, or tortuosity via other models? Below are x and y locations over a specific time period.               x        y          206.44  100.09     205.89  101.34     206.38  103.53     206.22  106.87     204.79  107.93     202.85  108.06     202.85  108.06     202.85  108.06     202.84  108.05     202.85  108.06     202.85  108.06     203.56  108.61     206.13  107.45     207.53  106.22


different labels at various scales

I have a locality layer of neighborhoods and suburbs from a spatialite database. How do I label this single layer with the neighborhood name at a lower scales, but as I zoom out, I would like the town label instead? Is this possible with a single layer or do I have to work on multiple layers to achieve this? Perhaps a better question is what's the recommended way of achieving this: use local names as you zoom in, and super names as you zoom out. Thanks.


Can't load layers into ArcGIS Viewer for Silverlight

I am trying to load layers into ArcGIS Viewer for Silverlight. I have uploaded my files into the server successfully. However when I browse for the files I get connection error. I know the files are uploaded into the server because I can see them when I use the same file path to the server for Flex Viewer. Thanks for the help.


Can ArcPy fill forms in Add-in interface?

I'm trying to build an ArcPy tool, which will ask the user to input some information (ID, Name, Address, Zip, etc.) first. My add-in interface is shown below, and hope to implement that once the user inputs the ID, if all the other related info (Name, Address, etc.) exist in another known table, they could be shown in the following blanks at the same time, instead of letting the user type in everything. In short, can ArcPy fill forms in the Add-in interface, not in the result window? ![enter image description here](http://i.stack.imgur.com/ovmbv.png) The validation works, but extremely slow when I run a search cursor in a .dbf which has more than 160,000 records. How can I improve the code below, or is there a better solution other than using python script tool? It seems the form will go through the cursor again even after I fill other unrelated blanks.               import arcpy, datetime     import os     import sys     class ToolValidator(object):       """Class for validating a tool's parameter values and controlling       the behavior of the tool's dialog."""            def __init__(self):         """Setup arcpy and the list of tool parameters."""         self.params = arcpy.GetParameterInfo()         fc = "C:\\test\\vectorDBO.dbf"         field = "PARCEL"         cursor = arcpy.SearchCursor(fc)         row = cursor.next()         n = 0         while row:             if row.getValue("PARCEL") == self.params[0].value:                 self.params[1].value = row.getValue("LASTNM")                 self.params[3].value = row.getValue("ADDRESS")                 self.params[4].value = row.getValue("CITY")                 self.params[6].value = row.getValue("ZIPCODE")                 break             row = cursor.next()            def initializeParameters(self):         """Refine the properties of a tool's parameters.  This method is         called when the tool is opened."""         self.params[10].value = datetime.datetime.now()         return            def updateParameters(self):         """Modify the values and properties of parameters before internal         validation is performed.  This method is called whenever a parameter         has been changed."""         return            def updateMessages(self):         """Modify the messages created by internal validation for each tool         parameter.  This method is called after internal validation."""         return


How to find shortest route for cyclist that can switch between road layer and cycle path anywhere they intersect?

I have two data layers that I want to use in a network analysis for the shortest route analysis for a cyclist:   1. road network   2. cycle paths I want to find a shortest route for a cyclist that can switch between road layer and cycle path anytime where they intersect. Problem is that sometimes the cycle network lies on the top of the road network but does not align properly. I am not sure how to use the data in network analysis. Should I merge these two data sets first and use the feature to line tool to create intersections of the street and cycle network, or is this a case of a multimodal network? I work with Arc GIS 10.2


how to calculate the right resolution for an image overlay in openlayers

I have an image I use as overlay in a vector layer in my openlayer web application. The idea is the same as showed in the example you can find here: http://gis.ibbeck.de/ginfo/apps/OLExamples/OL27/examples/ExternalGraphicOverlay/ExternalGraphicOverlay.asp What I do not understand is how to set a valid resolution to my image, so that every time the user changes the zoom of the map, the image width and height is adjusted to cover its real geographical area. In the example above some images are used and placed at some specific locations using a specific and hard-coded resolution factor. Assuming that I have an image 400x400 pixel which represents an area of 400x400 kilometers, I need to recalculate the width and height of my image every time the zoom factor changes using a formula like this:               imageWidth = imageWidthInPixel * theResolution / map.getResolution();     imageHeight = imageHeightInPixel * theResolution / map.getResolution();      where 'theResolution' is the value I need to calculate in some way but I don't know how to do it. I guess this is a value that depends on the area expressed in kilometers or meters the image covers, but I am not able to find out a relation that has a sense. As explained above, in the example I reported these values are hard-coded and depends on the image but there is no way to understand how these values are calculated.


How do I stop GP script from adding temporary data to Table of Contents?

I have a script that does a series of calculations, producing temporary data along the way. However, at each step of the script, data is added to the TOC and then removed when I call the arcpy.Delete_management function on the data. Before my script reaches the delete function, the temporary data that I've calculated is shown in the TOC. Is there a way to explicitly specify these datasets as temporary, or freeze the TOC during script processing. Example below:               class StationTypology:              def __init__(self, areaName, bufferDistance):             self.areaName = areaName             self.bufferDistance = bufferDistance              def BusinessDensity(self):             try:                 # Make a temporary table in memory based on query of feature class                 query = ("""\"AreaName\" = '""" + self.areaName + """' AND                          \"BufferDistance\" = """ + str(self.bufferDistance) + """ AND                          \"UseType\" = 'Business'""")                      arcpy.MakeTableView_management("LANDUSE",                                                "business",                                                query)                      # Calculate the sum of floor space, from above table                 arcpy.Statistics_analysis("business",                                           "in_memory\\businessStatistics",                                           [["FloorArea", "SUM"]])                      # Use SearchCursor to access table records and store rows in a variable                 rows = arcpy.SearchCursor("in_memory\\businessStatistics",                                           "",                                           "",                                           "SUM_FloorArea",                                           "")                      # Table has one row; access with iteration, grab value of SUM_FloorArea                 for row in rows:                     businessDensity = row.SUM_FloorArea                      del rows  # Housekeeping                 arcpy.Delete_management("business")  # Housekeeping                 arcpy.Delete_management("in_memory\\businessStatistics")  # Housekeeping                      return businessDensity                  except:                 try:                     del rows  # Housekeeping                     arcpy.Delete_management("business")  # Housekeeping                     arcpy.Delete_management("in_memory\\businessStatistics")  # Housekeeping                 except:                     pass      I am not sure if it matters, but the script is being called from a wxPython GUI launched inside of ArcGIS as a Python Add-In. The GUI contains a button with an event that triggers the above script.


How to check if a layer exists in a geodatabase through ArcToolBox or Python?

I have got a python to update a file geodatabase (*.gdb). Every time the code executes, it needs to check if a certain layer has been already there in the previous geodatabase; if so, delete it and create a new one; otherwise, overwrite it with a new one. I am just wondering if I can achieve this by ArcToolBox or a python code? Thanks Alex


Buffering a Raster with GDAL and Numpy

I am using GDAL to convert a raster dataset into a `numpy.array` and then using `numpy` to buffer the data in the raster. For example, I need to know all the regions within 100ft of a school point feature and I need it represented as a raster. So, I convert my points to a binary raster (school points are 1 and all other pixels are) using `GDALRasterize` in Python. Then, I open the raster dataset and use `GDAL.ReadAsArray` to create a `numpy.array` for the raster. Using `scipy.ndimage.morphology.binary_dilation`, I buffer all the non-zero pixels. The issue is: some of my input datasets can be rather large and so I am running out of memory. The first thing that came to mind was to tile my input data and process individual tiles. I'm not sure how to handle any edge effects if I were to tile. What if a buffer spans the edge of a tile? The next tile wouldn't know to include those buffered cells. Does anyone have any suggestions for how to handle these kinds of edge effects in numpy/GDAL?


Openlayers WFS Overlay Problem

a) I am running a PostGIS database, and I want to display a Table with a about 500 Points of Interest. The POIs have the projection EPSG 4326. b) Geoserver is installed, running and connected to my PostGIS database, all fine so far. No errors. c) I want to display my POIs from my database on a google base map through openlayers and geoserver. - The base map appears, fine so far, but my POI connection to Geoserver just does not work. I have tried all different kind of solutions but unfortunately it just doesn't want to connect to the Geoserver, I guess. - Both, loading my html file with the javascript/html/openlayers commands into my HTDOCS XAMPP folder doesn't work (http://localhost/example.html) and also starting the file through Geoserver "C:\Program Files\GeoServer 2.1.4\data_dir\www" (http://localhost:8080/geoserver/www/example.html) doesn't work either. Both ways, I only see the basemap but no POIs. Any help is greatly appreciated. Cheers, Tim My code is the following:                               <title>OpenLayers: Google Layer Example</title>         <link rel="stylesheet" href="http://openlayers.org/api/theme/default/style.css" type="text/css" />         <link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css" />


How to change a marker on click

I've crated a map and tried, but it doesn't change until another event is caught or zooming map or by switching the browser tabs. What is the reason for this. please help me I've fiddle the code here http://jsfiddle.net/HMFLf/. This is what I've done to change marker :               vectorLayer.events.on({                     featureselected: function (event) {                         var fixer = confirm("Are you want to change clolor this marker");                         if (fixer == true) {                             size = new OpenLayers.Size(21, 25);                             event.feature.style = { externalGraphic: "http://www.openlayers.org/dev/img/marker.png", graphicHeight: 25, graphicWidth: 21, graphicXOffset: -((size.w / 2) - 2), graphicYOffset: -(size.h - 2) };                         }                                         }                 });      Thanks in advance.


geotools vs. geotoolkit

The geotoolkit.org web site has very little documentation. From this document I get the impression that it is a fork from geotools; is that right? If so, what were the motives/objectives of the fork?


QGis import partial PostGIS layer using query builder

I'm sorry, but I'm terribly new to the GIS scene (and PostGIS & QGis). I have loaded a whole bunch of OpenStreetMap data into a PostGIS database and successfully drawn a map using Mapnik. Now I want to explore the data in my PostGIS database using QGis. I have successfully connected QGis to my remote PostGis DB and QGis lists the OSM tables. The query builder also displays all sorts of OpenStreetMap attributes and values. My issue comes when clicking the "Add" button: I assume that QGis is trying to load the complete DB table, this step takes very long (and could be eating a lot of expensive South African bandwidth). I am really just interested in my tiny university campus for testing purposes. I don't yet know how to use the query builder to limit QGis' DB query to a certain latitute/longitude bounding box. The QGis user manual wasn't helpful to solve this nooby question, sorry. Thanks!


Python increasing the filesize of my .mxd

I have a geoprocessing script that runs the following..               arcpy.AddMessage("TEST...")      Yes just one line of code. A blank .mxd starts at 391kb for me as I run my script and save the filesize increases.               391 kb     431 kb     451 kb     471 kb     and so on...      A geoprocessing python script seems to increase the filesize by 20-30 kb each time. I have run this test on an actual script that does something and increases filesize by 40-60 kb... I have also run on a blank script that does absolutly nothing other than it runs and still increases filesize by 20-30kb... From what I could find ESRI Tech > file size increase may be caused by a large amount of geoprocessing results > stored in the Results tab in ArcToolbox in ArcCatalog. Following the steps in the article I was able to decrease the filesize from 589 kb to 293 kb by saving it to a new .mxd Your thoughts, experiences with this? Has anyone found a way to auto-delete the results tab from a python script so that I don't have to save a new .mxd each time? UPDATE: @AHIGH I have tried playing around with the Geoprocessing options as suggested by AHIGH. Does not seem to stop the filesize from increasing. @artwork21 If I go to geoprocessing > results and delete the results this WILL decrease the filesize. Is there anyway to automate this process so that the results are auto-deleted after the script has run? ESRI: Using geoprocessing options to control tool execution > Any tool results still in the ArcMap table of contents will be saved to > disk, regardless of the temporary results setting. This is because > geoprocessing has to assume that by saving a map document, you want > everything in the ArcMap table of contents saved I want everything to save except for the results that bloat my filesize... > If you don't want to save the map document, but you do want to save the data > in an individual layer, right-click the layer and click Data > Make > Permanent. Not really a practical solution... In 10.1 there are new features that would allow me to fix my problem. Guess will have to try to push my company to upgrade to 10.1 ASAP. Python Tool **WORKAROUND SOLUTION:** Under Geoprocessing > Geoprocessing Options > Results Management > "Keep results younger than:" > Set to Never Save. This will stop the filesize from increasing. Alternatively, you can try to write your scripts so that the run independently of Arcmap (ie. Without it open). You can write more efficient code, that runs faster. Like a script that runs multiple mxd's at once.


In a ESRI file geodatabase schema lock, what does the number after the username stand for?

I'm using the ISchemaLock interface to return schemalock info on featureclasses in a file geodatabase:               // If schemalock count is >=2, then we have a problem, something else has a lock on the FC                     if (slc >= 2)                     {                         c.msg = "Schemalock count on FC '" + fc + "' in FGDB '" + kvp.Key[0] + "': " + slc.ToString();                         Console.WriteLine(c.msg);                         Messaging.Log(c.msg, c.lw);                         ISchemaLock sl2 = (ISchemaLock)ds;                         IEnumSchemaLockInfo enumSLI2;                         sl2.GetCurrentSchemaLocks(out enumSLI2);                         ISchemaLockInfo sli2 = enumSLI2.Next();                         while (sli2 != null)                         {                             c.msg = "  Schemalock info: " + sli2.TableName + " : " + sli2.UserName + " : " + sli2.SchemaLockType;                             Console.WriteLine(c.msg);                             Messaging.Log(c.msg, c.lw);                             sli2 = enumSLI2.Next();                         }                         keysToDelete.Add(kvp.Key);                         break;                     }      `sli2.UserName` returns something along the lines of: HOU-AGSPRD01.10768 HOU-AGSPRD01 is my server name obviously, but can anyone tell me what the "10768" is? I'm thinking it's the PID of the process that has the lock on the particular featureclass. Any ideas? EDIT: Kirk and Matt are both correct (can I not set 2 answers to correct?): ![alt text](http://i.stack.imgur.com/XhBWP.png)


How to read multiple .gpx files in R

Suppose I have a number of _.gpx_ files (these contain GPX waypoint data from a Garmin eTrex). I want to load them into R with different names and manipulate them. I can read one file thus:               library(maptools)     gpx.raw <- readGPS(i = "gpx", f = "file1_w_12_f_ddf.gpx", type="w")      Suppose I want to read a number of them into memory. I could try a _for_ loop:               files <- list.files(".",pattern = "*.gpx")     for(x in files){              #Create new file name         temp <- strsplit(x,"_",fixed=TRUE)         visit.id <- sapply(temp,FUN=function(x){paste(x[1],x[4],substr(x[5],1,3),sep="_")})              #read file with new filename         assign(visit.id, readGPS(i = "gpx", f = x, type="w"))     }      Running above program yields following error: > Error in read.table(con <- textConnection(gpsdata), fill = TRUE, ...) : no > lines available in input In addition: Warning message: running command > 'C:\PROGRA~2\GPSBabel\gpsbabel.exe -w -i gpx -f file1_w_12_f_ddf.gpx -o > tabsep -F -' had status 1 Note that I was able to read this file on its own, so it would seem it has nothing to do with the file itself but with running readGPS in a loop. In general I still find it very confusing how _R_ treats variables like _x_ above. I am not sure how to modify the argument to readGPS from the stand alone instance `f = "file1_w_12_f_ddf.gpx"`: Should it be `x`, or `f = x`, or `f = "x"`, or what? Or maybe the problem is in the call to GPSBabel... I include a sample file below so you can copy it to text editor, and save as _.gpx._ twice with different names and try yourself.               <?xml version="1.0" encoding="UTF-8"?>     <gpx      version="1.0"      creator="GPSBabel - http://www.gpsbabel.org"      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xmlns="http://www.topografix.com/GPX/1/0"      xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">      <time>2010-09-14T18:35:43Z</time>      <bounds minlat="18.149888897" minlon="-96.747799935" maxlat="50.982883293" maxlon="121.640266674"/>     <wpt lat="38.855549991" lon="-94.799016668">     <ele>325.049072</ele>      <name>GARMIN</name>      <cmt>GARMIN</cmt>      <desc>GARMIN</desc>      <sym>Flag</sym>      </wpt>      <wpt lat="50.982883293" lon="-1.463899976">      <ele>35.934692</ele>      <name>GRMEUR</name>      <cmt>GRMEUR</cmt>      <desc>GRMEUR</desc>      <sym>Flag</sym>      </wpt>      <wpt lat="25.061783362" lon="121.640266674">      <ele>38.097656</ele>      <name>GRMTWN</name>      <cmt>GRMTWN</cmt>      <desc>GRMTWN</desc>      <sym>Flag</sym>      </wpt>      </gpx>


Select points within a given distance from a selected point

What I want to do:   1. In ArcMap, let the user select a point (not a point pre-enter) and enter a range (like a Message BOX can enter range)    2. the point (pre-enter the data and XY) within range will be selected  The above is in GIS, the following is an SQL(?) problem:   1. I can get selected point's data (in a database) and make it in a table (for my Kriging) Is there any function/tool/script in arctoolbox that can do the step 1 and 2? @ujjwalesri Pre-enter means I have a point.shp and in the shape file I have enter point's xy that can display in the Arcmap. the range what I talking about is User can enter a range (Kilometers) and the point in the shape file within the range will be selected (maybe use a Msgbox). It's just like a buffer range. Thank you for your concern!


Getting Started with Map Server 6 and Google Maps

I'm relatively new to GIS, but what I'd like to do is display map layers on top of Google Maps. From what I understand, mapserver provides the tiles that can be overlaid onto a Google Maps page. I'm proficient with HTML, JavaScript, unix, and PHP so technically this shouldn't be a problem, but I'm finding a severe lack of resources when I am trying to find out how one gets started. The mapserver documentation seems to be a little over the place, and Google results aren't helping. Where does one get started with GIS and mapserver with a view to integrate on top of Google Maps?


Use arcpy.mapping to list broken data layers?

I want to list all the broken links in all mxds in a server drive. But whenever I try I get an error come up. Can someone use a specific example, say the drive is D drive, how would I put it into ESRIs script here:               import arcpy, os     path = r"C:\Project"     for fileName in os.listdir(path):     fullPath = os.path.join(path, fileName)     if os.path.isfile(fullPath):         basename, extension = os.path.splitext(fullPath)         if extension == ".mxd":             mxd = arcpy.mapping.MapDocument(fullPath)             print "MXD: " + fileName             brknList = arcpy.mapping.ListBrokenDataSources(mxd)             for brknItem in brknList:                 print "\t" + brknItem.name     del mxd      Also I'm not used to not having pythonwin, does anyone know where to d/l it? I googled it but it kept telling me to install it from the ArcMap cd (I'm just using a work computer).


Openlayer3 basemap appears white block in Chrome

i faced interesting an issue on Chrome. im using google's 4 number base layer (street, hybrit, etc.) When my tiles are loading over baselayer, baseLayer becomes white block. Why? No any issues on Firefox and IE8 or IE9.                var map = new OpenLayers.Map('map', {             projection: 'EPSG:900913',             layers: [                 new OpenLayers.Layer.Google(                     "Google Physical",                     { type: google.maps.MapTypeId.TERRAIN }                 ),                 new OpenLayers.Layer.Google(                     "Google Streets",                     { numZoomLevels: 20 }                 ),                 new OpenLayers.Layer.Google(                     "Google Hybrid",                     { type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20 }                 ),                 new OpenLayers.Layer.Google(                     "Google Satellite",                     { type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 20 }                 )             ],             center: new OpenLayers.LonLat(35.5, 39.0)                 .transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")),             zoom: 7         });


Merging multiple rasters with SAME spatial extent

![two rasters combine to one](http://i.stack.imgur.com/YU7m9.png) So I began with lidar elevation data 1m resolution, and I performed a terrain analysis to extract specific ranges of elevation from the raster (1st picture is 0-1m elevation, 2nd picture is 1-2m elevation). these extractions resulted in 2 different different rasters, but for further analyses I would like to combine them back into one raster but now with just these two elevation size classes (I want the third picture but as a new raster I can process furthur). Mosaic is not working because the two new rasters are the same spatial extent. Thanks!! I have both arcGIS 10 and LIDAR Analyst


TopologyException side location conflict reading MapInfo with Sharpmap

I'm using SharpMap 0.9 to read various MapInfo (.tab) files. I have used a number of files without any problem and been able to perform intersection queries on them like so:               var interesectionResults = provider.ExecuteIntersectionQuery(geometry);      where the provider is created like so:               var layerLocation = new FileInfo(_layerDirectory.FullName + "\\" + layerName +FileExtension);          if (!layerLocation.Exists)         throw new Exception(string.Format("Could not locate the layer data file, {0}", layerLocation));          return new Ogr(layerLocation.FullName);      The geometry used in ExecuteIntersectionQuery is defined as follows:               var cadastreProvider = GetLayerProvider(Settings.Default.PropertyLayerName);          //Query cadastre to get property bounding box     var query = String.Format("SELECT * FROM {0} WHERE {1} = {2}", cadastreProvider.LayerName, Settings.Default.PropertyKeyField, propertyID);          var propertyResults = cadastreProvider.ExecuteQuery(query);     var resultsTable = propertyResults.Tables.First();     var propertyFeatureRow =  resultsTable.Rows[0] as FeatureDataRow     var geometry = propertyFeatureRow.Geometry      For a particular set of new MapInfo files I have recevied for a client everytime I do the intersection query the following error is thrown               System.ApplicationException was caught       Message=TopologyException: side location conflict 402348 6.9506e+006 1.7e-308       Source=ogr_csharp       StackTrace:            at OSGeo.OGR.Layer.GetNextFeature()            at SharpMap.Data.Providers.Ogr.ExecuteIntersectionQuery(FeatureDataSet ds) in E:\Investigation\GIS\Sharpmap\Sharpmap src\Trunk\SharpMap.Extensions\Data\Providers\OgrProvider.cs:line 483            at SharpMap.Data.Providers.Ogr.ExecuteIntersectionQuery(Geometry geom, FeatureDataSet ds) in E:\Investigation\GIS\Sharpmap\Sharpmap src\Trunk\SharpMap.Extensions\Data\Providers\OgrProvider.cs:line 465            at SharpMap.Data.Providers.Ogr.ExecuteIntersectionQuery(Geometry geom) in E:\Investigation\GIS\Sharpmap\Sharpmap src\Trunk\SharpMap.Extensions\Data\Providers\OgrProvider.cs:line 735            at IFMA.Common.GIS.MapInfo.Implementation.GetLandAttributesForLayerByPropertyID(String propertyID, String layerName, Boolean displayLayerDetails, String layerIdentifierField, String layerDescriptionField, Int32 queryType) in E:\Common\Current\01- Trunk\GIS\Implementations\IFMA.Common.GIS.MapInfo\Implementation.cs:line 145            at IFMA.MasterPlan.BusinessLogic.PropertySystemManager.GetApplicationPropertiesLandAttributes(Application application, Nullable`1 systemVersion) in E:\MP\Current\03- Working\IFMA.MasterPlan.BusinessLogic\PropertySystemManager.cs:line 211       InnerException:       I can't seem to find much information about this error but I gather its at least being thrown by the underlying provider (OGR) that Sharpmap uses to read MapInfo files. Has anyone got an idea what might be causing this?


Using OSM data, pgRouting, and dummy data to develop an origin/destination travel matrix

Further to my previous question I was wondering if it is possible to add dummy node data without to do routing analysis. ## ISSUE   * I have a polygon layer that represents zonal attributes   * I created a centroid (point layer) for each polygon   * I would like to add the new points to the database with "dummy" links to the nearest highway or nearest road of a certain classification   * Route from between all the nodes to develop a trip matrix Is this possible with OSM and pgRouting? **NOTE** I will add more details to this question tomorrow


Adding a new field to table in ArcCatalog

I have a command button in ArcMap, this command button working to add a new field to a specific table in ArcCatalog. e.g. i have a table contains many fields like ObjectID , FeatureName, ... i want to add a new field programmatically while ArcMap is running . Is there anyway to add a new field to ArcCatalog while the ArcMap is running.


Get mouse position in OpenGeo

I'm using GeoExt as part of OpenGeo Suite using code generated by the Open Geo suite SDK. I would like to display the current mouse coordinate and don’t really know how to do it. As far as I know GeoExt has no plugin for this and don’t know how to add the OpenLayers.Control.MousePosition() to mi code. I found a simillar question here but in my case I dont have a GeoExt.MapPanel, instead I have a gxp.Viewer. Here is my code               /**      * Add all your dependencies here.      *      * @require RowExpander.js      * @require widgets/Viewer.js      * @require plugins/LayerManager.js      * @require plugins/AddLayers.js      * @require plugins/RemoveLayer.js      * @require plugins/FeatureManager.js      * @require plugins/FeatureGrid.js      * @require plugins/OLSource.js      * @require plugins/OSMSource.js      * @require plugins/WMSCSource.js      * @require plugins/WMSGetFeatureInfo.js      * @require plugins/Zoom.js      * @require plugins/ZoomToExtent.js      * @require plugins/ZoomToLayerExtent.js      * @require plugins/Legend.js      * @require plugins/GoogleGeocoder.js      * @require plugins/GoogleSource.js      * @require widgets/CrumbPanel.js      * @require plugins/QueryForm.js      * @require plugins/ZoomToSelectedFeatures.js      * @require plugins/LoadingIndicator.js           */          var app = new gxp.Viewer({         portalConfig: {             layout: "border",             region: "center",                  // by configuring items here, we don't need to configure portalItems             // and save a wrapping container             items: [{                 id: "centerpanel",                 xtype: "panel",                 layout: "fit",                 region: "center",                 border: false,                 items: ["mymap"]             }, {                     // container for the layer manager etc.                     id: "westpanel",                     region: "west",                     xtype: "gxp_crumbpanel",                     collapsible: true,                     //collapseMode: "mini",                     //hideCollapseTool: true,                     split: true,                     border: true,                     width: 200                 }, {                     // container for the FeatureGrid                     id: "south",                     region: "south",                     xtype: "gxp_crumbpanel",                     collapsible: true,                     collapseMode: "mini",             collapsed: true,                     hideCollapseTool: true,                     split: true,                     border: true,                     height:200             }],             bbar: {id: "mybbar"}         },              // configuration of all tool plugins for this application         tools: [{         ptype: "gxp_layermanager",         outputConfig: {             id: "tree",             title: "Capas",             tbar: [] // we will add buttons to "tree.bbar" later             },             outputTarget: "westpanel"         }, {             ptype: "gxp_addlayers",             actionTarget: "tree.tbar"         }, {             ptype: "gxp_removelayer",             actionTarget: ["tree.tbar", "tree.contextMenu"]         }, {             ptype: "gxp_zoomtolayerextent",         actionTarget: ["tree.tbar", "tree.contextMenu"]         }, {             ptype: "gxp_zoomtoextent",             actionTarget: "map.tbar"         }, {             ptype: "gxp_legend",             actionTarget: "tree.tbar"         }, {             ptype: "gxp_zoom",             actionTarget: "map.tbar"         },{             ptype: "gxp_wmsgetfeatureinfo",             outputConfig: {                     width: 400                     }         }, {             ptype: "gxp_googlegeocoder",             outputTarget: "map.tbar",             outputConfig: {                     emptyText: "Buscar(Google)..."                 }         }, {             ptype: "gxp_featuremanager",             id: "featuremanager",             paging:false,             autoSetLayer: true,         //autoLoadFeatures:true         }, {         ptype: "gxp_featuregrid",            featureManager: "featuremanager",            outputConfig: {                id: "featuregrid"             },                outputTarget: "south"         }, {         ptype: "gxp_queryform",            featureManager: "featuremanager",            outputConfig: {             title: "Busqueda",             width: 400             },            actionTarget: ["tree.contextMenu", "map.tbar"],//"featuregrid.bbar"            appendActions: false,            autoExpand: "south",         }, {         ptype:"gxp_zoomtoselectedfeatures",            featureManager: "featuremanager",            outputTarget: "featuregrid.bbar"         }, {         ptype: "gxp_loadingindicator",         loadingMapMessage:"Cargando mapa..."         }],              // layer sources         defaultSourceType: "gxp_wmscsource",         sources: {             local: {                     ptype: "gxp_wmscsource",                     url: "/geoserver/wms",                     version: "1.1.1"                 },                  osm: {                  ptype: "gxp_osmsource"             },                 google: {                 ptype: "gxp_googlesource"             }         },              // map and layers         map: {             id: "mymap", // id needed to reference map in portalConfig above             title: "Mapa",             projection: "EPSG:900913",             center: [-10764594.758211, 4523072.3184791],             zoom: 4,             //controls: [pos],             layers: [{                 source: "google",                 name: "SATELLITE",                group: "background"         }, {                 source: "google",                 name: "ROADMAP",                group: "background"         }, {                 source: "osm",                 name: "mapnik",                 group: "background",             selected: true             }, {                 source: "local",                 name: "CONAGUA:estados",                 selected: true             }, {                 source: "local",                 name: "CONAGUA:Sitios",                 selected: true             }],             items: [{                 xtype: "gx_zoomslider",                 vertical: true,                 height: 100             }]         }          });


Repeat the same edit on several layers

For a project we have a master polygon layer which is the basis for a few "produced" layers. These produced layers may contain some of the original features and fields, and also additional features/fields. Occasionally there is a need to modify a few polygons in the master layer (geometry/attributes), and the same edits need to be performed for the "produced" layers as well to maintain consistency. Is there a way to automate this by a customized tool in ArcGIS, so I don't need to repeat the edits several times manually? It seems to me that if all modifications are done via geoprocessing, then it's pretty straightforward. Is it possible if the modifications are done as manual edits in an editing session? Will this entail editor extension? Edit*: I'm looking for solutions with ArcObjects or Python. I have ArcGIS for Desktop 10.0.


How do I create a polygon layer from multiple touching line segments in QGIS?

I'm trying to create a base map for a Maine Coastal area, and wanted to create a polygon layer of the land cover from the coastline in QGIS. Whether I created the coastline vector layer from the USGS national map or downloaded it from NOAA, both options leave me with a multipart line. Ignoring islands the USGS data has ~100 _almost_ connected line segments and the NOAA layer (below) is about 800 connected line segments. I had thought I could disolve these and run linetopoly, but that seems to have some more processing needed that I don't understand, does anyone see what I should be doing to create or get my polygon layer? The raw data looks like this, maybe I could make the coast into one segment?               856      -69.340984,44.013133     ...      -69.345531,44.014013     END     857      -69.356459,44.008586     ...      -69.356459,44.008586     END     858      -69.340544,44.012986      -69.341057,44.013719     etc...      ![failed linestopoly](http://i.stack.imgur.com/SeQGa.png)


overpass-api: data export into csv-formate

**update;** perhaps we can do this like so: to use Perl for text-mangling - so we can use the XML::Simple module. here's an example of a little script to parse your XML: see the Code:               #!/usr/bin/perl     use strict;     use warnings;     use XML::Simple;     use Data::Dumper;          my $xmlfile = shift || die "Usage: $0 <XML_FILE>\n";          my $ref;     eval {       $ref = XMLin($xmlfile,         ForceArray    => 0,         KeyAttr       => [ ],         SuppressEmpty => '',       ) or die "Can't read XML from $xmlfile: $!\n";     };     die $@ if($@);     print Dumper $ref;      **Explantion:** iterating thru the array/hash it creates the file and helps carving up the data into comma separated lines of data than can be redirected to file. see the basic question: i run the following code in opverpass-api - see here http://overpass-turbo.eu/ i have the options to export of the data to the following formats to GeoJSON to GPX to KML and to get the data from Overpass API loat them to JOSM laden (only for requests, that give back valid OSM-XML with Metadata) GeoJSON to save it as gist note - i did not install the overpass-api on my opensuse 13.1 yet. but i am willing to do so. as for now - running the above mentioned code in the oerpass-api - here. how to treat it to get it exported as csv-formated hope i was able to provide all the necessary things for a clear and concise question. See the output that needs to be transformed:               <?xml version="1.0" encoding="UTF-8"?>     <osm version="0.6" generator="Overpass API">     <note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>     <meta osm_base="2014-04-27T13:49:02Z"/>            <node id="297489767" lat="49.4085014" lon="8.6941465">         <tag k="addr:city" v="Heidelberg"/>         <tag k="addr:housenumber" v="23"/>         <tag k="addr:postcode" v="69115"/>         <tag k="addr:street" v="Sofienstraße"/>         <tag k="name" v="ARLT"/>         <tag k="phone" v="+49 6221 20229"/>         <tag k="shop" v="computer"/>         <tag k="source" v="survey"/>         <tag k="website" v="http://www.arlt.com"/>         <tag k="wheelchair" v="yes"/>       </node>       <node id="305144906" lat="49.4060012" lon="8.6929652">         <tag k="addr:city" v="Heidelberg"/>         <tag k="addr:country" v="DE"/>         <tag k="addr:housenumber" v="13-15"/>         <tag k="addr:postcode" v="69115"/>         <tag k="addr:state" v="Baden-Württemberg"/>         <tag k="addr:street" v="Rohrbacher Straße"/>         <tag k="name" v="Heidel-bike"/>         <tag k="opening_hours" v="Tu-Fr 10:00-18:30; Sa 10:00-14:00"/>         <tag k="shop" v="bicycle"/>         <tag k="website" v="http://www.heidelbike.de/"/>         <tag k="wheelchair" v="yes"/>       </node>       <node id="305963167" lat="49.4139877" lon="8.6924247">         <tag k="addr:city" v="Heidelberg"/>         <tag k="addr:country" v="DE"/>         <tag k="addr:housenumber" v="4"/>         <tag k="addr:postcode" v="69120"/>         <tag k="addr:street" v="Brückenstraße"/>         <tag k="name" v="Buchhandlung Schmitt & Hahn"/>         <tag k="shop" v="books"/>         <tag k="wheelchair" v="no"/>