title: Polyline to points ordered in cumulative distance from starting point

text: I have a problem with converting a line to points, where the points are ordered as the cumulative distance from the start of the line. I originally had 3 individual lines which I merged to make 1 continuous line using the `Dissolve` tool in ArcMap. However, it appears that the new line kept the features of the individual lines, because when I use the `Divide` function in `Editor` to create evenly spaced points along my 'merged' line, the points are ordered hap-hapzardly. I am seeking a way to create points from that 'merged' line so that the points are ordered as incremental distances from the start of the line. It would be rather easy if the line were straight, however it meanders, therefore just ordering the points in ascending order (based on X or Y value) would not suffice. Any ideas?


title: How to merge points (bus stops) in QGIS manually or programmatically?

text: **What I have:** I have a large data-set containing links (bus routes( (>2000) and their respective nodes(bus-stops) (>6000). The data set I received from the local bus operator is very messy. It contains multiple variations of names and multiple (nearby) locations for the same stop. There is no clear trend of these variations, so I cannot run a program (say, to merge all points within 50 m radius etc. Example in orange and yellow circle in the picture). **What I want to do:** I want to use QGIS clean the data manually. Is there a method/plugin that lets you select multiple stops and merge their locations either to one of their locations, or even a manually entered location? **Edit:** I now have ArcGIS (10.2) also, so a solution in either QGIS or ArcGIS is fine. Here is the screenshot from ArcGIS. ![enter image description here](http://i.stack.imgur.com/5Tv9W.png) The points highlighted in yellow the circle are actual locations of the bus- stops. I want to merge them into one data-point(consider it as a node), while retaining their attributes. (attributes contain information about which routes pass through the stop and what order is the bus stop in a particular route etc ). **So if these data points are like this:**   1. "Intersection xyz1 (Besides Public School)", lat1, long1, route 23, direction up   2. "Intersection xyz2 (Besides Govt. Hospital)", lat2, long2, route 23, direction down   3. "Intersection xyz3 (Besides General Pharmacy)", lat3, long3, route 87, direction up   4. "Intersection xyz4 (Besides Open Area)", lat4, long4, route 87, direction down **They should be converted to:**   1. "Intersection xyz", lat, long, route 23, direction up   2. "Intersection xyz", lat, long, route 23, direction down   3. "Intersection xyz", lat, long, route 87, direction up   4. "Intersection xyz", lat, long, route 87, direction down


title: OTB vector segmentation result is flipped

text: I'm using Monteverdi 2 to perform a mean shift segmentation on an image of an archaeological dig, to test the feasibility of automatic detection of elements. I've loaded the image in Monteverdi and defined the export feature shapefile, with all other parameters as default. The resulting shp polygon features, when viewed in QGIS, are flipped vertically as so: ![original image and flipped shapefile](http://i.stack.imgur.com/5Aloh.png) Why does this happen?


title: Add points for every 100 m at polyline (QGIS/Mapinfo)

text: I have a polyline and want to set points for every 100 m. And if possible, with unique values for each point, 100, 200, 300 etc. Can it be done? The QGIS-plugin, Sextante algoritmes "v.to points" and "v.segment" might just do that, but can figure it out. Thanks


title: Is it possible to convert QGIS QLM to SLD (w/ New Symbology)?

text: I have a QGIS project where I have created some nice styles using New Symbology. I would like to convert this to either SLD for use in GeoServer or CartoCSS for use in TileMill. I have tried saving the style as SLD directly from QGIS and a number of plugins, but I always get "`New Symbology not supported`" or "`<!--FeatureRendererV2 VectorFieldRenderer not implemented yet-->`". I have also tried a number of plugins to convert the project/layer to tilemill or a mapserver project, but no dice. Any help with this would be appreciated.


title: In what situations would SpatiaLite be selected over PostGIS, and vice versa?

text: I know that SpatiaLite is a lightweight solution. Would it be a problem if I put it on a 5K pageview/day site? Is PostGIS too resources-consuming for such usage? The dataset is something like < 100MB. Are there any other factors you would consider in cases like this?


title: Spatial resolution of Google Earth Imagery

text: What is the spatial resolution of imagery used in Google Earth? At various places on the web, I have been reading it varies from place to place - 60 cm, 2.5 m, 15 m and so on. I was wondering if there is any way/tool to find out what is the spatial resolution at a place of interest to me?


title: How to combine MapInfo tab files into one spatialite DB?

text: I have many folders, each with a collection of MapInfo tab files (each folder has the same table names). For each folder I want to merge the tab files into one spatialite DB. My current method is to use ogr2ogr to convert the tab files into shapefiles, and then use .loadshp to load each one into the DB. This truncates my column names, which is irritating. Is there a way to avoid the shapefile part of this process? ogr2ogr can convert to spatialite, but I do not know how to go about merging multiple spatialite files.


title: Best book for learning ArcGIS functionality?

text: I was wondering what the best book(s) for learning how to use most of the ArcGIS functionality were that I could use in conjunction with books on the theory of GIS since even though I can understand the concepts I still have trouble with how to use the more advanced ArcGIS features. I understand there are quite a few online tutorials but although it may sound strange, I do my best learning if I have a book in front of me. Thanks!


title: Compacting ESRI file geodatabases...good practice?

text: Is there a way to quantify the effect of compacting your ESRI file geodatabase(s) on editing performance? I currently use ArcInfo(10.0). I have a 769 MB fgdb that holds my most used/edited datalayers either in feature datasets or stand alone feature class(es) and am considering a redesign of how I have things set up for my most common workflows and editing tasks. Other than this link to the pertinent ESRI's help page, I really haven't been able to find anything pertaining to this question.


title: How to make transparent the background of a topographic map in QGis 1.8.0?

text: I'm starting to use QGis 1.8.0. I have a raster topographic map, i.e. white background and black contour lines, houses, roads and so on. I want to make transparent the white background, so if I overlap the topographic map to an aerial photo, I see only contour lines, houses and other elements atop the photos. In ArcGIS this operation is trivial. How can I do it on QGis 1.8.0? I explored many forums but I didn't find the answer. The solution is not the command "transparency" on the property window, because that command makes everything transparent. Thanks.


title: How do I download tracks from the GARMIN GPSMAP 78 usin DNRGarmin?

text: I have been able to download waypoints to DNRGarmin by accessing the GPX file. However, I have only been able to view waypoints. How can I download tracks?


title: Are there any open source Python modules compatible with arcpy that will allow complex SQL queries?

text: I am trying to handle string (non-geometry) duplicates in a large attribute table of a shapefile without having to convert to gdb and back or connect to a postgres db. I need to be able to use a count function for my query. I'd prefer not creating an output file, but rather simply updating the file itself. I've looked at the cursors but I cannot seem to accomplish what I need to with them. I essentially need to get a count for duplicates, do a comparison, and then accordingly append values of one field with the values of another field.


title: How to create a branch network from several input points to an unique outlet in minimizing the distances?

text: I am searching a way to "hydrologically" connect upstream points to a unique downstream outlet by creating an optimized stream network as pictured below... ![diagram](http://i.stack.imgur.com/Pq7cP.jpg) The cummulated lenght of the stream lines should be minimized. Otherwise the stream network should remains confined within a defined polygon... I only know the input points (red) and the output (green) and the polygon. There is no other constraints Does anyone know how to do it ?... I searched on the web all the morning but without succeed * * * No I rightly try to do it without considering the topography... Just a flat (or approx flat) surface. That's why I am searching a way for so long time :-) It is an hyopthetical area. Imagine that you are in you bath.. the water level rises up and overflow on a downstream threshold - at a corner of you bath.. Then you add a few particles at different corners of your bath (upstream) and you try now to sketch what will be their circulation to reach the threshold by forming an optimized network.. The stream network (as I draw on the right) should be minimum regarding the particles input. Am I understood ? :-)


title: Updating Mapbox map to newest API/getting markers to load

text: I'm new to the Mapbox API (and to Javascript in general), so please bear with me. I am trying to build an interactive map that automatically cycles through map markers as the user scrolls through content in a sidebar. I am basing my map off of this tutorial, and have produced a basic working map. However, Young's map was build with a much earlier version of the Mapbox API (v0.6.7, to be precise, versus the current v1.6.2). I'd like to build my map with the current version of the API so that I can implement some additional features that are only available in the this build. For whatever reason, I cannot get my marker layer to load in this new version, even after removing all of the additional JS that controls the scrolling actions. I've tried defining the GeoJSON in-text (as Young does), as well as reading in an external file, but neither approach has worked for me yet. All of my code is in this github repository, a branch of the original project. You'll find both old, working version of my map (index.html – v0.6.7) and the new, broken version (index2.html – v1.6.2) there. Please help me get my scrolling markers up and running again! Thanks in advance. UPDATE: I've managed to get my markers to load, but I'm not sure how to match their appearances to the .spot and .spot.active rules toward the beginning the program. Similarly, I'm not sure how to link the markers to their corresponding HTML sections so that the map automatically pans to them when each section becomes active (which _should_ happen when the user scrolls through the sidebar).


title: Is there anything faster than a cursor in ArcGIS to calculate records?

text: What is the most efficient (fastest) way to calculate records in a layer in ArcGIS? Is there anything faster than the Cursor in ArcGIS?


title: ArcGIS 9.3 conflict with newer Internet Explorer on Windows XP?

text: I have been told that ArcGIS 9.3 will not function on a Windows XP computer if its got Internet Explorer newer than version 6?! Is this true? Seems like a huge security hole if you can only have IE 6 on your computer. If so, how can this be fixed? Thanks.


title: I need an arcPy script for choosing objects from a table at random

text: I am trying to write an ArcPy script that will select X number of rows from a table with N number of objects in it, then output that selection to a new layer or shapefile. I need to be able to specify the number of selections I need at the time I run the script. I am using ArcGIS 10.2 and working with a point FC. Does anyone have any advice?               #import arcpy and set workspace     import arcpy     arcpy.env.workspace = "G:/583/Final/CRL_WaterSurfaces.gdb"          # set feature class and fields variables     fc = "MnEmbPoints"     fields = ["OID@"]          # list all OIDs in data set     with arcpy.da.SearchCursor(fc, fields) as cursor:         for row in cursor:             print("{0}".format(row[0]))


title: Remove all default values on multiple feature classes

text: I would like to remove default values from all fields used by all feature classes in an SDE geodatabase. I do not see a geoprocess for removing the default value, only setting it. So I am trying to set it to "". My approach is to use python to iterate through each feature dataset, then feature class, then field, and set the default value to "". Here's what I have so far:               import arcpy     from arcpy import env          env.workspace = r"Database Connections\mysde.sde"          dsList = arcpy.ListDatasets("*", "Feature")     for dataset in dsList:        fcList = arcpy.ListFeatureClasses("*","",dataset)        for fc in fcList:                     flds = arcpy.ListFields(fc,"*","String")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, "")                flds = arcpy.ListFields(fc,"*","Double")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, None)                flds = arcpy.ListFields(fc,"*","SmallInteger")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, None)                flds = arcpy.ListFields(fc,"*","Integer")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, None)                flds = arcpy.ListFields(fc,"*","Single")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, None)                 When I run the script I get an error 000735 which means a default value is required. How do I get around this (if at all possible)? Thanks!


title: Converting Lambert Conformal (x, y) of spheroid to (lon, lat) of NAD83 with proj/cs2cs?

text: **Revised Trial: Correct?** According to Andre Joost advice, I tried with "+towgs84=0,0,0", and the both two ways seem to get the same answer that mkennedy posted below. So, just to make sure, anybody can tell me whether this is correct? What would be an easy way to verify my results? And the original two ways were done as follows: The first way:               $ cs2cs -v -f '%.16f' +proj=lcc +no_defs +a=6370000.0m     +b=6370000.0m +lon_0=97w +lat_0=40n +lat_1=33n +lat_2=45n +\ x_0=900000.0m +y_0=1620000.0m +towgs84=0,0,0 +to +proj=lonlat     +datum=NAD83 +no_defs<<EOF     2340000.0 1800000.0 EOF     # ---- From Coordinate System ----     #Lambert Conformal Conic     #       Conic, Sph&Ell     #       lat_1= and lat_2= or lat_0     # +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n     # +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m +towgs84=0,0,0     # ---- To Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0     -79.8022823549574412    40.5818946695673759 869.0948340790346265      The second way step (1):               $ proj -I -v -f '%.16f' +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n +lat_1=33n +lat_2=45n +x_0=900\     000.0m +y_0=1620000.0m +towgs84=0,0,0<<EOF     2340000.0 1800000.0 EOF     #Lambert Conformal Conic     #       Conic, Sph&Ell     #       lat_1= and lat_2= or lat_0     # +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n     # +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m +towgs84=0,0,0     -79.8022823549574412    40.3918791792399077      The second way step (2):               $ cs2cs -v -f '%.16f' +proj=lonlat +a=6370000.0m +b=6370000.0m +towgs84=0,0,0 +no_defs +to +proj=lonlat +datum=NAD83 +no_de\ fs<<EOF     -79.8022823549574412    40.3918791792399077 EOF     # ---- From Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +a=6370000.0m +b=6370000.0m +towgs84=0,0,0 +no_defs     # ---- To Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0     -79.8022823549574554    40.5818946695673759 869.0948340790346265      **Original Question (unmodified)** I want to convert Lambert Conformal (x, y) of a spheroid datum to (lon, lat) of an ellipsoid datum (NAD83). I thought this could be done in two ways. The first one is to use cs2cs in one step:               $ cs2cs -v -f '%.16f' +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m +to +proj=lonlat +datum=NAD83 +no_defs<<EOF     2340000.0 1800000.0     EOF     # ---- From Coordinate System ----     #Lambert Conformal Conic     #       Conic, Sph&Ell     #       lat_1= and lat_2= or lat_0     # +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n     # +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m     # ---- To Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0     -79.8022823549574412    40.3918791792399077 0.0000000000000000      The second is to do in two steps. (1) to use proj to convert (x, y) to (lon, lat):               $ proj -I -v -f '%.16f' +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m<<EOF     2340000.0 1800000.0     EOF     #Lambert Conformal Conic     #       Conic, Sph&Ell     #       lat_1= and lat_2= or lat_0     # +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n     # +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m     -79.8022823549574412    40.3918791792399077      (2) to use cs2cs convert its datum.               $ cs2cs -v -f '%.16f' +proj=lonlat +a=6370000.0m +b=6370000.0m +no_defs +to +proj=lonlat +datum=NAD83 +no_defs<<EOF     -79.8022823549574412    40.3918791792399077     EOF     # ---- From Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +a=6370000.0m +b=6370000.0m +no_defs     # ---- To Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0     -79.8022823549574554    40.3918791792399148 0.0000000000000000      But as you can see, the first one's results are same with the second one's first step. And, the two ways produce different answers in the end. What is wrong here?


title: Automate loading a table into SDE

text: How can I automatically load a table stored on a network share into SDE when the original table is edited? Environment is ESRI 10.1 ArcSDE on SQL Server. Preference for python or existing GP tools. Table would be a csv or xlsx. Any ideas, info, or pointers would be helpful.


title: How do I georeference a ski map?

text: ![enter image description here](http://i.stack.imgur.com/nMK3Y.jpg) I have a map of a mountainous landscape, http://skimap.org/data/989/60/1218033025.jpg. It contains a number of known points, the lat-longs of which can be easily found out using google maps. I wish to be able to pin any latitude longitude coordinate on the map, of course within the bounds of the landscape. For this, I tried an approach that seems to be largely failing. I assumed the map to be equivalent to an aerial photograph of the Swiss landscape, without any info about the altitude or other coordinates of the camera. So, I assumed the plane perpendicular to the camera lens normal to be `Ax+By+Cz-d=0`. I attempt to find the plane constants, using the known points. I fix my origin at a point, with `z=0` at sea level. I take two known points in the landscape, and using the equation for a line in 3d, I find the length of the projection of this line segment joining the two known points, on the plane. I multiply it by another constant `K` to account for the resizing of this length on a static 2d representation of this 3d image. The length between the two points on a 2d static representation of this image on this screen can be easily found in pixels, and the actual length of the line joining the two points, can be easily found, since I can calculate the distance between the two points with their lat-longs, and their heights above sea level. I end up with an equation directly relating the distance between the two points on the screen 2d representation, lets call it `Ls`, and the actual length in the landscape, `L`. I have many other known points, so plugging them into the equation should give me values of the 4 constants. For this, I needed 8 known points (known parameters being their name, lat-long, and heights above sea level), one being my origin, and the second being a fixed reference point. The remaining 6 points generate a system of 6 linear equations in `A^2,B^2,C^2,AB,BC` and `CA`. Solving the system using a online tool, I get the result that the system has a unique solution with all 6 constants being 0. So, it seems that the assumption that the map is equivalent to an aerial photograph taken from an aircraft, is faulty. Can someone please give me some pointers or any other ideas to get this to work? Do open street maps have a Mercator projection?


title: Is it possible to import Openlayer data to PostGIS?

text: I'm struggled with the following problem: I'd like to import an Openlayer Layer to PostGIS in order to have the layer information for each grid point in a table. I know how to create a layer from PostGIS tables to OpenLayers using Geoserver....but not the inverse way. Please any help would be extremely appreciated Many thanks and kind regards, Rafa


title: Automating batch load of multiple GPX files into PostGIS

text: I've got 50+ GPX files that I would like to "batch load" into a PostGIS database. All of the track_points data would be loaded into a "track_points" table (with typical GPS fields like lat, long, elevation, time, etc) and the tracks data would be loaded into a similar, appropriately designed "tracks" line geometry table. I'd prefer to automate this process so that when I get my next 50+, I won't have to hand enter the data into the database. I personally prefer to use Python to script these kinds of processes, but any suggestions are welcome. My general thought process is to:   1. Get a list of GPX files to process (easy enough through standard Python tools)   2. Loop through each GPX file and extract/convert the necessary data to PostGIS format   3. Insert the GPS data into PostGIS using the psycopg Python library I think I can manage steps 1 & 3, but am wondering if there is a relatively simple method/library that would convert the data (tracks and track_points) into PostGIS format, or simply the tabular form that I could insert into the already created table. I've already read "Is there a good GPS track analysis library?", "How to build a geographic database of GPS logs?", and "How to extract .gpx data with python", and have looked into the GDAL/OGR and FWTools Python bindings, but don't want to reinvent the wheel is someone already has a good method for this.


title: How to Create a Version 10 File Geodatabase from an XML from ArcGIS 9.2?

text: A client has given me an XML document for the schema of an ArcGIS 9.2 Geodatabase. The final goal will be to create a version 10 version of the geodatabase but the client doesn't have version 10 yet. I have been trying to create a new geodatabase using this XML file but am not having any luck. So far, I have tried to create a new 9.2 Geodatabase using the Create File GDB Tool. Once I have created the version 9.2 geodatabase, I tried importing the XML file by right clicking on it in ArcCatalog. Every time I import it, I get the following error: ![enter image description here](http://i.stack.imgur.com/MtyUE.jpg) I've tried importing data as well as schema only. I've also tried importing this xml file into a version 9.3 and 10.0 geodatabase. All with the same result. XML file is about 7MB. Does anyone know why this might be happening? **EDIT:** I tried running the Import XML Workspace Document tool and it displays this error. Is the XML file corrupt? How could this have happened? **EDIT2:** The client has sent me a different XML file (the first one was opened in notepad and she thinks she may have corrupted it). However, I'm getting a seperate error now. I'm getting the following: ![enter image description here](http://i.stack.imgur.com/0R1ft.jpg) I Googled the above error and it may have something to do with the fact that the client is using ArcFM. In answer to the comments, I've opened the xml file in Internet Explorer and Notepad++ and it is definitely an XML Workspace file. It has over 100,000 lines so I wasn't keen to read it all, but wehre it says version it does say "sde.DEFAULT". I don't have SDE set up in my office, could that be the issue? Should the client export the data first to a file geodatabase?


title: Convert land-based camera image pixel x,y to ground lat/long or x,y,z

text: I have a number of cameras at various known locations (x,y,z) and directions that are above ground about 20 feet pointed at different ground locations about 100 feet away from each camera, and whose furthest fields of view (FOV) are about 300 feet. None of the cameras are pointing directly N-S or E-W. Because of the relatively short distance, I don't need to take into consideration the curvature of the Earth. I am detecting moving objects within the camera FOV and obtaining their image pixel x,y contours and centroids. How can I convert the pixel x,y locations into (initially 'flat') lat long coordinates or relative ground x,y locations? I am obtaining elevation data, so will be adding the ground height (z). Am trying to do this in Java as much as possible, so any pointers (e.g., algorithms, code libraries, etc) are welcome


title: Display colour coded road traffic data in QGIS

text: I would like to colour code a shape file containing road polylines to represent the heaviest flows of traffic. The shape file contains attribute data linked to each section of road where road traffic counts were taken (count points). There are 2 fields that contain Road names and a unique count point ID. The second shape file contains point geometry representing the location of each count point. The attribute data contains various fields including traffic numbers along each section of road, road name and a corresponding count point ID. How do I A) best combine the 2 sets of attributes to then be able to B) colour code the busiest roads in the darkest red? ![Road traffic data](http://i.stack.imgur.com/LU8yJ.png) ![Colour Categories](http://i.stack.imgur.com/VuYdx.png) ![Attribute data](http://i.stack.imgur.com/QKB4W.png)


title: Deleting duplicates from multiple tables

text: Using the delete duplicates tool is there a way in Mapbasic to have it run through a large number of tables, or do you have to manually select each table and run the tool? Cheers, Jon


title: Which plugin can draw topoJson right within Leaflet without conversion?

text: I already have asked how to reduce file size and increase performance for publishing spatial data on the web using Leaflet, here. A conversion to TopoJSON has reduced the file size by approximately 10x, which is awesome, and I thought that would solve both of my problems and world would come to peace. _Never have I been so wrong. (in the voice of Bilbo Baggins)_ The problem is, when the map is zoomed, I have to wait a while before my polygons come to resolution. Until then, the map freezes and cannot be panned or done anything for about 3-4 seconds. If I overclick the map in this interval, the Chrome tab crashes. This also happened when using GeoJSON, because I am using this client-side API that **converts TopoJSON into GeoJSON** _within the browser_. Thus, using TopoJSON reduces transferred data but does not increase the performance, because basically the browser is still reading data from the bulky GeoJSON, but I just don't see it. It's still taking up 10 times the file size of TopoJSON in the RAM, which explains the freezing. Which Plugin can **draw TopoJSON right within Leaflet without conversion** , so that a lot of space frees up on RAM? Thanks in advance. **EDIT:** Although I upvoted R.K.'s answer, I still am in search for a decent plugin.


title: How to solve "Error creating GEOS Coordinate Sequence" in Postgis?

text: When I run this query:               TRUNCATE sertaozinho.apps;          INSERT INTO sertaozinho.apps (id,tipo,the_geom)     VALUES (DEFAULT, 'app' ,(         SELECT st_union(         CASE          WHEN area.cobertura = 'lago' THEN ST_Transform(st_buffer(area.the_geom,15), 32723)         WHEN area.cobertura = 'rio' THEN ST_Transform(st_buffer(area.the_geom,100) , 32723)         WHEN linhas.name = 'corrego' THEN ST_Transform(st_buffer(linhas.the_geom,30) , 32723)         WHEN pontos.tipo = 'nascente' THEN ST_Transform(st_buffer(pontos.the_geom,50) , 32723)         END )         FROM sertaozinho.area, sertaozinho.linhas, sertaozinho.pontos         )         )      I get this output:               ERROR: Error creating GEOS Coordinate Sequence     Estado de SQL:XX000      The query is only a sequence of buffers and then an union. The dataset contains about 1000 polygons and 200 lines. I have already succeeded in running this query, but after some minor edits in the polygons it stopped working. Any clue? EDIT: Sometimes after this query the server stops and needs to be restarted.


title: Showing OpenStreetMap intersections in ArcMap

text: I'm trying to carry out a few tests on OpenStreetMap data to test its quality, using ArcGIS. One of the things I'd like to investigate involves checking that all road intersections are represented by a node, rather than two lines crossing over each other, with no node. I've downloaded OSM data from GeoFabrik, but the intersections don't seem to be marked. Does anyone have any ideas? Thank you!


title: How can I calculate different polygons by different attributes?

text: I'm doing my master thesis and want to calculate different polygons (in QGIS 1.8 for Mac) in four different columns which I defined by different attributes. i.e. some of the attributes in the first column are named "1112" and some "1113",.... So how can I calculate the area of the polygons in column "1" with the attributes "1112"? The numbers here are only examples, my thesis is about greenspaces, so it would be to complicate to explain here...all of the numbers have a different meaning and have to be joined. I need to sum these attributes to make a statement for the thesis. Can anyone please help me? Thanks a lot   Markus @M_Gebhart


title: ArcScene TIN smooth

text: I created a TIN with ArcScene out of laserscan point data. I want to smooth the spikes (image below), to get a nice crossover on the elevations of the surface. Do you have any advice how to do that? ALready tried to convert it into a raster, but i didn't know which options would be the best. ![TIN](http://i.stack.imgur.com/p89QB.png)


title: Compile Qgis source : Links errors (Windows)

text: I am actually trying to compile the source of the qgis git : https://github.com/qgis/Quantum-GIS In order to compile it, I follow the steps of the tutorial here : http://www.qgis.org/api/INSTALL.html (starting on the step 4 "Buildings on Window") I manage to configure the CMake with all the dependencies and to generate the project. To generate the project I use MSCV10 but I also tried with MSCV express 2008 like in the tutorial. In the two cases, when I generate the project, I always have the following errors : > LINK : fatal error LNK1181: impossible to open the file > '....\core\Release\qgis_core.lib' > > LINK : fatal error LNK1181: impossible to open the file > '....\analysis\Release\qgis_analysis.lib' I don't understand why the project tries to open a librairie which is not created yet to compile its code. Do you have an idea how to solve this problem ? EDIT : Apparently, the qgis_core.lib and others must be created during the build (this is why there are theses errors). But the lib is not created because of the errors : > .\flex_qgsrastercalclexer.cpp(43) : fatal error C1083: imposible to open the > hearder file: 'unistd.h' : No such file or directory Do you know how to add this header to the project ? I am not very used to MSCV Thank you very much Regards


title: Topology - To be, or not to be, that is the question

text: Topology, I mean "real" topology, is not a new concept and it's available since a long time in GRASS gis. I won't speculate the reasons myself but, after a long period of spaghetti model dissemination, recently some attention is leaning towards Topology implementation. One tool of major importance is Postgis2.0 and one great example of a kind of topology in action is openstreetmap. Qgis developers is also generating some discussion about the subject. My experience with Grass was great, there is nothing more pleasant than two areas sharing the same boundary and "edit time" topology check. This presentation also describes great advantages of using real topology. Now the question:   Considering web mapping and desktop gis and with a nice argumentation based on personal experience, industry requirements, tools available, etc. Do you think that real topology is to replace spaghetti model and be widely adopted in a near future?


title: Joining attributes of polygons and points by location in QGIS

text: I have two shapefiles....   * points containing a number field 'response_time'   * a polygon grid of square polygons containing fields including 'PNTCNT' with the number of points per polygon, calculated already using the tool 'points in polygon' There are between 0 and 600 points within the bounds of each polygon in the grid. I want to add fields to the polygon grid for the mean, min and max response times within each polygon, in addition to the PNTCNT field already there. I have tried the 'Join attributes by location' tool, making the polygon layer the target and the points the join layer, and vice versa. I've selected 'take summary of interesting features'. But I can't get the result I want. All I end up with is the polygon grid again but with an extra field 'COUNT' which replicates (or duplicates) the 'PNTCNT' field. No min, max and mean of values from the points layer. What am I doing wrong? Is there a better way to do this? I have tried this using QGIS 1.7 and 1.8.


title: QGIS Python version

text: I have brewed python 2.7.3 onto my Mac (Lion), and installed shapely via `pip install shapely`. The Polygonizer plugin, however, does not find the shapely library. I see when QGIS loads a Python console, it loads 2.7.1. Is there a way to change this? Do I need to brew QGIS to get it to play nicely with my other python libraries?


title: Setting up TileCache to make use of Mapnik and OpenStreetMaps

text: First of all, I'd say that I'm completely newb at maps related stuff... I am trying to install TileCache and configure it to use Mapnik to render tiles from OpenStreetMaps. I managed to setup the Tilecache basic CGI conf, but now I do not know how can I continue with setting up Mapnik and my own tiles because I am not able to find any tutorial on the net explaining the steps for a complete TileCache setup for OSM and Mapnik (neither in TileCache's web it is explained), and, since it is the first time I deal with WMS and maps rendering and so on, I find difficult to understand the proccess... Could somebody help me, please? BTW, I need this to run on Windows Vista/7 Thanks in advance!


title: Does Polygonize in QGIS 1.8.0 work correctly?

text: Does anyone else have issues with the Polygonize function in QGIS 1.8.0. When i use it is to extract details from larger raster images, through raster calculator, then polygonizing the resultant image. It works fine in 1.7.4 but never in 1.8.0. never asked before because i just made do with 1.7.4 Cheers. Maybe a bug issue or something but do not know where to suggest it.


title: Status of the TMS specifications

text: I am trying to implement some TMS specs as per http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification. I am particularly interested in the service discovery part ( and ). The page is very clear wrt status of the specs, ie experimental. I am wondering if it is worth implementing it at all in fact. Bottom line is that I am struggling to find a server that would actually comply to the specs above mentioned. Does anyone know of such a server? + state of the specs? should I just stick to the good old url pattern and drop all the server service discovery stuff? Thanks for any pointers, Thomas


title: How can I export an image from an ArcGIS map service where the bounding box wraps?

text: I'm trying to export maps from an ArcGIS REST Service using WGS84 and have run into difficulty when the bounding box ends up exceeding latitude 180. I was hoping that the map would wrap, but it doesn't. In some cases the resulting image ends up zoomed very far out and not anywhere I intended it to be. This is an example of where the map gets clipped where I'd prefer it wrapped. This is an example of where I've exceeded 180 and then the image is zoomed out and not on the location I intended. Using the coordinates of a location I buffer it with a rectangle for the bounding box, which means that in some cases the bounding box will overlap -180 or +180. The resulting bounding box then doesn't get my desired result. What is the correct way to get this to work?


title: Remove layers references from geoprocessing tool

text: When I run my tool it is calling some geoprocessing tools and performing some operations on some layers but when i delete those layers from arcmap then those layers are removed from arcmap but not from Geoprocessing tool. Please tell me how to remove layers references from geoprocessing tools programmatically.


title: Zip code highlighted in google map

text: When we search for a zip code in Google Maps we get the area highlighted in the map with a dotted border. How is this calculated? How do they know how to draw the polygon? I'm looking at implementing something equivalent, an overlay on each zip code of the visible area of the map. Any ideas are highly appreciated ;)


title: Find Gap between two Continuous One Way street in Road Feature Class

text: I wish to find gap in the continuity of One Way street.I have One Road(Polyline) Feature Class and one way road are represented by one column called ONE Way.If ONE WAY="Y" that means road is one way so i wish to fetch out those polylines that fall between two continuous oneway road and its ONE WAY cloumn has no value. Let me tell you , what i have done so far.Open the feature class as pfeatureclass and done query on it.Selected those features which are oneway.               prdQf=New Queryfilter          prdQf.whereclause="one way="& "YES"     prfcur=pfeatureclas          s.search(prdQf,false)          proadfeature=prfcur.Nextfeature     do until  proadfeature is nothing     pgeom=proadfeature.shape     pPolyline=pgeom     pPolyline.QueryToPoint(topt)     penvelope=topt.Envelope     penvelope.Expand(0,0,False)     Dim sPf as Ispatialfilter=New spatialfilter     sPf.Geometry=pEnvelope          sPf.GeometryField=pFeatureClass.Shapefieldname     sPf.Spatialrel=esrispatialRelEnum.esrispatialRelEnvelopeIntersects     pfc3=pfeatureclass.search(sPf,false)      Find all the edges that are intersecting it and one way is blank and then again find all intersected edges and their one way attribute. if one way value exist, that means there is gap. But its not providing the correct error.???


title: Serialize python list containing geometry

text: In simple case if list doesn't contains geometry all works fine:               result = [dict(f.fields, id=f.id, label=f.label) for f in features]     json.dumps(result)      But if `result` list contains geometry (Shapely) I get error `object at 0xb4a87bcc> is not JSON serializable`:               import geojson     result = [dict(f.fields, id=f.id, label=f.label, geom=f.geom) for f in features]     geojson.dumps(result)      If I try to serialize not list but one dict - all works fine:               geojson.dumps(result[0])      Is it possible to serialize list of dicts?


title: How to install Postgresql and postgis on Ubuntu 13.10?

text: Dear all open GIS geeks, I have upgraded my OS from Ubuntu 12.10 to 13.10. I had a clean installation of 13.10 version. Can someone please suggest which version of Postgresql and PostGIS can be installed on Ubuntu 13.10 version and how to instal it? I have looked at the steps given in How to install PostgreSQL 9.2 with PostGIS 2.0 on Ubuntu 11.10 (or higher)?? But the three repos are not adding after update. Hence that answer is not helping me.


title: Multiple Cursors

text: Below is the sql statement which I have explained below.                Declare         Cursor c1 is          select store_number ,0 as total_area,0 as BG_ID ,0 as store_geom         from table1  where CLIENT_ID= 1 and ORG_ID = 1 ;              Type C1_TAB_TYPE is table of c1%ROWTYPE;               c1_list c1_TAB_TYPE;                Begin                    For r1 in c1                     Loop                select  BG_ID,store_number,total_area                   BULK COLLECT INTO c1_list from                         (                     SELECT BG_ID,store_number,b.geometry store_geom,                    ( (SDO_GEOM.SDO_AREA(SDO_GEOM.SDO_INTERSECTION(a.geometry,b.geometry, 0.005), 0.005, 'unit=sq_mile') /SDO_GEOM.SDO_AREA((a.geometry), 0.005, 'unit=sq_mile'))*100) Total_area                     FROM table2 a, table1 b                     Where store_number != r1.store_number                     AND sdo_relate(a.geometry, b.geometry, 'mask=anyinteract') = 'TRUE');                                if  total_area=100                         then                                              For i in 1..c1_list.count loop                                     insert into temp_Prop_area_100                                     values c1_list(i);                                End Loop;                           else if                            For i in 1..c1_list.count loop                                     insert into temp_Prop_area_block                                     values c1_list(i);                                End Loop;                        End if                      End Loop;              End;      So I select a record(the biggest geometry of all three tables) from table 1 and overlay over smaller polygons from table 2. I get the list of the overlapping geometries from table 2. This may have a few of them intersecting and a few of them completely under the polygon from table 1. Then I want to put them in to two different tables . The ones that are completely under in temp_prop_area and the ones which intersect in temp_prop_area_block. Now the issue I am having is, when I get the id's for all intersecting polygons(temp_prop_area_block) I want to overlay each of this polygon over the polygons from table 3 which area smaller polygons.And similarly find out which polygons do they intesect and what is the area of intersection. The polygon size are in this order polygons from table 1 as the biggest, the from table 2 or temp_prop_area_block and then the polygons from table 3.


title: change font size of elements in dropdown menu store

text: I am creating of list of building names from a query, which then populates a dojo.ItemFIleReadStore. This store then populates a dropdown menu (using dijit.Form.ComboBox), where the user makes a selection. My problem is that I cannot change the font size of the dropdown list. I can change the font size of the placeholder in the ComboBox, and also of the final selected result, but not the font size in the dropdown list itself. Here is the HTML for the combo box:               <div id="list">       <select id="menu" dojotype="dijit.form.ComboBox"       value="autoComplete="true" placeholder="Options:" class="comboBoxClass"        required="false" onchange="executeSelectedQuery(this)">       </select>     </div>      and here is the basics of the JS for the store item:                var dataItems = {         identifier : 'name',         label : 'name',         items : values     };          var menuStore = new dojo.data.ItemFileReadStore({         data : dataItems,         clearOnClose : true     });      I can change the font-size of the placeholder with .dijitInputField and change the font-size of the result string with : input[type="text"] in css, but neither of these will change the font size of the stored drop down list of items. Ideas? (I am using ArcMap 10.0 and ArcGIS Javascript API 3.4)


title: Is it possible to automate the detection of clearcut areas in optical satellite imagery?

text: Given optical satellite or aerial imagery of a resolution similar to the image below, is it possible to accurately detect clearcut areas? Is their research or documentation that supports a specific methodology (e.g. object-oriented classification which considers contrast and geometry)? How can this process be automated over areas ~1000km^2? ![Clearcuts](http://i.stack.imgur.com/oI7n1.jpg)


title: ESRI JSON-thingie from ArcGIS online

text: I try to download a web map from arcgis online into arcgis desktop. From the site I get a file named item.pkginfo and arcgis desktop opens it. Unfortunately it only gets me the basemap image and not the features. According to the knowledgebase article 3824 from Esri, one can reach the data via the url after the tag but what i get is something looking like a long string of json-like data. (The esri-page doesnt say anything about the format one get.) Haw anyone tried to extract data from arcgis online the same way and can tell the data-format of that string? The datastring is this: http://www.arcgisonline.com/sharing/content/items/4dde65a4ffd846ff862ed6c508853e37/data?f=pjson for reference. I admit its a rather vague question but I can't really formulate it better.


title: Create perimeter from given area

text: I need to develop a web-based application to manage areas inside a bigger area. I already have the initial perimeter, and it has irregular borders like that: ![Map1](http://f.cl.ly/items/1f140A040d1K0s0j2V1d/map1.png). I will need to tell the app to create a perimeter based only in a given area.               createPerimeter(1000); // create perimeter with 1000m2      That should create a perimeter with 1000m2 adjacent to the border and to any other existing area. ![Map2](http://f.cl.ly/items/2U2b2R2S3D122v0M1x3J/map2.png). And so on. The above method should create adjacent areas until the end of the container area ![Map3](http://f.cl.ly/items/1p3z2I2T3Z2s1c3V0Z2q/map3.png). I'm looking for a solution regardless the language or platform, directions to how to start it. I believe POSTGIS has many functions that could help me, but I have not found a solution so far. Regards.


title: ArcGIS - How to programmatically create new dynamic layer for service?

text: I'm trying to create a number of widgets that will visualise different data by geographic area, e.g., the _Potential Losses for Instrument X in Year Y for the Counties of State Z._ Ideally this would be a map of the state (tick can do that) with the showing the county boarders (use javascript api to display basemap layer ) and then colour each county according to loss. :( Going down the ArcGIS route I am assuming I need to create a dynamic layer here with all of the polygons for each county of each state defined and then somehow colour them according to data pulled out of a DB showing loss for that instrument, for that county for that year. Could someone please   * A) validate that that is the correct way to go and   * B) point me in the right direction to some resources to help me learn how to achieve this.


title: How to gradient buffer a background layer

text: I have a map that was created by a contractor working for my employer before I began. I am not sure what GIS software the map was created in but it has an effect I would like to be able to reproduce in arcGIS 10.1. The map seams to have a gradient, buffered layer on the outside of the Australia coastline layer. This layer grades out from dark grey to white. Sitting off the coast in my layout view I have the Australia with the extent area showing. What I cant get is the gradient layer to gradient out behind the Aus extent part. In the maps I make the Aus is in a separate data frame and I cant make the background of that data frame transparent. I can't post the maps as I'm a new user but if someone can assist me I can send you directly the maps to explain better what I mean. Any assistance will be greatly appreciated. Cheers


title: OpenLayers Rule is not working as expected

text: I'm trying to add a rule to paint some roads of my GeoJSON file with a different style using OpenLayers. The problem is that even after adding a property "featureType" to the feature in response to the event "featureadded", the rule doesn't seem to be working. Any ideas why this happens? This if a feature example in GeoJSON format after changing the "featureType":               {         "type": "Feature",         "properties": {             "id": "42",             "state": "texto",             "featureType": "segmento_logradouro"         },         "geometry": {             "type": "LineString",             "coordinates": [                 [                     574951.47711036,                     9673700.3858644                 ],                 [                     574954.47530982,                     9673558.2712099                 ],                 [                     574814.15957496,                     9673551.0755312                 ]             ]         },         "crs": {             "type": "name",             "properties": {                 "name": "EPSG:29193"             }         }     }       And this is the code I used to add the rules:               var ruleSegmentoLogradouroStyle = OpenLayers.Util.applyDefaults({         fillColor : "#0000FF",         fillOpacity : 0.9,         strokeColor : "#FF0000",         strokeOpacity : 0.9,         strokeWidth : 5     }, OpenLayers.Feature.Vector.style["default"]);          var ruleSegmentoLogradouro = new OpenLayers.Rule({         filter : new OpenLayers.Filter.Comparison({             type : OpenLayers.Filter.Comparison.EQUAL_TO,             property : "featureType",             value : "segmento_logradouro",         }),         symbolizer : ruleSegmentoLogradouroStyle     });          var ruleDefault = new OpenLayers.Rule({         symbolizer : OpenLayers.Util.applyDefaults({},                 OpenLayers.Feature.Vector.style["default"]),         elseFilter : true     });          defaultStyle = OpenLayers.Util.applyDefaults({         fillColor : "green",         fillOpacity : 0.4     }, OpenLayers.Feature.Vector.style["default"]);          MapControl.editLayer.styleMap = new OpenLayers.StyleMap(defaultStyle);     MapControl.editLayer.styleMap.styles['default'].addRules([ ruleSegmentoLogradouro,     ruleDefault ]);


title: Plot points map of population

text: I want to plot kind of isarhytmoc points map like in this tutorial, but with population data. However, unfortunately, I have no enough skill and only came with such code:               require(sp)     require(rgdal)     require(RColorBrewer)     require(ggplot2)     library(plyr)     library(maptools)     library(rgeos)     require(gpclib)     gpclibPermitStatus()      gpclibPermit()               rus<-url("http://www.filefactory.com/file/4h1hb5c1cw7r/n/RUS_adm1_RData")     print(load(rus))     proj4.str <- CRS("+init=epsg:3413 +lon_0=105")     gadm.prj <- spTransform(gadm, proj4.str)               popul <- read.csv2(file="C:\\unempl11.txt", header = TRUE,              sep = ";",quote = "", dec=",", stringsAsFactors=F)          df <- fortify(gadm.prj, region = "ID_1")     df2 <- merge(df, gadm.prj, by.x="id", by.y="ID_1")                                   p <- ggplot(df2, aes(x = long, y = lat, group=group)) +            geom_point(data    = popul,                         mapping = aes(x=lon, y=lat, colour=abs),                       size    = 3,                       alpha   = 0.8) +            scale_colour_gradient2(name  = "Population",                                   low   = "darkred",                                   mid   = "white",                                   high  = "blue",                                   guide = "colorbar") +            ggtitle("Population in Russia)")     p + geom_path(data    = df2,                    mapping = aes(x=long, y=lat, group=group),                   size    = 0.125)      Here is the data I use, if anyone can help me with some ideas i will be grateful.


title: Multiple text formats in a qgis label

text: Is there any way to have multiple text formats in a single qgis label? I am making a map that shows mountain summits. Many of these summits have more than one name and I would like to show each name in a label and have each name rendered with different formatting to show what type the name is. For example, summits, in the US, often have an "official" name from the GNIS database, a name as shown on a 1:24000 USGS topo map (often just the elevation of the summit), and a local nickname. I would like to be able to have a label that renders each name in a different type font and/or font size.


title: How to add a legend for mapfile (Raster Data)

text: What I would like to do is shown in the figure below. How can I add this color ramp legend in a mapfile which will also be linked to a raster. I don't know how to get it working while drawing a figure based on that mapfile. Thanks ! ![ArcGIS](http://i.stack.imgur.com/8pDXY.png)


title: qgis field calculator - changing datatype

text: ![enter image description here](http://i.stack.imgur.com/oevrn.jpg)I have seen a solution that I don't get to work - I need to change data type from string to integer and I did what is shown i the image below Can someone point out what I do wrong? thx Jan


title: What percentage of ArcGIS users are using version 10.1 already?

text: I'm planning on building an add-in using ArcPy, but some of the functionality I need is only available in 10.1. I want to distribute this add-in and was wondering if making it 10.1 only would limit adoption. So would like to know what percentage of ArcGIS users are using version 10.1 already?


title: Reduce number of vector field arrows in qgis

text: OK, now that I have figured out how to get my vector fields in qgis, I can't figure out how to reduce the number of vector arrows on the map. Is there a setting for how many vectors are sampled? Thanks.


title: How can I view the Certificate of a code-signed ESRI AddIn (*.esriAddIn) without ESRIRegAddIn.exe?

text: For users with ArcGIS 10 installed, it's easy to view the certificate for a signed AddIn since it is presented to you in the Confirm Add-In file installation window. Is there a way to view this certificate information if you don't have ArcGIS 10 installed? As an alternative, can the ESRIRegAddIn.exe be copied to a computer without ArcGIS 10 and successfully run in order to view the certificate information?


title: Specifying ArcGIS Server WMS GetFeatureInfo tolerance?

text: is there a way to specify pixel tolerance when requesting feature info via GetFeatureInfo WMS request for an ArcGIS Server WMS-published map service? I have not been able to find any such information in the documentation. The OGC WMS standard does not specify any request parameters for coordinate tolerance, I just wonder if there's similar setting somewhere which could make retrieving feature info a bit more convenient for the user, especially for point features.


title: Load DTED data files into ArcGlobe

text: When I add DTED data files (*.dt1 and *.dt2) to my ArcGlobe application, they are displayed as solid gray boxes. Do I need to do something special to the files and/or the ArcGlobe control to see these properly?


title: Is it possible to query for values in fields with the column names partially matching another field's values in psql?

text: I am trying to query the values of a series of columns NAME_# with the # matching the values of another column LEVEL and then populating another column with what I retrieve


title: Tunnel distance approximation

text: Having two points (longitude, latitude) on earth, if I am sure their distance is under 100 km; how much error will I have using tunnel distance approximation? (Defined at here) Note: Currently I am using haversine formula, but since my points are normally in a 2 km range (at 99% of time and for other 1% it goes from 2 to 100 km) I think I do not need that complex calculation.


title: How to create a "Datum-less" projection in QGIS?

text: I want to use QGIS to do some georeferencing and image registration. On ArcMap10 I can define an "Unknown Projection", basically a default metric grid, and use it as a grid for georeferncing. In QGIS however, when I tried to georeference an image with GDAL, it gave me the following error: > Failed to compute GCP transform: Transform is not solvable I've looked around and figured that the problem lies with the projections. I've imported a 4 line CSV with 4 points demarcating the image extent in meters (BL 0,0, UR 450,450), but the layer properties tell me it's in WGS 84. because I do not know the actual coordinates of the image, I have to use just a basic internally coherent 5*5 metric grid, that I can georeference with corresponding marks in the image. This can only work with a datumless metric projection, which I do not know how to define (and save it as a custom defined projection) I'm new to QGIS, so the problem might be remarkably easy to solve, but after a few hours of searching, I still haven't found it. appreciate any help, H.


title: Polyline length calculation in ArcGIS 10/VB script

text: I used to run this length calc on my data in ArcGIS 8 and 9, and now it don't work in ArcGIS10. Can you tell me what I have done wrong?               Dim dbllength as double     Dim pcurve as icurve     Set Pcurve = [shape]     Dbllength = Pcurve.Length     Length = dbllength


title: How to split a polygon into quadrants?

text: I have a Alberta province (Canada) section polygon shapefile in GCS_NAD83 with 255,000 polygons. I like to split each section into 4 equal quadrants (NW, NE, SW, SE) ![enter image description here](http://i.stack.imgur.com/cC9KR.jpg) The Alberta province has several UTM zones, so I guess I can convert it to Lambert Conformal Conic or Albers Equal Area CS if the section scan be split only in projected units. There are people selling this information, but I was wondering if this is something I can create using the data I have? Please let me know. Thank you.


title: Creating Longitude and Latitude Lines in Google Maps

text: I'm working on an independent high school project where i'm trying to build a simple differential equation model for diffusion. I'm trying to overlay the model on top of a map to visualize spread, so for example, oil in water. Right now I have a rectangular box that have the coordinates of ( 31.0195,-102.8072) NW, (19.2019, -102.8072) SW, (31.0195, -75.3963) NE, and (19.2019, -75.3963) SE. I am trying to build a 2D array of lat/long coordinates spaced evenly. For example, an array of lat/long coordinates that are 500m apart. Is there a formula/algorithm where I can convert these coordinates to a distance, break the distance up into 500m chunks, and then get lat/long coordinates along the way (i.e. so I have lat/long coordinates every 500m)? Thanks


title: Using Fiona to write a new shapefile from scratch

text: I am new to Fiona, and trying to wrap my head around reading a csv file and writing out an ESRI shapefile. I have most of it down, but am missing two things; (1) defining the projection/spatial reference and (2) the attributes actually being populated with the values from the csv file. So my questions are: 1. How do I define the spatial reference, either by defining an EPSG or a custom projection 2. Why is my data not writing as attributes? Thanks in advance for any guidance.               import csv     from shapely.geometry import Point, mapping     from fiona import collection     from fiona.crs import from_epsg               schema = { 'geometry': 'Point',       'properties': {'dx': 'float:13.3',                 'dy': 'float:13.3',                 'dline': 'str',                 'dtrace': 'int',                 'ddepth': 'float:9.4',                 'dtrash': 'float:9.4',                                'sx': 'float:13.3',                 'sy': 'float:13.3',                 'sline': 'str',                 'strace': 'int',                 'sdepth': 'float:9.4',                 'strash': 'float:9.4',                                  'bx': 'float:13.3',                 'by': 'float:13.3',                 'bline': 'str',                 'btrace': 'int',                 'bdepth': 'float:9.4',                 'btrash': 'float:9.4',}}          with collection(     shapeout, "w", "ESRI Shapefile", schema) as output:     with open(finalout, 'rb') as f:         reader = csv.DictReader(f)         for row in reader:             point = Point(float(row['dx']), float(row['dy']))             output.write({                 'properties': {'dx': 'float:13.3',                 'dy': 'float:13.3',                 'dline': 'str',                 'dtrace': 'int',                 'ddepth': 'float:9.4',                 'dtrash': 'float:9.4',                                'sx': 'float:13.3',                 'sy': 'float:13.3',                 'sline': 'str',                 'strace': 'int',                 'sdepth': 'float:9.4',                 'strash': 'float:9.4',                                  'bx': 'float:13.3',                 'by': 'float:13.3',                 'bline': 'str',                 'btrace': 'int',                 'bdepth': 'float:9.4',                 'btrash': 'float:9.4',},                 'geometry': mapping(point)             })      With the code updated to the "newer" (aka, not outdated) process:               with fiona.open(shapeout, 'w', crs=from_epsg(3996), driver='ESRI Shapefile',                  schema=myschema) as output:     with open(finalout, 'rb') as f:         reader = csv.DictReader(f)         for row in reader:             #geometry             point = Point(float(row['dx']), float(row['dy']))             #attributes             prop = {'dx': float(row['dx']),                     'dy': float(row['dy']),                     'dline': str(row['dline']),                     'dtrace': float(row['dtrace']),                                         'ddepth': float(row['ddepth']),                                         'dtrash': float(row['dtrash'])},              print{'geometry': mapping(point), 'properties':prop}      Gives me this:               {'geometry': {'type': 'Point', 'coordinates': (-245215.3333, -975226.3333)}, 'properties': ({'dtrace': 24387.0, 'ddepth': 1433.2458, 'dtrash': 1433.25, 'dx': -245215.3333, 'dy': -975226.3333, 'dline': '      lsl0904.201302'},)}     {'geometry': {'type': 'Point', 'coordinates': (-245215.0, -975251.0)}, 'properties': ({'dtrace': 24386.0, 'ddepth': 1432.7268, 'dtrash': 1432.73, 'dx': -245215.0, 'dy': -975251.0, 'dline': '      lsl0904.201302'},)}      But as soon as I change to:               output.write({'geometry': mapping(point), 'properties':prop})      I get the error message: AttributeError: 'tuple' object has no attribute 'keys'


title: Running algorithm from Processing takes much much longer time than doing it from Qgis GUI

text: I have a road layer with 32000 features, and I want to find all the intersections. when I use processing->SAGA -> convert polygon/line vertices to points, it is all done in less than 5 seconds. However, when I try to do the same thing in PyQgis:               vlayer = QgsVectorLayer("Point", "temp_points", "memory")     c=processing.runalg("saga:convertpolygonlineverticestopoints",layer,vlayer) # get intersection points      it takes about 15 minutes. I would appreciate any help on this.


title: Fastest way to merge a feature

text: I am writing a arc engine application that can take a shapefile, and merge a set of polygons together. Here is the code that I am using to merge the polygons:               private static void mergeFeatures(IFeature merger, IFeature mergee)     {         ITopologicalOperator union = (ITopologicalOperator)mergee.Shape;         mergee.Shape = union.Union(merger.Shape);         merger.Delete();         mergee.Store();                 }      Is this the best solution to merge polygons? In my application this part of my code takes 60% of the execution time. Is it slow because I am using a shapefile? Does a file geodatabase help with this? Or is this even just the totally wrong approach for merging polygons. Just to clarify, I am taking a large set of polygons and am trying to merge ones under a certain number of acreage. From these polygons that are small, I need to merge polygons with similar attributes (for example on a vegetation layer, ones that are similar vegetation.) So this can incur a large number of small polygons getting merged together, and eliminating some of the merges can be difficult. If there is an easier way to bulk merge, then that would be best, but thus far, I have not found one.


title: Does IDistanceOP.EucDistanceFull require a projected coordinate system?

text: I have designed an implementation of ArcObjects' IDistanceOP.EucDistanceFull. It takes its input as a feature class and converts it to a GeoDataset with which EucDistanceFull can work with. It works fine with feature classes in projected coordinate systems, but doesn't execute property on feature classes with unknown or geographic coordinate systems (It will output a blank or black raster). What could be the issue here? I don't see anywhere in the library documentation that states that EucDistanceFull requires projected coordinate systems.


title: Change default leaflet marker color

text: I'm using esri-leaflet, and leaflet inherently to add a point feature class (geojson) to a map. What is the best way to add and style the layer? I've see pointToLayer on the leafletjs.com, but don't want to use the circleMarker. Below is a code snippet of what I am working with at the moment:               new L.esri.featureLayer(schools, {         style: function (feature) {             return{                 weight: 2,                 opacity: 1,                 'marker-color': '#FFF'             }         },         onEachFeature: function (feature, layer) {             layer.bindPopup(L.Util.template(m_template, feature.properties));         }     }).addTo(map);      I would like to use AwesomeMarkers, but I don't know how to implement that with a featureLayer. From my understanding featureLayer extends L.GeoJson. The 'marker-color' has not worked. A live preview of this is available HERE


title: How to capture accurate GPS points using mobile devices?

text: I'm currently working in Vietnam as a climbing guide, but am putting my GIS skills to use by doing a side project for the company involving the mapping of climbing routes. Along with another employee who is an app developer, our goal is produce a digital guidebook for the area. For this project to work for me, I need to be able to take fairly accurate GPS points, as there are features just a few meters ap[art from each other that need to be distinguishable, but obviously survey grade equipment is not and option for me here. I've been using the app GPS Averaging to take several hundred points for each location. Despite taking these averages, I'm having very little luck achieving accuracy in my output points, and I suspect my precision is low as well because the in app reported error gets very low (0.8m) after about 20 collected points, then goes up to about 3m after 200-300 collected points. However when I import these points, the actual errors appear to be well beyond 3 meters. What can I do to improve GPS point accuracy from a mobile device? Any suggestions would be hugely appreciated. I've currently only worked on this with android devices, but have access to ios devices too if they provide superior GPS chips.


title: Difference between 10.1 and 10.2 Map/Feature Service layer ID's?

text: I noticed that when I set up a 10.2 ArcGIS server and published a map service, the layer ID for the dynamic map service was zero, but each of the FeatureLayers underneath started with 1 and continued on. I wrote some code which made the assumption that the first feature layer started with a 1, but when I tested my code with a 10.1 server, it didn't get the first feature layer since it started with 0. Is this a dependency that changed from 10.1 to 10.2? Thanks for any help :) For now, I will (and should have before) try to handle both cases.


title: How to display a layer's label source column?

text: I have a CSV layer that displays points on the map. I use one of the columns as the Label. In Print Composer I would like to display the name of the column used to generate layer Labels. Is this possible? **Update (additional information)** I have a CSV data source in this format:               Id        Lat        Long        PropA        ProcB        PropC        ...     1         11.1       33          456          45           10.3     2         11.2       33          123          75           13.4     3         11.3       33          345          85           14.5     4         11.4       33          678          95           15.6      At the moment, for each column PropA... _N_ , I do this:   1. Update layer Label to Prop ** _N_**.   2. Update text description label in Print Composer.   3. Save map as a PDF. I will be grateful for help automating these steps!


title: MapInfo cannot save in MWS format

text: I'm using MapInfo 11.0.4 Release Build 404 Whenever I want to save a workspace file in the MapInfo workspace format (*.mws) it saves the file as expected and with the right file extension. However, when I look at the content of the file in a text viewer, I can see that it is a .wor file in reality. It's not saving with the XML format that should be in a *.mws file. Since there is no other way to save workspace I cannot create the MWS format at all and I need it to use with the MapInfo Spacial Server product. Any help would be appreciated.


title: Using PROJ.4 library to transform from local coordinate system coordinates to global coordinate system using ground control points?

text: I have a point cloud whose coordinates are with respect to a local coordinate system. I also have ground control points with GPS values. Can I convert these local coordinates to a global coordinate system using PROJ.4 or any other library? Any code in Python for the above stated problem would be a great help.


title: gdalwarp not clipping neatline properly

text: I have a PDF file (10mb) which contains a NEATLINE polygon in metadata.               $ gdalinfo I5601_GeoPDF.pdf      > Driver: PDF/Geospatial PDF Files: I5601_GeoPDF.pdf Size is 5906, 3543 > Coordinate System is: PROJCS["UTM Zone 56, Southern Hemisphere", > GEOGCS["GDA94", ... GeoTransform = 128363.7573358897, 42.324133621968, > 0.8865642156959999 6471730.899290663, 0.8865642156959999, -42.324133621968 > Metadata: CREATION_DATE=D:20080515105609+10 CREATOR=BAE SYSTEMS MapMaker.exe > 2.9.830.19227 **NEATLINE=POLYGON ((191125.203093351592543 > 6340529.201165121048689,188350.332458852295531 > 6473000.141725543886423,378308.662319099530578 > 6476979.201503321528435,381083.532953590154648 > 6344508.260942890308797,191125.203093351592543 6340529.201165121048689))** > ... Now if I extract the NEATLINE data into a .cvs and use gdalwarp to cut it:               $ for i in *.pdf; do gdalinfo $i|grep NEATLINE | awk -F= '{print "id,WKT\n1,\"" $2 "\""}' > $i.csv; gdalwarp -crop_to_cutline -cutline $i.csv -overwrite $i $i.tif; done      I get a geotiff that isn't clipped correctly: picture of results I've tried this on US 250k maps and it works. I'm wondering whether anybody can tell me if I'm doing something wrong, or is the metadata in the PDF wrong ?


title: What are mystery green lines in Layout View produced during ArcObjects script execution?

text: Could any of ArcObjects guru tell me, what are these green lines on my Page Layout and what to do, or not to do, so they do not appear? See image attached. I do used ArcObjects from Python. My script is converting data frame grids and graticules into graphics. As result I receive Group Element from which I need to extract single elements (text, lines etc.) in order to play with them. However, after this operation (which is carried out for 3 separate grids) I receive those mysterious green lines, which are not part of GraphicContainer. Actually, green lines appear only after conversion and extraction from one- graticule (WGS). There is some guidance **here** about how to get rid of them, which works (cut and paste or delete and undelete all page elements). However, I would still like to avoid them in the first place. Also, after some configurations of cutting and pasting I figured that green lines do vanish when those 3 image elements (lower right corner) are deleted and restored. Code suspected to be responsible for this:               pGCL.Reset() #reset graphics containere     pElem = pGCL.Next()     while pElem:      pEP3 = CType(pElem, esriCarto.IElementProperties3)      if pEP3.Name == '' and pEP3.Type == 'Group':       pGE = CType(pElem, esriCarto.IGroupElement3)       pGE_no = pGE.ElementCount       for i in range(pGE_no):        if pGE.ElementCount > 0:         pGEe = pGE.Element[0]         pGCL.MoveElementFromGroup(pGE, pGEe, 0)        else: break      pElem = pGCL.Next()      I know there is some discussion going on, whether GIS.SE is appropriate place for such technical, software specific questions. I apologize for this, however, I did not found satisfactory answer anywhere else. ![Green lines in page Layout](http://i.stack.imgur.com/PjY4B.jpg)


title: Easy Extraction of features from a Feature dataset ( Not feature class)

text: My Feature dataset (residing inside a GDB) contains more than 30 feature classes and every month I like to extract features from this GDB based on one attribute, which is repeating in all the feature class : Eg : Job_Month = "May" Is there any tool available in ArcGIS, which will extract all the features in a Geodatabase ( or Feature dataset) at one time using an SQL . The extract data wizard does not have any filter/Sql for the attributes. Expected simple solutions, but seems not an easy one..


title: Mapserver + tilecache + openlayers attribute search

text: I'm using Mapserver + tilecache + openlayers for my web map application.   I'm using Mapserver as a WMS Server.   Now, I want to perform an attribute search, i.e. type something and the application searches for the text in the database (which is postgresql + postgis). The result should be shown in a table and also on the map with markers.   I have created a control for that, but I'm not sure how to perform the search and retrieve the results.   The solutions I'm currently thinking on:   1. Use GetFeatureInfo on Tilecache (although I'm not sure whether tilecache supports it)   2. Use GetFeatureInfo on Mapserver WMS   3. Write a Python application that performs the query and passes the answers to OpenLayers and I make the required adjustments to show it how I want.  Any idea will be greatly appreciated.


title: How to restore default values in Mapserver?

text: I'm using Mapscript reading a configuration of my map file, so i set some values in my mapObj. But in certain point of my code i need to restore the default values locate in map file. I tried to use the method "applyConfigOptions()", but didn't work. Is there a way to do that?


title: QGIS very slow startup on Mac

text: I am experiencing startup times of c5 minutes (!) for QGIS 1.8 on my Mac Mini with 2.4GHz processors and 8G RAM. I have just 4 python plugins and only a handful of shapefiles/data layers so I can not see why every start takes 5 minutes from clicking on file to having something showing on screen. Is this normal for QGIS or is there some mysterious solution? I have searched on Google, various forums (fora) and discussion boards etc but no solutions. Any help gratefully appreciated! Eric


title: Assigning Probability to cells

text: I am working with the image below and I am trying to find how many pixels are in the grey corners of the image, and I want to assign them a probability of 5%. The bottom layer is my DEM and the top layer is a raster of distances. I know how many pixels I have on my raster layer, however I am not sure of how I can get the pixels outside of the circles and how to assign those pixels a probability. I would appreciate any help I can get! Image Link


title: Why can't I access a table in a personal geodatabase (.mdb) with arcpy after installing 64-bit geoprocessing?

text: I wrote and ran a simple script last year - it cycled through some line features, buffered them and then intersected with some other lines - it all worked fine. I'm now trying to tweak the file to use a larger buffer, and it's not finding the database I am using to manage the loop and store the results. This code:               rows = arcpy.SearchCursor("C:\\CEDAR_GIS\\SPEEDY3_GPS_DATA\\shapefiles\\Analysis\\Intersections.mdb\\final_to_school_routes_LINES")       results in this error:               Traceback (most recent call last):       File "C:\CEDAR_GIS\SPEEDY3_GPS_DATA\shapefiles\Analysis\GISbuff-GPSline_IntersectionTS.py", line 29, in <module>         rows = arcpy.SearchCursor("C:\\CEDAR_GIS\\SPEEDY3_GPS_DATA\\shapefiles\\Analysis\\Intersections.mdb\\final_to_school_routes_LINES") #opens search cursor on Overlays_to_run       File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\__init__.py", line 1133, in SearchCursor         return gp.searchCursor(dataset, where_clause, spatial_reference, fields, sort_fields)       File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 359, in searchCursor         self._gp.SearchCursor(*gp_fixargs(args, True)))     IOError: "C:\CEDAR_GIS\SPEEDY3_GPS_DATA\shapefiles\Analysis\Intersections.mdb\final_to_school_routes_LINES" does not exist      But that table is in that database, and when I ran the script last year there was no error. I have since upgraded to ArcGIS 10.1 with SP1, which I think meant an upgrade to python. Has there been a change in the handling of .mdb files, or am I doing something stupid?


title: How to select features by matching attributes of two SHPs?

text: I have one line shape file with lot of road sections and a point shapefile, some of these points are outside my area of interest. The files have one attribute in common and I would like to do selection, where I select only those points that have matching attribute value with the line shape file. Is this possible in some meaningful way? * * * I believe that in this particular case I could do line buffers and use those to select the point in buffer area - but I was wondering if its possible to match the values "straight away" with each other.


title: Concatenate only when all fields to be concatenated have values

text: I have two fields that I want to concatenate. Field1 contains null values and Field2 has values for every record. I want to concatenate only when both fields have values. I tried using a function with an `if/else` statement but that doesn't work as the resulting concatenation will return values from field2.               def concat_fields(field1, field2):         if field1 == ""             return               else:             return field1 + field2      I know this is wrong. Any suggestions? EDIT: ![enter image description here](http://i.stack.imgur.com/smd57.png)


title: Which spatial DBMS should I select?

text: I found there are a number of RDMS have the spatial capability e.g. mysql, postgreSQL I considering which I should go forward! I would like to store the lat lon coord from the tracker to the db and make a query to find the nearest place or compare with the defined location. Could anyone give me an idea on this topic? Thanks a lot.


title: gdal_merge.py aligns incorrectly at the seam of two GeoTiffs

text: I am trying to merge four GeoTiffs from the National Elevation Dataset (EPSG: 4269) into a 2x2 DEM using gdal_merge.py. For some reason, when it merges the upper two NED rasters, gdal produces a seam between the two of approx. 1 px that it fills with incorrect values (either 0 or some large negative number). It seems like this is probably an alignment issue. How can I eliminate this artifact? Thanks for the help.


title: Problems combining (union) Multipolygons in geodjango

text: I'm using geodjango and postgis (1.x),   What is the best way to combine (union) a list of multipolygons. in what i assume is rather inefficient i'm looping trough like this               combined = multipolygon          for item in items:          ____combined = combined.union(item.geom)  #geom is a multipolygon      Usually this works fine, but often i'm getting the error Error encountered checking Geometry returned from GEOS C function "GEOSUnion_r". Here is the geo json version of the item the error is thrown on if it helps               { "type": "MultiPolygon", "coordinates":      [ [ [ [ -80.077576, 26.572225 ],            [ -80.037729, 26.571180 ],            [ -80.080279, 26.273744 ],            [ -80.147464, 26.310066 ],            [ -80.152851, 26.455851 ],            [ -80.138560, 26.538013 ],            [ -80.077576, 26.572225 ]      ] ] ]      }      does anyone have anyideas? the end goal is to take find all the locations (another table) which fall within this list of n polygons (using coordinates__within=combined_area) thanks in advance for any help.


title: OpenLayers - setting opacity ti a webservice layer (if statement)

text: I've got an openlayers application which calls the layers from MSSQL via a webservice. The problem is that I want to set an opacity level for one of the layers (If layer name = X, set opacity level to Y). How do I do that ? Thanks Lauren.


title: Looking for a simple method to find the shortest path with Shapefiles

text: I am having shapefiles for a particular map location, the shapefile consists of points and polylines. Now I want to find the shortest path between the points. What is perfect and simple method to find shortest path.


title: How to visualize pgrouting query results in mapguide open source

text: I would like to make a spatial query using postgis 2.0 and pgrouting 1.05 then visualize results in Mapguide open source.Any suggestions?


title: GeoServer Where clause filter

text: I use postgis, geoserver and openlayers for gis development. I simply reach from goeserver to postgis table or view and show it with openlayers. but I need some filtering operation on my spatial data. For example I have historical spatial data and filter them to start_date and finish_date like               select ....... from ...... where date between :start_date and :finish_date      the problem is start_date and finish_date are dynamic. User change them from web my open layer web project. How can I do it? from geoserver?from postgis or openlayers? thanks


title: Map algebra from QGIS python console?

text: What command do I use to do map algebra on rasters from the QGIS python console?


title: Beginning Arcpy: Asking for a quick review of my script

text: I cobbled this code together from ESRI documentation and stackexchange answers. I tried to use SearchCursor(points, fields=fieldname) but I get this error: > TypeError: SearchCursor() got an unexpected keyword argument 'fields' I'm > not sure why this doesn't work.                   # Local variables:         points =  arcpy.MakeFeatureLayer_management("C:\\alltogether.shp")         homebase_shp =  arcpy.MakeFeatureLayer_management("C:\\homebase.shp")                   fieldname = "Device"         Device = arcpy.AddFieldDelimiters(points, fieldname)         delimitedfield = arcpy.AddFieldDelimiters(points, fieldname)         devices = set([row.getValue(fieldname) for row in arcpy.SearchCursor(points)])              for i in devices:                 attr_sel = arcpy.SelectLayerByAttribute_management(points,"NEW_SELECTION", delimitedfield + " = " + str(i))                 totalpts = arcpy.GetCount_management(attr_sel)                      # Process: Select Layer By Location                 inside_sel = arcpy.SelectLayerByLocation_management(attr_sel, "WITHIN", homebase_shp, "", "SUBSET_SELECTION")                 insidepts = arcpy.GetCount_management(inside_sel)                      print "device %d has %d total points and %d inside the base" % (int(i),int(totalpts[0]),int(insidepts[0]))      a comment I saw earlier suggested doing it with fields= > Since you are only interested in one field, for better performance I would > specify the >optional fields argument, e.g. myList = > set([row.getValue(fldName) for row in >arcpy.SearchCursor(fcName, > fields=fldName)]) – blah238 Jan 29 '12 at 1:03 Select distinct values from a single column of an attribute table (or layer)


title: mysql database of bars, pubs and restaurants in the united states and maybe canada

text: I am mostly seeking Bars and Pubs but Restaurants are a very nice bonus. I need a database with zipcode, city, state, longitude, latitude, establishment name, establishment contact information, maybe a category with sub categories if it's restaurants as well. I found one with Oddity Software. But after closer inspection after buying it, the database was garbage. It had very long obtrusive category names and/or sub category names, that would make indexing it for any need a royal pain in the arse. Then it had so many entries that were not restaurants, pubs, or bars.. like auto repair centers, and a minimum of at least 80 categories/sub categories that made no sense to the type of database it claimed to be. All of which had multiple entires with that category/sub category that didn't apply. So I see all these new sites popping up here and there trying to be like yelp or doing something completely different like I want to do. However I don't know where these people are getting their initial databases from. I thought Oddity Software would be my golden fix until I purchased it, found out what I found out about it, then they refused to discuss things further with me. So I am wondering here today. Who knows of a database similar to that of which I seek?


title: Pros and Cons for developing GIS functionality in ArcGIS Web API (Silverlight) or ArcGIS for Desktop

text: I have an application coming together using the ArcGIS Server API for Silverlight. The app, currently, takes in two geometry points from the user and passes the geometry to an ArcGIS Elevation server online to get elevation values. Then the SL client sends the data over to an internal ArcGIS Server to do custom slope calculations and linear referencing on a semi-static polyline with a gp service. What are pro and con arguments to move the UI from silverlight over to desktop application. Perhaps a C# extension/addin that allows the user to select points similar to how they interact in the web map. And documentation or white papers on the subject. This would be strictly an ArcMap centric dev question. Now it is an internal app. But deployment issues would be a good topic. As well as maintenance and complexity of development. Any others points would be very welcome as well. I guess this may not be a strict question to get an answer to maybe it needs to be moved?a Thanks.


title: Dynamically adding WFS layer features with Geoserver

text: I am investigating using Geoserver to output new WFS layer features dynamically. We have a backend process that will be generating new WFS features periodically that will be placed in a datastore (most likely PostGIS). I plan on creating a WFS layer for the feature data in PostGIS. The idea is to have the backend process dynamically add new features into PostGIS and my expectation is that clients making WFS features requests using Geoserver will get the new feature data I am adding at runtime. Is this the case? I can't seem to find any documentation discussing what happens when the datastore's data is updated.


title: Does CopyFeatures from in_memory via Python script tool cause General function failure for you?

text: The Python code below looks pretty straightforward.               import arcpy          if arcpy.Exists("D:/temp/test.gdb"):         arcpy.Delete_management("D:/temp/test.gdb")          if arcpy.Exists("in_memory"):         arcpy.Delete_management("in_memory")          arcpy.CreateFileGDB_management("D:/temp","test","CURRENT")          arcpy.CreateFishnet_management("D:/temp/test.gdb/test","0 0","0 1","1","1","1","1","#","NO_LABELS","#","POLYGON")          arcpy.CopyFeatures_management("D:/temp/test.gdb/test","in_memory/test2","#","0","0","0")          arcpy.CopyFeatures_management("in_memory/test2","D:/temp/test.gdb/test3","#","0","0","0")      and when I run it on a PC (ArcGIS 10.0 SP2; Windows XP SP3; 32bit) it completes in 4-5 seconds. This is the case when I run from IDLE or as a Python script tool in ArcMap (where I added it to a toolbox with no parameters). However, when I move it to a virtual server (ArcGIS 10.0 SP3; Windows Server 2008 R2 Standard; 64bit) it still runs fine from IDLE, but when run as a Python script tool in ArcMap it just sits at:               Executing: test     Start Time: Thu Mar 15 10:31:50 2012     Running script test...      When I move the tool I find a small Error dialog with a white "i" in a blue filled circled. To dismiss that dialog I click the OK button and/or the "x" at its top right. When it goes, a second Error dialog appears - this time with the text below:               General function failure [test3]      The Python test code provided here has been stripped out from a much larger tool that I need to publish as a Geoprocessing Service, which in turn requires that I save it as a tool layer within a map at 10.0 (10.1 won't be an option for quite a while). The culprit seems to be the CopyFeatures from the in_memory workspace which will take some working around, and if I need to eliminate in_memory from this polygon overlay intensive application, then its performance is going to take a big hit. **Would someone be able to run the same test as I describe above on a virtual server (it may also manifest on a physical server but I don't have one to test on) running ArcGIS 10.0 and Windows Server to see if they can reproduce what I am seeing, please?** If it works, or if it does not, can you specify your ArcGIS and Windows versions and whether you ran it on a physical or virtual server, please?


title: Exposing ArcInfo level liscenses to ArcView desktops via ArcGIS Server and custom python script tool

text: I have a script that uses an ArcInfo level tool. The script works great on my machine but uses an ArcInfo level tool which the ArcView users don't have. Is exposing these ArcInfo level tools possible throught ArcGIS server? What I am having trouble conceptualizing is how my python script tool will call that gp service. Please help me think through the liscensing and calling the gp service from a custom python script tool on the toolbox. I have ArcInfo, I added the tool to arcmap's TOC saved the mxd and opened the tool and ran it once. I then published the tool throught ArcGIS Server. I am stumbling on how to proceed. Thanks.


title: How to calculate line centroids for 460,000 features?

text: I have a large shapefile of lines, and want to run a mmqgis function (Plugins --> mmqgis --> Modify --> Convert Geometry Type.) The problem is the file is very large and crashes the program. What options do I have? Would running it as background python script work (and if so how do I find the commands for mmqgis function?)? There are 460'000 features and i'm running a 3.40GHz i7 with 12GB of RAM. Is there a way of this not breaking down?


title: Near / Near Table creates -1 values

text: I have two feature classes.   1. Point feature of hand-sampled GPS locations   2. Line feature of terrace walls digitized from aerial photograph. ![sample points and terrace walls](http://i.stack.imgur.com/1rhft.png) Because of the less than perfect ways I generated these features, I need to allocate each GPS point to the nearest terrace wall from which I sampled it. I defined the Input as the Point Feature, and the near feture as the terrace lines. ![near tool](http://i.stack.imgur.com/X8Pmq.png) But the process fails to generate results. If it's a Near Table, then it's an empty one, and when I use the Near Tool itself on the point feature, it adds two fields with -1 in them. ![Point feature with -1](http://i.stack.imgur.com/lO7oZ.png) When I run the tool on the features in an opposite way, it does generate results, and for every terrace walls gives me the nearest point - obviously, not what I'm looking for. Any idea why the process fails? HDunn.


title: How to add Shapefile to map?

text: How to Add Shapefile to map in ArcGIS Silverlight application runtime ? I published the shapefile feature as map service on arcgis server and consumed it my SL Application through the service Url but the shapefile feature does not added to the map .. what's wrong?


title: How to open *.aux file in QGIS?

text: My university desires to switch from using ArcGIS to using QGIS and therefore I have to figure out whether the exercises that are used in lectures can be performed using QGIS. I have an .AUX file that can be used in ArcGIS. When I want to open this file in QGIS, the file shows up in the layers list but no image is drawn on the canvas. Also, there is no attribute table. In ArcGIS, there is an image drawn and there is an attribute table. What could cause these differences and how to overcome this problem? Thanks


title: ArcGIS - Dimension Feature problems

text: I would like to use the Dimension Feature tool in ArcGIS - this button ![enter image description here](http://i.stack.imgur.com/Qt5hE.jpg) as I want to have a label on every side of some polygons (they are all reasonably simple polygons). When I click on my polygon to add the dimensions (and don't move or click the mouse again), they come up like this which is how I want them: ![enter image description here](http://i.stack.imgur.com/hdWfQ.jpg) However as soon as I click the left mouse button to place them, they go like this: ![enter image description here](http://i.stack.imgur.com/VpcTD.jpg) Am I missing an option somewhere? it does not allow me to select 'Dimension Feature' in the Construction tools section of the create features dialog. Its only available as a button (that I found by adding the button manually). The closest construction tool I can select is Dimension Edge, but that means I have to add dimensions for each edge of the polygon. Its a slower process.


title: Installing ArcGIS 10.1 on SQL Server 2008 R2 Cluster

text: We're running into some performance issues when accessing large enterprise geodatabases on a SQL Server 2008 R2 cluster. The database itself performs well and returns queries fine but presenting the information back to ArcGIS for Desktop 10.1 is prohibitively slow. Connection is direct connect. Data type in SDE is DBO. Machines are VMs with 16Gb RAM. Are there any tips or tricks or known documents for installs of these on SQL Server clusters where a node instance is presented? Thanks Doylersa


title: Arcgis IPolygon(System.__comObject) and ILine2 (Esri.Arcgis.LineClass) intersection

text: Currently i am developing a Server Object Extension. On my project i am creating a new line class with LineClass myLine = new LineClass(); and getting a polygon from client as JsonObject than converting this polygon to IPolygon with               JsonObject jsonFieldPolygon;     if (!operationInput.TryGetJsonObject("field", out jsonFieldPolygon))          throw new ArgumentNullException("field");     IPolygon4 fieldGeom = (IPolygon4)Conversion.ToGeometry(jsonFieldPolygon,esriGeometryType.esriGeometryPolygon);      Polygon i have converted from jsonobject is becoming a com object, but line i have created is a class in my own application space. Thus i cant do operations with these two geometries, i guess both must be com object for operations like intersect and etc. I am getting an access violation when i try to intersect these 2 geometries. my code is below               JsonObject jsonFieldPolygon;     if (!operationInput.TryGetJsonObject("field", out jsonFieldPolygon))         throw new ArgumentNullException("field");     IPolygon4 fieldGeom = (IPolygon4)Conversion.ToGeometry(jsonFieldPolygon, esriGeometryType.esriGeometryPolygon);          JsonObject jsonFieldPath;     if (!operationInput.TryGetJsonObject("fieldPath", out jsonFieldPath))         throw new ArgumentNullException("fieldPath");     IPolyline fieldPathGeom = (IPolyline)Conversion.ToGeometry(jsonFieldPath, esriGeometryType.esriGeometryPolyline);          ITopologicalOperator myOp = (ITopologicalOperator)fieldGeom;          IGeometry resultGeom = myOp.Intersect(fieldPathGeom, esriGeometryDimension.esriGeometry1Dimension); // this line works because both geometries are com objects               IPoint startPoint = new PointClass();     IPoint endPoint = new PointClass();     LineClass myLine = new LineClass();          myLine.SpatialReference = fieldGeom.SpatialReference;     endPoint.SetEmpty();     startPoint.SetEmpty();          startPoint.PutCoords(fieldGeom.Envelope.XMin, fieldGeom.Envelope.YMin);     endPoint.PutCoords(fieldGeom.Envelope.XMax, fieldGeom.Envelope.YMax);          myLine.PutCoords(startPoint, endPoint);               IGeometry resultGeom2 = myOp.Intersect(myLine, esriGeometryDimension.esriGeometry1Dimension);// this line throws accessviolation exception because one geometry is com other is a class in my app      I hope there is a way to solve this


title: creating geotiff in ArcGIS to publish in geoserver

text: Pls give some answer, **Short question** How create geotiff image (to publish using Geoserver)? **Bit more information** I want to publish geo-reference image in geoserver.Then i chose image format as geotiff and create using arcGIS 9.3.It create tiff,tfw and aux files.But when publish using geoserver it gives this message, "Could not list layers for this store, an error occurred retrieving them: Unable to acquire a reader for this coverage with format: GeoTIFF" What is the error,I think this is not the correct method to create geotiff(to using GS).True? If answer is yes What is the correct method? Thanks for your time


title: Mass-update the projection in compressed GeoTIFF files

text: I have a huge set of compressed GeoTIFF files. Someone forgot to set the projection while creating the GeoTIFF files and I would like to add it now. If I use > gdalwarp -t_srs source.tif target.tif the result is an uncompressed file. I would like to avoid the (de)compressing if possible, since I expect it will degrade the final result due to the recompression and because it will require more time to decompress and compress each file again. I assume that the projection information is stored in the header. **Is there an easy way to just update the projection information in a GeoTIFF file?**