Improving speed on pgRouting on table update with many rows: faster to loop on each row than a table update call?

I am updating thousands of rows in a survey table finding shortest path from each place a survey respondent visits. My code below is the query I use to update the blank route column. The function "pgr_fromAtoPO" is the same as the "pgr_fromAtoB" listed on the pgr tutorial, except the name of the tables have been changed. I initially tried to run the querry to update my entire table, with 90,000 rows of start and end points. This ran for 2 days and crashed my 8GB RAM 2.0GHZ quad core macbook pro, so I have since changed my querry to limit the rows to 5,000. This querry took below took 112 minutes on 5000 routes.               update analysis.po_routing     set route = (select st_multi(st_union(geom)) from pgr_fromAtoPO('osm2po_routing',x1,y1,x2,y2))      where uniqueid <    605300515      and uniqueid >=     604479116      and route is null and x1 is not null;       My question is: Are these functions optimized for single calls (i.e. what a website might get), so would I be better off looping through each individual row separately rather than a call to update 5,000 rows, and is there some sort of memory limit, such that I would be better off updating a smaller chunk of rows at a time, say 500 or 1000 to improve the speed? Thanks for your help.


Displaying data from related records in a flat table after selecting a feature on the map

I have an ESRI feature service with 2 Layers: layer 0: Administrative boundary (0) and layer 1: Tables: MEP_global_data.DBO.mep_catalog (1) Layer 0 has the geometry of the administrative boundaries of the world. Layer 1 is a flat table with no geometry The 2 layers are linked by a country code column in each. I've done lots of searching but can't find any examples or a way to do the following: When I click on a country displayed on a world map (layer 0) via leaflet in my browser, I want a popup that displays data from the flat table (layer 1) for that country. Is there an example that does something similar I can review or can someone suggest a way I can make this happen? Layer: Administrative boundary (0) and Tables: MEP_global_data.DBO.mep_catalog (1)


In arcgis how do I filter my geo data in a certain state?

I currently have a database of points that contains latitude and longitude. What I want to do is to filter out all the points so that only the ones that are in Texas will show. I have done a spatial join with the target as the points and the join as the state, but it still shows all the points from the original set.


C++ Code Examples in Quantum GIS 1.8

I am trying to utilize the C++ code examples from blog.qgis.org, specifically Tutorial 4, Adding Rasters to QGIS Map Canvas. I am successfully able to run the example loading a GeoTIFF with QGIS 1.4, however with 1.8 I get "Layer is Not Valid". As a note, the same GeoTIFF file was able to be loaded in the QGIS 1.8 application just fine, but not in the example code. I've tried with several different files, with the same result. Is there additions to the 1.8 API which require additional calls to get this functionality to work? Problem code below. The full example code can be found at http://blog.qgis.org/node/94 Operating System: Fedora 17 64-bit, QGIS 1.8.0               void MainWindow::addLayer()     {       QString myFileName = QFileDialog::getOpenFileName(this, tr("Open File"),                              QCoreApplication::applicationDirPath () + "/data",                              tr("GeoTiff (*.tif)"));       QFileInfo myRasterFileInfo(myFileName);       QgsRasterLayer * mypLayer = new QgsRasterLayer(myRasterFileInfo.filePath(),        myRasterFileInfo.completeBaseName());       if (mypLayer->isValid())       {          qDebug("Layer is valid");       }       else       {          qDebug("Layer is NOT valid");          return;        }


Python scripting for ArcPad Checkin

I can use ArcGIS Desktop model builder to leverage the ArcPad Check In Tool. When I run the model it executes successfully. When I export the model as python I get this code:               import arcpy          # Local variables:     Test02_axf = "C:\\aWorkspace\\ESA\\ArcPad\\AXFs\\Test02.axf"          # Process: ArcPad Check In     arcpy.ArcPadCheckin_ArcPad(Test02_axf, "", "")      However, when I run this code in the python window I get:               Runtime error      Traceback (most recent call last):     File "<string>", line 8, in <module>     AttributeError: 'module' object has no attribute 'ArcPadCheckin_ArcPad'      And yes indeed arcpy has no function named ArcPadCheckin_ArcPad. So model builder must be exporting erroneous code. Does someone out there know what the issue is here? Is there really anyway to do this operation with python?


How to make a minimal distance matrix for polygons using QGIS?

I have a set of polygons and I want to find minimal distances between the edge of each pair of them. It's similar task as in this question: How to find the minimum edge to edge distance of polygons? But I'd prefer to make it in QGIS or other free available program. Also I'm very beginner in using geographic information systems software so I'd be really grateful if you make your answer as simple as possible.


Extra Column after Using Polyline to Raster

Does anyone know why there is an extra column in the resulting raster file (Raster2) after using the tool Polyline to Raster in ArcMap 10.2? I had imported the cell size and set the extent to be the same as another raster file (Raster1). In the end. Raster 2's cell size and number of rows is the same as Raster 1, but Raster2 has one extra column.


Replacing raster values in one raster with another raster in QGIS ... how to?

I have a raster (DEM) and want to replace a few cell's values with the values from another raster in QGIS. I would have done this with the "over" tool in the raster calculator in ArcGIS. Specifics: To potentially restore a mire, I want to model how the water flows if dams were to be put into place across some ditches. So, I have the original DEM and would like to add the dams to it (to then do an flow accumulation analysis). I cannot just add a few meters to the cell's values, because the dams are supposed to go across the ditches (so 90 degrees to the ditches) ... so, a constant would not result in an even dam, but a v-shaped one. Is somebody able to help?


ArcGIS Address range displaying 0s

I used the address range VB script               Function FindLabel ( [TOADDL], [TOADDR] )       FindLabel = [TOADDL]  & "/" & [TOADDR]      End Function      **Tried**               Function FindLabel ( [TOADDL], [TOADDR] )     if (([TOADDL] > 0) AND ([TOADDR] > 0)) then:       FindLabel = [TOADDL]  & "/" & [TOADDR]      End Function      But Still did not work To display the address ranges but my map comes up with 0s all over the map. What else can I add to the coding that would suppress and not display the 0s on my map. See attached left side. ![enter image description here](http://i.stack.imgur.com/Zfceu.jpg)


Are there any open source packages to help process network links?

I'm trying to find an open source package that can process KML-based network links. I am looking for more than a parser -- more along the lines of setting up timers for interval refreshing, handling `<Update>` elements, handling the `<NetworkLinkControl>` element, etc. I'm am aware that Google Earth API does this for you, but I am in need of an alternate mechanism to mirror that.


How to compare aerial and satellite images for land use analysis?

I am interested to compare the land use-cover dynamics for four periods: 1950s, 1980s, 1990s and current for a certain area having a max size of 5000 ha. For the first three periods detailed aerial photo of scale 1:20 000 are available while for the current no photo is available and the only possible option I can use is the coarser scale images such as LANDSAT images which can be downloaded for free. I have no fund to purchase detailed images. My question is how can the information obtained from the more detailed photos be comparable to the one to be obtained using the LANDSAT images for such small area? I would appreciate very much if anyone can suggest possible outcomes and consequences of this analysis or any suggestion for a way out?


OpenLayers - How to create 2 vector layers; 1 draggable and the other is not?

Is there a way to make one vector layer (or a certain kind of feature draggable), while the other types of feature or layer is not?


Why are my buffers not circular?

I would like to select areas under a particular circular radius in QGis. I believe this is accomplished with the buffer tool, but when I specify the radius the area is not circular. How to make it circular?


OL 2.10 Text layer

I heard that the latest version of openlayers 2.10 text layer provides a new feature of defining user specified attributes and so I want to give radius values under column radius, but even the latest 2.10 documentation doesn't contain anything about this... can anyone provide any information about this


Is there a service that does geocoding with advanced language support?

I'm building an address disambiguation page and I'm interested in having geocoding results returned in the local language of the country the result's in. For example, if I make a reverse geocoding request for "Bucharest, Romania", I want the location returned to be "București, România" (the local name). If I have an ambiguous query, I want each result to be returned in the language of the country it's in. Say there was a Bucharest in the U.S, I'd want a search for "Bucharest" to return "București, România" and "Bucharest, U.S.A". I've studied the Google Maps API, Yahoo! Maps and Bing Maps. Google is the only one that has _some_ language support (see the `lang` parameter), but only for the entire resultset, as far as I understood. Bing and Yahoo! don't have any language support in their API. Do you know of a way to do this? Is there any other service that supports this type of functionality? Thanks,   Alex


Best way to add Attribute data to a shape file

Hei GISers!! Thanks for your help with my previous question. My apology if this may be too simple a question for this site, but I am still learning the various aspects of GIS. Now that I can display the shapefile in openlayers, I need to add some attribute data. I can open the dbf file in excel but there is no save as option in excel to the updated file as a dbf. So my question is, what is the best way (or software to use) to add attribute data to my shape file? Thanks Chris


Combine DEM raster with vector data. in ArcScene 9.3

Ive have a raster layer of earthquake data that includes depth. I also have a DEM file. The problem is that I need to plot earthquake depth relative to the DEM file rather than sealevel in order to realistically place the focal points in Arc Scene. Simply using the depth data for base heights results in earthquakes that occur in the water rather than below the sea floor. I've tried fooling with the Z unit conversion and offset, but any adjust that produces reasonable result for earthquakes beneath the ocean floor leaves earthquakes that occur under mountainous area looking too deep. Thanks Doug


Python scaling issues and possible subprocess conflicts?

I have always found such great analytical and programming expertise on StackExchange in the past that I hope you can help me. Background: I have a project that involves spatially joining and interpolating traffic volume data across a road network on a continental scale. In order to handle the data processing, I have broken the data down by state and then into 10km processing tiles. States will run on parallel processes, which call a subprocess module to actually do the data processing in a 10km area at a time until the state level script is finished. The interpolation process starts with a road segment that has joined traffic data and searches connecting street segments with matching road name until it finds another segment with data. Then the code interpolates for segments in the middle. The problem: When I run a single 10km tile or even ~20-30 tiles (for the same state), I get interpolation values that are expected given the algorithm I defined. When I start processing the entire state (thousands of tiles) with the very same code, I will get interpolation values for the same road that exceed the endpoint counts by orders of magnitude in either the positive or negative direction (and how could my traffic volume go negative, right?). Considering that the calculations will change for the same road depending on how much data is being processed, I feel that this is somehow more of a scaling or instability issue with Python, and not a bug in the code logic. I was initially doing all the looping by referencing nested ArcGIS searchcursors (agh, experience backs up all the forum recommendations to NOT do that). So, I used an ArcGIS 10.0 searchcursor just once to read the street segment geometry and needed attributes into a Python dictionary for faster "lookups" during looping. The performance over ArcGIS searchcursors (even the new arcpy.da module) is amazing. I can now process the entire continent's worth of street data in two days. But now I'm wondering if Python dictionary tables can become instable if they get too large, or if the subprocess is not properly releasing memory objects before returning to the master script. There isn't any data passed from the subprocess back to the master; it's written to a permanent geodatabase table before closing. I wondered initially if the problem was running parallel processes, but I get the same unstable behavior for a single process on the state-level. I'm really not an expert Python programmer, though I've been effective in adapting other people's solutions to large data processing. This feels like one of those questions that a real developer could answer, as opposed to a code "pirate" like me. I don't know that posting all my scripts will be helpful, as I think I'm looking for someone to point me in the right direction to research possible issues/solutions with python/subprocess instability, dynamic changing of values in dictionaries, etc. I think if I had a good starting place on issues that cause that kind of behavior, I could problem solve from there (hopefully).


How to convert crs projection of Map in qgis

I am totally new to GIS. I have a qgis project. I am adding the screenshot. ![enter image description here](http://i.stack.imgur.com/AftFv.png) As you can see the map is sort of rectangle in projection. How can i project it like this (without the grids) ![enter image description here](http://i.stack.imgur.com/ukqw1.png) Thanks


CartoDB Toggle Map View?

I am trying to follow this tutorial that has buttons to toggle (all points are on the same layer) CartoDB Toggle map tutorial I try to follow as close I can for my own purpose but I always get the error under line 71 "uncaught reference Error: layer is not defined" (see attached screen shot) Can anyone tell me what I did wrong? I tried messing around with all the Layers, Sublayers, layer, sublayer...but non worked. Here is the script                              beginning of script tag                                   var layerUrl = 'my cartodb url';         var sublayers = [];            function main() {         cartodb.createVis('map', layerUrl, {             shareable: true,             title: true,             description: true,             search: true,             tiles_loader: true,             center_lat: 22.273904,             center_lon: 114.174510,             zoom: 14         })                   .done(function(vis, layers) {           layers[1].setInteraction(true);           layers[1].on('featureOver', function(e, pos, latlng, data) {             cartodb.log.log(e, pos, latlng, data);                     });                map = vis.getNativeMap();                  var subLayerOptions = {       sql: "SELECT * FROM final_landreclamation_all" }             var sublayer = layer.getSubLayer(1);                 sublayer.set(subLayerOptions);                 sublayers.push(sublayer);                   })         .error(function(err) {           console.log(err);         });              var LayerActions = {     all: function(){       sublayers[1].setSQL("SELECT * FROM final_landreclamation_all");       return true;     },     Saiwan: function(){       sublayers[1].setSQL("SELECT * FROM final_landreclamation_all where district_en = 'Saiwan'");       return true;     },     Sheungwan: function() {       sublayers[1].set({         sql: "SELECT * FROM final_landreclamation_all where district_en = 'Sheungwan'",       });       return true;     }      } $('.button').click(function() { $('.button').removeClass('selected'); $(this).addClass('selected');               LayerActions[$(this).attr('id')]();      });                 }            window.onload = main;          end of script tag      ![Screen Shot](http://i.stack.imgur.com/WSVw4.jpg)


Randomly choosing one from multiple fields in Field Calculator of ArcGIS for Desktop?

Using the Field Calculator in ArcGIS for Desktop, I want to randomly choose one field from a list of 10 fields (strings). The Excel equivalent, which is working, is: `=INDEX(A2:J2;rnd()*10+1)`. How can I do that in VBScript preferably (or in Python)?


How to make pen style show up correct in QGIS map composer legend?

As far as I can tell, yes I've updated the legend. See new screenshot. It's like the field width is cutting them, they all begin with one long and then one short line..   ![enter image description here](http://i.stack.imgur.com/E3asz.png) I have a several different line shapes files that represent buss lines. When I set "Pen style" to different styles I see the changes on the map but it doesn't appear correct in the legend in QGIS map composer. Fix or work around needed! Using QGIS 2.0 on Mac.      ![enter image description here](http://i.stack.imgur.com/JQG60.png) ![enter image description here](http://i.stack.imgur.com/oi0hI.png)


Problems with zooming and mouse events in Openlayers

I'm having trouble with everything mouse related for an Openlayers map when the map is placed inside a DIV with position fixed. The map works fine when you're at the top of the viewport of the browser, but when you're scrolling down the page, you can see that the zooming/click effects are shifted. You can check here http://41.32.148.178:82/#!search=KFC%2F0%2F0%2F0%2F%2F to see exactly what I mean. Thanks.


Symbology levels are ignored in ArcGIS 10

I have a problem migrating from a ArgGIS 9.3 to a 10 geodatabase (both sde and file gdb). The symbology levels stored in the 9.3 database are not transferred. When migrated to ArcGIS 10.0, symbology levels are ordered by alphanumerical order, and not the order assigned by me. I tried to migrate the data both by copying the featureclass and by upgrading the database -- both with the same dissapointing result: The symbology levels go back to the alphanumerical order of the categories. This is a BIG problem for me, since I have a massive amount of symbology levels in lots of featureclasses each having different representations. Have any of you similar experiences? More importantly: Is there a fix for this?


Simplest way to publish WFS from SQL Server under ASP.NET

My environment is ASP.NET, with data stored in SQL Server. Is there a way to serve Web Feature Services through C#, or will I need to install a mapping server?


Customize the legend elements

I want to customize the legend box elements .Please check the screenshot![legend](http://i.stack.imgur.com/L6y8x.png) (I want to remove the highlighted information ...its the map service name and symbol in ArcMap) How its possible? Is there any way or Are there any parameter in the legend constructor ?? I tried to modify following code but it was not successful.. Code: `dojo.connect(map,'onLayersAddResult',function(results){ var layerInfo = dojo.map(results, function(layer,index){ return {***layer: abc,title: 'new legend'***}; }); if(layerInfo.length > 0){ var legendDijit = new esri.dijit.Legend({ map:map, layerInfos:layerInfo },"legendDiv"); legendDijit.startup(); } });` Thanks in advance : )


Python Mapscript 6.0.1 layer.getShape API

I am attempting to follow the mapscript example described here - http://trac.osgeo.org/mapserver/wiki/RasterQuery but ran into some trouble with               s = layer.getShape(result.shapeindex, result.tileindex)      It appears that this no longer works               In [63]: s = layer.getShape(result.shapeindex, result.tileindex)     ---------------------------------------------------------------------------     TypeError                                 Traceback (most recent call last)     /Users/calvin/work/luc/<ipython-input-63-969295303151> in <module>()     ----> 1 s = layer.getShape(result.shapeindex, result.tileindex)          /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MapScript-6.0.1-py2.7-macosx-10.7-x86_64.egg/mapscript.pyc in getShape(self, *args)        1395     def nextShape(self): return _mapscript.layerObj_nextShape(self)        1396     def close(self): return _mapscript.layerObj_close(self)     -> 1397     def getShape(self, *args): return _mapscript.layerObj_getShape(self, *args)        1398     def getNumResults(self): return _mapscript.layerObj_getNumResults(self)        1399     def getResultsBounds(self): return _mapscript.layerObj_getResultsBounds(self)          TypeError: layerObj_getShape() takes exactly 2 arguments (3 given)      What is the argument I ought to supply to getShape method to get it working again?


post gis command prompt problem

While I'm working in post gis sql command prompt its mode changing automatically. I mean that the general form of command prompt as follows template_postgis=#(we type query's here) While working some time, when a query given its changed as **template_postgis <#** if any key pressed its unchanged again comes as **template_postgis <#** how can I change this to normal form like **template_postgis=#**? psql (8.4.5) WARNING: Console code page (437) differs from Windows code page (1252) 8-bit characters might not work correctly. See psql reference page "Notes for Windows users" for details. Type "help" for help. template_postgis_20=# create table cities (id int, name text, state_name text); CREATE TABLE template_postgis_20=# select addgeometrycolumn ('', 'cities') template_postgis_20-# select addgeometrycolumn ('', 'cities', 'latlon', 4326, 'M ULTIPOINT', 2); ERROR: syntax error at or near "select" LINE 2: select addgeometrycolumn ('', 'cities', 'latlon', 4326, 'MUL... ^ template_postgis_20=# SELECT addgeometrycolumn ('', 'cities', 'latlon', 4326, 'M ULTIPOINT', 2); ##  addgeometrycolumn public.cities.latlon SRID:4326 TYPE:MULTIPOINT DIMS:2 (1 row) template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# fgfgfd template_postgis_20(# fgfdgfd template_postgis_20(# gfdg template_postgis_20(# re template_postgis_20(# tre template_postgis_20(# tr template_postgis_20(# gfgretrytojyhftipg ccnb ds template_postgis_20(# fgfdgfd template_postgis_20(# fgfdgfd template_postgis_20(# 222 template_postgis_20(# @@@@@@@@@@@@@@@@ template_postgis_20(# template_postgis_20(# template_postgis_20(#


Edit Shapefiles Attribute data in GeoServer Programatically

I'm rendering a shapefile using GeoServer and using OpenLayers library to render it in the web browser. Now I have created the option of editing the attribute data in web browser. I want the edited data to get reflected back in the original shapefile. What is the best method to edit shapefile programatically using Python. I'm quite new to GIS concepts. Or do i need to convert it to PostGIS format in- order to edit the attribute data using Python? What are the best practices and way to go? Thanks in advance.


How to replace corrupt representations stored in a geodatabase using symbology from layer file?

I have a lyr file with symbology that I want to store in the database. Symbolology is already stored in the geodatabase but the symbology levels has been corrupted migrating from 9.3 to 10. Thus, I want to replace it with the symbology from the lyr file. How do I do that??


How does cost allocation work?

Why, when I use the cost allocation function of Spatial Analyst, is space not allocated in all input source locations (as shown in image below)? In particular, the input raster has 18 spots while the cost function allocates only 14 spaces. Can I force the function to allocate space in all input source locations? and how? ![Map of 14 colored regions \(raster format\)and 18 points](http://i.stack.imgur.com/BTpXj.jpg) Full-sized image here: http://i.stack.imgur.com/5k1Od.jpg ![enter image description here](http://i.stack.imgur.com/pNUMG.jpg)


Referencing Feature Dataset in File Geodatabase with ArcPy

It's probably an obvious one but since I'm new to arcpy I'd appreciate any help. I'm trying to develop an arcpy script which will eventually loop through number of rasters and feature classes stored in file geodatabase. I'd like to export spatial reference for these attributes along with their name to csv. I managed to do that for raster datasets, however I'm struggling with feature classes. All rasters are stored directly in geodatabase so I have no problem with referencing these. All feature classess are stored within 3 feature datasets. In order to reference these FCs I set env.workspace pointing to relevant Feature Dataset, which works fine. I'd like to find the way to reference all of my Fcs at once, something like:               arcpy.env.workspace="...\Name.gdb"     fcList = arcpy.ListFeatureClasses("*", "polygon", ***InFeatureDatasets***)     outFilePTH = r'...\output.csv'      I'd be grateful for any suggestions! Thanks, Magda


Understanding the difference between coordinates projection in OSM and Google Maps

I'm looking at the coordinate differences between Google Maps and OSM. I'm a noob in the technicality behind GIS. Having read:   1. EPSG 3857 or 4326 for GoogleMaps, OpenStreetMap and Leaflet   2. How to adjust the difference between the coordinate from OpenStreetMap and Google Maps I'm not sure whether is it because of #1 or #2 that causes the difference for the same coordinate that appear few hundred meters on the projected map. And the differences between the data stored and the projected map when using lat/long. Thanks! **EDIT** This may be more specific to China and the infamous offset issue. Looking at the following coordinates: `31.230548,121.470965` for the Shanghai Art Museum on Google Maps and ditu. Having entered the same set of coordinate in OSM, it gives me the Shanghai Art Museum is about 400M away in the NW direction. I don't understand why a physical point in space is different on the projected maps? Is this specific to China?


'Couldn't load PyQGIS' after upgrade to Raring Ringtail?

I upgraded my Ubuntu to Raring Ringtail. After that, when starting QGIS I receive a message:               Couldn't load PyQGIS.     Python support will be disabled.          Traceback (most recent call last):       File "", line 1, in      RuntimeError: the sip module implements API v9.0 to v9.2 but the qgis.core module requires API v8.1            Python version:     2.7.4 (default, Apr 19 2013, 18:30:41)      [GCC 4.7.3]          QGIS version:     1.7.5-Wroclaw 'Wroclaw', exported          Python path:     ['/usr/share/qgis/python', '/home/rdk/.qgis/python', '/home/rdk/.qgis/python/plugins', '/usr/share/qgis/python/plugins', '/usr/local/lib/python2.7/dist-packages/pyspatialite-2.6.1-py2.7-linux-x86_64.egg', '/usr/lib/pymodules/python2.7', '/usr/local/lib/python2.7/dist-packages/networkx-1.5-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/psycopg2-2.4.2-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/twittercollect-0.1.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/pip-1.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/Shapely-1.2.14-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']      What is causing such problem? How could I fix it?


calculate average slope along a line

I have a slope layer and I want to calculate the average slope along a line. This line isn't necessarily straight (e.g its a route, I would like to be able to input geographic coordinates along that line and have a script that outputs the average slope). Is this possible?


How to display a geotiff-image with OpenLayers at the "right place"?

I'm just starting with OpenLayers. I have a georeferenced geotiff and the associated world file. Now I want to display this image as an Overlay and google-maps as baselayer with OpenLayers. Would be nice if anybody has some hints? How to get started in the right way? thanks, southente


Convert shapefile in NAD27 from meters to decimal degrees to match xy data?

I have a shapefile of a boundary (polygon) that has the following projection: > NAD_1927_UTM_Zone_11N Projection: Transverse_Mercator False_Easting: > 500000.00000000 False_Northing: 0.00000000 Central_Meridian: -117.00000000 > Scale_Factor: 0.99960000 Latitude_Of_Origin: 0.00000000 Linear Unit: Meter > > Geographic Coordinate System: GCS_North_American_1927 Datum: > D_North_American_1927 Prime Meridian: Greenwich Angular Unit: Degree I need to pull climate data (in netcdf files) that is within this boundary. That data is in x y coordinates and has the following information: > XLAT   >  Size: 219x285 Dimensions: londim,latdim Datatype: single Attributes: units > = 'deg' XLONG   >  Size: 219x285 Dimensions: londim,latdim Datatype: single Attributes: units > = 'deg' There's no other metadata, so in order to align these files, I need to convert the shapefile to decimal degrees. I tried using the Project tool, selecting the same coordinate system, but I don't see decimal degrees in the drop-down. Any help would be greatly appreciated! Thanks!


Projecting Imported NetCDF file correctly?

I have 360 NetCDF files (.nc) that I need to import into ArcGIS. They hold monthly historical climate data in the U.S. When I tried to import one, using the Make NETCDF Raster Layer tool, the projection doesn't seem to register at all, just places the data on the point (0,0). Any ideas? I am new to ArcGIS.


OSM personal points of interest

I use OpenStreetMap along with OSMand on my mobile device. I have **personal** points of interest on my map that I do not want to upload to the community. Currently I use Favorites in OSMand to save them. Now I want to make a print of that map with my Favorites. How can I bring my Favorites to be displayed in OpenStreetMap on my PC? Related view-waypoints-in-osm


convert csv file into grib2 format using wgrib2

I have used wgrib2 in terminal.And convert grib2 file into csv file to view content of grib2 file.my command is, > wgrib2 CMC_naefs-geps- > raw_ARAIN_SFC_0_latlon1p0x1p0_2014022012_P012_allmbrs.grb2 -s | grep '' | > wgrib2 -i CMC_naefs-geps- > raw_ARAIN_SFC_0_latlon1p0x1p0_2014022012_P012_allmbrs.grb2 -csv out.txt After editing csv file in my gedit application in centOS, i want to convert csv file into proper grib2 file format.


View Waypoints in OSM

I have a GPX file with my waypoints.               <?xml version="1.0" encoding="UTF-8"?>     <gpx version="1.0">         <name>My Favorites</name>         <wpt lat="-26.7183013" lon="-54.8139346">             <ele>1</ele>             <name>F1</name>         </wpt>         <wpt lat="-26.7099827" lon="-54.8201895">             <ele>2</ele>             <name>F2</name>         </wpt>         <wpt lat="-26.6907555" lon="-54.8205221">             <ele>3</ele>             <name>F3</name>         </wpt>     </gpx>      Now I want to display them on the OpenStreetMap map. How can I do this? I can only drag the file on thr website when in edit mode and even then I do not see them. Related: osm-personal-points-of-interest


ESRI geoprocessing service with Javascript API 3.5

I am having issues getting a geoprocessing service to run. The service is a simple Python script that converts a table to CSV file. It runs fine in ArcMap. I can publish the service with the input as a constant and get it to run from Javascript. The problem is when I try to run the service with Feature Set created from a Feature Layer in Javascript. I can not get this to work! My geoprocessing service is here.               function exportAll(){         var query = new esri.tasks.Query();         query.where = "1 = 1";         query.outFields = ["*"];         //parcelsFS is my Feature Service Layer         parcelsFS.queryFeatures(query, function (features) {         var inputFeatures = new esri.tasks.FeatureSet();         inputFeatures = features.features;         var params= { "Table_Name":inputFeatures};           gpTask.submitJob(params, completeCallback , statusCallback,function(error){           //alert(error);           //esri.hide(loading);             });         });     }          function completeCallback(jobInfo){         if(jobInfo.jobStatus !== "esriJobFailed"){           gpTask.getResultData(jobInfo.jobId,"Output_CSV", downloadFile);         }       }       function statusCallback(jobInfo) {         var status = jobInfo.jobStatus;         if(status === "esriJobFailed"){           alert(status);           //esri.hide(loading);         }         else if (status === "esriJobSucceeded"){           //esri.hide(loading);         }       }       function downloadFile(outputFile){         map.graphics.clear();         var theurl = outputFile.value.url;              console.log(theurl);                 window.location = theurl;       }


Distorted exported georeferenced tif from far north

I'm trying to export a tif file for R, to plot my data on top of. I have geo-referenced this tiff file: "background_changed" from "Background". But when i export it, the file is very compressed in height (because it's from far north) and I do not know how to get around this?


Displaying numerical values as symbols on 3D map in ArcMap or ArcScene?

I have a point shp theme with fields Lat, Long, Altitude (m), and Number. The Number field – is a numerical parameter of each point (Lat, Long) The Altitude field – is the elevation of each point (Lat, Long) above the surface. Is it possible to put the Number field on a 3d map (with z= Altitude)? (I want to put a numerical value to each point (maybe by size of its symbol) and then - elevate each point on its alititude). Any idea is it possible or not, or how I can try to do it would help. I use ArcGIS10, so try to find this possibility in ArcMap and ArcScene.


Extract Values to Points between rasters and point shapefiles of the same name

I have a task of extracting raster values to point shapefiles, which is simple enough, but only where the raster filename is identical to the shapefile. For example, I have shapefiles "G1", "G2", "G3", and "G4" and I need to extract the values of rasters "G1", "G2", "G3", and "G4" to their corresponding shapefile. Using Python (or Arc), is there a way I can convey this condition and automate the process?


Deploying OpenGeo Suite App on Apache Tomcat

I am a beginner trying to develop a web app using Opengeo Suite. I've manage to test it localy on my personnal computer and I would like to deploy it to the web. It seems like Tomcat Apache is what I need to work with but I can't seem to figure how to get started. I know it is a "wide" question but I just need to know where to start, I'm usually good at learning by myself and figuring things out but I've been reading and searching on the web for a couple of days and can't really find how to do this. I have used ngrok (https://ngrok.com/) to share my app quickly but only the layout and base layer would show up (the overlay layers are missing). So if someone could just give me an idea of were to start, or the major steps I should take in order to make my app available on the web, it would be greatly appreciated.


How do I sort a geoJSON feature collection alphabetically by a property value?

I am trying to sort the objects in a geoJSON FeatureCollection alphabetically by the values of one of their properties. How do I get to the nested object properties with JavaScript? I have tried using .sort to no avail. Sample geoJSON to sort on PARK_NAME property:               "type" : "FeatureCollection",          "features" : [{         "type" : "Feature",         "id" : 1,         "properties" : {             "CRAG_NAME" : "Alberton Road Rock",             "PARK_NAME" : "Patapsco State Park",             "LAT_DD" : 39.3168,             "LONG_DD" : -76.8033,             "GUIDE_URL" : "http://indy-adventures.net/climbing/climb-maryland/guide.html#Alberton",             "OTHER_URL" : "http://www.dnr.state.md.us/publiclands/central/patapsco.asp"         },         "geometry" : {             "type" : "Point",             "coordinates" : [-76.8033, 39.3168]         }     }, {         "type" : "Feature",         "id" : 2,         "properties" : {             "CRAG_NAME" : "Annapolis Rocks",             "PARK_NAME" : "Appalachian Trail",             "LAT_DD" : 39.5583,             "LONG_DD" : -77.5987,             "GUIDE_URL" : "http://indy-adventures.net/climbing/guide.html#AnnapolisRocks",             "OTHER_URL" : "http://www.dnr.state.md.us/publiclands/at.asp"         },         "geometry" : {             "type" : "Point",             "coordinates" : [-77.5987, 39.5583]         }     }]       }      .....


How does QGIS reproject data?

Projection systems are always troubling and I cam across and issue yesterday. I created a buffer and did a select by location using that buffer, however it was producing the wrong results. It would select points that were outside the buffer and not select ones that were. It turned out there was an issue with the projections on one of the initial datasets, with a scale factor in the projection parameters being rounded up. It got me wondering what is the process of re-projection in QGIS and how accurate is it? I imagine it is based on GDALwarp? But particularly projecting to the British National Grid the proj seems very inaccurate: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs What are the parameters being used and can I impact them?


How to make PHP (in MS4W Apache) setting for MSSQL

I am new for MSSQL. I wanted to make php setting for MSSQL. What i mean by that is to avoid following error while trying to establish connection using PHP and MSSQL **Fatal error: Call to undefined function mssql_connect()** . I thing i have to establish setting in **php.ini** but i am not able to do that. can any one please help me out how to do this PHP and MSSQL extension activated. I have uncommented the extension=php_pdo_mssql.dll in php.ini but did not worked. Please guide me to do so.


cut/fill calculation tool to investigate if there is enough material to achieve a 30 degree slope

This is a cut/fill problem. We have pits that have been dug in the ground, usually rectangular. They have a bund wall around them. They are being rehabilitated by pushing the bund back into the pit. Usually the bund is not enough to refill the pit. We need to achieve a maximum 30 degree slope between the original land surface outside the feature and the backfilled material pushed in from the bund. We need to know if we have enough material in the bunds to achieve this angle of slope. We know the bund volume from topographic survey (interpolated the original land surface under the bund from elevation points outside the feature in the topographic data). From this interpolated surface we know the location and height from which the 30 degree slope will start and go down into the pit. Is there a tool in any GIS or CAD program that will take this line (as a polyline or polygon for example), take the angle (in this case 30 degrees) and output a new line or polygon showing where the topographic surface will be intersected, right the way around the pit? With this new line, a TIN could be created of the elevations along it at the bottom of the proposed slope and the elevations of the intersection at the top of the slope between the original land surface and the topographic surface. The topographic surface could then be subtracted from this new TIN to get the volume and see whether it is the same or less than the volume in the bund. If there is a tool to automate this, it would make life much easier. Otherwise we could calculate a few points around the pit manually for a coarser estimate.


Georeferencing a Picture having Resolution and a nearly correct BBOX

Is it possible to get the Boundingbox of a Picture when I know the Resolution, the Height/width in pixels, the sum of Tiles in each row/column and a Coordinate that is in the cornertile but not the corner ! To make it a bit clearer, take a look at that picture: The green things are given(one coordinate in the cornertiles and the resolution) and the red pointer indicates what I want to derive. Each tile is 256x256 pixels. ![enter image description here](http://i.stack.imgur.com/gl93q.jpg) Does anyone have an idea ? yours, Matthias


Can QGIS access cartodb tables via OGR?

I see that it is possible to access Google Fusion Tables in QGIS using OGRs Virtual Format layer. Shown here and details about the Google Fusion Table driver here. I was wondering whether something similar was possible with cartodb using the Postgres/PostGIS driver? I had tried a few different combinations with out any luck what so ever, I just keep getting an empty layer in QGIS. Anyone have an idea on how to make this work? or if it is at all possible? Using dev QGIS 1.9. Thanks Ando


GeoJSOn or WFS service to view, edit and save geometries

To view, edit and save in postgis geometries using OpenLayers + Geoserver what is recomenadado use GeoJSON or serivços WFS? I ask this for performance and additionally want the edition is recorded in the database realtime.


QGis 2.0.1 cpp-plugin for Windows

my plugin, developed in VS2008 for Windows runs in my testenvironment, the startimage of QGIS shows the developermeeting in Essen with the version number 2.1 alpha. On a other system I have installed a QGIS Version 2.0.1, the plugin dll is in the right directory (c:\osgeo4w\apps\qgis\plugins) but i can't get it, not even in the invalids. I'm searching for a way deploying my plugin by copying in a installed 'official' version of qgis. I'm not able to make an own install-package for qgis with my plugin and also that isn't it what my boss wants :-) Pleas give me some supprort. Thanks a lot. EDIT: I just want to update my plugin to QGis 2.0 (Dufour). But I don't know how to do that. I got the actual sources from git, added my plugin-code, compiled it in Visual Studio 2010, put the plugin-dll in the right directory. But it isn't in the plugin-list. I put the plugin-dll in a QGis 2.1-plugin-directory and it works fine. What do I wrong? I spent a lot of time and it is so frustrating. Everywhere in the forum the people say , developer should update their plugins to the new API. But how to do that?


Polygon parcel division in python

Is there an open source tool or module in python that does parcel division of polygons like in ArcEditor?


How to create an animation from raster data?

I have some NDVI and precipitation/temperature images at the monthly time step from Jan, 2005 to Dec, 2008. I need to create animation image to show the temporal change. How can I do this. Is it possible to use ARCGIS, ERDAS, ENVI. If so. please tell me the processes step by step. If not, what software and tool can be used to do this. Hope to help me Thanks


Invert gdalwrap cutline

I have a big raster image with medium details, but for some regions I do have far more details as a seperate raster image. Now I'd like to display both of them in my map that I render with `Tilemill`. So now I would need to cut a hole out of the bigger raster (exactly the shape of the small one) file so that both layers will be properly displayed on my map. (Note: I don't display it with an opacity of 100%) I found that using the `gdalwarp -cutline shape.shp input.tif output.tif` command I can cut a raster. But I need the inverse of that. Is there a parameter for `gdal` which I am missing? Thanks a lot


What GIS applications use Google Glass?

![enter image description here](http://i.stack.imgur.com/orPUa.jpg) From techcrunch. I see a lot of press coverage about Google Glass, yet I haven't seen details of GIS apps that use it. What GIS applications use Google Glass?


POSTGIS Raster - Merge polygon onto raster

I have two tables, SCHEDULE contains polygon geometries and RASTER contains raster tiles I want to take a polygon from the SCHEDULE table and overlay it on top of a set of RASTER tiles that intersect its bounding box. I have got this far:-               WITH schedule AS (             -- SELECT A SCHEDULE GEOMETRY AND CREATE A buffer around it              SELECT ST_SetSrid(ST_Boundary(ST_Expand(wkb_geometry, 500)),27700) as buffer, wkb_geometry as wkb_geometry, streetward from schedule where schedule_id = 1532952         ),         --MERGE THE SCHEDULE GEOMETRY WITH THE BUFFER         expanded_schedule AS (                  SELECT ST_Union(wkb_geometry, buffer) as wkb_geometry FROM schedule         ),         raster_map as (             --UNION ALL OF THE RASTERS IN RASTER TO COVER BUFFER             SELECT ST_Union(rast) as rast from RASTER,schedule where ST_Boundary(wkb_geometry)::BOX2d  && rast              ),         raster_geom AS (             --MAKE A RASTER FROM THE GEOMETRY              SELECT ST_SetBandNoDAtaVAlue(                          ST_ColorMap(                         ST_AsRaster(wkb_geometry, --SCHEDULE GEOMETRY                                 rast,            --reference raster                                 ARRAY['8BUI','8BUI','8BUI'],         --pixeltype                                 ARRAY[118,118,118],          --data value                                 ARRAY[100,100,100]           --no data value                                 ),                          1, '118 1 1 1 1                             100 254 254 254 254')                 ,100)              --SELECT ST_AsRaster(ST_Buffer(wkb_geometry, 50), rast,ARRAY['8BUI'], ARRAY[118])              as rast FROM  expanded_schedule,raster_map              ) ,          raster_union AS (             SELECT rast FROM raster_geom             UNION             SELECT rast FROM raster_map         )         SELECT ST_AsPng(ST_Union(rast)) FROM raster_union      My problem is that this creates an image that looks like the following:- ![Output image](http://i.stack.imgur.com/c7mat.png) The SCHEDULE geometry area has worked fine, but the bounding box area has masked out the map tiles below. I do not really understand why? I suspect that the buffer geometry is "filled in" as far as postgis is concerned. What am I doing wrong, or should I follow another strategy.


cartodb visualization ownership transfer

I have a visualization created in my cartodb personal account. Can I transfer this viz to my company's enterprise account without recreating it there?


Python add-in user input not working ArcGIS 10.1

I made an add-in in python and it works fine on my machine, but on other machines it spits out an error, sometimes for Tkinter widget and when I use Tkfiledialog using a separate file, it spits out error for the first arcpy function it encounters:(arcpy.MakeXYEventLayer_management, the first function I execute) . On the contrary if I use harcoded paths instead of user input, it works fine. Can anyone please let me know whats wrong with it? Can it be related to versioning? but if so why it runs fine with hardcoded paths, I have checked all inputs, they seem to be in order.


How to handle display of nested polygons (census, county/state, etc) for a given map extent

My question is how best to decide which layer (from a set of nested, aggregated census polygons) to display for any given map extent in an online map. Australia's census boundaries are built from multiple layers, aggregated from highly detailed collection districts through a number of intermediate layers to eventually comprise the whole country. This same principle applies to city/county/state/country boundaries. Switching census layers based on scale dependency is unsatisfactory, since there must be a compromise between the populated cities and the vastly empty interior. Eg, over Sydney the Collection Districts should show at around 1:10k whereas in rural areas they should show above 1:500k 1) Are there any examples available in online maps where this problem has been solved elegantly? All of the examples I've seen use scale dependencies to switch layers on/off 2) I'm contemplating counting the features every time the map extent changes, and using this to decide which is the best layer to display. This "breaks" the traditional GIS paradigm whereby layers can switch on/off based on scale, since in my scenario they may also switch on/off based on different map extents at the same scale. Are there any examples of this in action? Does anyone have any thoughts or advice on whether this will be confusing to the user? Eg, a user might be viewing Collection Districts, then pan the map slightly. This could cause the Collection Districts to switch off, and the next layer to switch on. Has this been done anywhere before? Thanks, Steve * * * I've put a sample map at http://203.14.35.213/atlas-2.0/public/nsw/home/map/australia-population.html showing the direction I'm hoping to go. Note that this is a QA server so it may be slow, and not up 100% of the time. Pan and zoom around the map down to street level, and note that the polygon boundaries change (if you open the Legend panel, you can see which of the 5 layers is currently displayed). The boundary layer is chosen each time the map draws, based on the _count_ of features rather than the _scale_ (eg, a different boundary will draw over Sydney, compared to a rural area at the same scale). This can mean that panning the map results in the layer changing. The idea is for this process to be transparent to the (novice) user, who should just see the "best" information wherever they browse. My original question was whether the experts feel this "breaks" the traditional model of scale-dependent rendering. Does anyone have any feedback on whether this approach has merit or is flawed?


QGIS 2.0 text delimited layer importing data as single row

I'm trying to import a text delimited layer using lat/lon, but the tool interprets the data as a single line. I've tried saving my csv using several different programs (Stata, python editor, text editor, Excel), but nothing works. Here is a sample of my data:               n,aqs_site_id,site_latitude,site_longitude     1,17-001-0006,39.93301,-91.40424     2,17-001-0007,39.91541,-91.33587     3,17-019-0004,40.12379,-88.22953     4,17-019-0006,40.12389,-88.24055      And my csvt file:               "Real", "String", "Real", "Real"      This is what the dialog box looks like when I try to upload. You can see there is no data because everything is pulled into row 1: ![.](http://i.stack.imgur.com/woUo2.png) Any help would be much appreciated!


R -plot 12 images per plot or save 12 images per image file in R

Here is R script and my question is How can I plot 12 images per plot or save 12 images per image file because I have total 864 images.               RAD1998 <- raster(paste(getwd(), "/1998bil /1998ASC5min_ppt_spas1214_0001_19980202_0810_UTC.asc.bil", sep = ""))          list.ras <- mixedsort(list.files(paste(getwd(), "/1998bil/", sep = ""), full.names = T, pattern = ".asc.bil"))      list.ras     png('RAD1998.png')     RAD1998.all <- stack(list.ras)     plot(RAD1998.all)     dev.off()


qgis delaunay circumcircles

Is it possible to show the delaunay circumcircles in QGIS? I know how to make the Voronoi polygons and Delaunay triangles. I found a web page that shows the circumcircles at: http://www.scribd.com/doc/147332295/A-Gentle-Introduction-to-Gis It appears that the author did this with QGIS, but he didn't explain how. Thanks Jim * * * Image from Wikipedia: ![enter image description here](http://i.stack.imgur.com/0JZeW.png)


Symbology of point layer using CSS class

There is nice feature DivIcon in Leaflet library. Is it possible to get the same function using OpenLayers? I guess I can make some workaround using Markers but not sure is this a right way. Now I'm using vector layer and have to load image for each layer separately, but in CCS case it is possible to use only one sprite for all layers.


ESRI File Geodatabase with a field calculator with an incrementing number

I've got a python script that runs on the Field Calculator of a ESRI File Database. Right now it runs correctly in that it will increment the last three digits of the value. But this is a script that is run as part of post processing so it will be run everytime there are new entries in the feature class. My question is how can I modify this so that every time it runs it will look at the last four digits of the FacilityID and increment from there below is a screenshot of my attribute table: ![enter image description here](http://i.stack.imgur.com/Y1Flb.png) EDIT: And below is my Python script I need to modify.               cur = arcpy.SearchCursor("Telecommunications Line")     fac_id_values = [int(row.FACILITYID[-4:]) for row in cur]          maximum_value = max(fac_id_values)     if maximum_value:      rec= maximum_value      else:      rec = 0          def autoIncrement():       global rec       pStart = 1        pInterval = 1       if (rec == 0):         rec = pStart        else:         rec += pInterval        return "COMLI" + "11" +  format(rec, '03d')      Ok after running the code above I got this as a result. It overwrote the previous values as shown above. The First item should have a FacilityID of COMLI111001. ![enter image description here](http://i.stack.imgur.com/I85jF.png)


TileMill Reference Layer Plugin doesn't work w/ non-MapBox TileJSON

Has anyone been able to get TileMill's reference layer plugin to work w/ a TileJSON definition? In its description, it says it can work either with a mapbox map id or a tileJSON url. I've tried it out successfully with map ids, but when I give it a url to my tileJSON here, nothing loads and the console outputs: ` [tilemill] Client Error: Script error. [tilemill] at :0 [tilemill] Client Error: TypeError: 'undefined' is not an object (evaluating 'a.tiles') [tilemill] at http://127.0.0.1:20009/assets/tilemill/js/vendor.js:5164 ` Anyone had any luck with this? **Update** : the tileJSON file must be hosted on a server that supports CORS. That solved one problem, but still doesn't work w/ the plugin (same error output).


How can I "reset" SketchUp origin after importing DXF with "Preserve Drawing Origin" option enabled?

I can successfully import all of my 3D DXFs into a common location so that they are referenced correctly (in reference to each other). TO do this I simply check the Import DXF "Preserve Drawing Origin" option on. However, when I do this DFX models are placed very far away from the Sketchup "default" origin. It becomes very difficult to zoom to the location of the 3D DXFs and navigate around them. Zoom Extents zooms out all the way showing the default origin and the imported DXFs as a spec in the distance (see screen capture). To even zoom in to the imported model is nearly impossible. **How do I "reset" the origin and correct the extent so that sketchup zooms in onto the model when "Zoom Extent" is clicked?** ![enter image description here](http://i.stack.imgur.com/Eymro.jpg)


How to convert raster to polygon that I classify in C# ArcGIS engine?

by " IMultivariateOp.MLClassify" method,I just can classify the raster into many classes,but how to convert each of them to polygons,and give them properties like names? I need some code in C# in ArcObject. Thanks very much.


Is there a size restriction on KML layer in esri map?

My website utilizes ESRI's map and it contains several KML layers. Most of them show up fine except for the ones bigger than ~4MB. Are there any restrictions on KML file size? Thanks,


Smoothing raster map

I have a raster map of US Midwest which is very sparse, i.e. the pixels of interest are few enough to be almost invisble when viewed at a scale where all states of US Midwest are visible. I would like to follow the approach outlined in this PNAS paper (http://www.pnas.org/content/110/10/4134.full) to create a better map, but not sure how to replicate it in ArcGIS. Any help would be appreciated. The PNAS paper outlines the steps as follows: > Because of the small sizes and scattered distribution of change areas, it > was difficult to visualize regional patterns of LCLUC at the original 56-m > spatial resolution. As a result, we used spatial smoothing techniques to > create a regional change surface that highlighted local hotspots of change. > Related approaches are used in fields such as spatial epidemiology to > generate stable estimate of disease rates (48) but have not been broadly > applied in the field of land change science. In our smoothing approach, > change pixels at 56-m spatial resolution were first aggregated to the > percentage of change at 560-m resolution. This was done by taking 10-by-10 > blocks of 56-m pixels (i.e., 100 pixel blocks) and summing the binary change > within each block (Fig. S4A). Next we used a 2D kernel smoother to compute a > smoothed estimate of percent change for each of the 560-m resolution pixels > (Fig. S4B). A quartic kernel function was used to calculate moving averages > across the study area at a bandwidth of 10 km. The same quartic kernel > function was used to smooth percent change from corn/soy in 2006 to > grassland in 2011. Finally, we generated a smoothed map of grassland cover > in 2006 by aggregating grassland presence at 56-m resolution to percent > grassland cover at 560-m resolution, and then smoothing this aggregated > cover layer by using the same 10-km quartic kernel. This smoothed grassland > cover layer was subsequently used as the denominator in generating a map of > relative rates of grassland conversion. As far as I understand, this is the flowchart:   1. Use block statistics in ArcGIS to sum 10x10 pixels of 56-m raster to 560m raster   2. 2D kernel smoother: not sure how to do this   3. Quartic kernel: not sure how to do this  Not sure how to progress beyond step 1


How to populate a dropdownlist with map service field names given only the layer name

I'm trying to wrap my head around a task which seems pretty simple, but not sure what the easiest way to go about it. I'm using javascript api and have a populated dropdownlist of sorted layer names from my soe along with other 'non-map service' as search options (below):               // THIS IS FROM THE REST SOE:     // add all map service layers type feature layer and selectable             for (int i = 0; i < layerInfos.Count; i++)             {                 IMapLayerInfo layerInfo = layerInfos.get_Element(i);                              if (layerInfo.Type == "Feature Layer" && layerInfo.CanSelect == true)                     layersList.Add(layerInfo.Name);             }                  // sort list of map layers             layersList.Sort();          // add static 'non-map service' search options             layersList.Insert(0, "City");             layersList.Insert(1, "Water Body");             layersList.Insert(2, "Headquarters");             layersList.Insert ...      Next in my client app I need to populate another dropdownlist with the field names from the result of the selected layerinfo.Name above but without having the layer ID available. I was hoping to use the 'Find' operation however it requires a searchText parameter. Could I somehow use the ...MapServer/layers url? Thanks in advance! Bonus: I'm using KendoUI dataSource and kendoDropDownList controls so any suggestions regarding the configuration integrating the map service request would be awesome.


Where can I find documentation on QGIS C++ Plugin Development?

Is external C++ plug-in support available for QGIS? I'm having a really hard time getting started here. I followed the doc here: http://download.osgeo.org/qgis/doc/manual/qgis-1.1.0_coding- compilation_guide_en.pdf But that's fairly outdated. I was able to compile and link, but the plugin isn't being brought into QGIS - so I'm wondering if that tutorial is out of date. When I go to the wiki page at QGIS's website - they reference a VERY outdated page that is identified as obsolete: http://hub.qgis.org/wiki/quantum- gis/Writing_C++_Plugins I can't seem to find a current tutorial that describes C++ plugin support for QGIS 1.8 (or any version close to it). I realize Python is more pervasive, but at this point we have specific needs that are supported via C++.


Where is Area and Volume statistics tool in ArcMap 10.1?

I want to measure surface volume of an area with different Plane Height above reference plane. There should be a tool for statistic calculation but I cannot find it in 3D analyst toolbox. Is it exist in GIS 10.1 ? Or which tool can help me to measure ?


Python script for Data Driven Pages to run a series of DDP at once?

I have a several different polygon shapefiles that I am using to create individual maps for each polygon within the shapefile. The layout is the same for each map, the only thing that changes is the polygon and scale bar. The size of the polygons vary greatly (i.e. < 1 acre to > 5,000 acres). Because of the size variability, I've had scale bar issues with running all polygons in DDP with the the division value either being too large or small. Currently, I am running a DDP on each shapefile with correct scale bar division value, one shapefile at a time. I have 12 shapefiles in this project. Is there a way to automate this using python to run DDP in a series on the different shapefiles? Any advice would be appreciated, Thanks.


OpenLayers transform control box properties

I'm using OpenLayers for my GIS application. My problem is that when I add a transform control to a polygon feature, it looks very "messed up". The box for the transform control is completely unaligned with the original polygon. My features aren't very complicated, in fact they are simple rectangles. Unfortunately, I can't show you an example of what it looks like at the moment but I will try later. However, you can get some idea of what it looks like from this example. As you can see, the handles of the transform control box are not aligned with the vertices of the polygon. Is there anyway for me to render the transform control box in such a way that the handles are aligned with the polygon vertices? I realise that the transform control comes with the "handles" and "box" properties, but these are immutable according to the documentation. Thanks in advance for your help in this matter.


difference of reference plane/Plane Height / Z factor in Surface volume calculation?

I have a TIN surface with Minimum elevation 25 m and Maximum elevation 140 m. I want to calculate surface volume in different elevation between 25 and 140 meter. I wonder for example If I want to measure the area above 25 m ( which is the lowest elevation) how shall I set the Plane Height and Z factor? PS: I am working in Arcmap 10.1 area.


Adding kernel density output to map with ArcPy

I am trying to emulate the behavior of the Kernel Density tool from the ArcMap 10 GUI in a script; in other words, I want to calculate the density of a dataset, and add the visual result to a map. If possible, I'd also like to be able to adjust the color and transparency of the kernel density layer, as one can in the layer properties dialog in the GUI. I know one can run the kernel density tool in a script, but I am not sure how to add the output to the map like the GUI does. Is it possible to do this in ArcPy?


QGIS: opening a shapefile without an exclusive file lock

**UPDATE** : I did some analysis of what happens with the locking and it looks like QGIS doesn't use an exclusive lock. It just requires (non-exclusive?) write lock to the file. So this C# code fails:               File.Open (fileName, FileMode.Open, FileAccess.Read, FileShare.Read);      the error being: `System.IO.IOException : The process cannot access the file '...' because it is being used by another process` while this one goes through:               File.Open (fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);      So my question is basically off the mark and I'll move to close it. * * * In QGIS, when you open a shapefile in read-only mode, the shapefile still gets to be exclusively locked by QGIS, preventing other programs from reading it at the same time. This is pretty annoying and basically unnecessary, since you're not really editing the shapes or attributes of the file (and even if you were, the read access should still be allowed). Is there a way to open the shapefile without locking it out for other software?


Autodesk Infrastructure Studio - Enable WMS

With only a couple hours experience this is very likely user error but I have "Autodesk Infrastucture Studio 2013" installed with a few "Data" nodes and "Layers" nodes. I can right-click a child of the "Data" node and select "Enable WFS..." and it gets added to my WFS service BUT I when I right-click a child of the "Layers" node I do not have the corresponding "Enable WMS" layers. Neither is the _Enable WMS/WFS_ toolbar item enabled. Any thoughts on what might be causing of "Enable WMS" not getting enabled?


Different NoData values when processing a GeoTIFF in QGIS and bringing it to ArcGIS

I'm trying to process a GeoTIFF in QGIS 1.8 using SEXTANTE and GRASS via the r.neighbors tool. I'd like to process the image, then be able to utlize it in ArcGIS. The problem I'm running into is that the output file has a different nodata value than the input, and Arc isn't recognizing the correct nodata value (which is 3 E-38). Arc reads the output file as having a nodata value of 0, and QGIS reads it of having a nodata value of NaN. This causes Arc to render the file incorrectly, and makes utilizing the output file in Arc difficult. When identifying nodata pixels in ArcGIS, they return the cell value of nodata, however the raster's nodata value is 0, instead of nodata (as in the cell value nodata). This causes them to be rendered as black, instead of nofill, and may impact further processing of the file. Suggestions?


Unable to delete .lock files within geodatabase using Python

I am having problems with lock files while deleting and copying geodatabases for backup purposes.               print "Now backing up your Geodatabase"     distutils.dir_util.remove_tree (r"\\Msukserver\gis\geodatabase BACKUP\EVERYONE\Mining Features (MATTHEW).gdb", 0, 0) # deletes 'everyone' backup copy     distutils.dir_util.copy_tree(r"\\Msukserver\gis\geodatabase BACKUP\MATT\Mining Features (MATTHEW).gdb", r"\\Msukserver\gis\geodatabase BACKUP\EVERYONE\Mining Features (MATTHEW).gdb") # backup the last backup to 'everyone'     print "old backup copied"     distutils.dir_util.remove_tree(r"\\Msukserver\gis\geodatabase BACKUP\MATT\Mining Features (MATTHEW).gdb", 0, 0) # deletes last backup     print "old backup deleted"     distutils.dir_util.copy_tree(r"C:\GIS Home\Mining Features (MATTHEW).gdb", r"\\Msukserver\gis\geodatabase BACKUP\MATT\Mining Features (MATTHEW).gdb") # copy mining features to create new backup     print "::::::::::::::::::::::Backup Complete::::::::::::::::::::::"     raw_input("Push Return key to close...")      I am getting a 'permission denied' error on the '.lock' files. Is there a way of copying/deleting all the file except those with a .lock extension? or a way to continue/force with errors? I am aware that I am currently copying/deleting the entire directory and may need to change my code to copy/delete files only.


Why do glob.glob and gdal_translate not work for me?

I have a little problem with my python script. I wrote it to convert MODIS data from .hdf into .tif. It will convert all files in a folder using a loop. I do not know which command I must enter to assume the files from the folder as input file. I tried *.hdf but then I got errors indicating that the file doesn´t exist. The output-name of the new .tif should be the input name of the .hdf. At this point in my script it doesn´t work for me. I have no idea what I have to write now in the "gdal_translate"-command. I tried it with *.tif but this doesn't work. Thanks for reply! Cheers               #!/usr/bin/python          import os     import glob     from osgeo import gdal     from osgeo import ogr      from osgeo import osr      from osgeo import gdal_array      from osgeo import gdalconst      from osgeo.gdalconst import *          path = ''     path = raw_input('Directory? (z.B. C:\Daten\Modis\):')          # change to path     os.chdir( path )          # checks directory     vcheck = os.getcwd()          file = glob.glob('*.hdf')          for file in glob.glob('*.hdf'):          os.system('gdal_translate -of GTiff -a_srs EPSG:4326 "HDF4_EOS:EOS_GRID:"*.hdf":MODIS_Grid_8Day_Fire:FireMask" *.tif')


What is the most efficient way to get a list of featureclasses from a large ArcSDE database?

I have a SDE DB which consists of 40 feature datasets and around 300 featureclasses. I need to get the full list of all featureclasses whose name does not contain "ARCHIVE". It takes several minutes using the script below. It will be unacceptable if I publish this as a geoprocessing service. How can this be improved?               import arcpy,os     import json     from arcpy import env          env.workspace=r"C:\ysde\lcimrl.sde"     arcpy.AddMessage("--------get resource dataset \n")          resourceFeatureList=[]     lodFeatureList=[]     dsList = arcpy.ListDatasets("*","Feature")     for ds in dsList:         dsDesc = arcpy.Describe(ds)         dsName=dsDesc.name.upper()         arcpy.AddMessage("--------get feature class list from "+dsName+" \n")              fcList = arcpy.ListFeatureClasses("*","",ds)         print fcList         for fc in fcList:             desc = arcpy.Describe(fc)             fcName=desc.name.upper()             #print dsName+"_"+fcName             if   "ARCHIVE" not in fcName:                 if dsName!="SDE.ALTERNATIVES":                     resourceFeatureList.append(fc)                 else:                      lodFeatureList.append(fc)     print resourceFeatureList     print lodFeatureList


(partly solved) Only pink tiles using Qgis Server

My name is Alfons and I'm beginning to work with QGIS Server. I'm an architect, so that I'm used to buildings and landscapes, not to scripts and code. Last 6 months I managed to work with GeoServer and OpenLayers, and I could obtain some good results. Now I wanted to migrate to QGIS Server because QGIS is the application I chose in my university to work with other professors and my students, and the "wysiwyg" results as server seduced us. Our problem is that I followed all the tutorials to install QGIS Server and then I began to obtain results. Now, I'm stuck in a nice pink-tiles screen. I could get capabilities, even read layer names in the screen. But nothing more. I used OpenLayers and LizMap for rendering. And used my own files (.SHP and .JPG) in my own .QGS projects, and also the examples provided by 3Liz for LizMap And... I had the same results in 3 different "devices": both my home PC and my laptop, running Windows 7 x64... and in the Lubuntu virtual machine (launched in my 2 hardware devices) provided by OsGeo Live. This is part of my apache access.log file which shows the server doesn't provide the image:               127.0.0.1 - - [04/Oct/2013:23:11:32 +0200] "GET /qgis/qgis_mapserv.fcgi.exe?MAP=http%3A%2F%2Flocalhost%2Fqgis%2F0001%2F13100301.qgs&LAYERS=EDIFICIS%2Cbase-via%2Cbase-mansanes%2Cbase-costa%2Cbase-cases&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,0,-90,90&WIDTH=256&HEIGHT=256 HTTP/1.1" 200 218     127.0.0.1 - - [04/Oct/2013:23:20:51 +0200] "GET /cgi-bin/qgis_mapserv.fcgi.exe?MAP=http%3A%2F%2Flocalhost%2Fcgi-bin%2F13100301.qgs&LAYERS=EDIFICIS%2Cbase-via%2Cbase-mansanes%2Cbase-costa%2Cbase-cases&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,-90,0&WIDTH=256&HEIGHT=256 HTTP/1.1" 404 227      And this is part of the errors.log which says something apout some .cpp which I don't understand.               [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\mapserver\\qgis_map_serv.cpp(186) : (main) Skipping GDAL ECW drivers in server.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(872) : (QgsApplication::applyGdalSkippedDrivers) Gdal Skipped driver list set to:\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(873) : (QgsApplication::applyGdalSkippedDrivers) ECW\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(872) : (QgsApplication::applyGdalSkippedDrivers) Gdal Skipped driver list set to:\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(873) : (QgsApplication::applyGdalSkippedDrivers) ECW JP2ECW\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(201) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/gdalprovider.dll: ...loaded ok (68 file filters)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/georefplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/globeplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/gpsimporterplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(109) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/grassplugin.dll: ...invalid (lib not loadable): Cannot load library D:/OSGeo4W/apps/qgis/plugins/grassplugin.dll: The specified module could not be found.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(109) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/grassprovider.dll: ...invalid (lib not loadable): Cannot load library D:/OSGeo4W/apps/qgis/plugins/grassprovider.dll: The specified module could not be found.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(109) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/grassrasterprovider.dll: ...invalid (lib not loadable): Cannot load library D:/OSGeo4W/apps/qgis/plugins/grassrasterprovider.dll: The specified module could not be found.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/heatmapplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/interpolationplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(126) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/libgrass_gis.6.4.3.dll: ...invalid (no isProvider method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/offlineeditingplugin.dll: ...invalid (has type method)\r      I suppose some library file or some driver is missing. For my machines, those are the specs:   * AMD Athlon X64 Dual Core 2.4 GHz, 8Gb, Windows 7 x64, QGIS 32bit and   * Intel Core2 T5500 1.66GHz, 2Gb, Windows 7 x64, QGIS 32bit   * The virtual Lubuntu machine over VirtualBox following the specs from OsGeo Live (EDIT: same problem reproduced also in a WindowsXP (SP3) 32bit computer and a WindowsXP (SP2) on virtual PC) The installation is the provided by OSGEO4W setup, choosing QGIS, APACHE and FCGI and the default added files. Any suggestion ? Thank you very very very much ! EDIT (2013/10/05) : Right-clicking one of the pink images sent me to http:// localhost /cgi-bin/qgis_mapserv.fcgi.exe?MAP=http%3A%2F%2Flocalhost%2Fcgi- bin%2F13100301.qgs&LAYERS=EDIFICIS%2Cbase-via%2Cbase-mansanes%2Cbase- costa%2Cbase- cases&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,0,0,90&WIDTH=256&HEIGHT=256 The server responded with error 404 if asking this link That localhost/cgi-bin is located in OSGEO4W\bin and I tried to put my project there. Now there are also pink tiles but when asking for the image alone the server gives error 500 540 in access.log and "Premature end of script headers: qgis_mapserv.fcgi.exe" in error.log I forgot to tell that I was using QGIS 2.0.1 in all my windows tests and QGIS 1.8 in the linux ones. [EDIT 2013-10-09 02:24 GMT+2] I rebuilt a complete computer to make a clean installation with no influences from other software. The first result was the same. Following "premature end of script..." questions I found some comments about bad installation parameters in the tutorials, so that I followed their suggestions. Finally I deleted some of the changes. Somewhere the sentence /qgis/qgis_mapserv.fcgi.exe? lacks for the "exe". I searched every file in c:\OSGEO and changed it Also I modified the httpd.qgis.conf to write every backslash as slash except the one belonging to the disk unit. The last and better change was deleting the SetHandler sentence inside httpd.qgis.conf Since that moment my files were rendered as WMS by QGIS and others (like GlobalMapper) But they continue NOT rendering in OpenLayers. If format is PNG, the whole map is white. If the format is JPG, the whole map are pink tiles. The same happens with Lizmap's examples. I can try to read them in Qgis or Globalmapper but not on web clients (the own Lizmap client gets stuck !) Thanks !


GDAL and Python - Don't print GDAL Error messages

According to the GDAL Python Documentation, GDAL functions do not raise exceptions or errors but do print errors to the console via stdout and stderr. I have some code in my script that calls `GetStatistics` on a GDAL raster band. If the band only contains nodata cells (which is possible because it is a tile of a larger dataset) the `GetStatistics` call fails with an error, but the script continues. I would prefer not to see the error messages that are still printed to the console when this happens as it interferes with other print statements that I have written into my own script. Is it possible to turn off these messages?


Best way to assign points to nearest roads in postgis?

I'm trying to implement a simplified type of dasymetric mapping for census data. I've downloaded the Census's American Community Survey individual-level data and randomly assigned every household to a point within a block group. Now I want to move these random points to the nearest road. I've downloaded the OSM data and loaded it via osm2pgsql. So I have two tables: dade_random_points: a point for each household. 'wkb_geometry' is the geo field. dade_planet_osm_roads: a linestring for every road. 'way' is the geo field. (By the way, I'm doing a proof-of-concept with just Miami-Dade County for right now.) After reading How to get the nearest point on a linestring to a given point? and http://www.postgis.org/docs/ST_ClosestPoint.html I wrote this enormous, multi-nested query. It's still churning on my laptop, but it seems to work when I put in 'limit' statements to do smaller pieces. Surely there has to be a better way? (Or maybe there's a postgis dasymetric library out there somewhere that I haven't been able to find?)               drop table if exists dade_points_on_roads cascade;     create table dade_points_on_roads as     select       table4.id,       table4.osm_id,       table4.geoid10,       table4.name,       ST_ClosestPoint(          ST_Transform(table4.way, 4326),          ST_Transform(table4.wkb_geometry, 4326)         ) as point_on_road     from       (       select         --table3.*,         points.*,         roads.*       from         (         select           table1.id,           min(table1.distance) as distance         from           (           select             p.id,             r.osm_id,             ST_Distance(               ST_Transform(r.way, 4326),               ST_Transform(p.wkb_geometry, 4326)               ) as distance           from              dade_planet_osm_roads as r,             dade_random_points as p           where              ST_DWithin(                ST_Transform(r.way, 4326),                ST_Transform(p.wkb_geometry, 4326),                500               )             --limit 1000           ) as table1         --order by distance asc         group by table1.id         --limit 10         ) as table2,         (         select           p.id,           r.osm_id,           ST_Distance(             ST_Transform(r.way, 4326),             ST_Transform(p.wkb_geometry, 4326)             ) as distance         from            dade_planet_osm_roads as r,           dade_random_points as p         where            ST_DWithin(              ST_Transform(r.way, 4326),              ST_Transform(p.wkb_geometry, 4326),              500             )           --limit 1000         ) as table3,         dade_planet_osm_roads as roads,         dade_random_points as points       where         table2.id = table3.id         and table2.distance = table3.distance         and table2.id = points.id         and table3.osm_id = roads.osm_id       ) as table4     ;


What is the scale and does it depend on the print out size?

I am new to ArcGIS and I would like to know what is the scale in ArcGIS and does it depend on the print out size or display? Can any one explain all about topic scale in the ArcGIS?


Aggregate the raster from the Combine Tool in Spatial Analyst--->Local

I have a raster file created through the Combine tool (Spatial Analyst--->Local). The attribute table is showed below. Its resolution is roughly 10m. I would like to aggregate it to 50m with each aggregated cell (including 25 small cells) having the sum of those attributes (SFDVal, MFDVal, MHVal and etc.) from the 25 small cells. I tried several ways (aggregation, zonal etc) but it seems like all of them are working on the actual cell value of the combined raster, instead of other attributes. But I only want to get a sum aggregation on those attributes, not the cell value. Anyone suggestion is appreciated! Thanks in advance! ![enter image description here](http://i.stack.imgur.com/byjhA.png)


How do I open and edit a table in my geodatabase

I created a file geodatabase with some tables. I created a new table and specified the field properties. Now, how do I open the table to populate the fields?


Restrict suggestions from ESRI ArcGIS REST API to US addresses only

I am wondering if there is a way to restrict esri arcgis REST API to suggest only US addresses. Combination of location & distance parameters prioritizes the results, but that doesn't restrict suggestions to an area. I tried setting the bbox parameter, but looks like it is only supported for find api and not for suggest. SO, how do I make the arcgis suggestions restrict to only US addresses ??


Iterating ArcGIS Network Analyst over multiple files using ModelBuilder?

I have 10+ files that I want to add to ArcMap then do some spatial analysis in an automated fashion. The files are in csv format which are located in one folder and named in order as "TTS11_path_points_1" to "TTS11_path_points_13". The steps are as follows:   1. Make XY event layer   2. Export the XY table to a point shapefile using the feature class to feature class tool   3. Project the shapefiles   4. Snap the points to another line shapefile   5. Make a Route layer - network analyst   6. Add locations to stops using the output of step 4   7. Solve to get routes between points based on a RouteName field How do I iterate this procedure over the number of files that I have, while ensuring that every time the output has a different name so it doesn't overwrite the one from the previous iteration? I am using ARCMAP 10.1


How to use UTF8 in printing module?

I have a Geoserver with printing module. And i have a problem with print cyrillic symbols. I want to try to use `Identity-H` but for this i need a custom font. In Unix system it's can be make like this:               fonts:     - /usr/share/fonts/PingWin/PWTVerdeTST.ttf      But im using Windows.   So how to use custom fonts in `config.yaml` in WIndows. And another question, utf8 it's correct way to print cyrillic symbols in Mapfish print module?


GeoJSON of half the earth

I'm currently trying to model daytime/nighttime in leaflet, and the only way I currently see me being able to do that is to have a GeoJSON polygon reflecting half of the earth (for daytime/nighttime respectively). However, my GIS knowledge pretty much ends there. Ultimately, there should be an function that maps to the coordinates of the boundary, right?


how to multiply and group values of NDVI in Erdas

I have downloaded the MODIS data for calculating the NDVi but the ranges of values in its attribute table ranges from -32768 to 9830 i want to club the similar values upto 2 decimal places and also want to multiply these values with scaling factor of 0.0001 Could somebody please help by expalining me how to do this in erdas


ArcGIS Online: Adding Screenshots to my content items

Within ArcGIS Online, is it possible to associate an array of screenshots with a content item? I see a property in the ArcGiS Online Search API response that includes "screenshots":[]


Track Spatial and Attribute Edits By Date and User

I do a lot of editing in ArcGIS for several users for numerous datasets. It's very important for the user's to know when I've updated certain spatial or attribute features in the dataset. I created four fields in the datasets:   * Spatial Accuracy Date   * Spatial Accuracy Edited By   * Attribute Accuracy Date   * Attribute Accuracy Edited By: It takes a fair amount of time to update all four of these fields. I'm wondering if there is any way to have these fields auto-populate when I change them, either spatially or in the attributes. I thought I heard of something along these lines when ArcGIS 10.0 came out, but after some Google-ing, I haven't been able to fine anything. I know it’s probably a pipe dream to believe that ESRI would have something like this built in, especially something that can derive whether a feature was changed spatially or in the attributes. I'm hoping there is an ESRI ArcGIS ability to do this, but I am also open to 3rd party extensions or python code.


Polygon shapefile to Raster with Mask and Extent

I have a polygon shapefile (Vesijärvi lake). The lake has many islands, bays and inlets. When I look at the attribute table, there are actually two adjacent features: Northern lake and southern lake. I have a pre-defined rectangular area of interest with the min x, max x, min y, max y in ETRS-TM35 FIN projected coordinates. The area of interest overlaps with the both parts of the lake. I also have a pre-defined raster cell size (10 meters) My task is: Create a .tif raster file, where 'water' cells (inside the lake) have a value of 1 and 'non-water' cells (outside of lake) have a value of 'no data'. I know that in ArcGIS you can use a 'Feature to Raster' tool, but I don't have ArcGIS. I'm trying to use an open-source GIS, preferably QGIS. In QGIS, I found a tool called 'Rasterize' but I cannot set the minimum x, maximum x, minimum y, maximum y, cellsize and the lake polygon mask. There is a 'Horizontal' and 'Vertical' expression but any combination of numbers gives me an expression is not correct error. Any help with using the QGIS rasterize tool (or a similar free vector-to- raster tool) for converting a polygon shapefile to a raster with the predefined extent, cellsize and mask would be appreciated.


How do you view the current spatial index grid size for a file geodatabase feature class?

I am receiving an "The spatial index grid size is invalid." error during a copy/paste of polygon features in ArcMap and I successfully corrected it with AddSpatialIndex. But in an effort to figure out how and why I ended up with invalid grid size, I thought I would start with the actual grid size. I would like to know what the current grid size is and I don't see a way to view that in ArcCatalog. Is it possible to view the current grid size of a file geodatabase featureclass?


Add SimpleMarkerSymbol and then remove it upon next click

My map has some markers and when I click to identify a marker, I'm adding a marker to it. When I click the next marker though, I'd like for the previous marker to be removed since I'm only interested in the more recently identified element. I'm using the legacy modules, JavaScript API.                   var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 18,             new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,             new dojo.Color([0,0,0]), 1),        // border color             new dojo.Color([255,255,0,0.80]));  // fill color         App.map.graphics.add(new esri.Graphic(queryResults[0].feature.geometry, symbol));


I've pondered for a while whether I should ask this question. I even asked whether I should ask a question that should probably be a community wiki on the meta site. Since I didn't get many responses, and the one I did get didn't really explicitly say I shouldn't ask it, I’m going to go ahead and ask it anyway: **How are you, as GIS professionals, spending most of your day at work?** That is, what GIS tasks do you perform to get your job done? I’m curious how my day-to-day activities compare to others in the field. These are some examples of how I spend my GIS work (feel free to add others):   * Cartography – creating new maps, or modifying others    * Scripting/Tool Building    * Research    * Data Edits/Cleansing    * Analysis (vector)    * Analysis (raster)    * Meetings   * Visiting GIS.stackexchange.com Also feel free to add a percentage of your time on different tasks, if you're so inclined.


Can I add entries to the layerlist context menu?

I am implementing a python based plugin for use with QGIS 1.8. Most of it's user interface is contained within a QDockWidget but there are some layer specific controls I would like to append to the context menu displayed when the user right-clicks on the Table Of Contents. Is there a way for me to manipulate this menu?


OpenGeo/Geoserver: can I have a store that access more than one PostGIS schema?

I have an existing PostGIS database that I use with QGIS. I am now looking at options for getting some of this data up on the web. Hence OpenGeo. I have Geoserver installed and running and have succeeded in loading a simple layer from my PostGIS database. My current problem is that in QGIS/PostGIS I have used the base schema for my geometry tables and put all the tables relating to my layers into the layers schema. I build my layer using sql. When I create a new 'store' in geoserver I am forced to specify a single schema within the database so this breaks my modus operandi that I use in QGIS. I am also struggling to figure out how to define "SQL Views" and whether or not these are dependent on 'stores' or whether there is some other mechanism that will allow me to do arbitrarily complex SQL queries on the database.


Why does the "calculate" button remain gray in Group Stats Plugin?

I'm trying to use the Group Stats Plugin. I found your tutorial and I wanted to post a comment but I have seen that it is not possible then I thought to write here. Unfortunately I can not use the plugin: after I enter all the required values, press "calculate" is not active and is always gray. My problem is that I have a shape of point that are points for animal sightings. This shape is formed by a text field containing the types of areas (beech, poplar, etc.) and another containing the areas value. I need to calculate the number of records that contains a precise type of vegetation and the sum of the relative areas. This is possible with Group Stats Plugin? Thank you very much!


Complete Metadata of a service not available with Geoportal

Using ArcCatalog, I tried creating the metadata of an ArcGIS Server service with the ISO 19139 / 19119 standard. But while registering this service with our custom ESRI geoportal, only the basic metadata information of the service (such as title, description and tags) are getting saved to geoportal database. How can I access the additional metadata information (such as owner, contact details etc of the service)? For this, do I miss anything while registering the service with geoportal?


Is it possible to set symbol layers always on top?

Is it possible to set symbols always on top, also if the layer with the symbol is drawn under another layer? Example: My layer order is like that: Streets (top)   Buildings   Landuse (bottom) The Buildings layer have centroid-symbols. But these are drawn underneath the streets layers: ![enter image description here](http://i.stack.imgur.com/ALLes.png)


DEM mosaic: gaps

I have generated DEMs (bare earth) from Lidar data. For computational reasons, I have processed via ArcGis the lidar files in chunks, so I came up with different single DEMs. After, I used "Mosaic to New Raster" tool, and created a single DEM raster. I noticed that there are some gaps (lines) along the junctions between the original single DEM rasters (from which I got the single huge raster). I tried this function in the raster calculator:               Con(IsNull("raster"), FocalStatistics("raster", NbrRectangle(5,5, "CELL"), "MEAN"), "raster")      where "raster" is the name of the single huge DEM. The problem is that the gaps are still there. Any suggestion?


How to calculate the area of overlapping buffers within a single layer

I am very new to GIS, so don't know if this is EXTREMELY easy or impossible. I have GPS coordinates for stores (about 15000) for which I have created a buffer zone around each store location obviously (or not) in a single layer. In metropolitan areas I now have overlapping buffer areas. I would like to calculate the area where buffers overlap. I have established how to do this if each point were a separate layer, but with 15000 points, I just do not have the time or the energy to do this. Please help. I am working in QGIS.


fill a layer's attribute table from another layer's attribute table

i am working on arcgis 10.1. I have a layer of polygons divided into squares of 200m/40m with the attribute table filled. I have a second layer of polygons divided into squares of 200m/60m with an empty attribute table. the second layer is the new division into squares of the first one, so they have the same attributes. how can i fill the second layer using the data on the first one using arcgis 10.1? i want the second layer to take the value of the centroids of the first layer. ![Attribute table](http://i.stack.imgur.com/AfyT3.jpg)![the first layer](http://i.stack.imgur.com/Mhw6z.jpg) ![the second layer ](http://i.stack.imgur.com/oMFE2.jpg) Thank you.


Resequencing Legend Items in Python

I create various layers programmically with Python in ArcMap 10. I can adjust how the layers are sequenced using the `arcpy.mapping.MoveLayer` command. But I want to have the legend reflect a different order. I have yet to figure out how to do this in Python. I have tried using `legend.autoAdd=True or False`. I think I am close in using:               legend=arcpy.mapping.ListLayoutElements(mxd,"LEGEND_ELEMENT","My Legend") [0]      and then legend.items.something. I have four legend items A, B, C, and D which appear incorrectly as D, C, A, B Can anyone provde a link to code examples or better documentation?