title: How can I use geoserver's vendor specific parameters in openlayers?

text: I want to rotate my map in openlayers. When I set an "angle" as an url option in geoserver openlayers preview, the map is rotated, but I can't seem to find the correct place in my openlayers html-file. http://docs.geoserver.org/latest/en/user/services/wms/vendor.html


title: Import Error in Postgis: AddGeometryColumn does not exist

text: Importing with configuration: ind_adm2, public, geom, C:\Program Files\OpenGeo\OpenGeo Suite\webapps\geoserver\india map\IND_adm2, mode=c, dump=1, simple=0, geography=0, index=1, shape=1, srid=0     Shapefile type: Polygon     PostGIS type: MULTIPOLYGON[2]     Failed SQL begins: "SET CLIENT_ENCODING TO UTF8;     SET STANDARD_CONFORMING_STRINGS TO ON;     BEGIN;     CREATE TABLE "public"."ind_adm2" (gid serial,     "id_0" int4,     "iso" varchar(3),     "name_0" varchar(75),     "id_1" int4,     "name_1" varchar(75),     "id_2" int4,     "name_2" varchar(75),     "nl_name_2""     Failed in pgui_exec(): ERROR:  function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist     LINE 17: SELECT AddGeometryColumn('public','ind_adm2','geom','0','MUL...                     ^     HINT:  No function matches the given name and argument types. You might need to add explicit type casts.          Shapefile import failed.


title: ST_DWithin uses Geometry or Geography type

text: assuming I use the following query to match the locations to a poi within 10km distance:               SELECT     poi.poi_id,     h.loc_id,     (ST_Distance(poi.geom,h.geom)*111.111) as distanceinkm     FROM iut_poi_transl AS poi, hrs_loc as h     WHERE poi.poigr_id != 30 AND ST_DWithin(poi.geom,h.geom,0.09)      Data is SRID 4326. First question: Does it use the geometry or the geography type? Second question: If uses geometry how do I have to change the query to get use geography type? Thanks a lot for your help. CH


title: Access attributes of a deleted IFeature in ArcObjects 10.1

text: I am migrating code for an ArcGIS extension from 9.3 to 10.1. The code is throwing an exception in one place. My duty is just to migrate it to 10.1, so I really don't like to do any modification more than few lines of code. The code is searching for a feature that was deleted by the user on a child version, but 1 - it is not posted yet to the default version 2 - The edit session is still open and not saved. so before the save it is trying to validate some business rules.               IFeatureWorkspace childWorkspace = (IFeatureWorkspace)childVersion;     IFeatureClass childOperationalUnit = childWorkspace.OpenFeatureClass("OperationUnit");     IFeature childFeature = childOperationalUnit.GetFeature(Id_Of_Deleted_Feature);     if (childFeature != null)     {      string operationName = childFeature.get_value(Index_Of_Name_Column);           if (operationName == "somevalue")     ......     }      So, the code is trying to access the attributes of a deleted feature. The code was working on 9.3 But on 10.1 is not working and giving me the error: System.Runtime.InteropServices.COMException (0x8004100C): The feature is deleted The error happening on the line where we try to get the attributes of the feature with get_value so, 10.1 can find the feature but cannot access its attributes. is there any easy way to keep the code working without really modifying lots of code?


title: Should Identify Tool be used in a Web application?

text: I was told having a Identify Tool is a bad practice in most web applications. Can anyone explain why or point me to a resource that explains why having a Identify Tool is considered bad design in a web application? If every feature you click on brings up a pop-up that could probably get annoying as well. Seems like an identify tool could help prevent these potentially annoying pop- ups.


title: ArcGIS 10.1 Changing default Data Frame Order

text: **The background** : I have an .mxd that I intend to roll out across the company as our default template for all future maps/figure production. This .mxd contains two Data Frames; the first ("Main") is larger (occupying almost the entire page) and is designed to be used to hold the majority of mapped data whilst the second ("Inset") is much smaller and is to be used as an overview map. **The problem** : When choosing to import this new .mxd to an existing .mxd (using the Change Layout button on the Layout toolbar) the wizard automatically selects the smaller ("Inset") Data Frame to occupy the larger part of the page. The screenshot below shows this interface with a red box indicating the two possible locations of each Data Frame: ![enter image description here](http://i.stack.imgur.com/baBRr.png) **The question** : Whilst it is possible to manually alter the order of the Data Frames using the _Move Up_ or _Move Down_ buttons I would like to know how to change the default option for this setting (i.e. so that the "Main" Data Frame always appears in the larger space - "2"). The reasoning is that I would like the process of using this new .mxd template to be as simple as possible, this is especially important as we have a wide range of users with varying abilities. Does anyone know how to choose/change this default setting? It does not appear to be in the Data Frame Properties > Data Frame menu where I would expect it to be.


title: How to write vector layer to csv file with geometry by PYTHON?

text: I use **Python** try to write vector layer file to csv file with this code               QgsVectorFileWriter.writeAsVectorFormat(mylayer, r'c:\temp\xyz.csv', "utf-8", None, "CSV")      It can export to xyz.csv but only attribute show in csv not geometry column. How can I export both attribute and spatial data into csv file. Thanks.


title: geojson -> topojson : no output

text: Trying to convert my geoJSON file into topoJSON so   * I downloaded `topojson` from `npm` and    * followed the instructions on gis.stackexchange Convert GeoJSON to TopoJSON   * basically the same as the topoJSON GitHub page However, I got an error message:               > topojson -o prTopo.json prCounties.json     quantization: bounds NaN NaN NaN NaN (spherical)     quantization: maximum error 0.00m (0.00°)     prune: retained 0 / 0 arcs (NaN%)      The original output I have is all the municipalities of Puerto Rico which I collected on GitHub (Municipios). Here is an abridged version:               {"type": "FeatureCollection",      "properties": {"kind": "state", "state": "PR"},      "features": [[         {"geometry": {              "type": "MultiPolygon",              "coordinates": [[[[-65.4406, 18.1541], [-65.2763, 18.1322], [-65.4515, 18.0884], [-65.5775, 18.1048]]]]},              "type": "Feature", "properties": {"kind": "county", "name": "Vieques", "state": "PR"}}]]     }      The output I got was               {"type":"Topology",     "transform":{"scale":[null,null],"translate":[null,null]},     "objects":{"prCounties":{"type":null,"properties":{"kind":"state","state":"PR"}}},     "arcs":[]}      I don't really understand the geoJSON or topoJSON specs, but it looks like the `transform` data comes out null and the `arc` data is null is empty.


title: Reverse Geocode for Android

text: I am new to arcgis for android. I practice using Geocode and reverse geocode. I use sample Place Search from Esri, but i also want to add Reverse Geocode in it so that after a user put in the address and search, we put a circle graphic on the map. And if a user tap on the circle, a toast should show the street name. I have a void method called identityLocation(float x, float y). Inside that method i have:               Point aPoint = new Point(x,y);     Point mapPoint = (Point) GeometryEngine.project(aPoint, SpatialReference.create(4326), mapView.getSpatialReference());      How do return the Street name? I tried to use: locator.reverseGeocode(mapPoint, 5.0) but i was unable to. Please help me. Thanks


title: Pgrouting - Networking

text: my problem is regarding routing. I have a network based on bicycle graph links (SRID: 4326), with bidirected and directed ways. I want to give the user the functionality to draw a route (shortest path) from a given point to a certain location (the input parameters are sent from my app, as two geometric POINTS). So to approach this problem i did the following steps:   1. Added reverse cost column and assigned an arbitrary high value for the ONE WAY links (Geometry LINESTRING)   2. Used the ST_ClosestPoint function to get the nearest source node from the start position, and the nearest target node from the final destination.   3. Once i have my source node and target_node i launched the Dijkstra Shortest Path function of pgrouting (taking account the reverse_cost for ONE WAY links):               SELECT bz_bike_graph_line.* FROM bz_bike_graph_line JOIN          (SELECT * FROM shortest_path('SELECT gid as id, start_node::int4 as                                    source, end_node::int4 as target, distance::double                           precision AS cost, reverse_cost::double precision                           AS reverse_cost FROM bz_bike_graph_line' ,source_node,                           target_node, true, true)) AS route           ON bz_bike_graph_line.gid = route.edge_id      QUESTION: All seems to be working in the right way BUT when returning the route the starting point and the starting route node never coincides (idem target and final dest.), obviously i should say, due the fact we return the closest points. Is there a way to resolve it or solve the task in other way? Some GIS expert here :) ? P.A. Thanks! ![enter image description here](http://i.stack.imgur.com/SUc6W.png)


title: 3D and 2D lengths of lines in ArcGIS

text: I have a 2D road segment and convert it into 3D using a raster in ARCGIS 9.3. So, what i see is that the length of 3D road segment is still the same as the 2D road. How can this be? As due to elevation aspect, the 3D length should be longer than the 2D counterpart.


title: Performing a reverse clip in ArcMap?

text: Is there a way to perform a 'reverse' of the clip function in ArcMap, I'm not exactly sure how to explain this so here's a diagram: ![enter image description here](http://i.stack.imgur.com/TYpxJ.png)


title: How to calculate a field in ArcGIS using Python?

text: I'm trying to calculate a field based on the values of others in the same layer in a calculation. I can't work out why its not working. I've even cut everything down to just be based on one field and even that won't work, so frustrating! This is based on one field               rows = arcpy.UpdateCursor(inputFC)     for row in rows:         val = row.getValue(Infield1)         row.setValue(outfld , val)         rows.updateRow(row)         del rows, row         arcpy.AddMessage("Completed")      this is the final script. Its meant to calculate calories based on minutes, speed and weight (weight as a number you input rather than a field) import sys, arcpy, math               inputFC = arcpy.GetParameterAsText(0)      # Input feature class     timeField = arcpy.GetParameterAsText(1)      # Input time in minutes     speedField = arcpy.GetParameterAsText(2)      # Input speed     SlopeField = arcpy.GetParameterAsText(3)      # Input Slope     weight = float(arcpy.GetParameterAsText(4))      #input weight in kg               arcpy.AddField_management(inputFC, 'Calories', 'LONG') #create calorie field     rows = arcpy.UpdateCursor(inputFC)     for row in rows:         time = row.getValue(timeField)         speed = row.getValue(speedField)         slope = row.getValue(SlopeField)         calories = time * (speed * 3.5 * weight)/200 * slope         row.setValue('Calories', calories)         rows.updateRow(row)         del row, rows      this says completed but the calories field ends up being null


title: How to enter series of points along certain angle at regular distances in ArcMap?

text: I would like to enter a series of points along a certain angle in ArcMap. I have a UTM coordinate as a starting point, and from that I'd like to enter 10 points at a 120 degree bearing every 50 meters. What is the best way to do this?


title: GIS Maximum area coverage problem

text: I want to find optimum antenna location for an area. Every antenna can cover an circular area. These areas diameter is 750meter. So how can i find minimum number of antennas and locations. **NOTE: I use QGIS. Blank areas are not important. Only buildings must be covered.** To better understand here is example images... Here is building layer ![enter image description here](http://i.stack.imgur.com/PB3jm.png) Firstly i generated 50m grid of the layer.![enter image description here](http://i.stack.imgur.com/JTQIE.png) After that i intersected it with building layer. So i can eliminate blank areas. ![enter image description here](http://i.stack.imgur.com/7k42s.png) I stucked in here. Which tool can help me determine location of antennas (750meter diameter). I know it can not show me %100 optimum locations. Bu i need possible locations. Here is another screen that i made it myself without analysis tools. The result must look like that. Thanks anyway. ![enter image description here](http://i.stack.imgur.com/CHcWy.png)


title: gdalwarp cant find libproj.dlib

text: Thought I had finally got Python, gdal and QGIS to play nicely together but just tried to do a batch transform using a bash script to call gdalwarp and it claimed it couldn't read the libproj.dlib file. Tried the exact same transformation in QGIS and it worked. Copied the code from QGIS into bash shell and it failed. QGIS is calling the same gdal library so I don't get this at all. Anyone got any ideas? This seems to be connected somehow, not sure how, to the epsg codes for Swedish grids being changed every five minutes and the libraries not being up to date. That said why does QGIS manage the job when bash doesn't?


title: How do I automate performing analysis (intersection) between objects within different feature classes, for a large number of objects?

text: I have two tables of roads - the same roads, from different sources, and am trying to compare how similar their positions are. I'm wanting to buffer each road in one of the feature classes and calculate the % overlap between it and the corresponding road from the other feature class. Could obviously do this manually but since there are hundreds of roads would rather use Python. The thing is, I'm new to it. Any help on how to automate using the intersect tool between objects from different tables would be very welcome. The objects will have an attribute in common. Thanks.


title: Problem loading raster to PostGIS using QGIS

text: I am having trouble loading a raster (.asc) file to PostGIS 2.0.1 using the plugin Database - PostGIS Raster - Load raster to postgis in QGIS 1.8.0 on Win Vista 64 bit. I get the following error message: * * * > Ett fel har inträffat vid Pythonexekvering: > > Traceback (most recent call last): File > "C:/Users/Magnus/.qgis//python/plugins\wktraster\DlgRasterLoader.py", line > 126, in browseRaster self.getMetadata(str(fileName)) File > "C:/Users/Magnus/.qgis//python/plugins\wktraster\DlgRasterLoader.py", line > 163, in getMetadata ds=gdal.Open(filename) AttributeError: 'module' object > has no attribute 'Open' > > Python version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit > (Intel)] > > QGIS version: 1.8.0-Lisboa Lisboa, 6416f38 > > Python sökväg: ['C:/Users/Magnus/.qgis//python/plugins\sextante', > 'C:/PROGRA~2/GIS/QGIS/apps/qgis/./python', 'C:/Users/Magnus/.qgis//python', > 'C:/Users/Magnus/.qgis//python/plugins', > 'C:/PROGRA~2/GIS/QGIS/apps/qgis/./python/plugins', > 'C:\PROGRA~2\GIS\QGIS\bin\python27.zip', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\DLLs', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\lib', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\lib\plat-win', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\lib\lib-tk', > 'C:\PROGRA~2\GIS\QGIS\apps\qgis\bin', 'C:\PROGRA~2\GIS\QGIS\apps\Python27', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\lib\site-packages', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\lib\site-packages\PIL', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\lib\site-packages\win32', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\lib\site-packages\win32\lib', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\lib\site-packages\Pythonwin', > 'C:\PROGRA~2\GIS\QGIS\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', > 'C:\Users\Magnus\.qgis\python\plugins\mmqgis/forms', > 'C:\PROGRA~2\GIS\QGIS\apps\qgis\python\plugins\fTools\tools'] QGIS opens the file just fine. Any suggestions on what to do? Magnus


title: IGPFunction2.Execute() never triggers when using IEnumLayer.Next() when run in background

text: I got a strange issue in GP tool I don't really understand: In my IGPFunction2.UpdateMessages() method, I use the following code to traverse all layers:               IEnumLayer enumLayer = gpUtils.GetMapLayers();     enumLayer.Reset();     ILayer layer = enumLayer.Next();     while (layer != null)     {         <code here>         layer = enumLayer.Next();     }      The purpose is to look for layers with duplicate names. This works fine when I don't run the tool in the background. In background mode however, the Execute() method is never triggered. This seems to happen after enumLayer.Next() is used. When removing the enumLayer.Next() and the code below, it works fine. There are no error messages or exceptions occuring, and Arc claims that the tool executed succesfully. When calling IGPMessages.AddMessage() as the first action in Exceute(), nothing is yielded. Any suggestions is appreciated..


title: Why can I not drag (re-order) layers within Table of Contents in ArcMap 10?

text: I added Raster data from a folder into ArcMap 10.1 and I cannot seem to drag any layer within the Table of Contents. Can someone help?


title: Multiple ring buffer on point-shape error

text: I need to calculate multiple ring-buffers, but every time I try, arcgis produces a failure: Executing (Multiple Ring Buffer): MultipleRingBuffer Y:\GIS\RDY\clip\sn_clip.shp Y:\GIS\RDY\sn_clip_ring.shp 100;250;500;750;1000;1250;1500;1750;2000;2250;2500;2750;3000;3250;3500;3750;4000;4250;4500;4750;5000;5250;5500;5750;6000;6250;6500;6750;7000;7250;7500;7750;8000;8250;8500;8750;9000;9250;9500;9750;10000;10250;10500;10750;1100 Meters distance ALL FULL Start Time: Fri Feb 15 12:03:02 2013 Running script MultipleRingBuffer... ERROR 999999: Error executing function. The table was not found. The table was not found. [union] The table was not found. The table was not found. [union] Invalid Topology [Topoengine error.] Failed to execute (Union). Completed script MultipleRingBuffer... Failed to execute (Multiple Ring Buffer). Failed at Fri Feb 15 13:58:58 2013 (Elapsed Time: 1 hours 55 minutes 56 seconds) I don't get it. Can anyone help me with this? Note that I'm not used to python.


title: Trying to read string-based binary (?) code into something like WKT to be read by a spatial database

text: I've recently received some parcel data that has "shape" columns which are strings by default and look something like this:               "0F00000060E501A0DFE841410080FF7FD7982741206802C02DE94141808513E02A9A274101000000060000000000000060E501A0DFE841410063FEFFDF982741A031FD7F03E94141808513E02A9A2741206802C02DE94141004C0080199A2741A00B03E028E941410080FF7FD798274140200180E5E841418041FEFFE098274160E501A0DFE841410063FEFFDF98274100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFEFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFEFFF"      What kind of code is this and is there any way to convert it back into something readable by qgis or postgis?


title: Does Re-Projecting an ESRI ShapeFile only update the content of the .prj file?

text: if i wish to change the projection of some shapefiles from .. lets say NAD83 (4269) to WGS84 (4326) ... and by using some 3rd party app .... does this mean the .prj file is only updated .. and not the content in the .shp file or any other associated file?


title: Unable to Reconcile

text: I'm quite familiar with the ArcSDE model and a few days ago we have major power issues here. My problem (and this is a BIG one) is that one of the users, made thousands of edits correcting data, and I can't reconcile his tables. I get a message saying that a certain feature class had a state lock. Ok, I look into Oracle, and I can see the locks, just fine. But it's the lock applied when I start the edition to reconcile. I've tried several approaches. I'm even wondering if I could delete that specific lock from the table and try to reconcile. I tried sdegdbrepair, using the diagnose command, but it gives me 0 tables with problems. **Edit** The specific message is: Underlying DBMS error [owner.featuerclass][state_id = 12007]. Do you guys have ANY suggestions at all? Could this be a permission on dbms problem? I'm at Oracle 11g. Thanks!


title: catchment delineation

text: I am trying to use qgis to delineate between three sub-sub-catchments. I have contour shape file of 20 meter height. Sub-catchment is about 12 square kilometers area but consist of three sub-sub- catchments. Would like to use the information to determine the river density of each sb--sub-catchment. Also would like to do slope calculation, using (exported to excel for graph profile). regards Zayed


title: Free geo api with minimal constraints

text: I want to write a game that will draw real geographical map. What software systems can often make requests for free? I need to stay at drawing a map.


title: Merging OD Cost Distance Matrix result (ArcGIS 10 Network Analyst)

text: I've created small python script that calculates OD matrix between certain locations, i.e. not between each origin and destination but for each origin I have a set of destinations that I want to calculate routes for. I end up with 17 results saved as a .lyr file (don't necessary need to save them on hard drive as such). I would like to merge those results together. The problem is a OD Cost Matrix Layer is in fact a group of layers and I'm only interested in layer Lines. To sum up: if layer is OD Cost Matrix Layer (group of layers) and Lines is one of the layer in that group and I want to use Merge tool to merge a few of such Lines layers - how do I do it as               arcpy.Merge_management(layer, output)      is obviously giving me an error of input not being a table view. Many thanks, J


title: Where are WMX connection files (JTC) stored?

text: I know that JTC files are SDE connection files with the extension changed from 'sde' to 'jtc'. They are not stored in the folder with the normal sde connection files. Where do they get stored?


title: convert .cdr to shp file in ArcEditor 10.0

text: i am looking to convert a .cdr (Corel) to a shp file. I am using ArcEditor 10.0 (I'm brand new to using 10.0 after using 9.3 and brand new to ArcEditor after using ArcView). I have never had to work with .cdr before. If you need more information regarding this, ask and I'll answer. than you, Zoran


title: Iceland base data - dem, hydro etc

text: I am looking for elevation data for Iceland. Specifically a higher res dem (30m) and some good hydrography, glaciers etc. Any suggestions for a good data source?


title: Unsuccessfully trying to iteratively run gdal_polygonize in a batch file

text: Thanks in advance for your help with this. I've been reading, experimenting, and banging my head against the wall for a couple days on this, and could really use some assistance. This is my first batch file attempt. I'm trying to loop through .tif files in a folder and run a gdal process on them. I have been calling the .bat file via command line in the OsGeo4W terminal. I can successfully run the gdal_polygonize process on individual files, but have not succeeded in running it iteratively.               SETLOCAL EnableDelayedExpansion          SET MYPATH = C:\Users\mkcarte2\Desktop\Polygonize\          FOR /F %%i IN ('DIR /B %MYPATH%*.tif') DO (              SET MYPATHFILE=%%~nI ::Trying to parse only the filename, so that I don't stack extensions in the output file         SET infile=%%i         SET outfile=%MYPATHFILE%.shp!              gdal_polygonize %MYPATH%!infile! -F  "ESRI Shapefile" %MYPATH%!outfile!     )      My Error Messages: For first file: > Warning 1: Layer name 'ESRI Shapefile' adjusted to >'ESRIShapefile' for XML > validity. Warning 1: Field name '%~nI.shp' adjusted to '_nI.shp' to be a > >valid XML element name. > 0...10...20...30...40...50...60...70...80...90...100 - done. For subsequent files: > ERROR 4: `!infile!' does not exist in the file system, and is not recognised > as a supported dataset name. Unable to open !infile!


title: Bringing GIS data into Minecraft

text: _A **little** off the beaten path...:_ Denmark has built a 1m:1block Minecraft World using real GIS data. Here's the home page, in Danish: http://gst.dk/emner/frie-data/minecraft/, and an ArsTechnica overview. How did they do it, and how might others do the same for their home- land/country/province/county/city/backyard? ![Screenshot](http://i.stack.imgur.com/Tr20Q.png)


title: How to hide map to print only the legend on a PageLayout?

text: If I'm printing a Pagelayout, is there any API for hiding the MapFrame or stop it from getting draw on the printout? I would like to only print the Legend on the paper.


title: Unrestricted codec for creating raster files with interior pyramids files

text: I'm looking for a tool that will allow me to mosaic a collection of images into a file format with performance similar to MrSID or ECW, but without the licensing restrictions that those formats come with. (I believe the .sid limit is 50 mb with the ECW limit is 500 mb). Unfortunately, the tool that I am working with doesn't recognize external pyramid files (.rrd) or .tif with internal pyramids. Does that leave me any good options?


title: How to create a pop-up box if a condition is true in a table? (ArcMap 10)

text: I'm creating a script that will grab layout data from a table for the current Building Number of the current building my map series is on. It works fine, but I need it to pop up a window if multiple entries exist in the table for that same Building Number. In this window I would need to be able to choose one of the entries identified by their BLDNAME attribute. Is this possible with arcpy or ArcObjects?


title: Find out if a point exists in an irregular shaped ILayer

text: Assuming I have an layer from a shape file which is not shaped like a rectangle how would I determine if a point lies within this layer?


title: GxFilterWorkspace allows a folder that is not a IWorkspace or IGxDatabase

text: I am trying to open a ArcGIS file browser. And For this, I used IGxDialog interface's DoModalOpen method. To specify what the user can select using a GxDialog browser is based on the filters (GxObjectFilter) held by the object. To browse workspace, I set ObjectFilter to GxFilterWorkspaces. But it allows folders that contains layers/feature classes/raster datasets that is not IGxDatabase or IWorkspace.                       IGxObjectFilter gxObjectFilter = new GxFilterWorkspaces();             IGxDialog gxDialog = new GxDialog();             gxDialog.AllowMultiSelect = false;             gxDialog.Title = title;             gxDialog.ObjectFilter = gxObjectFilter;             gxDialog.ButtonCaption = "Open";             gxDialog.RememberLocation = true;                  IEnumGxObject enumGxObject;             gxDialog.DoModalOpen(0, out enumGxObject);             while ((gxObject = enumGxObject.Next()) != null)             {                 if ((gxObject as IGxDatabase2) != null)                 {                     return gxObject.FullName;                 }             }      **Question:** What should I do to select only workspace through this browser? Or is there any other option to browse GIS dataset?


title: MSSQL spatial layer import error

text: I am currently working on a project in which spatial data are stored in a Microsoft SQL Server 2008 database. The tables which hold the spatial table contain 3 rows and are:               RoomId - BIGINT,      Description - VARCHAR(40),      Geometry - geometry.      I use QuantimGIS 1.8.0 for Windows and I use the tool for adding an MSSQL Spatial Layer. I succeed in connecting to the Server and I get a list of the tables which is as follows:               Schema: dbo     Table: tbl_lv1     Type: Polygon     Column: Geometry     SRID: 0     Primary key column: (empty)     Select at id: checked     Sql: (empty)      And when I click add, I get the following error:               dbname='gis' host='CAPDEV' user='qgisuser' password='*********' srid=0 type=POLYGON table="dbo"."tbl_lv1"(Geometry) sql= is an invalid layer and cannot be loaded      Why is this happening? Am I missing something? Thank you **Solved:** The solution was to add an auto-increment identifier to use as a primary key, because QuantumGIS needs a primary key attribute in order to import data.


title: QGIS field-calculator replace function

text: I've got a Shapefile containing contourlines which I would like to style differently according to their value. For that reason I created a field named "100s" where I would like to give values from 0=25m-lines, 1=100m-lines and 2=500m-lines. For doing that I tried the "replace" function with this syntax:               NAME="4600" OR NAME="4700" OR NAME="4800"  replace('NULL','NULL','1')      but QGIS gives the following error: " _syntax error, unexpected FUNCTION, expecting $end_ ". When I then set "$end, the error message is the same. Any suggestions how to resolve that? Thanks in advance, Ralf


title: Problems moving POSTGIS database from postgresql 8.3 to 9.3 using Navicat

text: I am using Navicat 11 to move a POSTGIS database from 8.3 to 9.3 on Mac OS X 10.9. I have installed PostgreSQL 9.3 and PostGIS with homebrew (brew install postgresql postgis) and everything looks ok. I then create the db locally with template "postgis_template". Then with Navicat I connect to the remote 8.3 PGSQL, choose the remote db and choose "Data Transfer", choose the remote db, schema public and the local db, schema public. When the transfer starts I get this error:               [Msg] [Dtf] Drop table: "geometry_columns"     [Err] [Dtf] Transfer Data [DROP TABLE IF EXISTS "geometry_columns";]:     ERROR:  "geometry_columns" is not a table     HINT:  Use DROP VIEW to remove a view.     [Err] [Dtf] Terminated      In PGSQL 8.3 there is a table "geometry_columns" while in 9.3 there is a VIEW with the same name. If I try to delete the VIEW in my new db I get an error that it is need by POSTGIS. Also after several tries I was able to delete the view but now I get this error and wonder if everything is transfered and if I have to do something:               [Msg] [Dtf] End transaction on target server     [Err] [Dtf] Transfer Data [ALTER TABLE "kulturminner" ADD CONSTRAINT "enforce_dims_punkt_geom" CHECK ((ndims(punkt_geom) = 2)) NOT DEFERRABLE INITIALLY IMMEDIATE;]:     ERROR:  function ndims(geometry) does not exist     HINT:  No function matches the given name and argument types. You might need to add explicit type casts.     [Err] [Dtf] Terminated      Any idea how to fix this?


title: gdalwarp from within python script misbehaving

text: I'm trying to run gdalwarp from within a python script                   start = "gdalwarp -overwrite -ts 22 20 -r average -srcnodata 99 "         input_file = filename[12:]         output_file = "temp1.tif"         print start + input_file + ' ' +output_file         subprocess.call([r'%s %s output.tif' % (start, input_file)],  shell=True )      Where `filename` changes iteratively (i'm batch processing and this is the first step). However when i run the script i get for example:               ERROR 4: `200301.h11v09.tif' not recognised as a supported file format.      But when i run the code on `200301.h11v09.tif` in terminal it works perfectly. I feel like it's something to do with python string substitution but don't know enough to figure out myself now. Any ideas?


title: Converting ArcGIS topology rules file (*.rul) to *.txt, *.csv or *.xls for reviewing?

text: Has anyone converted ESRI's topology rules file (.rul) into another format? I built a complex topology rules set and would like to QC it in something easier to read and work with than ArcCatalog. A text file and spreadsheet format would work great.


title: Free ServerContext has failed because the Wait Timeout Interval has elapsed

text: All, ESRI ArcGIS Server 10 SP4 logs below entry in log file. We have a single map service with 100+ layers which has Maximum time client can use a service is 600 seconds (10 min). I am really surpised when some of requests failed with below message. I could not understand (or believe) which request to map server is taking more than 10 min. Can some one throw some light on this. I read all ESRI documentation and forums , please help me with your experience or knowledge. Thanks a bunch. A request to obtain a free ServerContext has failed because the Wait Timeout Interval has elapsed.


title: How to request ArcGis geometries for specific bus routes including terminal numbers?

text: My app currently loads geometry data for all sub-routes under a route number. Here is the request: ` http://arcgis.metc.state.mn.us/ArcGIS/rest/services/transit/TIM_BusRoutes/MapServer/find?searchText=4&contains=true&searchFields=ROUTENUM&sr=4326&outSR=4326&layers=0&layerdefs=&returnGeometry=true&maxAllowableOffset=&f=pjson ` Route 4 has several sub-routes denoted by letters. For instance, this lists routes 4P and 4L: Bus Schedule Link In the API responses for departure times, the sub-route letters are denoted as "Terminal". How can I make a request that loads geometry for one of the lettered subroutes specifically? For instance, how could I request the geometry for route 4P ?


title: Problems in viewing ArcGIS webservice from MS Windows

text: We setup web GIS service using the combination of ArcGIS Server and Oracle. We put the spatial data in Oracle and use ArcGIS Server to publish the service. Currently we have a problem in viewing the web GIS from computer using MS Windows, but can view it using Ubuntu Linux and Mac OS X. If we view the service using MS Windows, sometimes all of the function works but most of times they fail. I would like to ask you if some of you had this kind of problem? If so, please kindly hint me to a solution. Thank you. Best regards, Firman Hadi. www.integrasiautama.com


title: ArcMap tables - copying multiple horizontal cells between rows

text: I would like to be able to select a contiguous set of horizontal cells in a row, take a copy, then paste the values into another row at the same position in the same table. I do not want to copy all the attributes, only a subset, but they are at least contiguous. At the moment I am doing a simple copy-paste cell-by-cell, and it is very time consuming, not to mention frought with error. If it were in a spreadsheet, it would be as simple as highlighting the group of horizontal cells, taking a copy, move the cell cursor down one cell, and then doing a paste. Is this possible without going through an export/edit/import process. Thoughts greatly appreciated. Barrie


title: MODIS image reprojection/ change coordinate system in ArcGIS 9.3

text: I have downloaded Utah state shapefile in `NAD_1983_UTM_Zone_12N` projection and also downloaded the MODIS image of the area (MOD09Q1) in .hdf format which has `sinusoidal projection`. the .hdf format was converted to .img using ERDAS imagine 2011. Upon adding these two layers in ArcGIS 9.3, the boundary shapefile does not fall on the image rather lies far away. I have also tried projecting the image to NAD_1983_UTM_Zone_12N...its still not working. Any suggestion on what to do...or wether i did the right thing??


title: How do you solve the map publishing problem with Geoserver 2.1.1 on Windows 7 x64?

text: Well, my problem is that i have geoserver installed over a windows 7 x64 system with both java (JRE 6u29) x32 and x64 installed and i can't proyect my layers on the website. The preview on geoserver works fine, but it doesn't work on my site ( it's a localhost server, a testing server) I have Apache + Openlayer + geoserver. I have tried Tomcat + Openlayer + geoserver (war) with similar results. The server status shows Jai libraries marked as false. I say this because i think the problem may be on the jai library. I searched about and found that JAI works only on x32 systems so i don't know how to solve this. I need to work with x64 architectures. I tried to install Jai over the x32 version of java but my server stop working after that. My local call to geoserver trough OpenLayer Instance is this:                <script type="text/javascript">          var mapa, capa;              function init(){             mapa = new OpenLayers.Map('mapwms');              capa = new OpenLayers.Layer.WMS(                 "Catastro",                 "http://localhost:8080/geoserver/Catastro/wms",                 {layers: 'Catastro:Predios'}             );                  map.addLayers([capa]);             map.zoomToMaxExtent();             map.addControl(new OpenLayers.Control.LayerSwitcher());         }          </script>      So i need to figure out why the geoserver preview is working and not my code. I'm new on this kind of softwares so i need some help I put "http://localhost:8080/geoserver/Catastro/wms" because that is how appear on the preview source code. I'll really appreciate your help please ;) NOTE: i've changed the question title to a more clearg one ;) * * * SOLVED: Thanks all for your help. I follow your advice and my server is now working.


title: Geoserver - tiles/grid offset

text: I would like to host an Openstreetmap server using Geoserver (Geoserver/GeoWebCache/postgis). However, I encounter a problem regarding the tiles and gridsets. TMS urls (myserv/z/x/y.png) are different than urls from openstreetmap.org or MapQuest. Furthermore, there is an offset on the y axis. The following url shows an area from my own server. The other url shows the same area from Mapquest. http://devmobicite.dnsroute.fr:8080/geoserver/gwc/service/tms/1.0.0/mapServer:mapOSM/14/16280/12392.png http://mtile01.mqcdn.com/tiles/1.0.0/vy/map/15/16280/11637.png The offset seems to be caused by the zoom level (here 14~=15) and by the y value (12392->11637). I hope my issue is understandable and that someone can help me. (Sorry for my english) Thanks Raphaël


title: How to create a MultiLineString feature with a postgis layer in QGIS

text: I have troubles handling with MultiLineStrings in QGIS. I added the table where I defined a column as geometry(MultiLineString, 31468) as a postgis layer in QGIS. Now I want to create features with multiple linestrings. When I finish to create the feature (with right click), then I have to insert an id (which is a value for another column in the table). So I have to create the next linestring feature and to assign the same id, to have a kind of a multiple linestring.               id  |  geom     1   |  "linestring1"     1   |  "linestring2"       I think this is not a proper way to work with multilinestrings!? I want to have this:                 id  |  geom       1   |  "linestring1" and "linestring2"      How can I create a MultiLineString in QGIS/postgis like this? ![enter image description here](http://i.stack.imgur.com/54mCY.png)


title: How to digitize a raster automatically

text: I have a raster (.sid extension) file. I want to digitize roads automatically in ArcMap, QGIS..etc. Digitizing by hand would be too time consuming. How can i do this ? Thanks ![I want to digitize roads automaticly](http://i.stack.imgur.com/IDGvx.jpg)


title: How to drape a simple jpeg image over dem of some area?

text: How can we drape a simple jpeg image which doesnot have any geo referencing information over the digital elevation model in order to visualize it in 3D in QGIS?


title: Dan Patterson's bounding containers

text: I used a toolbox by Dan Patterson () and the problem is that the new shapefile does not contain any field from my original shapefile and this is a problem because I can't join the two layers based on the unique id of my polygons.   Is there any way that I can do this in Python where the script is written in? I also post in ESRIS forum but I don't know how fast i can get an answer. Thanks


title: create table with IDs for all arcs downstream of all others

text: I need to summarize downstream information associated with each arc in an NHD dataset. I have a table with the downstream ID for stream segment but am not sure how to get all of the downstream IDs. Any ideas?


title: Extraction of raster cell values based on 'rgeos' and 'raster' buffering approaches in R

text: I am trying to extract cell values from a raster that lie within a certain distance from a given location (i.e. buffering). Evaluating different approaches, I found out that applying `gBuffer(..., width = 20000)` from package `rgeos` generally includes fewer cells than `extract(..., buffer = 2000)` from package `raster` for one and the same buffer width. Does anybody know what's the difference between these two approaches? Here's a reproducible example that comes close to my piece of code:               # Required packages     library(dismo)     library(raster)     library(rgeos)          # Sample raster data (and perform reclassification for clarity purposes)     germany <- gmap("Germany")     germany <- reclassify(germany, matrix(c(0, 200, 0,                                              200, 255, 1), ncol = 3, byrow = TRUE))          # Sample point shape data     nuremberg <- data.frame("lat" = 49.452778, "lon" = 11.077778, "city" = "Nuremberg")     # Set current CRS and reproject to raster CRS     coordinates(nuremberg) <- c("lon", "lat")     projection(nuremberg) <- CRS("+proj=lonlat +ellps=WGS84")     nuremberg <- spTransform(nuremberg, CRS(projection(germany)))          # Extract cell values using extract() only     nbg.val <- unlist(extract(germany, nuremberg, buffer = 20000))          # Extract cell values using gBuffer() and extract()     nbg.bff <- gBuffer(nuremberg, width = 20000)     nbg.val2 <- unlist(extract(germany, nbg.bff))      So far, so good. Now let's compare the results.               # extract() only     table(nbg.val)     nbg.val       0   1      118  91          # gBuffer() and extract()     table(nbg.val2)     nbg.val2       0   1      116  90      Of course, these are minor differences. However, using larger buffers and/or higher resoluted raster images, these discrepancies become larger and larger. Cheers,   Florian


title: How to calculate land cover inside the buffer zones?

text: In one Shape file I have created 1200 buffer zones Around coordinates. I created a field and calculated the buffer zones area in hectares. Then I clipped different landcover layers to the buffer zones. Now I want to calculate How many hectares of eg. Forest there are in Each buffer zone And afterwords the amount of felds, And so on. The calculations shall be done in model builder.. Can anybody help me please...?


title: How to create cost surface for least cost water transport analysis?

text: I am working on a project to derive least cost pathways between sites by dug out canoe travel. Has anyone worked on a similar project or found a function like the Tobler hiking function that can be used for water transportation? I am hoping to use ArcGIS 10.1 but I would be open to shifting to GRASS if that increases my options or coding with python.


title: Syncing Google Earth My Places data in OS X

text: Since Google hasn't implemented a sync service for Google Earth's _My Places_ data, I'm trying to make this work manually between my home and work computers, one OS X the other Windows. Windows side works fine - I've just redesignated the KML path in registry (`HKEY_CURRENT_USER\Software\Google\Google Earth Plus\KMLPath`) to a Dropbox. The problem's on the Mac side. I've tried replacing the myplaces.kml with a symlink, but this failed as the new object is somehow automatically overwritten by a backup (even when the backup in the same folder (`/Users/username/Library/Application Support/Google Earth/`) has been manually deleted). So I'm trying by adding a 'Network Link' folder to My Places, linking to the dropbox kml. This half works - edits from Windows side load up in Mac side, but edits/additions in Mac side placed in the networked folder are not saved upon exit. Does anyone know the reason for this failure to sync, or of an alternative method that works on OS X? Thanks in advance.


title: Flagging when point feature(s) covered by tables (made as graphics) using ArcPy?

text: I've set up data driven pages to create a series of maps, but I'm running into a problem which seems like it would be quite common! I've made some tables (as graphics) using ArcPy and the technique described an Answer to another Question: How to add Table to Layout View using ArcPy?. However, with a series of maps, sometimes these graphics will cover my points layer. Does anybody know how to (at least) flag when a point is hidden by my tables?


title: How to Georeference a tiff with correct coordinate system

text: I am having difficulty in georeferencing an existing tiff (already has georeference information - but is out of alignment). Using the georeference plug-in I can create the map's GCP in the 4 corners and run the transformation (using WGS84). However, even trying other transformations I get a map that is not georeferenced to the Lat & Long. The Lat / Long of the original map shows 26.00, -25.00 (top left corner), the georeference after transformation is 974, -747. How can I get the transformation to reflect Lat / Long as per the original georeference as all I am trying to achive is a re-aligned map?


title: Trilateration using two or three points

text: We have a positioning system where we can measure our range without 0.1m from multiple beacons. The placement of the beacons is about on a 1-2km box. So we could get anywhere from 2-4 ranges from the beacons. The beacons are surveyed in place to an accuracy of about 1m. We found the PHP code for the range case: Trilateration using 3 latitude and longitude points, and 3 distances and we're testing this in our "C" program w/ double precision math. Questions: We're looking to get the most accurate position projection in LAT,LONG over a short area say max range up to 2km. What's the best aproach to get the least errors in the solution math? How big will the position errors be in meters? Is there a code example of finding the two solutions in lat,long is we only have 2 ranges?


title: How to calculate a new bounding box that is 80% of the actual bounding box returned by google map?

text: I need to show a marker for each user that falls within the visible portion of google map. To do so, I get the bounding box from google map, and send it down to the database and I receive a list of users that fall within the box. Then loop through the list of users and place a marker on the map for each user. All works well, however, if the lat/lng falls just bellow the top border, then only the bottom of the marker is visible. If the lat/lng falls next to the side borders, then only 1/2 of the marker is visible. One way to tackle this problem is to send a reduced version of the bounding box to the database. This way, you'd have a bounding box with margins, but you don't show anything within the margins. Now, what is the best way of shrinking down the bounding box before sending it down to the database? Is there any better way of doing this? Check the image, 1/2 of the marker is hidden. (top) ![enter image description here](http://i.stack.imgur.com/QpWiP.png)


title: What to do about Geoserver WPS Warning "Could not get a ServiceInfo"?

text: This is the warning i am getting when i try to use this WPS service from QGIS, and the processing take a long time, but doesn't terminate, what might be the problem?               17 Oct 12:33:25 INFO [geoserver.wps] -     Request: getCapabilities            service = WPS            baseUrl = http:// localhost:8080/geoserver/        17 Oct 12:33:31 WARN [geoserver.ows] - Could not get a ServiceInfo for service wps                                            thus could not check if the service is enabled        17 Oct 12:33:31 INFO [geoserver.wps] -     Request: describeProcess            service = WPS            version = 1.0.0            baseUrl = http:// localhost:8080/geoserver/            identifier[0]:               value = gt:VectorToRaster


title: How to export objects from wikimapia to openstreetmap?

text: How to export objects (buildings, houses) from wikimapia to openstreetmap? What is the way?


title: Adding Geometry column in Postgis

text: while i'm adding a geometry column in postgis by using **AddGeometryColumn** then the error is > no function matches the given name and argument types. you might need to add > explicit type casts Please Explain clearly Thanks in advance.


title: Where can I get information on QGIS beta versions?

text: While searching for information on some qgis functionality on the web, i noticed several times, people using version 1.9, however this version is probably some beta (or so i thought) but i cant seem to find a download/site of it anywhere. Then, on some other site someone wrote thats a development version of 1.7.4. Wiki site lists only official versions, but i want to know, is there a site where some beta previews are available? google search yields nothing useful under 'qgis beta', 'qgis 1.9' Thanks


title: Proper use of Modulus "%" operator in ArcMap

text: # Objective: Gather pour points to define a specific-sized watershed. In this case, 1000 pixels. (for this thought exercise, watershed is to mean any point that flows through a pour point, regardless of size, not the NHD definition) # Layers: DEM, flow direction, flow accumulation, the like. Flow accumulation symbolized with 1/2 standard deviations on top of the DEM:![flow accumulation map](http://i.stack.imgur.com/Dg92o.png)   My mathematician brother suggested the use of the modulus operator, which returns the remainder of a division problem, thus allowing something like `Con(("flow_accum" % 1000) < 10, 1, 0) in the Raster Calculator.   Theoretically, this should return a blip in the stream every thousand pixels of flow accumulation, but it doesn't.   What just the modulus ( just "flow_accum" % 1000) returns is this:   ![modulus map](http://i.stack.imgur.com/nSwFq.png)   I do not know how to interpret this. It should have low values for all pixels that are not near a X,000 but it appears to have just done some sort of rescaling to 1000 or something.   I did a manual selection of the first 12 watersheds with:               Con(("flow_accum" == 1000), 1, Con(("flow_accum" == 2000),2, Con(("flow_accum" == 3000)     ,3,Con(("flow_accum" == 4000),4,Con(("flow_accum" == 5000),5,Con(("flow_accum" == 6000)     ,6,Con(("flow_accum" == 7000),7,Con(("flow_accum" == 8000),8,Con(("flow_accum" == 9000)     ,9,Con(("flow_accum" == 10000),10,Con(("flow_accum" == 11000),11,Con(("flow_accum" == 12000)     ,12,Con(("flow_accum" == 13000),13,Con(("flow_accum" == 14000),14,0))))))))))))))      Which after running the watershed tool, returned this:   ![manual watershed delineation](http://i.stack.imgur.com/xxsMU.png) # What I need help with is making sense of the output of the modulus function, and defining arbitrarily-sized watersheds.


title: Regarding property setMinScale(scale) and setMaxScale(scale) in ArcGIS Java script API

text: I am new to programming in JSAPI. I have two dynamic layers and I want to set the property setMinScale(scale) and setMaxScale(scale) to layers so how do I Set ? ex. I tried using layer.setMinScale(0) but its not working any help would be appreciated.. thanks in advance : )


title: Hashing functions for GIS data

text: I would like to take geometries from a vector dataset and reduce them to a hash. This hash would then be used to verify the integrity of that data and also identify identical geometries. Do any appropriate algorithms exist that could be used? What pitfalls could I encounter?


title: Clipping Buffers

text: I have buffered a line shapefile where many lines are intersecting but not broken at intersections. I am trying to select each record in the buffer file and clip all intersecting polygons in the same layer. Hoping this can be done in Python, but I am a real beginner.


title: Picture fill symbol fails with a polygon graphic

text: The following code snippet successfully draws a graphic polygon and fills it with the specified picture fill symbol. When the x values for all of the points are made negative and a repeat call to the snippet is made, the polygon is symbolized but it is not visible. However, when you grab one of the resizing grips of the polygon graphic and stretch it a little the symbolization becomes visible. Can anyone vouch for this behavior? Is this a bug with ArcGIS maybe? I'm completely baffled etc.               Dim pGC As IGraphicsContainer     pGC = pMap          Dim oPoint As IPoint          Dim pPolygon As IPointCollection     pPolygon = New Polygon          oPoint.PutCoords(150, 120)     pPolygon.AddPoint(oPoint)          oPoint = New ESRI.ArcGIS.Geometry.Point     oPoint.PutCoords(160, 120)     pPolygon.AddPoint(oPoint)          oPoint = New ESRI.ArcGIS.Geometry.Point     oPoint.PutCoords(160, 115)     pPolygon.AddPoint(oPoint)          oPoint = New ESRI.ArcGIS.Geometry.Point     oPoint.PutCoords(150, 115)     pPolygon.AddPoint(oPoint)          oPoint = New ESRI.ArcGIS.Geometry.Point     oPoint.PutCoords(150, 120)     pPolygon.AddPoint(oPoint)          Dim pElement As IElement     pElement = New PolygonElement     pElement.Geometry = pPolygon          Dim pFillShapeElement As IFillShapeElement     pFillShapeElement = pElement          Dim pPictureFillSymbol As IPictureFillSymbol     pPictureFillSymbol = New PictureFillSymbol     pPictureFillSymbol.CreateFillSymbolFromFile(esriIPictureType.esriIPictureBitmap, clsAppHelper.GetArcGISInstallDir & "styles\pictures\smallwave.bmp")          pFillShapeElement.Symbol = pPictureFillSymbol     pGC.AddElement(pElement, 0)     pMxDoc.ActiveView.Refresh()


title: How to install the Python module shapely for QGIS use?

text: I'm using QGIS 1.8.0 on a Mac with OSX 10.6.8 (Snow Leopard). I've installed QGIS including GDAL, GSL, UNIXImageIO, Freetype, and Matplotlib all from www.kyngchaos.com. When installing the plugin Contour I get the error that the Python module `Shapely.geometry` isn't present at my system. So I have to conclude that this module isn't a part of QGIS nor of Matplotlib and also not of the plugin Contour. Where do I find this module and how do I install this on a Mac? I'm new to a Mac. In Windows this isn't a problem, everything works correct, also the Contour plugin.


title: traversing KML files with ogr python

text: i'm new to OGR processing and KML format so be gentle: i've got a series of KML files all containing multiple regions partitioning a larger area in each. i also have a series of geocoded points for which i want to ask `WITHIN/CONTAINS` queries with respect to the regions. two questions:   * i don't know how to ENUMERATE all the regions/placemarks contained in the file. [UPDATE:] thanks to this hint i guess i can get what i want via a JSON encoding:              drv = ogr.GetDriverByName('KML')     inf = 'path/file.kml'     ds_in = drv.Open(inf)     featureTbl = {}     for kml_lyr in ds_in:         for feat in kml_lyr:             ftbl = eval(feat.ExportToJson())             fname = ftbl['properties']['Name']             geom = ftbl['geometry']             featureTbl[fname] = geom      but there must be a better/XML-parse-like way to get "child" placemark elements?   * since i know the point will only be in one of the regions, i wonder if it is worth the effort of first computing region centroids and asking the `WITHIN/CONTAINS` query of the regions in order of their proximity to the point, rather than just dumbly enumerating all the regions and asking until i get a hit?


title: How to convert geometry to WKT using ArcPy?

text: I would like to be able to convert a single feature (or potentially many features) in an ArcGIS layer into Well Known Text (WKT) format during a geoprocessing operation using Python and ArcPy (no non-ArcPy modules). The purpose is to then pass the WKT on to SQL Server Spatial and do additional processing outside of the ArcGIS GP toolset. Is there a method for converting a ArcGIS geometry features to WKT via ArcPy? I have already read the following, without finding what I am after:   * Shapefiles to Text (references a tool in the deprecated "Samples" toolbox)   * Convert between ESRI Geometry and WKT (uses ArcObjects or non-ArcPy modules)   * How to convert a shapefile to WKT? (Uses QGIS and OGR) There apparently used to be a tool called "Write Features To Text File" (which appears to be a Python script) that was in the Samples toolbox, but that toolbox was deprecated at version 10 and I cannot find a copy of the Samples Toolbox (I have v10.0) on my machine. If there are no current solutions, if someone could just point me to a copy of the sample, I would be totally fine with using that tool, too.


title: Convert KMZ image to UTM projection jpg file

text: I have some KMZ files that are basically aerial imagery that has been referenced to Lat/Long. I would like to convert them to a projected UTM coordinates such as NAD 83 in a geo-jpg format. I was hoping to use QGIS or some low cost method. I can't seem to get these KMZ files into QGIS to start with. If I change the file extension of KMZ to a zip, I see both the KML file and then a folder with the unprojected jpg file. QGIS just says it doesn't support or it's not valid format both the KMZ as raster format or the KML (with attached jpg) as a vector format. Any ideas what I could do here?


title: 1-band raster colour table workaround in QGIS

text: Does anyone know what the workarounds are for the 1-band raster colour table plugin in QGIS? Currently I find it will run once, then crash on the second iteration. The workaround I use is to delete the two files which the plugin creates in the directory of the raster - *.aux.xml and *.bccPAL1. After this I find I can run the tool again. Both Wroclaw and trunk. But is there something I am overlooking, a simpler workaround? cheers


title: Classify trajectory compression algorithm

text: I'm tryng to classify each compression algorithm based upon their features, i've thinked:   * Compression algorithm      * Lossless algorithm        * Batched algorithm          * Rinex     * Lossy algorithm        * Batched algorithm          * Uniform sampling         * Douglas-Peucker         * Bellman       * Online algorithm          * Opening window       * Hybrid algorithm          * Threshold algorithm Do you agree with me? How can I improve this chart? The main division is among lossless and lossy or batched and online? Exist an online lossless algorithm? Best regard


title: How to Edit Popup using Openlayers Text Layer?

text: I am creating a map with about 1000+ points using Openlayers. Currently when I click on one point's icon, the description for the point shows up in a popup, and to exit the popup I need to click on the same point's icon again. Is there a way to modify the code for this so that I can press a close button or I can click anywhere on the map so that this popup will close again? I know there is a way if I am just using a regular popup but I am using an Openlayers.layer.text layer.               var pois = new OpenLayers.Layer.Text( "Frequencies",                 { location:"./frequencyrange.txt",                   projection: map.displayProjection                 });         map.addLayer(pois);      I use this code to add the text layer. Within the text file would be the following columns: lon lat title description icon iconSize iconOffset. Is there another column that I should add for the popup? I have tried a column that was supposed to modify the size of the popup but it did not work for me. So, so far I have not been able to modify the popup except for what is in it.


title: Identity tool FID column name gets cut off

text: After my ArcMap extension executes the Identity tool, the resulting identity shapefile has FID columns for the "input features" FeatureClass and the "identity features" FeatureClass but the column names get cut off. I need to access these columns when looping through the identity shapefile later. I thought I could find the field by name to get the column index but I never know what they are going to be called. It is "FID_" plus some part of the input's name but the column name string is too short to just compare the strings. The inputs might have similar names. If I do this manually in ArcMap, it does not cut off the names. The column name will be 'FID_" plus the full name of the input feature FeatureClass name. Is there a way to set what the FID column names will be?


title: Commit Feature WPS Split process

text: I develop a WebGIS application with GeoServer (2.1.1) and GeoExt (with the last version of OL). Data (polygons features) are stored in a postgis DB. I've implemented editing tools that allow users to add/delete and modify features and their attributes directly on-line. It's work fine. Now, I add a new control for splitting polygons in two (or more) parts. It's possible with the GeoServer's split polygon WPS process (gs:SplitPolygon). I've followed the tuto here (http://blog.opengeo.org/2012/07/24/splitpolygon- wps-process-p2/) and implemented the tools on my appl. For information, this is the code I've used:               function handleSplitDraw(event) {     var splitter = event.feature;     var features = map.layers[2].features;     var candidates = OpenLayers.Array.filter(map.layers[2].features, function(feature) {     var hit = false;         if (feature.geometry.intersects(splitter.geometry)) {             hit = true;         }         return hit;         });     var candidate;     for (var i=0, ii=candidates.length; i<ii; ++i) {         candidate = candidates[i];         if (candidate.geometry.intersects(splitter.geometry)) {             map.layers[2].removeFeatures([candidate]);             executeSplit(candidate, splitter);         }     }     return false;}     var wktFormat = new OpenLayers.Format.WKT();     var wpsFormat = new OpenLayers.Format.WPSExecute();     function executeSplit(poly, line) {           var doc = this.wpsFormat.write({         identifier: "gs:SplitPolygon",         dataInputs: [{             identifier: "polygon",             data: {                 complexData: {                     mimeType: "application/wkt",                     value: wktFormat.write(poly)                 }             }         }, {             identifier: "line",             data: {                 complexData: {                     mimeType: "application/wkt",                     value: wktFormat.write(line)                 }             }         }],         responseForm: {             rawDataOutput: {                 mimeType: "application/wkt",                 identifier: "result"             }         }     });         OpenLayers.Request.POST({         url: "http://localhost:8080/geoserver/wps",         data: doc,         success: function(response) {             handleSuccess(response, poly);         }     });}     function handleSuccess(response, poly) {     var features = wktFormat.read(response.responseText);     if (features && features.length > 0) {         map.layers[2].addFeatures(features);     } else {        // map.layers[1].addFeatures([poly]);     }}      Control:               var drawLine = new OpenLayers.Control.DrawFeature(map.layers[2], OpenLayers.Handler.Path);       mapPanel.map.addControls(drawLine]);      WFS definition:               saveStrategy = new OpenLayers.Strategy.Save();     wfs_layer =     new OpenLayers.Layer.Vector(             "Editable plot Layer",              {             styleMap: WFSStyle,                 eventListeners: {                     sketchcomplete: function(event) {                             var proceed = true;                             if (event.feature.geometry instanceof OpenLayers.Geometry.LineString) {                                 handleSplitDraw(event);                                 proceed = false;                             }                             return proceed;                         }                     },                     visibility: false,                     strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],                         projection: new OpenLayers.Projection("EPSG:4326"),                         protocol: new OpenLayers.Protocol.WFS({                             version: "1.1.0",                             url: "note_url",                             featureNS :  "FNS",                             featureType: "fname",                             geometryName: "the_geom",                             extractAttributes: true,                             schema: "myschema"                         })                     }             ),      The process work very fine. I can split polygons by line and splitted features are added on my map. In FB consol, I receive a correct response (Geom Collection). Now, I would like to save back these changes (splitted polygons) to GeoServer. How can I do this? Can I use the WKT response and save the Geometry on a GeoJSON File (for example) for update the database? Do you have any idea of this step? Thanks very much Geoffroy


title: Save longitude and latitude in Django

text: I had plotted a Javascript gMap.Using the marker,the values of latitude and longitude are displayed.I need to get that values and save it to database.What is the best way to do this and ,How to accomplish this. In model,i created both field as CharField.I want to know how Python get the values from HTML and save.


title: Label callouts in QGIS

text: Has anyone been using callout labelling with QGIS, either trunk or stable? Used for clustered points. That means the point stays where it is, the label maybe moved if required and a leader (plain or pointed) shows the linkage between the label and the point. How could I do it (you know what I mean, no coding....)?


title: Simple WebMapping application with postgis Database

text: am very new to web-mapping, so this question may be a little misguided. I want to develop a simple web mapping application using OpenLayers which can display Cadastral information that are currently in PostGIS(2 tables: property and boundaries). I want this to be as simple (and as low maintainence) as possible: -Use java for developping -The user can search a parcel by 4 fields (name, indice complement and nature) existing in table : "titre" -and then the user can generate the an A4 sheet for print that contains the title/property plan and also a table containing the name, X and Y of boundaries of title/property from the second table : "Boundaries" -Styling of the vector layers is of minimal importance. PS: i tried to use the library geotools with applets but i have a problem with versions, because the tuto that i used is old 2004, and i couldn't find the old version 2.1 on the net, i only have 2.7


title: Need help with the creation of add-ins for arc map

text: How to find the coordinates x and y of the point when you click on the map? I'm creating a new add-in to the arc map. When you create the add button and I chose dockable window. In dockable window I have a green button when it is clicked, and then the map should I get x and y coordinates on the map? ![enter image description here](http://i.stack.imgur.com/bJTh6.png)


title: Data format for checking a land survey deed

text: A commercial property is in the closing phase of sale and the only hold up is that the deed description is one that's been lifted from prior deeds dating back to the 1950's and is obviously erroneous. A 1992 survey does appear to properly depict what the Seller's have to convey and both Buyers and Seller agree that the aforementioned survey be the basis of description in the new deed and title policy if ...it plots out in reasonable fashion in Copan. But, after spending six hours trying to get a result (closure error, or an additional call necessary to close) and a graph, I have been unsuccessful. format I've used is:               Map Traverse     1 degrees distance tab tab tab     2 degrees distance tab tab tab     3 degrees distance tab tab tab     1 degrees distance tab tab tab      That produced a bizarre graph, so I tried making the first call               Map Traverse     1 0.0 0.0 tab tab tab      Then I get an error message saying in effect "insufficent tabs" and use cut and paste to provide missing tabs. * * * My data:               1                        2   354.0847    129.65               3    84.4149    117.82               4   352.2410     69.78               5   309.4352     82              6    37.1300     55              7   307.4700     61              1   276.5342     95.62                * * * The original survey plat: ![enter image description here](http://i.stack.imgur.com/aUqRq.png)


title: Show categories in QGIS

text: I have a .csv file pointing at coordinates. It is a large file that is edited often. In it, I have three groups of data (say A, B, and C). Within each group there are a number of Names, and each name has ten sets of coordinates. I would like to keep all of this data in one spreadsheet. How can I set the categorization in QGIS to show each Name with it's own colour from only Group A? I hope to create three layers, one for each group, all pointing to the same .csv file. I think I need to do this in the Expression dialog box but can't seem to work it out! Any help appreciated. For example: `NAME,GROUP,Easting,Northing Orange,A,, Orange,A,, Orange,A,, Orange,A,, Orange,A,, Orange,A,, Red,B,, Red,B,, Red,B,, Red,B,, Blue,C,, Blue,C,, Blue,C,, Blue,C,, Blue,C,, Blue,C,, Blue,C,, Blue,C,, Green,B,, Green,B,, Green,B,, Green,B,, Green,B,, Green,B,, Violet,C,, Violet,C,, Violet,C,, Violet,C,, Violet,C,, Violet,C,, Violet,C,, Violet,C,, Violet,C,, `


title: Issue with vertex level editing in ArcScene

text: I have a 3D data set of some buildings in ESRI Shapefile MultiPatch format. The buildings appear in 3D in ArcScene (10.2.1 on Windows 8.1 64bit) and I am able to move, rotate and scale buildings. However when I select a building in an editing session and I go to vertex editing, if I try to edit any of the vertices of my building I am presented with a 'Select a single editable feature to modify' prompt. I am unable to work out why I can't edit at vertex level for this set of buildings. ![A depiction of the error that I'm getting](http://i.stack.imgur.com/xkZ7o.png) In addition clicking on the building appears to make it disappears until I select another building and the original building reappears. Anyone have any thoughts about this issue?


title: Wich is the way to create serial field following alphabetical order with QGIS?

text: I have a field with names, a string field, and I want to create another one with serial content following the alphabetical order. I have this:               --------     |Field1|     --------     |  B   |         --------     |  C   |     --------     |  A   |     --------     |  D   |     --------      And I want to reach this:               -----------------     |Field1| Field2 |     -----------------     |  A   |    1   |     -----------------     |  B   |    2   |     -----------------     |  C   |    3   |     -----------------     |  D   |    4   |     -----------------      How can I reach it using the fiel calculator of QGIS? Any idea??? Thank you!!!


title: How to change 0,360 WKT string to -180,180?

text: I'm reading POLYGON WKT strings using OpenLayers.Format.WKT().read(). The polygons use 0,360 longitudes but my map is -180,180. When I display the polygons on the map they are displayed outside of the map. How can I display them on their correct location? I tried OpenLayers transforms and Proj4js transforms (plus defining the 0,360 CRS using +lon_wrap=180) but nothing seems to work! Help would be appreciated ;-)


title: Use arcpy.da.searchcursor to select rows to dissolve

text: I'm quite new to ArcGIS and hope someone can help me. I have one table that lists which polygons are contiguous with each other called BLPUsCavPlaceContigBLPUs that looks like this:               OBJECTID   blpuid  contigid  shape-length         1         1        7          38         2         1        16         42         3         2        8          14      I then have a table of all the polygons called BLPUsCavPlace where the objectID is the blpuid and contigid:               OBJECTID   SHAPE   SHAPE_length  SHAPE_area         1     polygon    126.846       986.093      Therefore I know which can merge with which, such as 1 and 7. I want to iterate through the first table, and for each row the cursor will take the blpuid and contigid and select these rows (OBJECTIDs) in BLPUsCavPlace, then it will dissolve them and add them to BLPUsCavPlaceDissolved. So it would look at BLPUsCavPlaceContigBLPUs and select 1 and 7 in BLPUsCavPlace, then it would do the next row etc The end result is that I have a polygon layer that contains all the possible dissolved polygons for each polygon within BLPUsCavPlace i.e. 1 + 7, 1 + 16, 2 + 8 I've been looking at arcpy.da.searchcursor which could retrieve the field values, but how would I then use the blpuid and contigid to select the rows in BLPUsCavPlace? Any help is greatly appreciated!! so i can run this:               fc = "BLPUsCavPlaceContigBLPUs"     fields = ["blpuid", "contigid"]          with arcpy.da.SearchCursor(fc, fields) as cursor:         for row in cursor:             print("{0}, {1}".format(row[0], row[1]))      to get the field values, i then want to take the two values and use both as objectid in the other table and run dissolve on them


title: Code in python for arcgis to select multilines (path) and vertexes

text: I am learning to write a python code for ArcGis 10.2. Need help!   1. I have some shp poly lines file, need to learn how to write multiple selection of those lines, even if a cursor of mouse pressed not exactly on line but near of it.   2. By selecting one vertex, on the cross place of lines should be selected all the vertexes. Will be thankful for all ideas of algorithms and methods, or reading materials, since I am not good familiar with programming algorithms, but I know the Python. Thanks in advance!


title: Adding UTM Zone Number to Coordinates

text: The computer program that I'm working with requires an 8 digit UTM Easting for the coordinates of shapefiles (i.e., the UTM zone number must be included with each coordinate within a shapefile). The program was designed in Europe and considers all of my shapefiles to be extremely far away, due to the two "missing" digits. I'm using ArcMap 10.1 and also downloaded Quantum GIS, as the individual I'm working with overseas suggested that QGIS could add the UTM zone number to the coordinates. I haven't found any way to do so, so if anyone has any ideas, I'd be very grateful. Thanks in advance!


title: Network segment gaps, when offset

text: I'm having an issue when offsetting a line shapefile. For some reason when the lines are offset, ArcGIS isn't drawing some segments although the segments are there confirmed via “identify”. Has someone come across a similar problem? why is this happening and how does it get resolved? Thanks for the help


title: Quantum GIS returns "Invalid Layer" message when trying to add Postgis view

text: I'm new to Postgis and Quantum GIS. I created a view defined as               CREATE OR REPLACE VIEW pupr.vstudentmuni AS       SELECT m.id AS munid, m.name AS muname, m.geom, s.code,          (s.name::text || ' '::text) || s.lastname::text AS fullname        FROM pupr.municipio m, pupr.student_location l, pupr.student s       WHERE st_within(l.geom, m.geom) AND s.code = l.code;      in PostgreSQL. Trying to add this view to QGIS returns the following error...               "Invalid layer"..."sql= is an invalid layer and cannot be loaded."      Not sure what the problem is. The table is mentioned in the `geommetry_columns` table in PostGIS, but I can see a message entry in QGIS that says "No key field for given view". I'm using PostgreSQL 9.2 and Quantum GIS 1.8.0.


title: OpenLayers Protocol specification

text: Is there a specification for the protocol OpenLayers uses to communicate with the server? I'm trying to reverse engineer what happens on GET, POST, PUT and DELETE, but I don't like to do it this way. Example:               var vectorLayer = new OpenLayers.Layer.Vector("Vector Layer", {         protocol: new OpenLayers.Protocol.HTTP({             url: '...',             format: new OpenLayers.Format.GeoJSON({})         }),     });


title: No Postgis after installing opengeo suite

text: After the installation of the opengeo suite; everything seems to work fine, except for the postgis extension of postgresql. In the dashboard all the postgis options are greyed out. The system is running Ubuntu 12.04 (Precise) LTS Bare OS. Is there a way to install postgis afterwards with the templates from opengeo?


title: arcpy calculate zero number instead of negative number

text: I want to develop a model using python.When i want to calulate negative numbers using the model,my script get zero number. Whats wrong in my script ? How can i solve the problem ? Thanks for advance               import arcpy     from arcpy import env     env.overwriteOutput = True     env.workspace= r"D:\ppa_test\test.dbf"     arcpy.AddField_management(r"D:\ppa_test\test.dbf",'cf',"Float")     updatecursor = arcpy.UpdateCursor(r"D:\ppa_test\test.dbf",["ppa","pps",'cf'])          for update in updatecursor:         if update.ppa < update.pps:             update.cf = (update.ppa - update.pps) / (update.ppa * (1-update.pps))         elif update.ppa>update.pps:             update.cf = (update.ppa- update.pps) / (update.pps * (1-update.ppa))             updatecursor.updateRow(update)     del update     del updatecursor      ![enter image description here](http://i.stack.imgur.com/lqbTI.png)


title: Create buffer-lines in QGIS alongside Vector lines

text: I am currently doing a map of a farm, to see which roads needs to be repaired. Those roads are either one sided fenced, on both sides fenced or not fenced at all. I want to make buffer lines around the already mapped roads (vector lines), which have fences. Something like this: I hope this is possible to understand. Of course I can draw additional lines alonside those paths... but this is a hellofa work. I work with QGIS :) Thanks for your help in advance! Lukas


title: summing up over an area based on a distance related function

text: Through a field study, we learned that the density of a bird species in the forest was related to the distance to forest edge: `ln(density) = 1.89*(distance to edge) + 0.34` Now, for any forest polygon, how can we estimate the number of birds in it based on above equation? I thought of using raster approach, dividing the forest into many grids, calculating, and summing up. But as the forest polygons are highly irregular in shape, there are many "incomplete" polygons. The size of the grid cell and the origin of the grid system influence the output as well. I wonder if there is any approach to this problem using polygons directly? Many thanks for any discussion!


title: Every time I use the Distance Matrix my program stops responding

text: I get to the point of having all of my information in QGIS, and am attempting to save a .csv file in the Distance Matrix. I browse to an output distance matrix, click ok, the bar fills up to 100% and then stops responding. Any suggestions?!


title: How can I generate a fishnet grid and a matrix of percentage of overlapping in R?

text: I'm trying use R for create a fishnet grid like in arcGIS with many cells of same size. In the arcGIS 9.3 we have the option of create a polygon with many small square polygons (eg. 1 x 1 degree of lat and long) in the extent of our study area using the tool 'create fishnet' (http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Create_Fishnet_(Data_Management)) and after aply the tool 'Feature to Polygon' to transform the polygon lines in square polygons. Other option is use the “Hawth’s Tools” extension and acess the “Sampling Tools” -> “Create Vector Grid (line/polygon) but the extension only work properly until arcGIS 9.2. Then I want create the fishnet grid (polygon with many regular squares) and after calculate many percentage of overlap of some polygons to each cell of the fishnet and create a matrix with each cell in lines and each polygon in the columns, like this matrix. Any idea? Thanks!


title: r.series command in QGIS - timeseries

text: I am using r.series command in qgis. The command is performing correctly, but when I import input raster files, it creates a list in a random order. Sometimes the order of input rasters is essential to the outcome. Is there a way to control the list of input rasters? the order of raster is random thanks


title: Synchronizing Changes From File Geodatabase to SDE Geodatabase

text: I have an SDE geodatabase that has a one way replication to a file geodatabase, where I will make edits to the feature classes offline somewhere. I know that this scenario doesn't support one-way or two-way replication, so is there anyway I can push the updates I made in the file geodatabase back to the SDE geodatabase?


Is there a way to access the GeoProcessing tools in QGIS, in code? I want to find the Difference between two layers and make a new shapefile with the result.It can be manually done by selecting vector->GeoProcessing Tools->Difference. But how to do it in my code? (I use python) Please help me to find a solution to this problem


title: Gdal_translate and transparent rasters in PDF

text: I am trying to make an application that creates geospatial pdf's from my website, but i am encountering problems with Gdal_translate and transparency of rasters. The setup that i am working up against is based on Mapserver, creating wms services. These services are created with image/png properties, and a predefined transparency. I would like to be able to combine these wms serices on top of a basemap in a geospatial PDF, but when i combine the layers with Gdal_translate, the transparency on the individual layers are lost. When i call the layers individually with Gdal i am quite sure the transparency is present, so i assume that the problem occurs in the process of making the overlays in Gdal. Have anybody experimented with this usage of gdal_translate against Mapserver - and have succeded in creating transparent overlays from rasters ?? Thanks in advance


title: GIS and Public Health

text: I am starting to research on the topic related to use of GIS in Public Health. I have started with Wikipedia articel http://en.wikipedia.org/wiki/GIS_and_public_health   I would like to apart from epidemic spread of disease, what are the other application areas? Currently active research groups/universities working on these topics? WHO projects? Resources that would help students researching in this area?


title: Convert list of coordinates to OGRGeometry or WKT

text: I am using a Visvalingam-Whyatt simplification script and the output is a list of coordinates such:               [[[[-10885205.10690245   3525662.26531131]        [-10885369.01690829   3525374.0741439 ]        [-10885424.08206484   3525269.35422813]        [-10885439.88685361   3525278.66051977]        [-10885600.07792469   3525092.02164548]        [-10885623.88512575   3525100.58301066]        [-10885627.28152936   3525101.52167386]        [-10885630.67801411   3525102.45679679]]]]      I would like to create OGRGeometry object from that list. Is there any function that can do that? Edit: A simple WKT would be correct.


title: How to represent bimodal attribute value distributions on a map

text: I'm looking for a visualisation method that enables me to represent bimodal or even multimodal attribute value distributions on line features. A bimodal distribution has two different modes that appear as distinct peaks in the probability density function (image #1). Mean, median and standard deviation values are of little use to describe such data. _#1 Example of a bimodal distribution:_ ![Example of bimodal distribution](http://upload.wikimedia.org/wikipedia/en/thumb/f/f2/BimodalAnts.png/800px- BimodalAnts.png) My use case is the following: For all road links in a network, I have associated speed measurements (many hundreds per link) in bimodal - sometimes multimodal (three modes) - distributions. Now, I'm looking for a way to visualize this data on a map. Besides attaching a bar diagram to each link, I haven't found any way to achieve my goal using a GIS. The visualisation results should be printable so animations won't do. _#2 Example visualisation using diagrams:_ ![Example road segments with bar diagrams](http://underdark.files.wordpress.com/2010/08/qgis_bimodal_bars.png) All ideas welcome!


title: How to export Select By Location result to Excel using Python and ArcPy?

text: I have been using ArcGIS for a few years now but have only started using Python scripting for ArcGIS for a month or so. I am trying to create a script and I am having a hard time trying to get it to work (Error after Error). In ArcGIS, I have used SELECT BY LOCATION and exported the selected records as a dBASE table into my file. I have been able to create the Python script to help me do this and also to convert it into an Excel file.               import arcpy          fc = 'Z:\\GIS TEST\\Codes\\Codes\\K.Dun\\Export_Output_2.dbf'     CSVFile = 'Z:\\Excel.csv'          fields = [f.name for f in arcpy.ListFields(fc)]          for i,f in enumerate(fields):         if f == 'Shape' or f == 'Shape_Length' or f == 'OBJECTID':             del fields[i]          with open(CSVFile, 'w') as f:         f.write(','.join(fields)+'\n') #csv headers         with arcpy.da.SearchCursor(fc, fields) as cursor:             for row in cursor:                 f.write(','.join([str(r) for r in row])+'\n')      This is fine but it requires me to manually use SELECT BY LOCATION and export the dBASE (.dbf) file before I run the script. Is there any script I can write that will allow to SEARCH BY LOCATION then export the selected records into an Excel file all in one go. I created a SEARCH BY LOCATION script but don't know how i would join them.               import arcpy     arcpy.env.workspace = "Z:\GIS TEST\Select_by_Location"          arcpy.MakeFeatureLayer_management('Bld_Locations.shp', 'Bld_Locations_lyr')      arcpy.SelectLayerByLocation_management('Bld_Locations_lyr', "WITHIN_A_DISTANCE",                                            'Breakout_Location.shp', "2000 Meters", "NEW_SELECTION")      Anyone have any ideas? Please remember my Python knowledge is very limited.


title: "add feature" tool QGIS 2.0 - polygon fill blocks view of what I want to digitize

text: How can I change the settings on the vector "add feature" tool so the tool fill doesn't block my view of what I want to digitize? This problem popped up after I upgraded to QGIS 2.0 !["add feature" polygon fill](http://i.stack.imgur.com/NQ4sG.png) QGIS 2.0 Macbook Pro OS 10.9


title: How to correctly use multipolyline with leaflet

text: I'm trying to represent one polyline with leaflet, then copy it in a multi polyline, empty the polyline, and fill it again with new data. I currently use something like:               l = polyline.setLatLngs(polyline.getLatLngs().push(line));


title: Opengeosuite 4 unable to open psql

text: When I try and open psql from the postgis menu in opengeosuite 4 on the Mac I get the following error message. “psql” can’t be opened because PostGIS is not allowed to open documents in Terminal. Anyone know how to cure this error.


title: postgis: no module named psycopg2

text: > **Possible Duplicate:**   >  psycopg2 error with QGIS 1.5 When I open DB Manager in QGIS I get what appears to be an error message at the bottom of the window:- postgis: no module named psycopg2 Can somebody help me with what is going on please and what I do next?


Where is the ArcGIS ServicePackFinder 9.3 utility found? I know it's for download, but no amount of trawling can find it.


title: TMS tile layer in ESRI ArcGIS iOS API

text: Great that this forum exists now. I hope it will thrive. Let me start by saying I did ask this particular question on the official iPhone SDK forum as well. I have seen a working example of a `TiledMapServiceLayer` subclass that overrides the `GetTileUrl(int level, int row, int col)` method to point to a TMS-compliant service. This is in the .NET API. I tried implementing               -(NSString *)tileURL:(NSInteger)level row:(NSInteger)row column:(NSInteger)column       and various variations but to no avail. Is there a workaround for this or does the ArcGIS iOS SDK just not support TMS?


title: OpenLayers, Get clustered point's val

text: I'm working on a map with WMS overlays and a lot of markers, my problem is when I try to calculate the average of points clustered, I've found how to differentiate the behaviour and the label text depending on the number of clustered elements, but I don't know how to reach the "val" value of every clustered point to calculate their average and show in the clustered point. I think values are into features.cluster array (if I look into it with .toString() I get different numbers of [object][object],[object][object] etc), but I can't understand how to reach those values. This is the context code:               context: {         val: function(feature) {             if(feature.attributes.count>1) {                [here I should show the average]            } else return feature.attributes.val;          },     [...]      And this is just some from the OpenLayers.Style code:               var pointStyle = new OpenLayers.Style({         strokeWidth: "${strokeFunction}",         fillColor: "${fillFunction}",         label: "${val}",         [...]      Don't think it's needed, but this is the point code where I set the val variable:               [...]     var pointFeature = new OpenLayers.Feature.Vector(point);          pointFeature.attributes = {              val: mks[i].m,              align: "cm"          };      (mks[i].m is the value I get from a JSON array, it's a number with decimals) I really appreciate any help you can provide, Alberto