title: Problem with nominatim own server

text: I've downloaded the osm virtual machine here: http://wiki.openstreetmap.org/wiki/Virtual_machine_image ...and patched the local.php file (for the "declaration allowed only at the start of the document" error). It appears to be working fine, except for the following issue: I understand there are two ways to query for an address:                q=<query>        Query string to search for.  Alternatively can be entered as:      and                street=<housenumber> <streetname>      city=<city>      county=<county>      state=<state>      country=<country>      postalcode=<postalcode>        (experimental) Alternative query string format for structured requests.         Structured requests are faster and require less server resources.         DO NOT COMBINE WITH q=<query> PARAMETER.      However, the first way works, and the second one gets me no results. I thought it could be a problem with the address formatting but if I use the same query on the public nominatim server (instead of my own) I get results. Check the public server output:               <?xml version="1.0" encoding="UTF-8" ?>     <searchresults timestamp='Wed, 04 Dec 13 05:50:52 +0000' attribution='Data ?? OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright' querystring='andes 1479, montevideo, montevideo, uruguay' polygon='false' exclude_place_ids='96424832,57980898,70445266' more_url='http://nominatim.openstreetmap.org/search?format=xml&exclude_place_ids=96424832,57980898,70445266&q=andes+1479%2C+montevideo%2C+montevideo%2C+uruguay'>     <place place_id='96424832' osm_type='way' osm_id='179061638' place_rank='26' boundingbox="-34.9064064025879,-34.9008026123047,-56.1986999511719,-56.1981239318848" lat='-34.9035605' lon='-56.1984301' display_name='Andes, Ciudad Vieja, Montevideo, 11100, Uruguay' class='highway' type='residential' importance='0.9'/><place place_id='57980898' osm_type='way' osm_id='78105349' place_rank='26' boundingbox="-34.9114799499512,-34.9064025878906,-56.198127746582,-56.1972122192383" lat='-34.9092104' lon='-56.1978327' display_name='Andes, Barrio Sur, Montevideo, 11100, Uruguay' class='highway' type='residential' importance='0.9'/><place place_id='70445266' osm_type='way' osm_id='112698692' place_rank='26' boundingbox="-34.8365058898926,-34.8350563049316,-55.9612350463867,-55.9585113525391" lat='-34.8357171' lon='-55.9597648' display_name='Andes, Solymar, Ciudad de la Costa, Canelones, Uruguay' class='highway' type='residential' importance='0.7'/></searchresults>      and my local server output:               <?xml version="1.0" encoding="UTF-8" ?>     <searchresults timestamp='Wed, 04 Dec 13 05:50:59 +0000' attribution='Data ?? OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright' querystring='' polygon='false' more_url='http://localhost/nominatim/search?format=xml&exclude_place_ids=&accept-language=&q='>     </searchresults>      In both cases, I'm using the same query:               http://<public server or private server>/search?format=xml&street=andes+1479&city=montevideo&county=&state=montevideo&country=uruguay&postalcode=      I don't know if it has something to do; but the virtual server need some minor "corrections" (?); one if to edit the local.php file (I did it) but the other one, downloading and replacing the get-coastlines.sh file, can't did it (can't overwrite existing file, and I don't have root password) I appreciate any help! Regards!


title: Mapscript - PostGis Error

text: I'm doing a spatial query, but I always get an error: > "msPOSTGISLayerGetShape(): Query error. msPOSTGISLayerGetShape called on > unopened layer (layerinfo = NULL)" This is my code:               layerObj layerUtbs = Util.MSMap.getLayerByName("Utbs");     if (layerUtbs.queryByRect(Util.MSMap, rect) == (int)MS_RETURN_VALUE.MS_SUCCESS)     {         resultCacheObj resultado = layerUtbs.getResults();              if (resultado.numresults > 0)         {             // here i got a error.             layerUtbs.getFeature(resultado.getResult(0).shapeindex, resultado.getResult(0).tileindex);         }     }      Here's my map file configuration               LAYER              CONNECTIONTYPE postgis              NAME "Utbs"              CONNECTION "user=pmc dbname=SiteInovacao host=localhost password=123 port=5432"             PROCESSING "CLOSE_CONNECTION=DEFER"                  DATA "geom from (SELECT *, oid FROM pmc.utbs) as utbs using unique oid using srid=31983"      ... Thanks!


title: How can I access lost panels in print composer?

text: In QGIS, I no longer have access to the panels in the composition for printing window (layout, history, object properties). QGIS 1.8.0 on a Mac. What I already tried :   * The right click on the toolbar didn't work, while it works anywere else.   * I uninstalled QGIS, deleted preferences files, installed QGIS again, and menus didn't come back.   * I copied the preferences files from a computer where these menus are on, to mine, and the menus didn't come back. Thanks


title: offset of ellipse marker

text: Sorry for my english :) I've got a point layer, with angle(real), width(real) and height(real). I want make a ellipse marker that take this values. But how I can offset the marker to left border (see http://1drv.ms/1lErGUp) . I try but «anchor point» (Hleft or Hright) don't make it (Vup and Vdown is alright). I try to make an expression in «data defined properties» - , something like : > "width"/2 || ',0' or > "width"/2 || ',0.0' etc, etc…… Thank for your help


title: Iteratively unioning pairs of shapefiles

text: A simple (I think) Model Builder question. I have 25 field sites, for each of which I have mapped land use as separate layers for different years. In one folder I have veg layers for 1994, named tara{site number}veg94 (eg., tara01veg94.shp, tara02veg94.shp, through to tara25veg94.shp). In the other folder I have the same for 2007, similarly named by site number (tara01veg07.shp, tara02veg07.shp ... tara25veg07.shp). I am wanting to union the layers for each site for successive years together using a model, for example tara01veg94.shp unioned with tara01veg07.shp to create tara01veg9407 and so on. I presume that I need to use an iterator to specify the site number for each run of the union function and then insert the %value% created by the iterator into the input and output file names. The problem I'm having is that I need to iterate the same site number for two input files simultaneously, so I figured the "for" iterator was the one to use, but the union function doesn't let me put %Value% into the input fields (though it accepts it in the output field ok). Any help would be greatly appreciated... thanks.


title: How do I download Garmin etrex Legend data into ArcGIS 9.3?

text: I am looking for a free solution to transfer waypoints from my GPS device to my PC, and into ArcGIS 9.3. Thanks in advance for your help and advice. These are my devices: Garmin etrex Legend (it's the glittery blue one, fairly old) and ArcGIS 9.3. I'd like to upload the waypoints into ArcGIS 9.3 but the computer doesn't even recognize the device. The Garmin device software is up to date, and neither Garmin BaseCamp or GPSBabel could locate the device. I have a feeling it's the connector cable, but I'm not entirely familiar with this type of cable (not USB or mini-USB). It plugs into the back of my desktop and the contact point of the plug is large and shaped like a trapezoid with very rounded edges. There are two rows of pins in the "trapezoid", with five on the bottom and four on the top. Actually the pins are in the computer port and the plug is female. The GPS side connection seems to be Garmin's proprietary four pin connector. So maybe the cable is busted? Neither the GPS device or my PC give any indication that they are communicating, even though both devices are on. I saw that Garmin has a Trip and Waypoint Manager, but I'd be really ideal if there is a free solution.


title: Are there open source solutions for travel demand modelling?

text: I'm looking for open source tools for travel demand modelling (eg The four- step UTMS). Preferably in a GIS environment. That works well with Qgis, Grass and Postgis. My question is not related to particular use case more research related.   My initial search had come up blank so I wanted confirmation.


title: ToDataSet() replacement ArcGISI 10.1

text: I am currently upgrading 9.3 codes to 10.1. There used to be ToDataSet() function in ESRI.ArcGIS.Utility.Converter class. Class still exists in ESRI.ArcGIS.ADF, but ToDataSet function is gone. Does anyone knows if there was a replacement provided, or there is an easy way to convert geodatabases IRecordSet to System.Data.DataSet?


title: PyQt4 pushbutton not connecting for my QGIS plugin

text: I'm trying to display information in a text browser with the push of a button in my QGIS plugin. The .ui is created using PyQt4 (button's object name is calcConso). No error message, but the button isn't connecting. The button simply displays values returned by my stats function, but the function itself isn't actually called anywhere. If it should be, I don't see where yet. Any ideas what's missing?               def initGui(self):     # connect button to calculation function         QObject.connect(self.dlg.ui.calcConso, SIGNAL("clicked()"), self.buttonClicked)          def buttonClicked(self):         global stats, values         self.dlg.clearTextBrowser()         self.dlg.setTextBrowser( str(stats, values) )          def stats(self):         global stats, values         ...         return stats, values      in a separate dialog class i've defined clearTextBrowser() and setTextBrowser(), which is imported.               def setTextBrowser(self, output):         self.ui.txtFeedback.setText(output)          def clearTextBrowser(self):         self.ui.txtFeedback.clear()


title: Convert like raster cell values to a polygon?

text: I have a population density raster and would like to create 5 polygons from the 5 natural break (jenks) classification ranges. 1 polygon for each classification range. I'm using ArcMap10 and have all of the Extensions enabled in the ToolBox to my disposal. Thanks!


title: How to create a raster from a CAD scan for ARCMap?

text: I have scans of CAD streets and such and want to get a raster for georeferencing into ARCMap. What are the easy steps to make a targa, geotiff, etc. of a known size, say 2 miles along one side as a test size scenario or any other raster format that can be imported into a layer for subsequent geo reference? Not wedded to any particular form, size, technique, format; just best practice and practical steps. Thanks for any help.


title: GeoJSON layer on Google Maps API is not showing

text: I am using the following codes to visualize a GeoJSOn on Google Maps API.               var geojsonFeature = {                                         "type": "Feature",                                         "geometry": {                                           "type": "Polygon",                                           "coordinates": JSON.parse(JSONobject[0].JSON).coordinates[0]                                         }                                 };                                 var googleOptions = {                                     strokeColor: "#FFFF00",                                     strokeWeight: 7,                                     strokeOpacity: 0.75                                 };                                      var myGoogleVector = new GeoJSON(geojsonFeature, googleOptions);                                      if (myGoogleVector.error){                                     // Handle the error.                                 }else{                                     myGoogleVector.setMap(map);                                 }      Its returning the following error > uncaught reference error GeoJSON is not defined here is the GeoJSON fetching from database               [[[[-3.58466299999998,40.653534],[-3.58416399999999,40.645122],[-3.57777099999998,40.645808],[-3.56814799999995,40.643543],[-3.56669199999999,40.650369],[-3.55906599999997,40.650485],[-3.562074,40.645539],[-3.55856,40.642499],[-3.55641499999996,40.636165],[-3.56240699999995,40.637156],[-3.56385,40.634403],[-3.56028999999995,40.62432],[-3.55866899999995,40.624382],[-3.559326,40.612243],[-3.55188399999997,40.611541],[-3.54740999999996,40.613852],[-3.54317099999997,40.612906],[-3.53588499999995,40.616672],[-3.52996099999996,40.613629],[-3.52470799999998,40.614486],[-3.52360699999997,40.616052],[-3.51882999999998,40.615856],[-3.50475,40.62025],[-3.50232199999999,40.619824],[-3.50347599999998,40.625645],[-3.49253299999998,40.624856],[-3.486874,40.625408],[-3.48826199999996,40.61937],[-3.48614299999997,40.615703],[-3.47918699999997,40.613561],[-3.47633099999996,40.609201],[-3.47601399999996,40.604547],[-3.46338799999995,40.607617],[-3.457448,40.606575],[-3.45370599999995,40.60743],[-3.46489399999996,40.598167],[-3.46592699999997,40.595318],[-3.46756299999998,40.595986],[-3.47589299999999,40.59241],[-3.482843,40.587501],[-3.48226799999998,40.586469],[-3.48881599999999,40.58506],[-3.49518,40.585953],[-3.50831399999998,40.58232],[-3.52083099999999,40.581192],[-3.52729499999998,40.582836],[-3.52976099999995,40.582188],[-3.52989299999996,40.58424],[-3.53294899999997,40.58501],[-3.54014899999999,40.583977],[-3.53991399999995,40.582635],[-3.545323,40.583943],[-3.54951199999999,40.587284],[-3.55304899999999,40.586448],[-3.56139099999996,40.587875],[-3.561644,40.592727],[-3.56544099999996,40.592964],[-3.56566199999997,40.598347],[-3.57579699999997,40.601903],[-3.57759999999996,40.607995],[-3.57447999999999,40.610901],[-3.573981,40.618885],[-3.57977899999997,40.619304],[-3.58072199999998,40.623112],[-3.58449400000001,40.627281],[-3.58942199999996,40.633644],[-3.59164399999997,40.640263],[-3.58941299999998,40.644885],[-3.59190799999999,40.648937],[-3.59346299999999,40.654804],[-3.58933299999995,40.655884],[-3.58466299999998,40.653534]]]]


title: GDAL 1.10 ogr2ogr OSM "Unable to open datasource"

text: I have a problem with ogr2ogr and osm file. I install from source (on Ubuntu 12.04.2 LTS) newest GDAL libary and OGR still can't read osm files.               gdal-config --version     1.10.0     ogr2ogr --version     GDAL 1.10.0, released 2013/04/24     ogrinfo     Supported Formats:       -> "ESRI Shapefile" (read/write)       -> "MapInfo File" (read/write)       -> "UK .NTF" (readonly)       -> "SDTS" (readonly)       -> "TIGER" (read/write)       -> "S57" (read/write)       -> "DGN" (read/write)       -> "VRT" (readonly)       -> "REC" (readonly)       -> "Memory" (read/write)       -> "BNA" (read/write)       -> "CSV" (read/write)       -> "GML" (read/write)       -> "GPX" (read/write)       -> "KML" (read/write)       -> "GeoJSON" (read/write)       -> "GMT" (read/write)       -> "PostgreSQL" (read/write)       -> "PCIDSK" (read/write)       -> "XPlane" (readonly)       -> "AVCBin" (readonly)       -> "AVCE00" (readonly)       -> "DXF" (read/write)       -> "Geoconcept" (read/write)       -> "GeoRSS" (read/write)       -> "GPSTrackMaker" (read/write)       -> "PGDump" (read/write)       -> "GPSBabel" (read/write)       -> "SUA" (readonly)       -> "OpenAir" (readonly)       -> "PDS" (readonly)       -> "HTF" (readonly)       -> "AeronavFAA" (readonly)       -> "EDIGEO" (readonly)       -> "SVG" (readonly)       -> "Idrisi" (readonly)       -> "ARCGEN" (readonly)       -> "SEGUKOOA" (readonly)       -> "SEGY" (readonly)       -> "ODS" (read/write)       -> "XLSX" (read/write)       -> "PDF" (read/write)      When I try this:               ogrinfo UMP-PL-CCBySA_20130717.osm      and I get this:               ERROR 0:     FAILURE:     Unable to open datasource `UMP-PL-CCBySA_20130717.osm' with the following drivers.     Supported Formats:       -> "ESRI Shapefile" (read/write)     ...     ...      Anyone know what I do wrong?


title: Fiona ImportError: DLL load failed

text: I've been using the great Shapely/Fiona combo successfully on Linux, but now i need to create a kind of production environment on windows and theres only one problem. When i try to import fiona, i get the following error: ![Import DLL error](http://i.stack.imgur.com/bRaDj.png) if i try to check dependancies of the ogrext.pdy using dependancy walker, it seems it is trying to load GDAL version 1.10 dll and fails. Strangely though, i have GDAL 1.9.2 installed and it seems to import into python without a problem (from osgeo import gdal). So maybe its not even related to the fiona import issue. Also, im 100% i downloaded the fiona installer for python 2.7 since i know issues can arise if you use .pyd files intended for a different version of python. Note, im using a standalone installation of python 2.7.5, without using osgeo4w installer.


title: Lining up three Layers that use same Coordinate Reference System (CRS) in QGIS?

text: How do you make all borders of a layer equal? they should be equal but i don't know how, mCRS layer is all in philippine zone 5(EPSG:3125), with the same formula/equation, I'm new to QGIS and I'm using QGIS 2.4 Chugiak. ![enter image description here](http://i.stack.imgur.com/QGUIc.png)


title: Covert /z/x/y.jpg map tiles to something that can be provided using the WMS specification

text: We have generated some maps in our own software solution where the output is a map stored in XYZ tiling format.               /zoom/x/y.jpg      I got a request if I could provide it in a WMS. I am wondering if anyone has some experience on how to in shortest amount of time can convert and setup a WMS that can service these images. The reason is that the map client dont support XYZ and is bound to use normal WMS only. We would prefer a windows solution but anyhting will do.


title: how can I change the border of my layer?

text: I have 2 layers:   * one with neighborhood borders   * another with service areas (shapefile) ![enter image description here](http://i.stack.imgur.com/9nQ5c.png) I would like to make one layer with all the data from ServiceAreaMETRO and for the zone where i have no information in ServiceAreaMETRO but is inside of the layer 200001445 I would like to give value 1. How can i do it?


title: Where can I make a modification or suggestion for Google Geocode API response, specifically the formatted_address field?

text: I was wondering where I can make a suggestion to modify a Google Maps geocode API response. Specifically the formatted_address field Here is why : Usually airport type locations always have in their formatted_address field the airport code e.g: (JFK). This is the case for almost every airport I tried to geocode. But this one Aéroport Marrakech-Ménara is missing the airport code Where do you think I can suggest this modification so that the formatted_address follows the standard? Thanks in advance.


title: buffer in qgis from layer text delimited

text: I have a layer of polygons in British Columbia, Canada in WGS 84 which is fine. Later I created shapefile of three points (using decimals for lat and long) through the add shapefile as text delimited text facility. The projections are enabled on the fly. That layer is fine. Now I want to buffer around the three points. I have been reading the past questions and it seems that I should be in a GCS for the points layer. I have tried saving as with the equal areas projection but keep getting an error message. Any suggestions/links most welcome!


title: Why can't i publish my layers using OpenGEO explorer plugin?

text: Like in the image, the publish & other commands are not enabled. Since i am very much new to this plugin any help will be greatly appreciated. ![enter image description here](http://i.stack.imgur.com/onKi1.png)


How do I use the GRASS command line tools within QGIS? I use the QRASS plugin to open the mapset, and then I open the GRASS tools window. I click on 'GRASS shell' under modules and it brings up a bash terminal, which says:               bash: /sw/bin/init.sh: No such file or directory     bash-3.2$      I assume init.sh was supposed to open some GRASS command line program, but it failed to find it. Does anyone have any suggestions for how to procede? Some background, any advice will be gratefully received: I'm trying to teach myself GRASS using the third edition of "Open Source GIS: A GRASS Approach" by Neteler and Mitasova. Unfortunately it appears that the book is somewhat out of date, designed for GRASS 6-3, while I have GRASS 6-4. This means that some of the GUI stuff doesn't work (particularly d.mon, I believe it has to do with a new Python WxGUI interface) so I can't work through following the examples exactly. I'm hoping that the book will still be mostly relevant in terms of the modules available and the basic GRASS command syntax and use, but I can't follow the instructions that relate to the GUI. For this reason I've decide to ignore the GRASS GUI completely and to just use the QGIS GRASS plug in.


title: how to create gis like Uster?

text: I downloaded qgis, geoserver, openlayers, ext, geoext, qgis-web-client and osgeo. And i have map shape files. i would like create website like this site. i need help. can you send tutorial links thank you very much


title: How to create multiline labels in QGIS?

text: How can I apply Multiline label option in the label property.Name field contains a lengthy name. I want to wrap it. How can I do it? please help me. My QGIS version is 1.8


title: Multiline labeling

text: > **Possible Duplicate:**   >  How to create multiline labels in QGIS? I got it by following the second method mentioned by you.But my doubt is that how we can use multiline label property? You said that it is possible if we add \n in the label.But I didn't get it.Please explain more about this option. Thanks, Sreesha.T.A


title: Why did my Visualization tools disappear from the CartoDB Sidebar?

text: I was working with the "Intensity" visualization tool yesterday. Using the same data, I created a new map, and now I can only access: Simple, Choropleth, Category, and Bubble. Where did Intensity, Torque, and the others go?


title: How to create a lat/lon grid in QGIS?

text: I'm using QGIS. How can I create a shapefile consisting of a grid 0.5° latitude and 1° longitude in size?


title: ArcMap topology toolbar validate topology button is disabled?

text: I find a strange thing when I try to use validate topology button. Most of the buttons on topology toolbar are disabled. Last month when I was using a trial license of ArcGIS, I can use these functions. From the instruction I find these functions only not available for the basic license. But I am using a standard license. Cannot figure out the reason. The following pictures are the license information and the topology toolbar during editing. ![enter image description here](http://i.stack.imgur.com/3WMQ0.jpg) ![enter image description here](http://i.stack.imgur.com/uwWEr.jpg)


title: How can I use an ArcGIS.com map that's not shared with everyone from JavaScript API?

text: I like to use the ArcGIS.com to create a map with operational layers on top of a baselayer. I would like to have the Content and Map as private but to show the map in an application built with JavaScript API. I tried using the new IdentityManager to make the application turn up a login dialog. It does, but I get: "Invalid username/password. Please try again." ![enter image description here](http://i.stack.imgur.com/nwEae.png) I'm a newbie on ArcGIS.com and JS so might have mixed up something, does anyone know if it's possible to access maps that are not publicly shared? There is no problem to access the map using createmap as long as the map is share to everyone. ![enter image description here](http://i.stack.imgur.com/UYUkd.png)


title: Using in-memory vector layer with QGIS processing / SEXTANTE

text: I'm trying to run the `qgis:clip` algorithm from console, but am getting an error when using an in-memory layer as the overlay parameter. Is this to be expected, or am I doing something wrong? Code:               mem_layer = QgsVectorLayer("Polygon?crs=epsg:4326", "temp_layer", "memory")     if not mem_layer.isValid(): raise Exception("Failed to create memory layer")                 mem_layer_provider = mem_layer.dataProvider()          clip_polygon = QgsFeature()     clip_polygon.setGeometry(QgsGeometry.fromRect(          QgsRectangle(             self.output_layer.extent().xMinimum() + 10,             self.output_layer.extent().yMinimum() + 10,             self.output_layer.extent().xMaximum() - 10,             self.output_layer.extent().yMaximum() - 10         )     ))     mem_layer_provider.addFeatures([clip_polygon])     mem_layer.updateExtents()          output = self.output_layer_path + "2"     processing.runalg("qgis:clip", layer, mem_layer, output) # Fails      In the code above, `self.output_layer` and `layer` are vector layer objects (QgsVectorLayer - proper ones, loaded from shapefiles on disk), `self.output_layer_path` is a python string object with a path. Here is the error I'm getting:               "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py", line 150, in              execute self.processAlgorithm(progress)     File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\ftools\Clip.py", line 72,          in processAlgorithm index = utils.createSpatialIndex(layerB)     File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\ftools\FToolsUtils.py",          line 31, in createSpatialIndex features = QGisLayers.features(layer)     File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\core\QGisLayers.py", line 211,          in features return Features(layer)     File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\core\QGisLayers.py", line 218,          in __init__ self.iter = layer.getFeatures()     AttributeError: 'NoneType' object has no attribute 'getFeatures'      If I change my processing call to the following, it runs without error:               processing.runalg("qgis:clip", layer, self.output_layer, output) # Runs fine      Also, if of any help, this is the failing algorithm as it is logged in processing_qgis.log:               processing.runalg("qgis:clip","C:/path/to/shapefile.shp|layerid=0|subset=CONTINENT =          'Europe'","Polygon?crs=epsg:4326","C:/path/to/output")


title: How to change the colormap in QGIS 2.01?

text: I decided to say goodbye to ArcGIS and switch to QGIS which is nice, but it has given me a hard time to handle various problems. Few months ago, I made a map using QGIS 1.8 with a relief background having a colormap from green to brown. Later on, I upgraded to QGIS to 2.01. Now, when I reopen the same map project with the intent to change the colormap of the map because that one was very pale. But, it seems that either I forgot how a colormap can be changed or my QGIS has lost that capability or there is a problem with my tif file which has three bands. This is what I get when I open the Colormap tab in the Layer Properties window: ![Almost everything is frozen and I don't know why](http://i.stack.imgur.com/NHAns.png) Any idea of how I can change the colormap?


title: Problem using addVectorLayer() in Qgis

text: I am confused a bit, using addVectorLayer() in QGIS plugin. I want to add and display a vector layer, directly when QGIS opens. Hence I am using addVectorLayer() in **_ _init_ _**() function of my plugin. The problem I am seeing is, the vector layer is loaded in the legend but is not displayed on the canvas. I, manually have to click on " _zoom to layer extent_ ", to display it. Any hints on how to solve this problem will be of high help to me. **NOTE:** If I use either of the below, it works perfect (i.e. the layer is loaded and **displayed as well** ).   1. qgis.exe D:/sample.shp at the command prompt **OR**   2. In QGIS Plugin, If I use addVectorLayer() on some menu item click


title: Show Geometric Network Topology data in the web

text: I am trying to locate any API's for JavaScript (or other) that will help me to display current linear Geometric Network Topology and add multiple point/line geometry from JSON in HTML/JS. I specifically need to have my users perform typical tools like trace route and analysis in web interface on this linear network. I am just trying to find out if there is a JS or other Web API to handle these types of requests?


title: SDE Connections during Caching

text: I am running caching on a server using ArcGIS Server 10. It seems like it is holding SDE connections, older than 2 weeks, to the point that it has maximized connections. I am not sure why it is not freeing up resources. What I can I do to make sure that it releases SDE connections. Thanks Jay


title: Adding combined footage to points from the beginning of a line

text: I'm trying to add the footage of each point from the beginning of the line to the end. There are around 4k vertexes between the two ends that I need to put the footage from the beginning of the line and adds footage as it goes down the line. An example would be three points total with 50 ft between them. The first point would be 0, the second point 50 and the third point 100 (that's just an example). Is there a way to do this? I was going to break the line into segments based of vertexes to get the individual length of each segment. How would I have it add going down the line and add that combined footage to each point? I have arc 10.1, but am open to any solution/ideas.


title: How to provide transform information to openlayers on Image layer

text: I would like to include an overlay raster layer into my OpenLayers map. I've pre-transformed the image into the correct projection (EPSG:900913) and saved as a png using the `gdal_translate` command: `gdal_translate -a_srs "EPSG:900913" -of "PNG" $RASTERFILEDIR/$x ../data/$x.png` When the file converts it includes an .xml file with transform information as follows:               <GeoTransform>         7.0153687766181468e+05,         2.9999999999999904e+01,         0.0000000000000000e+00,         9.5377345182658464e+05,         0.0000000000000000e+00,        -2.9999999999999904e+01     </GeoTransform>      In OpenLayers I'm loading the image like this:               var imageLayer = new OpenLayers.Layer.Image(source.label, source.src,       new OpenLayers.Bounds(source.bounds[0],source.bounds[1],source.bounds[2],source.bounds[3]),        new OpenLayers.Size(source.size[0], source.size[1]),        {          isBaseLayer: false,          alwaysInRange: true,          projection: new OpenLayers.Projection("EPSG:900913")       });     mapObj.map.addLayers([imageLayer]);      Where the bounds and size are calculated correctly. I end up seeing my image hovering over Africa instead of Columbia. It looks very much like there needs to be a translation included, but I'm not doing it correctly. How do I know where to look for the translation amount, and how do I provide that information to OpenLayers? The application I'm working on is here: http://www.stanford.edu/~rpsharp/map- overlay-annotation-test/inseam_explorer.html Thanks for any help!


title: ArcGIS Server Search Service and mapped client drives

text: With ArcGIS Server (10.1), is it possible to register a folder to the Search Service for indexing using one path, and serve it to users with another? how? For example the server sees `\\\geodata-server\data` and `\\\geodata- server\maps` while the clients use `Z:\` and `Y:\` respectively. Under _.../arcgiserver:6080/arcgis/manager/site.html >> Date Store_ I've registered and validated the folders, and successfully published map services with these settings, but the data store settings appear to be ignored by Search Service: search results in the clients show the UNC path.               Data Store:        Name: Repository        Publisher Folder Path: Z:\        Publisher Folder Hostname: geodata-server        Server Folder Path: \\geodata-server\data      I already tried just using the same mapped drive settings on the arcgis server, but that doesn't work (c.f. Is it possible to reference data using mapped network drives instead of UNC path in arcgis server services?)


title: Where is it Possible to Find DTED0 Set?

text: As I understand, DTED0 should be available for free. Yet, I am not able to find any download link. Everything that Google search brings up (eg. http://geoengine.nima.mil) is dead and not working.


title: What is the right methodology to assign costs to edges of a network?

text: I am producing a routing facility for cycling safety based on an OSM network. The edges of this network have costs and these are calculated from different criteria both related to intrinsic (as the grade of road) and extrinsic (number of accidents per edge) characteristics. I already have found a method to assign costs but I do not know how to scale and weight them in order to make the routing coherent with my objective. My objective is to avoid dangerous edges assigning them higher costs and prefer safe roads and cycling paths, Dijkstras pg_routing actually does that but dangerous points are avoided "too much" and least cost paths are safe but incredibly long and "wriggly" . I tried to search some papers but I have not found anything related to my case, they are all much related to the criteria definition rather than to their application to a network model. If someone could help I really would be very thankful.


title: How to solve 'syntax error, unexpected LE' in QGIS query builder?

text: I have a very simple question about the advanced query builder in QGIS. I'd like to search for a range of numerical data values in the attribute table, but asking QGIS to show me values that are <= the low value and >= the high value doesn't seem to work; I continuously get a message that says: > syntax error, unexpected LE although sometimes is says GE instead of LE. Haven't a clue what GE and/or LE refer to and can't find it on the internet. ![Here's a screenshot of the query builder and the message](http://i.stack.imgur.com/SiRtg.jpg) This should be easy but it's not, which generally means I'm missing something.


title: Air corridor in spherical surface: calculating great circle tangent points with small circles

text: I have the necessity to draw on a sphere (earth) an air corridor. In the cartesian plane, this corridor is made by some circles and from outer tangents that connect these circles as you can see in this image (central part of the image): ![enter image description here](http://i.stack.imgur.com/wjU9X.jpg) In general circles can have different radii. In flat Cartesian plane I can calculate the two outer tangents (when possible) of two circles, using for example formulas that I can found in this page. My problem is a bit more complicated. I must to perform same calculus in spherical surface. You can see more clearly in this image: ![Small circles](http://i.stack.imgur.com/bs5Hc.gif) In this case I've two small circles and I want to calculate tangents between these two circles in spherical surface. Onto a sphere I don't have straight lines, but geodesics, and in this case they are represented by great circles. I am able to calculate a great circle trajectory between two points using the Aviation formulary. What I miss is a way to find the small circles tangent points, in order to have the initial and starting points for my geodesic tangents. How can I calculate them?


title: Openlayers 3 display in Firefox and Chrome

text: I'm experiencing some issues with displaying OSM and GeoJSON. With Firefox v30 I see my GeoJSON data, but OSM is invisible. With Chrome v35 I see OSM, not my GeoJSON... What is the explanation? (except creating "Chrofox"..)               var map = new ol.Map({         target: 'map',         layers: [             new ol.layer.Tile({                 source: new ol.source.OSM()             }),             new ol.layer.Vector({                 title: 'operation',                 source: new ol.source.GeoJSON({                     //projection: 'EPSG:3857',                     url: 'emprise.geojson'}),                 style: new ol.style.Style({                     image: new ol.style.Circle({                         radius:2,                         fill: new ol.style.Fill({color: 'red'})                     })                 })             })         ],         view: new ol.View({ <!--2D marche plus...2014 06 29 -->             center:ol.proj.transform([1.22, 47.435], 'EPSG:4326', 'EPSG:3857'),             zoom:9         })     });


title: Calculating X and Y of line start and line end using ArcPy?

text: I have a series of polyline shapefiles and I am trying to automate the process of calculating the X and Y coordinates of the line start and line end using Python. I have added the 4 fields (startx, starty, endx, endy) in Python with the following code:               Arcpy.addfield_management ("Polyline","startx","DOUBLE")      I can perform this task by right-clicking the attribute and calculating geometry, but I want to automate this process for about 30 polylines. I have the following code I've found that might be able to perform the desired task with some modification:               xExpression = "float(!SHAPE.CENTROID!.split()[0])"     yExpression = "float(!SHAPE.CENTROID!.split()[1])"          arcpy.CalculateField_management("Polyline", "startx", xExpression, "PYTHON")     arcpy.CalculateField_management("Polyline", "starty", yExpression, "PYTHON")      This code only calculates the coordinate at the centre of the shape I believe. Are their any expressions I can add to this code to calculate the X and Y coordinates of the start and end points of the polyline? I am using ArcGIS 10.1 with ArcInfo license.


title: how to join 1second GPS data with dGPS using much shorter time interval?

text: for one of our measurements we rented a dGPS with a portable "rover". I have now our measurements from our device which also contain data from built-in GPS (1 second sampling rate) + also the dGPS precise measurements. The data look approximately like this (copied from LibreOffice Calc, can have standard CSV too)               Lat_deg Lon_deg Gtm_sec Galt_m  value_XY    datetime_UTC     48,9002494  14,1274795  35108   104,3   175,2851659292  09:45:08     48,9002532  14,1274814  35109   104,3   153,7737182062   09:45:09     48,9002571  14,1274814  35110   104,3   87,5685916306    09:45:10     48,9002532  14,1274852  35111   104,3   99,8996329703 09:45:11     48,9002532  14,1274862  35112   104,3   126,6115716286   09:45:12      I mostly use the "Gtm_sec" to join data from multiple devices (when use them on the same vehicle for example) but I am also able to calculate the UTC time from it ("datetime_UTC"). The problem is, that the dGPS uses much shorter interval for getting coordinates (I already have the data):               UTC Lat Lon Height  join     94507,5000  48,900013589    14,125682810    816,27  94508     94507,5200  48,900013595    14,125682817    816,27  94508     94507,5400  48,900013590    14,125682829    816,27  94508     94507,5600  48,900013586    14,125682834    816,27  94508     94507,5800  48,900013580    14,125682839    816,27  94508     94507,6000  48,900013580    14,125682837    816,26  94508     94507,6200  48,900013582    14,125682825    816,26  94508     94507,6400  48,900013580    14,125682813    816,25  94508     94507,6600  48,900013580    14,125682799    816,25  94508     94507,6800  48,900013584    14,125682779    816,25  94508     94507,7000  48,900013572    14,125682813    816,26  94508     94507,7200  48,900013575    14,125682822    816,26  94508     94507,7400  48,900013579    14,125682837    816,27  94508     94507,7600  48,900013591    14,125682837    816,26  94508     94507,7800  48,900013588    14,125682776    816,25  94508      So I have plenty of probably almost the same coordinates for one second of my measurement and need only to join one precise coordinate from dGPS to my data. I cannot use spatial join because of GPS error which is about few meters so nearest point is not always the right one. I tried to convert UTC time from the first file from 09:45:08 to 94508 and round the time in the second file from 94507,5000 to 94507. But now I have a lot of rows containing the same "join" value like for example "94508". I wanted to use the resulting integer as joining field. However I am not able to make QGIS or other tool to join just the first value. any ideas? thanks


title: In QGIS, is it possible to save graduated styles to use on different columns?

text: I'm using QGIS to produce thematic maps of 9 quantities (given in 9 columns in the attribute table) which have values broadly within the same range and I would like to plot them using the same intervals using 'Graduated' style. ![all columns which I would like to use style on](http://i.stack.imgur.com/6DtYd.png) However, while I can save a style, it saves the column name with it. When I load the style to attempt to apply it to another column, as soon as I change the column, it resets the intervals, which is exactly what I would like it **not** to do. Is it possible to somehow keep the interval ranges while changing the column?


title: Search if field exists in feature class

text: I have a few dozen feature classes, one of which contains the field I am looking for. They are stored in several different file geodatabases. Is there a quick way of searching each feature class to find the one that has my field? Or do I have to check each one's attribute table in Catalog? Some of the files have the same names but are stored in separate locations. I would like to be able to do this inside a `Calculate Value` tool in ModelBuilder, so that each time I needed to, I could run the model on a single file gdb and it would search through all the feature classes within that gdb and look for the field. So far, I have a feature class iterator which iterates over all the feature classes in the file gdb recursively. Inside the `Calculate Value` I have the following code:               findField(r"%Feature%", "%Search Field%")      * * *               def findField(fc, fi):       lst = arcpy.ListFields(fc)       for f in lst:         if f.name == fi:           return fc         else:           return "not found"      The returned values are collected in `Output Values` as strings. The output for all the feature classes has been "not found", even though the field exists in at least 4 of them. ![enter image description here](http://i.stack.imgur.com/e4ncy.png)


title: Why does QGIS 2.2 Atlas not work?

text: I have problem with atlas generation in QGIS 2.2. I'd like to export pdf map with 2 maps window and use coverage layer function. Atlas doesn't iterate across the features in coverage layer. First problem is output preview which doesn't work at all. Anyway when i export map as pdf i have same map for all features. It seems that atlas can count my features in coverage layer but it can't iterate across it. I use shp file with points and lines + shp with polygons for coverage layer. When I try it with same file in QGIS 2.0 everything works fine. I have installed both version QGIS 2.0 and QGIS 2.2. Have you ever seen a similar problem as I have or do you have any idea for a solution?


title: How can I manually cut existing polylines at a point of my choosing in MapInfo?

text: I want to edit polylines so that only the part of the polylines that fall within a certain area are remaining. SQL queries highlight the whole polyline if it falls within the desired area and hence does not achieve the goal. Thanks


title: Using sedac/GPW PopStats Service

text: I need to estimate population density based on a geographical area. I thought about using the Gridded Population of the World (GPW) service available here. Because I never used a RESTful WS before, I am having a hard time understanding how to properly format the required input parameters. I know that the service directory should have all the required information, but my attempts were fruitless. I was wondering if someone could help me on this issue. Code example would be great. Thank you in advance!


title: Getting started with Arcobjects

text: What is the best route or place to get started with arcobjects if one is not a developer and _not aiming to become a developer_? I've been using gis professionally for a long time, almost two decades, arcinfo/arcgis for most of that; I'm pretty good. I'm learning software development, and even have a modestly successful small python application used in a public project; I'm not good! I don't want to become a full fledged software developer but I keep running into things I just can't do without programming (example). In the arcgis world this puts me pretty squarely in the python camp, which is fine by me since I like python, however python does not have straightforward access to arcobjects. (Python and arcobjects is possible, but it's an unsupported route. This question is about following a beaten path.) Soooo, I need to get started, but where? Arcgis help says to get started with the ESRI Developer Network but $1500/yr is definitely not in my budget, and sounds like using a sledge hammer to swat mosquitos. And which language .NET, Visual Basic, or Visual C++? * * * **UPDATE:** Thank you everyone for the wonderful answers. In light of them I realise I unecessarily narrowed the scope of my question be pre-supposing "arcobjects" is the direction I need to go in. A more open ended formulation is more along the lines of: > I keep running into problems I just can't solve with arcgis and python > alone. What else can I learn/use to solve problems like X? I've no interest > or intention of becoming a software developer. I just need to do a couple > things which aren't exposed to the arcgis python modules.


title: How to change the format output from ftl

text: Hello everyone I have have a view in geoserver from postgres and I like the default free marker template output in Layer preview but I would like to change it to where to column names Field name and Field Value. Since the default content.ftl is iterating through and outputting all the content horizontally is there a easy way to make the table print vertically?


title: QGIS using different R lib

text: I am working with a colleague who is learning QGIS and has a question about the R plugin. His library path (.libPaths()) has two folders:               "C:/Users/RDCERWAW/Documents/R/win-library/3.0"      "C:/Program Files/R/R-3.0.3/library"      When he downloads packages, they are downloaded to his personal library because the library in his Program Files folder is not writeable and he is unable to change permissions (dang Windows!). At any rate, everything works fine within R not run under QGIS, but when he is using R within QGIS, R is only trying to access packages in `C:/Program Files/R/R-3.0.3/library`. Since he can't write to this folder, the packages that he needs to run are not available. Any potential solutions to this problem would be appreciated.


title: Raster diff: how to check if images have identical values?

text: Is there a means to check to see if any 2 given raster layers have identical _content_? We have a problem on our corporate shared storage volume: it's now so big that it takes over 3 days to conduct a full back up. Preliminary investigation reveals one of the biggest space consuming culprits are on/off rasters that really should be stored as 1-bit layers with CCITT compression. ![a typical present/not-present raster](http://i.stack.imgur.com/dYezv.png) This sample image is currently 2bit (so 3 possible values) and saved as LZW compressed tiff, 11 MB in file system. After converting to 1bit (so 2 possible values) and applying CCITT Group 4 compression we get it down to 1.3 MB, almost a full order of magnitude of savings. _(This is actually a very well behaved citizen, there are others stored as 32bit float!)_ This is fantastic news! However there are almost 7,000 images to apply this too. It would be straightforward to write a script to compress them:               for old_img in [list of images]:         convert_to_1bit_and_compress(old_img)         remove(old_img)         replace_with_new(old_img, new_img)      ...but it's missing a vital test: is the newly compressed version content- identical?                 if raster_diff(old_img, new_img) == "Identical":           remove(old_img)           rename(new_img, old_img)      Is there a tool or method which can automatically (dis)prove the content of Image-A is value-identical to the content of Image-B? I have access to ArcGIS 10.2 and QGIS, but am also open to most anything else than can obviate the need to inspect all these images manually to ensure correctness before overwriting. It would be horrible to mistakenly convert and overwrite an image that really _did_ have more than on/off values in it. Most cost thousands of dollars to gather and generate. ![a very bad result](http://i.stack.imgur.com/sIjoD.png) **update:** The biggest offenders are 32bit floats that range up to 100,000px to a side, so ~30GB uncompressed.


title: How to increase raster extent by filling extent with no data using ArcGIS Desktop without Spatial Analyst?

text: I am using feature to raster to rasterize water polygons. It only makes a raster the extent of the features in the polygons, whereas I would like it to be the extent of another existing .tif image. Global Mapper can export a raster with a larger extent than the input and fills the extra space with no data, but I don't want to integrate 2 separate processes for a large number of files, I want to work in ArcGIS. I am using ArcGIS Desktop 9.3 but I do not have the Spatial Analyst extension.


title: Is it possible to export a QGIS project to Mapnik XML?

text: Is it possible to export a QGIS project to Mapnik xml? I'm using QGIS 2.4 and Quantumnik does not seem to work with that version.


title: Google Maps Coordinates Problem

text: I have been trying to use google street maps with the help of OpenLayers, but Every time I am running into a problem with this google maps coordinates. The Coordinates of a location named _'Asab, in Abu Dhabi'_ should have coordinates as **"Longitude=54.3004105, Latitude=23.25535006"** but instead it gives coordinates like **_"Long=6036690.74501, Lat=2700367.334"_**. The Code I used to include google maps into my HTML webpage is as below: var map;               function init(){     // Initiating 'map' Variable and Adding Controls     map = new OpenLayers.Map('map_element', {      controls: [     new OpenLayers.Control.Navigation(),     new OpenLayers.Control.PanZoomBar(),     new OpenLayers.Control.ZoomBox(),     new OpenLayers.Control.ZoomToMaxExtent(),     new OpenLayers.Control.LayerSwitcher({}),     new OpenLayers.Control.MousePosition('mouse_position', { prefix: 'Long: ', separator: ' \n| Lat: '}),     new OpenLayers.Control.ScaleLine({}),     new OpenLayers.Control.OverviewMap()     ]     });          // BaseMap Layers     var google_streets= new OpenLayers.Layer.Google(     'Google Streets',      {type: google.maps.MapTypeId.ROADMAP,             units: "m",             maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,                                                  20037508.34, 20037508.34),             maxResolution: 1.40625     }, {"sphericalMercator": true}     );      So I have been looking all over to correct this but I am not getting how to do it. I am a new learner into this OpenLayers, so if someone can please give me push it would be really helpful.


title: how to fix Autocad file with a field that start with a " , "

text: I have a Autocad DWG file with a field that start with " , "and the table dosent open on arcmap - the error messege is invalid field.and icant export the data to shp file, How can i fix it ? thanks ![enter image description here](http://i.stack.imgur.com/9nV9h.png) ![enter image description here](http://i.stack.imgur.com/Xnz5e.png)


title: how do I relate tables in model builder

text: I inform you that I am an intermediate user of arcgis for desktop (version 10x), and the process that I do manually is: I relate the table of a feature class (representing parcels, cadastral division of a city) to another table that contains data of the real estate market (offering for sale, sales records values actually realized). The common field for the relationship that I use is the number of the parcel, and I use the relationship of tables because it is a one-to-many relation. When operated manually,I select the records in the table with data from the real estate market and the relationship automatically selected table records in the feature class "parcels" (with the same number) and, from this selection I create a new layer representing the parcels of the city about which you have a real estate information. Well, at this point, the result is satisfactory, the problem I have when I want to automate the process with model builder, especially when trying to relate the tables, as the relationship does not appear as a tool in arc- toolbox It is about this that I consulted, how to implement the process described in model builder? Thank you very much for any help you can offer me, and sorry for my bad english. Robert. _In spanish:_ Estimados: les informo que soy un usuario intermedio del arcgis for desktop (version 10x),y el proceso que hago manualmente es el siguiente: relaciono la tabla de una feature class (que representa las parcelas -division catastral- de una ciudad) con otra tabla que contiene datos del mercado inmobiliario (ofertas de venta , de resultados remates de inmuebles , registros de valores de venta efectivamente realizadas). El campo en común que uso para la relación es el número de padrón de la parcela , y uso la relación de tablas porque es una relación de uno a muchos. Cuando opero manualmente , selecciono los registros de la tabla con datos del mercado inmobiliario y por la relación de tablas automáticamente se seleccionan los registros en la feature class "parcelas" (con igual número de padrón) y, a partir de esta selección creo un nuevo layer que representa a las parcelas de la ciudad acerca de las que se tiene alguna información inmobiliaria. Bueno, hasta este punto, el resultado es satisfactorio; el problema lo tengo cuando quiero automatizar el proceso con model builder, especialmente cuando intento relacionar las tablas , ya que la relación de tablas no aparece como herramienta. Es acerca de esto que les consulto , o sea , cómo se puede implementar el proceso descripto en model builder ? Muchas gracias por la ayuda que me puedan ofrecer. Atentamente, Robert. **I'll try to explain better:I have a shapefile and its attribute table ("table "1") has a field called "padron" whose number identifies each parcel.Also I have a table (table "2") with real estate market's data relating the price of homes for sale with the registration number of the parcel (field called "padron" too). Sometimes, it may be that there are several houses in a parcel (therefore with the same number in "padron"). In this cases, in the table "2" each house is identified with a different record's number in a field called "UNIDAD". For example: Shapefile attribute table ("1"): OBJECTID SHAPE **PADRON** SHAPE_LENGTH SHAPE_AREA 2784 Polygon **999** 82.1389 339.2183 4596 Polygon **998** 59.1372 204.4819 4487 Polygon **997** 61.0052 211.9868 And Data table ("2"): OID DATE **PADRON** **UNIDAD** VALUE 15 09/19/2011 **1289** _0_ 87000 16 06/16/2011 **999** _**05_** 45000 17 08/16/2011 **119** _0_ 73000 23 07/20/2011 **43** _0_ 52000 31 05/02/2012 **999** _**03_** 92000 When I do (manually in ArcMap) a "relate" ( notes that the relation is one to many) betwen the layer of shapefile and the table "2" , finally I can export the selected features and finally get a new layer with all data, including the same PADRON values and different records in each UNIDAD. But, I could not do this procedure (relate tables and export new layer) in the ModelBuilder. I could make a join , but this tool not maintain all records where there are several houses on the same parcel (same "padron"'s record and different "unidad"'s record). I hope it's more clear the problem I have Thanks for all the help you can give.**


title: Detecting "lack of movement" on GPS device

text: Me and my associated are having a bit of a concept problem. We're using a GPS tracking device mounted in vehicles and later display the movements in our application. Pretty straightforward, right? We're having a small issue however with vehicles when they are NOT moving. Despite standing still, the GPS device will send information with varying positions, sometimes it'll even report the vehicle is moving (every once in a while it'll report a vehicle is moving quite fast). The end result is an ugly representation of the movement in our application, and worse, incorrect calculations with regards to how long the vehicle was moving and was standing still (we've got some statistical analysis going on as well). I know the problem isn't new: Google Navigation on my Android phone also has trouble when I stop at a crossroad every now and again, detecting that I'm now driving in the opposite direction (when in fact, I'm standing still). But we really need to have some method of telling the vehicle isn't moving, especially for prolonged periods of time. The problem is compounded in some vehicles which are kept under roofs for the night, which causes the GPS to go wild due to a weaker signal (which is still strong enough to get a position however). We can detect if the vehicle's engine is turned on or off, but we cannot assume it's not moving with the engine off (there were incidents where a damaged vehicle was towed... and of course there's a case of potential theft which also needs to be reported). What's the best way to approach this problem? EDIT: To add some more information:   * The GPS device does have an accelerometer, but that only returns a binary information (moving / not moving) and it's either TOO sensitive or just plain isn't working.   * We do have access to things like number of satellites or quality, but we're unsure how to utilize that information. Thus my question. :)   * The problem isn't about detecting if a vehicle is moving or not in real-time. We collect the data, and later on do some statistical analysis and display it. We do show the current position of the vehicle, but that is of little importance. So basically we need to be able to tell a vehicle was or wasn't moving by looking at historical data.


title: Python script for constructing a WHERE clause from user input

text: I'm trying to construct a where clause from user input that will eventually be passed through as a SQL statement in the select tool or the select by attributes tool. I've started a script thats been adapted from some previous posts, however, I still don't have it correct. the way its currently written the resulting SQL statement will look something like: "123" = 'ABC' OR 'DEF' I need the resulting statement to look more like "\123\" = 'ABC' OR "\123\"='DEF' Important: the values (i.e. ABC DEF) will be user inputs and the number of values entered as arguments may vary from user to user. My current script is below                def whereClause(table, field, values):         """Takes a semicolon-delimited list of values and constructs a SQL WHERE         clause to select those values within a given field and table."""              # Add field delimiters         fieldDelimited = arcpy.AddFieldDelimiters(arcpy.Describe(table).path, field)              # Split multivalue at semicolons and strip quotes         valueList = [value[1:-1]             if (value.startswith("'") and value.endswith("'"))             else value for value in values.split(';')]              # Determine field type         fieldType = arcpy.ListFields(table, field)[0].type              # Add single-quotes for string field values         if str(fieldType) == 'String':             valueList = ["'%s'" % value for value in valueList]              # Format WHERE clause in the form of an IN statement         whereClause = "%s = %s" % (fieldDelimited, 'OR' .join(valueList))         return whereClause          def outName(input,post="Out",fileExtension="shp"):         """Returns output name."""         outName=os.path.basename(input).split(".")[0]+post+"."+fileExtension         return outName          # Create SQL Statement     InputFC = arcpy.GetParametersAsText(0)     outputFC=outName(InputFC,"_Select")     Field ="CO_NAME"     Values = arcpy.GetParameterAsText(1) #user input     SQL=whereClause(InputFC,Field,Values)       print SQL


title: Setting projection to a geotiff file when it's shown as Unknown

text: I have a geotiff file that has no CRS in the metadata but I know that the CRS of the raster is WGS 84 UTM 22 N. How can I modify the geotiff file to have the CRS WGS 84 UTM 22 N in the metadata. Best Regards


title: UK region overlay on map

text: I'm hoping to overlay UK regions (East Midlands, Wales, London etc) on a Google Map. Ideally the regions could be coloured, opaque and have some form of label. There is no hover / interaction requirements for the overlays. Q - #1 - It seems like this could be achieved with KML or fusion tables. Which do you think would be better? Q - #2 - Do you know of a good source for the outline points of these regions? I've got access to points on other maps (SVG - see link below) but not sure if this translates. If regions are not available counties could be used and coloured the same (Counties - see link below ) SVG - http://www.guardian.co.uk/sport/datablog/interactive/2012/jul/11/olympians- map-uk-olympics Counties - http://www.guardian.co.uk/news/datablog/interactive/2011/nov/16/youth- unemployment-map Many thanks


title: What is the efficient way to dissolve polygons using Spatialite 3.0

text: I have polygon table called "tableA" with 72000 records. It has a geometry column called "geometry", and a text column called "field1". I want to aggregate\dissolve all polygons with the same "field1" value. I have a Spatial Index in Geometry and an index in field1. I tried this:               Select f.field1 as field1, st_union(f.geometry) as geometry     From tableA as f     Group by field1;      and its taking too long, I had to cancel it after being processing for 1 hour. Using Arcgis it toke me 5 minutes, so I must be doing something wrong. So, is there a better way to preform this operation using spatialite? Is the Spatial Index being used this way?


title: Running a web application within ArcMap

text: I'm interested in creating a component / plugin for ArcMap that works something like ArcGIS online. Ideally a small web app would boot up within a window in ArcMap which would be able to perform functions such as adding a layer and other standard tasks. In the first instance it would be a search tool, but may perform other activities in the future. Does anyone know if this is possible within ArcObjects? Is there an API, perhaps with a set of functions that can be called in JavaScript that can do this? Thanks Will


title: Find a suitable font size for the map scale?

text: Is there a website that suggests suitable font sizes for each scale level in the layout? I am currently using ArcGIS 9.3 but pretty soon will upgrade to 10. Thanks !


title: How to rotate tiles in Geoserver ImageMosaic

text: I am starting a project relatively "fresh" to geoserver. We have a large number of tiled (seabed) images to load up to geoserver using the ImageMosaic plugin in order to make a seabed mosaic. We know the geo-location of all the images as well as the scaling. We can calculate the required rotation offsets. When I add a rotation factor to the world file or Geotiff header I expect the images to be rendered rotated or "warped" but do not seem to be able to get anything other than unrotated images. How should I prepare my image mosaic folder so that all of the images are rendered rotated? Do I need to rotate them myself before uploading to geoserver or can I tell geoserver/ImageMosaic to do this for me? Thanks


title: Shifting a CAD file from ATS77 MTM 5 to NAD83 CSRS UTM 20

text: Looking to make the coordinate system shift in ArcMAP (for Nova Scotia) between ATS77 MTM 5 and NAD83 CSRS...NTv2 file?


title: How to extract polygon means from raster data and match the mean to the original attributes from the shapefile?

text: My polygons (p) was read from a shapefile (shp). I know that I can extract the polygon means by: means <- extract (r, p, fun="mean") My question is how I can match each mean with the attributes in the shapefile (names of each polygon). Thanks for your feedback.


title: Setting up local ArcGIS feature access services in Geocortex when the services (and end users) are behind a firewall

text: We have an ArcGIS server (version 10.1) at my workplace - it is inside the firewall, and will (it seems) stay there. We also have a Geocortex web mapping solution based on Amazon hosting (version 3.14). The content on the Geocortex site is based mainly on copy data we upload to the cloud server, together with available WMS services. What I try to do is to set up a site on our Geocortex to access certain feature access services on the ArcGIS Server for users within our firewall. That is - _server, data and users are all inside the firewall_. I am _not_ trying to make data available outside of the firewall. The problem is that the Geocortex REST manager application (which is in the cloud) requires access to the server to set up feature access services, and the firewall is preventing that. I have worked around this for WMS services by copying the GetCapabilities definition to somewhere outside of the firewall, but I can't find a similar workaround for ArcGIS services like feature access. Anyone know a way to access the service definitions without opening the firewall? I am loath to go through the cumbersome and time-consuming process of getting IT to open the firewall every time I want to make changes... Alternatively - do anyone have suggestions on other (affordable) solutions to set up a simple web-map for users inside the firewall using ArcGIS Online maps, available WMS services plus my feature access services?


title: QGIS 2.0 - can't select items in Print Composer

text: I am having an issue where I can create a print Layout in Print Composer, but once I have clicked away from an item (like map, legend, arrow, etc) I cannot select it again. Any pointers would be greatly appreciated.


title: how to make a list of features constructing the dissolved feature?

text: I need to simplify my road network using the dissolve function to remove nodes not occurring on the intersections. the following code is doing that.               arcpy.Dissolve_management(self.address_cor_layer2, self.address_dissolved_ref_layer2, "", [["NAME", "FIRST"]], "SINGLE_PART", "DISSOLVE_LINES")      what I need is to keep track of features creating the dissolved feature. for that purpose I want to make a list of FIDs as one field in the dissolved feature. any idea how to do that?


title: How to Get my Custom Toolbar to popup when my Custom Extension is Enabled?

text: I am developing a custom extension for ArcMAP in Arcgis 10, and would like to display my Custom Toolbar automatically instead of having the user to select it from the customize window. Is this possible? Further more is it possible to hide the toolbar, when the extension is switched off from the Extensions window?


title: Preventing an Openlayers WMS layer from updating on zoom-change

text: I'm using openlayers to overlay a raster. When I zoom out, the overlaid layer expands to cover a larger area than was originally requested. I want the tile to be fixed to a particular boundary, and for the WMS query to end, once the zoom changes. When I get the WMS layer the first time, it looks like this: ![enter image description here](http://i.stack.imgur.com/ABwCe.jpg) However, if I zoom out the screen then looks like this: ![enter image description here](http://i.stack.imgur.com/fTPL9.jpg) My javascript is as follows:               wms_url = 'mysite.com/mapserv.cgi?map=population.map&ny_pop';          oldRaster = new OpenLayers.Layer.WMS(                     "pop_raster",                    wms_url,                     {    layers: wms_layer,                          transparent: true                         },                    {    maxExtent: polyBounds,                          displayOutsideMaxExtent: false,                         tileSize: new OpenLayers.Size(tileWidth, tileHeight),                                            opacity: 0.3,                          gutter: 0                         }                   );                map.addLayer(oldRaster);      I've tried adding the attribute `persist: false` but it does not change anything. I calculate `polyBounds` using the screen size, and then `tileHeight` and `tileWidth` based on the screen resolution so that one tile fills the box that is drawn on-screen. When I inspect the `GET` command using `HTTPFox` the page seems to be actively pulling down more data from the WMS, but I'm not sure why as there are no fresh requests.


title: Non-deletion of nodes in QGIS

text: I've come across an annoying irritation. I have a .SHP converted from MapInfo which consists of a large number of features, a lot of which are made up of a whole heap of combined/multipart polygons. I'm doing a basic edit in deleting nodes. I get down to 2/3 nodes and then it won't let me delete them no matter what I do. The undo/redo indicates nothing is happening. Have tried removing and bringing up again. No issues until the last few nodes - seems to work ok prior, edit, select a number of ways, click node tool, click, click again, goes blue and doesn't do anything. It shivers but that's about it. Any suggestions? UPDATE: Ahaaa...."After selecting vertices for deletion, click the Delete key. Note that you cannot use the mActionNodeTool Node Tool to delete a complete feature; QGIS will ensure it retains the minimum number of vertices for the feature type you are working on. To delete a complete feature use the mActionDeleteSelected Delete Selected tool."


title: How can I combine two datasets with the same schema in to one table?

text: So I have two tables (in CartoDB/PostGIS) that are from two tiger shapefiles that have the exact same attributes, just in different counties. I want to combine them in to a single table, just appending the data from one to the other. What is the sql call to do that?


title: How to install gdal_merge to run with osgeo?

text: I recently installed OSGEO (http://download.osgeo.org/) which included python and gdal. I just realised however that there are many gdal libraries that were not included in this package for example gdal_merge. How can I install them into the osgeo environment?


title: How can I merge adjacent polygons and return all (adjacent and not adjacent) as Multipolygon?

text: I have a postgres database with administrative boundaries and their geometry. Each of those boundaries have an ident number. What I want to achieve: First I want to select all rows which are starting with a particular zip code. For example:               SELECT * FROM "post" WHERE "post"."ident" LIKE '101%'      All of those Geometries which are adjacent should be merged and those which are not should also be returned. I have tried those statements: This one I have from this answer: What is the best way to join lots of small polygons to form a larger polygon?               with t as (          select (st_dump(geom)).geom           from "post"          where "post"."ident" LIKE '593%'     ) select ST_UNION(geom) from t;      But this statement returns only those polygons which are adjacent but others are not included               with t as (          select (st_dump(geom)).geom           from "post"          where "post"."ident" LIKE '593%'          ) select ((ST_Dump(ST_UNION(geom)))) from t;      I get 2 rows, and it seems that this could be what I want, but I cannot get the result als ST_AsText. Is there a statement which returns all polygons merged where necessary and return it ideally as geoJSON or maybe as text? **_EDIT:_** I find a solution by myself:               with t as (          select (st_dump(geom)).geom           from "post"          where "post"."ident" LIKE '593%'          ) select ST_AsGeoJSON((ST_Dump(ST_UNION(geom))).geom) from t;      So I can access geometries and transform it into geoJSON. Adjacent geometries are merged and I get all other geometries which are also not included in merged polygon. I would answer this as an answer but I do not have enough reputation to answer my own question. So hope it helps other who read this.


title: How to access nodes of a line network by using programming?

text: I have been given a manually digitized drainage (stream) network that needs ordering based on some rules (purely based on that single vector layer). I have built and cleaned the topology (removed dangles, snapped nodes) by using GRASS that accompanies QGIS. I now need to work on individual nodes and line segment. Can anyone please point me in the right direction in choosing the programming tool that can:   * Access individual nodes and the corresponding line segments.   * Find the To & From nodes of each line segment and change them based on the rule. What I basically want to do is to :   1. manually mark the flow direction of the highest order stream (Nth order).   2. Identify the line segments merging at the From node of the Nth order stream i.e. identifying (N-1)th order streams and change their To-From nodes based on the rule.   3. Travel up iteratively till the 1st order line segment is reached. I have access to both QGIS as well as ArcGIS and I can work my way with both C++ and Python but have mostly worked with calling built-in functions, and never with writing my own low level code to access points and especially topology. Please point me in the right direction and some samples doing some similar stuff would be really helpful.


title: Error reading large virtual raster with rasterio: "Cannot invert degenerate transform"

text: I've created a virtual raster using `gdalbuildvrt`, which covers a large extent (England) at a high resolution. The data is fairly sparse, focused around the coastlines with no files covering inland areas. I'm trying to read the data in Python using `rasterio`. When I try to invert the affine transformation (to get world coordinates converted to pixel coordinates) I getting the following error:               >>> layer.affine     Affine(0.0002777778000000001, 0.0, -5.5000000044,            0.0, -0.0002777778000000001, 55.0000000836)     >>> layer.affine.__invert__()     Traceback (most recent call last):       File "<stdin>", line 1, in <module>       File "c:\Python27\lib\site-packages\affine-1.0-py2.7.egg\affine\__init__.py", line 407, in __invert__         "Cannot invert degenerate transform")     affine.TransformNotInvertibleError: Cannot invert degenerate transform      I don't get this error accessing the individual raster files. I have some idea of what it means, but not how to work around it. Perhaps it needs approaching in a different way? How do I access this data without having to worry about which file it's stored in?


title: Import GML data in SQL Server Spatial

text: I have GML file with Application Schema whose data I need to import into SQL Server Spatial. I have been creted database structure with all thing that I need in database, and now I need to fill it with GML data. How is this possible? **EDIT:** Does the SQLServer has some option to insert GML itself, or I need to use some other software like FME?


title: QGIS Legend horizontal not vertical

text: Hi is there an easy way to have the legend linked to the size of the box it is drawn in. So instead of running down the side of the page, it will be across the bottom in columns? Does that make sence....i dont want it to run as a line across the bottom either but define my box with lets say 3 items in each column?


title: MapServer with OpenLayers: Map is Pink, Trouble Displaying Layer Correctly

text: Having trouble using a mapfile with an html/js file(openlayers) together. Have a working example but can't seem to replicate it. Can also view the gist of the 2 files here The piece of code in question is:               var layer1 = new OpenLayers.Layer.MapServer( "CustomerAirports",        "http://192.168.2.164/cgi-bin/mapserv.exe",       {map: '/data2/html/airports3.map', layers:       ['CustomerAirports']}, {singleTile: true}     );          map.addLayers([layer1]);      As for the map file, the issue is around here (around line 51 in the gist):               LAYER       NAME CustomerAirports       TYPE point            CONNECTIONTYPE OGR       CONNECTION '/tmp/navhome/CustomerAirports.db'       DATA 'airports'            STATUS ON            LABELITEM 'ICAO'       #so on so on      I know the issue is definitely with var layer1. If I do a simple               var wms = new OpenLayers.Layer.WMS(       "OpenLayers WMS",       "http://labs.metacarta.com/wms/vmap0",       {layers: 'basic'}      );      there is no issue. Thoughts? Can't imagine this being a hard fix but first time trying to integrate openlayers and a mapfile. Edit: removed the               DATA 'airports'      from the mapfile and seems to be working correctly.


title: APIs to render custom WMTS source

text: We have a custom WMTS source which we want to show on Android and iOS. What would be my options to do this using native APIs (so no Leaflet or Open Layers)? An ideal API not only shows the maps but can also handle the interaction with a map (panning, pinch zoom, detecting clicks etc.). It should also offer us a way to draw figures, images and text on top of the map. I've tried searching for it online and so far I have come up with Google Maps and ArcGIS. Does anyone know any other native APIs, preferably open source or with a flexible license.


title: How to run "create mask" from the console?

text: There's a plugin called "create mask" for qGIS and trying out some simple scripting from the Python console. I would like to call it after I select the vector features I want, then do more related tasks afterwards. So, how does one run "create mask" from the console?


title: Join attributes by location

text: I am trying to join multiple records that occupy the same location (polygon centroid) and have tried using the join by location plug-in but have found this does not work for me in this case as I have more than one (up to 10) records that share the same location. I am trying to reduce the geometry by appending all records to the one point. Is there a solution in QGIS that can help me achieve this? ![enter image description here](http://i.stack.imgur.com/1L7Nm.png)


title: How to force QGIS Centroid Fill inside the Polygon?

text: I would like to use a centroid fill to enable me to place a letter inside a polygon. The advantage of using a centroid fill is that it also shows up in a legend, whereas labelling the layer would mean I have to put a text label on the legend in the composer. The problem I have with the centroid fill is that the centroid can fall outside of the polygon, and as such my letter will not be within the polygon I need it to be. I have included an example that shows where the centroid fills have worked, and one where it hasn't (the label shown in red): ![enter image description here](http://i.stack.imgur.com/9joFk.jpg) Is there a way to force the centroid fill to be inside of the polygon? Or is there another way to achieve this?


title: Why Can't ArcPy Search the Newly Created Feature

text: I'm running the following tool in ArcGIS 10. I have an ArcPy Script like this:               import arcpy     from arcpy import env     env.workspace=r"C:/sde/lcimrl.sde"     fc="SDE.ATTACHMENTS\SDE.attachment_points"     fcRows = arcpy.SearchCursor(fc, "OBJECTID = 11365")     for row in fcRows:         print "I found one"      The feature with OBJECTID 11365 is just created. It can find the feature if I run it as standalone script. But when I run it in the ArcMap's interactive python window or import it into a ArcTool toolbox and then run it, it cannot find the feature. I have to force the refresh of the SDE connection in the ArcCatalog, and then I can get the point. Or I have to wait for a while, like several hours, then it can find the point. I tried `arcpy.ClearWorkspaceCache_management(`) and `arcpy.refreshTOC()`. They do not help. Any help is appreciated.


title: How to merge multiple file geodatabases into one file geodatabase?

text: I have created a file geodatabase that has several feature data sets, feature classes, and domains. I have created a map with the file geodatabase added to it, converted the map to ARCPAD AXF format and **copied the map to several Junos changing the name for each Juno unit**. Data is being successfully collected. My question is: **How do I merge all these seperate geodatabases from the Junos into the central file geodatabase that I created originally?**


title: How do I use Proj4js or other technique to make custom map projections with google.maps.Projection?

text: I'm using Google's Projection class to try to convert my map projection from the default spherical mercator to something like Lambert Conformal Conic. I was previously adapting the code from this example to the v3 API, but am getting some weird drawing errors. Then I remembered Proj4 and decided to try it out. I'm not sure how to use it with the Projection's two main functions:   * fromLatLngToPoint()   * fromPointToLatLng() I understand how Proj4 returns a meter value when you pass it a lat long and a destination projection, but I'm not sure how that could be used with the Projection class's functions (or if this is even the correct approach to doing custom projections in Google maps anyway). I think the main thing that I'm not sure about is how to use the Point object in these functions. Am I going to need to take into account my map canvas size + my map bounds to do a calculation on my Point's relative position within the frame? Here's an image of what it looks like, and my code is below:               // my base layer, currently with no tiles     var lambertBase = new google.maps.ImageMapType({         getTileUrl: function(coord, zoom) {             return null;         },         tileSize: new google.maps.Size(256,256),         minZoom:  1,         maxZoom: 8,         name: 'Lambert'     });          lambertBase.projection = new ConformalConicLambertProjection();          var myLatlng = new google.maps.LatLng(34, -96);          // map options     var mapOptions = {         zoom: 4,         maxZoom: 8,         center: myLatlng,         panControl: false,         streetViewControl: false,         mapTypeControl: false,         zoomControlOptions: {             style: google.maps.ZoomControlStyle.SMALL,             position: google.maps.ControlPosition.TOP_RIGHT         }     }          // Draw the map into the div with the above options     var vMap = new google.maps.Map(document.getElementById('mapCanvas'), mapOptions);          vMap.mapTypes.set('lambertTiles', lambertBase);     vMap.setMapTypeId('lambertTiles');          // then I draw the county polygons          // projection utils (modified from link above)     var phi0 = 10*Math.PI/180;     var phi1 = 20*Math.PI/180;     var phi2 = 70*Math.PI/180;     var n = (Math.log(Math.cos(phi1)) - Math.log(Math.cos(phi2)))/         (-Math.log(Math.tan(phi1/2 + Math.PI/4)) + Math.log(Math.tan(phi2/2 + Math.PI/4)));     var rho0 = (Math.cos(phi1)*Math.pow(Math.tan(phi1/2 + Math.PI/4),n))/         (n*Math.pow(Math.tan(phi0/2 + Math.PI/4),n));          function ConformalConicLambertProjection() {};     ConformalConicLambertProjection.prototype.fromLatLngToPoint = function(latLng) {         var z = vMap.getZoom();         var t = Math.PI/180*(100 + latLng.lng())*n;         var rho = (Math.cos(phi1)*Math.pow(Math.tan(phi1/2. + Math.PI/4.),n))/             (n*Math.pow(Math.tan((Math.PI/180*latLng.lat())/2. + Math.PI/4.),n));         var x1 = rho*Math.sin(t);         var y1 = rho0 - rho*Math.cos(t);         x = Math.round(Math.pow(2,z)*(128 + 290.9090909090909*x1));         y = Math.round(Math.pow(2,-1 + z)*(405.68181818181824 - 579.5454545454546*y1));              return new google.maps.Point(x, y);     };     ConformalConicLambertProjection.prototype.fromPointToLatLng = function(pixel, noWrap) {         var z = vMap.getZoom();         var x1 = (-0.0034375*(Math.pow(2,7 + z) - pixel.x))/Math.pow(2,z);         var y1 = -0.0017254901960784311*Math.pow(2,1 - z)*             (pixel.y - 405.68181818181824*Math.pow(2,-1 + z));         var rho = Math.sqrt(2.143305952697287 + Math.pow(x1,2) -              2.9280067982826044*y1 + Math.pow(y1,2));         var t = Math.asin(x1/rho);         var lng = 78.17779218926289*t-100;         var lat = 28.64788975654*(-3.141592653589793 +              4*Math.atan(2.004758218840869/Math.pow(rho,1.3644598756425434575)));              return new google.maps.LatLng(lat, lng, noWrap);     };


title: extracting values from maps and inserting into a summary table

text: I have several maps that I am working with. I want to extract the values (1, 0 and NA) from the maps and place them all into a summary matrix. Since I have so many maps, I think its best to do this as a for loop. This is the code I have so far and my maps and empty summary matrix are uploaded to my Dropbox here: DATASET here               setwd ('C:/Users/Israel/Dropbox/')     require (raster)     require(rgdal)     require (plyr)          #load in the emxpy matrix to be filled     range.summary<-read.csv('range_sizes.csv', header=T)          #load in maps and count pixels      G1.total<-raster('Group1/Summary/PA_current_G1.tif')     G1.total.df<-as.data.frame(G1.total)          #these are the values I need to be placed into the empty matrix (range.summary)     count (G1.total.df)


title: Finding the best way to prepare raster image for a function in R

text: I'd like to ask what is the best way to prepare big raster images in R to run a function on whole images. I have 30 tiff images with the size of ncol=12648, nrow=4144. I read them in R separately. Then, I stacked all 30 raster images into one. Now the image size is ncol=12648, nrow=4144, nlayer=30. I'd like to run a function on the image in R. But due to big size of image, R is taking sooo long time. Therefore I need to find the best way to prepare this image without restricting file size. My main purpose is to run a function on whole image without separate it into small sections. Is there any way to do this except cropping? If so, please share with me. Thank you very much


title: How to set the value of a pixel based on its current value?

text: I am attempting to set the value of a pixel based on its current value. I am using the Raster Calculator in Quantum GIS dev 1.7 trunk. For example, if the value is 0, I want to set it to 255. Based on an example that I found, something like this should work, but it doesn't.               myRaster@1=0 255       The RasterCalc plugin appears to use a function syntax, but that doesn't appear to be valid either               eq( myRaster@1, 0, 255)      Any suggestions? Thanks.


title: Using an integer variable in where-clause in arcgis python script

text: I've seen some questions on this, but there seem to be many different answers... and none have seemed to work. I'm trying to include an integer variable in the SQL where-clause of a tool like this (arcgis 10 python script):               newR = ExtractByAttributes(inR, '"IntField">=2508')      where inR is an integer raster, IntField is an integer field in its attribute table. The above works, but how can I substitute an integer variable instead of 2508? I've tried all kinds of different quotes and concatenation, but have not been able to, any ideas appreciated. Thanks


title: Find GPX files which contain tracks located in a specified bounding box

text: I have a bunch of GPX files and I want to find out which files contain tracks located in certain geographic extent, e.g. files containing tracks in Pennsylvania. Also, the inverse is also useful too, e.g. any file containing tracks _not_ in USA. How to do this using any command line tool? Gpsbabel's polygon filter looks like what I want. But for some reason I could not make it work. The filter does not filter anything. I am not sure whether the polygon filter works with track data. This is how I run it:               gpsbabel -i gpx -f infile.gpx -x polygon,file=test_bb.txt -o gpx -F outfile.gpx      Adding `exclude` suboption to polygon filter does not make any different to the output as well.


title: Why does the Service information disappear on ArcGIS Server Manager?

text: I have 41 services on our ArcGIS Server. The Server Manager holds roughly 10/page. When I click on any page other than page 1, the service information disappears (status, number of instances, etc.) ![enter image description here](http://i.stack.imgur.com/WmSJd.png) When I refresh, it always takes me back to page 1. Any ideas on how to fix this issue? Running ArcGIS Server 10.1 The services disappear in IE 9 and Firefox. I can't login via Chrome so no way of telling if it would work or not.


title: No Load kml in Openlayers MVC ASP.NET

text: I have a problem to load a kml map using OpenLayers. I used this in this example: http://www.openlayers.org/dev/examples/sundials.html I put the following script to load the kml               var wms = new OpenLayers.Layer.WMS('OpenLayers WMS','http://vmap0.tiles.osgeo.org/wms/vmap0', { layers: 'basic' }, {});             var gphy = new OpenLayers.Layer.Google("Google", { type: G_PHYSICAL_MAP });     var geomor = new OpenLayers.Layer.Vector("KML", {                     projection: map.displayProjection,                     strategies: [new OpenLayers.Strategy.Fixed()],                     protocol: new OpenLayers.Protocol.HTTP({                         url: "/Shapes/Geomorfologia/est_temp2.kml",                         format: new OpenLayers.Format.KML({                             extractStyles: true,                             extractAttributes: true                                                 })                     })                 });     map.addLayers([wms, gphy, geomor]);      Only this kml not loading the folder where is the kml, this application within the Visual Studio folder. Why kml will not be changed. Alquem could tell me what's wrong.


title: How to use the field calculator's centroid() Geometry function in qgis 2.0?

text: There is an option in the field calculator for centroids under geometry which when you double click gives you "centroid( ". What information is required here in order to use this function?


title: How to add Legend Panel to Dojo / Openlayers?

text: I have openlayers app on dojo framework. I've been serving WMS layers with geoserver and wanted to use GetLegendGraphic to build legend for all layers. I've seen there are some ready widgets (like Legend Panel in esri api or geoext) and was wondering is there anything I can easily use with dojo or openlayer?


title: How do I force the comma into Acres number on the ModelBuilder?

text: I'm writing a ModelBuilder to run many shapefiles output to database that has the sum acres for each crop however by looking at the field column it does not show comma like for example Alfalfa 351178.314628 what I would like to make the number 351178.314628 into 351,178 ? I can export it to python and add if there is code; however I am not python expert. I'll have this screenshot sample: ![Summary ModelBuilder](http://i.stack.imgur.com/FvEbS.png) ![enter image description here](http://i.stack.imgur.com/fCU7Z.png)


title: GRASS and r.viewshed

text: I'm trying to run the r.viewshed command using co-ordinates held in a .csv file I imported using v.in.ascii. It has over 200 rows and I'm looking to run viewsheds from each line, without doing it manually. I can't seem to add the coordinates to the r.viewshed command without doing it manually. I'd also like to look at creating a script so I can run them one after the other without much involvement. My command at the moment is: r.viewshed input=MasterRaster@CotswoldSevern output=BRK11 coordinates=370546.006419,171670.256898 What I would like to try and do is get the co-ordinates out from the .csv Can anyone help?


title: gdal_grid failing to set nodata

text: Using gdal_grid for spatial interpolation I have run across a problem: the nodata argument is ignored. The only solution I have found for this is to then use `gdal_translate` but it is rather cumbersome (see below). My bash scripting skills are very, very minimal. Can anyone suggest an improvement, like passing the outputted file directly to the next tool?               gdal_grid -zfield "D2012" \     -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=-9999 \     -txe 647822 651672 -tye 7535500 7537800 -outsize 77 46 \     -of GTiff -ot Float64 -l probe2004_2012 probe2004_2012.shp ./Output/temp.tiff     gdal_translate -stats -a_nodata -9999 -a_srs EPSG:3006 ./Output/temp.tiff ./Output/2012_IDW_2_50.tiff     rm ./Output/temp.tiff


title: How to add google satellite as a base layer for a geoserver generated openlayers page

text: İ have added a shape file to geoserver and generate a wms page. I want to add google satellite as a base layer but i can't do it. would you please give me a hint how to add google satellite as a base layer. Thanks in advance


title: How to find variable names for SF1 Census files

text: I'm trying to to read the 2010 Census data so that I can link some of my research data to geographic information. Ideally I would like to use census tract data and other covariates. I've downloaded the 2010 SF1 files for the relevant states, but my issue lies in understanding what the text files mean. I use R, but getting the data into R is not a problem (because they're comma-separated). I'm prepared to do massive amounts of data management before I can use the data, but I need simple things... like row and column names?For example, what is:               SF1ST,TN,000,03,0000001,6346105,4921948,1057315,19994,91242,3642,141955,110009,6346105,6056046,290059,6346105,6056046,4800782,1049391,16302,90311,2767,6422,90071,290059,121166,7924,3692,931,875,135533,19938,6463754,5019639,1107178,54874,113398,7785,160880,6463754,6152022,4882031,1094696,47888,110618,6070,10719,311732,137608,12482,6986,2780,1715,150161,6346105,6236096,4921948,1057315,19994,91242,3642,141955,110009,103173,36370,25649,15145,1476,12638,3492,1971,528,2381,384,73,657,533,1482,394,6177,3000,686,100,445,465,88,285,419,237,62,92,23,76,84,59,11,13,12,2,18,518,220,23,70,47,21,2,69,16,8,11,18,4,0,6,3,137,116,9,0,3,7,2,4,4,6346105,290059,6056046,5965975,4800782,1049391,16302,90311,2767,6422,90071,84716,34626,24046,14541,1333,1640,3269,1842,477,933,332,48,102,479,992,56,4897,2646,602,93,178,413,83,96,384,113,16,85,21,36,65,39,4,8,8,0,7,368,176,22,37,43,9,1,48,5,1,9,12,0,0,3,2,88,80,2,0,0,4,2,2,2      from the tn000032010.sf1 file? Where can I find a key that indexes each value in the vector to tell me what it means? Or even, is there a list of possible variables (and the way the data is coded) so that I can use API to subset desired data? Any guidance is appreciated. Yes, I've read the README and spend a few hours going through the 500+ page documentation.


title: length and width of polygon

text: how can i find polygon's length and width in Qgis(regular polygon and irregular polygon)? i have area and perimeter but possible to have length and width ?.![enter image description here](http://i.stack.imgur.com/6RLnQ.jpg)


title: Set up the center of a map with Google Layer as basemap in OpenLayers and GeoExt?

text: I looked on similar questions but in vain. The map is working fine but has a center of (0,0) as returned in the Firebug console not (-8, 32) that I want. I did the projection transformation.. Here is my code : ![enter image description here](http://i.stack.imgur.com/uy51X.png)


title: View in ArcSDE 10.1 Problem

text: I have created a view by joining a feature layer and 2-3 other tables in ArcSDE database using help from James Richard Post. The view gets created fine in both SQL Server 2008 and also in SDE. In SQL Server it shows records and geometry but when it comes to ArcGIS it does not show table or geometry in ArcGIS Desktop 10.1.   ![enter image description here](http://i.stack.imgur.com/kII8R.png).   It shows only the geometry in ArcCatalog but not the table in preview table. Below is my code:               SELECT SPE.[OBJECTID] ,SPE.[BaseId], SPE.[PlayId] , B.[BasinName], SP.[ShaleName], AGS.[AgeS],  SP.[Ref] , SPE.[Shape] , SPE.[Shape_STArea__], SPE.[Shape_STLength__]         FROM [dbo].[Play] SPE inner join [dbo].[Base] B on SPE.[BaseId]=B.[OBJECTID]             inner join [dbo].[shale] SP on SPE.[Shale]=SP.[OBJECTID]             inner join [dbo].[Age] AGS on SPE.[AgeId]=AGS.[OBJECTID]


title: MRT (MODIS Reprojection Tool) input error

text: This is my first time to use Modis Swath Tool to deal with images. I've downloaded 4 MOD44B granules (using the FTP script method), and am trying to use MRT to mosaic them. When I add the 2 files I get an error saying firstly One of the input files does not exist or the inputs are not the same data product type then Input file does not exist!. If I add files individually, I get an error saying Error in Module: ReadHrFile, Opening Input Header File. I saw this error before in this website, but I still failed to fix it following the answer to this question by opening ModisTool.BAT rather than the ModisTool.JAR executable. Any one knows how to fix it? Any help will be appreciated. Thanks very much. Versions: MRT: 4.1 (March 2011) Windows: 7 Java: 7


title: How to Create Feature Layers and Search by Location for all Feature Classes in Geodatabase?

text: I'm very new to python, but I'm having trouble finding the answer on my own. I need to loop through a given file geodatabase, select any features that intersect a project polygon and then search the selection for specific information. Broadly, how does one create feature layers for all the feature classes in a feature dataset and then pass those layers onto select by location? My code so far ...               import arcpy     import csv     arcpy.env.overwriteOutput = True          arcpy.env.workspace = "C:\\Users\\Katherine.idea-PC\\Desktop\\FinalProject\\Water.gdb\\WaterDistribution"     featureClassList = arcpy.ListFeatureClasses()     projectArea = "C:\\Users\\Katherine.idea-PC\\Desktop\\FinalProject\\ProjectArea.shp"     outputCSV = "C:\\Users\Katherine.idea-PC\\Desktop\\Final Project\\Output.csv"          for featureClass in featureClassList:          arcpy.MakeFeatureLayer_management(fc, fc+"_lyr")          arcpy.SelectLayerByLocation_management (fc + "_lyr", "WITHIN", projectArea)