title: Arcpy Closest Facility script not running correctly

text: I am running a script in ArcGIS 10.2 to automate the Make Closest Facility tool, as below, to identify the nearest chemist. This works fine. However, I then want to run it for another facility (a doctor), using the same incident. That is the second script. But this time, it keeps the same facilities from the first (chemist) solve. Whatever I try and delete, this always happens. You can see the deletes I make after the chemist script If I comment out the chemist script and just run the doctor solve, I get the correct result. Have I missed a delete somewhere? I can't seem to clear the memory properly.               arcpy.FeatureToPoint_management("Siteslyr", "Sitepoint")     inNetworkDataset = "C:\Users\Ant\Documents\ArcGIS\OSMaster.gdb\ITN_Network\ITN_NetworkDataset"     impedanceAttribute = "Drive"     searchTolerance = "5000 Meters"     accumulateAttributeName = ["Length", "Drive"]     inFacilities = "TL_chemistsv3"     inIncidents = "Sitepoint"     outLayerFile = "C:\Users\Ant\Documents\ArcGIS\ITN.gdb\ProxChemistsSites.lyr"     outNALayer = arcpy.na.MakeClosestFacilityLayer(inNetworkDataset, "ProxChemistsSites", impedanceAttribute, "TRAVEL_TO", "", 1, accumulateAttributeName, "NO_UTURNS", "", "", "", "TRUE_LINES_WITHOUT_MEASURES")     arcpy.na.AddLocations(outNALayer, "Facilities", inFacilities, "", searchTolerance)     arcpy.na.AddLocations(outNALayer, "Incidents", inIncidents, "", searchTolerance)     arcpy.na.Solve(outNALayer)     outNALayer = outNALayer.getOutput(0)     subLayerNames = arcpy.na.GetNAClassNames(outNALayer)     tableName = subLayerNames["CFRoutes"]     if arcpy.Exists("ProxChemist"):         arcpy.Delete_management("ProxChemist")     outTable = "ProxChemist"     arcpy.CopyFeatures_management(tableName, outTable)          del inNetworkDataset, impedanceAttribute, searchTolerance, accumulateAttributeName, outLayerFile,     outNALayer, inFacilities, inIncidents, subLayerNames, outTable, tableName          if arcpy.Exists("ProxChemist"):         arcpy.Delete_management("ProxChemist")          arcpy.Delete_management("in_memory")          arcpy.RefreshActiveView()     arcpy.RefreshTOC()          arcpy.AddMessage('Getting Doctor Map')     inNetworkDataset = "C:\Users\Ant\Documents\ArcGIS\OSMaster.gdb\ITN_Network\ITN_NetworkDataset"     impedanceAttribute = "Drive"     searchTolerance = "5000 Meters"     accumulateAttributeName = ["Length", "Drive"]     inFacs = "TL_doctorsv2"     inIncidents = "Sitepoint"     outLayerFile = "C:\Users\Ant\Documents\ArcGIS\ITN.gdb\ProxDocSites.lyr"     outNALayer = arcpy.na.MakeClosestFacilityLayer(inNetworkDataset, "ProxDocSites", impedanceAttribute, "TRAVEL_TO", "", 1, accumulateAttributeName, "NO_UTURNS", "", "", "", "TRUE_LINES_WITHOUT_MEASURES")     arcpy.na.AddLocations(outNALayer, "Facilities", inFacs, "", searchTolerance)     arcpy.na.AddLocations(outNALayer, "Incidents", inIncidents, "", searchTolerance)     arcpy.na.Solve(outNALayer)     outNALayer = outNALayer.getOutput(0)     subLayerNames = arcpy.na.GetNAClassNames(outNALayer)     tableName = subLayerNames["CFRoutes"]     if arcpy.Exists("ProxDoc"):         arcpy.Delete_management("ProxDoc")     outTable = "ProxDoc"     arcpy.CopyFeatures_management(tableName, outTable)


title: Speed drastically reduced when including geometry, is there a way to improve?

text: -- EDIT: Issue is that the shape files being used are at too small of a precision and way too large, output was 488M total, looking for different source -- I'm having some speed issues with a complex query that includes a geometry, but I've tried to distill it down to a smaller set. Postgres: 9.2.4 Postgis: 2.0.4 create table loc_shape (shape_id int, type_id int, name); select addgeometrycolumn('loc_shapes', 'the_geom', '4269', 'MULTIPOLYGON', '2'); indexes on shape_id, type_id and geometry populate . . . (4 types . . . 4245 records) Query info:               DB=> select shape_id, type_id, name from loc_shapes where type_id = '2';     Time: 4.358 ms                                     QUERY PLAN     ----------------------------------------------------------------      Seq Scan on loc_shapes  (cost=0.00..314.96 rows=3234 width=16)        Filter: (type_id = 2)          DB=> select * from loc_shapes where type_id = '2';     Time: 1034.859 ms                                          QUERY PLAN     -----------------------------------------------------------------      Seq Scan on loc_shapes  (cost=0.00..314.96 rows=3234 width=303)        Filter: (type_id = 2)      .004 without the geometry, 1.034 with the geometry, the only difference being the width. What can I do to optimize the return with the geometry? Is it better to store the geometries outside as a geojson file and merge the count / contains sets outside of the databases?


title: Statistically compare two density maps?

text: I (will) have a modelled distribution and an observed distribution of animals. If I were to interpolate these position datasets to reflect some density distribution (perhaps using a kriging interpolation method in the python HPGL), what would be the best way of statistically comparing one against the other? I am doing most of my post processing in python, so suggestions with a python solution are extra appreciated. Thanks!


title: Adding more fields in locator style to creat customized address locator

text: I have a database following the structure of "US Dual Range Addresses" and I want to, in addition of the fields used in dual range addresses, add more fields and I want to know what are the changes I have to make or the steps I should follow.


title: Is it possible to rename a field with the current date

text: I'm trying to figure out if it is possible to rename a field with the current date. What I am trying to accomplish is a table to table conversion, dropping a dozen fields, leaving only two fields, Name and Status. I want the Status field to be renamed to Status_yyyy_mm_dd. The script will then run a join field to another table, thus creating a history of the status field by day. I am running Arc 10.1. I have everything working, except the naming bit. Any help would be greatly appreciated.               import arcpy     import time          uiq = "uiq_data_set"     gdb = "c:\\Temp\\default1.gdb"     newFieldName = "Status_" + time.strftime('%Y_%m_%d')          arcpy.TableToTable_conversion(uiq, gdb, "uiq_historic", "", "Name \"Name\" true true false 255 Text 0 0 ,First,#,c:\\Temp\\default1.gdb\\uiq_data_set,Name,-1,-1;Status\"Status\" true true false 255 Text 0 0 ,First,#,c:\\Temp\\default1.gdb\\uiq_data_set,Status,-1,-1", "")


title: Shapely LineString and Polygon intersect?

text: here is my python code, it does not intersect and when I plot this in google map , I see the intersection. shapely.geometry is in Cartesian plane, how you are solving this?               l = "40.65:-114.07 40.21:-112.96 40:-112.66 39.4:-112.7 39.39:-113.28 39.68:-113.94 40.42:-114.26 40.6:-114.22"         points = [[float(x) for x in c.split(":")] for c in l.split(" ")]         print(points)         polygon = Polygon(points)         path = LineString([(42.049999,-96.25), (38.0880979565,-119.609216457)])         if path.intersects(polygon):             print("intersect")      ![here is the intersection on google map](http://i.stack.imgur.com/6Q9ej.jpg) here is my code for google map: https://gist.github.com/anonymous/8393151


title: tap on points on touch screen with openlayers

text: I have openlayers 2.13 along with geoserver 2.1.3. I have a vector layer where points created, after a CQL filter is activated. I have a click event for those points. In pc/laptop works fine, but in mobiles (iphone4s safari and android vimicro firefox) if I tap with my finger a point, nothing happens. I only load the openlayers library `<script type='text/javascript' src='OpenLayers.js'></script>` and zoom/pan on the map works in mobiles. CQL filter also works and the points are render in mobiles. But I can not tap them. How can I fix this ? Thanks in advance the code (I can provide more, if you think is neccessary):               mylayer = new OpenLayers.Layer.Vector("my layer", {renderers: ["Canvas", "SVG", "VML"]})          //Add a select feature control      var select_feature_control = new OpenLayers.Control.SelectFeature(mylayer, {multiple: false,toggle: true});          map.addControl(select_feature_control);          //Activate the control      select_feature_control.activate();          function selected_feature(event){     //do stuff     }      **EDIT** I have this now , trying to use `Control.GetFeature`               //create layer     mylayer = new OpenLayers.Layer.Vector("mylayer", {renderers: ["Canvas", "SVG", "VML"]})          //set protocol     var myprotocol = new OpenLayers.Protocol.WFS({         url:  "/geoserver/wfs",         featureType: "mylayer",         featureNS: "http://www.mysite.gr"     });          //set control     var select_feature_control = new OpenLayers.Control.GetFeature({       protocol: myprotocol,       click: true,       maxFeatures: 1,       clickTolerance: 1,       box: false,       hover: false     });          //add the control     map.addControl(select_feature_control);          //activate the control     select_feature_control.activate();          //register it an connect it with the function     pins.events.register('featureselected', this, selected_feature);          //the function - gets the id by splitting the fid     function selected_feature(event){     var sf = event.feature.fid;     var sfs = sf.split(".");     var sff = sfs[1];     showtext(sff);     }      thats the part of the cql filter               //pass the filter to the layer     var prot =  new OpenLayers.Protocol.WFS({         url:  "/geoserver/wfs",         featureType: "mylayer",         featureNS: "http://www.mysite.gr",         defaultFilter: filter_final});          var _CallBack = function(resp) {         pins.addFeatures(resp.features)     }               var response = prot.read({callback: _CallBack});               //refresh to render POIs     mylayer.refresh({force:true});      I can search the layer and see points on the map. But I still can not select in mobile. In pc, I can click a point, but the cursor of the mouse becomes hourglass and nothing happens. Can you spot what is wrong? Thanks a million


title: Openlayer not loading in middle

text: I am facing an issue to load the layer in middle. The layer is loading from the bottom right of the screen. How to get the layer in middle of screen. I am using `map.zoomToMaxExtent()` also. tried with `map.setCenter(new Openlayers.LonLat(lonvalue,Latvalue),0)`;               var bounds = new OpenLayers.Bounds(-268, - 405.489910347329, 10952, 4573.440469368996);     mapOptions = {             projection: new OpenLayers.Projection("EPSG:3997"),             units: "m",             numZoomLevels: 7,             maxResolution: 10,             zoom: 5,             maxExtent: bounds,            // center: [-12356463.476333,5621521.4854095],             controls: [             new OpenLayers.Control.Navigation({                         dragPanOptions: {                             enableKinetic: true                         }                     }),             new OpenLayers.Control.Zoom(),             new OpenLayers.Control.Scale(),             new OpenLayers.Control.MousePosition()]         };         map = new OpenLayers.Map('map-id', mapOptions);            map.addControl(new OpenLayers.Control.LayerSwitcher());        map.addControl(new OpenLayers.Control.MousePosition());             map.zoomToMaxExtent();


title: How to export a Vector Layer with OGR2Layers Plugin

text: I'm using QGIS 2.0 Dufour on my Linux (Ubuntu 12.10).I'm download shapefile of Croatia country from this site (http://www.gadm.org/country) and i added a new vector layer where i created some polygons. (a picture is attached). When i created OpenLayers HTML map using OGR2 layer plugin, desired polygons are not displayed in open street map. Where I'm wrong and if it is even possible. Sorry for my bad english. Thank you![Vector layer in QGIS](http://i.stack.imgur.com/KwTNr.png)


title: Effective way for creating Open Source Web mapping applications

text: Sorry for asking such a basic question, but these days there is lot of advancement on open source technologies. My requirements for my application are below   1. Basic Map application with zoom, pan, etc   2. Dynamic Attribute Query based on the Layer selected on TOC   3. Input Data is from mostly Shape files / PostGIS I know about GeoServer + GeoEXT or MapServer + Fusion or any other alternative if so please suggest But need advice from real programmers for extending the application in further and also wanted to know best open source web mapping practice. Thanks in advance


title: How to add CSV data with no coordinates to a polygon layer in QGIS?

text: I would like to add attributes from an spss database (around 300 cases) to a polygon layer in QGIS. Both datasets have a column with unique IDs. I exported the spss data to a CSV file which does not contain x,y values. The "add delimited text layer" plugin seems to require x and y values. How can I add the CSV data to the polygons?


title: How to process GRIB2 Data for Visualization?

text: My goal is to extract wind information from data provided to me in the GRIB2 format as it has been done in the attached image. I was curious if anybody had any experience with this format. I'm not sure if I am going in the right direction or what format I should be exporting it to. My end goal is to display this information through openlayers. So far, I have used gdal_translate to extract specific information ex. Temperature from band 25 (see command below).               gdal_translate -of Gtiff -b 25 weather.grib2 band25.tiff      I also have access to FME Desktop professional edition.


title: How can I use feature templates on layers with joins?

text: I find this particular feature of the ArcMap 10 framework quite annoying: When I define a join on any layer, templates cannot be added to the create features window. I have to remove all joins from the layer, then add the template, then modify/edit/add features and again define the join(s). In fact, when I use the Organize Feature Templates window to add the template on a layer with a join, it does not add it to the list and no errors are raised. However, if i remove joins from the layer the templates I've added while the layer had a join suddenly appear in the Create Features templates list. **Without having to do this programatically, Is there a way to use add templates on layers with joins?** (Assuming entering attributes that satisfy the join would somehow have to be enforced) When editing older maps I often forget that a layer has a join and it takes me a while to figure out I have to first remove it before I can use the templates to edit the features. **Even a message would be nice, i.e. _"You have to remove joins to use templates."_** or something like that but I suspect that this is not possible using a default tweak. Any ideas?


title: Bing Map REST API is not working

text: if i place the below URL in my browser http://dev.virtualearth.net/REST/v1/Locations?q=bangalore+karnataka+india&key= The response is below                   {     authenticationResultCode: "ValidCredentials",     brandLogoUri: "http://dev.virtualearth.net/Branding/logo_powered_by.png",     copyright: "Copyright Â© 2014 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",     resourceSets: [     {     estimatedTotal: 0,     resources: [ ]     }     ],     statusCode: 200,     statusDescription: "OK",     traceId: "f54d507047604f1585db1e00254b9a7d|SINM000007|02.00.183.2300|SINMSNVM000034"     }      Not getting the resources Any issue in the URL?


title: Is there a time limit on post-processing GPS data with Pathfinder Office?

text: Do I need to post process my GPS data within a certain amount of time after collection? Do the services that provide the correction data to Pathfinder Office only make that data available for a certain amount of time?


title: How to write table blob field to file using ArcObjects?

text: I have a table with blob field and some others as well. I am trying to read blob field and save it to file using IBlobStream, and the thing compiles. The problem comes up in run-time, when calling blobStream.SaveToFile() method, saying:               'object' does not contain a definition for 'SaveToFile'      the following code:               int blobFieldID= table.Fields.FindField("MODEL_NAME");     int nameFieldID= table.Fields.FindField("MODEL");     ICursor cursor = table.Search(null, true);     IRow row = cursor.NextRow();     while (row != null)     {         IBlobStream blobStream = (IBlobStream)row.get_Value(blobFieldID);         blobStream.SaveToFile(@"C:\TEMP\" + row.get_Value(nameFieldID) + ".tbx"); //error         row = cursor.NextRow();     }      When i hover mouse over SaveToFile method it says:               (dynamic expression)     This operation will be resolved at runtime      I can't figure out what's the problem in here


title: ArcGIS: how to clear selection in Attributes Table with a keyboard shortcut?

text: ArcGIS: how to clear selection in Attributes Table _with a keyboard shortcut?_ I'm getting tired of going to Options, Clear Selection; I work with Attribute Tables frequently. Thanks!


title: Power Outage and ArcSDE

text: I'm working on a hostile environment. Power outages, despite our efforts to minimize them, are often here. Yesterday we had a power outage and we had 2 ArcSDE databases working. I have two sets of connections, that are essencially equal. The only difference is the instance that the database points to. Now, after the power outage, all connections we had pointing to our main server gets a bad login user and we cannot connect. I can connect trought oracle using that password. So, the database is fine. My guess that the problem is the service (when I direct connect it works fine too). I need to fix the service. Any ideas on how to do that WITHOUT running another post install? The host OS is sadly a Windows 7 Ultimate machine. I'm in the amazon forest, so please, be kind :P **Solution found** : deleted service. Recreated one tru command line, but it did not start. Deleted that one too and created one tru post-install. Seems to work. Thanks


title: How do I convert my coordinates to the limit of geographic region (outer edge)?

text: I am trying to use r.in.bin. The parameters of north, south, east, and west needs values: north=float Northern limit of geographic region (outer edge) south=float Southern limit of geographic region (outer edge) east=float Eastern limit of geographic region (outer edge) west=float Western limit of geographic region (outer edge) I only have the values for my map, which is in this format: north: 15N south: 10N east: 125E west: 120E rows: 6000 cols: 6000 How do I convert them?


title: How to draw lines of specified lengths in specified directions in Mapinfo?

text: I have an Excel file with the following data:               1) longitude and latitude which represents a point     2) Angle which represents where line turns from North     3) length of line.      Is is possible to draw these lines in bulk? Note : I know how to create these lines individually using a tool, but not in bulk.


title: How do I generate code from ESRI GPServer wsdl?

text: I'm trying to use svcutil to generate code from this GPServer wsdl. So I run this command:               svcutil GPServer.wsdl      Which generates ESRI_Currents_World_GPServer.cs. The code has comments saying the code generator "requires additional schema information", is there some other file I can pass to svcutil that has this additional info?               [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]     [System.ServiceModel.ServiceContractAttribute(Namespace="http://www.esri.com/schemas/ArcGIS/9.3", ConfigurationName="GPServerPort")]     public interface GPServerPort     {              // CODEGEN: Parameter 'Result' requires additional schema information that cannot be captured using the parameter mode. The specific attribute is 'System.Xml.Serialization.XmlArrayAttribute'.         [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]         [System.ServiceModel.XmlSerializerFormatAttribute()]         [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Patch))]         [System.ServiceModel.ServiceKnownTypeAttribute(typeof(Field[]))]         [return: System.ServiceModel.MessageParameterAttribute(Name="Result")]         GetJobInputValuesResponse GetJobInputValues(GetJobInputValuesRequest request);      I get the same results with               svcutil GPServer.wsdl /ser:XmlSerializer      I'd like to implement the interface in a web service and have it appear to clients (like arcmap) as if it were arcgis server. Has anyone done this? **Update:** This article addresses the issue, but the solution is to change your WSDL so that it's compatible with svcutil. I can't do that, can I? **Update 2** It appears what I'm trying to do is referred to as "WSDL first design". Here's a good discussion. This description could apply to ArcGIS desktop as well as Microsoft office: > And this it may be counter intuitive for some people. The client > application, in this case, Microsoft Office, specifies the on-the-wire > contract, the WSDL. Lots of people have a server-centric design perspective, > and assume that the server defines the contract. That often makes sense, but > not in this case. Because there are so many deployments of Microsoft Office > out there, it makes sense for the client to define the contract. **Update 3 (Simplified summary)** Esri's REST API is open, yet incomplete. Some features supported by SOAP are not supported by REST, like cancelling a GP job. Since the wsdl is public, it should be possible to write a mapservice that implements both the SOAP and the REST API. Does anyone know of a tool that helps me implement a mapservice that adheres to Esri's SOAP contract?


title: Intersection between points and polygons in QGis

text: I have the following problem. I have a shapefile of points and a shapefile of polygons. I want to know WHAT points (not how many) fall inside EACH of the polygons of my multipolygon shp. I thought the "Intersect" function was the best option to deal with this, but actually it seems that it is implemented to intersect only polygons with polygons.In fact if I try to run it I get an empty table. I was wondering if any other function has been implemented to deal with this issue.


title: onSelect event on dynamically created layers

text: I'm creating different layers dynamically full of features, everything on-the- fly, and I need to do some stuff when each specific feature is selected. I can't paste the actual source code here as it has dependencies and it's quite long also, but you can imagine something like the following:               if (e.Bubbles) {          jQuery.each(e.Bubbles, function (i, obj) {              jQuery.each(obj, function (n, el) {                       /* features and layers ... */                  var point = new OpenLayers.Geometry.Point(el[1],el[0]);                       /* some code here ... */              });                   layer = new OpenLayers.Layer.Vector(i, {styleMap: e.Style});              map.addLayer(layer);              e.Layers.push(layer);                   /* etc. */      When I'm trying to bind the `onSelect` event to the layer, it works but it replaces the previous layer behavior, so the last layer in the `loop` works fine when you clicking on the features, but only the last layer. Here is my code (inside the loop):               selectControl = new OpenLayers.Control.SelectFeature(         Layer,         {             clickout: false,              toggle: false,             multiple: false,              hover: false,          }      );          selectControl.activate();          layer.events.on({         "featureselected": function(event) {         console.log(event.feature);         }     });      So, the `selectControl` will be replaced inside the loop each time and it will lose its own functionality for the previous ones, and just works for the latest layer. I tried pass all the layers as an array as well (which is supposed to work) but without any success.               selectControl = new OpenLayers.Control.SelectFeature(         e.Layers,         {             clickout: false,              toggle: false,             multiple: false,              hover: false,             onSelect: function(event) {                 console.log(event.feature);             },         }     );          selectControl.activate();      I hope somebody has been solve the problem!


title: Creating the node ids：Is this SQL error related to geometry type？

text: I loaded a **multilinestring** layer into PostGIS Manager： ![enter image description here](http://i.stack.imgur.com/diYlI.png) ![enter image description here](http://i.stack.imgur.com/QV8sZ.png) and use the SQL query, trying to get the table with the node ids：               ALTER TABLE split_4 ADD COLUMN source integer;     ALTER TABLE split_4 ADD COLUMN target integer;     SELECT assign_vertex_id('split_4', 800, 'geom', 'gid');      and got this error：               Error: Function StartPoint (geometry) does not exist     LINE 1: SELECT gid AS id, StartPoint (geom) AS source, EndPoint (geom) ...                           ^     HINT: did not comply with the specified name and parameter types of function. You may need to add explicit type conversion.     QUERY: SELECT gid AS id, StartPoint (geom) AS source, EndPoint (geom) as target FROM split_4     CONTEXT: PL / pgSQL function "assign_vertex_id" line 23 at target EXECUTE statement FOR      Is this error related to the **multilinestring** geometry？ I work under **WIN7-64bits** , with **postgres 8.4** , **pgadmin 3** , **PostGIS 2.0** installed, and download Windows Binaries of **pgrouting** ：pgRouting-1.03_pg-8.4.2.zip.


title: Displaying 3D city model from PostGIS 3D backend

text: I know that openlayers doesnt support 3D yet. I heard about Kartograph has 3D features but Does Kartograph support reading data from backend database especially PostGIS? I would like to create a 3D city model about my city. Is it possible from Lidar point cloud? And then I would like to publish it on the internet. So I would like to replicate street view like interactive map but not from pictures.


title: How to create styled markers with custom marker tooltip

text: How to create custom markers and when mouseover on marker i need a tooltip can any one suggest me how to do these type of markers...i need markers like below image ![enter image description here](http://i.stack.imgur.com/jYP6J.png) Thanks in advance


title: Referencing Qt UIs external to plugin with python

text: I'm developing a plugin that sets up a working environment for a user: loading layers (from db), applying styles and several custom designed (Qt) UI files etc. Primary user interaction is in the Attribute editor (Attribute Table) where there's a mix of Autogenerated and custom designed UIs. Some of the custom UIs contain Qt objects/widgets that I need to interact with e.g., a QPushButton and a QTabWidget with QWidgets. Since the plugin is only setting up the working environment, letting the user work freely afterwards, how can I react to user actions/events calling python functionality? From the following posts I get the notion that my plugin needs to act as the widgets launch platform to be able to send signals and listen on slots.   * How to reference to my in QT designer created buttons in python?   * Connect not working for custom QGIS form So, in short, I'm trying to interact with custom (Qt) forms external to my plugin. How can I accomplish this?


title: Which is better for storage? Geometry column or varchar?

text: Objective: Need to store and retrieve a list of geometries from the database. Basically these are drawn by the user using OpenLayers which I would like to save and present again as a list (kind of like a recent history). When user clicks on a certain item on the list then that feature is drawn on the layer. My way of going about it: With my existing code, I would like to construct the feature from the geometry using OpenLayers ie., each of the geometries are sent to the client(as coordinates sets understood by OpenLayers) via AJAX when the client page loads. I don't want to have a layer and display these via GeoServer. Question: With the above in mind, does it matter how I store the geometries in the backend (Postgres with PostGIS)? If yes, which is better, storing the geometries as `GEOMETRY` column or just as normal strings(ie., `varchar`)?


title: Importing Lat/Long coordinates as CSV file & only displaying single point in QGIS

text: I am using QGIS and trying to import Lat/Long coordinates as delimited text layer. All points show up in my attribute table, however, only one point is displayed on the map? Any ideas?


title: How to display ONLY local country names in google maps?

text: I am using google maps in an application where it is important that country labels display the country name in the local language. If you pass in certain language parameters that google maps recognizes, but doesn't fully support (language=ka here), it displays localized place names with english labels underneath: ![enter image description here](http://i.stack.imgur.com/WtLSi.png) Which is great, except that I don't want the English labels at the bottom. Is there any way to do this?


title: What is a simple binary raster storage format which ArcGIS can read?

text: I have a C++ program that manipulates raster digital elevation models. I have been using ArcGrid ASCII format for results. It is simple to code and gets the job done, but it necessitates a decimal output. This means a loss of precision in floating-point numbers. Is there a simple binary raster format which I could write to and ArcGIS could read from?


title: Value at a particular spot on Geoserver Heatmap

text: Geoserver is drawing from a PostGIS database to generate a heatmap using this SLD extension. Leaflet then overlays the heatmap over the base layer. **Question:** How can you determine the value at a particular spot on the heatmap? This value to display will be `color ramp value X * constant C`. In other words, how can we determine the color ramp value at that particular spot on the heatmap? There's probably other methods of finding this value without using the heatmap's color ramp mapping. ![enter image description here](http://i.stack.imgur.com/eTv77.jpg)


title: Refresh combo box in add-in

text: I've got an add-in with a combo box and want to refresh the list in the combo box after an event in one of the other tools in the same add-in toolbar. Can I call the combo box somehow to refresh it outside of the object's onSelChange event?


title: Black/white hatching pattern fills in QGis

text: I am looking to replicate black & white maps in QGis, using hatching patterns and greyscales to indicate different categories of a continuous variable (example below). It is possible/straightforward to do so in QGis? At first sight I only see color gradients and symbol fills. ![example](http://i.stack.imgur.com/FDvAE.png) ).


title: Why do these annotations appear stacked/overlapping?

text: I've encountered a strange problem while trying to populate an annotation feature class programmatically (ArcObjects, C#). As you can see in the image below, the characters in each text string seem to be stacking upon eachother, rather than laying-out horizontally as I would have expected. I'm pulling in several values from MySQL (created by a different application), and those look fine in the debugger. I've tried using a mixture of unknown/projected coordinate system, as well a few different Element interfaces. If anyone has seen and conqured this issue before I would sure appreciate a push in the right direction. Here's the relevant portion of my C#:               IFeature feature = featureClass.CreateFeature();          ITextElement textElement = new TextElementClass();     textElement.Text = textString;                         // value like: '183          IElement element = textElement as IElement;     element.Geometry = pointGeom;                         // Point: x=2986785, y=629058          (feature as IAnnotationFeature2).Annotation = element;     (feature as IAnnotationFeature2).AnnotationClassID = 0;     (feature as IAnnotationFeature2).Status = annoStatus;  // ESRI constant for 0, "placed"          feature.Store();      And as promised, here's a look at the results I'm getting: ![enter image description here](http://i.stack.imgur.com/gAH0u.png) **[Update]** Per @Radar's advice I tried the following revision, but it still renders stacked/overlapped annotation text:               ISymbolCollectionElement scElement = new TextElementClass();      scElement.CharacterSpacing = 5;      scElement.Geometry = pointGeom;      scElement.Text = textString;           (feature as IAnnotationFeature2).Annotation = scElement as IElement;      (feat as IAnnotationFeature2).AnnotationClassID = 0;      (feat as IAnnotationFeature2).Status = annoStatus;      Anyone have any additional insights? **[Second Update]** Basically I'm trying to accomplish what @murdoch did in this "old" ArcScripts post (see his second entry). I reviewed his approach again and noticed he's using the IFormattedTextSymbol interface, so I tried that, yet I continue to experience the same problem with stacked/overlapping text in the placed annotations. Here's my latest thrust of C#:               IFeature feature = featureClass.CreateFeature();          IFontDisp font = new StdFontClass() as IFontDisp;     font.Name = "Arial";     font.Bold = true;     // font.Size = 30;          // load in some reasonable default values..     IFormattedTextSymbol fmtTextSymb = new TextSymbolClass();     fmtTextSymb.Font = font;     fmtTextSymb.Size = 30;     fmtTextSymb.VerticalAlignment = esriTextVerticalAlignment.esriTVABottom;     fmtTextSymb.HorizontalAlignment = esriTextHorizontalAlignment.esriTHALeft;     fmtTextSymb.Angle = 0;     fmtTextSymb.CharacterSpacing = 100;     fmtTextSymb.CharacterWidth = 100;     fmtTextSymb.FlipAngle = 90;     fmtTextSymb.Leading = 0;     fmtTextSymb.WordSpacing = 100;     fmtTextSymb.Text = textString;  // my special text value..          ITextElement textElement = new TextElementClass();     textElement.Symbol = fmtTextSymb;     textElement.Text = textString;          IElement element = textElement as IElement;     element.Geometry = pt;          (feature as IAnnotationFeature2).Annotation = element;          feature.Store();      Anyone take issue with this? or have a favored-implementation? Here's what it looks like now; as you can see, the approach changed somewhat, but the results are the same: ![enter image description here](http://i.stack.imgur.com/SQsOu.png) **[Third Update]** On final analysis, the problem was not the code I used to create the individual annotations but as @Kirk Kuykendall revealed, the problem was how I initially created my AnnotationLayer with `IAnnotationLayerFactory.CreateAnnotationLayer()`. I was submitting `null` for the `IGraphicsLayerScale` argument, assuming it would resolve to functional, if not ugly, default values. Apparently it does not. I created that object as follows, and it fixed my problem:               // Set the map scale and units the annos should be "cooked for".     // To get ReferenceScale, open ArcMap and zoom to an appropriate level.      // In the Standard toolbar, click the 1:N button (tip says "MapScale").     // It'll output something like 1:1,200. Drop the 1: and the comma     // and that's the value you want for ReferenceScale.          IGraphicsLayerScale graphicsLayerScale = new GraphicsLayerScaleClass();     graphicsLayerScale.ReferenceScale = 1200;     graphicsLayerScale.Units = esriUnits.esriFeet; // this should agree with your proj      Voila! ![enter image description here](http://i.stack.imgur.com/oKobC.png)


title: Sequoia 2000 Benchmark data?

text: In reading about DBSCAN clustering it mentions the SEQUOIA 2000 Benchmark database was used for benchmarking. Is this data set available anywhere? Or, is there another set like it? So far my searching hasn't turned up anything.


title: Why "DataBase Connections" mapped to "Dataset DataBase Connections" in ArcCatalog?

text: I am trying to Export data from a geodatabase by a existed sde file(created by ArcCatalog), the Error Messges: > Executing: ExportCAD 'DataBase Connections\Connection to GIS- > WANG.sde\SDE.water\SDE.ControlValve' DWG_R2010 D:\117.DWG > Ignore_Filenames_in_Tables Overwrite_Existing_Files # Start Time: Thu Oct 13 > 16:46:59 2011 ERROR 000622: Failed to execute (ExportCAD). Parameters are > not valid. ERROR 000732: Input Features: **_Dataset 'DataBase Connections_** > \Connection to GIS-WANG.sde\SDE.water\SDE.ControlValve' does not exist or is > not supported Failed to execute (ExportCAD). Failed at Thu Oct 13 16:46:59 > 2011 (Elapsed Time: 0.00 seconds) Why "DataBase Connections" mapped to "Dataset DataBase Connections"?


title: What's the difference between Geographic coordinate system 4019 and 4121?

text: I have a DEM with cell size 100,100 with geographic coordinate system GRS_1980_Transverse_Mercator, Datum: D_GRS_1980. I created some extra shapefiles with projected coordinate system: Greek_grid, projection: Transverse_Mercator and geographic coordinate system: GCS_GGRS_1987 and datum:D_GGRS_1987. Adding them in ArcMap I have the message that my layers use different spatial reference which is reasonable because the shapefile datum was different from the DEM I am using. I checked online and found in http://edndoc.esri.com/arcims/9.2/elements/gcs.htm the geographic coordinate systems I am using. They are the 4121 and 4019. They look to have the same characteristics. Does anyone know why they exist with different names? Or am I missing something?               4121    GCS_GGRS_1987     GEOGCS["GCS_GGRS_1987",DATUM["D_GGRS_1987",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]          4019    GCS_GRS_1980     GEOGCS["GCS_GRS_1980",DATUM["D_GRS_1980",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]      Thanks in advance, chch


title: Displaying WFS Features Based on Zoom Level

text: I have a WFS feature layer with ~25,000 features and have been experiencing significant performance issues with my OpenLayers map. My first approach to solving this has been to pre-compute feature clusters on the server side, instead of relying on the clustering in OpenLayers. I wrote a script to cluster my features based on the resolution at each zoom level, and I placed the clusters for all of the zoom levels in my PostGIS database. My hope was to use a filter like the one below to select only those features in the database that are tagged with the zoom level equal to the current zoom level of the map:               function init() {                  var zoomLevelIndicator;             var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;             renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;                  map = new OpenLayers.Map ("map", {                 controls:[                     new OpenLayers.Control.Navigation(),                     new OpenLayers.Control.PanZoomBar(),                     new OpenLayers.Control.Permalink(),                     new OpenLayers.Control.ScaleLine({geodesic: true}),                     new OpenLayers.Control.Permalink('permalink'),                     new OpenLayers.Control.MousePosition(),                                         new OpenLayers.Control.Attribution()],                      maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),                 maxResolution: 156543.0339,                 numZoomLevels: 19,                 units: 'm',                 projection: new OpenLayers.Projection("EPSG:900913"),                 displayProjection: new OpenLayers.Projection("EPSG:4326"),                      layers: [new OpenLayers.Layer.OSM(),                          new OpenLayers.Layer.Vector("Filtered by Zoom Level", {                             strategies: [new OpenLayers.Strategy.BBOX()],                             protocol: new OpenLayers.Protocol.WFS({                                 version: "1.1.0",                                 url: "http://localhost:8080/geoserver/wfs",                                 srsName: "EPSG:900913",                                 featureNS: "http://localhost:8080/myworkspaceuri",                                 featurePrefix: "MyWorkspace",                                 featureType: "clusteredtestpoints"                             }),                             renderers: renderer,                                  filter: new OpenLayers.Filter.Comparison({                                 type: OpenLayers.Filter.Comparison.EQUAL_TO,                                 property: "zoomlevel",                                 value: zoomLevelIndicator                                  })                               })                          ]                       } );                  map.events.register('zoomend', this, function (event) {                 zoomLevelIndicator = map.getZoom();             });                           var switcherControl = new OpenLayers.Control.LayerSwitcher();                 map.addControl(switcherControl);                 switcherControl.maximizeControl();                       if( ! map.getCenter() ){                 var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());                 map.setCenter (lonLat, zoom);             }         }      Specifically, I am trying to update the zoomLevelIndicator variable each time a zoom event occurs. When I test this, the features for the initial zoom level show up, but do not update when I change the zoom level. Does anybody have any ideas as to why this is not working? Thanks, -Rob


title: Error ArcMap 10.1 - "The geometry is not M-Aware"

text: I'm trying to use the ModelBuilder in ArcMap 10.1 in order to use the Clip function. Even though I did the exact same steps in entering input and output as a collegue of mine, I keep getting the error "invalid characters: The geometry is not M-aware". Any help sorting this mess out will be highly appreciated. All the best


title: Accessing ArcGIS layers from separate thread using ArcGIS Engine?

text: I've got an ArcEngine application, referencing a MXD for it's data (and map display). I'm running a query against all layers, so can take quite some time. I would normally run the query in a separate thread, which would allow me to return the results as they come in for each layer, rather than wait till all are layers are queried, then return a giant result set. The limitation however is that I can't access any of the existing ArcObjects in my second thread, due to the STA threading model of ArcObjects. The only way around it at this stage, appears to be to re-create my data environment from scratch in the second thread, simply for querying. The problem with this approach is that the layers have joins and attribute queries against them. For a number of reasons, it's just not a simply exercise to go this route. I've looked at the IXMLSerialize interface, hoping to find some object, which would allow me to bridge between threads, which I could deserialize/serialize, but nothing sprang out to me. Any other ideas? UPDATE: Because it was so important that I query against the layers, not the datasource, at this point, I save the search layers to .lyr files, then in my second thread, load them using the ILayerFile interface. This then gives me access to the layers with joins/relates/definition queries intact. The problem at this stage however, is that the ILayerFile.Layer call is very slow. So am looking for a way to speed that up. The threaded search does however perform wonderfully, and has improved the UI greatly!


title: Problem with SetValue method in ArcGIS 9.3

text: I am trying to make a python script for ArcGIS 9.3. I have a problem with the SetValue method. I try to use it in a very simple code but it still doesn't work : No error is return but my field is not populate. The code is the following :               import arcgisscripting     gp = arcgisscripting.create()          gp.workspace = r"Z:\PPR\PPR76\Tentative Macro Amelioration MNT"          try:              input = gp.GetParameterAsText(0)         field = "TEST"              rows = gp.UpdateCursor(input)         row = rows.Next()         while row:             expression = 3             row.SetValue( field , expression)             row = rows.Next()     except:         print gp.GetMessages(2)      Thanks for your help


title: Dynamic data on overlay layer in openlayers

text: I am using openlayers to visualize an industry using image as the layer. On the raster layer I have created an overlay layer.Is it possible to show updated values (dynamic runtime values - as integer) in the overlay layer that gets updated every second? If so please help me how to get this done in openlayers.


While updating some ArcObjects projects to ArcGIS 10, I realized that I don't have a comprehensive logging strategy. Sometimes it's log4net. Sometimes it's System Trace/Debug. Sometimes custom logging. Sometimes all three within in the same project. log4net certainly seems to be popular. I use it and I have had no trouble with it, but I don't feel like I'm experienced enough with log4net to anticipate possible issues with its use. This question is for ArcGIS Desktop only: AddIn or COM extensibility. I think the answers to the same question for ArcGIS Server might be different and deserve its own question and its own set of tags. What issues exist with using log4net as a logging framework for ArcGIS Desktop? Some related Stackoverflow.com questions:   http://stackoverflow.com/questions/576456/log4net-versus-tracesource http://stackoverflow.com/questions/98080/what-is-the-best-logging-solution- for-a-c-net-3-5-project http://stackoverflow.com/questions/2410438/log4net-performance http://stackoverflow.com/questions/126540/what-is-your-net-logging-framework- of-choice


title: Extracting all address locations from street centerline file

text: I have a project in which I want to "extract" all of the geocoded addresses from a street centerline file (with my defined offset and whatever other user defined input is needed). If it is helpful here is a description of what type of format a street centerline file is in. Currently the only way I know how to do this would be a brute force geocode (i.e. make all possible options and geocode the points that way). Which isn't an impossible option but I would like to see if a more efficient means exists. I mostly use ESRI software (I have access to machines running 9.2 and 9.3) but if an easier solution exists in some freeware package I'm open to anything. I also have access to MapInfo through my university which I would be willing to use if a simple solution exists. Also all of the street centerline files are in .shp format so any other program will have to either use the shapefile format or have the ability for me to convert the shapefile to a useable format (I assume a trivial step). I have a very little bit of programming experience in Python (and more extensive experience with statistical software but that won't really help out here). So if I had code options I suppose an ArcScript with a GUI or Python would be preferred. Also my "universe" of locations I am creating will include street intersections, so if anyone can point to a solution to extract all of the street intersections in the street centerline file (and record both the intersecting streets) I would appreciate this as well. I assume this is more likely to already exist in some ArcScript. **Edit:** To address DavidF's concerns, I know what information is contained in a street centerline file, and I know they are not actual and verified street addresses. For this project I am not making my own geocoder, I am simply defining the universe of address locations according to the street centerline file itself (I also know this universe will be dependent on how far I decide to offset the address locations). The immediate goal of this question is simply to define a coordinate for all potential addresses. I'm assuming all potential addresses are integers between the minimum and maximum values for the centerline. For this project it is ok that they are not real or verified. For alittle bit more insight into the project and its goals, often with inferential spatial statistics distributions are created via creating random locations within your study boundary and calculating distributions from those random samples. Often times the universe of potential locations is dictated by residential addresses (i.e. a potential location has to be defined by whatever geocoder you are using, it can't be everywhere within the study boundary). Since these residential addresses are likely clustered in space, I want to see if functions like Ripley's K tend to be biased in using complete spatial randomness to define the sampling distribution as opposed to using the actual locations of addresses (defined apriori by whatever you are using to geocode those addresses). I know that if I use a parcel based geocoder that pretty much all of these concerns are circumvented. I am still interested in extending the analysis to street centerline files though because as far as I'm aware street centerline files are still regularly used to geocode addresses, and so such a question is still pertinent. I plan on conducting the analysis with a parcel based geocoding system as well. As far as DavidF's and Mark Ireland's concern about the "realness" of the addresses if I use every integer value, it is a legitmate concern given the nature of the project. If I use more addresses than really exist, it will induce artificial clustering of addresses. I would likely conduct post hoc specificity tests using Both David's suggestion (addresses only every 40 feet by a sampling strategy) and Mark's suggestion (verifying real addresses from some outside source). In either case I still want to be able to extract all the address points from the street centerline file. I am not verifying the accuracy of the geocoder from the onset, I am seeing if complete spatial randomness conforms to the distribution of points that a geocoding process could potentially give. I understand the errors associated with street centerline files, but I want to mimic how geocoding is actually conducted with a street centerline file. Also if people can point to some literature that they think would be pertinent I would appreciate it. I know of a bit of work done on the accuracy of geocoding, but I have not seen any work addressing this particular issue.


title: How to perform a cascaded combine from python script in QGIS?

text: I'm working with a large dataset, and I need to be able to combine up to 400,000 polygons. I have been using the `QgsGeometry::combine(QgsGeometry* geometry)` function and simply looping over all geometries in an interative fashion like this:               union_geoms = geometries[0]     for geometry in geometries:       union_geoms = union_geoms.combine(geometry)      This works fine for most of my data, (the largest list of polygons I have gotten it to complete is ~30,000.) But I have two sets of ~200,000 and one of ~400,000 and I can't get this to complete in a timely fashion (I have let it run for days to no avail). So I started looking for a better method to combine these geometries, and I found `geos::operation::geounion::CascadedPolygonUnion` This algorithm, described here, is well suited to my application as the polygons of interest contain a lot of adjacency. I found a couple references to implementations of this in Qgis, here in 2010 and here in 2013, but it doesn't appear to have made it into the API (unless I'm looking in the wrong place!) So my question is how would I go about implementing this type of algorithm, or more simply how can I use the existing implementation in GEOS from my own (python) scripts? From the 2013 link, > you can use `QgsGeometry::asGeos()` in the plugin instead of wkt-export / > wkt-import. For cascaded union, there is the method `GEOSUnaryUnion(const > GEOSGeometry* g1)` in the c-api. The argument seems to be a geometry > collection, which can be created with `GEOSGeom_createCollection`. But there doesn't seem to by python bindings for the `asGeos()` method. Anyone have suggestions as to how to proceed?


title: ArcPy merge datasets with slightly different fields

text: i have many (>15) shapefiles which have slightly differing fields.               s1: (Name, age, layer_1, ...)     s2: (Name, age, layer_1, layer_2, ...)     ...     s_n: (Name, age, layer_1, layer_1_extra, ...)      I want to combine s1,s2 up to s_n into a new feature class/shapefile with attributes               s_merge: (Name, age, layer_1, layer_1_extra, layer_2, ...)      Field order is irrelevant. layer_1_extra should be set to ' ' or 0 depending on type, where features come from e.g. s1 ()which does not have layer_1_extra)). Do I have to program this myself using search cursors (to get the field names), add field tool and insert cursors, or is there a way to coerce e.g. the merge tool to do what I want? So far i tried to use the merge tool, but this fails with               arcgisscripting.ExecuteError: ERROR 001156: Failed on input OID 0, could not write value ' ' to output field SCHICHT_2      Field SCHICHT_2 is a number field, so of course arcgis can't write ' ' to it. Code for setting the fieldMap is               for shapepath in ...:       land_shape_paths.append(shapepath)       fieldMappings.addTable(shapepath)     arcpy.Merge_management(land_shape_paths, land+'_full.shp', fieldMappings)      I had guessed ArcGIS was aware of field types and tried to write sensible "empty" values depending on field type. Apparently not, or my data is more botched than I think. Any help (especially on a tool more suited to my needs than merge, or on the needed fieldMap magic) is appreciated!


title: Setting "R Folder" Path in QGIS Sextante

text: I have installed R via the R-Project website. I have QGIS installed via OSGEO4W (currently 1.9.0 Master), and have Sextante plugin installed and working with GRASS and SAGA providers. I am now trying to get R to run, but with no luck. I initially installed R to Program Files, but found mention that perhaps the space in the file path was an issue, so I have re-installed to C:\R\R-3.0.1\ What paths do I need to enter the "R Folder" and "RScripts Folder" configuration area in Sextante? Or am I missing something?


title: Near analysis with mixed feature types in ArcObjects

text: I am trying to emulate the Near (analysis) ArcGIS tool in ArcObjects. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00080000001q000000 I want to use Mixed Feature Types. I have a point, polygon and line feature class and I want to use Near to compare all three of them with each other. This can be done one featureclass at a time like so (pseudocode logic):   1. Create IFeatureIndex    2. Store my feature class in IFeatureIndex.FeatureClass   3. Use IIndexQuery.NearestFeature for every IGeometry in a feature class to get distance to the nearest feature The problem I am running into is that I can only store one feature class in IFeatureIndex. I need to store three different feature classes (points, lines and polygons) to be able to properly execute my comparison. How can I do this? ESRI's feature that I linked above has managed to do this but there is unfortunately no way to peek at the code behind the geoprocessing tool that I know of. **Edit: I have solved this. See the answer below.**


title: ImportError: No module named qgis.core

text: I am on Ubuntu 13.04. I get the following error message -                   Traceback (most recent call last):           File "analyse.py", line 1, in <module>             from log import shelve           File "/home/shubham/SMART/TaxiData/log.py", line 27, in <module>             from demo import *           File "/home/shubham/SMART/zones/demo.py", line 5, in <module>             from qgis.core import *         ImportError: No module named qgis.core      Actually, everything was working fine till today morning. I guess this might be due to a package update. The qgis version I am using is 1.8.0-2~raring1. The remote repository is http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu/ raring/main amd64 Packages. I tried looking around on Google but my search was fruitless. So, I will really appreciate any help or pointers you guys can give :) Thanks.


title: What kind of table is bingHybrid?

text: I closed all table but I don't wan't to close underlying map eg like bingHybrid in mapinfo. How to prevent. Any detail about there map and way to handle while closing layers would be appreciated.


title: trouble with i.landsat.toar failing to identify satellite

text: I am trying to use the i.landsat.toar tool on L7 bands. I have tried to use both the MTL and MTLold, but no matter what I try, it returns "Failed to identify satellite." What am I doing wrong?


title: SPOT NDVI resolution

text: I downloaded SPOT S10 NDVI data which is supposed to be 1km spatial resolution. When I open the images in ArcMap the resolution is definitely not 1km and the NDVI values seems to be inverted with higher values where I expect lower values. Can anyone tell me why I have this problem and how to rectify it? It was downloaded from the vgt.vito.be website. It displays a range of values between 0-255, which I tried to change to the real NDVI values by using the formula provided on the website: (0.004* digital number)+(-0.1). I assumed the digital number to be the image and I therefore used the raster calculator to do the calculations. The new values make sense except that it still seems to be inverted (e.g. higher NDVI values where I expect lower values and the other way around). The pixel size of the images are also huge compared to my AVHRR data at 1km resolution. ![SPOT NDVI image](http://i.stack.imgur.com/Xl1QH.jpg)


title: Joining two polygon layers based on distance?

text: I'm new to GIS so this question may be an obvious one. I have one polygon layer of urban land use and another polygon layer of swamps. How do I join the two layers so that I get a column in the attributes tables that gives me the distance of the closest land use polygon to that of each swamp?


title: What is the difference between the compact build and standard build of the ArcGIS JavaScript API?

text: I am creating a JSAPI application using version 3.2/3.3 and have recently gone through the page detailing the difference between the compact build and standard build. Right now, I am confused about which build I should use. (I know a few people will use iPhone while others will use a PC to access our application.) So what should I use in my application? Since in the compact build, a few tools are not supported, I cannot create all applications in it. Software platform: ArcGIS Server & Desktop 10.1 Device platform: Windows , iOS & Android


title: What's the mature solution for label placement?

text: I am working on an android map application, while I need to place the labels for points/lines/polygons manually. I have googled and I found this: https://www.ads.tuwien.ac.at/research/labeling/ But it seems that it is last updated at 2004, I am not sure if this manner is out of date. And further more, it just lable the points, while I need to other kind of feature like line,polygon. So I wonder if there is a better solution? * * * Maybe I do not make myself clear enough. I am not looking for what should be placed in the map but how to make the features in the map labeled easy readable and without overlap.


title: How to open most recent directory using PyQGIS?

text: For example, when I add a vector layer, next time that I want to add another layer it opens up where I chose my last layer from. How would one implement this in Python and/or PyQgis? I'm writing a plugin, and I want user to select layers in the same way as above.


title: GeoExplorer Limit by Filter layer property not filtering correctly?

text: Using GeoExplorer to visualize data from GeoServer, I'm able to use the layer's Display "limit by filter" feature to remove certain features from the map, but when I use the Identify tool to expose the features remaining, I find some points with features that should not be included based on the filter. Does the Identify tool pull ALL data from the source data layer that matches that point on the map, and in that case, shouldn't there never be a point displayed on the map that contains ONLY features that violate the filter conditions (I have that situation)? Any help would be appreciated.


title: Recommended way to explicitly distinguish 2D from 3D locations

text: In strongly typed object-oriented programming environment, I want to make an explicit distinction between two types of Locations:   1. One type would be 2D (along Earth surface), thus having Latitude and Longitude. With a DEM available, Elevation would be a function of Latitude, Longitude, and the given DEM model. This type would represent positions of terrestrial or water-floating objects moving along the Earth surface.   2. Other type would be (inherently) 3D, with independend Elevation, intended to represent aerial, underwater or subterraneal positions and trajectories. So my question is: > Is there already any de-facto standard or commonly used name for such > distinct types of locations?


title: How do I generate a large number of maps?

text: I have to make a large number (hundreds) of distribution maps of species. I have a shapefile that contain the distributions for each species, and for each one, I would like to get a map as an image (jpg, png or otherwise) which contain the name of the species concerned, the legend (to distinguish areas of annual distributions, breeding, non-breeding, etc. ...). Do you have any solutions which would automate this task? If possible with an OpenSource software like QGis (with Sextante?) for example? Potentially, I can use PostGis, but I'd rather use QGis. Thank you.


title: Uploading Polygon Shapefile to Garmin GPS. How to View all Polygons?

text: I am trying to upload a polygon shapefile to a Garmin 60CSx unit. The polygon shapefile is a small area containing polygons of vegetation types. There are are 53 polygons (records) in the shapefile. I am using DNRGPS v6.0.0.15 Only one of the 53 my polygons I have uploaded appears in the GPS unit. I do not know why This is what i have done   1. Open DNRGPS and connect to Garmin.   2. Go to File-->Load From-->File... Locate Polygon Shapefile.   3. When I choose the shapefile, the 'Select TIDENT Field' dialogue prompts and I choose a field called 'SITE'. The SITE field has the same value for all 53 records ('Forest Stand 101').   4. Now the polygons are in a table under 'Tracks'. There's 2150 Tracks. I choose Tracks-->Upload. The 'Upload To' dialogue prompts and I choose 'Named tracks'   5. GPS beeps and I have a successful upload.   6. I open GPS, go to the 'Tracks' menu and see my new track 'Forest Stand 101'. I open that track and choose the 'Map' button to view my polygons in the map.   7. This is where I notice only one of the 53 polygons is displaying. How to I get all polygons to display? Thanks, MIke


title: Experiencing transformation anomalies when performing a Save As to convert coordinates between NAD83-Z14 and NAD27-Z13

text: Good morning all: I have recently discovered QGIS and have been hoping to find a solution for converting bacthes of xy coordinates between two projection systems for our mapping system. I have known good coordinates for both datums that I am trying to convert between, but even though I believe I'm doing the right steps in QGIS, my coordinates are still out by a small margin, which is where my question begins... Prior to finding QGIS, for single coordinate conversion I have been using the free Java-based Coordinate and Data Transformations tool that is available on the internet from Charles L. Taylor. I've attached an image of the two known coordinates from this tool. **As my rating does not allow image posting, I've provided the text data of my coordinates. If anyone wants to see the images, please reply and I can e-mail them. Original coords in NAD83/WGS84 Zone 14N (EPSG:4326)               Lat/Long: 49.362977,-101-742026     UTMs: x 300914.226, y 5471423.864      Converted coords in NAD27 Zone 13N (EPSG:26713)               Lat/Long: 49.362924,-101.741634     UTMs: 736577.110,5472689.933      So from here, I had imported my list of coordinates (original datum is NAD83/WGS84) into QGIS to get my list of points. After adding the corresponding UTM coordinates using the Export/Add Geometry function, I can see that the UTMs in the attribute table are the same as my original .csv file. After conversion to what I thought was NAD27-Z13 using QGIS, my first coordinate comes back with the following coordinates:               Lat/Long: 49.36297733,-101.74205733     UTMs: 736548.431,5472694.612      When I plot the above coordinate on the map I have with the known good points already on the map, obviously they don't line up. What I'm wondering is if I'm missing a step or if there are options that must be set during conversion. From what I can tell of QGIS, if I can find a solution to this, it will make batch conversion between datums much quicker. Many of the coordinate files that I receive are in .csv format and QGIS seems like the perfect application for what I need, however, I'm hoping that someone that has more experience can point me in the right direction. Thanks in advance for any and all replies, Jeff M


title: ESRI JS API - How to get event object from Draw Toolbar onDrawEnd

text: I am using the `Draw Toolbar` in the Esri Javascript API v3.4 and connecting to the `onDrawEnd` event using `aspect.after(drawingToolbar, "onDrawEnd", drawEndHandleFunction, true);` I am using the `Draw Toolbar` with the `EXTENT` tool to allow my user to select features by drawing a box around them. So far it is working fine. However, I want the user to be able to add and subtract features from the selection using the `CTRL` and `SHIFT` keys while drawing. I was able to do this in Chrome using the `event.ctrlKey` and `event.shiftKey` properties of the `event` global variable. Firefox does not appear to have an `event` global variable like this and so my function doesn't work. Firefox apparently passes an event as a parameter in the function, but that is not available because I used `dojo/aspect`. Is there a better way to handle this? Otherwise is there a way to get a map mouse event that triggers the `onDrawEnd` event in the `Draw Toolbar`?


title: How to create desire lines in QGIS?

text: How can I show the flow coming from an Origin-Destination matrix as desire lines? I need a result like the one in the picture below. ![desire lines](http://i.stack.imgur.com/tTp9y.jpg) I need to scale them proportionally to its value (coming from a linked MDB) and I like that the lines are a bit curved (but I can use straight lines too).


title: PgAdmin cannot load postgis for a database

text: Postgis works fine on my other postgresql databases, but I can't load postgis and postgis_topology extensions on a new database. I get following error message:               ERROR: could not load library (path to PostgreSQL): unknown error 126      Off course I could work in a different database with postgis loaded, but I don't like the idea that my new databases might not support postgis. How to solve this problem? I have PostgreSQL 9.2, PostGIS 2.0.1 and PgAdmin III 1.16. EDIT: My system is Windows XP SP 2. And the statement I used: > CREATE EXTENSION postgis SCHEMA topology VERSION "2.0.1"; I have created schema "topology" manually, but it makes the same error for


title: QSpatiaLite: Cannot create table

text: I am running QGIS 1.8 (SpatiaLite 3.0.1) and QSpatiaLite 6.0.1. I have a spatial table `EventPrecise` (with geometry column `p` in EPSG:4326). I want to join this table with another, non-spatial table `Event` and produce a new spatial table out of it with EPSG:21781, while at the same time filtering on a non-spatial attribute `t`. This is my query:               SELECT e.id, e.oid, e.type, e.subtype, e.t, ST_Transform(ep.p, 21781) AS p     FROM event e LEFT OUTER JOIN eventprecise ep ON e.id = ep.eid     WHERE datetime(e.t) > datetime('2013-02-05 18:20:00') AND datetime(e.t) < datetime('2013-02-19 08:31:00');      When running this query in QSpatiaLite with options "Create Spatial Table & Load in QGIS", and geometry column = "p", I get the error:               '%s' doesn't correspond to a geometry field, try with another field name      Creating a View works though.. is this a bug? **EDIT** : Turns out that it works when doing an `INNER JOIN`, so `p` is never null - still, is this normal behaviour?


title: Adding a class for null value

text: I'm making a graduated style map and I would like to add a class that would represent null values. I can add a class for zero (0) value ... meaning some of the areas reported zero report, but some areas don't have reports (i.e. null values). How can I add a class for null values? Thank you in advance. Herdie Hizon


title: How to request a limited no of features in Overpass api?

text: I am using Overpass api to query Building data from OpenStreetMap. the query string is like this               (way[building](bbox);node(w););out body;      This works really fine (the bounding box is specified by Openlayers). Now i want to improve it, such that only 10 buildings are returned by the query, to speed up the process. For this i used the query               (way[building](bbox);node(w););out 10;      but doing this returns only 10 nodes like here What i want is 10 buildings.


title: How to cluster features based on their proximity?

text: I have around 500 features (Forests) that I want to cluster based on their proximity, and then work with those clusters. I only have the ID, and shape area of those features. How can I cluster them?


title: QuantumGIS 1.8: how to define bounding box within Add WFS Layer dialog

text: I use QGIS 1.8 under WIN XP in Standalone Installer Version. I need to limit the extent of the data to be downloaded via WFS because of the large amount of data in the requested layer. In older/different versions of QGIS there used to be a check box within the Add WFS layer dialog to limit the WFS download to the actual view. In my version of QGIS it is missing. What is the best way to set a bounding box for WFS download or how can I get above mentioned check box?


title: How to generate jVectorMap for United Kingdom (UK)?

text: I have shapefile for UK , i need to convert this to the jVectorMap Here is my script               python ^        converter.py ^        ./shapefile/map.shp ^        ./output/jquery-uk.js ^        --width 400 ^        --where "ISO = 'GBR'" ^        --language en ^        --country_name_index ? ^        --country_code_index ? ^        --minimal_area 40000 ^        --buffer_distance -0.5 ^        --simplify_tolerance 10000 ^        --longitude0 ? ^        --name UK      how to find the values(?) country_name_index, country_code_index and longitude0? I have referred the following pages, http://stackoverflow.com/questions/11068645/how-to-generate-a-new-map-for- jvectormap-jquery-plugin http://jvectormap.com/documentation/gis-converter/


title: how to findout semi attched or detached polygon in Qgis?

text: ![enter image description here](http://i.stack.imgur.com/ermJF.jpg)i m quite new to GIS,i've got polygon shapefiles and i want to find out the way that polygon are attached,semi attched or detached.i have area and perimeter of polygons,but i want to know length and width seperatelly of polygon.how to findout these two parameters?and i also want to findout the direction of that polygon facing towards street. thank you


title: popup in unrequired field/layer

text:
I am new in webGIS. I am using WMS layer. I used ftl file in the geoserver directory and WMSGetFeatureInfo for popup required information. Every thing is ok but the popup activates even in unrequired features/layer. I just want to popup while clicking specific layer.               var layersToBeQueried=[kathmandu,bhaktapur,lalitpur];           var popup;      identify = new OpenLayers.Control.WMSGetFeatureInfo({                      autoActivate: false,                      queryVisible:true,                      maxFeatures: 4,                      eventListeners: {                          "beforegetfeatureinfo": function (event) {                              this.layers = removeLayersOutOfRange(layersToBeQueried);                          },                          getfeatureinfo: function(event) {                                                  if (popup) {                                                     popup.dialog("destroy").remove();                                                 }                                                     if (event.text.length =0) {                                                     alert("No features found");                                                     }                                                     else{                                                     var xx=(event.xy.x)-150;                                             popup = $("
" + event.text + "
").dialog(                                             {closeOnEscape: true,show: { effect: "blind", duration: 80 },                                             position: { my: "left+"+xx+" bottom+"+(event.xy.y), at: "left top", of: "#map" } });                              $('.ui-resizable-handle').css("left","46%");                                         popup.show(); //show the popup upon activating the control                                     }                                        }                                     }                  });              map.addControl(identify);


title: Why my python script of r.watershed has no output？

text: I type those code in pyscripter,               import os     import sys          #set up GRASS environment variables     sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python'))     import grass.script as g     import grass.script.setup as gsetup     gisbase = os.environ['GISBASE']     gisdb = 'C:\Users\Heinz\Documents\grassdata'     location = 'newLocation'     mapset = 'TC'     gsetup.init(gisbase, gisdb, location, mapset)          #run r.watershed module     #set thresh = 5000     g.run_command('r.watershed', elevation = 'hc', threshold = 5000, accumulation = 'acc1', drainge = 'dra1', basin = 'bas1', stream = 'str1', half_basin = 'hbas1', visual = 'vis1')     print g.read_command('g.list', _type = 'rast')      PS. I set the output half.basin as half_basin because the following error will occur as I set it as former one,               Message File Name   Line    Position         SyntaxError                      keyword can't be an expression (module2.py, line 27)    C:\Users\Heinz\Documents\pyscript\module2.py    27      and here's the output, ![enter image description here](http://i.stack.imgur.com/C7GoB.png) there are no new raster file generated, and I don't know where I make mistake. * * * **Update#1** This is my code:               import os     import sys          #set up GRASS environment variables     sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python'))     import grass.script as g     import grass.script.setup as gsetup     gisbase = os.environ['GISBASE']     gisdb = 'C:\Users\Heinz\Documents\grassdata'     location = 'newLocation'     mapset = 'TC'     gsetup.init(gisbase, gisdb, location, mapset)          #run r.watershed module     #set thresh = 5000     g.run_command('r.watershed', elevation = 'hc', threshold = 5000, accumulation = 'accu1', drainge = 'dran1', basin = 'basi1', stream = 'stre1', half.basin = 'hbasi1', visual = 'visu1')          #check result     print g.read_command('g.list', _type = 'rast')      I use **drainage** and **half.basin** as my parameter, and here's the output: ![enter image description here](http://i.stack.imgur.com/o19zD.png) * * * **Update#2** I tried the script below,               import os     import sys          #set up GRASS environment variables     sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python'))     import grass.script as g     import grass.script.setup as gsetup     gisbase = os.environ['GISBASE']     gisdb = 'C:\Users\Heinz\Documents\grassdata'     location = 'newLocation'     mapset = 'water_test_2'     gsetup.init(gisbase, gisdb, location, mapset)          #import raster data     #g.run_command('r.in.gdal', input = 'hc', out = 'hc')          #run r.watershed module     #set thresh = 5000     g.run_command('r.watershed', elevation = 'hc', threshold = 5000, accumulation = 'accu', drainage = 'dran', basin = 'basi', stream = 'stre', half = 'hbas', visual = 'visu')          #check result     print g.read_command('g.list', _type = 'rast')      And the output looks fine,               *** Remote Interpreter Reinitialized  ***     >>>      ----------------------------------------------     raster files available in mapset <water_test_2>:     accu basi dran hbas stre visu          raster files available in mapset <PERMANENT>:     hc          ----------------------------------------------      **My conclusion is, we can use python to call r.watershed in GRASS 6.4.3 from outside, but one of the input name must be 'half'** Thanks everyone that helps me successfully get the result I want.


title: d3.geo.path() to draw a path from GIS coordinates

text: Trying to take GIS data of the zip codes of the Bronx and turn it into a map using d3.js. But I am having trouble rendering. Could you show me proper use of d3.geo.path() ?               [ [ -73.84463693999993, 40.90475939500004 ], [ -73.84443733899991, 40.90423928800004 ], [ -73.84443555299993, 40.904234630000076 ], [ -73.84332154899994, 40.90397722300008 ],...]      These numbesr are taken from NYC zip codes map: https://nycopendata.socrata.com/Social-Services/Zip-Codes-Map/zsjh-u7ve In fact, this question goes for any list of GIS coordinates. How do I turn it into a path? I could not convert the documentation this into code. https://github.com/mbostock/d3/wiki/Geo-Paths


title: ArcGIS 10.0/10.1 - arcpy - automate projection tool with different datum or projection

text: I am getting stuck with a task that is slightly different from the posts I found so far on this same website. Assumption: all layers have a defined coordinate system Problem: I would like to automate a python script (using arcGIS 10.1 but 10.0 is fine as well) that projects a list of vector layers (some of which with different coordinate systems) to a common coordinate system, given by a target vector layer. The main issue I would need help with is how to automate something this: 1) check if the coordinate system of the current vector layer is the same as the target layer 2) if not, check if the datum is the same 3) if it's the same datum, then project the current layer to the target layer without any datum transformation 4) if, instead, they do not have the same datum, pick a pre-defined transformation and include that in the projection function Any help would be much appreciated! thanks! Here is my sample code:               import arcpy     from arcpy import env          arcpy.gp.overwriteOutput = True     env.workspace = 'C:\\Temp'     Target_lyr = 'water_Broward.shp'          try:      desc = arcpy.Describe(Target_lyr)      TargetSR = desc.spatialReference           for inputFC in arcpy.ListFeatureClasses('*'):            if inputFC != Target_lyr:        inputFC_SR = arcpy.Describe(inputFC).spatialReference            if inputFC_SR.Name == TargetSR.Name:        continue       else:        #check if current layer and target layer are the same type        #thus if they are both 'projected' or 'geographic'         if inputFC_SR.type == TargetSR.type:              #HELP STARTING FROM HERE...         #Check if both have same datum..              #if they ARE, then         #outFC = inputFC + '_prj.shp'         #arcpy.Project_management(inputFC, outFC, TargetCS)              #if datum is NOT the same use         #transformation = for example "WGS_1972_To_WGS_1984_1"         #arcpy.Project_management(inputFC, outFC, TargetCS,transformation)             #if current layer and target layer are NOT same kind         else:         #HELP         #repeat as above same steps as above to check the datum           except:      print arcpy.GetMessages()


title: let user add his location on interactive map

text: I would like to know if it is possible to create an interactive map where the user will be allowed to add their own location to the map (I would use OSM as the basemap) and then calculate the distance between that location and some other objects that the map shows? If it is possible I would appreciate if you could explain to me the basic idea how it could be done. Thanks


title: Geoexplorer (Opengeo Suite) cannot upload data

text: i am following the tutorial how to create a simple map. However, I got stuck in the step to upload the data. It gives me an error and I dont know why (see photo). I zipped the shapefile with all the respective other files and uploaded it. Doesnt work. This is why I also added a Spatial Reference. The data is WGS84 --> EPSG:4326. ![enter image description here](http://i.stack.imgur.com/mH2Z7.jpg) I just downloaded and installed Opengeo Suite. So its the latest version. I have Windows 7, 32 bit on my PC.


title: How to save IDocumentInfo attributes to a map document programmatically?

text: We have been successfully creating mxd files based on MapDocument, adding layers, setting spatial information and saving them. Our code has been working, literally, for years and has made the transition from 9.x to 10.x without trouble. The other day we decided that we wanted to incorporate field based links that required us to use the HyperlinkBase attribute of the DocumentInfo class. We have tried the 5 or 6 most obvious ways to do that and have not been able to accomplish it. No matter what we insert into the IDocumentInfo or IDocumentInfo2 interface, it does not get saved with the mxd. Furthermore, if you open an mxd that already has attributes (that you added with ArcMap, for example) twiddle them, and then save the mxd again ... all the attributes are cleared. This is intensely frustrating of course. Our code is of this form ...               IMapDocument mapDoc = null;          try     {         mapDoc = ArcObjects.CartoUtil.OpenMxd(mxdPath, null);              AddMapLayersToMxd( "our hidden, sanitized stuff goes here" );              IDocumentInfo2 infoDoc = (IDocumentInfo2) mapDoc;         infoDoc.HyperlinkBase = BlahBlah.ServerBaseUrl;              mapDoc.Save(true, false);         mapDoc.Close();     }     finally     {         ComUtil.Release(mapDoc);     }      Where AddMapLayersToMxd() does just what it says. This works fine and the mxd has the layers and other things we add to it. Our desired DocumentInfo ... nowhere to be found. If you crack the resulting mxd, you will find only the DocumentInfo added by the system ... paths, dates, RelativePaths, etc. None of the user-defined items.


title: Polygons not appearing when creating shapefile based on criteria using GDAL and Python (area calculated properly)

text: I am looping over the features of a shapefile containing multiple polygons. If certain criteria are met, I want to save the current feature in a new shapefile. I am doing this using GDAL 1.10.0 with Python 2.7.3 The code runs, creates the files I want, calculates the area correctly. In the shapefile that is created, the attribute table contains the propoer fields ('name' and FID). Two things are wrong:   1. No polygons are visible (in ArcMap). This seems to me particularly weird, because the polygons seem to me proper, in the sense that they are closed (and the area is calculated properly).    2. The coordinate system seems off (in Arc Catalog there appears in the bottom -20,9667 0,0000 (are these degrees??)), despite the fact that I am creating a projection file (they are in German national grid 3) Any hints as to what the problems could be? I tried to put the relevant excerpt of the code below:               from osgeo import gdal, gdalnumeric, ogr, osr, gdalconst          ### prepare shapefile into which to save     driver = ogr.GetDriverByName('ESRI Shapefile')     path_matched = r'.../.../path'     datasource = driver.CreateDataSource(path_matched)     lyr_matched = 'matched_%s' % cur_id  # from above     # Remove output shapefile if it already exists     name_shpfile = lyr_matched + '.shp'     if os.path.exists(os.path.join(path_matched, name_shpfile)):         driver.DeleteDataSource(os.path.join(path_matched, name_shpfile))     layer = datasource.CreateLayer(lyr_matched, geom_type=ogr.wkbPolygon)     #layer.ResetReading()     field_name = ogr.FieldDefn("name", ogr.OFTString)     layer.CreateField(field_name)          ### prepare file in which I want to write the areas of matched polygons     path_area = path_matched     file_area = 'matched_area_%s.txt' % (cur_id)     fobj_area = open(os.path.join(path_area, file_area), 'w')          ### original shape file containing all polygons     shp = ogr.Open(shp_all)  # os fobj from above     lyr = shp.GetLayer()          # loop over polygons in original shameful     for FID in featList:         feat = lyr.GetFeature(FID)              # this is from the shapefile          cur_name = feat.GetField(1)              # ... work on conditions ...              if condition = true:             myPoly = ogr.Geometry(type=ogr.wkbPolygon)             cur_poly = feat.GetGeometryRef()             myPoly.AddGeometry(cur_poly)             cur_spat_ref = cur_poly.GetSpatialReference()                  cur_area =  cur_poly.GetArea()             cur_area_string = "%s \t %f \n" % (gw_name_EZG, cur_area)             fobj_area.write(cur_area_string)                  featur_dfn = layer.GetLayerDefn()             feature_abc = ogr.Feature(featur_dfn)             feature_abc.SetGeometry(myPoly)             feature_abc.SetField("name", cur_name)             feature_abc.SetFID(FID)             layer.CreateFeature(feature_abc)             myPoly.Destroy()             feature.Destroy()               # generate projection file     prj_filename = lyr_matched + '.prj'     file = open(os.path.join(path_matched, prj_filename), 'w')     targetSR = cur_spat_ref     targetSR.MorphToESRI()     file.write(targetSR.ExportToWkt())     file.close()               datasource.Destroy()


title: Where to find World Latitude and Longitude Grid (arctic circle, equator, tropics..) in shapefile/ e00?

text: i was wondering if you could teach me how to find World Latitude and Longitude Grid (arctic circle, equator, tropics..) in shapefile/ e00? I saw some of these datas affiliated with universities but unfortunately i am not one of their students, thank you! Anna


title: Design fiberoptic network in QGIS?

text: I'm a GIS newbie trying to design a fiberoptic network in QGIS. What I'd ideally need is to draw lines on top of a map or orthophoto, assign a name/id to each line and a type. Get a list of all the lines and how long they are. I'm grateful for any tips on how to go about doing this and what resources to read.


title: vb.net arcgis add in, log4net works for the exe file, does not work for the esriAddIn

text: I want to use log4net in my vb.net for ArcGIS add-in. After I build the solution, it generates a .exe file and a .esriAddIn file. The problem is when I run the .exe file (without open ArcMap), the log4net works, but when I install the .esriAddIn in ArcMap, and call a form from ArcMap, the log4net doesn't work at all. I check from internet but most of the answers are talking about c#.net, this problem drive me crazy, anybody has the experience of using log4net in vb.net ArcGIS add in?


title: ISet.Next() not moving forward

text: I am trying to move features programmatically using _IFeatureEdit:MoveSet()_ method.   It works fine if I simply move one feature, but if I add more than one feature (from another FC of course), it hangs. It seems to be processing, but never finishes. I have waited for about 45 mins...the same operation when done via ArcMap finishes in a few seconds. I also noticed that in some cases, _pFeatMoveSet.Next() as IFeatureEdit2_ does not move to the next feature, and keeps returning the same pointer, resulting in a infinite loop of sorts. I have also tried the one feature per FC approach as suggested by ESRI in this link, but same behaviour. Is it an API issue? Any clues? PS: I am on ArcGIS 10.0 (sp4) with ArcFM 10.0.3 and FCs participate in a geo net. **Update:** The following code works.                           pFeatMoveSet = GetRelatedFeatures(pPoleFeat);                 pFeatMoveSet.Reset();                      pFeatEdit = pFeatMoveSet.Next() as IFeatureEdit2;                      if (pFeatEdit != null)                 {                     pFeatEdit.MoveSet(pFeatMoveSet, pMoveVector);                 }


title: How do I subdivide and edit polygons preserving topology?

text: I'm using QGIS. I have a layer made up of many adjacent polygons - let's call them "countries". I currently use the Atlas plugin to export each "country" polygon to a .png file. I want to further subdivide each polygon into 3 or more sections (let's call them "states"), and to be able to export these in the same way. However, I want my original polygons ("countries") to remain intact (and hence exportable). Furthermore, if I alter my "country" boundaries, I want the "state" boundaries that are affected to also be automatically updated. Can anyone advise me on a way I could achieve this? Thanks. EDIT: Here's a rough mock-up of my state/country relationships: ![states and countries](http://i.stack.imgur.com/fN7uw.jpg)


title: I have an ArcObjects 10.1 c# toolbar working, but when I add an addin extension to project the Startup function is never hit. why?

text: I have created an Esri Addin toolbar in VS2010 to add layers and search an address file, this works fine. I want to add an extension that will replace text on a template MXD with the current users details. I have all the logic working in a base class and would like to add an extension that listens for the user to switch to layout view and then calls a function in my base class. I have everything working except that when I right click the project and add an extension the extension code never loads. I am probably missing something pretty basic, could someone please point it out to me.               [Guid("ff8f632e-79c3-4168-a591-441bb8f6c2d7")]     [ClassInterface(ClassInterfaceType.None)]     [ProgId("DCC_Toolbar_10.addUserDetailsextension")]     public class addUserDetailsextension : IExtension     {         #region COM Registration Function(s)         [ComRegisterFunction()]         [ComVisible(false)]         static void RegisterFunction(Type registerType)         {             // Required for ArcGIS Component Category Registrar support             ArcGISCategoryRegistration(registerType);                  //             // TODO: Add any COM registration code here             //              }              [ComUnregisterFunction()]         [ComVisible(false)]         static void UnregisterFunction(Type registerType)         {             // Required for ArcGIS Component Category Registrar support             ArcGISCategoryUnregistration(registerType);                  //             // TODO: Add any COM unregistration code here             //         }              #region ArcGIS Component Category Registrar generated code         /// <summary>         /// Required method for ArcGIS Component Category registration -         /// Do not modify the contents of this method with the code editor.         /// </summary>         private static void ArcGISCategoryRegistration(Type registerType)         {             string regKey = string.Format("HKEY_CLASSES_ROOT\\CLSID\\{{{0}}}", registerType.GUID);             MxExtension.Register(regKey);         }         /// <summary>         /// Required method for ArcGIS Component Category unregistration -         /// Do not modify the contents of this method with the code editor.         /// </summary>         private static void ArcGISCategoryUnregistration(Type registerType)         {             string regKey = string.Format("HKEY_CLASSES_ROOT\\CLSID\\{{{0}}}", registerType.GUID);             MxExtension.Unregister(regKey);         }              #endregion         #endregion         private IApplication m_application;              #region IExtension Members              /// <summary>         /// Name of extension. Do not exceed 31 characters         /// </summary>         public string Name         {             get             {                 //TODO: Modify string to uniquely identify extension                 return "addUserDetailsextension";             }         }              public void Shutdown()         {             //TODO: Clean up resources                  m_application = null;         }              public void Startup(ref object initializationData)         {             m_application = initializationData as IApplication;             if (m_application == null)                 return;                  //Listening to document events             SetUpDocumentEvent(m_application.Document);         }              #endregion               #region Document events         //Event member variable.         private ESRI.ArcGIS.ArcMapUI.IDocumentEvents_Event m_docEvents = null;              //Wiring.         private void SetUpDocumentEvent(ESRI.ArcGIS.Framework.IDocument myDocument)         {             m_docEvents = myDocument as ESRI.ArcGIS.ArcMapUI.IDocumentEvents_Event;             m_docEvents.NewDocument += new ESRI.ArcGIS.ArcMapUI.IDocumentEvents_NewDocumentEventHandler(OnNewDocument);             m_docEvents.OpenDocument += new ESRI.ArcGIS.ArcMapUI.IDocumentEvents_OpenDocumentEventHandler(OnOpenDocument);         }              //Event handler methods.         void OnNewDocument()         {             System.Diagnostics.Debug.WriteLine("New document event (C# Sample)");         }              void OnOpenDocument()         {             System.Diagnostics.Debug.WriteLine("Open document event (C# Sample)");         }         #endregion     }


title: How to calculate distance from point to polygon with a time frame?

text: Using the _Near_ tool, I knew that I can just calculate the distance of each house to the nearest fire. However, I only want to keep fires that happened in the past 7 years for each house. For example, I have fire data from 1950 to 2013, a house was built in 2002. I only want to measure distance to the nearest fire from 1995 to 2002. Any idea on how to do that?


title: Softwar to draw graph from a OSM map

text: This is my first time asking here so forgive me if something isn't appropriate, and sorry if my English isn't very good. Im new in OSM, I have downloaded the data of my map from OSM using the JOSM and i have saved it in a *.xml format. I'm trying to **convert a nodes and a edges (ways) from a OSM map to a graph** ( connected graph for example) ... ... can we do somthing like taht ?? Is there a **softwar** to do it ??? someone will say me, try to use the ' **GraphView** ' plugin, but, whaht i need is a specifique **softwar or another way** to draw a graph frome xml file for a OSM map ... I googled a lot, but either I used the wrong keywords or there are no simple solutions on the internet. I hope somebody here can help me. Thnak you in advance ... BinaryMan


title: Is it possible to implement sticky move tolerance in a ArcGIS JavaScript API application?

text: We are working on a project in ArcGIS JavaScript and is going fine. We want to add sticky move tolerance to our project so it will not be so easy to move features on the map. Is it not possible to add that to our project? Does anyone know anything about that?


title: How do I deal with tiles in the Orfeo Toolbox segmentation?

text: I'm using the Orfeo Toolbox for segementation of large Very High Resolution Satellite images. It performs very well and i'm mostly very happy with it. But I still get some weird/bad results that I assume are related to the partition of the process in tiles. I'm doing this: `#Segmentation variables spatialr = '7' maxiter = '6000' ranger = '2,6' minsize = '8000' tilesize = '1048' simplify = '0.4' # SEGMENTATION   print "Performing image segmentation" app = otbApplication.Registry.CreateApplication("Segmentation") app.SetParameterString("in", imagem_base_com_ndvi) app.SetParameterString("filter.meanshift.spatialr", spatialr) app.SetParameterString("filter.meanshift.maxiter", maxiter) app.SetParameterString("filter.meanshift.ranger", ranger) app.SetParameterString("filter.meanshift.minsize", minsize) app.SetParameterString("mode.vector.inmask", image_mask) app.SetParameterString("mode.vector.stitch", 'True') app.SetParameterString("mode.vector.out", vector_out) app.SetParameterString("mode.vector.simplify", simplify) app.SetParameterString("mode.vector.outmode", 'ovw') app.SetParameterString("mode.vector.tilesize", tilesize) app.SetParameterString("mode.vector.neighbor", 'True') app.ExecuteAndWriteOutput()` Here are some examples of the resulting segmentation: ![enter image description here](http://i.stack.imgur.com/J80qw.png) ![enter image description here](http://i.stack.imgur.com/D3TwZ.jpg) Anyone has ideas to help me avoid these errors? Thanks.


title: How to bring feature selection into Printing Composer?

text: I'd like to make maps of Finland's municipalities. Our National Land Survey provides data I can make into a Shapefile, and when a municipality is selected in QGIS/Identify Features, three different levels of associated administrative boundaries are helpfully highlighted, even the exclaves and enclaves of the selected municipality. My question then is, how can I export this exact map view? When I open a new Print Composer, the selection/color scheme is gone. The exclaves are an important feature I'd like to keep. ![finnish municipalities](http://i.stack.imgur.com/rv69C.png) You can probably see that there are hundreds of those tiny exclaves, whose names aren't easily readable in the GML, so I really wouldn't bother checking up manually which of them belong where, and then color them in Inkscape. I tried exporting with the plugin SimpleSVG, but it just compresses the shapes into uglyness. Compare original and after: ![enter image description here](http://i.stack.imgur.com/MQ1Gs.png)