title: How to split a 20 km² OSM file?

text: I want to create a 3D model of an OSM map using osm2world. Osm2World can render maps of large regions, for example, there is a 3D map of Austria and Germany (generated from OSM). I want to do something similar for a smaller region. Since osm2world cannot handle large maps, I need to   1. split the original map into smaller maps,   2. transform the smaller maps to several OBJ files and   3. combine these OBJ files into one big OBJ file of the entire region. In order to split the maps, I downloaded splitter-r311 and tried to transform the original map into a small maps with minimum possible number of nodes using following call:               java -Xmx1G -jar splitter.jar --output=xml --output-dir=results --max-nodes=1000      input\RU-PRI.osm > splitter.log      This attempt failed. splitter.log contains following entries:               Warning: No solution found for partition (42.1875,130.341796875) to (48.6474609375,139.21875) with 541.648 nodes     Final solution has 0 tile(s) and a rating of 9223372036854775807. The smallest node count is 9223372036854775807, the worst aspect ratio is near -1.0     Failed to calculate areas.     Sorry. Cannot split the file without creating huge, almost empty, tiles.     Please specify a bounding polygon with the --polygon-file parameter.     Time finished: Sun Oct 06 00:42:21 MSK 2013     Total time taken: 2779s      What can I do in order to convert the original map into partial maps small enough to be processed by osm2world? Can I modify the input file to make it more osm2world-friendly? I tried to run _splitter_ with `\--max-nodes=16000`, but got `OutOfMemoryError`s when I tried to use them in osm2world. I tried to use MapSplit, but it didn't work due to `OutOfMemoryError`, either. **Update 1 (13.10.2013 12:12 MSK):** 1) I found out that the original file I wanted to convert was too large. Therefore, instead of the original file, I now use a smaller file 03-artyom.osm. 2) When trying to convert this file to OBJ, I had several errors. In order to fix them, I modified the code of OSM2World. Below is the diff and here is the modified source code:               diff --git a/src/org/osm2world/core/math/JTSConversionUtil.java b/src/org/osm2world/core/math/JTSConversionUtil.java     index 81f6fa2..f498a9b 100644     --- a/src/org/osm2world/core/math/JTSConversionUtil.java     +++ b/src/org/osm2world/core/math/JTSConversionUtil.java     @@ -89,7 +89,14 @@ public class JTSConversionUtil {                 }             }          -       return new PolygonWithHolesXZ(outerPolygon, holes);     +       final PolygonWithHolesXZ polygonWithHolesXZ = new PolygonWithHolesXZ(outerPolygon, holes);     +            +       if (polygonWithHolesXZ.getArea() == 0.0)     +       {     +           return null;     +       }     +            +       return polygonWithHolesXZ;              }          @@ -112,7 +119,12 @@ public class JTSConversionUtil {                  if (geometry instanceof Polygon) {                 if (geometry.getNumPoints() > 2) {     -               result.add(polygonXZFromJTSPolygon((Polygon)geometry));     +               final PolygonWithHolesXZ polygonXZFromJTSPolygon =      +                       polygonXZFromJTSPolygon((Polygon)geometry);     +               if (polygonXZFromJTSPolygon != null)     +               {     +                   result.add(polygonXZFromJTSPolygon);                         +               }                 }             } else if (geometry instanceof GeometryCollection) {                 GeometryCollection collection = (GeometryCollection)geometry;     diff --git a/src/org/osm2world/core/math/SimplePolygonXZ.java b/src/org/osm2world/core/math/SimplePolygonXZ.java     index 5a9dfa5..8d889d0 100644     --- a/src/org/osm2world/core/math/SimplePolygonXZ.java     +++ b/src/org/osm2world/core/math/SimplePolygonXZ.java     @@ -41,7 +41,7 @@ public class SimplePolygonXZ extends PolygonXZ {             this.area = Math.abs(signedArea);             this.clockwise = signedArea < 0;          -       assertNonzeroArea();     +       // assertNonzeroArea();         }              public List<LineSegmentXZ> getSegments() {     diff --git a/src/org/osm2world/core/math/algorithms/Poly2TriTriangulationUtil.java b/src/org/osm2world/core/math/algorithms/Poly2TriTriangulationUtil.java     index 7d2c352..abfb629 100644     --- a/src/org/osm2world/core/math/algorithms/Poly2TriTriangulationUtil.java     +++ b/src/org/osm2world/core/math/algorithms/Poly2TriTriangulationUtil.java     @@ -6,6 +6,7 @@ import java.util.ArrayList;      import java.util.Collection;      import java.util.HashSet;      import java.util.Iterator;     +import java.util.LinkedList;      import java.util.List;      import java.util.Set;          @@ -107,7 +108,16 @@ public final class Poly2TriTriangulationUtil {                  /* run triangulation */          -       Poly2Tri.triangulate(triangulationPolygon);     +       try     +       {     +           Poly2Tri.triangulate(triangulationPolygon);              +       }     +       catch (NullPointerException exception)     +       {     +           // exception.printStackTrace();     +                +           return new LinkedList<TriangleXZ>();     +       }                  /* convert the result to the desired format */      3) Now, when I run OSM2World (`java org.osm2world.console.OSM2World --input D:\dev\osm2world\primorie\josm-manual\output\03-artyom.osm --output D:\dev\osm2world\primorie\josm-manual\output\04-artyom.osm.obj`), I get following errors:               [main] WARN org.poly2tri.triangulation.delaunay.sweep.DTSweep - Skipping edge: Point on constrained edge not supported yet     Exception in thread "main" java.lang.StackOverflowError         at org.poly2tri.triangulation.TriangulationUtil.orient2d(TriangulationUtil.java:195)         at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:573)         at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:626)         at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:604)         at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:604)         at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:626)         at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:583)         at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:583)         at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:626)         at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:604)


title: DEM generation from ASTER L1B imagery using FOSS

text: Is there any (photogrammetric or other) FOSS package to support the **generation of a DEM from ASTER L1B products** (i.e. combining the spectral bands 3N and 3B)? Are there any practical examples or/and tutorials? It would certainly be preferable if the tools in question integrate easily in (workflows implemented in) well known GFOSS GIS/RS tools. ## Relevant Information **Information** about ASTER and its products specifications available at:   * ASTER User's Guide - NASA   * ASTER Level-1B Registered Radiance at the Sensor - LP DAAC   * ALGORITHM THEORETICAL BASIS DOCUMENT FOR ASTER DIGITAL ELEVATION MODELS (STANDARD PRODUCT AST14) -- references the PCI software. Related **ASTER data products**   * On Demand Digital Elevation Model, **AST14DEM**   * On Demand Registered Radiance at the Sensor - Orthorectified **AST14OTH**   * On Demand Digital Elevation Model & Registered Radiance at the Sensor - Orthorectified, **AST14DMO** DEM-generation **related works**   * DEM and orthoimage generation from ASTER L1B images for remote areas   * Comparison of automated digital elevation model extraction results using along-track ASTER and across-track SPOT stereo images   * ASTER DEM performance   * Digital elevation model (DEM) generation and accuracy assessment from ASTER stereo data **Various**   * http://www.ipi.uni-hannover.de/fileadmin/institut/pdf/dowman.pdf


I have the following code that generates a map with a couple of layers.               var PIDS = ["NSW502756064","NSW500951450","NSW500951433","NSW500951487","NSW500951527","NSW500951536","NSW502756058","NSW502756059","NSW513255000",     "NSW513255001","NSW513255009","NSW500952157","NSW500952183","NSW500952156","NSW500952181","NSW513254999","NSW500952182","NSW500952060","NSW513255018",     "NSW513255016","NSW513255017","NSW513255019","NSW500952081","NSW500952059","NSW500952078","NSW500952080","NSW513246310","NSW513246342","NSW500952139",     "NSW500952140","NSW515573633","NSW500952118","NSW515832904","NSW500951694","NSW500951946","NSW512878142","NSW512878163","NSW500951677","NSW500951562",     "NSW502756060","NSW515833545","NSW500951817","NSW500951996","NSW502756128","NSW515576212","NSW500951994","NSW500952216","NSW500952229","NSW500952239",     "NSW500952175","NSW500952229","NSW500952233","NSW500951537","NSW500951466","NSW515570881","NSW500951697","NSW502756089","NSW500951728","NSW500951697",     "NSW500951698","NSW500951642","NSW502756228","NSW500951426","NSW515570894"];          var filtered = filterResults(PIDS);          function init() {              var streets = new OpenLayers.Layer.WMS("Query Layer",             "http://xxxx:8081/cgi-bin/mapserv.exe?SERVICE=WMS&VERSION=1.0.0&map=../../council.map",             {                 layers: 'NSW_STREET',                 queryVisible: true,                  visibility: false,                 isBaseLayer: false,                  transparent: true,                  format: 'image/gif',                 numZoomLevels: 22             }         );              var council = new OpenLayers.Layer.Vector("WFS", {             strategies: [new OpenLayers.Strategy.BBOX()],             protocol: new OpenLayers.Protocol.WFS({                 url:  "http://xxxx:8081/cgi-bin/mapserv.exe?SERVICE=WFS&VERSION=1.1.0&map=../../council.map",                  featureType: "NSW_STREET",                 geometryName: "Geometry",                  transparent: true,                 visible: false,                 opacity: 0.5,                 renderers: renderer             }),             styleMap: new OpenLayers.StyleMap(style),             filter: new OpenLayers.Filter.Logical({             type: OpenLayers.Filter.Logical.OR,             filters: filtered                    })         });             council.setVisibility(true);              var roads = new OpenLayers.Layer.WMS("ROADS",             "http://xxxx:8081/cgi-bin/mapserv.exe?SERVICE=WMS&VERSION=1.0.0&map=../../council.map",            {                 layers: "state,locality",                numZoomLevels: 22                      });              map = new OpenLayers.Map("map", {                 numZoomLevels: 22,                 controls: [                     new OpenLayers.Control.LayerSwitcher(),                     new OpenLayers.Control.PanZoom(),                     new OpenLayers.Control.Navigation(),                     new OpenLayers.Control.MousePosition()                 ]             });                   map.addLayers([roads, streets, council]);                     map.setCenter(new OpenLayers.LonLat(148.17447, -33.13967).transform( // Bogan Street             new OpenLayers.Projection("EPSG:4283"),             map.getProjectionObject()         ), 15);     }               var template = {         strokeWidth: 3      };          var style = new OpenLayers.Style(template);          var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;     renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;          function filterResults(thePids) {         var filterlist = [];         for (i=0;i<thePids.length;i++) {             filterlist.push(new OpenLayers.Filter.Comparison({                                     type: OpenLayers.Filter.Comparison.EQUAL_TO,                                     property: "STREET_LINE_PID",                                     value: thePids[i]                                 })                          )         }         return filterlist;     }      I want the council layer to be filtered based on the road segments (PIDS) contained in the PIDS array. The problem I am having at the moment is that if the PIDS array holds fewer than 65 elements it'll render correctly. ![enter image description here](http://i.stack.imgur.com/hFqdq.jpg) However once I increase the number of elements in this array beyond 65 then nothing renders and the log file reveals the following error:               getSymbol(): Symbol definition error. Parsing error near (WHERE):(line 149)     [Wed Oct 10 13:31:12 2012].591000 msOGRFileWhichShapes(): OGR error. SetAttributeFilter( ( (STREET_LINE_PID= 'NSW502756064')  Or  ( (STREET_LINE_PID= 'NSW500951450')  Or  ( (STREET_LINE_PID= 'NSW500951433')  Or  ( (STREET_LINE_PID= 'NSW500951487')  Or  ( (STREET_LINE_PID= 'NSW500951527')  Or  ( (STREET_LINE_PID= 'NSW500951536')  Or  ( (STREET_LINE_PID= 'NSW502756058')  Or  ( (STREET_LINE_PID= 'NSW502756059')  Or  ( (STREET_LINE_PID= 'NSW513255000')  Or  ( (STREET_LINE_PID= 'NSW513255001')  Or  ( (STREET_LINE_PID= 'NSW513255009')  Or  ( (STREET_LINE_PID= 'NSW500952157')  Or  ( (STREET_LINE_PID= 'NSW500952183')  Or  ( (STREET_LINE_PID= 'NSW500952156')  Or  ( (STREET_LINE_PID= 'NSW500952181')  Or  ( (STREET_LINE_PID= 'NSW513254999')  Or  ( (STREET_LINE_PID= 'NSW500952182')  Or  ( (STREET_LINE_PID= 'NSW500952060')  Or  ( (STREET_LINE_PID= 'NSW513255018')  Or  ( (STREET_LINE_PID= 'NSW513255016')  Or  ( (STREET_LINE_PID= 'NSW513255017')  Or  ( (STREET_LINE_PID= 'NSW513255019')  Or  ( (STREET_LINE_PID= 'NSW500952081')  Or  ( (STREET_LINE_PID= 'NSW500952059')  Or  ( (STREET_LINE_PID= 'NSW500952078')  Or  ( (STREET_LINE_PID= 'NSW500952080')  Or  ( (STREET_LINE_PID= 'NSW513246310')  Or  ( (STREET_LINE_PID= 'NSW513246342')  Or  ( (STREET_LINE_PID= 'NSW500952139')  Or  ( (STREET_LINE_PID= 'NSW500952140')  Or  ( (STREET_LINE_PID= 'NSW515573633')  Or  ( (STREET_LINE_PID= 'NSW500952118')  Or  ( (STREET_LINE_PID= 'NSW515832904')  Or  ( (STREET_LINE_PID= 'NSW500951694')  Or  ( (STREET_LINE_PID= 'NSW500951946')  Or  ( (STREET_LINE_PID= 'NSW512878142')  Or  ( (STREET_LINE_PID= 'NSW512878163')  Or  ( (STREET_LINE_PID= 'NSW500951677')  Or  ( (STREET_LINE_PID= 'NSW500951562')  Or  ( (STREET_LINE_PID= 'NSW502756060')  Or  ( (STREET_LINE_PID= 'NSW515833545')  Or  ( (STREET_LINE_PID= 'NSW500951817')  Or  ( (STREET_LINE_PID= 'NSW500951996')  Or  ( (STREET_LINE_PID= 'NSW502756128')  Or  ( (STREET_LINE_PID= 'NSW515576212')  Or  ( (STREET_LINE_PID= 'NSW500951994')  Or  ( (STREET_LINE_PID= 'NSW500952216')  Or  ( (STREET_LINE_PID= 'NSW500952229')  Or  ( (STREET_LINE_PID= 'NSW500952239')  Or  ( (STREET_LINE_PID=     [Wed Oct 10 13:31:12 2012].592000 msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed      Your help in figuring out what's going wrong would be greatly appreciated.


title: Is it possible to include the Map composer in Sextante for QGIS 2.0?

text: I would like to solve a problem (Species atlas (how to automate to create on page for each species with QGIS)). To solve it by an other way, I would like to know if it is possible to make a sextante process, and at the end, call, or use the map composer, directly into the Models Builder? If yes, how to do it? Thanks.


title: How do I convert EPSG:26986 coordinate pairs to EPSG:4326 from the MassGIS web service, the Linux command-line, or PHP?

text: I'm a GIS newbie, normally a PHP web applications developer. I am trying to map all boundaries of the MA state representative districts. So I just need to convert polygon coordinates from the MassGIS web service's output into Google-friendly lon/lat coordinates (the WGS84 SRS). In GIS parlance I need to execute a "re-projection." Below is the link to the XML (6MB, careful). The default SRS is EPSG:26986. You can add the GET parameter **& srsName=26986** to the end of it and then toy with that number but I've tried plugging in the WGS84 equivalents in EPSG, which folks are saying are 4326 or 3875, and apparently MassGIS does not have those output formats available. Here is the response XML: http://giswebservices.massgis.state.ma.us/geoserver/wfs?request=GetFeature&version=1.0.0&typeName=massgis:GISDATA.HOUSE2012_POLY Then I started playing with the Linux tool **gdaltransform** which seems promising, but when I plugged in over 100 of the original (EPSG:26986) pairs, it only spits back about four pairs (in the correct EPSG:4326 format). So something is wrong there. If tried dumping the coordinate pairs in a text file of source data, but then the gdaltransform complains that it is not a supported file format. Obviously the easiest thing would be if someone has some experience with the MassGIS web service and can tell me the right parameter to get these coordinates in the format I need them. But another fine solution would be to help me find a simple, quick conversion script or utility (PHP or Linux) that I could integrate into my web app behind the scenes.


title: How to install matplotlib and pyparsing correctly on OSX-Lion?

text: I am trying to install the Contour plugin in QGIS 2.0.1 (I'm running OSX-Lion) and I have installed NumPy and Matplotlib from kyngchaos however when I go to install the plugin I get the following error: > The Plugin is broken. Python said: matplotlib requires pyparsing Did I misinstall matplotlib or do I simply need to find a copy of pyparsing, and if so, where is a good place to get it? UPDATE: I downloaded pyparsing from pyparsing.wikispaces.com and have been following the guidelines for installation. The README tell me to "Do the usual: python setup.py install" but the online instructions say to use "easy_install pyparsing". I am not sure what I am really supposed to do with this information. I have tried running the "Setup.py" file but it lacks a command but I am not sure where to add the command. Thanks DF


title: Determing which Which georeference system was used on an Ecuadorian Topo Baselayer

text: I'm creating a map in Western Ecuador, and am attempting to use a military topo baselayer for it. The map comes with UTM grid lines on it so georeferencing it was easy but I'm unsure of what projection was used for those UTM grid lines on it. Does anyone know how I could find that out or Where I could find a different topo layer for Ecuador? Thanks for any help!


title: ArcPad Jscript ThisEvent.Object, autofill form with multiple pages

text: I have a script that I'm trying to use to autofill the controls of an ArcPad form with controls on multiple pages. The 'autofill()' function is referenced in the form's onload event and I would like to avoid opening each page individually. The following code works well for the first page but the second page does not autofill. Am I referencing the second page incorrectly? I have a third page to add as well. The myentries[] is an array that references specific values for each control (which are comboboxes). Code:               function autofill(){     var pages, datepage, controls1, notespage, controls2;          datepage=ThisEvent.Object.Pages("date");     controls1=datepage.Controls;     controls1.Item("cboemp").ListIndex=myentries[0];     controls1.Item("cboaction").ListIndex=myentries[1];          notespage=ThisEvent.Object.Pages("notes");     controls2=notespage.Controls;     controls2.Item("cbolarvae").ListIndex=myentries[2];     controls2.Item("cbopupae").ListIndex=myentries[3];     controls2.Item("cboadults").ListIndex=myentries[4];     }


There appears to be very little information available about competitive hourly rates for GIS freelancers. Additionally, GIS freelancers never post rates on their websites. Elance has some information on what people are asking, although I believe the rates are well below the industry standard due to the structure of their bidding system (example). The US Bureau of Labor Statistics states the median pay for Cartographers and Photogrammetrists is $27.62 USD, although this is presumably low because it does not taking into account fringe benefits. What is the going rate for GIS freelancers? I am interested in hearing from both freelancers and businesses who contract out work.


title: GIS grid linear interpolation for a given point

text: Suppose that I have a GIS grid. I need to do linear interpolation for a given point located inside a cell of the GIS grid. The locations and values of the vertices of each cell in the grid are known. I am also given the location and value of the centroid of each cell. For a given point, I need to use linear interpolation to find the value. If the given point is located on the centroid, I do not need to do any linear interpolation. I just pick up the value of the centroid. But, if the given point is close to the centroid but not located on it, I want the value of the centroid to play an important role in the interpolation with the 4 vertices of the cell and the centroid. How to implement this idea ? I do not want to define a fixed value as a radius. If the given point distance from the centroid is less than the centroid, the centroid value will be used as the given point value. This may cause some "jumps" in the interpolation.


title: Transpose (copy) Google Earth geometry to different location?

text: I just tried to copy a folder of concentric radius circles to a different location (different centerpoint) in Google Earth Pro & quickly discovered this does not work. Is there anyway to transpose (I guess) a folder of coordinates/shapes easily? ...


title: Why QgsMapCanvas only appear after lost focus?

text: I created the simple frame .UI file, compiled with pyuic4, and tried the ShapeViewer.py to load the shapefile "world_borders.shp". However, the map doesn't display at the first time. I have to click out the window to make it appear. After everything works! I am working in Windows 7. Instalation "osgeo4w-setup-x86". Qgis 2.2.0-Valmiera Why does QgsMapCanvas in Qgis 2.2.0-Valmiera only appear after losing focus? Here is my code:               class ShapeViewer(QMainWindow, Ui_MainWindow):         def __init__(self):             QMainWindow.__init__(self)             self.setupUi(self)             self.canvas = QgsMapCanvas()             self.canvas.useImageToRender(False)             self.layout = QVBoxLayout(self.frame)             self.layout.addWidget(self.canvas)             file = QFileDialog.getOpenFileName(self,"Open", ".", "Shp(*.shp)")             layer = QgsVectorLayer(file, "My Shape", "ogr")             QgsMapLayerRegistry.instance().addMapLayer(layer);             self.canvas.setExtent(layer.extent())             cl = QgsMapCanvasLayer(layer)             self.canvas.setLayerSet([cl])             self.show()          def main(argv):         # create Qt application         app = QApplication(argv)              # Initialize qgis libraries         QgsApplication.setPrefixPath(qgis_prefix, True)         QgsApplication.initQgis()         # create main window         wnd = ShapeViewer()         wnd.show()         # run!         retval = app.exec_()              # exit         QgsApplication.exitQgis()         sys.exit(retval)     if __name__ == "__main__":         main(sys.argv)


title: How to add "sub-districts" within the Districting extension?

text: I am using ArcGIS 10.1 Districting Extension and I have created a plan with 5 wards; How can I add districts so that this existing plan has two districts within each ward?


title: Looking for an android solution for offline kml/kmz file viewer with gps support

text: I have some KMZ files of cadastral maps. I need to fiscally go to the boundaries of my lands (parcels) and take a look at where they are with the gps and maps support. Some of these places are not covered by the phone network signal. For this reason I'm looking for an android app that will import my kmz files and let me reach the boundaries position with gps help. I've used google earth app, but gps position is not working. Google maps engine app, instead, works well but only with online maps. Any idea about an app to work offline?


title: A way to transform by special epsg-code

text: In my country, we have a special epsg-code for transformation (#4649). In the definition (http://www.epsg- registry.org/report.htm?type=selection&entity=urn:ogc:def:coordinateOperation:EPSG::4649&reportDetail=short&style=urn:uuid:report- style:default-with-code&style_name=OGP%20Default%20With%20Code&title=), a `shTransCom.dll` will be listed as a component. I have this. Now my problem - there are several shapefiles I want to transform by using epsg:4649. One idea is to use QGIS- but how to integrate the dll-file? Normal epsg-code in my knowledge are ony a long list of parameters. On the other side, my idea is to extract the coordinate - transform in another step - and reinject the new coordinates. One possible packet for perl could be http://search.cpan.org/~jasonk/Geo-ShapeFile-2.51/ShapeFile.pm. Does anyone have another or a better idea - or could describe how to integrate epsg:4649 into QGIS?


title: Is it possible to setup fiddler to capture requests from QGIS

text: I want to know if it is possible setup fiddler to capture WMS/WFS requests from QGIS and how to do it. Fiddler is capturing the requests from MapInfo and I don't remember making any setup in fiddler to accomplish that. So can I make fiddler capture requests from QGIS and how do I do it? Version info: Fiddler 2.3.9.5, QGIS 1.7.0


title: ArcGIS server 9.3.1 Javascript API via REST : Transparency issue

text: I have two map services , one is tiled service returns a `satellite image` , and the other is dynamic displays the `roads ,POIs and Parcels`. I'm trying to make the dynamic one shows the roads only above the satellite image , but i'm always getting white background with the roads and it covers the satellite image. Here's my code :               map = new esri.Map("mapDiv");     var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://URL_TO_SATELLITE/MapServer");     map.addLayer(basemap);          var imageParameters = new esri.layers.ImageParameters();     imageParameters.format = "png24";     imageParameters.height=100;     imageParameters.width=100;       imageParameters.layerIds=[7]; // Only Roads !     imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW;     imageParameters.transparent=true;             var entrmap = new esri.layers.ArcGISDynamicMapServiceLayer("http://URL_TO_DYNAMIC/MapServer",                   {"imageParameters":imageParameters});           map.addLayer(entrmap);      Thank you for your help :)


title: Get map service info ESRI silverLight

text: Been using Esri JavaScript for a while but just started trying out the silverlight API but things are not going smoothly! Tasks that I used to accomplish easily with Javascript is now proving unreasonably long and even unsolvable when using silverlight. I am looking to create a little tool to add to the silverlight viewer. The tool interface has a listBox a Button and a ComboBox. The logic is that The listBox will have hard-coded serviceURL's. User selects a serviceURL, clicks on the button and the tool display the layers/map information in the comboBox. JavaScript did this easily with GetResourceInfo etc but I just don't know where or how to carry this out with SilverLight. Any help will be very much appreciated.


title: How to speed up space partitioning in postgis?

text: I've a bunch of overlapping polygons and I'm trying to partition the space to avoid having overlapping ones. I think my problem is fairly simple. Using some ESRI product and http://arcscripts.esri.com/details.asp?dbid=16700 my co- worker computed it in 48s. I'm trying to do it with postgis using http://s3.opengeo.org/postgis- power.pdf#page=24 (guessing the details, using http://trac.osgeo.org/postgis/wiki/UsersWikiSimplifyPreserveTopology as inspiration) but it's so slow that I can't do it with more than 10 polys (I've got 800 of them to split). The slow part is the ST_Union, I tried various things, but none where successful, here is the current state of affairs :               select geom from     (select st_linemerge(st_union(geom)) as geom from         (select st_exteriorring((st_dumprings((st_dump(t.geom)).geom)).geom) as geom from             (SELECT geometry AS geom, id                    FROM tt                   WHERE campaign_id = 204                   ORDER BY id limit 200) t) t2) t3      this has been computing for 26 min (the linemerge() is actually not ). The polys are MultiPolygons in case the st_dump bugs you. Do you have any tip ? The st_union() of the linework is the very slow part. Thanks, Nico. PS: here are some numbers : 852 multipolygons, leading to 14880 polygons, leading to 21467 linestrings totaling 315513 vertices.


title: Getting capabilities from tomcat's Geoserver fails

text: I wanna teke capabilities from tomcat's geoserver. Use this.               wms = new OpenLayers.Format.WMSCapabilities();     OpenLayers.Request.GET({         url:"http://localhost:8080/geoserver/wms/filedata?request=GetCapabilities",         success: function(e){             var response = wms.read(e.responseText);     var capability = response.capability;     for (var i=0, len=capability.layers.length; i<len; i+=1) {         var layerObj = capability.layers[i];         if (layerObj.name === 'filedata') {             map.zoomToExtent(OpenLayers.Bounds.fromArray(layerObj.llbbox));             break;         }     }         }     });      But firebug says that "capability is not defined" in this string               for (var i=0, len=capability.layers.length; i<len; i+=1) {      If i write url from capability request in browser get error               XML Parsing Error: XML or text declaration not at start of entity     Adress: http://localhost:8080/geoserver/wms/filedata?request=GetCapabilities     Line number 5091, column 21:          <Abstract><?xml version="1.0" encoding="UTF- 8"?>     <ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc"      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:schemaLocation="http://www.opengis.net/ogc http://localhost:8080/     geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd">   <ServiceException>     --------------------^      But if look in firebut that can see that application was geted capabilities. In standalone Geoserver all work fine.


title: Why does Calculate Geometry give incorrect number of decimals for Longitude?

text: intermediate ArcMap user here. I'm trying to calculate the geometry for a shapefile such that I can add lat/long columns to my attribute table. While I have no trouble calculating the latitude, the longitude keeps coming out a decimal place off. ![enter image description here](http://i.stack.imgur.com/rSIE9.png) I know that the accurate longitude for this shapefile should be -74.067, -74.068, etc. I'm not sure if the negative sign is screwing up the significant digits? I looked around StackExchnage and no one seems to have this problem. ![enter image description here](http://i.stack.imgur.com/WeiTj.png) For reference, when calculating the Latitude, for "Type", I used "float" with precision = 6 and scale = 5. This worked fine for Latitude but still gives me the incorrect result for Longitude. Also for reference: Projected Coordinate System: PCS_CarMAGBOG Projection: Transverse_Mercator False_Easting: 92334.87900000 False_Northing: 109320.96500000 Central_Meridian: -74.14659167 Scale_Factor: 1.00000000 Latitude_Of_Origin: 4.68048611 Linear Unit: Meter Has anyone faced this problem before, and if so, how did you resolve it? Is the problem in calculate geometry or in the projection itself?


title: Openlayers Polygon not visible

text: I have just recently started playing with mapping but have had limited success. I have been able to create/display markers, but in my current project I am trying to display zipcode areas by creating a polygon using the zip boundaries. I've been hacking at this for more than a week, and getting nowhere. I'm not sure what I'm missing, so any help will be greatly appreciated. I am trying to use OpenLayers. ZipCode boundaries were obtained by downloading a file and loading into a database. I am getting a map with the requested controls, but no polygons/shapes are visible.                   <script src="../OpenLayers/lib/OpenLayers.js"></script>     <script type="text/javascript">              var map;          var MarkerFile;         var lat=38.0307;             var lon=-97.5146;             var zoom=4;              function init() {                  map = new OpenLayers.Map ("mapX", {                 controls:[                 new OpenLayers.Control.Navigation(),                 new OpenLayers.Control.PanZoomBar(),                 new OpenLayers.Control.Attribution()],                 allOverlays: true                 } );                  var proj = new OpenLayers.Projection("EPSG:4326");                       var style_green =                 {                     strokeColor: "#000000",                     strokeOpacity: 1,                     strokeWidth: 1,                     fillColor: "#00FF00",                     fillOpacity: 0.6                 };                  var osmZ = new OpenLayers.Layer.OSM();                  var Zip15021 = new OpenLayers.Layer.Vector("Zip15021",{isBaseLayer: false});                       var Zip15301 = new OpenLayers.Layer.Vector("Zip15301",{isBaseLayer: false});                       var poly15021 = new OpenLayers.Geometry.fromWKT("POLYGON((-80.4409388055265 40.3963551604938,-80.424348 40.477604,-80.399485 40.477369,-80.399081 40.476341,-80.399592 40.475174,-80.403459 40.470919,-80.405917 40.469547,-80.401783 40.466731,-80.399686 40.46641,-80.391986 40.467094,-80.385186 40.466244,-80.379077 40.463587,-80.371817 40.462371,-80.369529 40.464291,-80.366841 40.464643,-80.366025 40.460483,-80.363721 40.460035,-80.361017 40.458355,-80.360009 40.456963,-80.361417 40.455395,-80.364361 40.455891,-80.366313 40.455667,-80.367161 40.454979,-80.366297 40.44858,-80.363241 40.444692,-80.364617 40.43946,-80.361225 40.434692,-80.360489 40.431396,-80.364681 40.427684,-80.366921 40.42866,-80.369513 40.426596,-80.369529 40.423044,-80.368085 40.422787,-80.361769 40.414804,-80.365273 40.41226,-80.368249 40.4085,-80.363193 40.403604,-80.362825 40.400772,-80.363337 40.397524,-80.368137 40.387316,-80.359977 40.381332,-80.360185 40.380372,-80.362883 40.380539,-80.360345 40.379268,-80.363265 40.373605,-80.364009 40.368616,-80.36347 40.367907,-80.360986 40.367244,-80.35952 40.366215,-80.358022 40.36363,-80.356223 40.356697,-80.350088 40.34972,-80.348951 40.349102,-80.348115 40.350979,-80.351778 40.358433,-80.346133 40.368826,-80.331608 40.379492,-80.330328 40.37954,-80.324824 40.376773,-80.326972 40.36993,-80.331458 40.365445,-80.331428 40.363614,-80.330111 40.359564,-80.329393 40.357893,-80.327956 40.356315,-80.329092 40.353317,-80.333667 40.347756,-80.330945 40.345239,-80.335471 40.339387,-80.337641 40.33964,-80.341558 40.336541,-80.345234 40.33043,-80.343765 40.327449,-80.350861 40.317232,-80.350947 40.31672,-80.34977 40.315349,-80.351413 40.313426,-80.353953 40.311664,-80.356492 40.308596,-80.357066 40.302282,-80.3636 40.3015,-80.366469 40.300629,-80.372115 40.29724,-80.374786 40.296758,-80.387532 40.292095,-80.389681 40.295941,-80.391294 40.297406,-80.392937 40.297475,-80.395807 40.296149,-80.396524 40.296264,-80.401215 40.299606,-80.40913 40.310294,-80.406917 40.313795,-80.407094 40.318234,-80.40817 40.319813,-80.411816 40.32208,-80.413788 40.324483,-80.414206 40.326611,-80.412501 40.329517,-80.415072 40.33073,-80.423234 40.329244,-80.42476 40.327528,-80.425627 40.324897,-80.429217 40.319176,-80.43681 40.312815,-80.443845 40.309311,-80.446943 40.311487,-80.44793 40.313638,-80.452385 40.318649,-80.457259 40.320662,-80.460967 40.324369,-80.463383 40.329507,-80.46964 40.339238,-80.475757 40.338382,-80.484225 40.33936,-80.488545 40.340676,-80.4895 40.337541,-80.48776 40.330379,-80.486416 40.328367,-80.486226 40.326198,-80.486894 40.32492,-80.48928 40.322895,-80.492088 40.321155,-80.493613 40.32104,-80.494331 40.321543,-80.495139 40.322458,-80.495799 40.325753,-80.501262 40.330437,-80.501054 40.334821,-80.507294 40.322917,-80.509022 40.316773,-80.511727 40.315829,-80.514959 40.315973,-80.5190414027978 40.3181677207515,-80.519039 40.342101,-80.518980122912 40.343554219119,-80.517991 40.367968,-80.517991 40.398868,-80.51769 40.462467,-80.51899 40.473667,-80.5189946522939 40.4768839885536,-80.5189953451133 40.47736306235,-80.462256 40.477446,-80.460466 40.477488,-80.44898 40.477701,-80.424348 40.477604,-80.4409388055265 40.3963551604938))");             Zip15021.addFeatures([poly15021]);                       var poly15301 = new OpenLayers.Geometry.fromWKT("POLYGON((-80.2619084903377 40.1717586790123,-80.35565 40.25306,-80.353918 40.254136,-80.350755 40.258279,-80.346754 40.261644,-80.34547 40.262239,-80.332059 40.264462,-80.327608 40.26428,-80.318408 40.262587,-80.305802 40.264555,-80.300943 40.266127,-80.295616 40.263845,-80.293115 40.260981,-80.282102 40.267862,-80.281306 40.266633,-80.279697 40.259791,-80.276889 40.259744,-80.270974 40.261573,-80.267181 40.262121,-80.263926 40.260929,-80.260581 40.260585,-80.250999 40.255586,-80.249247 40.254179,-80.246453 40.249606,-80.244997 40.244374,-80.242805 40.241862,-80.241877 40.240774,-80.240821 40.237958,-80.244005 40.236054,-80.236015 40.231201,-80.231591 40.230556,-80.224805 40.228038,-80.218404 40.223046,-80.218996 40.22135,-80.223861 40.215734,-80.226309 40.216694,-80.228357 40.216838,-80.232549 40.21559,-80.233618 40.213095,-80.232454 40.21134,-80.226549 40.212774,-80.229285 40.210406,-80.225781 40.21055,-80.222965 40.211526,-80.214788 40.219206,-80.213556 40.221638,-80.211188 40.231014,-80.20706 40.23783,-80.2061 40.237126,-80.205236 40.23543,-80.208772 40.233254,-80.209828 40.230934,-80.210964 40.226118,-80.209882 40.222505,-80.20458 40.21999,-80.19882 40.21487,-80.194772 40.213766,-80.180563 40.23015,-80.178771 40.230934,-80.175875 40.22919,-80.171635 40.225014,-80.166611 40.221638,-80.165667 40.217414,-80.163571 40.214758,-80.164899 40.21287,-80.165571 40.210582,-80.161251 40.211062,-80.158547 40.210502,-80.157731 40.20895,-80.158131 40.20663,-80.168291 40.207046,-80.171731 40.208934,-80.177539 40.20927,-80.182003 40.208086,-80.181219 40.202598,-80.178915 40.200438,-80.176035 40.199558,-80.171651 40.196806,-80.164387 40.184503,-80.152755 40.186263,-80.146018 40.184631,-80.146098 40.182903,-80.152195 40.184647,-80.167955 40.182647,-80.169699 40.181559,-80.170883 40.180039,-80.17506 40.171783,-80.17314 40.167223,-80.153891 40.167959,-80.151843 40.168823,-80.150707 40.170423,-80.135538 40.171159,-80.133458 40.164967,-80.130274 40.150887,-80.130546 40.146407,-80.131826 40.142855,-80.132611 40.135457,-80.13229 40.131783,-80.136973 40.125602,-80.133505 40.122804,-80.128767 40.120971,-80.12624 40.113441,-80.137357 40.114248,-80.145881 40.113931,-80.154434 40.104804,-80.153159 40.102904,-80.151401 40.102651,-80.148661 40.100569,-80.149228 40.098327,-80.148813 40.095741,-80.149261 40.09375,-80.159337 40.082631,-80.164048 40.071648,-80.16658 40.069978,-80.16792 40.069681,-80.169617 40.072313,-80.172268 40.074076,-80.174205 40.067989,-80.174356 40.06506,-80.173641 40.063389,-80.1723 40.061947,-80.172211 40.060734,-80.175519 40.055815,-80.178139 40.056044,-80.181921 40.055541,-80.185852 40.053893,-80.18484 40.049934,-80.185018 40.048584,-80.191569 40.050117,-80.193594 40.05101,-80.199403 40.059202,-80.201578 40.065151,-80.201578 40.067119,-80.200357 40.069431,-80.200357 40.0749,-80.201877 40.076044,-80.204767 40.076364,-80.210667 40.083434,-80.21451 40.084074,-80.218591 40.083158,-80.219305 40.081144,-80.222371 40.076658,-80.224069 40.075376,-80.226393 40.074631,-80.229403 40.077136,-80.236197 40.080589,-80.242216 40.082691,-80.243676 40.084017,-80.24454 40.083811,-80.252916 40.077013,-80.254377 40.075137,-80.255923 40.078571,-80.256279 40.080608,-80.2558 40.08317,-80.257378 40.084521,-80.266881 40.086699,-80.273581 40.092286,-80.278257 40.095125,-80.281415 40.096361,-80.284365 40.095378,-80.284872 40.093159,-80.283264 40.09087,-80.283086 40.089817,-80.289584 40.082473,-80.289464 40.084693,-80.287615 40.090139,-80.287552 40.097187,-80.287849 40.099675,-80.29049 40.101302,-80.29512 40.098218,-80.295313 40.097693,-80.292971 40.093906,-80.293685 40.091463,-80.302186 40.084832,-80.310318 40.08886,-80.313774 40.08561,-80.318094 40.083162,-80.325155 40.080072,-80.327181 40.081857,-80.329982 40.085956,-80.334511 40.087302,-80.337372 40.088789,-80.339368 40.090139,-80.340756 40.092431,-80.342438 40.09309,-80.341992 40.095127,-80.338392 40.096798,-80.338984 40.101649,-80.341444 40.10501,-80.346603 40.108723,-80.344116 40.112884,-80.342745 40.114052,-80.335681 40.113962,-80.334698 40.116479,-80.334761 40.128008,-80.336985 40.13124,-80.341658 40.132776,-80.344426 40.137223,-80.348266 40.139543,-80.35929 40.149239,-80.350874 40.157991,-80.345625 40.160727,-80.351788 40.182364,-80.351778 40.183829,-80.349081 40.186759,-80.345001 40.189591,-80.342057 40.193575,-80.341705 40.197063,-80.343561 40.200615,-80.349417 40.203111,-80.35857 40.203399,-80.359946 40.205607,-80.365834 40.203991,-80.366042 40.216391,-80.36881 40.220519,-80.37153 40.223031,-80.377221 40.225079,-80.378983 40.225217,-80.380773 40.226385,-80.384292 40.230207,-80.380139 40.234347,-80.376856 40.232995,-80.364553 40.229926,-80.365363 40.232678,-80.368242 40.235943,-80.36903 40.240718,-80.368573 40.241452,-80.361171 40.246798,-80.356536 40.249563,-80.355613 40.251268,-80.35565 40.25306,-80.2619084903377 40.1717586790123))");             Zip15301.addFeatures([poly15301]);                       map.addLayers([osmZ, Zip15021, Zip15301]);             map.addControl(new OpenLayers.Control.LayerSwitcher());                       var lonLat = new OpenLayers.LonLat(lon, lat).transform(proj, map.getProjectionObject() );                  map.setCenter (lonLat, zoom);                }                 function getQueryString() {         var result = {}, queryString = location.search.substring(1), re = /([^&=]+)=([^&]*)/g, m;               while (m = re.exec(queryString)) {              result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);          }                return result;            }               </script>


title: Identify cluster centroids

text: I have a data set of points which are grouped into clusters like so: ![enter image description here](http://i.stack.imgur.com/SiPgI.png) I'd like to use ArcGIS or Python to create a point layer of the centroids of each cluster but I can't seem to find the right tools. I looked into hot spot analysis but it doesn't seem to apply, since my features aren't numerically weighted. I also tried the Integrate tool with a reasonable tolerance but I didn't see any changes. Any advice would be much appreciated. Thanks!


title: How to Simplify a Line Network Preserving Topology?

text: I have a Shapefile (consisting of European major roads) with about 250.000 Segments which I have to simplify for pgrouting. But I can't seem to find a way to do that properly. This is what it looks like: ![http://i.stack.imgur.com/qJ2OJ.png](http://i.stack.imgur.com/44DRJ.png) and this is what it should look like: ![http://i.stack.imgur.com/FN4Z6.png](http://i.stack.imgur.com/KyFH7.png) I somehow have to remove every Point of the Lines which is connected to less than 3 Lines (being not an intersection) while preserving the topological connections between the remaining points. If anybody has an idea, it would be greatly appreciated! Best regards **EDIT:** I tried to implement the idea of @dkastl and managed to get only the unneccessary nodes (nodes with only 2 adjacent linestrings) from my network with the code below (network generation taken from underdark's blog http://underdark.wordpress.com/2011/02/07/a-beginners-guide-to-pgrouting/):               SELECT * FROM        (SELECT tmp.id as gid, node.the_geom FROM           (SELECT id, count(*) FROM network           JOIN node           ON (start_id = id OR end_id = id) AND (end_id = id OR start_id = id)          GROUP BY id ORDER BY id) as tmp        JOIN node ON (tmp.id = node.id)        WHERE tmp.count = 2) as unn_node;      So, all I now have to do is the merging of the lines. However, I have no clue how. I imagine it has to be a loop which for every row of the result of above query gets the adjacent lines and merges them. Then it would rebuild the network completely and repeat the process until the query above returns an empty result.


title: Can't zoom to feature from Datagrid with ArcGIS API for JavaScript

text: I have a find task in my application that returns features that are points, lines and polygons. I can get the search to populate the datagrid but I am having problems with my onRowClickHandler function and zooming to those features from the datagrid. I've been searching through the forums and see that zooming to a point from the datagrid has been an issue for others, but I can't find a solution that works for me. Here is some code that shows the findtask and what I have for the onRowClickHandler function. I get the error: "Uncaught TypeError: Cannot read property 'getExtent' of undefined" when the onRowClickHandler function is fired.               findDistrictTask = new FindTask("http://summitgis.summitoh.net:6080/arcgis/rest/services/DOES/MapServer/");              map.on("load", function () {             findDistrictParams = new FindParameters();             findDistrictParams.returnGeometry = true;             findDistrictParams.layerIds = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];             findDistrictParams.searchFields = ["NAME, UNAME, PUMPID, PIPEID, PlantID, Name"];             findDistrictParams.outSpatialReference = map.spatialReference;         });              function doDoesDistrictFind() {             findDistrictParams.searchText = dom.byId("doesDistrictText").value;             findDistrictTask.execute(findDistrictParams, showResults);         }                   function showResults(results) {             var markerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 10, new SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 1), new dojo.Color([0, 255, 0, 0.25]));             var lineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH, new dojo.Color([255, 0, 0]), 1);             var polygonSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_NONE, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.25]));             map.graphics.clear();             var dataForGrid = [];             arrayUtils.map(results, function (result) {                 var graphic = result.feature;                 dataForGrid.push([result.layerName, result.foundFieldName, result.value]);                 switch (graphic.geometry.type) {                 case "point":                     graphic.setSymbol(markerSymbol);                     break;                 case "polyline":                     graphic.setSymbol(lineSymbol);                     break;                 case "polygon":                     graphic.setSymbol(polygonSymbol);                     break;                 }                 map.graphics.add(graphic);             });             var data = {                 items: dataForGrid             };             var store = new ItemFileReadStore({                 data: data             });                  var grid = registry.byId("grid");                  grid.setStore(store);             grid.on("rowclick", onRowClickHandler);                  map.centerAndZoom(center, zoom);         }              function onRowClickHandler(evt) {             var clickedFeature = evt.grid.getItem(evt.rowIndex).OBJECTID;             var selectedFeature = arrayUtils.filter(map.graphics.graphics, function (graphic) {                  return ((graphic.attributes) && graphic.attributes.OBJECTID === clickedFeature);              });                  var featureExtent = selectedFeature.geometry.getExtent();             var screenpoint = map.toScreen(selectedFeature.geometry.getExtent().getCenter());             var mappoint = map.toMap(screenpoint);                  map.centerAt(mappoint);                  if (selectedFeature.geometry.declaredClass == 'esri.geometry.Point') {                 map.centerAt(selectedFeature.geometry);             } else {                 var featureExtent = selectedFeature.geometry.getExtent();                 var screenpoint = map.toScreen(selectedFeature.geometry.getExtent().getCenter());                 var mappoint = map.toMap(screenpoint);                 map.centerAt(mappoint);             }              }      Does anyone have any idea what I am doing wrong or a way to zoom to all feature types from a datagrid? Thanks in advance!!!


title: How to export the legend (Layers Panel) as an image in QGIS using the Python console?

text: I want to export the Legend (the Layers Panel) as an image using the python console.


title: ogr2ogr "Error: pointer being freed was not allocated" on mac mavericks

text: I've successfully installed `GDAL` via homebrew on mac But while I'm using command `ogr2ogr`, keep getting error below               $ ogr2ogr -f geoJSON tl_2010_20_tract10.json tl_2010_20_tract10.shp          CPLAcquireMutex: Error = 22CPLMutexHolder: Failed to acquire mutex!     ogr2ogr(2439,0x7fff7743a310) malloc: *** error for object 0x7fb7a0d00560: pointer being      freed was not allocated     *** set a breakpoint in malloc_error_break to debug     [1]    2439 abort      ogr2ogr -f geoJSON tl_2010_20_tract10.json tl_2010_20_tract10.shp      and it also happened while using `ogrinfo`. Do anyone knows what this error means, and how could I fix it? Thanks.


title: Central Feature Tool Key Error u'M'

text: I was trying to execute two tools (Mean Center Tool and Central Feature) when suddenly it gave me a error that I couldn't find the resolution too no matter what I tryed. The code is here (along with a link to the image of the error):               Traceback (most recent call last):      File "c:\program files (x86)\arcgis\desktop10.2\ArcToolbox\Scripts\CentralFeature.py",       line 301, in <module>      setupCentralFeature()      File "c:\program files (x86)\arcgis\desktop10.2\ArcToolbox\Scripts\CentralFeature.py",   line 47, in setupCentralFeature       ssdo = SSDO.SSDataObject(inputFC, templateFC = outputFC)      File "c:\program files (x86)\arcgis\desktop10.2\ArcToolbox\Scripts\SSDataObject.py", line 288, in __init__      self.distanceInfo = UTILS.DistanceInfo(self.spatialRef)      File "c:\program files (x86)\arcgis\desktop10.2\ArcToolbox\Scripts\SSUtilities.py", line 2135, in __init__      self.setInfo()      File "c:\program files (x86)\arcgis\desktop10.2\ArcToolbox\Scripts\SSUtilities.py", line 2155, in setInfo      info = distanceUnitInfo[self.name]      KeyError: u'M'           Failed to execute (CentralFeature).      Failed at Thu Jul 31 16:10:13 2014 (Elapsed Time: 0.97 seconds)      Can someone explain what seems to be the problem here ? If it's of good use, I am doing this on a point feature ![feature info](http://s21.postimg.org/fhffj2jbr/Captura_de_tela_2014_07_31_16_01_41.png) ![error](http://s30.postimg.org/ekzty528x/Captura_de_tela_2014_07_31_15_41_34.png)


title: QGIS Polygon precision

text: I have a fairly straightforward question; is there a way to edit the precision of polygon points in QGIS so that each coordinate has the same number of decimal places? For example, the coordinate 23.18273917, -84.29172638491 would be converted to 23.18274, -84.29173 if 5 was entered. Any help would be great! Thanks - Brandon


title: Tiling ArcGIS Desktop Historic Maps

text: I'm using ArcGIS 10.2 Desktop on a Windows platform. I have georeferenced about a dozen USGS topographic raster maps from around 1900. Each georeferenced map is an now an .mxd file. To the best of my limited knowledge there are no layers associated with any of these maps. I would like to tile these into a single map [to which multiple layers would be added] but cannot find a way to do this. Perhaps I need to start over using a different technique? Would be VERY grateful for any suggestions on how to solve this problem.


title: What C/C++ libraries exist to transform vectors between map projections

text: Has anybody written a C/C++ library (preferably one that is aware of Proj.4 definition strings) that has a set of routines to convert vector quantities (e.g., wind speed and direction) between map coordinate systems? That is, routines to do calculations described in something like: http://www.dtcenter.org/met/users/docs/write_ups/velocity.pdf I have found the EMAPF routines, but was wondering whether there was anything Proj.4 aware. Gordon


title: Get Result of ICalculator without actually populating a field (ArcObjects)

text: I have two feature classes: FeatureClassA and FeatureClassB. I am running a cursor on FeatureClassA and I have some logic statements (spatial and attribute logic) that compares the current feature in FeatureClassA to FeatureClassB and returns one matching record in FeatureClassB. I want to then do a field calculation on a field in FeatureClassA using the fields in the returned record from FeatureClassB. To achieve this, I have the user build a field calculator expression using the ICalculatorUI2 interface. This dialog is familiar to ArcGIS users.               private void btn_Click(object sender, EventArgs e)     {         ICalculatorUI2 calcUI = new CalculatorUIClass();         calcUI.Table = FeatureClassB as ITable;         calcUI.DoModal(ArcMap.Application.hWnd);         string expression = calcUI.Expression;         calcUI = null;     }      If I wanted to calculate a field in FeatureClassB, I could just use ICalculator.               ICalculator calculator = new Calculator();     calculator.Expression = calc.Expression;     calculator.Field = "MyField";     calculator.Cursor = calcUI.Table.Search(null, false);     calculator.Calculate();      The problem is, I don't want to actually calculate a field in FeatureClassB. I want the result of the field calculation to put into a field in FeatureClassA. Is there anyway to get the result of the field calculation?


title: Openlayers: Making the map move with moving vector layer (airplane) on map

text: So currently I have a map that has some plane data. There is a `setInterval` function that updates the plane data every 5 seconds, making the plane move from point to point. That is working well.               function planeInterval() {         setInterval(function() {planeMovement()}, 5000);         //this is currently working     }          function planeMovement() {         //do some stuff to make the plane move around         //this is currently working          }      Now, I would like to set up a checkbox or some sort of toggle to: **-toggle on: as the plane moves across the map, the map MOVES as the plane moves** **-toggle off: the plane just does what it usually does: moves across the map while the map stays stagnant.** I was looking into OL `panTo` but I don't think that's the answer here. What would be the best/most simple approach in achieving this?


title: GML Parser for C++/Java/...?

text: I am looking for a good parser for the latest GML (Geographic Markup Language) version in preferably: C++/Java/Ruby/... I am especially interested in reading the geometry of individual features. Does anybody have recommendations?


title: How to use ArcPy to copy selected features to an existing feature class?

text: Is there a way to copy a selected feature into an existing feature class? Sort of like append would do, but only the selected features. I want to iterate through a table and select features with a matching attribute in a feature class and copy that selected feature into an existing feature class. Basically, it'd be like selected a feature in ArcMap and copying and pasting it into a different feature class. Is this possible?


title: Using AttributeInspector to Create New Record

text: This is a follow up question to another questions I posted earlier: Adding Record to Related Table using JavaScript API Without repeating too much information from that previous question, I was able to figure out how to use ApplyEdits to add a (hard-coded) record to the related table. Now, when the user clicks on the button to "Add Record", I want a popup/info window to appear that has all of the attributes from the table, and that the user can enter the new information into for each attribute. Doing some research, I saw that the AttributeInspector will bring up the fields/values for a feature, but it seems that it must already be created. Does anyone know a way to use AttributeInspector or another method to retrieve all of the fields (and their domains) to create a new record in a table and not just edit an already existing one? Thanks.


title: Decrease resolution of vector shapes (polygon) i.e. reduce size and number of points in outer ring

text: I'm trying to get a kmz export down to less than 3 megabytes and am wanting to do so by reducing the number of points in my polygons' outer rings. I've seen this concept in action when it comes to buffer resolutions. If I were to create a buffer around a point with a resolution of 1 it would be a square, if it had a res of 2 it would be an octagon, and so on. Is there something similar I could do to simple polygons whose outside rings are too detailed for my purposes? Thanks


title: Loading different image service functions to QGIS

text: If someone has created an image service in ArcGIS with function templates in order to process on the fly... How would you bring that data into QGIS and be able to switch between functions? In ArcMap you open the properties and select the functions tab... But how would one do this in an OpenSourceGIS utilizing the Image Service? PS it can be accessed through a WMS/ WFS But is the 'functions template' an ESRI only product when dealing with image services??


title: How many function templates can be applied to single image service in ArcGIS for Server?

text: I am trying to minimize space used on our server by producing a single image service for each county in Maryland. However, I need to display 6 different derivatives for each county: DEM in feet, meters, stretched, aspect, slope and hillshade. Does anyone know how many function chain templates I can apply to a single image service? Or will I have to create a image service for each derivative? The latter seems to defeat the purpose of being able to run on- the-fly processing to a mosaic dataset... Right now I have each derivative as its own image service... Being that I am not even through half of the counties processing and I am out of memory, I need to find an alternative.


title: Deleting the "cached" field names for a large CSV file

text: Using ArcGIS Desktop Advanced 10.1 I have a large CSV file (36MB with about 600,000 records) that contains single addresses that I want to geocode. The file is called "SingleAddresses.csv" The file contains 5 fields. When I first loaded the file into ArcMap, I had misnamed some of the field names, and so my field names were "SegID", "FromStNo", "Zone1", "Zone2", "Zone3". So I closed ArcMap, reopened my file in Notepad++, changed the field names to "Address", "City", "Zone1", "Zone2", "Zone3". However, when I open up ArcMap again and add the SingleAddresses.csv file again, the old (original) field names show up. It seems as though ArcMap is caching the field names for the "C:\My Files\SingleAddresses.csv" file. If I move that file to a different directory and then open it in ArcMap, the field names show up correctly. If I keep that file in the same directory but rename it (SingleAddresses2.csv) and then open it in ArcMap, the field names show up correctly. But as long as I keep the same file name in the same directory, it still shows the old field names, even if I delete the original file and create a new empty SingleAddresses.csv file. It also still shows the old field names if I import that file into a new (different) map. Note that I cannot duplicate this if the original file is a small file. The problem only occurs if the file that I originally use is "big"... Is there a cache somewhere that I can delete that would eliminate this problem? It seems as though ArcMap caches the field names for a hard-coded file name. It is really annoying...


title: Using REST service with GeoServer

text: I have downloaded and installed GeoServer 2.1-RC1 which shipped with RESTconfig. How can i check whether REST service is installed with GeoServer or Not ? I put this "http://localhost:8080/geoserver/rest" in my browser, but it gives error! ... It means REST service is not installed as i understand. Or is there any other method to check whether the service is installed or not ?


title: Can the arrows produced by the d.rast.arrow GRASS script be queried or stored?

text: I have created a map with the flow directions using the d.rast.arrow. Can i query on the map to know where the direction of the arrows are? I am going to use the arrow directions in an algorithm. Or, is there a way to store the arrow directions in a text file so that I can import it in my code? Thanks!


title: Post Processing Algorithm

text: I am working on project In which I am supposed to make a web app which will be asking users to upload their inputs as "Rinex file" of Rover and Base Station and It will give more precise data after differential correction. So I just want to know the algorithm of post processing kinematics.


title: How to exclude some layers from ArcReader legend?

text: I have created an ArcReader map for staff which has a number of imagery layers, such as satellite imagery and a raster topographic map. I also have a legend which automatically updates based on which layers are selected in the table of contents. How do I exclude the imagery layers, though, because they are not useful in a legend? When they appear in a legend they are just RGB colours.


title: ArcScene 10.1 Orthophoto Visualization Issue

text: I am attempting to visualize an orthophoto in ArcScene 10.1 at the same resolution it is at in ArcDesktop 10.1. I have set the "Quality enhancement for raster images" to it's highest extent. But, the resolution is still low (i.e. it is very pixelated). In ArcDesktop I can see individual downed trees within the orthophoto, but within ArcScene I can barely see roads. Does anyone have any suggestions? Thanks in advance.


title: QGIS equivalent to ArcMap Aggregate Polygons

text: I am looking for a tool in QGIS 2.40 that performs the function ArcMap refers to as Aggregate Polygons. Does anyone know if this functionality (or anything similar) exists within QGIS currently? Cheers


title: Why are ArcGIS 10.2 Color Ramps missing?

text: I'm using ArcGIS 10.2 Trial and found that there is no Color Ramps. Is it a bug or a restriction? ![I've found a similar question but without the answer but screenshot is the same](http://i.stack.imgur.com/gJ8fb.jpg)


title: cannot click on points in openlayers

text: I use openlayers 2.13.1 along with Geoserver and PostgreSQL I have a code for a vector layer , in my openlayers like so               //style for layer     var style_d = new OpenLayers.Style({      'fillColor': '${p_color}',      'fillOpacity': .8,      'fontColor': 'black',      'pointRadius': 8,      'strokeColor': 'black',      'strokeWidth': 1,      'fontFamily': 'Arial',      'fontSize': 10,      'label': '${p_name}',      'labelAlign': 'tc',      'labelSelect': true,      'labelXOffset': 4,      'labelYOffset':4,      },      {         context: {             label:function(feature) {                 if(feature.attributes['p_name']) {                     return feature.attributes.p_name;                        } else {                     return '';                 }             }      },     });               //style for layer - when click a geometry     var style_select = new OpenLayers.Style({      'fillColor': '${p_color}',      'fillOpacity': .4,      'fontColor': 'black',      'pointRadius': 5,      'strokeColor': 'black',      'strokeWidth': .5,      'fontFamily': 'Arial',      'fontSize': 10,      'label': '${p_name}',      'labelAlign': 'tc',      'labelSelect': true,      'labelXOffset': 4,      'labelYOffset':4,      },      {         context: {             label:function(feature) {                 if(feature.attributes['p_name']) {                     return feature.attributes.p_name;                 } else {                     return '';                 }             }      }     });          //Add a select feature control for pins     var select_feature_control = new OpenLayers.Control.SelectFeature(mylayer, {multiple: false,toggle: true});          map.addControl(select_feature_control);          //Activate the control     select_feature_control.activate();          //do stuff when clicked     function selected_feature(event){      document.getElementById("wesmes").innerHTML="Loading";      sf = event.feature.fid;      var sfs = sf.split(".");      var sff = sfs[1];      //call a function     }      Problem : If there is a polygon or a line on the map I can click right on them and everything works. If there is a point, I have to click outside the point, near at it, so it will be clicked and activate the `function selected_feature(event)` etc etc. If I click on the point, nothing happens How can I fix this? Why is this happening? I think it is a problem of style. If you want I can provide more code Thanks in advance


title: Tools to write bus map?

text: I noticed that few cities provide a bus map for smartphones. As a result, tourists usually resort to just taking the subway instead because it's easy to figure out, although riding a bus is a better way to discover a city. I was wondering what tools are available to write a smartphone application (Android and iPhone) that would do this:   * Show the whole bus network   * Allow the user to point their current location (or get it from GPS, if available), then point to where they'd like to go, and display the different bus lines they should take to get there. Does this require extensive computer knowledge to write? Thank you.


title: Sample JSON code to get latitude and longitude values from Google API geolocation

text: I'm a fresher in JSON coding. I got a sample Google API geolocation console from https://developers.google.com/maps/documentation/business/geolocation/ site.               {'cellTowers': [       {         'cellId': 21532831,         'locationAreaCode': 2862,         'mobileCountryCode': 214,         'mobileNetworkCode': 7       }     ]}      But, i'm getting below errors.               {      "error": {       "errors": [        {         "domain": "global",         "reason": "parseError",         "message": "Parse Error",        }       ],       "code": 400,       "message": "Parse Error"      }     }      Please provide me sample JSON code to get latitude and longitude values from Google API geolocation.


title: How can I close the identify result dialog programmatically?

text: I am trying to close the identify result dialog which appeared when I select to identify a feature from the active layer. Does someone know how can I do it?


title: How to form SQL Expressions with mix of integer/numeric and text/string fields/values in ArcPy?

text: I am trying to create a query for the select by attribute function within a Python script.This is my current code.                   lot = '96'         dp = 756421              lotFile = "D:\\NCT_GIS\\DATA\\Regional_55.gdb\\Murray\\cadastre"         arcpy.MakeFeatureLayer_management(lotFile, "lot_lyr")          arcpy.SelectLayerByAttribute_management("lot_lyr", "NEW_SELECTION", "\"LOTNUMBER\" = " + lot + " AND " + "\"PLANNUMBER\" = " + str(dp))      Unfortunately I cannot concatenate and integer and if I convert DP to a string then the query is invalid as the PLANNUMBER field is numeric whilst LOTNUMBER is text. Does anyone know how to get the variables into the query properly so that I can input any lot and dp as this will eventually become an addin where users can specify which land parcel they are interested in.


title: QGIS Shapefiles have the same CRS but dont line up. (Census Tiger Data & State Data)

text: I have the Census Tiger data for Oregon from http://www.census.gov/geo/maps-data/data/tiger-data.html Then the bottom one of 2010 Census Population & Housing Unit Counts — Blocks. The shp loads fine into QGIS 1.8 and shows it as EPSG 4269/NAD83. Then I have this city data from the State of Oregon Website. http://navigator.state.or.us/sdl/data/shapefile/m2/cities.zip It claims to be in EPSG 4269/NAD83 also. When I first loaded it up the scale of both were WAY off. The projection of the Cities you had to zoom out so far to see that the state population map became a tiny dot. (i.imgur.com/QZLQjfO.jpg) I re-saved the cities shapefile and chose to save it as a EPSG 4269/NAD83 and reloaded it. Now they both show on the same scale but the cities is far south of the Tiger file. (i.imgur.com/wI1OzSG.jpg) I tried enabling on the fly projections to see if that would fix it and no go. I manually loaded up some geocoded addresses under the NAD83 and they fit perfectly onto the Tiger/Census map so I think there is something wack with the city data but I can't figure it out. I am pretty new to QGIS and very much a novice at GIS in general. Any tips or ideas on ways to get these to line up would be helpful. I have found that if I save other files to 3644 they match up with the Cities data. But if I save the cities data as any style let it be 3644 or 4269 it no longer matches up it becomes like Image 2 where it is way south of the other files. This leads me to think that the Cities file has some sort of lat/long correction that when saving to other CRS or when re-projecting as other CRS causes it to show up very far south. Now investigating how to remove/fix this attribute any and all help is appreicated.


title: Update a NetCDF file using GDAL

text: I have to edit a NetCDF file using GDAL in C++ code. When I try to update a subset I have this error message:               ERROR 6: The NETCDF driver does not support update access to existing datasets.      How can I change size and values of a NetCDF subset ? I use this code to try to update subset 1 :               GDALDataset *dataset;          dataset = (GDALDataset*) GDALOpen("NETCDF:\"mynetcdf.nc\":Band1", GA_Update );


title: QGIS Raster Calculator dialog doesn't resemble that in documentation

text: I'm very new to QGIS. Raster Calculator looks (from online sources) like it ought to have all kinds of buttons and fields. Mine is rather stripped down. I have two rasters open, and I just want to divide their values. Is there a plugin missing or something? (ps -- it doesn't change if I select the rasters) ![My Raster Calculator](http://i.stack.imgur.com/JfR1j.png)


title: Inverse Distance Weighted Python error in QGIS 2.0

text: When I wanto to use the command Inverse Distance Weighted in QGIS 2.0, I want to execute as batch process but when I open file it appears a window that say Error de Python This is what it says: > Traceback (most recent call last): File > "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\processing\gui\BatchInputSelectionPanel.py", > line 70, in showSelectionDialog self.text.setText(str(files[0])) > UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position > 71: ordinal not in range(128) Python Version:   * 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] QGIS Version:   * 2.0.1-Dufour Dufour, ebebdf3 > Ruta de Python: > ['C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\processing', > 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python', 'C:\Users\Genesis/.qgis2/python', > 'C:\Users\Genesis/.qgis2/python/plugins', > 'C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins', > 'C:\PROGRA~1\QGISDU~1\bin\python27.zip', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\DLLs', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\plat-win', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\QGISDU~1\bin', > 'C:\PROGRA~1\QGISDU~1\apps\Python27', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\PIL', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\win32', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\win32\lib', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\Pythonwin', > 'C:\PROGRA~1\QGISDU~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', > 'C:\PROGRA~1\QGISDU~1\apps\qgis\python\plugins\fTools\tools'] I am working with a shp file that contains a point list from a whatershed


title: How can I move along a line (or path)?

text: Given a line (street, railroad, river...) I want to simulate a moviment inside this line. Example: See this picture: ![enter image description here](http://i.stack.imgur.com/yM0nq.jpg) Say I'm in "Nagqu" and want to move to "Kunlunqial". In a time (t=0) I'm in Nagqu. By flowing the time, my point moves a little to northeast (lets say a velocity of 40MPH). In this time (t=1) I want a point exactly inside the railroad. I know how to trace a straight line from a point to anohter, but I need to stay in the railroad (or line) no matter where it goes to. I need to find a point in that line until I reach my destination. In other words: find a point inside a line given a direction (a line have only 2 directions).


title: pgrouting: Using nodes instead of ways

text: I want to compute the shortest path between two points origin=(34.052299,-118.1812657) destination=(34.141132,-117.853179). Below is my workflow. **Step 1:** Find the nearest nodes. origin: the following returns **590279764**               SELECT id     FROM nodes     ORDER BY st_distance(the_geom, st_setsrid(st_makepoint(-118.1812657, 34.052299), 4326))     LIMIT 1      destination: the following returns **123007528**               SELECT id     FROM nodes     ORDER BY st_distance(the_geom, st_setsrid(st_makepoint(-117.853179, 34.141132), 4326))     LIMIT 1      **Step 2** : Compute shortest path between origin and destination.               SELECT *     FROM pgr_dijkstra(         'SELECT gid as id, source, target, length AS cost FROM ways',         590279764, 123007528, false, false     );      However when I execute this I get the following error.               ERROR:  Start vertex was not found.          ********** Error **********          ERROR: Start vertex was not found.     SQL state: XX000      Why is this happening? Kind regards.


title: How to create vector-based maps showing historic borders

text: I'm an absolute beginner in map making. I want to create digital maps with European historic borders that all have the same projection and style. All the data should be vectorized. My idea is to have a blank digital map on which I draw the borders. To create the borders I take an existing map that shows the historic borders. My questions:   * Is there a collection of hgis data (freely) available so that I don't have to do it myself?   * Is there a good tutorial for my task?   * How do I map the map showing historic borders to the blank map?   * How do I copy the border map? Should I use a tablet an pin a print of the map on it?


title: GeoExt2 missing ext-override-ajax.js

text: In GeoExt (1) there was a file called "ext-override-ajax.js" which used OpenLayers proxy for GeoExt calls (usefull for print pdf). In GeoExt2 the file doesn't exist and when trying to use POST for printing pdf we get the following error :               Origin xxxx is not allowed by Access-Control-Allow-Origin      How can I overcome this?                   launch: function () {                  printProvider = Ext.create('GeoExt.data.MapfishPrintProvider', {                 method: "POST",                  capabilities: printCapabilities, // from the info.json script in the html                 customParams: {                     mapTitle: "Printing Demo",                     comment: "This is a map printed from GeoExt."                 }             });                  printProvider.capabilities.createURL = "http://xxxx/geoserver/pdf/create.json";             printProvider.capabilities.printURL = "http://xxxx/geoserver/pdf/print.pdf";                  printExtent = Ext.create('GeoExt.plugins.PrintExtent', {                 printProvider: printProvider             });     .     .     .


title: When digitizing, polygons are inverted

text: I need to use QGIS to digitize my images. My images are scanning electron microscope (SEM) images of rocks. I am interested in analyzing the pore space in the images. Here is the steps I follow:   1. I use imagej to threshold the images; convert the gray scale image to a black and white image (0s an 1s).   2. I use QGIS to digitize the black and white image to create a shapefile of polygons that I can use for further analysis. The polygons represent the pores in the images.  I ran into a little problem while following these steps. When I digitize my images using raster-conversions-polygonize, the polygons come out inverted. Any ideas as to why this is happening? PS: I noticed that the origin of the image changes when I load it into QGIS form the bottom left corner to the top left corner. I couldn't change it to check if it is the source of error.


title: Layers and variables are not coming out in the raster calculator tool window

text: I have many shapefiles in the table of content but layers and variables are not coming out in the raster calculator tool window. I placed the cursor the left of the Raster Calculator window, dragged the window to the left, but the variable box did not appear; I also tried with dragging and dropping the raster layer from the table of contents or Catalog directly into the expression box, no result. Would you be able to help me please?


title: User defined parameter within code block of field calculator - Modelbuilder - ArcGIS - Python

text: I am using Reclass within a Code Block in Field Calculator in a Model to calculate field values for a variable based on several other fields. Using reclass is much quicker than select and then using Calculate Field. The example below works fine. ![enter image description here](http://i.stack.imgur.com/xE0OK.jpg) This is a simple example of the way i am using this. The typical use references many more fields. My question is this. Instead of a hard coded and fixed value i wish to use a user generated Parameter.Therefore I set a new variable named "Buildx", set this as a Parameter. Then i replaced the value of "30" in the code block with %Buildx%. This should work as in line variable substitution, however i get the 99999 error code. ![enter image description here](http://i.stack.imgur.com/FwqyW.jpg) I tried setting the stand alone variable Parameter as either Any Value or as a Long Integer, but neither worked. I'd be grateful of any advice or ideas. Error message below - the stand alone variable has been coded as 30, so it appears as 30 in the error message, but results in an error. ![enter image description here](http://i.stack.imgur.com/g7JBB.jpg)


title: Use Esri Geoservices REST as backend for Python web framework (Django?)

text: I would like to know if it's feasible to use an existing Python web framework such as Django/GeoDjango as a frontend to work with Esri's Geoservices REST API? I envision developing a database engine that hits REST endpoints in JSON as database "tables". Django Admin and Django Forms are very well designed and I think they could serve as great interfaces for adding, changing and deleting both spatial and non-spatial tables, especially those with relationships. EDIT: As I think more about this, maybe it isn't about changing the source code of Django, but instead designing the web application to support the needs. Models provide storage of map service links and Views provide the CRUD functionality through calls to the REST endpoints.


title: How to change the color of a vector layer in pyQGIS?

text: Is it possible to change the color while adding a vector layer? I have a vecot layer with water areas and want to load it with a blue color. The layer is added with:               QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)      Can I somehow change the color after or while loading? Thanks


title: SQL Server STRelate equivalent of Oracles SDO_RELATE(...mask=anyinteract)

text: In Oracle Spatial, we are running checks on a graph. The Check should provide Nodes, which are marked as endnodes (Attribute "EDGEDEGREE" equals 1) but are in fact located somewhere along an edge. We are using Oracles Relate function to do this with the spatial relation pattern "mask=anyinteract" In Oracle the Query looks like this:               SELECT 'Node' AS OBJECTTYPE,n.objectid AS OBJECTID,...       FROM NODE n, EDGE e       WHERE n.edgedegree=1        AND n.neighbornode_objectid IS NULL       AND SDO_RELATE(n.SHAPE,e.SHAPE,'mask=anyinteract')='TRUE'       AND e.nodefrom_objectid<>n.objectid        AND e.nodeto_objectid<>n.objectid;      Now we want to do the same on SQL Server (2012 has advanced spatial relation functions now). STRelate uses DE-9IM Sequences to do this. mask=anyinteract corresponds to "non-disjoint" or simply "intersect", but there are 4 different types of intersect. Which DE-9IM Sequence corresponds best to mask=anyintersect for the following T-SQL Query?               SELECT 'Node' AS OBJECTTYPE,n.objectid AS OBJECTID,...       FROM NODE n, EDGE e       WHERE n.edgedegree=1        AND n.neighbornode_objectid IS NULL       AND n.SHAPE.STRelate(e.SHAPE.MakeValid(),'<?DE-9IM Sequence?>')='TRUE'        AND e.nodefrom_objectid<>n.objectid        AND e.nodeto_objectid<>n.objectid;      Could you please explain me these four intersection possibilities, when relating a point on a line?


title: 3D WebPortal for a large amount of data

text: I am looking to create a 3D WebPortal for my client. My organisation has ArcGIS for Server so we would be looking for the easiest way to deploy using this (although open to other suggestions). There is potentially a large amount of data...DTM/DSM, 3D buildings, Aerial Imagery and many vector datasets. Have any of you deployed something like this before. I guess the key problem is the '3D part. Currently we supply a standalone appplication that uses ArcGIS Explorer, but they now want this across the organisation as a webportal. Or maybe served from our server to ArcGIS Explorer, if that can be done? Any suggestions are much appreciated! Regards


title: ArcObjects- IBorder.GetGeometry() in Python

text: I am trying to get geometry of frame border trough IFrameElement.Border. I do receive IBorder object, which has .GetGeometry() method. How do I use this method to get geometry of the border? I can not find code snippet in any language, so any advice where to look for is appreciated.


title: Do OrthoRectified Images have shadow?

text: Orthorectified images have removed relief displacements and tilt displacements. Since the assumption of orthorectification is to keep the light source at infinite distance so that the light rays are parallel to each other and perpendicular to ground. They should not have shadows. Is it true?


title: How to control state of buttons in Python Add-In?

text: I have bunch of buttons to perform separate tasks within a Python Add-In. Buttons are greyed out and required to be enabled after initial tools run. In the following example, tool1 is turned off after execution using its ID and button1 is enabled. Classes are arranged alphabetically at the time of Add-In construction. This configuration of classes works sometimes and fails at others with message: "NameError: global name 'button1' is not defined". This is confusing as to why it runs sometimes and fails at others. Can anyone please help with explanation as to why is it the case and how to better control the state of buttons without error?               class Calc(object):         """Implementation for test_addin.button1 (Button)"""         def __init__(self):             self.enabled = False             self.checked = False         def onClick(self):             """do something"""          class process(object):         """Implementation for test_addin.tool1 (Tool)"""         def __init__(self):             self.enabled = True             self.cursor = 3              def onMouseDownMap(self, x, y, button, shift):             """do something"""                  tool1.enabled = False             button1.enabled = True


title: Geoserver Add External Wms service

text: I use geoserver war 2.4.5 with tom cat. When i try to add wms data source from add store. it gives "Connection test failed: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target" and wms Capabilities URL is "https://" how can i fix this problem?


title: Best GIS system for high performance web application - PostGIS vs MongoDB

text: I am working on a web/mobile application based on location data. Since i am already familiar with MongoDB, i found the geospatial indexing of mongo is quite suitable for my needs. As i am mainly dealing with simple/short location points, Mongo 2d indexing is good for me. Along the way i picked PostGIS, because of its stable/mature way. And its awesome feature set. But my main concern is performance since my data is heavily dependent on location(mostly 70 - 80% of the db calls deal with the location). I like mongo because its used by high performance web apps like foursquare already. But i have seen PostGIS is mainly used in government/enterprise projects (mostly non web/mobile apps). So i am little confused right now to choose the right GIS db for my web/mobile app? Got any suggestions? Cheers


title: Why is "calculate geometry" grayed out when data frame properties shows map units are in meters not degrees?

text: I'm using ArcMap 10.0 and am trying to get the length of a polyline by adding a field to the attributes table and calculating geometry, but that option is grayed out. Someone suggested that it's because my map was in degrees but according to the properties for the data frame, both display and map units are in meters, which means I should be able to get the lengths of these lines, right? Thanks! Steve


title: Software for building non-overlapping sets of polygons?

text: We have multiple populations of patients spread out over geographic distances. For each population, we want users to easily define non-overlapping polygons. The outer borders are likely to be U.S County boundaries, if that makes any difference. Essentially, I'd like for users to visually build groups of non-overlapping polygons and have the application provide us with sets of coordinates for each polygon. I would then be using the data in Google Maps. We currently have a method to identify patient's location by lat/long, using Google Maps API if the user needs to approximate the location. Web-based software is preferred, but I'd consider a desktop package if the interface was easy enough for our users with minimal training.


title: How to extract coordinates from a coastline layer?

text: I have downloaded QGIS and the Natural Earth base maps. I'd like to somehow get a list of coordinates of a selected coastline. I've got the 10m_coastline layer selected to what I want but can't see a tool or other table to join this to for coords?


title: What is the correct way to convert a USGS Orthoimage from WorldImage format to tiled GeoTiff for GeoServer?

text: USGS provides different resolution orthoimage quadrangles in the WorldImage format (*.tif with an accompanying *.tfw world file). Some of these quadrangles can be used by GeoServer (2.1.0 - 2.1.2) by creating a WorldImage store and publishing the layer (some of them throw an exception when trying to publish the layer). When publishing a GeoTiff layer that has been converted from a currently working WorldImage layer, I am getting the following exception:               2012-01-10 08:38:33,228 WARN [referencing.factory] - Axis elements found in a wkt definition, the force longitude first axis order hint might not be respected:     PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295]], PROJECTION["Mercator_1SP_Google"], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH], AUTHORITY["EPSG","54004"]]     2012-01-10 08:38:39,674 INFO [geoserver.web] - Error saving layer     java.lang.NullPointerException         at org.geoserver.catalog.impl.CoverageStoreInfoImpl.getFormat(CoverageStoreInfoImpl.java:42)     ...      I tried using **gdal_translate** in the following way (substitute 1234 with real values): `gdal_translate -of GTiff -a_srs "EPSG:2239" -co "TILED=YES" 1234.tif ../geotiff/1234.tif` The conversion succeeds, and I can successfully create a GeoTiff store in GeoServer, but cannot publish the layer because of the error described above. This leads me to believe that I am trying to publish layers (in both cases) that are not properly formatted. Thus, what is the correct way to convert a [working] USGS orthoimage in WorldImage format to a tiled GeoTiff for GeoServer 2.1.2?


title: Uploading Service Definition Failed

text: Can anyone give me direction as to possible reasons why when publishing certain map services I get the "Packaging Succeeded but Publishing Failed" error? When I expand the Geoprocessing Results window the failure is when trying to Upload/Publish the Service Definition file. If I try to rerun the process from the .SD file I get an error message telling me that my .SD is not supported or doesn't exist; when I follow the path to the folder location my .SD is actually a .SDDRAFT. If I change the file extension to .SD the process will run but it just fails like it did originally. The frustrating part is that I have no problems publishing some things. For example, a map service with only vector data publishes with no concerns, an image service with LiDAR in a GDB publishes without an issue, JPG rasters publish without issue how ever TIFF rasters are failing, any form of aerial imagery in a GDB is failing, TIFFs in a GDB are failing. There seems to be no rhyme or reason to it as the same dataset will publish for one project but fail for another. Thank you


title: WFS getfeature request with diffent SRS

text: I'm having problems with a WFS getFeature request. I'm using openlayers with an OSM map as baselayers which use the google projection. Overlaying the layer with WMS works perfect. When I do a request to return all features within the bounds of a polygon, no features are found. My layer uses EPSG:28992. the base layer uses: EPSG:900913 My layer config in geoserver: ![SRS](http://i.stack.imgur.com/01Ark.png) When I set the declared SRS to EPSG:900913 and set "SRS handling" to "Reproject native to declared" it works fine, but I need openlayers to repoject it, not geoserver. Below is an example request I would do. I think the problem is that geoserver does not convert the spatial filter to the native SRS.               http://mydomain.com/wfs?request=GetFeature&version=1.1.0&     srsName=epsg:28992&     typeName=Namespace:Layer1&     propertyName=(*)&     CQL_FILTER=year = 2011 and INTERSECTS(geometry,POLYGON((565585.61613069 6816272.786200799,565585.61613069 6817032.3791692,564362.62367835 6817032.3791692,564362.62367835 6816272.786200799,565585.61613069 6816272.786200799)))&     outputFormat=GMl2      **Update** I just tried re-projecting some points from openlayers (EPSG:900913) via proj4js to EPSG:28992 (POSTGRESQL & Geoserver). I took 3 points and compared them. They all showed an offset.   1. **Converted** : POINT(233492,24349424947 582191,0681508556) **In Database** : POINT(233530,852147064 582315,680920578) **Difference x** : 38,60865281453 **Difference y** : 124,6127697224   2. **Converted** : POINT(133459,1980658749 455770,7481867363) **In Database** : POINT(133486,356985081 455879,67223342) **Difference x** : 27,1589192061 **Difference y** : 108,9240466837   3. **Converted** : POINT(176920,43262818802 317930,36182729155) **In Database** : POINT(176954,154083767 318023,515324756) **Difference x** : 33,72145557898 **Difference y** : 93,15349746445 If the offset was constant I could correct it. Now I'm not sure if the offset is caused by geoserver or by proj4js. I'm guessing proj4js since the wms layer does not show any offset.


title: How does pgRouting shortest_path work?

text: I am running the shortest_path function but it will not return rows of lines to follow from source id to target id. Is there a specific way to digitise my dataset? Does pgrouting understand intersections between lines? I digitised my lines one by one connecting snapping them together. To be a bit more clear, in my db i have a gid for every line, plus a source and target id for that line (plus the other columns). Shouldn't the shortest path function take me from a random source id to a random target id? I hope my problem is clear but let me know if further explanation is needed :) Thanks in advance. A


title: How can I transform some KML data to Sql Server 2008 using FME?

text: I've just downloaded FME 14 day trial. I'm trying to see how easy/hard it is to transform some KML data (a simple neighbourhood shape) into my Sql Server 2008 database using FME. I sorta don't even know where to start .. _blush_. The closest I got was   1. New Workspace Wizard   2. Source file => KML. (OGCKML)   3. Destination => Sql Server 2008 (MSSQL_SPATIAL) + EPSG:4326 After some other questions which I didn't really understand, it then hit PLAY and it did create a table called `Document` but it had a single field which was NULL. I know my KML has data in it .. cause i've loaded it up into Quantum GIS also ... and that worked. So - could anyone help me please? Are there any tutorials I could reference to learn if this product is what we need. I know there's other ways to do this but I want to keep this post only talking about FME and how to use that to do what we're trying. SIDE NOTE: Any links to pricing? None of us could find any, also ... :~(


title: Is OSM2PO ignoring some ways?

text: Recently I've started playing with OSM2PO and pgRouting but I've stumbled upon a weird problem which I'm not really sure where it comes from… I've installed OSM2PO on Ubuntu, with no errors, and I've also imported latest Portuguese data from Geofabrik, also with no errors at all. When Osm2poService started running, I've tried a very simple routing from 40.64013,-8.61054 to 40.64021,-8.61112 and get a “no routing found”-like alert box. If you check http://goo.gl/maps/k6qyr and http://osrm.at/1KY you’ll see what the result should be. I've also seen this problem while trying routings between other points, I found some routes that are really strange (not very optimized). I think that for some reason there are some ways missing in my OSM data. I'm using OSM2PO v4.5.25.


title: How to not overlap cluster popups with FeaturePopups control?

text: FeaturePopups control resolve the problem of cluster popups, but there is a small design problem in my opinion: the event popup have the same anchor as the cluster popup and they partial or total overlap. Is it possible to anchor the second (event) popup on the link on first (cluster) popup? Thank you!


title: Build Polygons from Polylines

text: I have to build the polygons from some polylines it is an area like a main land(with some boundaries) and some islands around it,islands are building polygons and main land is missing,when i have tried to build the polygons in FME.I have snapped all the lines first and used the transformers like reader- linejoiner-polygonbuilder-writer,I am also using ArcGIS,map info and QGIS. Thanks, RKM


title: create border and labels for groups of features in arcmap

text: I am relatively new to GIS, so please bear with me if my question is a basic one. I have a simple map of the parishes (counties) in Louisiana, and each of the parishes has an associated regional area which is denoted by a number. Using the symbology tab in properties, I was able to color each of the regions. However, now I need to do two things: 1) Embolden the borders between each of the regions to help make the distinctions more clear (while leaving the borders between the parishes as is) 2) Label each of the regions with their regional number. When I currently try to do this, a little number label pops up in each of the parishes rather than just one number for each region. I am using Arcmap 10 on a windows 7 PC. Thanks for your help!


title: Do you know of any sites where I could find some cool recreational shapefiles?

text: Do you know of any sites that I could find some cool recreational shapefiles? An example would be shapefile of the golf courses, ski resorts, or maybe baseball fields in the united states?


title: Splitting polygons leaves null values

text: I'm trying to split polygons with overlaping line features, using Split Polygons tool from Topology toolbar. The problem I encounter is that only one from new polygons have old attributes and others only null values. I'm using arcgis 10.1.


title: Using C# + Mapcript + Openlayers

text: Nowadays i'm using Mapscript and C# to generate and display a Mapfile, but in this way i need to create manualy the interface, is there any way to use Mapscript + Openlayers?


title: How do i install liblas using OSGeoW4

text: I have downloaded and installed the OSGeo4W program on my system. I recently downloaded gdal file and liblas. When i try opening the osgeow4 shell, it keeps telling me the gdal file is missing. when i try installing liblas using osgeow4, i don't get any response from my system even though i have followed the instructions on the liblas website.


title: ArcGIS 10.1 Legend - Increase Icon on legend without increase on map

text: Was wonder if anyone knows how to increase a icon on the legend without it increasing on the map. I have to print an A0 and when I look at the legend the icons for each type are quite small...any attempt of increasing the size also increases it on the map. ![legend](http://i.stack.imgur.com/NKnnT.jpg) I have tried what MAJ742 suggested - the legend does increase in size - but not the icons see attached image. I was looking to be able to enlarge the icons only on legend. ![icons resizing](http://i.stack.imgur.com/NKnnT.jpg)


title: How can I edit a file geodatabase without using tools from Esri?

text: I am looking for a tool (Python library etc.) that would allow me to edit a file geodatabase without ESRI software? It is possible?