title: Perfectly running python script gives error when run from web.py

text: I have the following python script which runs perfectly if run separately:               import arcpy           val = arcpy.GetCellValue_management("D:\dem-merged\lidar_wsg84", "-95.090174910630012 29.973962146120652", "")     print str(val)      I want to expose this as a web service and so I installed web.py and wrote the following code for code.py. but it gives errors(when invoked. compiles fine).               import web     import arcpy             urls = (         '/(.*)', 'hello'     )     app = web.application(urls, globals())          class hello:                 def GET(self, name):                  val = arcpy.GetCellValue_management("D:\dem-merged\lidar_wsg84", "-95.090174910630012 29.973962146120652", "")             return  str(val)          if __name__ == "__main__":         app.run()      When i invoke this using http://localhost:8080, i get the following error:               <class 'arcgisscripting.ExecuteError'> at /     ERROR 000582: Error occurred during execution.          Python  C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py in GetCellValue, line 8460     Web GET http://localhost:8080/     Traceback (innermost first)          C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py in GetCellValue               be returned."""         try:                  retval = convertArcObjectToPythonObject(gp.GetCellValue_management(*gp_fixargs((in_raster, location_point, band_index), True)))             return retval         except Exception, e:             raise e ...     @gptooldoc('GetRasterProperties_management', None)     def GetRasterProperties(in_raster=None, property_type=None):         """GetRasterProperties_management(in_raster, {property_type})             Returns the properties of a raster dataset.      I have tried Debugging it in many ways, the code .py runs fine if i just return a "hello". The library i am using is a ArcGIS Geoprocessing toolbox library. Any ideas as to what might be wrong?


title: Get extent of Georeferenced Rasters in Python and output to polygon shapefile

text: I would like to create a shape file containing the extents of each of the rasters in a directory. Is it possible to capture the extent of a raster using Python? I have tried > > > extent1=arcgisscripting.Raster.extent('stg1_05.jpg') Runtime error : > 'getset_descriptor' object is not callable and I can't seem to find any help on the module. I also tried > > > arcpy.RasterToPolygon_conversion(inRaster, outPolygons, "SIMPLIFY", > field) > > Runtime error : ERROR 010247: The size of the output shapefile exceeds the 2 > GB limit. ERROR 010067: Error in executing grid expression. Failed to > execute (RasterToPolygon). Anyway this will be a polygon of the whole raster file and not just the extents -even if this is generated, I guess we could then run a merge/dissolve but the files created are to big. Another option I was thinking of was to convert the raster to layer               import arcpy, glob, os, sys     from arcpy import env, mapping     path = os.getcwd()     env.workspace = path     RasterType = 'TIF'     FileList = glob.glob(path + "\*." + RasterType)          print 'Reading files from ' + path     os.chdir(path)     #print FileList          x=0     z=1005     File=FileList[x]     LayerWorking=arcpy.mapping.Layer(File)     print File     LayerExtent=LayerWorking.getExtent()     XMAX = LayerExtent.XMax     XMIN = LayerExtent.XMin     YMAX = LayerExtent.YMax     YMIN = LayerExtent.YMin     pnt1 = arcpy.Point(XMIN, YMIN)     pnt2 = arcpy.Point(XMIN, YMAX)     pnt3 = arcpy.Point(XMAX, YMAX)     pnt4 = arcpy.Point(XMAX, YMIN)     array = arcpy.Array()     array.add(pnt1)     array.add(pnt2)     array.add(pnt3)     array.add(pnt4)     array.add(pnt1)     polygon = arcpy.Polygon(array)     ShapeFile = path + "\Polygon_Extent" + "_" + str(z) + ".shp"     print ShapeFile     print arcpy.GetMessages()     arcpy.CreateFeatureclass_management(path, ShapeFile, "POLYGON")     print arcpy.GetMessages()     arcpy.CopyFeatures_management(polygon, ShapeFile)      Gives following output > Reading files from C:\Python26\script_tests\rectify > C:\Python26\script_tests\rectify\Stage1_01a.TIF > C:\Python26\script_tests\rectify\Polygon_Extent_1005.shp Executing: > CopyFeatures in_memory\fB4DC2172_7D02_44B9_B55C_9E71427AE96E > C:\Python26\script_tests\rectify\Polygon_Extent_1004.shp # 0 0 0 Start Time: > Thu Jul 14 16:11:38 2011 Failed to execute. Parameters are not valid. ERROR > 000725: Output Feature Class: Dataset > C:\Python26\script_tests\rectify\Polygon_Extent_1004.shp already exists. > Failed to execute (CopyFeatures). Failed at Thu Jul 14 16:11:38 2011 > (Elapsed Time: 0.00 seconds) Traceback (most recent call last): File > "C:\Python26\script_tests\rectify\temp.py", line 36, in > arcpy.CreateFeatureclass_management(path, ShapeFile, "POLYGON") File > "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1539, > in CreateFeatureclass raise e ExecuteError: ERROR 999999: Error executing > function. Failed to execute (CreateFeatureclass). using IDLE...Which is wierd as when you run it from the Python window in ArcMap it works fine when the Create/Copy feature commands are run individually. > ShapeFile = "Polygon_Extent" + "_" + str(z) + ".shp" > arcpy.CreateFeatureclass_management(path, ShapeFile, "POLYGON") > >> Result 'C:\Python26\script_tests\rectify\Polygon_Extent_1005.shp'> > > arcpy.CopyFeatures_management(polygon, ShapeFile) > >> Result 'C:\Python26\script_tests\rectify\Polygon_Extent_1005.shp'> this seems to be a very convoluted process... **UPDATE:** Thanks for the fix. I am trying to add the filename to the table and for some reason it inserts a new row into the table and doesn't accept "updateRow(row)"? what am I doing wrong? Also the files don't seem to retain the projection I assign them. > Reading files from C:\Python26\script_tests\rectify > C:\Python26\script_tests\rectify\Stage1_01a.TIF Created: > Polygon_Extent_1.shp Filled in > C:\Python26\script_tests\rectify\Stage1_01a.TIF Traceback (most recent call > last): File "C:\Python26\script_tests\rectify\ResterExtent_toSHP.py", line > 45, in rows.updateRow(row) File "C:\Program > Files\ArcGIS\Desktop10.0\arcpy\arcpy\arcobjects\arcobjects.py", line 102, in > updateRow return > convertArcObjectToPythonObject(self._arc_object.UpdateRow(*gp_fixargs(args))) > RuntimeError: ERROR 999999: Error executing function. **SCRIPT _all working now_.**               import arcpy, glob, os, sys, arcgisscripting     from arcpy import env, mapping     path = os.getcwd()     env.workspace = path     env.overwriteOutput = True     RasterType = 'TIF'     FileList = glob.glob(path + "\*." + RasterType)     print 'Reading files from ' + path     os.chdir(path)     #print FileList     geometry_type = "POLYGON"     template = "C:\\Python26\\GDA_1994_MGA_Zone_55.shp"     has_m = "DISABLED"     has_z = "DISABLED"     # Creating a spatial reference object     spatial_reference = arcpy.SpatialReference("C:\\Python26\\GDA_1994_MGA_Zone_55.prj")          x=0     z=x+1     for File in FileList:     #File=FileList[x]         RasterFile = arcgisscripting.Raster(File)         RasterExtent = RasterFile.extent         print File         XMAX = RasterExtent.XMax         XMIN = RasterExtent.XMin         YMAX = RasterExtent.YMax         YMIN = RasterExtent.YMin         pnt1 = arcpy.Point(XMIN, YMIN)         pnt2 = arcpy.Point(XMIN, YMAX)         pnt3 = arcpy.Point(XMAX, YMAX)         pnt4 = arcpy.Point(XMAX, YMIN)         array = arcpy.Array()         array.add(pnt1)         array.add(pnt2)         array.add(pnt3)         array.add(pnt4)         array.add(pnt1)         polygon = arcpy.Polygon(array)         arcpy.CreateFeatureclass_management(path, "Temp_Polygon_Extent" + "_" + str(z), geometry_type, template, has_m, has_z, spatial_reference)         arcpy.CopyFeatures_management(polygon, "Temp_Polygon_Extent" + "_" + str(z))         ShapeFile = "Temp_Polygon_Extent" + "_" + str(z) + ".shp"         print "Created: " + ShapeFile         arcpy.AddField_management(ShapeFile,'FileName','TEXT')         desc = arcpy.Describe(ShapeFile)         print desc, ShapeFile         #rows = arcpy.InsertCursor(ShapeFile, desc)         rows = arcpy.UpdateCursor(ShapeFile)         #row = rows.newRow()         #row.FileName = str(File)         #row.FileName = File         print 'Filled in: ', str(File)          #rows.insertRow(row)         for row in rows:             row.FileName = str(ShapeFile)             rows.updateRow(row)         x=x+1         z=z+1          #cleaning up     arcpy.CreateFeatureclass_management(path, "Extent.shp", geometry_type, template, has_m, has_z, spatial_reference)     list =[]     lstFCs = arcpy.ListFeatureClasses("Temp_Polygon_Extent*")     print 'Merging Polygon_Extents* to Extent.shp'          for fc in lstFCs:         print fc         list.append(fc)          arcpy.Merge_management(list, "Extent.shp")     #print 'Deleting identical entries and temp files'     #arcpy.DeleteIdentical_management("Extent.shp", ["SHAPE"])     print 'Created Extent.shp and exiting'          for item in list:         arcpy.Delete_management(item)      del row, rows      **GDAL Ver.**               import os, gdal     gdaltindex Extent.shp *.tif      > File "". line 1 SyntaxError: invalid syntax BTW FTTools Python window is a pain as you can't copy/past code/errors from it to.


title: how to convert the easting and northing to a point and saved in a feature class in ArcMap?

text: I write a program to decode the message from the GPS device to get the easting and northing , but I don't know how to convert the easting and northing to a point and saved in a feature class in ArcMap. Do anyone have similar experience ? Regards Gary Sham


title: Why are the output point shapefile PRJ files empty?

text: I have tried evry thing I could find (using C++) to create a new .prj file for an output point shape file using OGR. While I get no compilation or execution errors and ArcMap accepts the file as a point file, ArcMap still claims that my output shape file has no spatial reference: Data Type: Shapefile Feature Class Shapefile: G:\GIS\Working\FIrani\Ubuntu\0_From_Ubuntu\Seeds001.shp Geometry Type: Point Coordinates have Z values: No Coordinates have measures: No Coordinate System: How do I get OGR to actually apply my ACEA specified coordinate information to its output shape file? Do I actually have to delete the current .prj and create and write out a new .prj file myself? My current (kitchen sink) approach is a s follows (much tanks in advance for any clues):                   /*         Define projection for output seed file.         --------------------------------------- */         char *pszWkt = NULL;         oSRS.SetProjection("ACEA");         oSRS.SetProjCS("ACEA");         oSRS.SetWellKnownGeogCS("ACEA");         oSRS.SetACEA(29.5, 45.5, 23.0, -96.0, 0.0, 0.0);          oSRS.morphToESRI();         oSRS.importFromWkt( &pszWkt );       pioSeedLayer = pioSeedDS->CreateLayer( pszSeedsfn, &oSRS, wkbPoint, NULL );        // Ouput projection via oSRS.       if( pioSeedLayer == NULL )       {         printf( "Layer creation for seeds failed.\n" );         exit( 1 );       }


title: How to get the TOC to update after adding a new Layer in the ESRI JSAPI?

text: I am developing an Web map with the ESRI's JavaScript API v 3.9. I am using the TOC widget available at http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109 The documentation shows how you can initialize the TOC when creating the map. In my case, the user can dynamically add any ArcGIS Dynamic Mapservice by providing the URL. I have tried the following:   1. Add the Layer to the toc's `layerInfos` and then calling `toc.startup();` This does not do anything. Neither is there an error, nor do I see the new layer.   2. Delete the HTML inside the TOC Div, and try to recreate the widget with the new layerInfos. This gives me an error saying that the div has already been registered. How do I show this new Layer in the TOC when it is already initialized?


title: Confused about PostGIS and Postgres terminology

text: I am documentating my stuff and not sure what is the right way to write this, "I have installed Postgres and added the shapefile to the Postgres database. This database is then PostGIS enabled" or "spatially enabled". What is confusing me is that when to use Postgres and when to use PostGIS? Is the Postgres database and PostGIS database the same? Or is it that the database is Postgres and the table is PostGIS? What are the correct wordings?


title: How to join MySQL data with GIS data using arcpy?

text: Here is my problem, I have a MySQL database with table in it that has 4 columns: ID, Owner, Address, Legal. And I also have an ArcGIS GDB that has a parcel layer that has in it a PID field. I am looking for a way to join this MySQL table and the ArcGIS GDB into a new GDB with all of the information from both in Python using arcpy. The PID field and the ID field match up, I am just not finding a way to to a join between a MySQL table and the GDB. Any help would be appreciated.


title: How to get the z-Value from xy-Values within a Polygon

text: How can I get the z-Value of given xy-Values within an IPolygon. I have an IPolygon, which is zAware. For given xy-Values I want to get the z-Value of the Polygon-Shape. What I want to do is something like intersecting the Polygon with an vertical line and getting the Intersecting Point. Has anyone an idea how to do something like this? I'm thankful for any suggestions!


title: code to draw a line taking length and angle as input from user in arcmap

text: I want to make a command tool in arcmap. The purpose is to ask user to provide length and angle as input from a point(already selected by user) and then draw a line.


title: Remove buffers of overlapping buffers

text: I work with ArcMap 10.2 and would like to remove buffers of the overlapping buffers, but not all overlapping buffers. So for example: ![Buffer Overlap](http://i.stack.imgur.com/T9CBY.jpg) I would like to remove the buffer in the middle and remain the outer two. I have many buffers though which overlap, I would do it for all of them, so I do not have to throw away all the overlapping buffers. I would like to use the modelbuilder as I dont know much about Python.. Any help would be appreciated.


title: How does Google Earth Enterprise compare to ArcGIS server and GeoServer?

text: I'm working on a web app that includes mapping capabilities (currently just markers and KML overlays on an embedded Google Map). We're starting to outgrow the limitations of Google's free stuff, and Google Earth Enterprise initially seemed to be the natural upgrade path. But at least judging from the tags on this site, it doesn't seem like it gets a lot of use in the GIS community. Has anyone used GEE who could compare it to the more widely used server platforms?


title: ArcGIS 10 reports with map and data table

text: HI wonder if anyone knows how to automate a report showing parcel information along with an inset map on the same page. I have access to ArcGIS 10. thanks


title: Why are Google Mercator and UTM rotated towards each other?

text: Being a self-taught GIS user, I struggled a while before getting the grips on map projections. But now this: because I like to use OpenStreetMap as a background layer for orientation, I have saved my shapefiles all in EPSG:3857 ("Google Mercator"). However, if I want to create a grid of 10×10m² grid cells, I had to convert one of the layers to UTM (zone N32, EPSG:32632) for the spacing to be correct. What surprised me when reactivating the OTF conversion, that the grid had **rotated** : ![two map snippets, one in EPSG:32632, the other reprojected to EPSG:3857](http://i.stack.imgur.com/Mhafm.png) I would have expected minor distortion or even scaling, but **why is North not identical (straight up) for both projections**? _For reference: the excerpt shown is from48.18714° N, 12.14092° E._


title: openlayers addUniqueValueRules default style not displaying

text: I'm trying to alter the colour of displayed points using addUniqueValueRules in OpenLayers. If I don't use addUniqueValueRules all my points display the default colour (green). However, when I add addUniqueValueRules, only those points that meet the rules are drawn. The relevant code:               var styleMap = new OpenLayers.StyleMap({         fillOpacity: 1,         fillColor: "green",         pointRadius: 5     });          var styleLookup = {         "Hög": { fillColor: "red" },         "Måttlig": { fillColor: "yellow" },         "Undersöka": { fillColor: "cyan" }     };          styleMap.addUniqueValueRules( "default", "risk", styleLookup );          wfs = new OpenLayers.Layer.Vector("Editable Features", {         strategies : [new OpenLayers.Strategy.Fixed(), saveStrategy],         projection: new OpenLayers.Projection("EPSG:4326"),         protocol: new OpenLayers.Protocol.WFS({             version: "1.1.0",             srsName: "EPSG:4326",             url: "http://localhost/cgi-bin/tinyows",             featurePrefix: "tows",             featureNS :  "http://www.tinyows.org/",             featureType: "tradcopy",             geometryName: "geom"         }),         styleMap: styleMap     });       Can anyone help me draw all the points - both default and the ones that meet the rules? Thanks Mini


title: How to convert 2D Map to Flat map like in google?

text: My requirement is shown below by maps. **Map 1--My Map** ![Map 1--My Map](http://i.stack.imgur.com/4ADp3.jpg) **Map 2--I required** ![Map 2--I required](http://i.stack.imgur.com/WspqP.jpg) ![Map 2--I required](http://i.stack.imgur.com/cRNPn.jpg) I am using GeoServer v2.2(for publishing the map) and OpenLayers v2.11(to display the map). According to my client requirement I published one layer with name " **3d Buildings** " in GeoServer and given a 3D style. I added this layer as WMS in OpenLayers. Now its look like a 2.5D Map(refer "Map 1"). My Questions are; **In Geoserver**   1. Look at the buildings in "Map 1" its showing flat roofs, But I need different shapes of roofs like the buildings in "Map 2".   2. Or How can I load 3D models to a layer? **In Openlayers(2.11)**   1. How can I rorate/flat map like google earth? Please see the "Map 2" which is in flat view. you can see sky also .In Google API they are using " **map.setTilt(45)** " to change the map angle. Like this any option is available in openlayers?.   2. Or How can give Navigation Controls like in google earth?   3. How Can I load 3D Models on map? **If these features are not available in GeoServer and OpenLayers, introduce me a new tool. Kindly help me.** Thanks


title: ArcGIS Raster Calculator VS QGIS Raster Calculator

text: Are there any major differences between ArcGIS Raster Calculator and QGIS Raster Calculator?


title: Watershed delineation taking into account lake/reservoir

text: My watershed has several big lakes. When I delineated my watershed, I had some unwanted subwatersheds and river segments inside the lakes (see fig. below). **I want to tell ArcGIS/ArcHydro to delineate my watershed but ignore places where there are lakes/reservoir**. Moreover, the generated subwatershed and streams should be consistent in terms of cascading flow from upstream to downstream e.g. subwatershed 2 flows to the lake and water from the lake flows to subwatershed 3, etc. Any suggestion would be highly appreciated. Thanks! ![Left: DEM with lakes; Right: Generated subwatershed with strange river shapes across the lake ](http://i.stack.imgur.com/dhfQo.jpg)


title: qgis-2.2.0 database tab missing

text: I have recently installed QGIS-2.2.0 but the Database tab in the top-menu bar is missing. It looks the main reason is missing libgdal1h library. But when I am installing it, it's removing Postgresql-9.3, PostGIS-2.1 and PgAdminIII (which initially asked for libgdal1 library during installation) before installation. I want PostGIS to connect to from QGIS Database tab (Database Manager). I guess, there is a conflict between libgdal1h and libgdal1. Please help to fix. I am on Ubuntu-12.04. Cheers! Zia


title: Where to find geojson for uk?

text: I want to get the GeoJson for UK.The regions which i require are in the map displayed on clicking the below link. http://www.apho.org.uk/resource/view.aspx?RID=50213 I have been searching the net but all in vain.Can anyone help?


title: How to fix incorrect coordinate data for the mouse's position

text: I am running Quantum GIS 1.8.0 on a 64-bit Windows platform. I've imported a data set that plots correctly when overlaid with a Google Satellite map, so I know that the layer/project CRS is okay (since my points are being projected correctly). The issue is that when I hover my cursor over any point on the map, the reported coordinates are entirely different from the coordinates used for plotting the points. How do I fix this or where can I get information on how to resolve this? I've checked the QGIS bug repository, searched this forum, and reviewed the User Guide. **example** plotted point: -76.83617103 39.21012998 map coordinates at mouse cursor position (same point as above): -8553363.45 4751815.77 Thanks!


title: arcpy to handle topology error inspector

text: I am now want to do topology check use python, but I don't know whether arcpy can realize the function in error inspector. May I call error inspector and get the error records(something like attribute table) using python(when arcmap is open)? Thanks!


title: How to bind layer display?

text: I work on several layers in arcmap 9.3 My question is about creating binds to display theses layers directly. like               ctrl+1 ( display / hide  layer 1 )     ctrl+2 ( display / hide  layer 2 )     ctrl+3 ( display / hide  layer 3 )     ctrl+4 ( display / hide  layer 4 )       I Didn't find it in the keyboard menu. Is there a way of doing it ? Thanks !


title: GeoExt: is it possible to hide the checkbox of a LayerNode?

text: I would like to hide/remove the checkbox of a LayerNode, since I need to have it always on display. Is there any sort of option to do this? Or must I use the Ext object hierarchy to locate the checkbox object and remove it?


title: Changing the search widget link icon

text: I want to change the pre-defined red arrow link icon in the search widget to another icon: ![screen shot](http://i.stack.imgur.com/TOCo9.jpg) Where would I do this? It looks like the widget is drawing from the InfoPopupWidget.swf?


title: GeoServer: Cross Layer Filtering vs Layer Groups

text: To pull features using WFS from several layers in one request, I have two options: One, create a layer group, and then get features from the layer group, as opposed to individual layers. Two, use cross layer filtering to obtain features for each desired layer. Now, I'm not adept at cross layer filtering. But it appears to me as the more flexible and robust solution. What I wish to achieve is obtain points within a selected administrative boundary. The administrative boundaries and the points/population layers are separate. I'll appreciate any advice on the way to go. My environment: GeoServer 2.1.3, OpenLayers 2.11, PostGIS 1.5.


title: How to Display Overlapping Lines?

text: I have multiple line layers that represent bus routes and many of the routes overlap (i.e. near terminals, transfer locations, etc.) Is there a function in Qgis which will display both features next/parallel to each other? In the example link, the Red and Purple lines are two separate routes, they both utilize the same roads. The purple line overlaps the red line and the red line is not visible. I appreciate any feedback, even with the bad news that it is not possible. ![http://imgur.com/sPyGqWW](http://i.stack.imgur.com/G4AU9.jpg)


title: Why can I only see a default list of KML attributes in attribute table?

text: I converted a shapefile to kml using `ogr2ogr`. Glancing at the output, it looks correct -- it has a `<Schema ...>` and each `<ExtendedData>` references the schema (I uploaded a snippet here). However, when I open the kml in QGIS and select "View attribute table", I only see a default list of attributes (Name, description, timestamp, begin...). Is this a limitation of the KML reader, or an error in the file?


title: Setting coordinate systems in QGIS: "transform error caught"

text: I'm learning how to use QGIS (v 1.8.0 "Lisboa") on Mac OS 10.6.8. My goal is to create a simple county map of Illinois using the base data shapefiles available from the Illinois Natural Resources Geospatial Data Clearinghouse. Following workflow suggestions in another thread, I first checked "Enable 'on the fly' CRS transformation" in Project Properties. Then I added the shapefile: ![Illinois wide](http://i.stack.imgur.com/KgsT4.jpg) I then changed the CRS in Project Properties to NAD83/Illinois (West) [EPSG code 26972] to get the desired look: ![Illinois](http://i.stack.imgur.com/npHUC.jpg) So far so good. But after saving the QGIS file, closing it, then opening it again, I get a CRS error:               Transform error caught: forward transform of (0.000000, 0.000000)     PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=tmerc +lat_0=36.66666666666666          +lon_0=-90.16666666666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80        +towgs84=0,0,0,0,0,0,0 +units=m +no_defs     Error: latitude or longitude exceeded limits      How do I prevent this type of error?


title: Setting coordinate systems in gvSIG: workflow or transformation issues

text: I am learning how to use gvSIG 1.10 (Mac OS 10.6.8 Snow Leopard). My goal is to create a simple county map of Illinois using the base data shapefiles available from the Illinois Natural Resources Geospatial Data Clearinghouse. I want to use a state plane coordinate system such as NAD83/Illinois (West) so that the layer will look like this (narrow): ![Illinois](http://i.stack.imgur.com/npHUC.jpg) ... not this (wide): ![Illinois wide](http://i.stack.imgur.com/KgsT4.jpg) Here are the dialogs I see after adding the layer: ![enter image description here](http://i.stack.imgur.com/BUGEA.png) I tried to change the projection to the desired "narrow" version, but no matter what I do, it is always displayed as the undesired "wide" version. In case this is relevant, here's the empty Transformations list in gvSIG: ![Transformation dialog](http://i.stack.imgur.com/uF8vu.png) What am I doing wrong? Am I missing a software component?


title: Algorithm: move a source polyline to a reference polyline (completely or maybe partially)

text: In our system, there're the requirements that we want to move some source lines (with low precision) to reference lines (with high precision). Following pictures gives the normal use cases. The red one is a source line and the blue one is a reference line. ![The red one is source line and the blue one is reference line](http://i.stack.imgur.com/3f761.png) For this case, the source line would be moved partially, and the result would be as the green line shows: ![Move result 1](http://i.stack.imgur.com/e1oES.png) There're situations that the source line need to be moved completely. ![Example 2](http://i.stack.imgur.com/2j0Xw.png) Result: ![Move result 2](http://i.stack.imgur.com/jriNZ.png) Currently our solution is to project head/end point of the source line to the reference line and vice versa, then find projected points on the source and reference line. With these projected points, we can extract the needed part of the source and reference line and then combine them into a new one. This works for most cases, but there are cases that this method does not work. Specifically, when either of the line has "C" like shape or the head point is very close to the end point. The next two pictures gives the scenario. ![C like shape line](http://i.stack.imgur.com/Bsom3.png) Applying my algorithm, we get the result: ![Results](http://i.stack.imgur.com/vx6Ft.png) In a way it's understandable because the current algorithm just finds projected points and extracts lines. What we expected is something like this: ![Expected Results](http://i.stack.imgur.com/4ldCP.png) So what I need more robust algorithm to do this so that it can also handle special cases like the preceding one. I have tried to project every points from a line to another and to find the two projected points that closest to the head/end point of the projected line, but there was no luck. Still I can find cases that give unexpected results. Has anyone come across similar problems before? It would be also great if there is a software or library can do similar job. Any answer will be appreciated.


title: OpenLayers Show message (Information message or Alert )(or HTML content)on the map

text:
Bonjour, J'utilise OpenLayers et j'aiemrais afficher une fenetre affichant des messages sur la carte openLayers Voici un exemple de ce que je voudrais faire : http://www.annuaires.justice.gouv.fr/annuaires-12162/annuaire-des- juridictions-21798.html j'aimerais afficher un cadre comme la fenetre où il y écrit "Affiner votre recherche..." J'ai 'essayé de faire :

Test

      et la j'ai bien une petite fenêtre qui s’affiche sur la carte mais y a un décalage en haut de la carte. savez vous comment afficher du texte ou du contenu html sur la carte ? Merci ;) * * * English Translation (based on Google Translate. Improvements welcome!) Hello, I use OpenLayers and I would like to display a window that displays messages on the OpenLayers map Here is an example of what I would do: http://www.annuaires.justice.gouv.fr/annuaires-12162/annuaire-des- juridictions-21798.html I would like to display a frame as the window where it's write "Affiner votre recherche ..." I'm trying to do:

     Test

      and I have a small window that appears on the map but there is a gap at the top of the map. Do you know how to display text or html content on the map ? thank you;)


title: Is JAI really that usefull for raster images on Geoserver?

text: I've been going back and forth with JAI for quite a while by now. I've never been really impressed with it to be honest. Is it really all that jazz that I hear people talk about? The problem with JAI is that I'm stuck with a 32bit JVM, thus not fully utilizing the abundance of RAM that I have. Has anyone done any head-to-head comparisons between 32bit JVM + JAI vs. 64bit JVM? I have a Geoserver instance with 10k+ geotiff images, and only these geotiff images.   Which one of these setups would give me the best performace in your opinion? JVM 32 bits   Native JAI installed   -Xmn1000m   -Xms1400m   -Xmx1400m   (among others) JVM 64 bits   No native JAI   -Xmn2g   -Xms10g   -Xmx10g   -d64   (among others) Thanks for your responses!


title: slope and mosaic datasets

text: I was wondering if anyone has had any experience with combining multiple DEM’s into a mosaic dataset. I am working with several DEM’s and need to convert them to slope. I’m having an issue with doing this w/ a mosaic vs. individually and can’t seem to locate any information to help me online. The output I get running them individually comes out correct, but is incorrect when run using the mosaic (see attached image, left is correct, right incorrect - obviously) Does anyone know if you cannot apply the slope tool or any other tool to a mosaic dataset? I would think no since this is such powerful software, so I’m assuming I’m doing something wrong. Any knowledge anyone has would be greatly appreciated. P.S. I am using ArcInfo ![slope screenshots](http://i.stack.imgur.com/eM71i.png) ![mosaicslope](http://i.stack.imgur.com/uCJMA.png) ![rastertomosaic](http://i.stack.imgur.com/Ifn9z.png)


title: How to stop or deactivate draw polygon control after the first polygon has been drawn in Openlayers

text:
I want to only be able to draw one circle on my map and then disable the control. Below is my code, Any suggestions?                                                                                <link href="css/style.css" rel="stylesheet" type="text/css" />

             <input type="radio" name="type" value="none" id="noneToggle"                    onclick="toggleControl(this);" checked="checked" />                  navigate

             <input type="radio" name="type" value="regular" id="regularToggle" onClick="toggleControl(this);" />             draw regular polygon

             <input type="radio" name="type" value="modify" id="modifyToggle"                    onclick="update();" />                  modify feature

                     <input id="rotate" type="hidden"                             name="rotate" onChange="update()"  checked="checked"/>

                     <input id="resize" type="hidden"                            name="resize" onChange="update()"  checked="checked"/>                   <input id="keepAspectRatio" type="hidden"                            name="keepAspectRatio" onChange="update()" checked="checked" />

                     <input id="drag" type="hidden"                            name="drag" onChange="update()"  checked="checked"/>


title: Relative paths in ArcScene document are broken if opened programmatically

text: When I open ArcScene document with relative paths programmatically from ArcMap, all those paths are broken. The location in source tab for broken layers is set to some different path like "C:\Windows\System32" or "C:\Windows". Below is the code sample I use to open document. Both ArcMap and ArcScene projects are located in "C:\test" and so are files added to ArcScene doc.               Sub test_relpaths()       Dim pDoc As IDocument       Set pDoc = New sxDocument       Dim iApp As IApplication       Set iApp = pDoc.Parent       iApp.OpenDocument ("C:\test\test_relpaths.sxd")     End Sub      When I use similar code to open ArcMap doc from ArcScene, everything is fine, relative links are kept:               Sub test_relpaths()       Dim pDoc As IDocument       Set pDoc = New mxDocument       Dim iApp As IApplication       Set iApp = pDoc.Parent       iApp.OpenDocument ("C:\test\test_relpaths.mxd")     End Sub      Can anyone please help me to fix this issue or tell if it's a bug. **Update:** I've installed 9.3.1 with SP2 and some patches, but it didn't help.   **Update2:** I've also tested these samples in ArcGIS Desktop 10 SP3 and results are the same. It seems like an ArcScene bug.


title: Free data with good accuracy of Europe and Mediterranean

text: I'm searching for free data like Europe's coastline and Mediterranean island's names etc. but with good precision. I found some shp file from this site http://www.naturalearthdata.com/downloads/ but the data it was too generalized and the scale small. Free data usually is without any warranty about their accuracy. I need it for non commercial use.


title: How to pansharpen radiance/reflectance Landsat 8 in GRASS 7?

text: first at all, I have to say that I'm **new GRASS user**. I would like to make a pansharp in GRASS 7 with reflectance Landsat 8 bands. I have revised some related posts and blogs, and I didn't find out if it is possible to make a pansharp after in reflectance bands. It seems that **i.pansharpen** only works with 8-bit data, however, Landsat 8 is delivered in 16-bit. So, my question is: is necessary to do a r.rescale with reflectance Landsat 8 data before pansharpening? Thank you all.


title: Running OGR conversion to dxf within QGIS

text: I would like to automate a conversion process which converts a polygon vector dataset (either sqlite or shp) to a dxf using a named column as layer name for the dxf file. The column / layer name is always identical. Right now I am using OGR in the command line:               ogr2ogr -f "DXF" outputfile.dxf inputfile.sqlite -sql "SELECT *, columnname AS Layer FROM inputfile"      As this would be much more user friendly wthin QGIS and its GUI I would like to know how can I streamline this within QGIS and have - lets say - a button, that starts a dialog where I can enter the file to be converted and the target dxf. Having a possibility to enter the column name of the attribute to be used would be extra nice. I am not much of a programmer but willing to dive a bit into python. Thank you all in advance.


title: Import of OSM data into PostgreSQL using osm2pgsql: which formats are supported?

text: I followed a tutorial to install a PostgreSQL server on my Mac OS X Mavericks, and to import some OSM data with the osm2pgsql converter (https://www.mapbox.com/tilemill/docs/guides/osm-bright-mac-quickstart/). I used OSM data in the `.osm.pbf` format for the import. That works fine. Is it possible to use the formats `.osm` and `.osm.bz2` as well? And maybe other formats? Do I then need to add certain options to the osm2pgsql command, depending on the chosen format? I intend to import only small amounts of data into the database, mainly for visualizing purposes in TileMill.


title: Is there Shape Metrics Toolbox or equivalent for ArcGIS 10?

text: I need to compute the geometric properties (e.g. contiguity index, dispersion index etc.) of a series of polygons and I would like to use the **Shape Metrics Toolbox**. I am using ArcGis 10 and the version of the toolbox that I could find on the website is said to be for ArcGis 9.3. When I try to use the tool I get an error message which might be related to an incompatibility with ArcGis 10:               ERROR 999999: Error executing function.     <type 'exceptions.SystemExit'>: 1     Failed to execute (ShapeMetrics).        I found several papers on line in which the authors mention an ArcGis 10 version of the Shape Metrics Tool but I couldn't find this version anywhere. I have contacted the authors but have received no reply yet. I was wondering whether any of you have experience with the Shape Metrics toolbox in ArcGis 10, have encountered the error message above or know of other user-written tools for ArcGis 10 which compute shape metrics.


title: merge national hydrography dataset files

text: I'm having difficulty merging datafiles from the NHD while still keeping functionality as a geometric network. I'm using ArcGIS 10.1, so the USGS merge tool isn't an option. Using the medium resolution staged NHD files, I've tried 1) merging the NHDFlowline files and then building a geometric network - results in a network with "Indeterminate Flow" and 1 type 12 error; and 2) putting two NHDFlowline files into a new Feature dataset inside of a file geodatabase, then constructing the geometric network - results in a network with "Indeterminate flow" also. Not sure if I am mis-specifying the geometric network attributes, missing a step or something else.


title: Select All records in QGIS

text: Is there a one step operation to select all the records in a layer or dataset in Quantum GIS? I can't find any reference to a single button, menu command or keyboard shortcut to achieve this. I am aware of workarounds such as the following:   * Selecting one record in the attribute table, inverting the selection and then reselecting the now unselected record   * Running an advanced select with a static 'True' condition such as 1=1.   * Using a marquee or other polygon select tool over the entire layer extent in the map window I'm running QGIS 1.7.4 on Windows 7


title: GIS/Geospatial Podcast

text: I wanted to know if there are any free available to download informative GIS/Geospatial audio or video podcast other than ESRI Instructional Series Podcasts and Speaker Series Podcasts in the market. I am interested in general news/advancements in GIS. Thank you in advance.


title: ArcGIS Server 10.1 Map Service Not Using Maximum Instances

text: I'm running a stress test tool that's simulating 10 concurrent requests for an ArcGIS Server 10.1 (Windows) Map Service. I have the Map Server set to use a maximum pool of 4 instances. I'm not using caching - these are full screen map images based on random coordinates within a bounding area of interest. Regardless of whether I'm using File Geodatabase, PostGIS or SQL Server as the source of the data - the maximum number of instances that gets used is 2. FYI - the requests are coming from separate threads and are staggered by 200ms with an in-between request delay of 1000ms. So I would expect it to fire on all cylinders during the test. Any ideas why it never uses the maximum number of instances?


title: Which GeoTIFF tags tell me what I want to know?

text: I'm reading some GeoTIFF files into my app using `libgeotiff`. After the model of the `listgeo` program that comes with libgeotiff, I want to extract the extents (corners) of the GeoTIFF so I can position it. I only really want to deal with coords in WGS84 and UTM (ultimately, I'll convert WGS84 to UTM). However, I don't know which bit of the GeoTIFF info tells me what I want to know about the 'corner' coords. Obviously, I can use the magnitude of the numbers to guess if the resulting coords are lats and longs, but surely there must be an official way? Something like (pseudo-code):               If (geotifftag == UTM || geotifftag == WGS84)         // Proceed     Else         Msg("Unrecognised data format")     End If      Could anybody help me out with what the GeoTIFF tags actually tell me?


title: map does not zoom to a feature - openlayer's zoomToExtend

text: I'm using Geoserver 2.1.3 and openlayers 2.12. I created a vector layer and I implemented a "Search" functionality using CQL. After the CQL search, I succesfully render new features on the layer. And then I use the following code, so the map will zoom to the new features.               map.zoomToExtent(myLayer.getDataExtent());      If I use this code with the other vector layers, works just fine. But for this particular layer, does not zoom to the new features. Keeps zooming on a certain, irrelevant area. Any tips/hints? Thanks


title: returning exceptions to user via AGS REST

text: I've got a python script that I run as a standalone and as a gp service in AGS (moving to 10.1 now...). For the standalone execution, I'm throwing a custom exception if there is no data found based on the user's input:                   arcpy.MakeTableView_management(lookupTable, luTV, '"COMID"='+gage)         if arcpy.GetCount_management(luTV)==0:             raise Exception('UnknownIdentifier')      I'm expecting users of the AGS service to be scripting against the REST API, most likely with python, and I want to be able to pass back the same exception through the AGS web service. I have users that plan to hit my service hundreds of times using some kind of iteration--I need a clear way to let them/their code know that a request had a problem. I'm having trouble finding information on how to I should modify my script. I can see from this question that there will be some differences if the initial request is executed synchronously (somehow directly passed) or submitted as an asynchronous job (use GPResult), although I didn't understand what these differences mean for either the user's or my code. I'm not seeing what I think I need here, although I probably (definitely) don't understand it all. Don't know if I have to fiddle with the actual configuration of AGS's REST API\--I'm really hoping to avoid needing admin privileges. Is it really as simple as ditching my `raise Exception()` syntax and using arcpy.AddMessage() instead? Thanks for any guidance! **Updates** related posts:   * Setting Output Parameter in ArcPy for Server Tool   * Python Geoprocessing Service Script - how to use SetParameter   * Crucial concepts for (ESRI) Geoprocessing Services


title: Problem with nviz and QGIS 1.8

text: I am using QGIS 1.8.0 on Windows 7. In nviz (via SEXTANTE), after selecting an altitude layer and the GRASS region extent, I hit OK; the progress bar quickly reaches 100% and then absolutely nothing happens. I tried loading other layers, including additional vector ones and changing the extent. I have also reinstalled QGIS using OSGeo4W, cleaned the registries and reinstalled the plugin. What am I missing?


title: QGIS: put vector values into separate layers?

text: QGIS 1.8.0 Mac: I've got a polygon shape file with values 1-5 in it i.e. contours. How do I get the polygons for value 5 into one layer, 4 into another... so I can assign each a colour and see them?


title: What is Trinity High Water?

text: This question may be off topic, in which case I apologise. I have a problem where water level is important and I have two water levels defined, Trinity High Water and Mean High Water springs (MHWS). I understand what MHWS is but I don't understand what Trinity high Water is and how it relates to MHWS.


title: Stuck while Using GeoServer WPS with QGIS

text: I have been using **Geoserver WFS and WMS with Qgis** for a longtime. Now i am trying to **integrate WPS**... I downloaded and **activated WPS plugin for Geoserver**. And i succesfully got result of buffer example with **WPS Request Builder of Geoserver**. But when i try with **QGIS WPS-Client** i **never got result**. It sends the data to server but **never comes back the result**. it stucks... I tried official **52North WPS server** and i got result succesfully. So what should i do ???


title: What software is available on OSX for working with DEMs?

text: I have several adjacent DEM files and would like to combine them into a mosaic and then export to DEM and TXT. I know a Windows solution is to use MICRODEM but before installing Windows 7 I would like to know if there is a Mac (OSX) based option.


title: Transform from WGS84 to EPSG 3785 (google maps)

text: I am a Java Developer and I was given this coordinates from a database               verbat_sistema_coordenadas  verbatim_SRS    datum   verbat_longitud verbat_latitud     UTM                         WGS84           WGS84   9947921          815887      And I tried the examples here http://stackoverflow.com/questions/7661/java- code-for-wgs84-to-google-map-position-and-back, but I get something like this when I try to use the MercatorTransform showed there               LatVerb           LonVerb               LatEPSG                        LonEPSG     815612.0         9948458.0           7.3267672551129115        66.40190209729147      I tried the formulas shown there and I get differnt result with each formula and none are close to what I need. Then someone I am working with gave me an excel sheet with some formulas but the have a million variables and constants               Fi' Ni  a   A1  A2  J2  J4  J6  Alfa    Beta    Gamma   B(fi)   b   Zeta    Xi  Eta Sen h Xi    Delta Lambda    Tau      And they depend on the Timezone(meridian, maybe I am translating this wrong?), and the hemisphere, and they seem to work. They gave me -0.4544682953,-78.1736736245, which is the correct answer. This is the excel sheet http://www.gabrielortiz.com/descargas/descarga.asp?Fichero=Conversion_UTM_Geograficas.xls I tried using geotools, but it was way off too http://osgeo- org.1560.x6.nabble.com/convert-wgs84-coordinate-to-Google-Map-coordinate- system-EPSG-3785-with-geotools-and-java-td4983362.html


title: MMQGIS: How to make grid layer in meters not degrees?

text: I've read several of the posts on here pertaining to MMQGIS Create Grid Layer option, but I have not found information on how to make the grid based on meters veres degrees. I know how to manipulate the CRS for shp layers to adapt to meters, but I'm not quite sure on how to do it within this context. Specifically, I'd like to make a hex grid with roughly a radius of 804.672 meters for each hex. The grid would have to cover an area that is about a 48280.3 meter radius. Am I doomed to inaccurate degree measurements of the Hex Grid, or is there a solution to this problem. I have a basic proficiency with QGIS. Thanks!


title: Site to download al USGS Topo Maps in bulk

text: I am trying to create seamless topomap WMS or TMS layer that covers the entire US (not interested in geo-pdfs). To do that, I need either the rasters (geo- tiffs, etc) or **preferably** vectors (whatever vector format readable by ArcGIS or GDAL/OGR) that are used to generate those maps - and I want to download it them in bulk (without having to click through one thousand interfaces to get each 1 degree quad). Hard drive disk space is not an issue Any link? :) **Update:** this is what the terraserver images look like and hence my preference for the vector data. ![terraserver tile](http://i.stack.imgur.com/HVt9m.jpg) The TopoOSM layer generation looks promising, ![Topo OSM layer](http://i.stack.imgur.com/oSZ9M.jpg) but it seems the data for the entire US is not available from one location.


title: Weighted Proximity

text: I am trying to have weighted zones around point sites based on importance, strength or speed. For example a radio mast that has 10000 watts will have a smaller zone than a 50000 watt mast. Basiclly it is assigning value to central places. It could also be speed, for example three helicopters all travel at different speed. How big a zone would 1 hour be for each? Weight centroid is the core issue. Any and all suggestions welcome.


title: Run Macro automatically

text: I am involved on a project which is about Generating 2 maps via running macros in Arcmap 9.3. It works fine when user push the "run macro" button but now I want to call arcmap from a web page. It opens arcmap file successfully but I was wondering is there a way to run macro without clicking? This project is going to be part of web application and must work automatically. Thank you


title: Transforming a polygon to ESRI shapefile?

text: First, apologies - I am a complete newb at this stuff and don't know what I don't know. I may use incorrect language. Essentially, I want to convert the shapes in a Microsoft Visio diagram into a shapefile. I pretty much want the diagram to BECOME a shapefile. I have a csv file which describes 10-15 arbitrary polygons from that Visio diagram:               ShapeNo ShapeName PointNo   X    Y     1       My Square   2       37  155     1       My Square   4       116 155     1       My Square   6       116 234     1       My Square   8       37  234     1       My Square   10      37  155      Polygons are going to be squares, rectangles, with the occasional circle/oval. I'll generate the file above with a script which exports each point of each shape in the diagram. Part and parcel of the X/Y info is the relation of each shape to the others. I'm hoping QGIS can take this information and essentially create a shapefile for me based on some arbitrary lat/lon "center". Can this be done? If so, a push in the right direction (articles, keywords, walk-throughs) would be really appreciated. Thanks!


title: Remote sensing: How to start with interferometry?

text: I need to start learning about the interferometry techniques available/used for remote sensing data (radar or optical).   * Which are the main applications?   * Which techniques are applied?   * Which Earth Observation data is more adequate?   * Which software (free or comercial) is better?   * Other important issues. Help? Thanks.


title: convert list of points to line or polygon

text: I have a list of Points in a PostGIS table. The rows can be grouped by a date something like:               myTable      id INT      date DATE      lat NUMBER      lng NUMBER      geom GEOMETRY(POINT)      now I need a table where all points of one day are collected in a new geometry (sorted by id)               targetTable      id2 INT      date DATE      geom2 GEOMETRY(POLYGON)      how can I do this with PostGIS or GeoKettle, I cannot use any other client since this transformation has to be done in batch?


title: Remove spatially duplicate features using ModelBuilder

text: I am creating a model to remove features which are duplicated within a polygon feature class. Most of the features are duplicated once, but about a quarter have up to three or four exact copies. I do not have ArcInfo, so I cannot use `Delete Identical`. My model should contain the following:   1. `Make Feature Layer` on the input feature class specified by the user to output `Output_FL`   2. `Get Count` to count the number of rows within the feature class   3. Create a variable `counter` and initialise to 0   4. Add a `While` iterator where `counter < row count`   5. `Select Layer by Attribute` on `Output_FL` to create a `NEW_SELECTION` where `OBJECTID` = `counter`   6. `Select Layer by Location` on `Output_FL` where the relationship is `ARE_IDENTICAL_TO`   7. `Select Layer by Attribute` on `Output_FL` to `REMOVE_FROM_SELECTION` where `OBJECTID` = `counter`   8. `Delete Features` from `Output_FL`   9. Increment counter I have finished all the steps except step 9. I am not sure where/how I should increment the counter. I'm also not sure if I should put a `Copy Features` tool somewhere before the `while` loop as a backup mechanism since this model will be modifying the input data, and not everyone will make a backup of their data before running the model.


title: Can I access Trimble logged positions in ArcMap10?

text: We recently walked a fence perimeter with a Trimble Ranger, auto-logging positions at 5 second intervals in a generic point file. The exported file acknowledges over 800 points, but only displays the specifically recorded points (far fewer than 800). Is it possible to access the internally logged points and convert/display them as features in Arc? My apologies if this is common knowledge, I've had no luck in over an hour of browsing forums. Thanks in advance for any help.


title: Exporting 2 shp layers to geojson using quantum GIS

text: I will explain with an example: I have 2 shp files for Tanzania. Tanzania inland waters http://www.diva-gis.org/data/wat/TZA_wat.zip Tanzania administrative boundaries http://gadm.org/data/shp/TZA_adm.zip I open both shp files (TZA_wat.shp and TZA_adm0.shp) in Quantum GIS Desktop. I want to merge the layers : TZA_wat and TZA_adm0 and export/save both layers to one geojson file. While I can do this for individual layers but not able to do this for both at once. I have written code to process geojson files but I get stuck at this step. Is there a way to first merge both these .shp files to a single .shp file and then export/save as geojson? Thanks. * * * update: Thanks to MappaGenosis, I used the Union option in QGIS and merged the two shp files (here) into one. I uploaded the file here in a zip if anyone wants to take a look. The zip has shp files and geojson file in it. input shp files : link output shp file: link


title: How to get a list of all projections that are currently available in QGIS via the PyQGIS-API

text: i'm building a QGIS-Plugin and i want the user to choose a CRS out of a combobox in which the coordinates he would enter into some textfields are represented, so these can be converted into another projection. Is it possible to get a list of all the currently available projections via the PyQGIS-API? I'm searching the QGIS-API right now, but no luck so far.


title: How to find the nearest land mark from a given longitude and latitude?

text: I have a table called `osm_places` with `place_name geometry, place_type` and many other info related to the city. My database system is PostGIS. My requirement is: Given a latitude and longitude (which may or many not be the exact lat and long stored in the database), I need to find the nearest city or place_name from the table `osm_places` with the help of the input latitude and longitude. Any help is highly appreciated. Is there a nearest neighbor implementation in php available for this or SQL to handle this?


title: QGIS not creating new profiles correctly

text: QGIS 1.8 is not creating new profiles correctly under `Documents and Settings`. QGIS support files are also missing in `My Documents` for newly created profiles. I just tried to copy the missing files from an existing working profile to a newly created profile and it was working fine. However, at my workplace, people don't have a permanent workstation to work on and can log in to any system on the network. Does anyone have any suggestions? OS: Windows XP SP3


title: Using LANDFIRE data in QGIS

text: I am wanting to use the LANDFIRE rasters in QGIS, but I cannot get all the files to load. I load the w001001.adf file in the directory that contains the data, but I cannot access the attribute table, change the style, etc. I have searched around in Google and have not found an answer. Happy to give more info!


title: Only perform Near analysis on selected rows

text: I am writing a Python script to perform a near analysis on features from two different shapefiles with common attributes. This is happening in a **Search Cursor**.   However, whenever I tried to use the **Near tool** after I selected the relevant features from each shapefile OR created new layers of only the relevant features, the Near tool performs correctly on the selected rows but fills the rest of the table NEAR_FID and NEAR_DIST rows with -1. I have double and triple checked this process out of the cursor loop and my selection code works correctly. Obviously, this means that I cannot do this iteratively as each use of the tool will overwrite the previous use with -1 values. I am currently solving this issue by using the **Generate Near Table tool** and then appending all tables together to join back to the original shapefile, but this takes a much longer time than the Near tool alone. According to the ArcGIS blog post Near By Group this tool should work in iterations. Is there something unique about the ModelBuilder iterator tools that allows this that doesn't exist in python Cursors? Here is my cursor with the Near tool:               finishList = []     arcpy.MakeFeatureLayer_management("myGDB.gdb\\lb07", "log")     arcpy.MakeFeatureLayer_management("myGDB.gdb\\vms07", "vms")     rows = arcpy.SearchCursor("myGDB.gdb\\lb07")     for row in rows:         id = row.fmc_logves_id         date = str(row.string_date)         finished = str(id) + " " + str(date)         if finished in finishList:             continue         else:             arcpy.SelectLayerByAttribute_management("log", "NEW_SELECTION", """"fmc_logves_id" = """ + str(id) + """ AND "string_date" = '""" + str(date) + """'""")             arcpy.SelectLayerByAttribute_management("vms", "NEW_SELECTION", """"fmc_ves_id" = '""" + str(id) + """' AND "string_date" = '""" + str(date) + """' AND "activity" = 1""")             arcpy.Near_analysis("vms", "log")             finishList.append(finished)     del row, rows


title: OpenLayers zoom using smaller increments

text: Currently when the zoom control + and - are pressed, the map zooms a lot for each click. How to make the zoom increments smaller for each click.


title: What reliable sources (paid or free) exist for fossil fuel infrastructure data?

text: I am trying to find GIS data for various types of petroleum and natural gas infrastructure (pipelines, refineries, gathering lines, pump stations, etc). I've found quite a few sources, mostly for-profit companies selling the data. However, without spending thousands of dollars on the data, it's hard to know what I'd be getting from any of these vendors. Most of them state the resolution of the data but I'm more concerned with the completeness of it. I've also found several government sources, which seem to offer more reliable data but the different layers I'm interested in are scattered across several agencies or just not available. So, I'm interested in data in the US in this case. The sources I've found so far include: **Paid** : Platts, MAPSearch, HTSI, Rextag **Free** : U.S. Energy Information Administration, National Pipeline Mapping System (restricted access)


title: How to get the Area of a Polygon with a known SpatialReference in arcobjects?

text: This is what I tried so far:               IGeoGraphicCoordinateSystem gcs= _spatialReferenceFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984);      ISpatialReference standardRef = gcs as ISpatialRef;      double GcsConversionFactor = gcs.CoordinateUnit.ConversionFactor;                void myFunc(IPolygon poly)     {     poly.Project(standardRef);      IArea area = poly as IArea.      double areaCoords = area.Area ;           double AreaKM = areaCoords * (GcsConversionFactor * GcsConversionFactor ); //this is giving me nonsense answers          }


title: Finding points close together

text: I am using ArcGIS desktop. I want to run a tool to find all points that are close to each other within a specific distance. What is the fastest and best tool to use? I am using the standard arcgis with the Spatial Analyst extension.


title: MySQL Query to fetch all cities and POI's near the route

text: I'm implementing alghorithm to search POI near the route (array of Lat, Long points). My problem is that I don't know how to calculate distance beetween line segment and POI. Look at picture that I attached. Can somebody give me some formula for fast calculation this distance? Notes: Using PHP and MySQL with Spatial Extension. Look at picture               Assumptions:     - I have database of POI with lat, long -      - I have array of points (lat, long) in correct (drive) order - route     - The calculations will be made on max 20 km area so flat surface assumption is ok.     - The POI must be returned in order that the driver will be passing the route.      Any ideas?


title: How to generate colorful images using GDAL?

text: I am using `gdal_translate -of JPEG -scale -co worldfile=yes ndvi.tiff output.jpg` command to convert tiff images to jpg and resize it. But it generates only black and white images. How can I generate colorful images when converting from tiff to jpg/jpeg?


title: How to delineate Watershed from DEM in python?

text: My question is that without help of arcpy how can I delineate watersheds from DEM? If anyone help me upto catchment delineation it will be very helpful to me


title: How to "Apply Edits" to an ArcGIS Server edit session using Python

text: ArcGIS Server allows the user to apply edits in an editable layer. Eg the sample layer at http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/FeatureServer/3/applyEdits will accept a JSON input response such as `[{'attributes': {'distance':1234}}]` Assuming that I have a JSON object in Python, how can I send this object to ArcGIS Server? ie, what is the Python syntax for Apply Edits? I presume it's something along the lines of `urllib2.urlopen(<endpoint>, <JSON>)` but I can't figure out the exact syntax.


title: How to save all Layers in ArcMap table of contents

text: Basically, I'm bringing layers into arcmap,repairing the data sourc, and then saving out the layers manually so that the new source is saved. This is very time consuming because I have several hundred layers. Repairing the data sources is fairly easy but saving each layer to disk is timely. I have also been overwriting the previous layer file to keep the name the same. Lastly, the alias name does not match the layer name, so I can't use lyr.saveACopy because that uses the alias name. I've tried:               import arcpy     mxd = arcpy.mapping.MapDocument("CURRENT")         for lyr in arcpy.mapping.ListLayers(mxd):         lyr.save()      but no luck...


title: How to visualize this country data in Qgis?

text: I have a csv table, with data in this format: "name","country". Country code is in the same format as the world map SHP file attribute table (both are in the ISO standard). I learned how to join the tables together, but I want to colorize countries based on how many people are from each country. Example:   * "john","LVA"    * "peter","OMN"    * "martin","PRI"    * "janis","LVA" In this case Latvia should be darker than the two other countries (because two people are from LVA). I know how to colorize things based on a number that's bigger than other numbers, but how to achieve it without the numbers in the table? I only have raw list of names. Is this possible with Qgis only?


title: Please help extending com.esri.ags.symbols.LineSymbol for flex-API

text: I want to create an extended line symbol so that I had more control over it to draw line and other shapes in it. I can accomplish it by extending it. I was very pleased to see the example to extend com.esri.ags.symbols.Symbol provided by Mansour Raad at his blog http://thunderheadxpler.blogspot.com/2009/02/ground-overlays-on-maps.html. The code can be accessed here http://thunderhead.esri.com/readonlyurl/OverlayEditor.zip. I want to extend the lineSymbol, If anyone got any example or any clue. Any help would be highly appreciated.


title: OpenLayers with my own OSM data server

text:
I've gone through the process of setting up my own OSM database / tile server by setting up PostGIS, importing the Planet.osm data snapshot (took a few days), and setup Mapnik / cascadenik, etc. I can manually render my own sample tiles with `generate_image.py` and I can manually produce tilesets with `generate_tiles.py`. I've spend a decent amount of time generating my own custom style template using cascadenik and generated tiles from it, which I'm quite happy with. My new issue is setting up a sample slippy map with OpenLayers to run on the same server... I've got it somewhat configured and working; setup Apache, mod_python, TileCache, etc. It renders tiles into the slippy map, but I think I've got the parameters all screwed up in OpenLayers. Here's what I've got currently (which renders what looks like empty ocean at all zoom levels):

                I feel that something's wrong with the layer options parameters, but I can't find good documentation describing the standard parameters to be used for displaying general OSM tiles rendered by Mapnik... Is there something obvious that I'm missing that would cause this problem? Here's all I have in the tilecache.cfg, too:               [cache]     type=Disk     base=/tmp/tilecache     [osm]     type=Mapnik     spherical_mercator=true     mapfile=/home/user/mapfile.xml


title: How to use UUID Generator in Qgis 2

text: I try to generate a UUID (edit widget) for a vector shapefile in qgis 2 but the field value is always NULL. Does the field requirea specific datatype? I used integer. In the manual I found the info "what uuid-generator is" but not how to use it. Thanks for any help, Patrick


title: How to Find the Nearest Node from a Given Coordinate

text: I have already developed a table manually. It contains the coordinates and the distance of all the nodes, there is no geom field or any field related to postgis. But I want to find out the nearest nodes to a given coordinates. Is this possible, or is there any other way to find out? Kindly help me so that I can proceed further. Thanks.


title: SelectLayerByLocation not Selecting

text: I have been trying for some time now to create a script to extract the polygons within an extent, but am unable to get the same result as when I use the user interface manual method. Maybe someone can see the fault of my script, I have stripped it down to the minimum for simplicity.               import arcpy          layer = arcpy.GetParameterAsText(0)     top = arcpy.GetParameterAsText(1)     left = arcpy.GetParameterAsText(2)     bottom = arcpy.GetParameterAsText(3)     right = arcpy.GetParameterAsText(4)     outputFeature = arcpy.GetParameterAsText(5)          # Determine if Layer is a Layer     desc = arcpy.Describe(layer)     if hasattr(desc, "layer"):          lyr = layer          arcpy.AddMessage('Parameter was layer: {0}'.format(lyr))     else:          lyr = arcpy.MakeFeatureLayer_management(layer,"in_memory\\source_layer")          arcpy.AddMessage('Parameter made to layer: {0}'.format(lyr))          sr = arcpy.CreateSpatialReference_management("",lyr,"","","","")          lowerLeft = arcpy.Point(left,bottom)     upperLeft = arcpy.Point(left,top)     upperRight = arcpy.Point(right,top)     lowerRight = arcpy.Point(right,bottom)          a = arcpy.Array([lowerLeft,lowerRight,upperRight,upperLeft,lowerLeft])     thepoly = arcpy.Polygon(a,sr)          arcpy.AddMessage('Selecting form lyr by polygon: {0}'.format(thepoly))     selection = arcpy.SelectLayerByLocation_management(lyr, "WITHIN", thepoly, "", "NEW_SELECTION")          matchcount = int(arcpy.GetCount_management(selection).getOutput(0))      if matchcount == 0:         arcpy.AddMessage('no features matched spatial and attribute criteria')     else:         if matchcount < 1000:             arcpy.CopyFeatures_management(selection, outputFeature)             arcpy.AddMessage('{0} objects that matched criteria written to {1}'.format(matchcount, outputFeature))      Thanks for your help. Follow on after some responses Thank you for your answer, and I would have expected you to be correct. However what ever I try (and I've tried lots of different combinations) I don't get the desired results. Unless I use the GUI interface to SelectByLocation ![Screen shot of GUI, just to clarify](http://i.stack.imgur.com/5XoBU.jpg) The selected features produced by the GUI interface is exactly what I would expect. I've change the code a bit to output thepoly as feature class (BoundingAOI) so I could check that input parameters where correctly used.               import arcpy          try:              layer = arcpy.GetParameterAsText(0)         top = arcpy.GetParameter(1)         left = arcpy.GetParameter(2)         bottom = arcpy.GetParameter(3)         right = arcpy.GetParameter(4)         outputFeature = arcpy.GetParameterAsText(5)              # Determine if Layer is a Layer         desc = arcpy.Describe(layer)         if hasattr(desc, "layer"):              lyr = layer              arcpy.AddMessage('Parameter was layer: {0}'.format(lyr))         else:              lyr = arcpy.MakeFeatureLayer_management(layer,"in_memory\\source_layer")              arcpy.AddMessage('Parameter made to layer: {0}'.format(lyr))              sr = arcpy.CreateSpatialReference_management("",lyr,"","","","")              lowerLeft = arcpy.Point(left,bottom)         upperLeft = arcpy.Point(left,top)         upperRight = arcpy.Point(right,top)         lowerRight = arcpy.Point(right,bottom)              a = arcpy.Array([lowerLeft,lowerRight,upperRight,upperLeft,lowerLeft])         thepoly = arcpy.Polygon(a)              outFeatureClass = arcpy.CreateFeatureclass_management(arcpy.env.workspace, "BoundingAOI", "Polygon", "#","#","#", sr)         arcpy.AddMessage('Created {0}'.format(outFeatureClass))         cur = arcpy.da.InsertCursor(outFeatureClass, ["SHAPE@"])         cur.insertRow([thepoly])              arcpy.AddMessage('Selecting form lyr by polygon: {0}'.format(thepoly))         selection = arcpy.SelectLayerByLocation_management(lyr, "COMPLETELY_WITHIN", outFeatureClass, "", "NEW_SELECTION")              matchcount = int(arcpy.GetCount_management(selection).getOutput(0))          if matchcount == 0:             arcpy.AddMessage('no features matched spatial and attribute criteria')         else:             if matchcount < 1000:                 arcpy.CopyFeatures_management(selection, outputFeature)                 arcpy.AddMessage('{0} objects that matched criteria written to {1}'.format(matchcount, outputFeature))          except Exception, e:         import traceback         map(arcpy.AddError, traceback.format_exc().split("\n"))         arcpy.AddError(str(e))      I have to admit that I'm new to ArcGIS and Python (background in Fortran, C, perl and C#), so thank you for the exception handling hint. Is there any way of step-by-step debuging arcpy scripts? Thanks again for your responce. **Edit:** Thanks for all the comments and suggestions, so far:-   * Have applied service pack 1 to ArcGIS 10.1, so am now running 10.1sp1   * Got PyScripter running and able to debug from ArcMap (did need to copy the contents of the rpyc.zip file from the PyScripter install to a rpyc directory under ArcGIS installation of Python C:\Python27\ArcGIS10.1\lib\site-packages\rpyc on my system), this maybe of use to someone   * Cast the double input parameters as double as suggested   * No errors from the script   * Below is a screen shot of the script GUI as requested ![result pane and script GUI](http://i.stack.imgur.com/AGAkM.jpg) My input parameters are (on the comand line) > "D:\Current\PaddockGRASP VS2012\PaddockGRASP Rev > 1\PaddockGRASP.gdb\QLD_CADASTRE_DCDB_20" -18.933367 145.278049 -19.735903 > 146.119615 "D:\Current\PaddockGRASP VS2012\PaddockGRASP Rev > 1\PaddockGRASP.gdb\OutputFeatures" **Edit:** It appears after all this that the input dataset had some sort of corruption (ArcSDE can't find anything wrong, not sure why or what is actually wrong), found another older version of the dataset and the problem went away. Frustrating, educational, and hopefully useful to someone else too. Thanks to everyone for the help.


title: GeoServer Roles and Job Description

text: Sorry if my question is a little bit weird. I want to give all my team members a job title but I am not sure what to give the ones who are dealing with GeoServer and he is a web developer at the same time. Also where can I find a description of GeoServer admin role?


title: Where is the Angle Measure Tool in ArcMap 10?

text: I can't seem to find it.


title: Intersection of drawn polygon with WMS layer features. Better of two methods?

text: Scenario: Several WMS layers with polygon features. Objective: Draw a polygon with OpenLayers and allow it only if doesn't not cut any features in WMS layer. It can contain the features as a whole though. Possible solutions: 1) Send drawn geometry server side via AJAX and return a validation response.               select count(id) FROM wms_layer_1_table,         where ST_Intersects(<drawn geom>,the_geom)         and ST_Contains(<drawn geom>,the_geom)=false;      if above count is zero then the drawn polygon is valid. 2) I intend to send geometries of all WMS features as text(ie,. POLYGON((x y,x1 y1)) etc) to the client side when the application loads in the browser and on addition of new ones. With this in mind, I would like to know if and how I could validate the drawn polygon with these geometries just with OpenLayers/Javascript alone? Thanks.


title: Why are color settings are not saved when exporting to a new file?

text: I extracted with QGIS a municipality from a state map, then divided it with a grid. I don't want the borders of the grid features to be seen so I changed the color of the map and the color of the borders to be the same, then I saved it as a new file (not a new project). Does anyone know why when I open it again it does not save the changes? (the divisions of the grid are visible and the color settings I saved are gone). Best.


title: How to get list of selected features in ArcGIS for Desktop using Python code?

text: I have a question regarding selections in ArcGIS for Desktop. Assumed I have one layer in ArcMap and I have selected two of five features. Is it possible to get a list of all selected features by using Python? It would be fine if there is a way to get one special (or all) attribute(s) of the selected features stored in a list that can be written into a txt file. Is it possible to do this in ArcGIS for Desktop?


title: Normalize raster values to 0-255

text: I need to normalize the values attained from a band ratio to 0-255. I'm using QGIS. How do I do this? Any ideas?


title: How to use OpenLayers OSM-Layer with degrees instead of meters?

text: I have an OSM-Layer as a base layer. When I create a vector I have to define the coordinates in meter.   Is there a way to use degrees right a way without reprojecting them beforehand to meters? var p0 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(13.39, 52.5));


title: ArcMap 10: How do I escape certain characters when labeling?

text: I am labeling certain Oil & Gas areas by Operator in ArcMap 10, using this expression: "" & [OPERATOR] & "" & vbNewline & "" & [UNIT_NAME] & "" ![enter image description here](http://i.stack.imgur.com/lSjCO.png) The only problem is that when the operator includes an ampersand (&), the label messes up because it's reading it as part of the expression, and ends up looking like it does in the screenshot below. I know that in PHP (from my experience programming unrelated to GIS), there is a way to escape certain characters, but I haven't been able to find it in VBScript. Screenshot: http://i.stack.imgur.com/gdKxB.png


title: Querytask/query - executed select

text: Is there a way to get to the query condition, which is executed under the querytask ? I have an example, which is actually a copy of this ArcGIS example http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/fl_popup.html, but like my other examples, I can't get it working with my examples. There is something like this:                   dojo.connect(map,"onClick",function(evt){           var query = new esri.tasks.Query();           query.geometry = pointToExtent(map,evt.mapPoint,10);           var deferred = featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);           map.infoWindow.setFeatures([deferred]);           map.infoWindow.show(evt.mapPoint);         });              var template = new esri.InfoTemplate();         template.setContent(getTextContent);              var featureLayer = new esri.layers.FeatureLayer("http://servicesbeta.esri.com/arcgis/rest/services/SanFrancisco/SFStreetTreesRendered/MapServer/0",{           mode: esri.layers.FeatureLayer.MODE_SELECTION,           outFields: ["*"],           infoTemplate:template         });              map.addLayer(featureLayer);           function pointToExtent(map, point, toleranceInPixel) {        var pixelWidth = map.extent.getWidth() / map.width;        var toleraceInMapCoords = toleranceInPixel * pixelWidth;        return new esri.geometry.Extent( point.x - toleraceInMapCoords,                     point.y - toleraceInMapCoords,                     point.x + toleraceInMapCoords,                     point.y + toleraceInMapCoords,                     map.spatialReference );                                  }      If I'm reading the code correctly, then when I click the map, it gets the coordinates (query.geometry) of the clicked map part (in my case is it a region), which should get highlighted by a line and then a popup should show with whatever info I got from the query. But all I get is the default message "No information available". When I tried to change the where condition for the query by myself like this:               query.where = "Chripka.CISOKRES = 503 AND Chripka.STARTAGE = 6 AND Chripka.RANGEAGE = 8 AND Chripka.PERIODSTART >= date '10/13/2006' AND Chripka.PERIODSTART < date '10/20/2006'";      it did the job, because the query returned only one record, but that's the catch, I never know which region is selected, so this condition (Chripka.CISOKRES = 503) is unknown for me. So I tried this condition               query.where = "Chripka.STARTAGE = 6 AND Chripka.RANGEAGE = 8 AND Chripka.PERIODSTART >= date '10/13/2006' AND Chripka.PERIODSTART < date '10/20/2006'";      instead, but the query returns more than 30 records, nothing gets highlighted and the popup ends with "No information available". So I thought, that maybe I could look into the query condition which is used for the data retrieval. Is it possible ? One thing to mention is, that my web service is running on a very slow server with no possibility to get a better one. I have to wait for 4 seconds, till I get the result, when a timeSlider changes its TimeExtent. I'm using IE9 and there's no way that I can change it for another web browser, because our customer is using IE9. Thank you g P.S.Actually, the same question goes to TimeSlider. Is there a way to see, what query is executed behind the TimeSlider when its TimeExtent changes ?


title: Problems printing OpenLayers Pluggin Maps To Scale

text: It the print composer I can print all maps to scale and satisfactory. However, when I add the OpenLayer, usually Bing Aerial, to the project I cannot print it out to scale. I click the scale box, set it to the relevant scale, The image below is a section of the actual size with OS mapping: ![enter image description here](http://i.stack.imgur.com/QnKqq.jpg) The next image is with the OpenLayers. ![enter image description here](http://i.stack.imgur.com/pew3j.jpg) Both images cropped to remove client info. It is almost double the size but inbetween scales. Is there anyway to correct this. Using Windows 7, QGIS 1.8.0.


title: How to keep specified separation distance between features in printout from ArcMap?

text: Does anyone have a solution to select features using attribute values and print only the selection keeping a specified separation distance between the features in the printout in ArcMap.


title: Display mouse position from graph on a map

text: i need to develop a web application which shows a map, that displays a GPS Route. So far I can do this using Openlayers or ArcGIS Server. Now I want to add an interactive graph below the map. In this graph I want to display for example "Speed" and on mouse-over on the Graph the corresponding location in the map should be displayed. Does anyone know an existing library or can give me recommendations on which architecture to use? Or do I need to programm this thing from the ground up on my own? Thanks!


title: Splitting landcover polygons (parcels) into equal sizes, while retaining road access for all?

text: I would like to split landcover polygons which surround a road polygon into equal sizes, while ALL resulting polygons should have access to the road! Is there any chance to do this automatically? All programs, licenses etc. are welcome. I just don't have ANY idea how to solve this problem. To make it more clear, I have attached a basic sketch. ![enter image description here](http://i.stack.imgur.com/SXBf2.jpg)


title: Alternatives to pgRouting

text: I was wondering if there are any alternatives to pgRouting tools. Thinking about it for a bit, I think the only alternative is to use R or RPY to do the analysis. Basically I'm trying to solve routing problems based on nonPostGIS databases. As most of my data is actually stored in a different format; however, it's not to hard to convert. I'm finding that pgRouting to my dumb silly brain is difficult to implement. So perhaps a non-database solution that I can easily tweak would be ideal for me


title: Is it possible to define the field displayed on the Identify window in ArcMap?

text: I have a series of layers that are linked through relationship classes. When the user clicks on a watershed (HUC = Hyrdologic Unit Code) with the identify tool a list of species and impaired rivers/streams is brought up. ![enter image description here](http://i.stack.imgur.com/GhMrN.png) The problem is the field that ArcMap decided to show for the impaired river/stream is not helpful at all in this context (some permanent ID). I'd like it to show the actual impairment as defined by the Clean Water Act 303(d) dataset, which is in this same table. **Is there a way to define the field that ArcMap displays in the identify box??**


title: ArcGIS for WPF: LayerCanvas.ArrangeOverride Setting Invalid FrameworkElement Size

text: I'm reposting this here from ESRI's ArcGIS for WPF Forum in hopes of getting some more exposure. Original post is **here**. I'm intermittently experiencing an error when rapidly changing map scales on an ArcGIS WPF Map Control (v. 10.1.1) (i.e. from very large to very small, or vice-versa) wherein my application will crash. It appears that the LayerCanvas.ArrangeOverride is, for some reason, attempting to set an invalid Width property on the FrameworkElement's dependency property. Based on this **link** , it appears that the issue was carried over from the Silverlight API. Has anyone else encountered this problem and been able to work around it? The following is a snippet of the stack trace with the offending method:               System.ArgumentException: '-907.750834278924' is not a valid value for property 'Width'.        at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)        at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)        at System.Windows.FrameworkElement.set_Width(Double value)        at ESRI.ArcGIS.Client.LayerCanvas.ArrangeOverride(Size finalSize)        at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)        at System.Windows.UIElement.Arrange(Rect finalRect)        at System.Windows.ContextLayoutManager.UpdateLayout()        at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)        at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()        at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()        at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)        at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)        at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)


title: Finding list of bus stops and what is next

text: First of all apilogies if this is already discussed. I am a low vision person and there is only so much time I can spend searching for information as it is stressful on the eyes. I spent considerable amount of time before posting here. As I stopped driving and started taking public transit, I am feeling the need for an app that is customized for my needs. While on the bus, it is hard to either look out and find where I am and if the bus does announce the next intersection, it is most of the times, impossible to hear. So, what I need is an app that tells me what is the next stop as the bus travels along the route. It would also be helpful if it announced the next intersection/street. This would help me in figuring out when to pull the cord to request a stop. What sdk/api would help in this? I am looking at google maps api or anything that I can use to integrate with the app on iphone. Given that this is for a low vision person, the visual map is less important. What I plan to do is, use the info that I get from the maps and feed it to the iOS accessibility framework to convert to voice. Any help and pointers will be greatly appreciated.


title: Leaflet geoserver wms doesn't show on google map base layer

text: I have a site running Openlayers (base layer google and overlay wms in epsg4326 from geoserver). The site works fine. I've decided to try doing the same with leaflet , and from some reason I can't make the WMS layer show on google. This is the code I used :               var googleLayer = new L.Google('ROADMAP');          coords = L.tileLayer.wms("http://localhost:8080/Coords/wms", {         layers: 'Test:Coords',         format: 'image/png',         transparent: true             });          var baseLayers = {         "Google": googleLayer             };          var overlays = {         "Coords": coords     };          map = new L.Map('map2d', {         center: new L.LatLng(32.05522664582287, 35.05812072269409),         zoom: 9,                 layers: [googleLayer, coords],         zoomControl: true     });          L.control.layers(baseLayers, overlays).addTo(map);      The layer does appear on the layer switcher , but the image doesn't show on the map. _**_* UPDATE _*_ **** I've tried force declaring the layer in geoserver as EPSG3857 and still with no luck.


title: How to classify shapefile data into groups?

text: I have a map with a shp file containing information on land use. The attribute table has over 10,000 rows. I need to classify this information into 6 groups to represent 6 colors on my map. I know you can re classify by adding on a new column on the attribute table and put each row into the 6 groups, however this would take years to do 10,00 rows. Is there a quicker way to do this? Many thanks all


title: Is there a way to show a layers feature count in the TOC?

text: I'm using ArcGIS 10. In ArcMap's table of contents (TOC), is there a way to have the "Layer Name" automatically show a count of the total number of features in each layer? I was thinking the TOC would look something like this:   * Roads (27)   * Streams (100)   * Parcels (12) I found this option for Unique Value renders, but:   1. I am not an ArcObjects guy, and   2. I want to work with just the _Single Value_ renderer. The "List By Selection" tab sort of has this capability, but only when there are selected features.


title: How to specify the version of output SQLite database in ogr2ogr?

text: I'm having issues with a .sqlite database that I generate from PostGIS using ogr2ogr. The data appears to export into SQLite properly, and it loads in TileMill fine, but when I try to add any of the layers in QGIS it tells me:               Invalid layer. <layer name> is an invalid layer and cannot be loaded.      I was thinking that maybe my version of QGIS is running a slightly older version of SpatiaLite, so I decided to try exporting the data to a different version of SpatiaLite database. Is this an option in ogr2ogr?


title: overlay county shapefiles for 2 different years

text: I have county-level shapefile for South Caroline in 1880 and one for 1940. I would like to overlay these two files so that they do the union and indicate the percentage of the land in 1880 that went to form counties in 1940. For example, McCormick county formed in 1914. Thus, it only appears in the 1940 shapefile. It formed from Edgefield and Greenwood. I want to know the percent of the land from Edgefield and Greenwood that went into forming McCormick. For example, is it 20%, 26.4 percent or some other percent of Edgefield County land that was lost to form McCormick? I think I should be using overlay, and then within overlay using union. However, I do not know how to pick the tolerance. How does that work? In addition, I cannot at all interpret the results. I cannot understand the columns being added and what they mean. I am using ArcMap 10.1 within ArcGis. Thank you very much for any help that you can provide.


title: Problem with deploying addin

text: I have made a Button addin for ArcMap in Visual Studia 2010, but I don't know how to deploy it, I tried debugging it from ArcMap but nothing happens, Any help Please.. Thanks in advance....


title: How to create a 500m Regular Grid for KML input area?

text: I am hoping to create a point grid over the city of Edmonton. My workflow is:   1. Import a KML of Edmonton neighborhoods from here   2. Save the layer as a SHP   3. Delete the layer and load the SHP   4. Define the layer and project CRS as NAD 83 (HARN)   5. Use the Vector > Research Tool > Regular Points tool to generate a grid of points over the geometry with a spacing of 500m.   6. Save the output and load into the project.   7. The output is a single point to the NW of the neighbourhood polygons. I have been around this several time and am at a loss. Thank you!


title: ( how to use Field Calculator to count number of duplicated recordes at another field?

text: How To Use the Field Calculator python script to count the number of duplicated records of a field "A" and get the count at another field "B"


title: How to find unique values of an attribute with python in qgis?

text: i look for solution to get the unique values of an attribute of a vector layer. what is the best way in python qgis to get the unique values of one distinct attribute? I work with qgis 1.8.0.


title: OpenLayers: WMS layer above select-controlled vector layer?

text: Is it possible to display an image layer (WMS or Image) above a vector layer with activated SelectFeature control in OpenLayers? The image layer (radar returns) contains only sparse, semi-transparent regions and doesn't significantly obscure the underlying vector layer, whose features I would like to be able to select. It seems reasonable to expect this behaviour from the map. However, as soon as the OpenLayers.Control.SelectFeature control for the vector layer is activated, the vector layer is moved to the top of the map, placing it above the image layer. Calls to map.setLayerIndex() have no effect. Among many attempts to fix this, I was able to prevent it from occurring by omitting the moveLayerToTop() function in the OpenLayers code, as suggested here: http://stackoverflow.com/questions/4728852/forcing-an-openlayers-markers- layer-to-draw-on-top-and-having-selectable-layers Although the image layer now appears above the vector layer, the OpenLayers.Control.SelectFeature no longer functions whenever the image layer is set to visible. The image layer appears to be blocking mouse events to the control, although the map itself responds normally. I tried setting the image layer's events.fallThrough to true but it had no effect. I also (in desperation) set the layer's pointer-events to none; again, to no effect. I saw this thread: OpenLayers how to maintain layer ordering while using SelectFeature control and was led to the featureclick.js extension: https://github.com/openlayers/openlayers/pull/174 I'll likely give that a try next, but am wondering if I've missed something obvious in standard OpenLayers. I haven't found any other solutions posted on the web. Thanks for any suggestions!


title: ArcMap MXD Broken

text: I have an MXD that I put a lot of time and work into for cartographic purposes which unexpectedly stopped working after a reboot, and I really, really don't want to have to recreate it again from scratch if I don't have to. Chain of events and error message below... All was fine with this MXD up until yesterday. I had started setting up the layers to display the way I want, setting up the map layout, legend, symbol levels, etc. The issue started after I added a few shapefiles from a server. The specific files and server in question, I use on a fairly regular basis and have never had issues with. The map started drawing, saving, editing, panning, etc all very slowly. I removed those recently added shapefiles, saved my work, closed everything and rebooted. Now I get this error every time I try to open the MXD: ![ArcMap Error](http://i.stack.imgur.com/X1iZd.png) I tried a couple different options I found by googling, including resetting the application profile, to no avail. I ran the MXD repair tool, and it found nothing corrupt, but I used it to copy my settings and layers to a new MXD anyway, which also returns the same error. Other map documents open and work just fine. I'm at a loss.


title: How to select a part of a land cover type a certain amount of feet away from another land cover type

text: I have raster Landcover type Urban combined with Forest all within the county raster perimeter. I want to make a layer of only the forest cells that are more than 500 feet from an urban cell, so that all forest cells that share space with urban less than 500 ft are removed.I suppose I need to create a grid of distance from urban land, but I don't know how to input "from" into a raster calculator operation. ![Euclidean distance of urban features](http://i.stack.imgur.com/oQPZF.jpg) ![combine of urban and forest/shrub features](http://i.stack.imgur.com/iQbSo.jpg) I want the forest/shrub that is more than 500 feet from urban land


title: Refresh map after removing marker from array

text: I have a map an arrays of markers. This code:               function RemoveRedMarker(siteID) {                      for (var x in arrRedMarkers) {                      if (arrRedMarkers[x].SiteID == siteID) {                         markers.removeMarker(arrRedMarkers[x]);                         arrRedMarkers.splice(x, 1);                         return;                     }                 }             }      will remove the required marker from the array, I can check this in Firebug, however the map doesn't refresh to reflect the removed marker. How do I update the map? Thanks


title: Is it possible to convert regular JSON to GeoJSON?

text: My apologies if this is a repeat question, I searched here and couldn't find an answer. I have JSON data I've exported from Openpaths.cc which contains lat and lon values. However, the data is not in GeoJSON format so can't be read by OGR2OGR. Could anyone point me in the right direction on how to convert my data to GeoJSON? I'd ultimately like to display it with Leaflet. Here is what the data looks like:               [     {         "lon": -73.97,          "device": "iPhone3,3",          "version": "1.1",          "t": 1381167616,          "lat": 40.66,          "alt": 67,          "os": "6.1.3"     },      {         "lon": -73.96,          "device": "iPhone3,3",          "version": "1.1",          "t": 1381171200,          "lat": 40.66,          "alt": 45,          "os": "6.1.3"     }       ]


title: Using Like on Join Field

text: Ok, so this has probably been asked by someone else out there somewhere but I can't find it via google or this stack, so... I've got two tables from an SDE database (SQLServer Express 2008 r2) that are joined. Now I'm trying to write a SQL Select by Attribute statement that tests if string from one table is like string from another table. What I tried looks something like this:               "Database1.DBO.RoadsFC.Field1" LIKE '%Database1.DBO.RoadsAnnotation.TextString%'      I've tried various other combinations such as '%'+Database1.DBO.RoadsAnnotation.TextString+'%' but nothing I've tried has validated or run correctly (when it does work it's reading Database1.DBO.RoadsAnnotation.TextString as the string to test against, not the value of that field to test against). Again, sorry if this's been asked, but I couldn't find it.


title: Q: cursor memory and fields therein

text: Theoretical Python question. Say you have an update cursor while-loop for a few selected records. While looping through the rows, at some point a nested if statement triggers an "addfield" event. The rows are meant to continue to loop as normal. Is it the case that a newly added field for a feature class is not selected in the feature layer and therefore omitted in the update cursor? Can you run addfield on a feature selection layer rather than feature class to resolve this issue, i.e. gp.addfield("featlyr", name, "TEXT") where featlyr is gp.MakeFeatureLayer("somefc", "featlyr"); gp.SelectLayerByAttribute("featlyr", etc); cursor = gp.UpdateCursor("featlyr").


title: License issues of Google Elevation API usage

text: I would like to use Google Elevation API in a non-profit scientific research (river floodplain relief study). I have looked through the documentation, but my poor English leaves me no chances to understand if I am allowed to do this. I just want to:   1. Parse Google DEM using Google Elevation API;   2. Store the received data locally in shp for future processing; Received **data will not be displayed** anyway: I am going to use it only for the calculation of specific relief parameters. I will appreciate for any clarification of this question, especially from Google employees :)