title: osm2pgrouting connection failed

text: I'm importing data from my OSM file to a postgresql database using osm2pgrouting. I followed everything in from here and it went smoothly, until I try using osm2pgrouting. This is what happens:               root@niceroute:/opt/osm2pgrouting# ./osm2pgrouting -file ncr.osm -conf mapconfig.xml -dbname niceroute -user postgres -host localhost     host=localhost user=postgres dbname=niceroute port=5432     connection failed      I looked in many forums but still I don't have the answer I'm looking for. Please help me. Thanks! UPDATE: My pg_hba.conf file:               # PostgreSQL Client Authentication Configuration File     # ===================================================     #     # Refer to the "Client Authentication" section in the     # PostgreSQL documentation for a complete description     # of this file.  A short synopsis follows.     #     # This file controls: which hosts are allowed to connect, how clients     # are authenticated, which PostgreSQL user names they can use, which     # databases they can access.  Records take one of these forms:     #     # local      DATABASE  USER  METHOD  [OPTION]     # host       DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]     # hostssl    DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]     # hostnossl  DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]     #     # (The uppercase items must be replaced by actual values.)     #     # The first field is the connection type: "local" is a Unix-domain socket,     # "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an     # SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.     #     # DATABASE can be "all", "sameuser", "samerole", a database name, or     # a comma-separated list thereof.     #     # USER can be "all", a user name, a group name prefixed with "+", or     # a comma-separated list thereof.  In both the DATABASE and USER fields     # you can also write a file name prefixed with "@" to include names from     # a separate file.     #     # CIDR-ADDRESS specifies the set of hosts the record matches.     # It is made up of an IP address and a CIDR mask that is an integer     # (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies     # the number of significant bits in the mask.  Alternatively, you can write     # an IP address and netmask in separate columns to specify the set of hosts.     #     # METHOD can be "trust", "reject", "md5", "crypt", "password", "gss", "sspi",     # "krb5", "ident", "pam" or "ldap".  Note that "password" sends passwords     # in clear text; "md5" is preferred since it sends encrypted passwords.     #     # OPTION is the ident map or the name of the PAM service, depending on METHOD.     #     # Database and user names containing spaces, commas, quotes and other special     # characters must be quoted. Quoting one of the keywords "all", "sameuser" or     # "samerole" makes the name lose its special character, and just match a     # database or username with that name.     #     # This file is read on server startup and when the postmaster receives     # a SIGHUP signal.  If you edit the file on a running system, you have     # to SIGHUP the postmaster for the changes to take effect.  You can use     # "pg_ctl reload" to do that.          # Put your actual configuration here     # ----------------------------------     #     # If you want to allow non-local connections, you need to add more     # "host" records. In that case you will also need to make PostgreSQL listen     # on a non-local interface via the listen_addresses configuration parameter,     # or via the -i or -h command line switches.     #                         # DO NOT DISABLE!     # If you change this first entry you will need to make sure that the     # database     # super user can access the database using some other method.     # Noninteractive     # access to all databases is required during automatic maintenance     # (custom daily cronjobs, replication, and similar tasks).     #     # Database administrative login by UNIX sockets          # JA: Set local database connections to "trust" in "pg_hba.conf" to be able to work with PostgreSQL as user "postgres".      #local   all         postgres                          ident sameuser     local   all postgres    trust          # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD          # "local" is for Unix domain socket connections only     # JA: change to solve isssue on osm2pgrouting      #local   all         all                               ident sameuser     local   all         all                               trust     # IPv4 local connections:     host    all         all         127.0.0.1/32          md5     # IPv6 local connections:     host    all         all         ::1/128               md5           I hope this will make things clearer. :D


title: QGIS plugin WORKS under Windows but NOT under Linux. How to get fîle path properly under Linux?

text: I am currently working on a QGIS plugin which depits node to node discreet flows. Let' say adaption of Tobler's Flow Mapper to QGIS. **Plugin currently tested and working under Windows. But not under Linux or MacOS X.** As far as I can figure, this is due to a path problem where user chooses the output shapefile location. Here is what code look likes:               def OutputShp(self):         dlg = FlowMapperDialog()         fd = QtGui.QFileDialog(dlg)         global SaveShpName         global SaveShpDirectory         SaveShpName = fd.getSaveFileName(None, 'Shapefile(*.shp)', 'Type output shapefile name', '*.shp')     ...     ...some code...     ...          SaveDirectory = os.path.realpath(SaveShpName)     flowpyv07.shapefilemaker(FlowType,str(SaveDirectory), str(SaveShpName),str(InputMatrixName),str(InputNodesName),str(combotext))      **When I run it I get the following error:** Traceback (most recent call last): File "/home/user/.qgis//python/plugins/FlowMapper/flowmapper.py", line 1346, in run SaveDirectory = os.path.realpath(SaveShpName) File "/usr/lib/python2.7/posixpath.py", line 358, in realpath if isabs(filename): File "/usr/lib/python2.7/posixpath.py", line 53, in isabs return s.startswith('/') AttributeError: 'QString' object has no attribute 'startswith' Python version: 2.7.3 (default, Aug 1 2012, 05:27:35) [GCC 4.6.3] QGIS version: 1.8.0-Lisboa Lisboa, exported **However, if I enter the "SaveDirectory" path manually in the code such as "/home/user/Documents/" it works like charm. Thus I think I cannot get the path correctly.** Any suggestion is valuable since users regret if it does not work under Linux. If needed, full source code and plugin is avaliable from the QGIS repo: http://plugins.qgis.org/plugins/FlowMapper/


title: Mapnik Style Filter on River/Lakes Shapefile attributes (from Natural Earth Data)

text: As a followup to this question, I downloaded the vector data here:   * http://www.naturalearthdata.com/downloads/10m-physical-vectors/ and I successfully created the rasterized water/land mask I wanted: ![](http://dl.dropbox.com/u/143480/land-water-level-2.png) However, there are too many rivers at this level. ### Question Can I/how do I make use of the scale information in the 10m_rivers_lake_centerlines_scale_ranks.dbf file? ### Details (Part of this dataset) Note I can open the .dbf file in a text editor and see loads of interesting and hopefully useful data:               ...     River              0.300000012     River              Pivd. Buh     8       670670     River              0.349999994     River              Pivd. Buh     8       670670     River              0.200000003     Lake Centerline    Klarlven      8       677677     Lake Centerline    0.250000000     Lake Centerline    Klarlven           ...      (this is a random chunk of binary formatted by removing spaces and adding newlines) Using Nik2Img.py I run the following XML and get the overrun-with-rivers- results:               <?xml version="1.0" encoding="utf-8"?>     <!DOCTYPE Map>     <Map bgcolor="black" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">            <Style name="landstyle">         <Rule>           <LineSymbolizer>             <CssParameter name="stroke">white</CssParameter>             <CssParameter name="stroke-width">0.0</CssParameter>           </LineSymbolizer>                <PolygonSymbolizer>             <CssParameter name="fill">white</CssParameter>             <CssParameter name="gamma">0.65</CssParameter>           </PolygonSymbolizer>         </Rule>       </Style>            <Style name="waterstyle">         <Rule>           <LineSymbolizer>             <CssParameter name="stroke">black</CssParameter>             <CssParameter name="stroke-width">0.0</CssParameter>           </LineSymbolizer>                <PolygonSymbolizer>             <CssParameter name="fill">black</CssParameter>             <CssParameter name="gamma">0.8</CssParameter>           </PolygonSymbolizer>         </Rule>       </Style>            <Style name="riverstyle">         <Rule>               <LineSymbolizer>             <CssParameter name="stroke">black</CssParameter>             <CssParameter name="stroke-width">0.15</CssParameter>           </LineSymbolizer>                <PolygonSymbolizer>             <CssParameter name="fill-opacity">0</CssParameter>             <CssParameter name="fill">black</CssParameter>           </PolygonSymbolizer>         </Rule>       </Style>            <Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">         <StyleName>landstyle</StyleName>         <Datasource>           <Parameter name="type">shape</Parameter>           <Parameter name="file">../10m/10m_land</Parameter>         </Datasource>       </Layer>            <Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">         <StyleName>landstyle</StyleName>         <Datasource>           <Parameter name="type">shape</Parameter>           <Parameter name="file">../10m/10m_minor_islands</Parameter>         </Datasource>       </Layer>               <!--       <Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">         <StyleName>waterstyle</StyleName>         <Datasource>           <Parameter name="type">shape</Parameter>           <Parameter name="file">../10m/10m_lakes</Parameter>         </Datasource>       </Layer>     -->            <Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">         <StyleName>riverstyle</StyleName>         <Datasource>           <Parameter name="type">shape</Parameter>           <Parameter name="file">../10m/10m_rivers_lake_centerlines_scale_ranks</Parameter>         </Datasource>       </Layer>          </Map>      Changing the appropriate riverstyle section to the following eliminates all rivers/lake centerlines instead of filtering anything by type (River vs. Lake Centerline) or scale/rank/thickness:                 <Style name="riverstyle">         <Rule>           <Filter>[River] >= 0</Filter>                <LineSymbolizer>             <CssParameter name="stroke">black</CssParameter>             <CssParameter name="stroke-width">0.15</CssParameter>           </LineSymbolizer>                <PolygonSymbolizer>             <CssParameter name="fill-opacity">0</CssParameter>             <CssParameter name="fill">black</CssParameter>           </PolygonSymbolizer>         </Rule>       </Style>      How do I/can I make some filter(s) for this?                     <Filter>[River] >= 0</Filter>           <Filter>[River] > 0</Filter>      I'm new to Mapnik and Natural Earth Shapefiles. I'm an experienced programmer so I'm willing to write code (Python, C#, etc.) if I need to but I'd like to use the tools available if possible.


title: ArcGIS local server using javascript api still does http gets to services.arcgisonline.com (internet)

text: We have setup a local server hosting the ArcGIS server software (10.1). We installed the ArcGIS JavaScript API on the same local server. Our goal is to supply maps when the client has no internet connection, only a local area connection. When we run the client (i.e. using the JavaScript API from the local server), we can see that all of the java script files are pulled from the local server. However, once our java script code calls new esri.Map, we see that the javascript code starts to pull map data from http://services.arcgisonline.com. I looked at the C:\ArcGIS\JavaScriptAPI33\arcgis_js_v33_api\library\3.3\jsapicompact\init.js code (this is where it resides on our local ArcGIS server) and I see many occurrences of http://services.arcgisonline.com. I am thinking I need to change all of these occurrences to be the local server but this was not a step in the installation instructions. Does anyone have any advice on how we can prevent the javascript from going to the internet for any files (map data, javascript data, css, etc). I understand that the javascript is the controlling code that makes this happen but I thought that esri would have handled that in their javascript logic. ### Edit Thanks for the input. I did follow only the steps given in the readme (I have changed nothing else). As I said, all the java script files come from the local server. Once I call "new esri.Map" in our java script code, I see the following "http gets" to services.arcgisonline.com:                1. services.arcgisonline.com/ArcGIS/rest/info?f=json      2. services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&callback=dojo.io.script.jsonp_dojoIoScript1._jsonpCallback      3. services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer?f=json&callback=dojo.io.script.jsonp_dojoIoScript2._jsonpCallback      Also, you asked me "do we have any basemap or anything else in our map that comes from ArcGIS online?" My answer is no. But clearly (unless there is an ArcGIS bug) something is not working as we want it to because it ends up going to services.arcgisonline.com. Thanks again for the response, we really appreciate the help. As your response is implying, it seems I do not understand the basemap values since I am using hybrid for the local server. Sounds like I need a different value there. Once again, thank you very much for the help. Here is the code snippet:               var l_Options =     {     zoom: 10,     sliderStyle: "small",     basemap: "hybrid",     infoWindow: g_Popup,     nav: true     };          map = new esri.Map("map_canvas", l_Options);     dojo.connect(map, "onLoad",     function()     {         var l_ArcGISTiledMapServiceLayer = null;              switch (g_strMappingEngine)         {         case 'esriLocalServer':             /* ????             l_ArcGISTiledMapServiceLayer =             new esri.layers.ArcGISTiledMapServiceLayer(             l_strMappingDataAddress             );             ???? */             l_ArcGISTiledMapServiceLayer =             new esri.layers.ArcGISDynamicMapServiceLayer(             l_strMappingDataAddress             );             break;         case 'esriInternet':         default:             l_ArcGISTiledMapServiceLayer =             new esri.layers.ArcGISTiledMapServiceLayer(             l_strMappingDataAddress             );             break;         }              map.addLayer(l_ArcGISTiledMapServiceLayer);         ...


title: How to georeference a dxf?

text: I have got myself a dxf which is built with units in the wrong scale. How do I upscale that in QGIS? Note it does open in QGIS, just in the wrong map units and location.


title: How to rescale vector data?

text: I've got some old maps in dxf format. QGIS imports them correctly but with a nonsense scale. It can export the data it gets to shp of course. Does anyone know how to rescale vector data so it can be related to other maps? It doesn't have to be done in QGIS as long as the method is open source and it works on a format QGIS can handle (SHP is best, of course). Note that there seem to be two scales in SHP: the data I hand-imported using WKT shows the correct scale on the mouse, but the map scale indicated is nonsense, and print composer is affected the same way. I'd like to correct both types of problem.


title: Import shp to Postgis using Python and ogr

text: I just export a Postgis Table to shp using this tips but I'm not able to import a shp to Postgis using the same library(ogr). Any idea? Thanks a lot f.


title: Is there a good qml or sld file available for QGIS + Openstreetmap data?

text: I'm looking for a qml file (or equivalent e.g. sld) to allow me to use QGIS to take Openstreetmap data and produce paper maps. I'm re-asking this question (it was asked once or twice over a couple of years by other people) because I'm really surprised not to easily find such a thing already (I looked hard). I have found Anita Graser's styles \- which are good, but only style basic data like roads (and do so simply). I've successfully followed the directions for getting OSM data to work with. I've carried out some basic style editing successfully. I realise I could create my own styles for this purpose - but this seems like a very big job. I want a visually pleasing map taking into account most of the data available on OSM (i.e. not just streets, but tracks, paths, rivers, woods, lakes, buildings and so on). I'd have thought that there would be other people out there already doing the same... It seems odd to have to re-invent the wheel when both OSM and QGIS are open source / open data projects. I feel like maybe I've just missed the obvious repository of OSM qml files which resides out there on the internet somewhere if you know where to look... Thank you for any suggestions. Additional notes in response to query below... Ideally I'm looking for a Mapnik style rendering of the OSM data, but any equivalent properly developed and complete style would be good. At the moment the objective is to use this data to produce paper mapping, but simple use of the mapping as base data on which other geographic data can be displayed also requires a decent rendering. At work I use Ordnance Survey data completely styled to produce a full and very detailed UK map (the point being that I didn't have to design this styling, it came with the data). I realise that other tools exist for paper mapping, but the same issues tend to arise at one stage or another... I'm more or less successful in making the tool work for me in really basic terms, but to get to something visually useful I end up back with me either needing to re-invent a complete rendering style from scratch (beyond my skill), or encountering such a complex set of requirements for database setups or whatever that the process crashes and burns before I get anywhere useful. With a few more years of GIS experience I'll maybe be a database, CartoCSS (or whatever else) wizz... but until then I'm prevented from using the amazing resource that OSM provides by this one barrier.


title: How to connect points to line in Mapinfo?

text: I am using Mapinfo and Mapbasic. I have all the points stored in a DBMS. I have four columns with four points longitude and latitude. Is there any way to connect the points? I am using Mapinfo 10.5 with MySql as database.


title: Panning the map to certain extent javascript API

text: I want to limit map extent to the initial extent of the map and limit user from panning more than certain extent. I tried following but nothing has changed:               map = new Map( "map" , {             basemap: "gray",                 center: [-85.416, 49.000],             zoom : 6,             logo: false,             sliderStyle: "small"         });         var imageParameters = new ImageParameters();             imageParameters.format = "PNG";              dojo.connect(map,"onLoad",function(){             var initExtent = map.extent;                  dojo.create("div",{               className: "esriSimpleSliderHomeButton",               onclick: function(){                 map.setExtent(initExtent);               }             },dojo.query(".esriSimpleSliderIncrementButton")[0], "after");           });              dojo.connect(map, "onExtentChange", function (){         var initExtent = map.extent;         var extent = map.extent.getCenter();         if(initExtent.contains(extent)){}         else{map.setExtent(initExtent)}         });


title: Finding the closest Geometry in PostGIS

text: I've been looking over the PostGIS "API" of functions, and I notice that most of them take two elements to compare. For example, the ST_Distance function takes two geometry/geography elements to find the distance. There is no function to do something like: "Given a geometry G, give me the closest geometry GClosest in Table T where G.id <> GClosest.id" I realize I could write a PL/PgSQL function to iterate over the table and call ST_Distance on each element, but I'm hoping there's a better, more efficient, solution.


title: Populating a Dojo widget with country names based on an ESRI hosted layer

text: Wow, Javascript is not that easy - can someone help me make a simple breakthrough just to understand some basic concepts. Does anyone know how to populate a filteringSelect Dojo dijit with the names of countries from: http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/6 I have the following code to make a featureLayer:               countryLayer = new esri.layers.FeatureLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/6",{                               mode:esri.layers.FeatureLayer.MODE_SELECTION,                               setMaxAllowableOffset:maxOffset(map,1),                               outFields:["NAME"]                             });      I think the next step is to somehow loop through all the country names and populate the dijit - but I'm struggling with this. I have my HTML for the dijit something like this, but I'm not even sure if thats right:               <div dojotype="dijit.layout.ContentPane" title="Test" >                 <input id="filteringSelect" jsid="filteringSelect" data-dojo-type="dijit.form.FilteringSelect" data-dojo-props="                                                     placeHolder:'Country',                                                     store:countryStore,                                                     searchAttr:'NAME',                                                     name:'NAME'">             </div>


title: How to make smaller ArcMap PDF for use in InDesign?

text: I frequently build reports that incorporate ArcMap maps. The maps are all exported in PDF format. I am finding that there are so many line segments in the map that importing them at times is almost impossible. They also bulk up the report file, ballooning its size. What can the technician do to make the map file smaller since multiple layers are unnecessary in a print document?


title: How to style beautiful road maps with QGIS?

text: I am trying to design a beautiful map using Qgis. As I'm a software developer not a designer, I was hoping that this will be easy, but it isn't! There is a similar question here Qgis tutorials and resources but I would like to focus from "applications using Qgis" to "designing a map using Qgis". I was looking for some tools, style database or tutorials to guide me, but had no luck so far. New Advanced labeling in QGIS helped me a lot and OSM seems to look great: 1, 2. However I need to use my own shapefiles. Also there is Quantumnik. It could be a great help, however it prints map on another tab and I need it to be on the same with my Qgis project. So basically I am looking for a way to design a beautiful looking map using basic Qgis tools, any resources on that? Thanks


title: Unique Identifier for a POI

text: I'm collecting POIs data from several sources and plotting them on map, i'm having difficulties merging the POIs because some of them are redundant between the data sources i'm using. How can i assign a unique identifier for each POI in a ways that the implementation logic can figure out the redundancy, e.g. I have a starbucks in two of the sources each for the same branch, and there is slight difference in the long/lat value due to accuracy, how can i automatically identify th redundancy. Street names are not enough as they are not unique and might get updated from different sources, i was thinking of using the lat/long in addition to the first three letters of the POI, something like STA-31,444-30,122 but again the long/lat are not always the same between the different sources because of the accuracy, they might be off for a few meters. Thanks Yehia


title: Can arcserver be used to populate jquery autocomplete?

text: I would like to set up autocomplete on a text box using jquery autocomplete with data from an arcserver service. I'm wondering if this is possible and if so how i would implement it. I'm using the esri javascript api v3.3 and arcserver 10.1.


title: How to deal with versioning in OpenStreetMap?

text: The topic of managing geospatial data in a more general sense has come up before here. The topic of versioning was mentioned there as well, but not really dealt with. Traditional geospatial data collection and maintenance only need to deal with versioning internally, as the database is only updated from within the organization. This is not the case in crowdsourced geodatabases like OpenStreetMap. There, anyone can come along and add, modify or delete objects. In OpenStreetMap this is dealt with in a rudimentary way: each object has an integer version number, and only the object with the highest version is exposed in the live database. The database uses optimistic locking, so users must resolve all conflicts that occur when uploading contributions manually. This all works reasonably well as long as human contributions through the editors (JOSM, Potlatch) are the only mode of contribution - but they aren't. Increasingly, imports of open public sector data are conducted. These make for more complex versioning issues. Consider the following scenario:   1. A building object is being imported from an open public sector dataset   2. The building receives some modifications by human contributors (attributes, geometry, or both)   3. A new version of the public sector data becomes available and is imported. Currently, in step 3. the human contributions would be lost, unless each building that received community modifications is manually merged with the new import. How can OpenStreetMap deal with this situation? Do we need to look at distributed version control in software development? How can methods of DVC be adapted to deal with distributed spatial data maintenance?


title: QGIS Python Intro Text

text: After reading replies regarding starting a mapping business, I think I'd better read a Python book. Any intro-level Python books to recommend? Mila


title: How do I develop my GIS programming skills?

text: I would like to develop my GIS programming skills, where do I start? People say learn C++ or Python but where can I learn this in a geographic context? Tutorials or anything would be very helpful, as would any information on languages/programmes to use.


title: How do I access versioned spatial data in SDE with SQL queries?

text: We're running SDE and have several featuresets with versioning turned on. When I query those layers via ArcGIS Engine or ArcGIS Server, all expected features are returned. We have numerous non-GIS applications that use SQL queries to access information from the spatial data. However, we don't get all the features that I'm expecting to be returned. How do I access the features that have been added/deleted (and are, therefore, "hidden" from a straight SQL query)?


title: Looking for QGIS 2.4 C++ Hello World example?

text: In the project I'm working on (C/C++/Qt application), we are trying to integrate QGIS (latest version desirable, 2.4 for the moment). But there is very little information in the web on how to use QGIS C++ API. To start I wanted to write a simple code example (read shapefile and visualize it in a window). I found a code example for QGIS 1.8, but it does not work with QGIS 2.4 as the API has changed since. Then I tried to edit it in order to make it work with QGIS 2.4, but it did not succeed. Here is the original code:               #include <QtCore/QString>     #include <QtGui/QApplication>          #include <qgsapplication.h>     #include <qgsproviderregistry.h>     #include <qgssinglesymbolrenderer.h>     #include <qgsmaplayerregistry.h>     #include <qgsvectorlayer.h>     #include <qgsmapcanvas.h>          #include <iostream>          int main(int argc, char** argv)     {       // Creation of the Qt GIS application       QgsApplication app(argc, argv, true);            // Hard coded paths       QString myPluginsDir        = "/usr/lib64/qgis";       QString myLayerPath         = "./HelloWorld/GUI/data/helloQGIS.shp";       QString myLayerBaseName     = "helloQGIS";       QString myProviderName      = "ogr";            // Instantiate Provider Registry       QgsProviderRegistry::instance(myPluginsDir);            // Create a maplayer instance       QgsVectorLayer* mypLayer = new QgsVectorLayer(myLayerPath, myLayerBaseName, myProviderName);       QgsSingleSymbolRenderer* mypRenderer = new QgsSingleSymbolRenderer(mypLayer->geometryType());       QList <QgsMapCanvasLayer> myLayerSet;       mypLayer->setRenderer(mypRenderer);       if (mypLayer->isValid())       {         qDebug("Layer is valid");       }       else       {         qDebug("Layer is NOT valid");       }            // Add the Vector Layer to the Layer Registry       QList<QgsMapLayer*> theMapLayers;       theMapLayers.append(mypLayer);       QgsMapLayerRegistry::instance()->addMapLayers(theMapLayers, TRUE);            // Add the Layer to the Layer Set       myLayerSet.append(QgsMapCanvasLayer(mypLayer, TRUE));            // Create the Map Canvas       QgsMapCanvas * mypMapCanvas = new QgsMapCanvas(0, 0);       mypMapCanvas->setExtent(mypLayer->extent());       mypMapCanvas->enableAntiAliasing(true);       mypMapCanvas->setCanvasColor(QColor(255, 255, 255));       mypMapCanvas->freeze(false);       // Set the Map Canvas Layer Set       mypMapCanvas->setLayerSet(myLayerSet);       mypMapCanvas->setVisible(true);       mypMapCanvas->refresh();       mypMapCanvas->show();            // Start the Application Event Loop       return app.exec();     }      I've tried many different ways to modify this code in order to make it work with QGIS 2.4, but no success. The only source of information I've used is the official doc API. I said to myself that maybe someone has already did it and/or have any other code example of using QGIS 2.4. As GIS is a new domain for me, I have some difficulties in understanding how the API should work.


title: ArcGIS geoprocessing Metadata Translator error

text: We're using the ArcGIS Metadata Translator tool within ArcObjects.net using geoprocessing, which for the most part is working fine, but it's throwing us this error occasionally: > The process cannot access the file 'C:\Documents and Settings\\\Local > Settings\Temp\translator_source.xml' because it is being used by another > process. Failed to execute (ESRITranslator). The only reference I could find to this file is in a list of resolved issues for a Arc 9.3.1 update, which reads: > NIM036270 - Every other time you run the USGS MP Metadata Translator with > anything except XML files, the tool will fail with the error "The process > cannot access the file 'C:\Documents and Settings\aleta\Local > Settings\Temp\translator_source.xml' because it is being used by another > process." We are running ArcGIS 10 and our process is just running on feature classes and tables and exporting metadata to XML. The only thing I can think of that might be causing this is that it's likely that our server may be running more than one metadata update process at the same time, so multiple processes may be using this geoprocessing tool at the same time, but should that cause this issue? I assume ArcGIS handles multiple requests for a tool appropriately, but I could be wrong. Does anyone know? Has anyone come across a similar issue before? Does anyone know if this temporary location used by the tool can be changed?


title: Summarizing at Modelbuilder

text: I like to summarize of the ID-Field with the ModelBulider because in the end I have to build a tool. The problem I have is that the field “GRIDCODE” should get in the new table comma separate. So that it is possible to see the combinations, for example the ID-Field 244 has the GRIDCODE 7, 10, 10. The Field area should get added. ![enter image description here](http://i.stack.imgur.com/IG4ik.png) Background: The Field ID-Field is from a fishnet lying over a shape with a classification “GRIDCODE” and got intersect. Now I need just a table with the ID form the fishnetcell and the combinations of the classification-code and the area. Does anyone have an idea how to do this with the Modelbuilder? Thanks a lot. Here is the last part of the Model so far.![enter image description here](http://i.stack.imgur.com/GJYVS.png) The final table should look like this; in the field area should be the sum area from the combination. ![enter image description here](http://i.stack.imgur.com/1ZMxc.png)


title: ArcGIS Server: "MapServer is not supported with the current license."

text: I am at a complete loss... I have a Server 10.0 license on my machine but the following code fails:               if (ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server) == false)         throw new Exception("License Failed");          MapServerClass mapServer = new MapServerClass();     mapServer.Connect(pathToMap); // Fails!       `ComException was unhandled` `MapServer is not supported with the current license.`


title: Intersection of triangle and polygon

text: I have a triangle and an arbitrary polygon lying on the same plane in 3D space. I need to find the fastest way to determine if these two intersect, one is inside the other, or completely separated. At first stage, it's not important to find the intersection points or tell the difference between the states when one is inside the other and when they intersect. The important thing is having the minimum number of calculations. Can someone guide me in the right direction?


title: Give Properties to a shapefile to be used by another person

text: I have bedrock geoology data. I want to classify the data so it appears with the same propeerties as it does on the suppliers website. Is there a way i can attribute a property to a layer (in this instance colour) so that when i add the layer to another project it has the same properties. In essence can someone send me a copied style? Working in qgis 1.8.0


title: How to define a css class for a delete button in Openlayers?

text: Define a css class for delete button in openlayers?                       .olControlDelete {          background-image: url("help.png");           background-repeat:no-repeat;          background-attachment:fixed;          background-position:center;          z-index:10;           }      Or                 div.olControlDelete {       top: 100px;       left: 50px;       position: absolute;            }            .olControlDelete div {       background-image: url("edit_sprite.png");       background-repeat: no-repeat;       width:  22px;       height: 22px;       border: thin solid black;       margin-top: 10px;     }      Don,t seem to work, Please help. Last question for openlayers. please Below Code from Vadin:                                deleteShape = new OpenLayers.Control.SelectFeature(     polygonLayer,      {         displayClass: "olControlDelete",         title: deleteFeature,         eventListeners: {             featurehighlighted: function overlay_delete(event) {                 var feature = event.feature;                 if( confirm(strConfirmMessage) ) { // prompt                     polygonLayer.removeFeatures( [ feature ] );                     // TODO other clean up - remove popups or send some ajax to server.  Up to you....                      }             }         }        }             );                      map.addControl(deleteShape);


title: Clarification of Map Scale

text: I need some clarification. I have a map the is set to the scale of 1:6000. In _Settings>Project Properties_ , under the General tab I have the Layer Units set to feet. Therfore I assume that means the scale is 1 foot equals 6000 feet. Does this seem rights? Or is it 1 inch equals 6000 inches? I am ultimately attempting to convert this to traditional engineering scale of 1 inch equal __ feet.


title: How to keep bound popups from opening on [click]?

text: I am working on a map application which creates and binds popups on markers and polyline objects. The popups are created and bound lazily, i.e. ad-hoc when a user clicks on a specific object. The reason for this is simply the performance, as we use handlebar templates to create quite extensive popups and doing this for hundreds of markers/polylines takes its toll on loading times... What I am actually trying to do is to open all popups (on markers, lines, ...) on [right click]. I have proper right-click event listener, and if a user right-clicks on an object for the first time, the popup is created and bound to said object _and then opened_. But _from then on_ , i.e. when a popup is already bound on a marker/line even a simple left-click will open the bound popup. This is somwhat confusing for users (as they can then suddenly use left-click OR right-click to show popups, but only on certain, i.e. already right-clicked-on elements...). Furthermore this interferes with a selection mechanism I implemented to allow users to select markers by left-clicking on them. Does anyone know how to **disable opening bound popups on clicks**?


title: Kernel Density Analysis using R and ArcGis

text: I am doing some Kernel Density Estimations, and like everyone elese I face difficulties with setting the bandwidth to create georeferenced rasters. ArcGis (10.1) does it just fine, but it has no built-in option to set a convenient bandwidth for your. However, using R's package spatstat, I have can better control the bandwidth, but I don't know how to export the result of the `density()` function to something that I could use with ArcMap.               > library(spatstat)     > data(redwood)     > denRedwood <- density(redwood, bw="SJ")     > plot(denRedwood)     > summary(denRedwood)     real-valued pixel image     128 x 128 pixel array (ny, nx)     enclosing rectangle: [0, 1] x [-1, 0] units     dimensions of each pixel: 0.00781 x 0.00781 units      Image is defined on the full rectangular grid     Frame area =  1 square units      Pixel values :             range = [0.937301342339499,123.501426710366]             integral = 64.6432674200093             mean = 64.6432674200093      As you can see, the output is a "pixel image". I tried with my own dataset, and the coordinates are conserved. So I am wondering how I can export this output into a raster I can use in a GIS. If I use the `tiff()` function to export as a .tiff file, I get the whole plot (with legend, title, etc.), not just the "real" data. Thank you for your help!


title: Calculating path sinuosity in postgis

text: Sinuosity is a fairly straightforward concept. How can this be calculated in postgis given a series of linestrings that represent the path?


title: How do I get geodatabase automatically upated from edits in access database?

text: I have an Access database that I have joined to a file geodatabase. There is a numeric field in the database that the symbology graduated colors is based on, ie: 0-39=red, 40-60 is orange, etc. I am wondering what is the best way to update/edit the data within the access database (because these numeric values will change over time) in order to have it automatically update the attribute table/symbology colors in the file geodatabase. I just have Arcview 10 and Microsoft access.


title: How to export map in draft mode?

text: ArcMap 10.2. I want to export map in draft mode. Without layers. Only few rectangles displaying main part of map, legend, scale bars, north arrows, margins and guide lines. E.g. something like this: ![enter image description here](http://i.stack.imgur.com/BllsD.jpg) Is it possible? I've tried to export by Export Map but I got normal map.


title: Mixing externalGraphic and default point renderer on VectorLayer

text: Is it possible to mix externalgraphics and the default point renderer for vector layers? I haven't been able to find an example that does this.


title: Converting Vertices of Polylines and Polygons to Points and Maintain Attributes

text: I'm pretty sure someone has done this before, but I'm having no luck. I'm using ArcGIS Standard version 10.2.1 and I want to convert all the vertices of a polyline or polygon to points. Essentially, I want to emulate the **Feature Vertices to Points tool** (which I can't use due to my ArcGIS license). I'm writing a python tool, so any answers should reflect a python/arcpy solution. Therefore, nothing like ET Geowizards, etc. I want to maintain the fields of the original data and in addition, add X and Y fields as well as a point identifier. So, if the input fields look like this:               LABEL |  TYPE  |  CODE     abc   |  type1 |  3     def   |  type2 |  4      Then the resulting output points might look like this:               LABEL |  TYPE  |  CODE  |  LONG  |  LAT  | ID     abc   |  type1 |  3     |  153   | -27.5 | 1     abc   |  type1 |  3     |  150   | -27.5 | 2     def   |  type2 |  4     |  151   | -30   | 1     def   |  type2 |  4     |  151   | -29.5 | 2     def   |  type2 |  4     |  151   | -30.7 | 3     def   |  type2 |  4     |  151   | -30   | 4      I've looked at **this solution** , which is fantastic and quick, but it doesn't maintain the fields of the original data. I've also looked at modifying **this blog post** which seems to be the most promising, but again, I can't figure out how to keep the original fields. My code looks something like this:               fields = arcpy.ListFields(input_fc)     arcpy.CreateFeatureclass_management(destination_workspace, point_file_name, "POINT")     for field in fields:         fieldnames.append(field.name)         if field.type in ('TEXT', 'FLOAT', 'DOUBLE', 'SHORT', 'LONG', 'DATE', 'BLOB', 'RASTER', 'GUID'):             arcpy.AddField_management(point_file_name, field.name, field.type, field.precision, field.scale, field.length, field.aliasName, field.isNullable)          fieldnames.append("SHAPE@JSON")     cursor = arcpy.da.InsertCursor(output_fc, fieldnames)          with arcpy.da.SearchCursor(input_fc, fieldnames) as c:             for row in c:                 geom = json.loads(row[-1])                 for path in geom['paths']:                     for pt in path:                         cursor.insertRow(row[0:-1],pt)      It's failing with the insert cursor. The error message I'm getting is: > Traceback (most recent call last):   >  File "H:\Python\CreatePoints_v0_2.py", line 60, in > cursor.insertRow(row[0:-1],pt) RuntimeError: Cannot find field 'LABEL' The input feature class has a field called "LABEL". However, it's not adding that label to the created feature class. Note, I want to convert _vertices_ , not centroids. I'm probably going about this the wrong way, so if anyone has ideas on how to either modify my code, or point me in another direction, I'd be appreciative.


title: OpenLayers and TInyOWS WFS won't load - 'InvalidParameterValue'

text: I've got a tinyows on localhost that works fine (both through browser GetFeature and QGIS). But my OpenLayers code fails. I've checked here: Display a WFS layer with OpenLayers and here : How to add a simple WFS layer from GeoServer to OpenLayers map? and other similar questions to no avail. Can anyone help? Here is the code:                   wfs = new OpenLayers.Layer.Vector("Editable Features", {         strategies : [new OpenLayers.Strategy.Fixed(), saveStrategy],         projection: new OpenLayers.Projection("EPSG:4326"),         protocol: new OpenLayers.Protocol.WFS({             version: "1.1.0",             srsName: "EPSG:4326",             url: "http://localhost/cgi-bin/tinyows",             featurePrefix: "tows",             featureNS :  "http://www.tinyows.org/",             featureType: "trad",             geometryName: "wkb_geometry",             schema: "http://127.0.0.1/cgi-bin/tinyows?service=WFS&version=1.1.0&request=DescribeFeatureType&Typename=tows:trad"         })     });           map.addLayers([gphy, wfs]);      Here is the xml according to Firebug:               <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">      Here is the post response according to firebug:               <?xml version='1.0' encoding='UTF-8'?>     <ows:ExceptionReport       xmlns='http://www.opengis.net/ows'       xmlns:ows='http://www.opengis.net/ows'       xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'       xsi:schemaLocation='http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'       version='1.1.0' language='en'>     <ows:Exception exceptionCode='InvalidParameterValue' locator='request'>     <ows:ExceptionText>XML request isn't valid</ows:ExceptionText>     </ows:Exception>     </ows:ExceptionReport>      Here is the tinyows config file:               <tinyows online_resource="http://127.0.0.1/cgi-bin/tinyows"          schema_dir="/usr/local/tinyows/schema/">     <pg host="127.0.0.1" user="postgres" password="****" dbname="****" port="5432"/>     <metadata name="TinyOWS Server"            title="TinyOWS Server - Demo Service" />     <layer retrievable="1"         writable="1"         ns_prefix="tows"         ns_uri="http://www.tinyows.org/"         name="trad"         title="Träd" />     </tinyows>      Can anyone help? Thanks in advance


title: ArcPAD 10 backup shp files?

text: Is there an automatic backup script for ArcPAD 10 when you are out in the field?


title: Algorithms for optimally locating points

text: I am trying to compare locations of where several thousand facilities have been actually built to where they would be optimally located to minimize travel times of the population (represented by census block or tract centroids). I'm having trouble finding much of anything on how to optimally locate points. I've got some idea of how to go about choosing these locations, but the sheer number of points to be placed in space means that any non-cleverly optimized algorithm is going to take a long time, possibly years. Thus my question: Are there **standard algorithms** for choosing **where to locate** a **fixed number of points**? I will ultimately take whatever algorithm I find as a starting point and adapt it to incorporate more information than just the population counts. Thus the preferred answer would include a detailed description of the algorithm, code, or be written in an open-source language, so that I can replicate and extend it. However, if ArcGIS has a convenient function for this optimization, I'd be happy to start with that.


title: How to change QGIS back to English?

text: When I booted up my windows machine this morning my menus had switch from English to what I think may be Russian and I can't read the menu options. I have tried unistalling, rebooting and then reinstalling but this has not helped. Can someone please advise me how to change them back. Thank you


title: Is it possible to publish a ArcGIS .mxd file in OpenLayers?

text: It is possible to publish a .mxd in OpenLayers? I am using ArcGIS 10.0.


title: What method should I use to accurately georeference a geographic map?

text: I'm writing an application that allows the user to sample points and perform georeferencing In order to test it I have a large scanned map (16k x 13k) pixels covering the area 31 north to 34 north and 34 east to 36 east with a geographic grid I sampled the 4 corners of the map + 2 points on the diagonal and applied an affine transformation :               [x']   [A B C]   [x]     [y'] = [D E F] * [y]     [1]    [0 0 1]   [1]      using the 6 points, and least squares I managed to find [A B C D E F], but applying it gave me an inaccurate transformation... The Longitude is very accurate all along the picture (> 1 arc second), but the latitude deviates sometimes up to 15 arc seconds (~ 400-500 meters) I assume that no matter how many points I will sample the affine transformation won't cut it... What is the appropriate transformation here? **EDIT: Trying to project the geographic coordinates** I projected the sampled points to UTM first, and then calculated the affine transform (again 6 points) The results are pretty much the same - Accurate near the control points but, drops significantly when I get farther **EDIT: Using 2nd Polynomial Transformation** I was able to get better results by using a 2nd order polynomial transform instead of an affine one, but I still get deviation of 4-5 arc seconds The transformation I used -               [x']  =  [A B C D E F] * [x*x]     [y']     [G H I K L M]   [y*y]                              [x*y]                              [ x ]                              [ y ]                              [ 1 ]      Where A-M are the transformation parameters {x',y'} are the geographic coordinates and {x,y} are the screen pixel coordinates. since there are 12 parameters it requires 6 points to be sampled... I suppose I could try to do a 3rd order transform (20 parameters - 10 control points needed) or even higher but I wonder if there isn't a better way?


title: GeoJSON layer with local projection in Leaflet

text: I try to add a GeoJSON layer to my map in Lambert II projection. The GeoJSON contains few points. It don't work if the GeoJSON have more than 1 feature, but for 1 feature, it work ! I don't know why (it's quite curious) but I have to put more than 1 feature in my map... My map with GeoJSON with 2 features (it don't work) My map with GeoJSON with 1 feature (it work !) Thanks for some help !


title: Conflicting measurement units with buffer ftools

text: I am new to qgis and I would like to create a buffer around point features. My goal is to create a quarter mile buffer (402.336m) around each point feature, using Geoprocessing Tools -> Buffer(s), setting the buffer distance and exporting. The process creates what appears to be a massive polygon. However when I use '.05' as the distance buffers appear around each point. I assumed this happened because the measurement units are not correct. I verified the project projection (NAD83 OH/South). Then I checked the Measure Tool via Options -> Map Tools. Te ellipsoid for distance calculations set at WGS 84 and the Preferred Measurement Units is set to 'meters' I have set up 'on the fly' projections How do I solve the mystery of this buffer problem? Setup: qgis 1.7, Ubuntu 11.04


title: dijkstra_sp runs without error in postgres query terminal, but triggers an error in Java

text: I am running this simple query **select id,gid from dijkstra_sp('roads',22,33)** This works perfectly fine and returns results in postgres query terminal. However running exactly the same query in java triggers the error: **** Could anyone tell me how to solve this issue? yours sincerely.


title: System requirement specification for Big Data Postgesql, PostGIS, and GeoServer based service

text: I want to start a GIS portal for around 3000-5000 visitors per day. MY database will be of an approximate size of 10 Terrabytes. The maps and layers are moderately complex, satellite-map overlay is supported. I am basically trying to project maps on the satellite images so people using my system can figure out the route they want to take. I will be using Geoserver, POST GIS, POSTGRE SQL for this purpose. Kindly, let me know what might be the hardware and/or software requirements to start such a project. Also kindly let me know the number and types of computing hardware that I may require for a smooth operation. Thanks in advance.


title: gdal_translate made wrong tranforms

text: I have a geotiff file in UTM and units in meters. I used gdal_translate with this command : `gdal_translate -of GTiff -a_nodata 0 -a_srs EPSG:4326 old.tif new.tif` gdalinfo on new.tif shows that the file units are in degrees while the data (corners,origin ...etc) are given in meters which is wrong. Is it possible to reverse/correct this action (on the new file) so I can get the file with either UTM in meters or go on and make the file in "real" degrees because I deleted the original file? Thanks.


title: How to calculate XY coordinates in Decimal Degrees from projected dataset in model or script?

text: Is it possible to calculate points XY coordinates in Decimal Degrees in model or script when a feature class is in projected coordinate system? It's easy when a FC is in geographic coordinate system:     * using Add XY Coordinates tool or      * using Python expression eg. `!shape.extent.XMax!`   I've found that area and length properties of geometry field can be modified with geometry unit conversion keyword. For linear units of measue one can use @DECIMALDEGREES.   Unfortunatelly, `!shape.extent.XMax@decimaldegrees!` doesn't work as XMax is not a length. In Calculate Geometry function (accessed from right-click) there's a possibility to choose Decimal Degrees output type even for projected feature class.   This should be easy in ArcGIS Python, isn't it?   * * * EDIT   Here's a code snippet based on iRfAn's solution:               import arcpy, os     projectedFC = r"C:\tmp\test.gdb\points01_Projected"     prjFile = os.path.join(arcpy.GetInstallInfo()["InstallDir"],                 r"Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj")     spatialRef = arcpy.SpatialReference(prjFile)          updCursor = arcpy.UpdateCursor(projectedFC,"", spatialRef)     for row in updCursor:         pnt = row.Shape.getPart(0)         row.X = pnt.X         row.Y = pnt.Y         updCursor.updateRow(row)          del updCursor, row


title: Network Analysis-shortest combined distance to one point

text: First let me confess I have little experience doing network analysis so I assume I know nothing (in essence approach me like my girlfriend does). Anyway, I am attempting to solve what I believe to be a routing problem. Please see the attached image. I have several points on a network and I would like to find the shortest combined distance from all green dots to the green square. I have attempted to do this using network analysis in ArcGIS 10.2 advanced (I also have QGIS installed and some experience with that) and while I get a solution it does not appear to take into account already established routes while computing. the problem seems easy and I am sure its user error but since I am the user I cannot answer myself. Thanks for the help! ![enter image description here](http://i.stack.imgur.com/sWt96.png)


title: Are there any document icons for the qgis mimetype?

text: In a default Ubuntu install (QGIS 1.8.0) no document icon is associated with the mimetype 'application/x-qgis-project'. As a consequence every saved QGIS document is interpreted by the OS as being a text or xml document and the icon displayed gives no indication it has anything to do with QGIS. I've googled around and can't find anything; I could make an icon set myself but wanted to see if I'm just missing something before doing it..


title: Where can I find latitude and longitude data for the borders of U.S. Congressional districts?

text: I'm interested in finding the most up-to-date latitude and longitude data for U.S. Congressional district borders. I'd prefer a human readable format (e.g. XML), but I'm writing my own code so I can work with just about anything if the format is well-defined. I only need the state, district, and the latitude and longitude points that define the borders for each district. I need the borders for all U.S. Congressional districts. Is this a dataset that I can download from somewhere all in one place? Or do I need to track down the data for each state individually? (Or even worse, each district?)


title: Java client for WFS-T?

text: I have a geoserver with a postgis database on one server and an Java application on a different server. Now I need to connect these two servers so that the Java application can manage (create, alter and remove features) on the geo server. I thought about implementing REST web services for the communication between the servers. But then I thought that WFS-T could be sufficient. Now the question. Are there any Java client implementations for WFS-T available?


title: Problem with Orfeo Toolbox integration in QGIS

text: I'm getting this error: OTB execution console output '"C:\OSGeo4W\bin\otbcli_MeanShiftSegmentation"' is not recognized as an internal or external command, operable program or batch file.


title: OpenLayers FramedCloud has transparent background

text: I am creating a FrameCloud popup instance and adding to the map using the following code:                 var popup = new OpenLayers.Popup.FramedCloud("popup",                     point,                     null,                     '<div> test context </div>',                        null, true);                      map.addPopup(popup);      Popup is displayed at the correct location but with a transparent background probably because I am using a local copy of OpenLayers.js instead of the public version. For local deployment, where do I put the resources found under the img folder required by OpenLayers?


title: MS SQL Spatial as Central Datastore?

text: I've been working on opening up our spatial data from a proprietry system to one that can be read by more products (MapGuide, ESRI, gvSIG, Map3D etc....) I've decided on using SQL Spatial as we have a server in house available to us and we can link to other systems easily enough through it. Before I go all out in actually using it as our central datastore is there anything I should be aware of that could greatly decrease performance?


title: Using Openlayers Protocol.HTTP GeoJSON format

text: just took Openlayers GeoJSON Example and inserted the features to file json1.json instead using a variable, then tried to preform HTTP call:                var epsg4326 = new OpenLayers.Projection('EPSG:4326'),             epsg900913 = new OpenLayers.Projection('EPSG:4326');             function init() {                 var map = new OpenLayers.Map({                     div: "map",                     projection: epsg900913,                     displayProjection: epsg4326, //Is used for displaying coordinates in appropriate CRS by MousePosition control                     layers: [                         new OpenLayers.Layer.WMS(                             "WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",                             { layers: "basic" }                         )                         ,new OpenLayers.Layer.Vector("GeoJSON", {                             strategies: [new OpenLayers.Strategy.Fixed()],                             protocol: new OpenLayers.Protocol.HTTP({                                 //readWithPOST: true,                                 url: "json1.json",                                 format: new OpenLayers.Format.GeoJSON()                             })                         })                          ],                     center: new OpenLayers.LonLat(-112.169, 36.099)                  });             }      The json1.json looks identical to OL example:                { "type": "FeatureCollection",         "features": [           { "type": "Feature",             "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},             "properties": {"prop0": "value0"}             },           { "type": "Feature",             "geometry": {               "type": "LineString",               "coordinates": [                 [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]                 ]               },             "properties": {               "prop0": "value0",               "prop1": 0.0               }             },           { "type": "Feature",              "geometry": {                "type": "Polygon",                "coordinates": [                  [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],                    [100.0, 1.0], [100.0, 0.0] ]                  ]              },              "properties": {                "prop0": "value0",                "prop1": {"this": "that"}                }              }            ]          }        Found that the server not finds it: ![debugger](http://i.stack.imgur.com/VhsI1.png) But its there!


title: Measuring data load and redraw times in ArcMap?

text: Rephrasing of the question slightly to address some issues. Is there are standard way of measuring load times for data, specifically sybolised data, within ArcMap? In particular, we're comparing load times of different data formats (shapefile, SDE, file and personal geodatabases) across the network for the same (large) sets of data. We're also aiming to test speeds between ArcGIS versions. At this point I've started hacking together a simple VB script to do some of the timing without having to sit there with a stopwatch as @matt-wilkie suggested. The script (thus far) can be found at http://textsnip.com/8912ac/vb. The script was written in ArcGIS 9.3 but works in 9.2 as well. To use the script, copy the VB script to your mxd, and add two buttons, called "LoadDatasets" and "SymboliseDatasets". The LoadDatasets button allows the load of one or more feature classes or layers, and times the load. SymboliseDatasets checks the number of layers in the ActiveView, and if there are none, calls the load dialog (but doesn't time it). Once layers are added then the SymboliseDatasets button will symbolise all layers into 10 quantile groups based on their FIDs. I have fixed the issue of timing the rendering by adding a DoEvents after the ActiveView.Refresh In the meantime if anyone wants to pick this script up and modify it to make it more useful I'm happy to set this question to community wiki.


title: How can I export a sketchup Model to ArcGIS's Multipatch?

text: I have a very large model made in Google Sketchup v 7.1. I would like to export this to a Multipatch featureclass, so that I can view it in ArcScene, with other 3D data. I have tried several things, but none of them have worked. I have tried the following things: 1]Used the Sketchup Plugin for ArcGIS; For this I have saved the model as a skecthup 6 model, and on a machine which has Sketchup Pro 6 & ArcGIS 9.2, used the export as ESRI Multipatch. This works for small and simple modles, but fails on my Large Model. 2]Exported the Model as KMZ, and then tried to use the QuickImport using the InterOp Extension of ArcGIS. 3]Exported the Sketchup 6 Model as Google Earth 4 KMZ. Then I tried to use the QuickImport using the InterOp Extension of ArcGIS. This does import the KMZ to Multipatch, but it does not fall where I expect it to fall. Its size is very large as well (when compared to actual or expected size) Has anyone else managed to do something like this?


title: How can I include a map viewer into my web server from my ArcGIS Server?

text: I have a web server, what contains my website. I would like to put a map viewer into my site, what would connected to my ArcGIS Server. How can I do this in the easiest way? The ArcGIS Server and my web server are different servers.


title: Python GDAL/OGR: WGS84 & meters units

text: I'm dealing with shapefiles projected in:               GEOGCS["GCS_WGS_1984",         DATUM["WGS_1984",             SPHEROID["WGS_84",6378137,298.257223563]],         PRIMEM["Greenwich",0],         UNIT["Degree",0.017453292519943295]]      And I am experiencing technical difficulties to calculate a distance in (kilo)meters between two features. I can only get this distance in degrees. Here's my code:               def PointsOnLines(self, pointsLayer, linesLayer):         """ Returns the number of points situated on lines+(line.width) """         # pointsLayer: shapefile's layer with point geometries         # linesLaye: shapefile's layer with line geometries              nbFound = 0         for i in range(pointsLayer.GetFeatureCount()):             pointFeat = pointsLayer.GetNextFeature()             pointGeo = pointFeat.GetGeometryRef()                  for j in range(linesLayer.GetFeatureCount()):                 lineFeat = linesLayer.GetNextFeature()                 try:                     lineGeo = lineFeat.GetGeometryRef()                     lineWidth = lineFeat.GetFieldAsDouble("WD1") # Gets the width of the line segment (meters)                 except:                     pass                 d = lineGeo.Distance(pointGeo) # Computes the shortest distance between the 2 geometries (degrees)                 # if d<lineWidth then point is on the line, nbFound+=1      Should I reproject the shapefile and calculate afterwards? Ans if so, which projection is best suitable (=>meters units)?   Note that I can't use this post because I don't even know the 2 points I'm currently working with.


title: Matching ArcGIS and QGIS coordinate systems

text: I have the following info for a feature class in ArcGIS that is supposed to be in WGS 1984/UTM 16N **_projected_** coordinate system: > Projection: Transverse_Mercator > > False_Easting: 500000.000000 > > False_Northing: 0.000000 > > Central_Meridian: -87.000000 > > Scale_Factor: 0.999600 > > Latitude_Of_Origin: 0.000000 > > Linear Unit: Meter (1.000000) > > Geographic Coordinate System: GCS_WGS_1984 > > Angular Unit: Degree (0.017453292519943299) > > Prime Meridian: Greenwich (0.000000000000000000) > > Datum: D_WGS_1984 > > Spheroid: WGS_1984 > > Semimajor Axis: 6378137.000000000000000000 > > Semiminor Axis: 6356752.314245179300000000 > > Inverse Flattening: 298.257223563000030000 I also have a vector shapefile imported into QGIS that is also supposed to be projected WGS 1984/UTM 16N, with the EPSG 32616 and ID 3100. Since I don't know what the EPSG and ID means, I am not sure if the shapefile in QGIS and the feature class in ArcGIS are actually in the same coordinate system. Can anyone help with this? And if they are _not_ in the same system, what should I do to correct that?


title: Spatial Analyst Cell Statistics seems to give the wrong answer in ArcGIS 10.0

text: I have a script that calculates standard deviation for a list of grids using the Cell Statistics function in Spatial Analyst for ArcGIS 10.0 The syntax is this:               stdevGrid = arcpy.sa.CellStatistics(filteredGrids, "STD", "DATA")      However, the output of this command is obvious wrong. Some values are higher than the maximum values for any of the input grids. In Arctoolbox, I did the same calculation over the same grids and got an output that seemed much more reasonable. However, even using the python window in Arcmap produced the same wacky grid from the original command. In desperation, I tried to build the command using modelbuilder and check out the resultant code. The output used this command               arcpy.gp.CellStatistics_sa(filteredGrids,<pathForOutputGrid>,"STD","DATA")      I ran this in python and it got the same (correct) result as Arctoolbox, not the incorrect values that the original command did. The only thing I can figure is that there is an environment setting I'm missing, but as the new line in the exact same place in the original script produced a different output, I'm wondering if this is a bug in ArcGIS 10.0. Has anyone else run into something like this? Does anyone have any idea why this happens?


title: When using feature-linked annotation in ArcGIS 10, can I create multiple annotations from one feature?

text: I have a road that I want to create multiple annotations for. Is it possible to attach more than one annotation to the same feature?


title: Generating a dynamic graph on USA map

text: I want to reproduce the dynamic US map showing the obesity percentage across the years 1984-2009 as shown in the CDC website http://www.cdc.gov/obesity/data/trends.html I am looking for tools and code to get started on this. EDIT 1 (Apr 22 2011) I was able to gather the data (1994-2009) and I have uploaded it to Google docs in csv format. Using `R` and `googleVis` I was able to generate a map for a single year (say 1994) using `gvisGeoMap`. But I want to create a map which will motion through years 1994 to 2009. I am not sure how to add the _motion_ ability to `gvisGeoMap`. Do I need to look at some other tool?


title: Can you use CartoDB.js with maps hosted on the CartoDB website

text: is there anyway to use the cartoDB.js library with maps hosted on the CartoDB website? From the documentation it looks like the library can only be used for maps you make on your own website -- is that correct? Thanks Pete


title: Grouping lines together to form one line after a distance threshold is met: ArcGIS 10

text: I have lines on a map showing the most direct way from point data to the coastline (polygon). I would like to group the lines if they are close to each other by a distance that I can set. Where the clusters are, I'd like them all to group together when they get close enough to each other to become one line. What would be the best way to do this? Many thanks!! ![enter image description here](http://i.stack.imgur.com/oOl7U.png)


title: QGIS how to add string field

text: I have a few point shapefiles. I want to merge them, but first give each point a certain type according to shapefile. How do I add a String field, all with the same word? (changing the field type from null to "water") thanks. ![enter image description here](http://i.stack.imgur.com/FyAOc.jpg)


title: Which georeferencing method for Himalayan Awifs-Awifs registration

text: I would like to know which georeferencing method would provide the best result for Himalayan region in-case of Awifs(Raw) to Awifs(master) georeferencing.. I have already tried polynomial transformation but it shows shift and doesn't match accurately.. I tried rubber sheeting though and it give me comparatively good results with good matching but I am not sure it may cause distortion too at places and also cut the image from the outer GCP points.. kindly guide me if there is any other method where image is not cut and still I get good matching with the master image..I use ERDAS imagine for above operation


title: Sql to view points of intersection with line not working

text: I have two tables one called test lines and other points called testepoint with some geometries drawn in QGIS to test my sql. Are as in the image below: ![QGIS](http://i.stack.imgur.com/zlxgp.png) I want to select the points that inteceptam a row, the result should return me the id of these three points: ![Selected](http://i.stack.imgur.com/qWI7f.png) This is my sql that returns no records:                   Select testepoint."id"          FROM         testepoint     inner JOIN         teste         ON ST_Intersects(teste.geom, testepoint.geom)      Can anyone help me on what I might be doing wrong? I drew the shapes in QGIS using Google Streets layer based on EPSG: 3857 and carried in PostGIS * * * I ran the sql:                   Select testepoint."id"     FROM     testepoint     inner JOIN     teste     ON ST_DWithin(teste.geom, testepoint.geom, 1)     WHERE     teste."id"= 1       The result: ![result](http://i.stack.imgur.com/zlxgp.png) But I need this order: 1,2,4 The order of alignment. ![order](http://i.stack.imgur.com/qWI7f.png)


title: How to resolve a 'Received NULL pointer' ArgumentOutOfRangeException for OSGeo.OGR.Geometry.TransformTo?

text: I am attempting to project a geometry using the GDAL c# bindings and I'm getting a ArgumentOutOfRangeException ('Received NULL pointer') exception on the Transform methods of Geometry. I'm also getting the same exception when attempting to project a point using a `OSGeo.OSR.CoordinateTransformation` (e.g. http://gis.stackexchange.com/a/61574/31). I am using the DLL in FWTools 2.4.7\csharp. Has anyone seen this before and know what the fix is? Here's a test that creates the exception for me:                       [TestMethod()]             public void TransformPolygonReturnGeoJSON()             {                             string jsonLambert = string.Empty;                 string projectedJson = string.Empty;                      string wkt = "POLYGON ((1831321.945291 412165.262452,1831324.478486 412152.596478,1831312.445811 412108.265569,1831298.513239 412108.265569,1831287.747162 412108.265569,1831275.714486 412102.565881,1831271.914694 412100.032686,1831266.215006 412098.766089,1831253.549032 412188.694503,1831321.945291 412165.262452))";                 int srid = 102009;                      int outputSRID = 26918;                      string sridWKT  = string.Format("EPSG:{0}", srid);                      string outsridWKT = string.Format("EPSG:{0}", outputSRID);                      var g = Geometry.CreateFromWkt(wkt);                      var sr = new OSGeo.OSR.SpatialReference(sridWKT);                      g.AssignSpatialReference(sr);                      jsonLambert = g.ExportToJson();                      Assert.IsFalse(string.IsNullOrEmpty(jsonLambert));                      var outSR = new OSGeo.OSR.SpatialReference(outsridWKT);                      try                 {                     var result = g.TransformTo(outSR); // <--- Exception occurs here                          Trace.WriteLine(string.Format("result={0}", result));                          projectedJson = g.ExportToJson();                          Assert.IsFalse(string.IsNullOrEmpty(projectedJson));                 }                 catch (Exception ex)                 {                     Trace.WriteLine(ex.Message);                     Trace.WriteLine(ex.StackTrace);                          throw;                 }             }


title: Getting values from attribute table and inserting another table

text: I have line feature class of a river network and “FromTo” table. Lines are dissolved so they are not segmented from junctions. I need to write a Python script in ArcGIS to do following:   1. Begin from the first row in Hydro feature class attribute table and get its ID   2. Insert this ID into “From” field in “FromTo” table   3. Get ID(s) of line(s) which intersect(s) first line (e.g. second line intersect first line)   4. Inset ID into “To” field in FromTo table **For second loop**   1. Get ID of second row in Hydro feature class attribute table   2. Insert this ID into “From” field in “FromTo” table   3. Get IDs of lines which intersect second line (e.g. first and third lines intersect second line)   4. Inset IDs into “To” field in FromTo table   5. So on… Perhaps, you show a different way in order to get the same result by Python ![enter image description here](http://i.stack.imgur.com/XBgkF.png)


title: MapServer - Show Polygon Layer with non-transparent border and transparent background

text: In MapServer, I want to show a polygon WMS layer (watersheds). I want to show the boundaries (outlines) of the polygons as a non-transparent thick line. And I want to show the inside (fill) of the polygons with 50% transparency. Is this possible? I tried to set OPACITY 50, but this changes the transparency of both the outline and the fill. The second option I tried was to set TYPE line, but this shows the fill as complete transparent and the GetFeatureInfo no longer works by clicking inside the polygon. What I would like to get, is: The outlines of my polygons have 0% transparency. The fill of my polygons has 50% transparency.


title: Is it possible to add house numbers using the Mapbox Street Vector Tiles source in Tilemill2?

text: Title says it all. Does anyony know if the house number is included in Mapbox’ vector tiles, and if so how to access it for styling? Thanks for any advice!


title: How to split Relationship Class privileges between different users while maintaining referential integrity?

text: I am using a relationship class to maintain a one-to-many relationship between material sites (under Engineering's purview) and the material sites' sample status and content (under Materials' purview). I have privileged the tables such that Engineering personnel (user A) can edit the origin table and Materials personnel (user B) can edit the destination table. This works well, until user B needs to create a new record in the related table. In order to create a new record in the related table, user B must have editing privileges to the origin table. This is the only way to access the Attributes dialog from the Editor toolbar, which appears to be the only method which programmatically ensures the GlobalID and ParentGUID fields match. Otherwise, you have to rely on the user to copy/paste. Is there a workaround here? A way to split relationship class privileges between two different users while still maintaing referential integrity? Thank you! ArcGIS Desktop 10 (ArcInfo) SP3 ArcSDE 10


title: Convert x, y position in georeferenced image (with world file) to longitude, latitude?

text: What steps do I need to do in order to calculate longitude and latitude for a specific pixel in a georeferenced image? For example this image http://www.shadedreliefarchive.com/medit_Mideast_africa_copy.html contains information, .tfw file:               1627.32174969982000      0.00000000000000      0.00000000000000      -1627.32174969982000      -4957506.34276705000000      6096922.76188281000000       and .prj file:               PROJCS["Lambert Azimuthal Equal-Area",            GEOGCS["GCS_WGS_1984",                   DATUM["D_WGS_1984", SPHEROID["WGS_1984", 6378137, 298.257223563]],                   PRIMEM["Greenwich", 0],                   UNIT["Degree", 0.017453292519943295]],            PROJECTION["Lambert_Azimuthal_Equal_Area"],            PARAMETER["false_easting", 0],            PARAMETER["false_northing", 0],            PARAMETER["latitude_of_origin", 0],            PARAMETER["central_meridian", 20],            PARAMETER["xy_plane_rotation", 0],            UNIT["Meter", 1]]      I've created this snippet of javascript to compute new x1 and y1 values for specific pixels in the image:               var A = 1627.32174969982000,         D = 0.00000000000000,         B = 0.00000000000000,         E = -1627.32174969982000,         C = -4957506.34276705000000,         F = 6096922.76188281000000;          function x1(x, y) { return A*x + B*y + C; }          function y1(x, y) { return D*x + E*y + F; }      What more do I have to do to get longitude and latitude? For example C, F represents the top-left corner of the image, right? Then how do I translate C, F to get longitude and latitude? I want do do it using javascript only, have looked at http://proj4js.org/ but don't really understand what to do with the values I get...


title: Clip layers in a dataframe with a polygon in python?

text: I'm trying to clip layers in a dataframe with a polygon using python and I've done this python script but it's giving this error:`"ERROR 000840: The value is not a Feature Layer"` Thanks for any help.               import arcpy, os     from arcpy import env     from arcpy import mapping     mxd = mapping.MapDocument("Current")     df = mxd.activeDataFrame     polygon=r'C:\temp\extentPoly.shp'          for layer in mapping.ListLayers(mxd,"", df):         FL=arcpy.MakeFeatureLayer_management(layer,"_outlayer")         clipped_fc = env.scratchFolder + os.sep + "_clipped.shp"         arcpy.Clip_analysis(FL, polygon,clipped_fc)          del layer     del mxd     del df


title: How to forbid zoom map under scroll page?

text: I wrote code at ArcGis JavaScript. There is a map on web page at full display with a fixed height (400px) When i scroll-down page and cursor misses in zone map then browser works for zooming map, not scroll page further. How to forbid?


title: Capturing Feature Dragging and Dropping, ArcEngine 10 .net 4

text: I am currently trying to implement something that captures the feature that i clicked on and dragging. Basically i want to be able to "OnMouseUp" figure out the item I was dragging, so I can do some calculations on that feature. Does anyone have an idea on how to do that? Thanks and Regards, Kevin


title: QGIS custom action and button toggle

text: I've added a custom toolbar with some buttons to my QGIS 2 plugin. I'm wondering how to get the button toggled (pushed in-looking effect) using Python. I've gotten this to work for existing buttons like so:               iface.actionAddFeature().trigger()      I can't seem to figure out how to apply it to my own actions and buttons.


title: Map does not appear after following ESRI example of flex api

text: I followed the example from ArcGIS resource center website: https://developers.arcgis.com/flex/ to create a map, unfortunately after I run the flex builder application, the map does not appear. The following is my code and what happens after running the application. What's wrong with my project? I have tried to use IE, Chrome and Firefox to open the url, but the result is the same:               <?xml version="1.0" encoding="utf-8"?>     <s:Application     xmlns:fx="http://ns.adobe.com/mxml/2009"     xmlns:s="library://ns.adobe.com/flex/spark"     xmlns:mx="library://ns.adobe.com/flex/halo"     xmlns:esri="http://www.esri.com/2008/ags">          <esri:Map level="3" wrapAround180="true">         <esri:center>             <esri:WebMercatorMapPoint lon="0" lat="0"/>         </esri:center>         <esri:ArcGISTiledMapServiceLayer             url="http://server.arcgisonline.com/ArcGIS/rest/services/             World_Street_Map/MapServer"/>         <esri:ArcGISDynamicMapServiceLayer             url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/             Demographics/ESRI_Population_World/MapServer"              alpha=".70"/>      </esri:Map>          </s:Application>      ![enter image description here](http://i.stack.imgur.com/EyYxE.jpg)


title: ArcObjects - Select fields to Layout

text: I´ve a project wich I need to do the following task: there is several points with coordinates (X,Y) in the correspondent table. I select, manually, a few points and i want to, trought Arcobjects, send only the 2 fields Coordinates of the selected objects to the layout. Anyone know something or already did code for this? Thank you Alex


title: Issue with loading zoom slider and info template styling in ArcGIS Javascript API

text: I have been working on a web app that displays points based on a date query, and an infotemplate pops up when you click on a point. When the user clicks on a point, it retrieves the HTML contents of the infotemplate, but it appears as plain text on the map (no dijit window with an 'x' button in the corner). I assumed that I was loading the tundra CSS theme incorrectly, but that is not the case as I have removed the CSS reference from the HTML of other web maps yet they still retain the infotemplate box. I'm assuming it's an option in the map object but I have had no luck. ![The zoom bar and infotemplate are not styled correctly](http://i.stack.imgur.com/YATvM.png) As you can see, the zoom bar and infotemplate are not being styled correctly. Does anyone know how to resolve this, or know where these styles are derived?


title: Comparing TIGERLine 2006 (and prior) With New Shapefile Format

text: I have created a geo database using MySQL and the TIGERLine data files available from the US Census. This is actually an MSSQL database I created that I've transfered to MySQL. Everything works beautifully for geocoding and reverse geocoding. The only problem is that data is now almost 6 years old and I am looking for greater accuracy. I've looked at the 2010 TIGERLine files and noticed that they changed the format back in 2007 to a new Shapefile format. I've had some success using Ogr2Ogr in getting those shapefiles populated into a database but now I'm stuck. I was able to build my street segments table (center line data) easily with the 2006 data and the format made sense from a processing point of view but the new shapefile format doesn't seem as straightforward. Is there any documentation (and I've scoured the US Census Bureau) that relates the two formats? A side by side comparison of fields would be too much to ask, I'm sure, but that is exactly the kind of data that I'm looking for. Thanks in advance.


title: QGIS QgsOgrProvider library

text: I asked a question here: http://stackoverflow.com/questions/14790463/qgis- copy-layer-in-c-plugin and I was suggested to find the library which provides `QgsOgrProvider::createEmptyLayer()` function. Can anyone help me with this? Thanks.


title: Openlayers remove previously drawn polygon on starting to draw next one

text: Objective: At any point of time there SHOULD only be zero/one polygon(s) on a vector layer with a polygon control. I need the previous polygon to be removed as soon as user starts drawing the first vertex of the next polygon. Code:               var map = new OpenLayers.Map(mapDiv, options);     var tempLayer = new OpenLayers.Layer.Vector("Temp Layer");     map.addLayer(tempLayer);          var polyControl = new OpenLayers.Control.DrawFeature(tempLayer,OpenLayers.Handler.Polygon);          polyControl.events.register('featureadded', ' ', removeExistingPolygon);          function removeExistingPolygon(feature) //Assuming event listener gets a feature object     //Written mainly with featureadded in mind     {       if(feature.layer.features.length > 1){         feature.layer.removeFeatures(feature.layer.features[0]);       }     }          tempLayer.events.register(<event_name>, ' ', <prev_polygon_removal_function>);      Question: What event_name and function should I use to attain the objective? I have tried 'sketchstarted' on tempLayer but it gets triggered even before user starts to draw a polygon. 'vertexmodified' doesn't seem to work at all. Objective is partially satisfied when using featureadded with polyControl but in that case the first polygon remains visible till the second one is completed. Any pointers on how to proceed are most appreciated. Thanks.


title: How can I disable snapping on one feature layer, among many feature layers on the map?

text: I'm using ArcGIS Flex API 3.1. I'd like to know if it is possible to choose the layer(s) on which I can snap the graphic I'm moving. Currently, when I activate snapping, my graphics are snapped on all feature layers of the map. I don't want this behaviour. I want to be able to snap only on one feature class. Resgards


title: Unable to zoom map tile

text: I try to host osm map locally on my server. I follow this tutorial Rendering OSM on ubuntu And manage to installed mapserver and mapcache. The problem is, when I try to zoom the map it can only zoom once and other will just repeatedly create the same tile, sorry i couldnt post the image, since im new here What I understand is when I enter : localhost/mapcache/demo/tms then apache server will look for xml file (mapcache-osm.xml) and the xml file will find call the mapfile and then it will generate the tile. Is it true? Please correct me. I still couldnt figure out how to make the zoom right, did I miss something on installation? I also test the TMS on opelayer site as recommended by the tutorial site. But the result is the same. I thought if the mapfile and database(postgis) connect successfully then it will generate the tile and I will be able to see all the tile at any zoom level. Or is there something that I need more to create the zoom features? Beacuse I found that if I enter localhost/mapcache/demo/tms then the xml file generate openlayers automatically. Am I wrong? Please correct me with the concept. Any help I really appreciate. Thankyou very much


title: How do I use the Natural Earth SQLite DB with QGIS?

text: I just downloaded the Natural Earth data in SQLite format from http://www.naturalearthdata.com/downloads/. I had assumed that this would be a SpatiaLite database, but it appears not to be! QGIS is failing to recognize it as a spatial database. OGR supposedly supports reading geometries even when stored in a plain SQLite database, but maybe QGIS doesn't use OGR for SpatiaLite? The SQLite database does have geometry_columns and spatial_ref_sys tables. Is there some way to convert it to a full SpatiaLite database?


title: How to Update Multiple Fields of one Layer Using WFS Service

text: Trying to update two fields of a shapefile using a WFS update service published from GeoServer 2.4.3 with OpenLayers 2.13.1. I have a JavaScript with all the OpenLayers fun and a HTML document with all the interface fun. Essentially the user clicks on an object and updates a form and then saves it. Assuming its possible? It's probably really simple but I can't crack it. The fields do not update and in the demo requests the service times out. Here is the code I am trying;               function saveHandler() {     newDim = document.getElementById("dimension").value;     var num = parseFloat(newDim);     var newDimRound = num.toFixed(3);     newMaterial = document.getElementById("MaterialDD").value;          var saveDetails = OpenLayers.Request.POST({             url: '<url of wfs service>',             username: '<username>',             password: '<password>',             data: '<wfs:Transaction service="WFS" version="1.1.0"\n' +                             'xmlns:topp="http://www.openplans.org/topp"\n' +                             'xmlns:ogc="http://www.opengis.net/ogc"\n' +                             'xmlns:wfs="http://www.opengis.net/wfs">\n' +                             '<wfs:Update typeName="Store:Layer">\n' +                             '<wfs:Property>\n' +                             '<wfs:Name>Field 1</wfs:Name>\n' +                             '<wfs:Value>' + newDimRound + '</wfs:Value>\n' +                             '<wfs:Name>Field 2</wfs:Name>\n' +                             '<wfs:Value>' + newMaterial + '</wfs:Value>\n' +                             '</wfs:Property>\n' +                             '<ogc:PropertyIsEqualTo>\n' +                             '<ogc:PropertyName>Spatial_ID</ogc:PropertyName>\n' +                             '<ogc:Literal>' + getSpatial_ID + '</ogc:Literal>\n' +                             '</ogc:PropertyIsEqualTo>\n' +                             '</wfs:Update>\n' +                             '</wfs:Transaction>\n',             callback: handler         }); // end of Post              function handler(updateSQL) {             alert("Details Saved!")         } // end handler         };      I have tried putting the fields in their own property sections and different orders to no avail.


title: How to fix incorrect displaying of icons in model from ModelBuilder of ArcGIS 10.1?

text: Something weird happened with icons in my model. They are displaying incorrectly as you can see here ![Here](http://i.stack.imgur.com/9j7Xt.jpg). In other models all is just fine.


title: Adding GIS feature into an existing postgis table using django 1.6

text: i am using Django 1.6 on my web map. the problem i got is that i cannot import shapefile with features about 200. . the console has given me this traceback. .               Saved: 162-05-0001-005-31     Saved: 162-05-0001-005-32     Saved: 162-05-0001-005-42     Saved: 162-05-0001-005-41     Saved: 162-05-0001-005-40     Saved: 162-05-0001-005-39     Saved: 162-05-0001-005-38     Saved: 162-05-0001-005-37     Saved: 162-05-0001-005-36     Saved: 162-05-0001-005-25     Saved: 162-05-0001-005-24     Saved: 162-05-0001-005-23     Saved: 162-05-0001-005-27     Saved: 162-05-0001-005-35     Saved: 162-05-0001-005-22     Saved: 162-05-0001-005-26     Saved: 162-05-0001-005-21     Saved: 162-05-0001-005-28     Saved: 162-05-0001-005-33     Traceback (most recent call last):       File "<console>", line 1, in <module>         File "C:\CLAIMS_WEB\Apps\load_parcel.py", line 15, in run         lm.save(strict=True, verbose=verbose)       File "C:\Python27\lib\site-packages\django\contrib\gis\utils\layermapping.py",      line 596, in save         _save()       File "C:\Python27\lib\site-packages\django\db\transaction.py", line 339, in inner         return func(*args, **kwargs)       File "C:\Python27\lib\site-packages\django\contrib\gis\utils\layermapping.py",      line 512, in _save         kwargs = self.feature_kwargs(feat)       File "C:\Python27\lib\site-packages\django\contrib\gis\utils\layermapping.py",      line 292, in feature_kwargs         raise LayerMapError('Could not retrieve geometry from feature.')     LayerMapError: Could not retrieve geometry from feature.     >>>     >>>      But when I import shapefile with less feature, the import is successful. actually i divided my shapefile into 2 so as to do a little experiment . Now, since i have imported the first half of my shapefile, i wanted to append the other half to my existing postgis table. . i got a thought of it as it might answer my problem. . how would i do that? can anybody give ideas how may i append my shapefile to the existing postgis table?? or could somebody tell me what is going on with my Django that it cannot import a lot of shapes into the database. ? Lots of thanks to you for entertaining my post. .


title: About getting area from DEM below 5000 and below 3000 m elevation?

text: I want to get the area from the DEM which is below 5000 and 3000. Actually I need those two areas for my Regression Model to calculate the discharge. In that case, how can I find out using python. I need to calculate in each cell of the stream segment. I have tried with Surface Volume tool but it is taking too long time as i need to calculate for all the cells along the stream segments. Is there any easy and fast way to get this information.


title: How to find the smallest-area ellipse circumscribing a convex polygon?

text: We are currently dealing with the problem of:   **How to find an ellipse circumscribing a convex polygon?**   Recent googling and lots of reading could **not** help me so much :(   ![enter image description here](http://i.stack.imgur.com/74McY.png)


title: split string after first word

text: I want to split a string field after the first word using the space as a delimiter so that "WA ROSSOUW ORANJE BELEGGINGS" becomes "ROSSOUW ORANJE BELEGGINGS". I am using Arcmap10. Thanks.


title: Add XY Column in QGIS

text: Following on from a previous question of mine, where I was given coords in degree-mins, I have successfully converted them to decimal degrees, thanks for the help. I have created a CSV file from the stated coordinates, and then created a shapefile. The CRS was EPSG:4326 (WGS84). The remainder of my mapping is displayed in TM65/Irish Grid (EPSG:29902). With the on the fly projections activated, everything is displayed properly. I need to provide this to a 3rd party. How do I use QGIS to add a geometry colunm using the Current CRS? Using either QGIS 1.8 or 2.0.


title: How we add XY coordinates (in the attribut table) from shapefile (points) using QGIS?

text: > **Possible Duplicate:**   >  How to get the coordinates in Lat/long from a point layer? I created a new shape file and edited to add points at specific location. Now, I would like to extract the XY coordinates from these points using QGIS. How I do it?


title: I would like to show points moving on a map by date

text: I would like to create a map where i can see points moving. I have table of points for example with a date column,               A 01/01/2012     B 02/01/2012     C 03/01/2012      D 04/01/2012     E 05/01/2012     F 06/01/2012      I would like to show them date after date ( 01/01/2012, 02/01/2012...): First screen we will see only the point A, second screen will show us B ... How can we do it? I am using QGIS and Mapinfo. thank you


title: Which interface can replace an IArcPadExtension?

text: I trying to migrate a code written for arcgis desktop and I have there a IArcPadExtension, but here (http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/type_changes_between_9_3_and_10/000100000408000000/) we can read that this Interface removed. Can someone tell me which interface can be used instead of IArcPadExtension?


title: How to hide/suppress and rename/alias fields when exporting to KML?

text: I have a feature class that needs to be exported to a KML file. I wonder if there is a way for me to export only some of the columns of the feature class's attribute table; some attributes are not needed in the KML file. Also, some of the column headings of the attribute table need to be edited to make them more understandable by a layperson. Is there a way of doing this when exporting to KML? Or, is there a way to make these edits in a KML file once it already exists? I'm exporting from ArcGIS 10.0, in case this helps.