title: can't get QgsGraphAnalyzer to work on a standalone script

text: I want to use QgsGraphAnalyzer.dijkstra in a standalone script. using version 1.8 I am following the guide at: http://www.qgis.org/en/docs/pyqgis_developer_cookbook/network_analysis.html Here is my set-up since that is a big part of standalone               #-*- coding: utf-8 -*-     import sys     import os          #QGIS step up that needs to be done before importing from QGIS     sys.path.append("/Applications/QGIS.app/Contents/Resources/python")     from qgis.core import *     QgsApplication.setPrefixPath("/Applications/QGIS.app/Contents/MacOS", True);     QgsApplication.initQgis()          app = QgsApplication([],True)     from qgis.gui import *     from qgis.networkanalysis import *     from qgis.utils import *     from PyQt4.QtGui import *     from PyQt4.QtCore import *          ... code is the same as the tutorial      when i print out tiedpoints, they are the same in the qgis console as well as my standalone however after i call dijkstra, the qgis console gives a reasonable tree value, but my standalone only gives [-1, -1, -1, -1, -1...] for tree. edit 1: Figured out the problem! However I need help with fixing it. In my standalond script when i do print graph.arc(0).properties()[0].toDouble() i get (nan, true) However in the Python console, i get (an actual number, true) edit 2: I've been working on this, still can't figure out why it's not working. However, I've narrowed down the problem. Building the vectorLayer seems to be the same on both inside and outside. This means the builder.graph() or some step in that area seems to be the problem. Any thoughts how to fix this. edit 3: some code: Here is where I use the director: I believe the error is in here since graph is returning (nan,true) as mentioned above               def getPath(vectorLayer, startX, startY, endX, endY):      director = QgsLineVectorLayerDirector(vectorLayer, -1, '','','',3)      #way to calculate edge properties      properter = QgsDistanceArcProperter()      director.addProperter( properter )           #making a builder which makes the graph and setting coordinate reference system      myCRS = QgsCoordinateReferenceSystem()      builder = QgsGraphBuilder(myCRS)           #converting coordinates to Qqgs Points and add it to builder      startPoint = QgsPoint(startX, startY)      endPoint = QgsPoint(endX, endY)      tiedPoints = director.makeGraph(builder, [startPoint, endPoint])       graph = builder.graph()      return graph, tiedPoints      to make the vector layer, I simply use hallwayLayer = QgsVectorLayer(hallways, "hallway", "ogr") where hallways is a path to the .shp file here is where I try to use the dij function:               #getting paths     graph, tiedPts = getPath(hallwayLayer, startPointX, startPointY, endPointX, endPointY)               #getting shortest Path on a canvas     map = QgsMapCanvas()     getShortestPath(graph, tiedPts, map)          def getShortestPath(path, indices, canvas):      startId = path.findVertex( indices[0] )      stopId = path.findVertex( indices[1] )      map = QgsRubberBand(canvas, False)      (tree,cost) = QgsGraphAnalyzer.dijkstra( path, stopId, 0)      edit 4: Seemed to narrow down the problem even more inside of qgis when i do               myCRS = QgsCoordinateReferenceSystem()     builder = QgsGraphBuilder(myCRS)     print builder.distanceArea().ellipsoidSemiMajor()      I get the same number. (I checked this with different variable names to double check this) When I do it outside i get different numbers, and they all have large e values like 2.19636051247e-314, 2.13599944534e-314


title: Why does QGIS crash when my PostGIS table has a primary key?

text: **Configuration:** **PostGIS Library: 2.0.3 GEOS: 3.3.8-CAPI-1.7.8 Proj: Rel. 4.8.0, 6 March 2012** **PostgreSQL 9.2.2, compiled by VC++ build 1600, 64 bit, running on Win2012 server 64 bit** **QGIS 2.2.0 - 32 bit Windows, running on Windows 7 64 bit.** \---> The tl;dr **Another way of looking at this issue is that any primary key added to the spatial table causes QGIS to not find a primary key on the table.** <\--- I've been struggling with a QGIS/PostGIS related problem for a few days now. My PostGIS database has a spatial table with integer column called "gid" that is assigned a primary key constraint. That spatial table can be loaded as a spatial layer in QGIS, but opening its table causes QGIS to hang and the table doesn't display. Using the select tool to select one feature within the map display will select all features. I've also noticed in the layer properties that QGIS is unable to identify a primary key. I found that if I remove the primary key constraint from the column (now the table does not have any primary key) the spatial table opens fine in QGIS and the issue is no longer apparent, but other issues occur because QGIS cannot identify a primary key for the table. I've found a work around - if I create a numeric column called oid and populate it with a sequence and do not assign a primary key to the table, QGIS can identify the oid column as a primary key. It doesn't seem to identify a similarly built column name of "gid" as a primary key, however. I've tried a few different configurations of PostGIS and QGIS. I've used QGIS 2.0 - 64 bit for Windows and experienced the same issue. I've tried another database server with identical configurations, functions, and extensions, and connecting QGIS to that server and loading spatial layers does not exhibit the issue; QGIS is able to identify a primary key column. Has anyone experienced issues with QGIS being unable to identify a primary key column when the table has a primary key in Postgres? I've searched through stack overflow and found a few issues that seem similar, but not identical to this problem. This issue appears similar, but I've used the DB manager and not experienced any success in this situation. When loading a spatial layer from PostGIS via "Add PostGIS Layer" QGIS doesn't provide a drop down box to select a primary key for any spatial layers. https://hub.qgis.org/issues/9803


title: How to Polygonize a polyline shapefile in QGIS 2.2?

text: When I used QGIS 1.8, I was able to transform polyline layers to polygon layers with the Polygonizer plugin. In QGIS 2.2, this function has been subsumed into the Processing toolbox. Unfortunately, it doesn't seem to work. I see that this problem has come up before (Make a polygon from intersecting lines in QGIS, using Polygonize or similar?) but hasn't been resolved. Here's my polyline layer: ![input](http://www.blackthornecology.ie/wp-content/uploads/2014/05/input.png) And here's what I get when I run the polygonizer function: ![output](http://www.blackthornecology.ie/wp- content/uploads/2014/05/output.png) Only a fraction of the closed shapes have been successfully closed by the polygonize function. Can anyone advise on how I might get this to work correctly? As I said, I was able to do this sort of thing with the old Polygonizer plugin, using the slow/old methodology. That doesn't seem to be implemented in the new function in QGIS 2.2. Is there somewhere else I could find it? Thanks in advance! ETA: Running on Windows 7. Installed via the standalone installer on the main QGIS webpage. ETA2: I installed QGIS 1.8 again and was able to produce this with the old Polygonizer plugin (with the output from the QGIS 2.2 processing function on top). This was produced using the "Old method" in the Polygonizer plugin. It took a long time but it worked much better. The "New method" in the Polygonizer plugin produced the same polygons as QGIS 2.2. So it appears that only the old plugin "New method" has been carried forward into QGIS 2.2? ![old polygonizer output](http://www.blackthornecology.ie/wp- content/uploads/2014/05/old-plugin-output.png)


title: Bug in F******** spatial relation? (I'm not cussing)

text: I would expect ISpatialFilter.SpatialRelDescription to behave consistently with IRelationalOperator.Relation. However, when I run the code below, I get:                   Total features : 44368         Count1: 9 T********         Count2: 9 T********         Count1: 21 F********         Count2: 44359 F********         Count1: 1 ******F**         Count2: 1 ******F**      Is this a bug in the `F********` relation ?               private void TestSpatialFilter()     {         IMxDocument mxdoc = ((IApplication)m_application).Document as IMxDocument;         IFeatureLayer fLayer = mxdoc.FocusMap.get_Layer(0) as IFeatureLayer;         IEnvelope env = ((IActiveView)mxdoc.FocusMap).Extent;         env.Expand(0.5, 0.5, true);         env.Project(((IGeoDataset)fLayer.FeatureClass).SpatialReference);         Debug.Print("Total features : {0}", fLayer.FeatureClass.FeatureCount(null));         IFeatureClass fc = fLayer.FeatureClass;         string[] rels = { "T********", "F********", "******F**" };         foreach (string rel in rels)         {             Debug.Print("Count1: {0} {1}", Count1(fc, env, rel), rel);             Debug.Print("Count2: {0} {1}", Count2(fc, env, rel), rel);         }     }          public static int Count1(IFeatureClass fc, IGeometry geom,  string relDescription)     {         ISpatialFilter sf = new SpatialFilterClass();         sf.SpatialRel = esriSpatialRelEnum.esriSpatialRelRelation;         sf.SpatialRelDescription = relDescription;         sf.Geometry = geom;         int i = fc.FeatureCount(sf);         Marshal.FinalReleaseComObject(sf);         return i;     }     public static int Count2(IFeatureClass fc, IGeometry geom, string relDescription)     {         int i = 0;         string relation = String.Format("RELATE(G1,G2,'{0}')", relDescription);         IRelationalOperator relOp = geom as IRelationalOperator;              IFeatureCursor fCur = fc.Search(null, false);         IFeature feat;         while ((feat = fCur.NextFeature()) != null)         {             if(relOp.Relation(feat.Shape,relation))                 i++;         }         Marshal.FinalReleaseComObject(fCur);         return i;     }


title: Redoing an ArcGIS Server post-install

text: I'd like to reconfigure an ArcGIS Server 10 Java implementation (single machine, Windows Server 2008 R2) and I plan to re-run the post-install. Complete: I do not need to save anything on the current machine. To get the cleanest reinstall, I intend to delete the SOM, SOC & "Webservices" accounts; the agsusers & admin groups, and the five directories created (arcgiscache, arcgisindex, arcgisinput, arcgisjobs, & arcgisoutput). Any other suggestions for redoing an ArcGIS Server 10 post-install? _Update:_ I reran the post-install and have quite a few notes. I posted them below and made this a community wiki.


title: How to have a python script self terminate in ArcMap10?

text: I have tried sys.exit, but it doesn't seem to work in ArcMap. Anyone know how to do it?


title: How to style OS VectorMap district data?

text: Following a question about ways to load OS VectorMap data, I have imported the data into ArcGIs, but now want to style it in a OS-map style. I have searched around, and found various bits of information, but no style files to download, or instructions on using them within ArcGIS. I've tried doing some styling manually, but the results aren't good. Is there any way to get some of the official OS styles?


title: Trouble accessing Sketchup Features to SKP Toolbar in ArcMap 9.3?

text: I am having trouble getting the Sketchup plugin to work in 9.3. I have installed plugin into the correct location, been able to locate the proper .dll, but when I add it, and scroll down to where it should be, it doesn't appear. Does anyone know how to get this to work? Thanks.


title: Units of gBuffer from rgeos package

text: I have this polygon:               library(maptools); library(sp)     setwd(system.file("shapes", package="maptools"))      columbus <- readShapeSpatial("columbus.shp")          proj4string(columbus) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84")     columbus <- spTransform(columbus, CRS("+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"))      I need to buffer 1km around the polygon, so I tried this:               library(rgeos)     gBuffer(columbus, width = 1000)      Could someone tell me if buffering by `width=1000` is buffering by 1km?


title: Selecting WMS Layer on hover - Error Openlayers.REQUEST.GET params

text:
I have wms baselayer and wms shapefile. I want to select the wms shapefile feature while hovering and change its color. I tried SLD Select and adding Selecting and Hover Vectors separately, but unfortunately it didn't work. Neither any of the openlayers example worked for me. And in Firebug I am getting following error : TypeError: d.params is undefined ...length;b TO be specific Chrome gives VERSION is undefined. Any help would be much appreciated!                           var format = 'image/png';                 map = new OpenLayers.Map('map', options);                      // setup tiled layer                 tiled = new OpenLayers.Layer.WMS(                     "Baselayer", "http://www.fineenergygis.co.uk:80/geoserver/GIS/wms",                     {                         LAYERS: 'Baselayer',                         STYLES: '',                         format: format,                         tiled: true,                         tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                     },                     {                         buffer: 0,                         displayOutsideMaxExtent: true,                         isBaseLayer: true,                              yx : {'EPSG:27700' : false}                     }                  );                      //setup AONB layer test                 aonb = new OpenLayers.Layer.WMS(                     "AONB", "http://www.fineenergygis.co.uk:80/geoserver/GIS/wms",                     {                         LAYERS: 'GIS:AONB',                         STYLES: '',                         format: 'image/gif',                         transparent: true,                         tiled: true,                         tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                     },                     {                         buffer: 0,                         displayOutsideMaxExtent: true,                         isBaseLayer: false,                         yx : {'EPSG:27700' : false}                     }                  );                 aonb.setOpacity(0.6);                 map.addLayers([tiled,aonb]);                      // build up all controls                 map.addControl(new OpenLayers.Control.PanZoomBar({                     position: new OpenLayers.Pixel(2, 15)                 }));                      map.addControl(new OpenLayers.Control.Scale(document.getElementById('scale')));                 map.addControl(new OpenLayers.Control.MousePosition({div: document.getElementById('location') }));                 map.setCenter(new OpenLayers.LonLat(406480,286782), 5);                 map.addControl(new OpenLayers.Control.LayerSwitcher());                           controls = {                     navigation: new OpenLayers.Control.Navigation(),                     box: new OpenLayers.Control.SLDSelect(                         OpenLayers.Handler.RegularPolygon,                         {                             displayClass: 'olControlSLDSelectBox',                              layers: ['aonb'],                             handlerOptions: {irregular: true}                         }                     )                 };                      for(var key in controls) {                     map.addControl(controls[key]);                 }                      // wire up the option button                 var options = document.getElementById("options");                 options.onclick = toggleControlPanel;                  }                  function toggleControl(element) {                      for(var key in controls) {                     var control = controls[key];                     alert(element.value);                     alert(key);                     if(element.value == key && element.checked) {                         alert("activate");                         control.activate();                          } else {                     alert("deactivate");                         control.deactivate();                     }                 }             }                  function toggleSelectionLayer(element) {                 var selectLayers = [];                 var elements = element.value.split("_");                 for (var key in layers) {                     var layer = layers[key];                     for (var i=0, len=elements.length; i<len; i++) {                         var value = elements[i];                         if (value == key && element.checked) {                             selectLayers.push(layer);                         }                     }                 }                 for (var i=0, len=this.map.controls.length; i<len; i++) {                     var control = this.map.controls[i];                     if (control instanceof OpenLayers.Control.SLDSelect) {                         control.setLayers(selectLayers);                     }                 }             }                        </script>

Map Controls
                 <input type="radio" name="control" value="navigation" id="noneToggle" onclick="toggleControl(this);" CHECKED>                 navigate

                 <input type="radio" name="control" value="box" id="boxToggle" onclick="toggleControl(this);" >                 SLD select with box

Selection layer
                 <input type="radio" name="layer" value="waterbodies" id="waterbodiesToggle" onclick="toggleSelectionLayer(this);" CHECKED>                 AONB


title: Geometric Network - Listening to network feature connection changes in the IObjectClassEvents::OnChange event

text: I need to be able to tell when a particular type of feature, that participates in a geometric network, is having its geometry automatically modified due to the geometric network. What i mean is that I'm currently listening to the IObjectClassEvents::OnChange and use it to work out if the feature being changed is of the type I am interested in and if the change is to its geometry. I use IFeatureChanges and IRowChanges. This works fine. However I also want to check if the change is caused by a change to a connected node in the geometric network OR if the change is due to the user modifying the feature directly. Anyone have any idea how to do this ? I would be looking for a INetworkFeatureChanges or an INetwokClassEvents interface, but they don't exist.. Thanks, Ian


title: Looking for stand alone map server

text: New to mapping tech. Requirements:   * Stand Alone Server for offline use (will be an internal app) - No Mobile.   * Ability to add custom CSS class and hover information to US counties   * Programmatically interact with map   *     * When user hovers over zip code, zoom into and highlight county on map I saw TileMill and TileStream, but TileStream doesn't work with Node 0.6+ like TileMill. Can someone point me to the right direction? * * * EDIT Goal is something similar to: http://polymaps.org/ex/population.html


title: show a Collection of LineStrings with labels

text: I use the following peace of code to show multiple `LineString`s which have a point as the last one, along with a label:               var strokeColors = [...];//"#FFAACC" kind-of elements     var linesLayer = new OpenLayers.Layer.Vector("Lines Layer", {         styleMap: new OpenLayers.StyleMap({'default':{             pointRadius: 6,             labelYOffset: -15,             labelOutlineColor: "white",             labelOutlineWidth: 3,             label: "${label}"         }})     });     var feats = [];     for(var j=0;j<lines.length;j++){         var points = [];         var feat;         for(var i=0;i<lines[j].length;i++){             var p = new OpenLayers.Geometry.Point(lines[j][i].x,lines[j][i].y);             if(i==lines[j].length-1){                 feat = p;             }             points.push(p);         }         var lineString = new OpenLayers.Geometry.LineString(points);         var lineFeature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Collection([lineString, feat]));         lineFeature.style = {             strokeColor: strokeColors[j%4],             strokeOpacity: 1.0,             strokeWidth: 6         };         lineFeature.attributes = {             label: lines[j].lab         };         feats.push(lineFeature);     }     linesLayer.addFeatures(feats);     map.addLayer(linesLayer);      This shows the lines, with the correct color for each one although the label is not shown. Such label, though, is indeed shown if I comment out the `lineFeature.style={...}` lines. In this case, though, the lines are all black. I'm quite new at OpenLayers, so I'm not sure: what am I doing wrong? For reference, I started out with this example.


title: Is there a difference in performance between Merge and Append in ArcGIS?

text: Often I find myself in a situation where I don't care whether or not my tool produces a new feature class, but I do care how long it takes to combine all of my large datasets. Does it take longer to produce a new feature class using the Merge tool instead of the Append tool, or are Merge and Append essentially the same in terms of performance?


title: Different ways to publish media-enhanced route/trail information to mobile users

text: I'm looking for some different approaches that a non-profit I'm helping could use to publish information about some tourism routes. Each route is 1-2 tracks, with some historical background information in the form of text and pictures, plus some POIs representing specific historical details and logistics (eg, toilets, parking, cafes, hotels...) We'd like to be able to give this to people in a form they can use on mobile phones, while enjoying the trails - preferably available offline. Ideally, they would be able to see at a glance "20m on my left is a former rail station [see photo], and the nearest food is 3km further ahead up a steep hill". The view would (ideally) be linear, rather than just a top down 2D map view. So, some approaches we've thought of so far:   * Develop an app for each route   * Find an app that does most of what we want, and provide content for it (everytrail.com is one example - would like to hear of others)   * Provide track and POI information in KMZ form, choose a recommended app or two (eg, Locus), and give instructions on how to combine them. We're also adding information to OpenStreetMap where appropriate. So - I would love to hear of any other possible ways to tackle this. We may well pursue more than one simultaneously. [Apologies if this isn't quite within the scope of GIS. It's not quite within the scope of SO, SU or Android either...]


title: Batch Sum Fields Script

text: I have created a python script that batch summarizes all string fields within a fc table based on the concatenation of two fields. The script loops through a list of the fields, however it stops about halfway through (same spot each time). Why does this code not process the remaining string fields within the list? After running it once, if I delete all the fields that it processed correctly the first time, then run it again on only the fields that it did not process, it runs ok. Maybe my issue is with this line:               fieldname = flist.pop(0)      Ideas? See code below               import arcpy, os     from arcpy import env          try:              # Local variables:         inTable = arcpy.GetParameterAsText(0)         outWKSpace = arcpy.GetParameterAsText(1)              # Process: Add Field         arcpy.AddField_management(inTable, "cat", "TEXT", "", "", "200", "", "NULLABLE", "NON_REQUIRED", "")              flist = arcpy.ListFields(inTable, '', 'String')         fieldname = ''              for field in flist:             fieldname = flist.pop(0)             arcpy.CalculateField_management(inTable, "cat", "!Sub_Batch!+\" \"+ !"+ fieldname.name +"!", "PYTHON_9.3", "")             outTable = outWKSpace + "\SUM_" + fieldname.name             table2 = arcpy.Frequency_analysis(inTable, outTable, "cat", "")                  intCount = arcpy.GetCount_management(outWKSpace + "\SUM_" + fieldname.name)                  arcpy.AddMessage(fieldname.name + ' records = ' + str(intCount))          except Exception, e:       import traceback       map(arcpy.AddError, traceback.format_exc().split("\n"))       arcpy.AddError(str(e))      thank you!


title: queue.empty error when using search cursor

text: I'm having trouble with an error message and can't seem to figure out the reason which, I'm sure is something simple. I have a bit of code listed below:               insertPts = arcpy.da.InsertCursor(newFC, ( "FieldA", "FieldB"))          with arcpy.da.SearchCursor(FC, ("FieldA", "FieldB"),""" "FieldA" IS NOT NULL """) as search:         for row in search:             num = row[0]             rPtsNumber = randint(1, row[0])             row[0] = rPtsNumber             PTSid = int(row[1])             for x in xrange (num):                 insertPts.insertRow((rPtsNumber, PTSid))      the error occurs in the line 'for row in search:'. I though it may be an issue with the where clause however, I tried creating a new feature class based on the where clause criteria and continue to get the error. Thanks for any help you can provide.


title: What causes ValueError: I/O operation on closed file?

text: I obtain the following error message:               ValueError: I/O operation on closed file      Here is my code (It selects each polygon contained in the shapefile "selected_polygons.shp" and builds the least-cost path between the previously selected polygon and each polygon contained in the same shapefile)               import arcpy     from arcpy import env     from arcpy.sa import *     arcpy.CheckOutExtension("Spatial")     arcpy.env.overwriteOutput = True     arcpy.env.workspace = "C:\Users\LCP"     arcpy.env.extent = "costsn.tif"          with arcpy.da.SearchCursor("selected_polygons.shp",("*")) as rowsInPatches_start:           for rowStart in rowsInPatches_start:              ID_patch_start = int(rowStart[3])              ## Define SQL expression for the fonction Select Layer By Attribute         expressionForSelectInPatches_start = "GRIDCODE=%s" % (ID_patch_start)               ## Process: Select Layer By Attribute         arcpy.MakeFeatureLayer_management("selected_polygons.shp", "Selected_patch_start", expressionForSelectInPatches_start)              ## Process: Cost Distance         outCostDist=CostDistance("Selected_patch_start", "costsn.tif", "", "outCostLink.tif")              ## Save the output         outCostDist.save("outCostDist.tif")              with arcpy.da.SearchCursor("selected_polygons.shp",("*")) as rowsInSelectedPatches_end:                   for rowEnd in rowsInSelectedPatches_end:                      ID_patch_end = int(rowEnd[3])                       ## Define SQL expression for the fonction Select Layer By Attribute                 expressionForSelectInPatches_end = "GRIDCODE=%s" % (ID_patch_end)                       ## Process: Select Layer By Attribute in Patches_end                 arcpy.MakeFeatureLayer_management("selected_polygons.shp", "Selected_patch_end", expressionForSelectInPatches_end)                      ## Process: Cost Path                 outCostPath = CostPath("Selected_patch_end", "outCostDist.tif", "outCostLink.tif", "EACH_ZONE","FID")                      ## Save the output                 outCostPath.save('P_' +  str(int(ID_patch_start)) + '_' + str(int(ID_patch_end)) + ".tif")                      ## Write in a file .txt                 outfile=open('P_' +  str(int(ID_patch_start)) + '_' + str(int(ID_patch_end)) + ".txt", "w")                 rowsTxt = arcpy.SearchCursor('P_' +  str(int(ID_patch_start)) + '_' + str(int(ID_patch_end)) + ".tif")                 for rowTxt in rowsTxt:                     value = rowTxt.getValue("Value")                     count = rowTxt.getValue("Count")                     pathcost = rowTxt.getValue("PATHCOST")                     startrow = rowTxt.getValue("STARTROW")                     startcol = rowTxt.getValue("STARTCOL")                     print value, count, pathcost, startrow, startcol                     outfile.write(str(value) + " " + str(count) + " " + str(pathcost) + " " + str(startrow) + " " + str(startcol) + "\n")                     outfile.close()


title: Edit Field Value of Feature Class Using Python in ArcGIS 10.2

text: I have a feature class whose attribute table looks like this: Latitude | Longitude | Area For the area column, all rows are null. I would like to put in a specific value for all rows using Python. I know how to do this on the front-end in the ArcMaps application ( right click > Open Attribute Table > right click on column > field calculator > input value). How can I accomplish this programmatically using Python?


title: Sorting layers in legend using python in QGIS 2.4

text: In QGIS 2.2 , I was able to sort in alphabetical order the layers simply using this:               self.maplegendtree = iface.mainWindow().findChild(QTreeWidget, "theMapLegend")     self.maplegendtree.sortItems(0, Qt.AscendingOrder)      I search a lot and I understand there where some changes with the legend in QGIS 2.4 ... I tried this :               self.maplegendtree = self.iface.mainWindow().findChild( QTreeView, 'theLayerTreeView')     self.maplegendtree.setSortingEnabled(True);     self.maplegendtree.sortByColumn(0, Qt.AscendingOrder);      No error ... but no changes in the legend or mapcanvas? Any clue? thank you!


title: Chopping vector polygons

text: I am a Global Mapper user. In GM we have a function to chop polygons with holes in it. ![enter image description here](http://i.stack.imgur.com/oJq3j.jpg) ![enter image description here](http://i.stack.imgur.com/0zRM3.jpg) Is there such function in QGis? If yes, is it available via script? I am totally new to QGis so I would appreciate detailed instructions. thank you


title: How do I convert a VMAP to a shapefile using GDAL?

text: This is my first time trying to convert a VMAP to a shapefile and the examples online aren't as straightforward to me. Any guidance is appreciated.


title: using Python to calculate NDVI, output as a Geotiff

text: I need a script that can calculate NDVI from two separate input Geotiff files, then output the results as a Geotiff. I wrote following script, most of which is borrowed from various on-line sources (I've never had any training with python and only minimal experience). I know the calculation part works, because if I print out the ndvi array, I get reasonable values. If I calculate statistics on the array, I also get reasonable results. The script does create an output file called ndvi.tif, but all the values in the file are 0 ( and not 0.0). I need to convert this into a batch script that can do this calculate on a large number of input files, but right now I can't figure out why it won't output calculated values to a file. Any advice?                +++++++++++++++++++++++++++++++++++++++++++++           from osgeo import gdal      import numpy as np      from numpy import *      g = gdal.Open("fhmod1.tif")      red = g.ReadAsArray()      g = gdal.Open("fhmod2.tif")      nir = g.ReadAsArray()      red = array(red, dtype = float)      nir = array(nir, dtype = float)      check = np.logical_and ( red > 1, nir > 1 )      ndvi = np.where ( check,  (nir - red ) / ( nir + red ), -999 )       geo = g.GetGeoTransform()        proj = g.GetProjection()         shape = red.shape              driver = gdal.GetDriverByName("GTiff")      dst_ds = driver.Create( "ndvi.tif", shape[1], shape[0], 1, gdal.GDT_Float32)      dst_ds.SetGeoTransform( geo )      dst_ds.SetProjection( proj )       dst_ds.GetRasterBand(1).WriteArray(ndvi)


I use the python module "shapely" to make Polygons (like below). Can I convert the sharp edges of a polygon easily to round edges? Such that when I have unified some polygons I could issue a command like               make_round_edges(polygon, edge_rounding_radius)       ? ![enter image description here](http://i.stack.imgur.com/Thwv3.png)


title: How to find measures of points that are close to route in ArcGIS 10.2?

text: What I have is a route layer of a river and points layer with associated temperature data (temperature of the river) that were collected using an airplane. The path of the points does not match the path of the river, but the points are in the vicinity of the river. My goal is to calculate river km locations of those points along that river layer. I could do this manually, but there are over 600 points. Is there a way to find locations for all of those points on the route layer that is river? ![This is how my data looks like](http://i.stack.imgur.com/EqNFn.jpg)


title: How to set the zIndex of the CartoDB.js layer on top of Google Map's GroundOverlay?

text: I am trying to combine the Google Maps API Ground Overlay example with CartoDB.js example using Google Maps. It appears both APIs are displaying their layers correctly. However, the ground overlay is always displayed on top. I would like to see the positions from the CartoDB viz layer to appear on top of the ground overlay. Any suggestions?


title: How can GIS be used in disaster management?

text: I know that mapping plays a significant role in dealing with natural disasters, but I'm not familiar with how that works as my background is primarily web development. I'm wondering if there is any way for GIS professionals or amateurs to contribute to the relief efforts now or as part of recovery efforts.


title: Accessing files from GeoExplorer 3 using Pathfinder 5.4?

text: I have an old GPS unit that I would like to continue to use. I have a new version of Pathfinder for my newer GPS unit (GeoXT 2008). How can I download files collected from my old GPS unit with the newer version of Pathfinder office?


title: Habitat connectivity -- how to map connectivity between polygons based on a separate polygon layer

text: I have a polygon layer representing a habitat type and another polygon layer representing water features. I want to be able to assign to each water feature whether it shares a connection via a habitat polygon with another water feature or not (within a distance radius). A complication is that if I use buffers to represent the distance radius, they overlap. An additional complication is that I've tens of thousands of the water features. I've experimented with different solutions using intersections, but I've not been able to come to a solution. Anybody have any idea? I think that this is kind of a FRAGSTATS or Patch Analyst problem, but with vector and with many tens of thousands of landscapes to run it on. In the image below, orange polygons are water features and the green area is the habitat (the black circles are 1 km buffers). ![enter image description here](http://i.stack.imgur.com/YN2yC.png) In the map above, water features 20957 and 20882 are obviously not connected via the habitat to any other feature, nor is feature 44444 (which is connected to the habitat but not connected by the habitat to any other feature). On the other hand, there are definitely connections for 21077, 21044, 20993 and 37716, while there is no connection within 1 km for feature 21655. I don't need to know the IDs of the connecting features, or even a count, just whether or not there does exist a connection to another feature within a 1 km buffer.


title: How to get features from a Service Layer?

text: I am using a Map Service from http://watersgeo.epa.gov/arcgis/rest/services/NHDPlus_NP21/WBD_NP21_Simplified/MapServer/. It offers multiple layers and its a great resource. I'm wondering if its possible to access or create features layers from this service? In the end, I'd like to shade the watersheds according to differing data values similar to the example at https://developers.arcgis.com/javascript/jssamples/styling_svg_fb.html. From what I'm reading at https://developers.arcgis.com/javascript/jshelp/inside_feature_layers.html, it seems like Service Layers just do not provide all the fun vector information that Feature Layers do. So, even if I can't get access to the color of the different shapes, can I at least get the gps coordinates so I can draw new polygons to work with?


title: ValueError when instantiating LineString from a mix of tuples and Point objects

text: I'm new to Shapely, and tried instantiating a LineString object from a mix of tuples and Point objects like this:               >>> LineString([Point(1,2),(2,3),Point(3,4),(5,5)])      I get the following traceback:               Traceback (most recent call last):       File "<stdin>", line 1, in <module>       File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/geometry/linestring.py", line 46, in __init__         self._set_coords(coordinates)       File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/geometry/linestring.py", line 70, in _set_coords         self._geom, self._ndim = geos_linestring_from_py(coordinates)       File "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/geometry/linestring.py", line 228, in geos_linestring_from_py         "Input %s is the wrong shape for a LineString" % str(ob))     ValueError: Input [<shapely.geometry.point.Point object at 0x1057570d0>, (2, 3), <shapely.geometry.point.Point object at 0x105e69690>, (5, 5)] is the wrong shape for a LineString      According to lines 19-22 of the test script, it's supposed to be able to handle this mix of different objects. Any ideas if this 'feature' is actually implemented? Or should I be sticking to homogeneous class types when instantiating a new LineString object? p.s. Running python 2.7.5, shapely 1.3.0, Mac OS X 10.9.4


title: Expression to display Image in MapTips?

text: In ArcMap, is it possible to display an image by using a path in the attribute table to show an image in MapTips? Any Python or vbScript expression are welcome as long as it is MapTips which shows the image. I do not want to use HTML Popus.


title: Save selection option in QGIS 2.4.0

text: I am using QGIS 2.4.0 Chugiak version. Is there an option to save selected features from a shapefile? I couldn't find such an option in this version. I am using stand alone application. Is this option available in this version? Please help me.


title: Compiling QGIS for Slackware (Slak 14)?

text: I use a Slak 14 box and tried to install QGIS on it. the compile process goes on for 30 minutes or so (dual Xeon 3.2 ghz) and then I get the errors below. Says the compiler doesn't work. Have had no other problem with this compiler. Anybody able to point me in a direction? I'm kinda not sure which way to pursue this.The one thing strikes me is that it cmake isn't acting well. * * * ...many minutes of output. > qgis-2.4.0/tests/testdata/zonalstatistics/polys.cpg > qgis-2.4.0/tests/testdata/zonalstatistics/polys.dbf > qgis-2.4.0/tests/testdata/zonalstatistics/polys.prj > qgis-2.4.0/tests/testdata/zonalstatistics/polys.qpj > qgis-2.4.0/tests/testdata/zonalstatistics/polys.shp > qgis-2.4.0/tests/testdata/zonalstatistics/polys.shx qgis-2.4.0/tools/ > qgis-2.4.0/tools/qgis-qt3to4.pl qgis-2.4.0/tools/qgis_config/ > qgis-2.4.0/tools/qgis_config/qgis_config.cpp qgis-2.4.0/tools/qgisdetect.m4 > \-- The C compiler identification is unknown \-- The CXX compiler > identification is unknown \-- Check for working C compiler: /usr/bin/cc \-- > Check for working C compiler: /usr/bin/cc -- broken CMake Error at > /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C > compiler "/usr/bin/cc" is not able to compile a simple test program. It fails with the following output: > Change Dir: /tmp/jah/qgis-2.4.0/build/CMakeFiles/CMakeTmp > > Run Build Command:/usr/bin/gmake "cmTryCompileExec2321741014/fast" > > /usr/bin/gmake -f CMakeFiles/cmTryCompileExec2321741014.dir/build.make > CMakeFiles/cmTryCompileExec2321741014.dir/build > > gmake[1]: Entering directory `/tmp/jah/qgis-2.4.0/build/CMakeFiles/CMakeTmp' > > /usr/bin/cmake -E cmake_progress_report > /tmp/jah/qgis-2.4.0/build/CMakeFiles/CMakeTmp/CMakeFiles 1 > > Building C object > CMakeFiles/cmTryCompileExec2321741014.dir/testCCompiler.c.o > > /usr/bin/cc -O2 -march=i486 -mtune=i686 -o > CMakeFiles/cmTryCompileExec2321741014.dir/testCCompiler.c.o -c > /tmp/jah/qgis-2.4.0/build/CMakeFiles/CMakeTmp/testCCompiler.c > > /tmp/jah/qgis-2.4.0/build/CMakeFiles/CMakeTmp/testCCompiler.c:1:0: error: > CPU you selected does not support x86-64 instruction set > > #ifdef __cplusplus ^ > > gmake[1]: Leaving directory `/tmp/jah/qgis-2.4.0/build/CMakeFiles/CMakeTmp' > > gmake[1]: _*_ [CMakeFiles/cmTryCompileExec2321741014.dir/testCCompiler.c.o] > Error 1 > > gmake: _*_ [cmTryCompileExec2321741014/fast] Error 2 > > CMake will not be able to correctly generate this project. Call Stack (most > recent call first): CMakeLists.txt:7 (PROJECT) > > \-- Configuring incomplete, errors occurred! See also > "/tmp/jah/qgis-2.4.0/build/CMakeFiles/CMakeOutput.log". See also > "/tmp/jah/qgis-2.4.0/build/CMakeFiles/CMakeError.log". Cannot install > /tmp/qgis-2.4.0-i486-1-jah.txz: file not found > > Installation complete > > bash-4.2#


title: Why GRASS 7.0.0 can't create a table while importing shapefiles from QGIS?

text: I use GRASS7.0.0Beta1 and QGIS 2.4.0 on Windows8. With v.in.ogr, when I import a shapefile, I get the error message "Unable to create table". When I put the option of not importing the table, the vector file is imported. It used to work with GRASS6...


title: Converting Shapefile data to GeoJSON

text: I have access to some open data for which I want to obtain some coordinates to put onto a map. Unfortunately, the data is in the Shapefile format which is rather difficult to work with. I am trying to convert it to something easier, preferably geoJSON or some kind of XML-based document. A requirement is to do this within the client's application in the event that the data changes, so unfortunately I am unable to use some online tool nor can I just open the data in QGIS and export the data in another format. I attempted to write my own Shapefile parser however I ran into difficulty with `IndexOutOfBoundsException` while reading some of the records despite having shapes of type 1 (Point). Furthermore, there is a projection file that I have to deal with and I haven't been able to find much on how to map the coordinates according to a PRJ. **Is there any open-source library I can include in my application that can take a Shapefile collection (SHP, SHX, DBF, PRJ, SHP.XML) and convert it to geoJSON?** I'm particularly looking into Java for Android/BlackBerry development, possibly Windows Phone in the far future.


title: arcsde topology register issue

text: I am in trouble with the topology in a sde database. I create a topology in a dataset from arccatalog, after managing to register it as aversion, I try to validate it from arccatalog, it tells me "The topology cannot be validated because it is registered as versioned.". If I don't register it as versioned I cannot start editing in arcmap. What should I do with the topology so that I can validate it and also start editing session. I am using Arcmap 10.2 and sql server 2008 r2.


title: PostGIS - Calculate progressive distance between points on a GPX path

text: I am attempting to build an elevation profile using PostGIS-PostgreSQL only. I have imported GPX data in my PostGis database, so now I have a table full of the GPS coordinates of the track and the timestamp of every single GPS point of the track. Now I would like to build a second table that contains, in a single row:   1. the track id   2. an array of floats representing the incremental distance from the starting point   3. an array of floats representing the incremental time from the starting point Is it possible to do it in a single SQL stored procedure? Thanks, Andrea


title: Arcmap Select by Attribute with Python

text: I would like the following to select (highlight) the "project" layer that intersects the grid, and then pull a record from the selected "Grid". I do not need to save the layer. Note: Running the script from within ArcMap in the Python Console window.               import arcpy          # Make a layer from the feature class     arcpy.MakeFeatureLayer_management("project","project_lyr")          # Then add a selection to the layer based on location to features in another feature class      arcpy.SelectLayerByLocation_management("project_lyr","INTERSECT","Grid")      This code runs and no errors are given, yet it does not select(highlight) any features. Any Idea why? Also runs really slow. ![Results](http://i.stack.imgur.com/qoCMx.jpg) Basically I'm trying to do this: ![enter image description here](http://i.stack.imgur.com/Cf1KV.jpg) This runs really fast almost instant, but I want to do the same using python. I just need a value from the selected feature's table, I don't need a copy of the layer. Part of the solution may be to use the in-memory workspace which is > Writing data to the in-memory workspace is often significantly faster than > writing to other formats... Just not sure how to implement in-memory workspace


title: How to rotate polygon to find best fit in Mapnik?

text: I have a quite simple problem but somehow I just fail to solve it. There is a polygon and a range xsize and ysize. The x and y size determines the mapnik generated image. The polygon should now be made to fit best, by deciding if:   * it is good already or    * a x and y swap and later rotation by 90 degress would make it fit best. Boundary box and Envelope is given, so no problems there. The problem is realy just the **rotation criterion** which I'm lost in. I hope you understand the simple problem and can show me an idea how to solve it. Thanks!


title: Possible error when adding objects date atributte in ArcGIS rest

text: I have published in ArcGIS server 10.04 (on win 2008 r2 64 bit + sde + oracle) table ACCESS_LOG on FeatureServer with esriFieldTypeDate field. Then i try to add record with **/addFeatures** :               [       {         "attributes" : {           "WHO" : "127.0.0.1",           "WHEN" : 1320859183000,           "WHAT" : "topoMap"         }       }     ]      and it work as expected - the record is in rest. But when I change date attribute from "WHEN" to "when" (set it lower case) - i get an error:               'features' param is invalid      It gets better: when I set all parameters lower case and "WHEN" upper case - the record can be added. I've tested and encountered this behavior in ArcGIS server 10.2, 10.4 on oracle, postgres, mssql. For the record i check in arcgis sample servers and couldn't reproduce the error.   1. Did you encountered similar problem?   2. Could you in your infrastructure create simple table, try to reproduce the problem and give the feedback?


title: Geo Tiffs overlap in QGIS

text: I am trying to stitch together several GEO Tiffs that come in pairs (north -south) but when i load them into QGIS they display completely overlapped. That is the north south pair match up ok (display next to one another) but when I add a second north-south pair they completely overlap the previous layers rather than being positioned next to the previous pair. I recently found a tutorial that had a command in qgis to lay them out of the canvas correctly but I cannot find it now for some reason. Has anyone else had this problem ??


title: Differentiating between children and adults depending on AGE using Cartodb Torque wizard?

text: I'm trying to differentiate between children and adults depending on AGE, The age of these individuals are contained under the Column "palestinian_civilians" .I'm using Carto Torque wizard.Below is a little code I was using.Nothing is happening, what am I doing wrong?               torqueLayer.setSQL("select *,(CASE WHEN palestinian_civilians ='0' THEN 1 ELSE 2 END) as palestinian_civilians_n from table");          Map {     -torque-frame-count:512;     -torque-animation-duration:30;     -torque-time-attribute:"palestinian_civilians";     -torque-aggregation-function: "round(avg(palestinian_civilians))";     -torque-resolution:2;     -torque-data-aggregation:linear;     }     #layer {     ...       marker-fill: #FF0000;       // avg of 0 and 36       [value > 18] { marker-fill: #0000FF; }     ...     }


title: How to perform a standard deviation stretch on a raster in QGIS

text: Is there a way to perform a (2) standard deviations stretch on a raster image in QGIS 2.2? I have found the raster styles menu, but the help says there is no help in my language (English) and whilst there is a mean +- standard deviation option, changing this (and pressing apply) seems to have no effect. Ideally I would like to set up such a stretch as standard for rasters (and i am fairly sure how to do this once I work out the setting needed) to try and replicate the standard stretch functionality found in ERDAS. Thanks for your time.


title: How to programmatically export a composition as image?

text: QGIS Print Composer has tool "Save As Image" and I found appropriate function in QGIS source code exportCompositionAsImage. Is it possible to get access to existing Print Composer from Python console and perform this operation - export composition as image with composer settings. **UPDATE #1** : Thanks to @ndawson. I'm using `printPageAsRaster` function for printing different combinations of layers created with layerCombinations plugin:               from layerCombinations import classFactory     lc = classFactory(iface)     lc_manager = lc.manager     combinations = lc_manager.combinationsList     composition = iface.activeComposers()[0].composition()     composition_items = composition.items()     for cmb in combinations:       for item in composition_items:         if item.type() ==  65641: #this is the type of ComposerMap           lc_manager.applyCombinationToMap(cmb, item)       image = composition.printPageAsRaster(0)       image.save('/home/dr/' + cmb +'.png','png')


title: why must Qgis 2.0.1 Desktop access the internet when I start it?

text: and how do I stop it? I'm on dialup internet most of the time and I don't allow unnecessary internet traffic. This seems unnecessary. I can't see any good reason that Q must access the internet, but I can't find any way to turn it off in my settings. Maybe I overlooked it. It tries to run cmd.exe and if I block it from doing so Q won't start up. If I allow it, it hogs my already slow internet connection for a few minutes.


title: Using landmarks in routing directions for ArcGIS Network Analyst?

text: I was wondering if there is a way to use a set of landmarks (in a point class or something) that will be included in the directions output for a Network Analyst route. So if there is a point (or building polygon for that matter) at a corner, the text would read "Turn right at 7-11, on to **___ ____**". I found this thread: http://forums.arcgis.com/threads/35424-Displaying-point- features-as-landmarks-on-Network-Analysis-route-direction-maps , but I don't necessarily want to attribute my route paths with building information, which is what I gathered this was doing. I'm using ArcGIS 10. Any suggestions? Thanks, eric


title: need to show multiple symbols for one point

text: I am working on a state map of parks with campsites. I want to show symbols for handicap access, tent camping, backpack camping, winter camping, rv camping. I have used a symbol for handicap but it shows up multiple times at some parks. Also if there is more than one type of camping it is over shadowed by handicap. any ideas? thanks


title: Python Widget Wrapper ArcGIS Viewer for Flex

text: I'd like to create a flex wrapper for python code run locally (utilizing arcgis data and outputting data that can be displayed on the flexviewer). I'd like to use gdal or pyproj modules to process data locally with distributed scripts. How would one go about creating a wrapper-widget that extends the basewidget class in the arcgis viewer for flex that can communicate with the local install of the python interpreter? EDIT web.py rest services in terms of the workflow: user without arcgis server license (for geoprocessing tasks) wants to perform some spatial analysis on a graphic layer in the flex viewer (flash or air). python script running as a web service (web.py?) accepts vector input ("public" viewshed geoprocessing task demonstrated by esri (http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Elevation/ESRI_Elevation_World/GPServer/Viewshed) creates a graphic polygon layer as output). Using a graphic layer from the flex viewer as input to a "point in polygon" python script (http://geospatialpython.com/2011/01/point-in-polygon.html) would make the output from the viewshed (or other graphic generating tool) more useful. I hope that answers your question.


title: Help required with size of the symbol

text: I am adding a picture marker symbol to graphic layer like this in Map click event:               const mapPoint:MapPoint = map.toMapFromStage(event.stageX, event.stageY);     mapPoint.spatialReference = map.spatialReference;     geom= mapPoint;          [Embed(source='assets/images/globe.png')]     var picEmbeddedClass:Class;          var pictureMarker:PictureMarkerSymbol = new PictureMarkerSymbol(picEmbeddedClass,100,100);          var myGraphicPic:Graphic = new Graphic(geom);     myGraphicPic.symbol = pictureMarker;     graphicsLayer.add(myGraphicPic);      which works fine. When I zoom in and zoom out it maintains its `width=100 height=100` upon every change in zoom level to adjust its size. How to make it retain its size as it was while adding it to graphics layer, irrespective of zoom level. As I zoom in it may seem bigger to me and small as I zoom out. Thanks


title: Can QGIS2 / GDAL convert to .ECW without corruption?

text: I have qgis 2.0.1 and it can read *.ecw files that I download. However, when I convert say a *.jpg or *.tiff to *.ecw the output is corrupt. Has anyone seen this problem?


title: loading geojson into qgis, '...' is added to the end of each string

text: I am importing a geojson file into qgis. a snippet of the geojson looks like this:               "properties": {                     "poEs": [                         8.2248394077e-08,                         6.89538039049e-08,                         5.10152376861e-08,                         3.26261055496e-08,                         1.74133607126e-08,                         7.41128188995e-09,                         2.36120949149e-09,                         5.21109847275e-10,                         5.50005710976e-11,                         0.0,                         0.0,                         0.0,                         0.0,                         0.0,                         0.0,                         0.0,                         0.0,                         0.0,                         0.0                     ]                 },                 "type": "Feature"             },      but when loaded into QGIS the values look like:               "(19:8.2248394e-08,6.8953804e-08,5.1015238e-08,3.2626106e-08,1.7413361e-08,...)"      What am I doing wrong?


title: WMS Geoserver layer over OSM

text:
I have a Geoserver with a layer in a EPSG:32632 projection. I want to display this layer over Open Street Map tiles. When I use the following html code:               <!DOCTYPE html>                   <meta charset="utf-8">

                The OSM tiles are correctly displayed but the other layer does not appear on the map. I guess it is a projection problem, since the OSM tiles are in EPSG:900913, but isn't Geoserver supposed to feed me a reprojected map directly? With Firebug, I can see that the request has correctly been treated, but return blank 256x256 tiles. The request is also made for a SRC EPSG:900913, so the problem must be server-side. What am I missing? The layer is feeded to Geoserver via PostGIS (in the OpenGeo framework). Am I supposed to put some specific settings client-side? As a consistency check, I also used the Geoserver "preview layer" tool with OpenLayers, to see if the layer is correctly dispayed, and it is. However, if I declare a SRS 900913 in addition to the native 32632, I also get blank tiles in the tool. So I guess the answer is probably related to Geoserver and not OpenLayers. I really don't understand what I'm missing... Any help would be most welcome!


title: Importing a PostGIS and a Delimited Text layer in QGIS, not overlapping

text: I'm a beginner in QGIS, and I have a PostGIS database and a CSV file I would like to visualize. I followed the instructions in this question and the answers, but it doesn't work for me, my two layers are still not overlapping. Here is what I'm doing:   1. I create a new project, and in the project properties, in CRS, I "enable 'on the fly' CRS transofrmation" and select "Google Mercator".   2. I add a PostGIS layer. In the "Properties" ("General") of this layer, the specified layer is "EPSG:900913 - Google Mercator". In "Metadata", I have: > +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 > +k=1.0 +units=m +nadgrids=@null +wktext +no_defs   3. Finally, I add a Delimited Text layer. This one is in Swiss Coordinates, so when adding it, Google Mercator is proposed, but I change it to "CH1903+". In "Metadata", I have: > +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 > +x_0=2600000 +y_0=1200000 +ellps=bessel > +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs I'm choosing Google Mercator because when I first added the PostGIS layer, it was automatically selected. What am I doing wrong here? Here are examples of data from my sets: CSV (Swiss coordinates): > 533288 152585 > > 533230 152625 > > 533066 152647 > > 533057 152660 > > 533110 152607 > > 533143 152627 > > 533162 152571 > > 533103 152560 PostGIS (Google Mercator coordinates) (supposedly overlapping more or less): > 731632.384716794;5863923.31681192 > > 731351.09395362;5864059.81606372 > > 731351.452782778;5864091.19255148 > > 731202.814656544;5864134.45924451 > > 731322.906745951;5864210.56763595 > > 731128.278515869;5864216.17023219 > > 731337.333643971;5864149.17870271 > > 730796.011530197;5864247.06311145 > > 731613.06159501;5864003.29715222 > > 730454.864224799;5863712.64413468


title: Does Leaflet JS API provide a Geocoding service?

text: I am considering replacement of Google Maps with Open Street Maps and the Leaflet JS API. Does the Leaflet JS API provide a Geocoding service?


title: Rendering layers on-the-fly

text: I am using Geoserver and openLayers for rendering map layers. The task I have to do is as: I will have a set of zipcodes of US. I need to display a map of states for each zipcode. Suppose a user clicks on one of the states. The next is to render a layer with all the counties of that state. Further a click on county will render a map of cities of that county and so on. To create layers dynamically we have geoserver-manager library. I need to know that how do I store the data required for map rendering (i.e the longitudes/latitudes, boundries). What way will be most efficient in terms of data storage and layer rendering.


title: Why would labels not display in dynamic arcserver service?

text: I’ve got a dynamic map service running ArcGIS Server 9.3.1 that will periodically stop displaying labels for some features. When you access the service either through a web application, or ArcCatalog, the features draw, but the labels for the features do not draw. And it’s not consistently the same features. One time it could be the addresses, the next time it could be the streets. Has anyone seen this behavior before, and if so are there any recommendations on ways to fix this behavior?


title: Location storage and query algorithms. How do they work?

text: One of the most important aspects of a GIS-equipped database is that it provides the user with the capability to quickly query for all points within some arbitrary geographic area that match some additional criteria. (E.g. "Find me the nearest 3 restaurants to this point on a map.") **Question 1:** Can anyone point me to a theoretical discussion of the algorithms involved? I want to learn how they work. Ultimately, I want to apply the same capability to generalized sets of numerical data - a large cloud of points in an arbitrary, n-dimensional, non- euclidean space. For instance, a person's face can be characterized as a vector of numbers: [distance between eyes, distance from eye to mouth, width of face, length of face, etc.]. I want to film sidewalk traffic, estimate the features of each persons face, and then be able to make queries to the data later such as "given this person's face, find me the 100 most similar faces." **Question 2:** Is there currently any existing software that provides the ability to search over these generalized spaces?


title: Recently-opened documents option in QGIS

text: Is there a recent documents option somewhere in QGIS similar to other software? Or do people always use add layers / drag and drop from the Browser, or ensure that all is saved as a project each time? Looks like the Project option is basically the same as the .WOR file in MapInfo which I'm very familiar with. Very handy but can be a bit of a pain if files start moving round... I've just had QGIS hanging up on me a few times when experimenting and requiring restart of program. A recently opened option would be nice. Not a priority and I know the spinning wheel usually means lose of record of last file opened, not saved, etc.


title: Geostatistical Analyst Wizard

text: I have performed cokriging using Geostatistical Analyst in ArcGIS 10. When I tried to export the prediction to raster, the process became so slow. Have you experienced this? Is there a way to make the exporting faster? Thank you.


title: When I publish a layer(shapefile or postgis) with TileMill, 200 meters moves

text: I hope someone can help me. Not if you know the TileMill application I'm working with her to publish layers look more beautiful. Well, first I have posted directly loading the shp file., But when the charge goes I moved about 200 meters. Then as I have the option, I imported the layer from postgis and my surprise was that the movement was more than 1000 km. After choosing SRS: Custom and put the appropriate reference system, the movement returned to be 200 meters. Does anyone have any idea why this might happen? Thank you very much in advance to all.


title: Can I download the current version of QGIS if I am running Mac 10.8.2?

text: I am taking an introductory course in GIS at my university and my teacher recommended QGIS for Mac users. Unfortunately, I haven't been able to download the software. I just upgraded to Mac OS 10.8.2 recently, and I am not sure if Lisboa can work on Mountain Lion. Please let me know what I need to do in order to run QGIS on my laptop.


title: OpenLayers Plugin with on-thy-fly-transformation causes wrong coordinates

text: I am using the OpenLayers Plugin with the maps from Google Satellite. In Qgis I have chosen on-the-fly-transformation into WGS 84. But the WGS 84 coordinates in Qgis are now 0.15 degrees further E than they should be. When I am setting on-the-fly-transformation into UTM 32 N the values seems to be slightly wrong as well. When I am loading the OpenLayers Plugin into Qgis do I have to confirm somewhere what the original projection is? Or what is the problem here? Qgis 1.8.0 on Mac 10.6


title: Which version of mapbasic to use for maximum interoperability with different mapinfo versions?

text: The oldest mapbasic download offered by pbinsight these days seems to be version 9.5. I wonder can all subsequent versions of mapinfo run compiled code written with this? If so, is an older (and hence more compatible) version of mapbasic available anywhere? If not, which version is the best bet for a new application, without wanting to shut out potential users who don't have the latest version of mapinfo?


title: Requesting multiple features on different layers

text: **The case:** A lot of features need to be rendered on an openlayers map. Drawing all features on the map (WFS) causes performance issues (especially in IE). Therefore I have chosen to use WMS so that the client is spared the heavy rendering load. **The problem:** To get information about certain features I use "Openlayers.Control.GetFeature". This works, but only when you use one layer. I have multiple layers with different feature types. I still need to be able to use the box selection method. It may be that this exceeds the openlayers limits. Adding multiple select controls did not seem to have any effect.


title: Javascript library for converting MGRS to Lat/Lng

text: Is there a JS library that converts MGRS to LL? I have found one that converts Lat/Lng to MGRS, but nothing that converts MGRS to Lat/Lng. Someone asked this question in the past, but the answer was USNG to LL but I HAVE to do MGRS to LL.


title: Using Google Fusion Tables to read Wordpress database... which in turn creates map. Can it be done?

text: Is it possible for Google Fusion Tables to read my Wordpress database? If so, how? I have custom wordpress fields which contain addresses for several hundred companies. Ideally I want Google Fusion Tables to read the database. Hopefully this will overcome two major problems 1. Avoid the geocode limit (currently done using a time delay, which isn't ideal). 2. Obfuscate my data so it's protected. Really need someone's help with this.


title: MySQL Polygon (Spatial) Insert Statement works sporadically

text: I know that MySQL doesn't have great spatial support at the moment, but is it _that_ buggy that my insert statements would work sporadically? In general, longer coordinates seem to be failing on insert (there is no notice of them failing though, they just insert as NULL or show 0 rows affected on update). I believe though that I've seen large ones work and small ones fail. Here's my insert statement:               UPDATE places SET geom = PolygonFromText('POLYGON((-122.225255 37.890342,-122.22343 37.891445,-122.220923 37.89297...)),1') WHERE id=16      The only semi-logical things I can think of pertain to size/memory, or maybe invalid coordinates? Anyone have any ideas?


title: Add Print Dijit to the map context menu

text: I'd need to implement print map functionality from the map context menu (right click on the map). Here, I create a printer:                   // ------------------------------------------         //add printer         // ------------------------------------------         var printDiv = domConstruct.create('div', { id: 'printDivId' });         printer = new Print({             map: map,             url: "http://...Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"         }, printDiv);         printer.startup();      and here, i'm creating a context menu:                   //Creates right-click context menu for the map         ctxMenuForMap = new Menu({});         ctxMenuForMap.addChild(new MenuItem({             label: "Print Map",             onClick: function (evt, printDiv) {                 ctxMenuForMap.addChild(printDiv);             }         }));      The second part fails to add div to the context menu. Any suggestions how to make it work will be much appreciated.


title: About event to Latitude and Longitude in C#

text: I am beginning to study Ready GXP and I would like to know which event receives Latitude and Longitude and passes them to the browser for execution in C#. Could you help me ? Thanks


title: How to Add (+) up integers in a field and print a total count in pyhton 2.7

text: I'm a complete beginner to python. I have what I hope to be a simple question. I want to run a bit of script in IDLE so that it adds up all figures in a table under attribute name "Tot_Aff". When I run the below it just gives me each Value. Any help would be great               fc = final_SOA     field = "Tot_Aff"     cursor = arcpy.SearchCursor(fc)     for row in cursor:         print row.getValue(field)      I want to add up all the integers


title: search request round a certain point

text: round towns like paris or hamburg update - will solve it wiht some extra parts - like Data extracting in a bounding box or polygon – **see here the original thread:** can i perform a request to get all results round a town ... i e like so:               /tmp$ osmconvert oberbayern-latest.osm.pbf --all-to-nodes -o=blablubbla_2.o5m     /tmp$ osmfilter blablubbla_2.o5m --keep="amenity=restaurant" -o=my_gooddata_.o5m     /tmp$ osmconvert my_gooddata_.o5m --csv="@id @lon @lat shop name addr:street addr:housenumber addr:city website email" --csv-headline | more     @id     @lon    @lat    shop    name    addr:street     addr:housenumber        addr:city       website email     29950894        11.7415509      48.3978074              Parkcafe        Am Wörth        23      Freising        http://www.parkcafe-freising.de     32559987        11.7841034      47.8785126              Waldrestaurant Maxlmühle        Maxlmühle       2       Valley  http://www.maxlmuehle.de/     33047448        11.1863664      47.9072486              Hirschberg-Alm     34034075        11.6704030      48.1169551              Zum Goldenen Stern      Gartenstadtstraße       6       München     34072038        11.6707224      48.1093154              Franziskaner Garten     Friedenspromenade       45      München http://www.franziskanergarten.de/


title: Why do I need to know what "endianness" is?

text: I'm just learning about GIS and shapefiles. I am a total newb right now. I'm probably going to get into some SQL Spatial stuff and I'm just reading about what shapefiles are. I keep on seeing a lot about endianness. I realize it has something to do with byte order. My question is why do I need to know this information? I'm looking for some context.


title: Problem – QGIS 2.2 - Values under Color Rendering saved in style not applied when applying the loaded style?

text: I have saved two variants of the same color-scheme by putting in different values under “color rendering” in the lower part of the screen. It’s a singleband pseudocolor scheme. Now when I load each of the styles as qml-File while in the Properties-Menu of my DEM it instantly shows me the desired colors in the canvas. I can also see the slight difference between the two variants in the canvas resulting from the different “brightness” values in my two styles. In this "Preview Mode" everything is great. But the Moment I click on "Apply" or "OK" when I want to finally apply one of the two versions it switches back to a state as if no changes under color rendering have been made. So is this a bug? When first loading the style it shows the correct adjustments (so it must be stored somewhere inside the qml file) but when clicking "Apply" all Information under color rendering is ignored? Or am I doing sth wrong? When I open the properties windows again on the quite dully colored DEM after trying to apply my style and then manually reenter my desired value under "color rendering" and click "Apply" it thens also applies the desired tweaks. Edit: With a Singleband Grey Style it works. I have two variants with different values under "color rendering" and when loading and applying everything looks correctly.


title: QGIS integrated browser panel does not show qgs files

text: I have a problem with my QGIS: it does not start if I double click on a qgs file. I wanted to contour this problem using the browser panel integrated to QGIS, but I can not see the qgs files from it. If i use the stand alone browser, I can see the qgs file but I am not capable of open them by clicking on them. Any ideas. Thank you


title: What's regular blocking arrangement ? (GDAL)

text: I am using GDAL tools to retrieve PostGiS raster. The code(command line) I am using is as follows :               gdal_translate -of AAIGrid "PG:host=localhost dbname='database' user='postgres' password='admin' schema='public' table='rastertable' where='rid=2'" postgis.asc      And it shows error: rastertable doesn't seem to have regular blocking arrangement. Only tables with regular blocking arrangement can be read from now. I never heard the blocking arrangement before and I am sure the table in my postgis is a raster table. Any ideas? Thanks.


title: Apply Symbology to a group layer

text: I currently have around 200 features that all need have the same symbology applied to them. I have used the ApplySymbologyfromlayer_management however this takes much to long to process, at least a few hours and the labels arent brought across either. > > > import arcpy >>> >>> mxd = arcpy.mapping.MapDocument("CURRENT") >>> >>> inputlayers = ['ST13003-00108100-009','ST13003-00116584-073','ST13003-00115372-080','ST13003-00112948-011','ST13003-00111736-021','ST13003-00122544-083','ST13003-00099716-018'] symbologylayer = 'Layer' >>> >>> for layer in inputlayers: ... arcpy.ApplySymbologyFromLayer_management(layer, symbologylayer) This works however justs takes way to long. What I want to do export all lines from ArcMap as a layer or layer package and apply the symbology across all of the features without doing this manually. When I try this however this error occurs. Runtime error Trace back (most recent call last): File "", line 1, in File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 5696, in ApplySymbologyFromLayer raise e ExecuteError: ERROR 000967: The input layer type must be a feature layer, raster layer, or tin layer. I looked at creating Representations, is that the solution or is there another way around this? Any help appreciated.


title: Arcgis javascript API & highcharts libraries

text: I'm working with jsviewer and JSAPI V:2.8.I try to display a query result in a chart. what I want to do is :first, I want to query on my table and once I got the result liste I have a button that displays the results in a chart.I want to use highcharts librairies. If there is a code sample or any indication that could help me do that , I will be grateful.


title: Rounding bug using ST_GeomFromGeojson()

text: Let's say I have the following geographical point represented in GeoJSON: `{"type":"Point","coordinates":[-109.0,35.292506]}` When I run the following conversion, things work as expected:               SELECT ST_AsText(ST_GeomFromGeojson('{"type":"Point","coordinates":[-109.0,35.292506]}'));        st_astext     -----------------------      POINT(-109 35.292506)     (1 row)      The problem occurs if the string passed to `ST_GeomFromGeojson()` omits the trailing decimal on `-109.0`:               SELECT ST_AsText(ST_GeomFromGeojson('{"type":"Point","coordinates":[-109,35.292506]}'));        st_astext     ----------------      POINT(-109 35)     (1 row)      Notice how in this case rounding to an Integer value occurs on both latitude and longitude. The loss of precision on the latitude value in this case is very significant (32.53 km). _Note:_ I left out the CRS field for clarify, the problem occurs either way. The same problem does not occur using the `ST_GeomFromText()` function. Both numbers are _not_ rounded to Integers if the first looks like an integer. My question is this: Am I missing something regarding the GeoJSON conversion function, or is this really unexpected behaviour? If it is a bug, where should I report it? Thanks!


title: Flow direction for line segments

text: My sanitary sewer data (shapefiles) is being merged with data from another GIS firm for a large project and they are asking me to flip all my line segments because they believe they are backwards but I believe they are backwards. Shouldn't the upstream point be the start point and the downstream point be the end point? How do you create pipes, upstream to downstream or downstream to upstream?


title: Postgis walk through multilinestring

text: Maybe question title not correct, i have no idea how to formulate my question. Database is `postgres 9.2`, POSTGIS="2.0.2 r10789" GEOS="3.3.6-CAPI-1.7.6" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.8" I have `roads` map from `OpenStreetMap` database. Geometry type is `MultiLineString`. For example, road from city `A` to city `B` consists of 27 entries in database (200 km total distance). One entry can be 500 meters another can be 70 kilometers. I want to analyse this road in fallowing scenario:   1. From city `A` take `40 km` in direction to city `B`.   2. Then analyse that path and in case if i need, go, for example, `5 km` back or forward.    3. Take another `40 km`, analyse until i reach city `B`.  How i can go `N km` from point `A` to direction `B` via that road? It is possible with SQL / postgis? What i need is, plan where to place `green fuel station`. Electrical vehicle can drive average 50 km with full battery. So i need to analyze every `N km` if there is possible to build fuel station.   I already have data about rivers, electricity grid and another restrictions. Thanks.


title: QGIS 1.8 on Ubuntu 12.04 doesn't transform CRS properly

text: I have a weird QGIS-Problem that only occurs in Ubuntu 12.04, but not in Windows 7. I've also tried this on different Ubuntu-Computers. When I try to transform a layer with WGS84 to a different projection type (example Austrian Gauss Kruger) the result is shifted exactly 300m to the East to where it should be. This happens with both "on the fly transformation" and when I save the Layer in a different CRS! When I save a WGS84-Layer in Gauss Kruger and I open both the new and the old layer in Ubuntu, they overlap perfectly (with on the fly-enabled). When I switch to Win7 and open both layers (the original and the one I created in Ubuntu) I can even see the 300m gap! And ideas? Could this be a bug? Thanks! (I am using the same EPSGs in Windows and in Ubuntu - I can also see/not see the problem, when I open the same project in Ubuntu/Windows.)


title: Open source web map client with time sliders using WMS source

text: I have a web map service (WMS on geoserver). It has a current visualization which is decent. The data is divided into months currently using tabs. I would like to visualize the data using an open source based web map client with a time slider. The user should be able to set a starting point and end point in effect giving the user an interval for the month filter. I have seen some examples around, but I am looking for a generic solution where I basically can change background layers (also WMS), source wms and relevant attributes. This to be able to experiment further with the solution. I am at full liberty to update attribute values returned from the back office MSSQL database. ESRI or other commercial (closed source) solutions are not possible options.


title: leaflet and image popup from qgis export

text:
I am a novice in using leaflet, I exported my map layers from qgis to a working leaflet map. i am trying to modify the popup to use the attribute so as to get an image popup. i am however stuck as i have read documentation but still unsure. any leads will help. currently my popup does a get feature info to show the following.               function pop_dwelling(feature, layer) {                                             var popupContent = '

house_numb	' + Autolinker.link(String(feature.properties.house_numb)) + '

photo	' + Autolinker.link(String(feature.properties.photo)) + '

<th

';                         layer.bindPopup(popupContent);                               }      where the photo is a column in the vector that has the path to the image


title: How to connect waypoint pairs and calculate length?

text: I want to make a path out of points and calculate the distances of each single line. I have a point layer with waypoints of a research vessel. The way points have in the attribute table a date and a time and are labeled either as on effort or as off effort. Now I want to make a line layer with a path from point to point according to the recorded time. This line layer should have the information about the associated waypoints in the attribute table. I that line layer I want to calculate the distances from one waypoint to the next in the attribute table. I have tried the extensions "points to path" and "points2one", but in both cases I only got one polyline. That is not suitable for me, because for further calculations I have to neglect the distances between off effort waypoints. In ArcView it works with the extension "Path with distances and bearings". Is there a way I can solve this in QGIS? This is how the point layer attribute table looks like: ![original attribute table](http://i.stack.imgur.com/q1sEt.png) This is how the attribute layer of the line layer should look like: ![resulting attribute table](http://i.stack.imgur.com/WERpQ.png) I am using QGIS 1.8.0 on a Mac OSX 10.6.8


title: Creating a Slope Map Using Contours

text: I am trying to create a slope map. I have many contour elevation files. I tried to use the slope tool in Arctoolbox, but it calls for raster files and I'm working with vector data. Any help with this will be greatly appreciated!


title: How can I link java with QGIS?

text: I want to create a Desktop project on Java which shows radiation dispersion. How can i Link java with QGIS? Is there any tutorial site i can get reference from?


title: geometry error in roadnetwork

text: I have a road network table.when I check st_isValid(the_geom)='f' I am getting an error > NOTICE: IllegalArgumentException: point array must contain 0 or >1 elements > > ERROR: Exception in LWGEOM2GEOS when I open this table in QGIS I can view and edit the data.But its attribute table is blank. But in postgis the table has data.What will be the problem?Please help me to resolve this


title: CreateObject cannot open map document error when cycling through list of MXDs

text: I have a stand alone Python script that aims to make a list of data sources from a series of folders/sub-folders full of MXDs. However I am continually getting the: **CreateObject cannot open map document error** Pseudo code summary of steps leading up to the error:               # create global dictionary as mxd_dict     # os.walk to get a list of absolute MXD file paths as mxd_list     # for each mxd in mxd_list pass mxd to a helper method, cycle_mxd(mxd)     # cycle_mxd() makes a map document object, and creates a new list (as data_sources) of      #   data sources, then appends to mxd_dict: mxd_dict[mxd] = data_sources      So after that the idea would be that I have a dictionary full of MXD file paths as keys with list objects containing strings of data sources as the values. The script would then go on to do x, y, z using the dictionary... Currently the code in cycle_mxd() gets through about 40 or so iterations and then gives me the cannot open map document error. There are no permission issues or scheme locks. My initial theory was maybe a memory issue as sometimes I don't even get the error message I just get a popup window saying python.exe has failed. The issue always happens around the same spot though. I know global variables are frowned upon and can cause memory issues so I have altered the code to dump the dictionary on each iteration yet I still get the same problem. Sorry this is sort of vague, just wanted to see if anyone had any ideas. The only things Google picks up for the error message relates to using:               arcpy.mapping.MapDocument("CURRENT")      But I am using the absolute path rather than the CURRENT keyword so it isn't much help. I have added a slimmed down version of the code if it helps. Thank you.               mxd_dict = {}     start_folder = r"Path\to\MXD\folder"              def main():         mxd_list = walk_dir(start_folder)              for mxd in mxd_list:             cycle_mxd(mxd)          def walk_dir(start_folder):         """         Walk the start_folder and return a list of all MXDs.           """         print_header("Walking the start-up directory...")              mxd_list = []         for root, dirs, files in os.walk(start_folder):                 for file_name in files:                     file_path = os.path.join(root, file_name)                     if os.path.splitext(file_path)[1] == ".mxd":                         print "Found MXD: {0}".format(file_path)                         mxd_list.append(file_path)              return mxd_list               def cycle_mxd(mxd):         """         Cycle through an MXDs data frames and layers and return a dictionary         key (MXD path) and a value (list of unique layer sources)         """         print_header("Cycling through MXDs...")              data_source_list = []         mxd_obj = arcpy.mapping.MapDocument(mxd)              print "Scrapping datasources from layers in {0}".format(mxd)         for df in arcpy.mapping.ListDataFrames(mxd_obj):             print "Found dataframe: {0}".format(df)             for lyr in arcpy.mapping.ListLayers(mxd_obj, data_frame=df):                 print "Found layer: {0}".format(lyr)                 if lyr.visible == True:                     if lyr.supports("DATASOURCE"):                         data_source_list.append(lyr.dataSource)              my_set = set(data_source_list)         data_source_list = list(my_set)              mxd_dict[mxd] = data_source_list              del mxd_obj


title: Error in Creating Line from Points

text: I am trying to create coastline of an area by joining about 20,000 points using Data Management Tool "Points to Line" in ArcGIS 10.1. But it seems that the inbuilt algorithm is not recognizing the order in which points have to be connected which results in creating some crazy disordered line. Is there a way to get it right? I have added the screenshots. ![enter image description here](http://i.stack.imgur.com/1eFcE.png)


title: Export From PGDB to ArcSde Using C#

text: I need help exporting a personal geodatabase Feature Class to an ArcSDE geodatabase using C# ArcObjects with ArcGIS 9.3. I just want to replicate the tool Feature Class to Feature Class (Conversion) found under the To Geodatabase toolset in the Conversion toolbox. I was able to do this conversion from a personal geodatabase to a personal geodatabase. In the case of export to an ArcSDE geodatabase, the operation fails. Perhaps the problem is that I am unable to set the output path because in the _Open File_ dialog I am not getting .sde files. Any help please?


title: How do I show my WMS layer using QGIS server and OpenLayers?

text: I've installed qgis server and it works fine. I've put qgs file in the server folder dir and using "Add WMS layer" from QGIS I manage to view the qgs file. This is how I use get capabilities for example : http://www.localhost.com/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=D:/OSGeo4W/apps/qgis/bin/MyLondon.qgs Now my problem is that in all Openlayers WMS examples , adding wms layer looks like this :                layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",              "http://vmap0.tiles.osgeo.org/wms/vmap0",               {layers: 'basic'}                );      How do I convert my WMS to this format ? Where in the url I set the project name and where the layer name ? Thx.


title: Cartographic Representations Load Rather Than Feature Symbology

text: We use ArcSDE to allow multiple users (both in my office and elsewhere) to access feature classes that my office maintains. We also use cartographic representations for many of our feature classes. For some reason, those feature classes which have cartographic representations will always load the representation as the default symbolization when they're imported into ArcMap (rather than feature symbology). This is a problem for GIS users outside our office. When they bring in our feature classes without using a layer file, they see our representations, which are not an accurate representation of the spatial location of the data, rather than the feature symbology. This can throw them off. Is there any way to make the features load with default symbology rather than with their representations?


title: How to get a list of distinct values from a shapefile field using QGIS?

text: I have a shapefile whose features I can filter by specifying a where clause in the query dialogue. F.x. I have a field named 'city_name' and by stating 'city_name = "London"' in the where clause only London is displayed. What I would like to do now is to fetch all values in 'city_name' from the attribute table. Something like that:               select distinct city_name from [attribute table]      I found several tools in QGIS apparently dealing with SQL and I also had a quick look at the different Plugins. But I fail at connecting to a database or the table name ... what database or which table in that case? In the end I want to export the result list and use it for further processing. (Am using QuantumGIS 1.8)


title: Union, Dissolve, Buffer -- multiple layers, all in one step?

text: I'm a new user of Quantum GIS (1.7.3) and I need to repeat a task multiple times, so I'm wondering if there is a quicker way to do the following (with three or more polygon layers - each layer has a single polygon):   1. Union   2. Dissolve   3. Buffer The effect will be to have three separate single-polygons shapefiles merged into one (larger) single polygon shapefile, with a buffer around it. Answers in PostGIS would be useful too as my data is stored there. Thanks! **Edit: Adding PostGIS information** The multiple polygons I want to Union-Dissolve-Buffer are the result of a catchment basin point table that I've created in PostGIS, converted (in R) to an alpha-hull (i.e. concave hull) polygon shapefile using the CRAN alphahull package. To create the original catchment table in PostGIS, for example, I do this:               CREATE TABLE catchment_10304 as     select          id,         geom_4269,         (select sum(cost) from (            SELECT * FROM shortest_path('            SELECT gid AS id,               start_id::int4 AS source,               end_id::int4 AS target,               newcost::float8 AS cost            FROM network',            10304,            id,            false,            false)) as foo ) as cost     from node;          CREATE TABLE catchment1_10304 AS      SELECT * FROM catchment_10304 WHERE cost < 1364;      Then I do it for three different nodes (representing the boundaries of a region). To create the total catchment area for the region, I want to Union- dissolve-buffer with the three or more individual catchment area tables.


title: Ensure BaseDynamicLayer is always the most visible layer

text: If I add a shape file to my map and then a dynamic custom layer inherited from a BaseDynamicLayer, then the shape file is lower on the viewing stack then my custom layer, and it displays correctly.               mapControl.AddShapeFile(directoryPath, shapeFile);     mapControl.AddLayer(dynamicCustomLayer); //this is ok      But if I add my dynamicCustomLayer first, and then add a Shape file, the shape file is makes the dynamic layer non viewable because it is higher on the viewing stack...               mapControl.AddLayer(dynamicCustomLayer);      mapControl.AddShapeFile(directoryPath, shapeFile);//now my dynamic layer is invisible      How can I ensure that the dynamic custom layer is always on top of the viewing stack even if my user adds a shape file after the custom layer was enabled... Thanks in advance :) I'm using C# arcengine 10


title: What is the best source to download 10m (1/3 arc-second) DEMs?

text: I'm looking for some of the 10m DEM to fill in the white Quad areas. Do you know where of can I find them? These 10 DEMs we have are actually coming from the NRCS Geospatial Dataway. I believe they were not available yet. Are there some web sites that allow me to download some of the DEM ?![Here is the screenshot](http://i.stack.imgur.com/G5lg0.png) What I want is to find them in 10m. I have check out the USGS National Viewer Map and they have 1,2,3 arc seconds. **Place** = Mount Baldy (aka Baldy Mountain), which is located on Cimarron Range of the Sangre de Cristo mountains of southern U.S.'s New Mexico state. Thank you, Robert


title: Importing labels for check in/out from an SDE to file geodatabase

text: I am working on a large project where I am using the ArcMap 10 'distributed geodatabase' feature to check out a file geodatabase from our SDE file. I have tried several ways to avoid having to manually re-label the point features once I have checked out, but come up short every time. I have saved the symobology to a layer file and can import that easily once checked out, but as far as the labels go, I cannot seem to easily import those. Is there any way to save the labeling with the layer, or is manually labeling the points through the properties menu the only way? _Any_ suggestions are greatly appreciated and I will be happy to clarify if needed.


title: How to convert Shapefiles to 3D DXF?

text: I'm using QGIS version 1.8.0-Lisboa and I'm trying to convert a vector line file and it's not working. I right click on the layer>Save as>Autocad file>DXF. After that I try to open the output file in Microstation (Benteley Software) and the file does not open at all. Can you please help me? Thank you Jorge **EDIT:**   Thank you for your help! I already succeeded in converting to DXF, now I have another problem, i need a 3D file but the one i converted is just 2D, no height info Can you help me get 3d dxf output?


title: What are the main steps when building a balloon callout using ArcObjects in arcengine 10 in VS2010 with C#

text: I'm looking for a good BalloonCallout example / tutorial / sample. edit: Using C# with ArcEngine 10 edit #2: What are the main steps when building a balloon callout using ArcObjects in arcengine 10? Here's what I've tried so far: This happens in a dynamic data layer               DynamicGlyphFactory dynamicGlyphFactory = (DynamicGlyphFactory)dynamicDisplay;     IDynamicSymbolProperties2 dynamicSymbolProps = dynamicDisplay as IDynamicSymbolProperties2;          IFillSymbol fillSymbol = new SimpleFillSymbolClass();     TextSymbolClass textSymbol = new TextSymbolClass();     IBalloonCallout balloonCallout = new BalloonCalloutClass();          simpleFillSymbol.Color = rgbColor;          dynamicSymbolProps.set_DynamicGlyph(esriDynamicSymbolType.esriDSymbolFill, fillSymbol as IDynamicGlyph);     dynamicSymbolProps.SetColor(esriDynamicSymbolType.esriDSymbolFill, 20f, 20f, 20f, 255);          IDynamicGlyph fillGlyph = dynamicGlyphFactory.CreateDynamicGlyph((ISymbol)fillSymbol);          balloonCallout.AnchorPoint = anchorPoint;     balloonCallout.Style = esriBalloonCalloutStyle.esriBCSOval;     balloonCallout.Symbol = fillSymbol;     balloonCallout.LeaderTolerance = 10;          textSymbol.Background = (ITextBackground)balloonCallout;     dynamicSymbolProps.TextBoxUseDynamicFillSymbol = true;      IDynamicGlyph glyph = dynamicGlyphFactory.CreateDynamicGlyph((ISymbol)textSymbol);     dynamicSymbolProps.set_DynamicGlyph(esriDynamicSymbolType.esriDSymbolText, glyph);          iDynamicDisplay.DrawText(point, someString);


title: Geodatabase to PostGIS character encoding

text: Similar to another question I posted previously, I'm trying to import datasets from Esri geodatabases into a PostGIS database directly, and inside the data there are greek letters and symbols that are not converting correctly. I tried using FWTools on Windows with a command like this:               ogr2ogr -f "PostgreSQL" PG:"host=server.domain.com user=gisuser dbname=gis"     dataset.mdb LayerName -a_srs EPSG:4326      The first time I tried, I got this error from ogr2ogr: ERROR 1: INSERT command for new feature failed.   ERROR: invalid byte sequence for encoding "UTF8": 0xb4   HINT: This error can also happen if the byte sequence does not match the   encoding expected by the server, which is controlled by "client_encoding". I found out that setting a particular environment variable at the Windows command line can fix this issue:               SET PGCLIENTENCODING=LATIN1      That fixed importing problem -- all the records and geometry are in PostGIS, but as a result, the non-english characters are not encoded correctly. When I use `UTF-8` or `UTF8` for client encoding (not sure which is correct), I get the same invalid byte sequence error as above. Has anyone else had this problem or found a way around it? Is this an issue with the .mdb file itself, or is there something on the server I can change to globally correct this?


title: Why are my additional Add-In folders disappearing?

text: I thought it just something I was doing. Then someone emailed me about about the same issue. Then I checked a user that I set up on ArcGIS 10 and his had been wiped. It doesn't happen right away--days go by before the AddInFolder XML tags in the AddInFolders.xml are removed for no apparent reason. Is this a regular occurrence? A documented bug? User error? I've checked set Read-only attribute on the file, so hopefully that makes it stick. But users can't add Add-In folders ( _not necessarily a bad thing for me_ ).


title: Megellan Meridian and QGIS GPS Tools help request

text: I am using QGIS 2.0.1 on Ubuntu 12.04. I have a Magellan Meridian GPS and I trying to use the GPS Tools plugin to download waypoints to a layer in QGIS. I have successfully used the Gebabbel interface with GPSBabel to extract waypoints from the GPS to a .gpx file. The only way I have successfully used the GPS Tools to download waypoints and add to a layer is by using the following command in the GPS device editor. This is the same command that Gebabbel issues. gpsbabel -w -i magellan,baud=9600 -o gpx -f /dev/ttyS0 -F /home/robert/GPSpoints/waypoints.gpx I also use “waypoints” for the Layer name and Output file text boxes on the main GPS Tools dialog window. This method seems to only work once. If I remove the layer from QGIS, delete the .gpx file, and repeat the download request in the GPS Tools, I get an error message or QGIS becomes unresponsive, I know the Meridian is an old unit, but is anyone successfully using it with QGIS GPS Tools. Your help will be appreciated.


title: Can ArcEngine resolve unstructured address data?

text: In the following tutorial link, the code geocodes a structured address. In the example address fields are coded so that the program knows in advance 1) state = "CA" 2) city = "Redfield"... http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_geocode_a_single_address/00010000038r000000/ Is there a way to resolve unstructured address data in ArcEngine? An example of unstructured address data would be a single string like this: "222 Ashland St N Cambridge MN 55008" Where the user has not parsed the string down into its elements of street, city, state, zip