title: Plugin Workspace: when to close an OleDbDataReader?

text: I'm developing a plugin workspace for ArcGIS. Internally, the plugin uses an OleDBconnection. All of the sample code I see seems to stress the importance of closing and disposing the connection. When the client retrieves all rows from my plugin cursor, this is not a problem - when OleDBDataReader.Read() returns false, I close the connection and set IPluginCursorHelper.IsFinished to true. However, in the case where the client _doesn't_ retrieve all of the rows I am not able to find an appropriate place to close the connection. **Since the client is required to call`ReleaseCOMObject` when he's finished with the cursor, is there some way the plugin cursor could be informed of this event and close the ~~OleDBConnection~~ OleDbReader if it is still open?** I tried implementing IDisposable, but ArcGIS doesn't call dispose. I tried using a destructor, but when I try to close the connection there I get an exception saying "COM object that has been separated from its underlying RCW cannot be used." **Update** After having no luck with the COM hacks offered in the comments, I changed my code so that now the IPluginDatasetHelper is responsible for opening the OleDBConnection the first time a cursor is requested. It passes the open connection the cursor's constructor, which keeps it as a member variable. Now the problem is this: **how can the IPluginDatasetHelper close the OleDBConnection?** Fortunately, the issue is no longer anywhere nearly as urgent - _apparently **only one instance** of the IPluginDatasetHelper ever gets created_. The test code below works without a memory leak, _and the IPluginDatasetHelper's constructor only gets called once_. When justone is true, the test code would show severe memory leakage when the cursor is responsible for opening the connection and `justOne` true. With the dataset helper responsible for opening the connection and justOne true it climbs to 200MB and stabilizes. Still, it would be nice to know where to close the connection in the dataset helper.               for (int i = 0; i < 1000; i++)     {         Type t = Type.GetTypeFromProgID("esriGeoDatabase.MyPluginWorkspaceFactory");         var factory = Activator.CreateInstance(t) as IWorkspaceFactory;         var fws = factory.OpenFromFile(dbcPath,0) as IFeatureWorkspace;         var fc = fws.OpenFeatureClass(tableName);         IFeatureCursor fCur = fc.Search(null, false);         IFeature feat;              while ((feat = fCur.NextFeature()) != null)         {             if (justone)                 break;         }             System.Runtime.InteropServices.Marshal.FinalReleaseComObject(fCur);     }      **Update 2** Running the test in the VS debugger, I get this rather strange exception. I'm hoping it is a result of running it in the debugger from a console exe and will not happen within arcmap. (10000 iterations for test loop). > **ConextSwitchDeadlock was detected.** The CLR has been unable to transition > from COM context 0x4cd7fe8 to COM context 0x4cd8158 for 60 seconds. The > thread that owns the destination context/apartment is most likely either > doing a non pumping wait or processing a very long running operation without > pumping Windows messages. This situation generally has a negative > performance impact and may even lead to the application becoming non > responsive or memory usage accumulating continually over time. To avoid this > problem, all single threaded apartment (STA) threads should use pumping wait > primitives (such as CoWaitForMultipleHandles) and routinely pump messages > during long running operations. **Update 3** I've refactored so that the connection is now a member of the Dataset class and an OleDbDataReader is a member of the cursor helper class. I'm not sure how critical it is to close the connection in the dataset helper. IPluginDatasetHelper has an `Open` - but no `Close`. Now the question is how do I close the OleDbDataReader. (Original question was OleDbConnection.)


title: How did QGIS fix a shapefile's character encoding, and can I do this on the command line with ogr2ogr?

text: **Solved** : I'm not sure why, but it works fine if I specify `\--config SHAPE_ENCODING "ISO-8859-1"` in my ogr2ogr command. For whatever reason, this allowed ogr2ogr to go from the original TigerLine shapefile, as-is, directly into a MySQL database. My final ogr2ogr instruction, in full:               ogr2ogr --config SHAPE_ENCODING "ISO-8859-1" -f "MySql" MySql:"usa_basemap,host=127.0.0.1,user=myUser,password=myPass,port=3306" -lco engine=MYISAM "C:/path/to/data/tl_2012_us_county.shp" -nln county -nlt "geometry" -s_srs EPSG:4269 -t_srs EPSG:3857      * * * **Background** : I was finally able to use ogr2ogr to import the TigerLine 2012 USA Counties shapefile into MySQL, but only after using QGIS to save the shapefile with a new encoding value (UTF-8). I'm wondering: What can I do differently, right inside the commandline with ogr2ogr, to avoid having to involved QGIS in the workflow? (Nothing against QGIS, it's just that I want to be able to automate this..) * * * **Here's what I did _before_ involving QGIS**: 1) Changed the MySQL max_allowed_packet size as is warned might be necessary on the OGR MySQL driver page. In MySQL Workbench, I set the new parameter value like this:               SET GLOBAL max_allowed_packet=1073741824;      2) Next, I tried to import it into MySQL with ogr2ogr like this:               ogr2ogr -f "MySql" MySql:"basemap,host=127.0.0.1,user=myUser,password=myPass,port=3306" -lco engine=MYISAM "C:/path/to/data/tl_2012_us_county.shp" -nln county -nlt "geometry" -s_srs EPSG:4269 -t_srs EPSG:3857      But that bombs with an error that spills outside of the buffer, it ends as shown below, note the appearance of the special chars, which are lost.               [....hugely....truncated....console....output....]     322122,-7366573.8710948359 2062754.2910927597))',1) , '72', '045', '01804502', '     72045', 'Comer�o', 'Comer�o Municipio', '13', 'H1', 'G4020', '490', '41980', 'A'     ,       73557129,         319735, '+18.2250402', '-066.2202984')      It's worth noting that after hitting this brick wall and Googling around, I tried the tips suggested by Mateusz Łoskot in this discussion; to restate the salient portion: > *Windows Command Prompt can work with UTF-8 characters if you change > codepage to UTF-8: > > 0) Open new prompt (cmd.exe) > > 1) Change font to Lucida Concole > > 3) chcp 65001* But this didn't overcome the obstacle. Finally, wondering if QGIS could help, I used QGIS to export the shapefile, specifying UTF-8 as the character encoding, _then_ the ogr2ogr command I provided above worked. Bingo. Now I have "Comerío Municipio" in my database.. ..but what gives? So my question: **Is QGIS doing something I can add to my ogr2ogr instruction that automatically resolves the special characters issues I encountered so I can automate this task in the future and not have to manually involve QGIS?**


title: Why do I get "Failed to transform" when reprojecting from WGS84 to Google Mercator?

text: I am attempting to re-project a vector shapefile from Natural Earth, following a qgis tutorial. Another user reported this error, but a solution has not yet been reported. Given this post, and the last line of the error, I suspect that there is something wrong with the CRS setting, etc. Though, I have not been able to identify it.                  Export to vector file failed.     Error: Failed to transform a point while drawing a feature of type 'ne_10m_admin_0_map_units'. Writing stopped. (Exception: forward transform of     (3.141593, -1.570796)     PROJ.4: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +to +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs     Error: tolerance condition error)      I am using qgis 1.8.0 on Ubuntu 12.05. Thanks for the help!


title: Merged Layers turned into square shape cause by single layers in QGIS?

text: What I did is merged the 30 layers of the map (Isabela Map Province - Philippines) and below is what happened. How do i remove the inside map of the border? I'm new to QGIS and I'm using QGIS 2.4 Chugiak. ![enter image description here](http://i.stack.imgur.com/WqLAd.png)


title: Where is the reference for functions available in CartoCSS

text: I'm playing with Tilemill and i see that for some properties, like marker- transform, i can use functions. I want to use rotate() which takes 3 arguments (i learned this by inputing just one so it reported an error). What i can't seem to find anywhere is the reference for these functions. Can someone point me to it?


title: What does the adoption of Python by NVIDIA for GPGPU mean for GIS?

text: Today NVIDIA announced support for the Python language on its flavor of GPGPU (CUDA). Manifold GIS uses CUDA to enable some accelerated raster operations but it is not a programmable environment and is limited to what functions its developer has provided. With Python, used in many GIS packages including ArcGIS and QGIS (along with the numpy and sciypy packages), being supported as a first-class CUDA language, what are the prospects for being able to leverage GPGPU in these mainstream GIS packages?


title: GeoWebCache WMTS always replacing tiles in cache

text: I've spent the last two days trying my hand at GeoWebCache. I've had some issues and am now out the office so can't access any code to attach. I know if i don't post this it'll bug me all weekend. I've been using GeoServer WMS on demand from my OpenLayers app but wanted to make use of the integrated GeoWebCache. (a) do I have to use WMTS to use the cache? My current thinking is yes and I have changed my code accordingly. my new WMTS url points to geoserver/gwc/service/wmts. So i went and configured my geowebcache.xml to include the BNG 27700 gridset. I also included 14 resolutions that correspond to my app's map scales. Map and gridset both return 256x256 tiles. No problem. I edit my layer.xml for the desired layers to include my gridset. My Catalina.out shows this is all fine when i start tomcat5. I've read i need to have a different layer name in my geowebcache.xml to the actual layer in geoserver. (b2) is this true? My app then makes some very slow WMTS requests which take upto a minute to comeback. Significantly slower than my previous WMS. (c) Why? . I've tried png, png8 and jpeg. (d) which is quickest? Currently favour png8. I'm using mastermap area data with an simple SLD. No labels or transparency so i'm not sure why it's so slow. I see my pyramids begin to build in the gwc directory when i make these horribly slow requests. However, when i make exactly the same request again, the tiles are replaced in the cache rather than consumed. Obviously there is no performance benefit as a result. (e) Why are my tiles replaced? I am not setting any expiry details so presume the metastore should handle this. When i went to revert back to my previously quickish WMS request they too were now very slow. (f) Is this related? Bouncing the server didn't help. Details: GeoServer/GeoWebCache is on a RHEL 16GB RAM machine. The cache store limit is set to 5GB which I'm nowhere near. I have the latest versions of both apps. Help with any of my 6 questions would be great! Thanks.


title: ArcGIS coordinate system

text: I'm developing some software using ArcGIS API, but the question is rather theoretical, as I just came from Google Maps and have no idea where to start; everything seems to be different including the metrics used. I'm not even sure how to explain what I want to understand, so I'll just shoot (don't shoot me if I misname something). So, the very basic understanding I'm missing is the coordinate system. I'm creating a `MapView`, then I assign an `Envelope` (this probably to be the area displayed on the map, right?) as its extent. The problem starts here, `Envelope` requires some parameters that are definitely not latitude/longitude (I've tried those and the map was showing some random area). From the samples I could just figure out that numbers used are rather strange (something like 658346.0152817797, 6239589.28803324, 841568.832957386, 6366554.416159659) and are not coordinates. What are these numbers? And how can I transform my lat/lon coordinates into acceptable numbers?


title: How to "calculate" distance-to-ground of all 18 OSM zoom levels?

text: Assuming I'm building a 3D solution with the "world" being mapped to global geo-data supplied by OSM / Cloudmade... think http://www.webglearth.com but with completely different goals and use-cases. In fact we won't have a round sphere but only work off a "flat" (+ elevation later) surface/ground plane at all times. Now assume further that we want to texture the "visible" fragments of the "ground" plane with OSM and/or Bing/MapQuest/Google aerial map tiles, the level of detail / zoom level to be chosen based on the "camera's" / viewer's "altitude" / distance-to-ground -- say in meters. Knowing that 1. we only use OSM-equivalent tiles using exactly the same spherical mercator projection (which, from what I gather, is used by all the major map players ie. OSM, Google, Bing) and hence 2. always equivalent scale- distortions depending on latitude: how can I decide which zoom level to switch to when viewer altitude changes? Of course the boundary cases are easy: zoom level 18 is to be used on-or- close-to-the-ground and zoom level 0 from "outer space". But the intermediate cases are a mystery to me when it comes to figuring out "from which altitude they had been taken if they were simple photos", so to speak. I saw this page http://wiki.openstreetmap.org/wiki/Zoom_levels and some related pages but nowhere did I find an approximation on how to "map" a fictive altitude to a zoom level.


title: Creating osm2pgsql tables in PostGIS database

text: I managed to partially setup `osm2psql` to work with my `PostGIS` DB. My DB contains now the following tables:                Schema |       Name        | Type  | Owner      --------+-------------------+-------+-------      public | geography_columns | view  | user      public | geometry_columns  | view  | user      public | spatial_ref_sys   | table | user      Now I get the following error when I try to import `osm` data into it. I'm using the following command:               osm2pgsql england.osm -d mydb -U user  -S default.style       The error I got :               sm2pgsql SVN version 0.70.5          Using projection SRS 900913 (Spherical Mercator)     Setting up table: planet_osm_point     NOTICE:  table "planet_osm_point" does not exist, skipping     NOTICE:  table "planet_osm_point_tmp" does not exist, skipping     PREPARE get_way (int4) AS SELECT AsText(way) FROM planet_osm_point WHERE osm_id = $1;      failed: ERROR:  function astext(geometry) does not exist     LINE 1: PREPARE get_way (int4) AS SELECT AsText(way) FROM planet_osm...                                              ^     HINT:  No function matches the given name and argument types. You might need to add explicit type casts.          Error occurred, cleaning up      Does anyone know what could be the problem?


title: US Tiger or Open Street Map Route Data: One Way Street & Intersection Data

text: We're building a U.S. street routing application (finding paths for cars between two or more locations using public roads) and would like to use open source data US Tiger Data or Open Street Map or other if available nationally. We have worked extensively with the US Census Tiger Street Segment data before (we built a geocoder http://maplarge.com/geocoder using Tiger), and using the Tiger data is our preference. However, I'm missing two pieces of important data that I think should be there but I can't find them in the documentation: **Question 1: Direction:** I know some streets segments are One-way, meaning that traffic is only allowed to flow in a particular direction, and I need to know if the Tiger or OSM have direction attribute data that can be linked to street segments. Specific links to documentation / data / examples would be awesome. **Question 2: Connectivity.** When two roads cross it implies an intersection. However, you can't always go from one road to another.. for example, when a local road crosses a limited access highway, connectivity is often limited to certain "on ramps". I would like to know if the Census/OSM data can _reliably_ provide information about connectivity at intersections. Specific links to documentation / data / examples would be awesome. Thanks! (ps this is a high volume application that requires our specific architecture, please don't dodge the question and suggest ArcGIS, MapPoint or a web service.)


title: Find the nearest geo point

text: I have a gps device that does not output very accurate gps positions. How can I round those coordonates so that they will match the street course and not buildings etc ? I want to draw a route on google maps but the line strikes buildings etc. I don't want that i just want a route on the street. Thanks


title: Installing postgis on postgresql 9.1 not working

text: I'm trying to install Postgis 2.0 on a perfectly functionig postgresql 9.1.10 database. I installed the package via:               richard@srv1:/$ sudo apt-get install postgresql-9.1-postgis postgis     Reading package lists... Done     Building dependency tree            Reading state information... Done     postgis is already the newest version.     postgresql-9.1-postgis is already the newest version.     0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.      With out any errors. Then I try to add postgis as an extension to an existing (empty) database, with:                dev=# CREATE EXTENSION postgis;      ERROR:  could not open extension control file "/usr/share/postgresql/9.1/extension/postgis.control": No such file or directory      If I look at the location the file does not exist. What am I missing? I can't figure it out. If I google I only get ancient results.... Where can I find the version of the installed postgis? As I'm not able to do a `SELECT PostGIS_version();` Environment: Postgresql 9.1.10, Ubuntu 12.04 **Update** I'm willing to install postgis2.0; apparently I have 1.5 installed. After purging that version I added the repository               deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main      After trying to install the package via               sudo apt-get update     sudo apt-get install postgis      it ends with:               Errors were encountered while processing:     /var/cache/apt/archives/libgdal1_1.9.0-3.1~pgdg12.4+1_amd64.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)      **Update 2** It appears because of the naming of the packages, it installed the wrong architecture type package. But I ended up using this website and these steps after making sure I had gdal>= 1.9.0 and GEOS >=3.3.3:               wget http://postgis.refractions.net/download/postgis-2.0.0.tar.gz     tar xfvz postgis-2.0.0.tar.gz     cd postgis-2.0.0     ./configure --with-gui          make     sudo make install     sudo ldconfig     sudo make comments-install               sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/shp2pgsql     sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/pgsql2shp     sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/raster2pgsql      **TADA**               durham=#  select PostGIS_full_version();     NOTICE:  Function postgis_topology_scripts_installed() not found. Is topology support enabled and topology.sql installed?                                                                          postgis_full_version                                                                          --------------------------------------------------------------------------------------------------------------------------------------------------------------      POSTGIS="2.0.0 r9605" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.8" LIBJSON="UNKNOWN" RASTER     (1 row)


title: How I can incorporate results of histogram stretching into georeferenced image?

text: I have one channel 8 bit raster and when I open it in QGIS with histogram stretching "on the fly" it looks fine. How I can recalculate original raster accordingly changed histogram?


title: Why does CON statement give ERROR 010240: Could not save raster dataset to (value) with output format GRID?

text: I am receiving the following error when trying to run the following code:               import arcpy          from arcpy import env          from arcpy.sa import *          arcpy.CheckOutExtension = "Spatial"          env.workspace = r"C:\final_mosaic_files\for_python"          Z3 = Raster("mos_zb3")          Z4 = Raster("mos_zb4")          PC2 = Raster("pca_finb2")          outCon = Con(Z4 < -0.9274,2, Con(Z3 <-0.6223,2, Con(PC2 > 1.13,2, Con(Z3 <-0.05342,2,1))))          outCon.save(r"C:\classifications\actual_real_deal\CART")      The error is: > RuntimeError: ERROR 010240: Could not save raster dataset to > C:\Users\User\Documents\Mo with output format GRID. I have tried changing the destination folder, and the file does not currently exist in the directory, and the values of the raster are within GRID parameters for the type of format. The input rasters are mosaics of z-score values of 12 landsat images delineating coastal marsh in the northeast. The cell size is 30X30m, using WGS1984 coordinate system, no projection system. I have tried running the script with .tif file format instead of GRID, which does not work, throwing another error (file Z3 does not exist or is not supported). I have also tried running the script with other, smaller GRID files, which throws the same error 010240.


title: What is the best method to smooth TIN Surfaces?

text: ![enter image description here](http://i.stack.imgur.com/4RSMt.jpg)I have a 3D Tin which shows avocado sizes as the z-value. The 3D visualization is perfect however, not for our needs as it requires too much interpretation from a end users perspective. How might we create continuous surfaces with the same output, while avoiding interpolation? Edit: The image below is the tin surface clipped to a farm boundary. The lighter green is indicative of size 48 fruits, which are the largest. Ideally, I would like to create a continuous raster with similar output, such that interpolating the surface will not create an equal distribution across the farm.


title: How to change dimension annotation style in ArcMap 10.1?

text: For some reason, the option to add a "New" or "Import" style is grayed out. I tried creating a different dimension annotation feature class with the style I want, and then copy and pasting the records...but the option to copy was grayed out. I have a ton of dimension annotations in the feature class I am trying to change so re-doing it is not an option. Anyone know what is going on? ![enter image description here](http://i.stack.imgur.com/MpJDJ.jpg)


title: Google maps layer as the base layer and WMS as overlays shows empty map

text: I have a problem of showing my base layer which is Google Maps. The browser console reports > "Uncaught TypeError: undefined is not a function" in var google_streets = > new OpenLayers.Layer.Google( "Google Streets", {numZoomLevels: 20} );. This is my code:                       var map;             var untiled;             var tiled;             var pureCoverage = false;             var format;                  var googleMercator = new OpenLayers.Projection("EPSG:4269");             var baseProjection = new OpenLayers.Projection("EPSG:4326");                  OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;                  OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;                  function init(){                      format = 'image/png';                 if(pureCoverage) {                     document.getElementById('filterType').disabled = true;                     document.getElementById('filter').disabled = true;                     document.getElementById('antialiasSelector').disabled = true;                     document.getElementById('updateFilterButton').disabled = true;                     document.getElementById('resetFilterButton').disabled = true;                     document.getElementById('jpeg').selected = true;                     format = "image/jpeg";                 }                      var bounds = new OpenLayers.Bounds(                     -179.147340000341, -14.37879999982,                     179.778480000052, 83.1480859363171                 );                 var options = {                     controls: [],                     maxExtent: bounds,                     maxResolution: 1.4020539843765352,                     projection: googleMercator,             displayProjection: baseProjection,                     units: 'degrees'                 };                 map = new OpenLayers.Map('map', options);                      // setup tiled layer                 tiled = new OpenLayers.Layer.WMS(                     "US_Canada:northus - Tiled", "http://localhost:8080/geoserver/US_Canada/wms",                     {                         LAYERS: 'US_Canada:northus',                         STYLES: '',                         format: format,                         tiled: true,                         transparent: true,                         tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                     },                     {                         buffer: 0,                         displayOutsideMaxExtent: true,                         isBaseLayer: false,                         yx : {'EPSG:4269' : true}                     }                  );                      // setup single tiled layer                 untiled = new OpenLayers.Layer.WMS(                     "US_Canada:northus - Untiled", "http://localhost:8080/geoserver/US_Canada/wms",                     {                         LAYERS: 'US_Canada:northus',                         STYLES: '',                         format: format,                         transparent: true                     },                     {                        singleTile: true,                         ratio: 1,                         isBaseLayer: false,                        yx : {'EPSG:4269' : true}                     }                  );                 var google_streets = new OpenLayers.Layer.Google(                     "Google Streets",  {numZoomLevels: 20}                 );                      map.addLayers([ google_streets, untiled, tiled]);                      map.addControl(new OpenLayers.Control.PanZoomBar({                     position: new OpenLayers.Pixel(2, 15)                 }));                 map.addControl(new OpenLayers.Control.Navigation());                 map.addControl(new OpenLayers.Control.Scale($('scale')));                 map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));     }


title: Is there a way to retrieve the version of the ArcMap Addins currently loaded?

text: The Addin system doesn't seem to be perfect. When I update the Addin in the network share, the version number immediately gets updated in the ArcMap Addin Manager, even though the updated binaries have not been loaded into the Assembly Cache. This can confuse people whether they have the most current version actually loaded. I am trying to compare the version of the actual binary, to the version ArcMap thinks it has installed. Getting the binary version is easy, but I am having difficulty getting the ArcMap Addin version. Is there an interface for this I need to query? Or is this even possible to do?


title: How to select a subset of separate bands in GRASS GIS?

text: As you know landsat data has separate files for different bands. Creating a subset is a wise option to work on region of our interest. Therefore, I used this method to subset my image -               d.zoom || g.region     g.region -p     r.mapcalc *subset*=original      But with this I can subset one band data at a time. Is it somehow possible to use i.group and region definition to obtain subsets of all bands? Scripting might be an answer but I have no much idea about it!


title: Anyone using JAMB (Just Another Map Book) on ArcGIS10?

text: I wanted to experiment with JAMB for creating Plan and Profile figures that our company currently produces in AutoCAD. I'm having trouble installing JAMB on ArcGIS10, probably because it has not been updated yet, and the jury is still out as to whether it will be. One of the options I'm looking at is installing VirtualBox and running 9.3.1 side by side with 10. I contacted ESRI support and they assured me that 9.3.1 can check out 10 licenses, so that looks like a viable option. However it would be easier if JAMB could run on ArcGIS 10. Any thoughts?


title: JPG file all black when added as raster in QGIS

text: I add a new raster layer in the latest QGIS and select a JPG file, but it is all black. I tried adding the TIF version of the same image and that worked. What is it with the JPG, and how should I import it correctly? Thank!


title: Problem in r.resample

text: When I run r.resample to crop a map by using a vector and a mask, the resulting map has the same shape as the vector that I used but does not replicate (exactly) the portion of the raster map that I used as input in the r.resample. It produced a map with altered elevation values that is different from the raster map I used as input. I read that r.resample just "crops" the raster that is its input and does not alter it. I do not know why r.resample alters the output map


title: How to fix JSON error in Silverlight Application?

text: I am trying to run a simple Silverlight application based on code provided by ESRI at this link (Silverlight Samples). My app works fine if I just use the TiledLayer but if I add the Dynamic layer and set it to a Wells MapService I have running on my server, I get an error stating that the WellsLayer has a SerializationException and is not a valid JSON primitive and this error can occur when extraneous data is present after JSON data. What does that mean? I did see in the forums that someone suggested that a clientaccesspolicy may not be in place at the wwwroot folder. I have downloaded and placed that file there but no luck.. Thoughts?


title: How to delete a base map in GRASS?

text: I'm trying to delete a map that I used as a mask before, but I cannot delete it using g.remove. It displays this: g.remove rast=raster_Mnorzagaray@PERMANENT   [raster_Mnorzagaray@PERMANENT@PERMANENT] is a base map. Remove reclassed map first: MASK@PERMANENT


title: How to disable ArcMap Addin combo boxes to not allow extra text next to them?

text: I am developing an Addin for ArcMap 10. There are two combo boxes that I use. On several of my users's computers, they get this extra text next to the combo box. It appears it is text from the "Caption" attribute in the Addin xml. I can reset the tool bar but the text comes back after I load any MXD (even new fresh ones with nothing in them). I can not replicate this on my computer, or my co-workers. It only appears on a few users computers in different offices. I have checked everything they have installed, and found the production tools for 10, but haven't found that causes the problem. They say they have a custom VBA script they use to load some data points, but I can't find any of the VBA code being executed using the VBA editor. I have also found that in customize mode, I can "Browse for image" and change the image, which makes the text go away, but as soon as I go back to the MXD, this setting is reset. The "Default Style" is checked but greyed out, along with the other options. Here is my current snipplet of XML for first combo box:               <ComboBox          id="RSAC_Canopy_Cover.Addin_TargetLayerCombo"          class="Canopy_Cover.Addin.Combos.TargetLayerCombo"          message=""          caption=""          tip="Target Plot Layer"          category="Canopy Cover"          showCaption="false"                    editable="false"          sizeString="FFFFFFFFFFFFFFFF"          itemSizeString="FFFFFFFFFFFFFFFF"/>      Here is a picture of the issue: ![Arcmap Addin combo box problem](http://i.stack.imgur.com/oZ4lY.jpg) Has anyone encoutered this problem? Can I disable this in my code, or even overide this in code some how? Does anyone know the cause of this?


title: Problem with import CSV files to QGIS 2.0.1

text: I have a problem with import CSV files to QGIS 2.0.1. I have a file with WGS84 coordinates it looks that:               Nr;Longitude;Latitude     1;18,06,23.66;54,83,12.50     2;18,08,81.30;54,73,09.30     3;18,23,47.62;54,83,11.77     4;18,28,25.92;54,79,56.37     5;18,19,08.39;54,75,02.55     6;18,39,31.49;54,72,78.02     7;18,43,98.37;54,63,70.36     8;18,56,39.86;54,48,10.63     9;18,02,12.36;54,77,67.14     10;18,19,55.17;54,83,17.04     11;18,45,62.00;54,66,41.40      QGIS import only the eight line. I don't know why? Every line looks the same Here is this CSV files: wyslijto.pl/download/i4f3gk2cum Has anyone idea what's going on? Maybe it's problem with coding?


title: What do the parameters for Google Streetview mean?

text: I've noticed that the new Google Streetview uses a url of the following structure: https://www.google.com/maps/place/London/@51.508506,-0.125532,3a,90y,72h,90t/data=!3m4!1e1!3m2!1s-KZZeMFtZx0aq3L0MLqE-A!2e0!4m2!3m1!1s0x47d8a00baf21de75:0x52963a5addd52a99 Specifically, there is a string like this `@51.508506,-0.125532,3a,90y,72h,90t` I understand lat/lon/heading (I think) but I'm unclear on zoom and tilt. I think it could be structured like this:               @51.508506 -> lon     -0.125532 -> lat      3a -> zoom?      90y -> tilt      72h -> heading (measured from North)     90t -> ?      Are there any references to these parameters, anywhere? I can't quite figure out the `zoom` parameter, as well as the `90t`


title: Can you add dynamic text from a count of features in a layer with ArcGIS 10 ArcPy.mapping?

text: I am new to writing scripts, and I am trying to make a map series using ArcPy.mapping and data driven map pages. I would like to put some text on the map that updates for each map in the series depending on a new definition query for my dataset of sites. So, I set up my map series based on the district numbers the sites are in (districts 1 - 32). So, the pageNum should also equal the district, and I thought I could pass the pageNum into a SQL query and get a new count of sites for each district and then insert that as dynamic text using text.replace. Here is my code - can anyone tell me where I'm going wrong with this? I would be so grateful! EDIT I was able to get my code to work, so I am replacing the erroneous code with the functioning one, in case it is useful for someone else... or if someone can show me how to make it more elegant and efficient;-)               import arcpy, string, os          mxdPath = "CURRENT"     outPath = r"D:\Geoprocessing\CDMAPS\PDFs\MapPage\\"     SitesConDist = r"D:\Geoprocessing\CDMAPS\MXDs_and_Geodatabase\CDMaps.mdb\Sites\SitesCD"     outputMXD = "D:\Geoprocessing\CDMAPS\MXDs_and_Geodatabase\SeriesMXDs\\"          try:         mxd = arcpy.mapping.MapDocument(mxdPath)         ddp = mxd.dataDrivenPages         df = arcpy.mapping.ListDataFrames(mxd, "Cong*")[0]             for pageNum in range(1, mxd.dataDrivenPages.pageCount +1):                       mxd.dataDrivenPages.currentPageID = pageNum             distNo = str(mxd.dataDrivenPages.currentPageID)             arcpy.MakeFeatureLayer_management("SitesConDist","siteLyr","[congress_dist_no] = "+ distNo,"#","")                  defCorp = "[COnly] = 'X'"             defCoop = "[COOP] = 'X' AND [COnly] IS NULL"             defNSIP = "[NSIP_Full_or_Partial] = 'X'"             defDisc = "[agency_use_cd] NOT IN ( 'A' , 'L' , 'M' )"                  arcpy.SelectLayerByAttribute_management("siteLyr","NEW_SELECTION",defCorp )             corpscount = str(arcpy.GetCount_management("siteLyr"))             arcpy.AddMessage(corpscount + " corps gages in district " + str(pageNum))             print corpscount + " corps gages in district " + str(pageNum)                  arcpy.SelectLayerByAttribute_management("siteLyr", "NEW_SELECTION",defCoop)             coopcount = str(arcpy.GetCount_management("siteLyr"))             arcpy.AddMessage(coopcount + " coop gages in district " + str(pageNum))             print coopcount + " coop gages in district " + str(pageNum)                  arcpy.SelectLayerByAttribute_management("siteLyr", "NEW_SELECTION",defNSIP)             nsipcount = str(arcpy.GetCount_management("siteLyr"))             arcpy.AddMessage(nsipcount + " nsip gages in district " + str(pageNum))             print nsipcount + " nsip gages in district " + str(pageNum)                  arcpy.SelectLayerByAttribute_management("siteLyr", "NEW_SELECTION",defDisc)             disccount = str(arcpy.GetCount_management("siteLyr"))             arcpy.AddMessage(disccount + " discontinued gages in district " + str(pageNum))             print disccount + " discontinued gages in district " + str(pageNum)                  for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):                     if elm.name == "CorpCount":                         elm.text = "(" + corpscount + ")"                         print "Corp line in legend has been replaced"                     if elm.name == "CoopCount":                         elm.text = "(" + coopcount + ")"                         print "Coop line in legend has been replaced"                     if elm.name == "NSIPCount":                         elm.text = "(" + nsipcount + ")"                         print "NSIP line in legend has been replaced"                     if elm.name == "DiscCount":                         elm.text = "(" + disccount + ")"                         print "Discontinued line in legend has been replaced"             arcpy.RefreshActiveView()                  Pdf = outPath + "distNo" + str(pageNum) + ".pdf"             arcpy.mapping.ExportToPDF(mxd, Pdf)             mxd.saveACopy(outputMXD)             #os.startfile(Pdf) -> this line can be used to preview each map as it is created             arcpy.AddMessage("Created PDF {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount)))             print "Created PDF {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))         del mxd, df          except Exception, e:         import traceback         map(arcpy.AddError, traceback.format_exc().split("\n"))         arcpy.AddError(str(e))


title: How to programmatically set a rule-based renderer in QGIS?

text: These days im in a process of developing a plugin , which highlights/change color of set of features in a vector layer depending on some calculation. i found nice article about QGIS – Rule based styling (http://woostuff.wordpress.com/2011/06/06/one-of-my-favorite-features-of- qgis/) and i need to do the same thing but using the python code. What is the best way of doing this? is there any examples out there?


title: Is there a way to automate the preprocessing of LANDSAT data?

text: I'm currently enrolled in a remotesensing course, using LANDSAT data.   Part of my course is about **standardizing the scenes based on radiance values**. I assume that because this is such a tedious task, someone has already figured out a way to automate it. **Are there any tools, ESRI or otherwise that will standardize LANDSAT scenes?**


title: getting dxf files out of PostgreSQL

text: I've successfully loaded a bunch of shapefiles into a PostGIS database. I would like to be able to retrieve specific geometry and layers as dxf files based on SQL queries. I'm using PostGIS, GDAL, PostgreSQL, and Python from the OSGeo4W suite on Windows. I'm imagining that I should be using ogr2ogr a bit like this:               $ ogr2ogr -sql "SELECT * FROM some_table" -f "dxf" outputfile.dxf -overwrite "PG:dbname=mydb user=dbusername password=dbpassword"      but when I do that with the appropriate values, I get a series of errors like this:               ERROR 1: DXF layer does not support arbitrary field creation, field 'objectid' not created.       Resulting in an error for every attribute column in the layer `some_table` But I do get a dxf file. If I've already created a .dxf file, and I rerun the command above (including the `-overwrite` option), I get this error instead:               Layer sql_statement not found, and CreateLayer not supported by driver. ERROR 1: Terminating translation prematurely after failed translation from sql statement.      I have already checked to make sure that the `GDAL_DATA` environmental variable is set correctly. (to `C:\OSGeo4W\share\gdal`) It's certainly possible that I'm approaching this task incorrectly because I'm new to all these tools, so I'm open to any suggestions and tips about how to make .dxf files from GIS data stored in PostgreSQL based on SQL queries. Thanks in advance for any help.


title: Editing feature types of ArcGIS REST service without overwriting other field values

text: I am referencing an ArcGIS feature service to edit an SDE geodatabase using mobile applications (ArcGIS for iOS, ArcGIS Flex Viewer). I would like to have an editable feature class, with dynamic symbology. However, this allows for potentially overwritten data in some fields (those with default values). This is indicated by the following warning when changing the field that symbology is based on: > "Changing Feature Type - You are changing the feature type, which may > potentially overwrite some field values. Are you sure you want to do this?" If I proceed with the edit, all fields of the feature with default values revert to their defaults. I realize that this is not an error and part of the service/REST design. ESRI's suggested workaround is to allow null values for all fields, and to not set any defaults, as this will not set a default value for the fields at the REST endpoint. However, I need to have default values for several fields. One attempted workaround I have tried was to reference the feature class twice in the application. Once as an editable service with blank symbology, and again as non-editable map service with symbology based on the feature type. In this case, the editable layer's symbology does not change and thus field values remain in tact. The updated symbology then appears in the non-editable layer once the changes post to the database. The above workaround creates two new problems however. First, there is a significant time lag (1-2 minutes) between saved edits and updates to the symbology of the other layer. Additionally, it seems that if the edits post to the database while the same feature is being edited again (e.g. I save edits, but then open up the feature again for additional edits), some of the active edits will be lost. Is there a workaround for having symbolized features that change when edited that won't potentially knock out data?


title: Detecting patterns in vehicle GPS data

text: I need to analyze data uploaded from vehicle GPS devices to detect travel patterns and then attempt to learn about the normal travel patterns for that vehicle so that predictions can be made about maintenance, refueling etc. Some vehicles are domestic (exhibiting normal home->work->home travel patterns) and some are commercial with scheduled routing. I have loaded the GPS lats and longs to a database, and then constructed an ST_LineString with the data points for each vehicle (approx 1k points per vehicle per day). Vehicles will never have identical travel patterns (GPS accuracy, irregular ping times etc) and the patterns will be visible as subsets of pings - for example a one hour commute between point A (home) and point B (work) between 8am and 9.30am each morning, mon-fri. Now the difficult part - I am considering the options. I have to write this in a database procedural language using the usual toolbox of procedures, cursors, iteration etc. I could use Python if it is helpful - I'm a database guy trying to think laterally and spatially. A travel pattern could be identified by (i) a similar sequence of points that can differ by a tolerance (say +/- 300 meters) (ii) parking locations - if a car is parked at the same location for 8 hours a day (iii) temporal- the vehicle starts at trip at 0830 every day, +/- 10 minutes. I am planning to write a procedure that checks for each of these patterns for each point (or set of n points) by comparing it with all other points (or set of points) by iterating through the pings for each day in sequence. The easiest use case is to find recurrences of a vehicle parked at the same place each day. Detecting similar movement patterns is more complex. Can anyone suggest a technique for this? Thanks!


title: QGIS Globe UnsupportedOperationException

text: My QGIS Globe is not working: After starting it, that massage pops up in a endless loop: > UnsupportedOperationException: GeometryGraph::add(Geometry &): unknown > geometry type: N4geos4geom7PolygonE Im using xubuntu 12.04, QGIS 1.8.0, ATI graphic card and AMD X2


title: Geolocate stores inside a mall?

text: OpenStreetMap lists the malls in Albuquerque, but not the stores inside these malls. Using the in-mall map/directory, wouldn't it be easy to add stores inside the mall? Is anyone doing this? Of course, a more fun way would be to visit every store in the mall, but using the mall directory seems more efficient.


title: merge selected features and programming

text: I have a shape file with UK districts and unitary authorities. In the past, using commuting patterns, I worked out a new geography which is close to travel to work areas. I now would like to create a new shape file where UK districts and Unitary authorities are merged to create my new map of travel to work areas. I know it is possible to merge features manually by clicking the "merge selected features" icon. Only it is taking me ages... Is there a way of programming this? Is there a way to write some syntax win order to merge features? That would help a lot, because I will be able to write the program and while I am running it doing something else. Also I would have the syntax saved somewhere. Best Dr Chiara Rosazza Bondibene National Institute of Economic and Social Research


title: Tutorial for publishing and consuming toolbox using ArcGIS Server 10.1

text: Is there a simple tutorial for publishing and consuming toolbox using ArcGIS Server 10.1. In 10 I can just right click and publish my tools but in 10.1, things seems to change a lot. May I know if there is any simple tutorial from start to end?


title: Should large Basemaps be stored in DBMS via ArcSDE?

text: As I understand it, the SDE Geodatabase provides the technology for Multiuser databases, Versioning, replication and other Geodatabase functionality. In my organisation, this could be useful for vector datasets but we also have a large amount of basemap material including Aerial images for many different years, many topographic maps, and other historical and infrared images. My question is this. Does it make sense to fill my MSSQL DBMS with all this imagary? I am constantly having to explain to my colleauge who runs the DBMS why we are always short on filespace. If I simply created file-geodatabases and published these without using sde wouldn´t it be less work for the DBMS?


title: Caching aerials in a different coordinate system

text: I have a strange problem to deal with caching of the aerials. All of our Aerials are stored in SDE in State Plane WKID-2237 (NAD_1983_StatePlane_Florida_West_FIPS_0902_Feet). But we are planning to publish all our map services in WGS_1984_Web_Mercator Auxiliary Sphere (WKID-102100) to match up with the ArcGIS online/Bing maps. What is the best way of caching the aerials in a different coordinate system than that of its source in storage? Transforming it and then storing it is being restricted- partly due to space limitations. Can I do this by just changing the coordinate system in the Map Document to WKID 102100 and caching it without any Transformations? Are there any pitfalls with this approach?


title: Where to deposit global coverage dataset?

text: Some years ago I published a paper on Quarter Degree Grid Cells in the African Journal of Ecology. Quarter Degree Grid Cells (QDGC or QDS – Quarter degree Squares) is a way of dividing the longitude latitude degree square cells into smaller squares, forming in effect a system of geocodes. Historically QDGC has been used in a many African atlases. I have now revised the files and made one export per country in the world. It is a lot of data and I am hesitant to keep it on my website. The file format is ESRI shapefiles. I am considering using GitHub as a means of distributing the files. I keep the related code in a repository there. But the limit for a repository there is around 1 Gb and the files as a total easily gets to that size. Users will usually need a national level data set, so it makes sense to keep the files in separate national folders. They could also be individually zipped down. It should be easy for me to upload the files and to some extent also version them. Where could/should I deposit such files? Is BitHub a relevant alternative? Where else?


title: oracle search against intersect of a region that covers the whole world doesnt find any records

text: I am new to Oracle Spatial, I am trying to implement a service that will take coordinates from a map, and search our database to find any geometries that intersect with that map view. I works fine for the most part, but when I have the map zoomed out all the way where we can see the entire world, Oracle search returns no records at all. Can someone see why the following sql would return 0 records when I have over 20 records in the geometry table select g.id, g.name, SDO_UTIL.to_kmlgeometry(g.geom) as kml from geography g where SDO_RELATE(g.geom, SDO_GEOMETRY(2003,8307,NULL,SDO_ELEM_INFO_ARRAY(1,1003,1), SDO_ORDINATE_ARRAY( -180,-90, 180,-90, 180,90, -180,90 )), 'mask=ANYINTERACT') = 'TRUE'; several sample records inserted into the database INSERT INTO geography VALUES( GEOGRAPHY_ID_SEQ.nextVal, 'd2', SDO_GEOMETRY( 2003, -- 2d poly 8307, NULL, SDO_ELEM_INFO_ARRAY(1,1003,1), -- polygon SDO_ORDINATE_ARRAY(-77.01204711074818,38.88772105792418, -77.01200419540395,38.89196328335449, -77.00831347579947,38.89249647861828, -77.00827056045522,38.88768765356904, -77.01204711074818,38.88772105792418) ) ); INSERT INTO geography VALUES( GEOGRAPHY_ID_SEQ.nextVal, 'd3', SDO_GEOMETRY( 2003, -- 2d poly 8307, NULL, SDO_ELEM_INFO_ARRAY(1,1003,1), -- polygon SDO_ORDINATE_ARRAY(-77.05552889816111,38.86892085934577,-77.05329022237119,38.87065233921285,-77.05467677541158,38.87288138804671,-77.05786820241124,38.87248696633578,-77.05840989692072,38.87006762135151,-77.05552889816111,38.86892085934577) ) ); Any help would be greatly appreciated. Thank you!


title: How to refresh layers independently?

text: I'm writing a C++ application using QGIS API and I would like to improve the performance. I want to render 5 layers:   * one raster layer using gdal to load Bing/Google Map tiles    * 4 custom QgsMapLayer (using plugin layer type) to draw different lines/polygons/points in WGS84. For now, each of these layer is added to the MapCanvas, using:               QgsMapLayerRegistry::instance()->addMapLayer(customLayer);     QList <QgsMapCanvasLayer> myLayerSet;     myLayerSet.append(QgsMapCanvasLayer(cutomLayer,TRUE));     setLayerSet(myLayerSet);      On the canvas, I can have map tools, like panning, zoom in/out. I use custom layers because I want to easily decorate lines and polygons, using QPainter. This works, and I'm able to display what i want, where i want (using coordinate transforms from WGS84 to pseudo mercator). My problem is: **one of my custom layers draws a GPS point with some circles around it. This layer is refreshed every second.** To refresh my layer, I use the `canvas->refresh()`, but that refreshes all other layers as well, and by consequence, the GDAL layer. This takes a lot of time and it's not necessary. I have read some posts here mentioning the use of `layer->setImageCache()`, or by sub-classing QgsMapCanvasItem. Unfortunately, none of theses solutions works as I expect. `setImageCache` apparently doesn't work at all, or I don't know how to use it properly. Sub-classing QgsMapCanvasItem allows me to implement the layers that need frequent refresh, and refresh them without refresh Raster Layer but:   1. when panning the map, drawn objects don't follow the map (as a rubberBand can).   2. when i use zoom in/out, the selection rectangle erase what was drawn on my canvasItem, without triggering a redraw. I don't see how to do that, even if this subject seems relatively common. Am i on the right way or is there a better way? **EDIT :** thanks to Nathan, my problem is resolved, and i confirm that custom QgsMapCanvasItem is the solution to independently refresh some layers.   just keep in mind to use toCanvasCoordinates(), and implement boundingRect() properly.


title: Is the FME Extension for ArcGIS required in order to use arcpy scripts in FME?

text: Is the **FME Extension for ArcGIS** required in order to use arcpy scripts in FME? I dont think it is but when i run a simple startup/shutdown script in FME I am getting these error messages. ![enter image description here](http://i.stack.imgur.com/tZuy8.jpg) ![enter image description here](http://i.stack.imgur.com/ZiJnM.png) This article makes no mention of any known issues with the FME Extension for ArcGIS. I am running FME 2013 SP2 (32bit) and ArcGIS 10.1 on a 64bit machine. A custom python intepreter has been set for FME [C:\Windows\SysWOW64\python27.dll]


title: What's an appropriate solution for displaying points fetched from a table?

text: I have at hand a common GIS task: **The data** : I posses 16,000 Excel rows. Each has latitude and longitude and some other attributes. I need to build a program that allows **the user** to type in a location and a radius and then the program will look up the data and fetch only those points that fall within the given radius. **The output** should be a map with the fetched points displayed, but also a table listing the points that fall within the radius. I am aiming for a web mapping solution. Also, what programming language do you think would be suited for this? Any particular web map API? P.S. I am good at Python, but not so good at Javascript.


title: Creating a spatial database using EXTENSIONS: error loading legacy.sql

text: I am using Postgres 9.3 and PostGIS 2.1, installed in a Docker container via               RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list     RUN apt-get -y update     RUN apt-get -y upgrade     RUN apt-get -y install postgresql-9.3 postgresql-contrib-9.3 postgresql-9.3-postgis-2.1 postgis      According to the docs I can spatial-enable my database just by executing these commands against my db in a psql console:               CREATE EXTENSION postgis;     CREATE EXTENSION postgis_topology;      It then says:               If you plan to restore an old backup from prior versions in this new db, run:          psql -d [yourdatabase] -f legacy.sql      Well, I need to import data dumped from Postgres 9.1 and PostGIS 1.5.3 so I guess I need to do this (I have tried _not_ doing it and I get errors when creating a table with a geography column) I don't know where to find "legacy.sql" though. I downloaded http://www.postgis.org/download/postgis-2.0.2.tar.gz and found a "legacy.sql" in there but I get errors when I run it:               psql:/common/postgres_data/legacy.sql:11: 00-regress-install/share/contrib/postgis/legacy.sql: No such file or directory     (followed by lots more errors)      Looking at the source I think it's trying to include another file also called "legacy.sql" but I can't find it.


title: How do I set labels to not be one over the other?

text: In certain zoom I see many city labels "written" on each other. I know there is a feature that set to auto hide labels that override each other ( and I'm not talking about rendering from specific scale...) Where can I find it in QGIS?


title: Why don't my Shapefiles and OSM data overlap in Quantum GIS?

text: So I'm pretty new to GIS, and I'm working on a mapping project using data for Vancouver, Canada. I want to combine Open Street Map data along with data provided by the City of Vancouver. But the City data don't line up with the OSM data when I map them in Quantum GIS. Following the advice of this question's answer, I checked the two data sources against a third (a map of the world). The OSM data is right -- British Columbia is in the right spot -- but the City data puts Vancouver in the south of France. My data sources are:   1. Bikeways and libraries from the City of Vancouver. (Both are SHP files.) These are the data that don't align with the others.   2. A map of British Columbia from Open Street Map. I put the data into a database using osm2pgsql.   3. A world map that's part of the Open Street Style project.  Projections:   1. The City data are projected in UTM zone10, NAD83 (CSRS). I've selected this in QGIS's Layer Properties screen for those layers. Projection string: `+proj=utm +zone=5 +ellps=GRS80 +datum=NAD83 +units=m +no_defs`   2. The OSM maps are in Mercator projection. QGIS has many Mercator choices, and I wasn't sure which one to use, so I guessed "Popular Visualization CRS / Mercator". `+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs`   3. For the world map, Quantum GIS loaded the projection from the .prj file. That's `+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +over +no_defs` The answer I mentioned above talks about zone problems. That sounds like what I might be experienceing. So I tried changing the libraries from UTM zone 10N to other zones (15N and 60N) but nothing changed. I'm out of ideas. Does anyone have suggestions for what to try next? Thanks for your help


title: Is it possible to get the style of a tab file I open in QGIS?

text: I'm trying to duplicate a map made in mapinfo pro with QGIS in order to create shp files for geoserver. When opening the tabs in QGIS they get some random style instead the one defined in mapinfo pro. Is it possible to auto create the same styles or do I need to manually redefine them


title: How to break a single polyline into multiple polylines in ArcMap 10

text: I want to delete certain segments in a selected segment of a line in a line shape file in ArcMap10.


title: How to handle select query to return numeric value?

text: I have the following select Query :               Dim count As Integer     Select count(*) as mycount from some_table into temp_table     Fetch First From temp_table     count = some_table.mycount      But it sends error: > Expression does not evaluate to string Now when I saved **temp_table** to ***.tab** file it has **char** column.How to make **some_table.mycount** a number? But when the Query is               Select count(*) from some_table into temp_table      It would work but column name is random.


title: Merging partially overlapping polygons into a table in PostGIS

text: I have a couple of tables (three) with polygons (landuse coverage in this case). Within each table, there is no overlap, but between tables there might be a lot of overlap. I would like to combine the polygons from the tables into a single table with polygons with no overlap. To resolve situations where the source tables overlap, I would like to put a priority on each layer, so that polygons from the layer with highest priority is used for the overlap. One way to visualize what I want to do is drawing the tables on top of each other, discarding already drawn polygons where there is overlap. You could also say I want to merge the three tables into one. (Please inform me if there is some more appropriate terminology to describe what I want to do.) A big issue in this case is performance: each of the tables contain millions of polygons.


title: ArcGis 10.0 SP5 - Drag & drop support vs tool parameter types

text: I got a custom Python-tool, and one of the parameters is a (multivalue) "File" type parameter, filtered on a given set of extensions. Also, I got users requesting drag and drop; dragging files from Catalog folders into the tool. 1) When trying to drag/drop files from Catalog folders, I get "Invalid drop item" - "One or more dropped items were invalid and will not be added to the control" 2) When adding the same file using the controls file browser, it works fine. If I change the type to "Raster Dataset", I get full drag & drop. Unfortunately I can't use this parameter type. Is there any way to get around this ? (can't find any documentation on this)


title: MapInfo TEXT in SQLite

text: I´m trying to add a TAB-file containing text-objects to a SQLIte database. I´ve already added points, lines and polygons, but when I try to add texts I get an error - something about an erroneous action on the server (it´s in Danish, so I´m not quite sure how to translate it). I´ve heard that I might be missing some additional columns or tables, but I cannot find any informations about it. Any suggestions/comments are greatly appreciated. Regards Kaare


title: Cannot install TimeManager 0.7: no module named six

text: I was able to extract and copy `dateutil` to `C:\OSGeo4W\apps\qgis\python\dateutil` and the error saying that `dateutil` wasn't found disappeared. But now I am getting the error `no module named six`. Tried extracting the content of the PyPi package to `C:\OSGeo4W\apps\qgis\python\six`, but the error remains. I suspect it's because there is no such thing such as `__init__.py` in the folder. So how do I "install" `six`, given my somehow special QGIS-Python configuration (without the usual `C:\python27\`)?


title: creating GIS data directly on camera images

text: If I'm taking few photos with superimposition and enabling a stereo system for images pairs, Is there a software for 3D or 2D calibrating that will enable then creating GIS vector data directly on regular camera images after anchoring the data ?


title: i.atcorr empty raster

text: I am recent GRASS GIS user who is trying to run the i.atcorr module to atmospherically correct a Landsat ETM+ image in GRASS 7 (on MacBook Pro, Mavericks OSX). This image has been already converted to reflectance with i.landsat. toar. I also use a DEM file obtained from ASTER GDEM. All these files are projected to UTM zone 36 S. I have followed the steps described in the manual and everything seems to be fine except that the process returns an empty raster (all raster values equal to NoData). This is the command: i.atcorr –r –a input= LakeChirwaN-REFL1@Malawi parameters=/Users/Xavi/Desktop/LCDM.txt output=LakeChirwaN_REFL1_ATCORR And the LCDM file looks like this: 8 -- Landsat ETM+ 5 26 7.487 35.753 -14.414 -- month day hh.ddd longitude latitude 1 -- Atmospheric model: tropical 0 -- Visibility -0.009 -- Aerosol Optical Depth 550 nm -0.650 -- Mean target elevation (in Km) *-1 -1000 -- Sensor height (on board a satellite) 61 -- Sensor band (ETM+ band 1) Could someone give help me on this please? Thanks in advance!!


title: All US 2010 Census Data - Tract Level

text: I'm trying to find where I can download all the data (summarized to the tract level).   By all data, I mean   * population   * race   * Marital status   * job   * wage   * age   * sex   * same sex couples   * kids   * education **I need this for every tract, in every county, in every state.** Every search I do shows someone asking for something like just population counts by block in 1 area. people are usually pointed to the American Fact Finder, but this is going to be too cumbersome for what I want. I think I need the summary files, but haven't been able to find anything that shows, in clear detail, which ones I need. If someone can point me in the right direction, I would appreciate it.


title: How to compute a point trend line?

text: I have a track of GPS position dots that are roughly going in a straight line, I would like to simplify the line to only have the central point from a group as in the bottom image creating a trend line from many points. Is there anyway to keep attribution when going points to lines? If not is there any way to remove points from a line of points? In ArcGIS I can do this: ![enter image description here](http://i.stack.imgur.com/0v2rY.gif)


title: How to retrieve historical imagery from web mapping services?

text: Is there a way to retrieve historical imagery from Google/Bing/Yandex mapping services through their APIs? For example, I'd like to show on my website imagery from 2005.


title: How to highlight feature clicked as row in table using OpenLayers+jquery?

text:
I am a Masters student from Sweden. I am doing my Masters thesis on Internet mapping. In my project I am trying to display research data from my department on Google maps. I am using OpenLayers java library in my project. I would like to connect a table to the map in a way that the user can click on the table and display the corresponding layer on the map. I have tried with jquery to assign an ID value which works in a way so that when the user clicks on the map it will highlights a row on the table. However, I am not able to do it the other way as I mentioned above. Can any one help me with my problem? The jqery script I have used is:                     // I have created table like below

Layer	Layer Description

5000_fKr	Layer details

4000_fKr	3500_fKr

     // I have created map object like below

      I appreciate your helpful suggestions. Thanks in advance Karteek


title: GDAL/Python: How do I get coordinate system name from SpatialReference?

text: In Python, using GDAL, I've extracted a raster's projection as a WKT string as follows:               wkt = dataset.GetProjection()     # wkt is 'PROJCS["GDA_1994_Transverse_Mercator",GEOGCS["GDA_1994",DATUM["GDA_1994",SPHEROID["GRS_1980",6378137,298.2572221010002],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["Meter",1]]'      Using the WKT string, I can create a SpatialReference instance as follows:               src = osr.SpatialReference()     src.ImportFromWkt(wkt)      This is easy-peasy. I can extract several parameters of the projection from `src` such as the UTM zone, etc., easily enough. But I can't figure out how to extract something like the name of the projection, i.e. `"GDA_1994_Transverse_Mercator"`. This has surely got to be possible, but the Python API documentation may as well be nonexistent for all the use it is. How do I extract the names of the projection and the geographic coordinate system?


title: How to connect Postgis database with/in Remote Servers...?

text: I am preparing a 'Web based map' application using 'Geoserver-Openlayers- Postgis'... Now, I am trying to connect my Postgis database(located at 10.50.110.11 location) with the following command from 10.40.48.22 location.... * * * $host = 'localhost/10.50.110.11'; $port = '5432'; $database = 'template_postgis_20'; $user = 'postgres'; $password = 'user'; $connectString = 'host=' . $host . ' port=' . $port . ' dbname=' . $database . ' user=' . $user . ' password=' . $password; $link = pg_connect($connectString); if (!$link) { die('Error: Could not connect: ' . pg_last_error()); echo "Could NOT connect POSTGRES..."; } * * * This is yielding a blank response.... Thnaks n regards


title: Controlling "Fill Properties" in ArcGIS, so that that symbols are visible in the legend

text: I use marker fill symbols in my legend in ArcView 10, in order to identify different habitats, and frequently have to increase the separation of the symbols in order to make the map more readable. However, increasing the separation causes the legend to sometimes not include the marker symbol (ie it falls off the edge of the legend patch - see attached where "SI" is only partially visible). I was wondering if people had come across this problem and new of a solution, I have used the following but find them to be a temporary rather than permanent solution. (A) Increase the Patch Size - not always possible when there are lots of labels and not much map space. (B) Use "Symbol Property Editor" -> "Fill Properties" and change the "Offset" x and y values so that the marker symbol appears in the legend. (C) Use "Convert to Graphics", this does not work because when you move the label the marker disappears and also you lose the interactive functionality of the legend. (D) Use another type of symbology, but this is problematic because I am following a industry standard palette and no colour scheme would work with the large number of categories that I have. Any help would be greatly appreciated. Thanks ![enter image description here](http://i.stack.imgur.com/EIw4h.jpg)


title: Can GRASS v.net.iso split between nodes?

text: Can GRASS's v.net.iso module split networks between nodes on the network, i.e., if I am finding the area within a cost of 400, and there is a line segment with a cost of 800 leaving the center node, will v.net.iso split that line halfway down it? (For the purposes of this question, the center node cost is 0).


title: Combined area of all features within features of another layer

text: I have a grid shapefile (basically, a half-degree grid of the world, where each cell has a unique id number), and a set of files with features. I want to record for each grid cell, all the areas and/or values of one field of the second set of files that fall within the gridcell. The "fall within" is whether the centroid is within the cell. My code looks like this (Python+OGR, I can't get shapely installed on the work system)                   # grid_layer is my grid layer, it has been opened elsewhere         # outut_result is a dict indexed by grid ID#         feat_shape = ogr.Open ( shapefile )         feat_l = feat_shape.GetLayer ( 0 )         extent = feat_l.GetExtent()         # Apply the extent filter to the grid layer         grid_layer.SetSpatialFilterRect ( *extent )         # Now loop over each grid cell within the feat region         for grid in grid_layer:             grid_geom = grid.GetGeometryRef()             grid_no = grid.GetFieldAsInteger ('ID')             # Loop over features within this grid id             # Start by applying a spatial filter             feat_l.SetSpatialFilterRect ( *grid_geom.GetEnvelope())             for feat in feat_l:                 # Get the feat's geometry and calculate its centroid                 feat_geom = feat.GetGeometryRef()                 centroid = feat_geom.Centroid()                     # Is the centroid within the grid_geom?                     if centroid.Within ( grid_geom ):                         value = feat.GetFieldAsInteger ( 'field_of_interest' )                         # Or feature's area, or whatever                         # Store it in our output dict                         output_result.setdefault(grid_no, []).append( value )                           del centroid                 del feat_geom                  del grid_geom      At the end of this process, I am left with output_result and my information: output_result[29345] results in a list with all the values of `field_of_interest`, which I then can process further with e.g. numpy or scipy. My question is that this processing takes forever, as there are a lot of shapefiles. Then writing it out is rather messy (doing it with a pickle at the moment, but that needs even more code afterwards). Am I missing some really obvious "point-and-clicky" way of solving this problem?


title: Clip data and add layer to second dataframe using python Add-In

text: I want to clip a layer from data frame 1 and add it to the data frame 2 using the following script. But instead it just add all grids to current data frame 1 and don't update data frame 2. Please suggest how to stop it from updating data frame 1 TOC and add new layer to data frame 2.               import arcpy      import pythonaddins          class DrawRectangle(object):     """Implementation for rectangle_addin.tool (Tool)"""         def __init__(self):             self.enabled = True             self.cursor = 1             self.shape = 'Rectangle'              def onRectangle(self, rectangle_geometry):             mxd = arcpy.mapping.MapDocument(r'C:/test.mxd')             df1 = arcpy.mapping.ListDataFrames(mxd, "View1")[0]             df2 = arcpy.mapping.ListDataFrames(mxd, "View2")[0]             extent = rectangle_geometry             arcpy.Clip_management(r"data/iras",                                   "%f %f %f %f" % (extent.XMin, extent.YMin, extent.XMax, extent.YMax), "oras", "#", "#", "NONE")             grid1 = arcpy.MakeRasterLayer_management("oras", "grid2", "#", "", "")             arcpy.SaveToLayerFile_management(grid1, 'grid2.lyr')             grid3 = arcpy.mapping.Layer('grid2.lyr')             arcpy.mapping.AddLayer(df2,grid3,"TOP")


title: ArcGIS API for Silverlight - create MapTips programmatically for programmatically-created KML layer

text: The few examples and forum posts that I have found all use KML layers defined in XAML at design-time with nested `MapTip` templates binding to one or more `Placemark` attributes e.g. `name` or `ExtendedData` values (using the `ExtendedDataConverter` class provided in the example here). I am looking for a way to programmatically configure map tips on a programmatically-created KML layer at runtime. I can display empty map tips if I assign a `MapTip` instance to every `Graphic` in the `KmlLayer`, but cannot figure out how to dynamically bind the `MapTip` to the `Attribute` data in the `Graphic`. I have inspected the graphic elements and confirmed that they do indeed contain the correct attribute data from the KML document. Does anyone have an idea as to how this can be accomplished?


title: How do I cast shadows from 3D Objects in ArcScene?

text: I would like to cast shadows from my 3D objects in ArcScene onto the surface and other objects. (Much like I can in SketchUp). Is it possible? If so how?


title: ArcObjects Class Extension - core events not being fired by an editing tool

text: I think I've just hit a major limitation with how ArcMap (10) deals with class extensions on a Feature Class but I would first like to make sure I'm not missing something or seeing a bug. I have a class extension registered with a feature class and the extension creates a unique identifier for every new feature that is created - it listens to the IObjectClassEvents.OnCreate event. This event is fired and handled every time a feature is created within an edit session using the 'Create Features' template. Similiarly, if I select one of more features, then Ctrl+c Ctrl+v the OnCreate event is fired for each feature and a new ID is assigned, rather than a copy of the old one - Great! However, if I use the Advanced Editing - Copy Features tool no events are fired at all, even though new features are created. Perhaps this Copy Features tool uses a python script or something and therefore isn't managed in the same way? I don't know, but I thought it was the geodatabase which threw the OnCreate event so it shouldn't matter how the feature is created. Can anyone tell me why none of the IObjectClassEvents events are fired in this case? I am considering looking into nasty workarounds (like a command add-in which listens for edit events when enabled) but 1) I'd really rather not and 2) I might end up with exactly the same problem. Finally, I know there are other options than a class extension for what I'm doing but in order to fulfil all of the tool's requirements I can't use an editor extension. Any help very much appreciated.


title: geodatabase/workspace content viewer control

text: I'm in the process of developing a windows form (desktop) app that will have the ability to display content from user-provided personal geodatabases (.mbd files). I want to create a custom control that will display in some part (a tree view?) all available databases, and in another part (list view?) will display the contents of the selected database. And by content I mean, to display a selectable icon for each dataset in the db. My question is, is there something similar already implemented? PS Im using ArcObjects 10, C# 4


title: Why ST_Intersects() returns one row more than expected?

text: I am trying to understand the behaviour of ST_Intersects() in PostGIS. My goal is to get the mean value of a raster area corresponding to each polygon in a vector layer. To test my SQL I run initially the script with a vector layer containing only one geometry:               CREATE TABLE mean AS      SELECT id, (ST_SummaryStats(ST_Clip(rast,1,geom))).mean     FROM vector, raster     WHERE ST_Intersects(geom,rast)      What returns is a two rows table:               1;-146.258943781942     1;-115.587301587302      How it is possible that the same geometry intersects the same raster twice with two different values? I don't know if it is a coincidence, but the mean value I got doing the same operation with the same two layers with the QGIS Zonal Statistics is -138.788659793814 (the mean between -146.258943781942 and -115.587301587302 is -130... pretty close)


title: ArcGIS Javascript API - switch case to display attributes in a popup

text:
var vliTemplate = new InfoTemplate("Visual", "
VLI Number: ${VLI_VLI_NO}
	"+          "

Not Greened Up CFLB:${Tbl_ResultSummary_VQO_Not_Greened_Up_Ha:NumberFormat(places:0)} Ha
	"+     "

Greened Up CFLB:${greened:compare} Ha
	"+     "

Maximum Target Percent:${Tbl_ResultSummary_VQO_Pct_tgt:NumberFormat(places:0)}%
	"+     "

Maximum Target:${Tbl_ResultSummary_VQO_Target_Ha:NumberFormat(places:0)} Ha
	")          compare = function (key) {       var result = diff;            switch (key) {         case "greened":           diff = data.Tbl_ResultSummary_VQO_HA - data.Tbl_ResultsSummary_VQO_Not_Greened_Up_Ha;           break;       }            return result;     };      I've been playing around with the code in my switch case function trying to get wording or placements of words to work for me, but I can't seem to get my popup to display anymore. In the popup, I want the line "Greened up CFLB" to show the calculation of Tbl_ResultSummary_VQO_HA - Tbl_ResultsSummary_VQO_Not_Greened_Up_Ha but now the popup won't even display (because I know I'm not writing my fucntion/switch statement correctly) Can someone please provide feedback on where I'm going wrong in my code? I know its a simple case of not having the right things in the right place...but I'm at a loss. Thanks!


title: How to highlight multiple cities/towns in Google Maps?

text: I'm trying to create a service area map in Google Maps. When one searches for a city or town, Google outlines the town in a light red. If possible, I'd like to have multiple towns selected in this method. I'm aware its possible to draw it out using the line tool, but there are about 60 towns and it would take forever. Any ideas?


title: How to create a colormap where colors diverge at value 0 in QGIS?

text: I calculated a raster as difference of two other rasters. Now I want to create a colormap where one colour represents negative values and one colour positive ones. The two colours should become lighter as they approach zero and around zero the colour should be white. Here the colour scale I would like to use: ![enter image description here](http://i.stack.imgur.com/Fym78.png) My problem in using the plugin "1 Band Raster Colour Table" is that it creates palettes where the colours diverge around some value above zero. In my case my values go from -6880 to 5539 with a mean of 104.


title: Cross platform gis api wrapper architecture

text: I have a python class library for arcpy which is just a couple of class definitions with my common code attached as methods and properties so that I can do code centralization for stuff that I have figured out. As well as do stuff that require the advanced license levels (feature vertices to points). I am re-writing it. Does anyone have suggestions or links to suggestions which could help me organize it in a way that will help me add gdal/ogr in the future? I have been searching api type blogs and what not. I know there are libraries out there that aim to be able to read various different types of data but what I'm doing would be more for user tools in arcmap and eventually qgis. Please feel free to edit this or point out deficiencies in my question. Thanks! Here is the project on github https://github.com/perezjust/ageopy


title: Error updating Shape.area and Shape.length

text: am building a webservice with ArcObjects in C# .Net to insert a new feature or update an existing feature to a SDE-table. I am using the IFeatureCursor and an IFeatureBuffer to insert the features. When the geometry field ("Shape") is set, an COMException is thrown saying: "Unable to update area or length field in response to shape update" Obviously this refers to the default feature class fields Shape.area and Shape.length that are calculated automatically. I have also tried to insert features using the CreateFeature() and feature.Store() method, but this resulted in the same exception. Just to be clear, this happens before I call the cursor.InsertFeature(featureBuffer) or cursor.UpdateFeature(feature) method. My code looks like this:               private void Create(Result result)         {             var featureClassLoad = (IFeatureClassLoad) _master;             var schemaLock = (ISchemaLock) _master;             IFeatureCursor cursor = null;             IFeatureBuffer featureBuffer = null;                  try             {                 schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);                 featureClassLoad.LoadOnlyMode = true;                 cursor = _master.Insert(false);                 featureBuffer = _master.CreateFeatureBuffer();                      foreach (var attr in result.Attributes)                 {                     var attributeName = attr.Field.Name;                     var index = _master.FindField(attributeName);                     if (attributeName == _master.ShapeFieldName)                     {                         featureBuffer.Value[index] = attr.NewGeometry;//Exception thrown                         continue;                     }                          if (attributeName == "ID")                     {                         featureBuffer.Value[index] = "{" + result.Guid.ToString().ToUpper() + "}";                         continue;                     }                     featureBuffer.Value[index] = attr.NewValue;                 }                 cursor.InsertFeature(featureBuffer);                 cursor.Flush();             }             finally             {                 if (featureBuffer != null) Marshal.ReleaseComObject(featureBuffer);                 if (cursor != null) Marshal.ReleaseComObject(cursor);                 featureClassLoad.LoadOnlyMode = false;                 schemaLock.ChangeSchemaLock(esriSchemaLock.esriSharedSchemaLock);             }         }      Any suggestions are more than welcome!


title: Updating Lat/Longs and actual position of point shapefile

text: Greetings everyone, quick question regarding lat/longs and updating a point features actual location. I have a point shapefile with over 3000 points that are updated frequently, when they are updated they need to have their lat/longs changed which is entered into the attribute table. When the lat/longs are updated in the attribute table I notice that the feature does not actually change its position in correlation to the new lat/long entered in the attribute table. Is there a way to make this happen in ArcView with out having to re-export the attribute table out as a dbf, add it to the map then display xy data? Thank you for your help!


title: ArcGIS Grouping Analysis Error

text: I am trying to run the Grouping Analysis tool from Esri's ArcGIS Spatial Statistics/Mapping Clusters toolbox. I have run the tool successfully on the same input layer using a different spatial weights matrix, but when I try to run the tool with an IDW spatial weights matrix the tool fails. I have not seen this type of error before. See image... ![enter image description here](http://i.stack.imgur.com/ASqfa.jpg)


title: Picture Symbol Proportion in ESRI Javascript API

text: I am successfully using a picture marker symbol to represent tree's in a web- map built using the ESRI Javascript API. Is there a method to proportionally size the picture symbol for each scale of the map? The only way i can figure out how to do it, would be to add a different symbol for each zoom level - but that seems like an unnecessary amount of code that might hinder page performance. To complicate this - the rendered feature layer is passed to the Editor Widget using the map.addlayers array function. I am creating this render by first adding the picture markers:               var Tree1 = new PictureMarkerSymbol('Tree1.png', 11, 11);             var Tree2 = new PictureMarkerSymbol('Tree2.png', 11, 11);             var Tree3 = new PictureMarkerSymbol('Tree3.png', 11, 11);             var Bush1 = new PictureMarkerSymbol('Bush1.png', 11, 11);             var Bush2 = new PictureMarkerSymbol('Bush2.png', 11, 11);      I then create the renderer, which works on the feature layer LandscapePoint off the attribute Type:               var renderer = new UniqueValueRenderer(LandscapePoint, "TYPE");      Then add a symbol for each value:               renderer.addValue("Tree1", Tree1);             renderer.addValue("Tree2", Tree2);             renderer.addValue("Tree3", Tree3);             renderer.addValue("Tree4", Tree1);             renderer.addValue("Shrub1", Bush1);             renderer.addValue("Shrub2", Bush2);             renderer.addValue("Shrub3", Bush1);             renderer.addValue("Shrub4", Bush1);             renderer.addValue("Bench", redDot);      Then set the renderer to Landscape point               LandscapePoint.setRenderer(renderer);      Finally the features are added to the map and passed to the editor Widget with:               map.addLayers([Commercial, Residentail, LandscapeArea, RoadCenterline, LandscapePoint]);


title: How to convert a PNG tile set into the Mbtiles format

text: I have exported a folder with PNGs tiles and I want to convert them into `Mbtiles` format to use with Mapbox (maybe via TileMill?). How can I do that? Is there a convertor where I can specify the parent folder and all subdirectories with their respective PNGs to be converted into Mbtiles format? Thanks!


title: How to extract NDVI values into polygon vector map with QGIS

text: I have calculated the NDVI values of a satellite image using the raster calculator. Now I need to have these NDVI values extracted into the attribute table of my polygon vector file. Is there a plug-in that would help? Thanks!


title: Adding a new field and calculating area using Python

text: Using Python, how do you add a new field to your shape file and calculate the area in km2?


title: Toolbox tool - IGPParameterEdit3 to browse for file

text: I'm trying to implement a custom Toolbox tool in ArcGIS, and am trying to setup a custom GPParameter that will take a file type with a specific extension. I know that DEFileType is available and will provide a file browser. How do you set a filter for specific file types using this object? I suspect this needs to be done via IGxFilterInfo, but am unable to find any relevant documentation or examples, and am having a difficult time finding an example anywhere.


title: About the storage of GIS attributes

text: I'm quite new to the GIS world and I currently have some technical questions for which I have no answers yet. I'd like to know the good way to store the attributes for a feature using the PostgreSQL database and its PostGIS extension. For example, a point can be a house located in a street with a name and a number. I know that applications like MapServer or GeoServer are exactly about doing this, but I'm looking for a simpler solution. Ideally I'd like to have everything in my database where for each feature I can list the associated attributes. But I would also like to know from a specific attribute, the list of features matching. Is there any standard/best practice out there to store GIS attributes within a SQL database? Plus, what about the attributes name themselves? Is there any list of standard attributes that can be associated to a feature. I don't want to re-invent the wheel so where to find the common used terms to define a feature (street, country, zip code, ...)?


title: Algorithm for offsetting a latitude/longitude by some amount of meters

text: I'm looking for an algorithm which when given a latitude and longitude pair and a vector translation in meters in Cartesian coordinates (x,y) would give me a new coordinate. Sort of like a reverse Haversine. I could also work with a distance and a heading transformation, but this would probably be slower and not as accurate. Ideally, the algorithm should be fast as I'm working on an embedded system. Accuracy is not critical, within 10 meters would be good.


title: Has anyone gotten CartoDB to work on a Raspberry Pi?

text: I was able to install everything (minus the PPAs and the two node apps) on my Pi that are in the README. I'm wondering if anyone else has done this or if they can help me with the remaining things. I doubt I'm missing anything with the PPAs, but the two node apps (which basically said things were not okay, couldn't find another app or something, don't recall) worry me. As I noted in the comments, I'm installing from Github and using the README from there. I'm running on a Model B (512mb RAM). I want to have a development environment to play around with and figured my Pi would work alright (sure it might be a little slow, but that's okay). I'm also running raspbian built mid December 2013.


title: Will Toshiba Satellite 70-A-11h meet GIS student notebook requirements?

text: I'm just about to start a college to study GIS and I need new notebook computer. I would like a one that will last me for awhile and that can run the ArcGIS and ERDAS Imagine programmes that are provided for students without any problems. One that I'm looking for at the moment is Toshiba Satellite 70-A-11h. OS: Windows 8.1 64-bit (pre-installed) Processor: 4th generation Intel® Core™ i5-4200M processor with Intel® Turbo Boost Technology 2.0 clock speed : 2.50 / 3.10 Turbo GHz internal resolution : 1,600 x 900 Hard disk capacity: 1 TB RAM: 8,192 (4,096 + 4,096) MB DDR3L RAM (1,600 MHz) Could anybody tell me whether this is a good starter laptop for a GIS student or are some of the specifications a definite no no?


title: Sample size for variogram modelling using the geoR package in R

text: I am trying to use the `geoR` package in `R` to model the variogram for a dataset of 15 000 sample points of bathymetry data. I intend to do a random split to create test (20%) and training samples (80% of the samples), so the accuracy of my final predictions can be assessed. However, when using all the sample points (15000) I get the following error: `variog: computing omnidirectional variogram Error: cannot allocate vector of size 427.9 Mb` The error is associated with the large number of samples, because when I reduce the sample size to about 5000, it runs perfectly. I have tried using a machine with 32G of RAM on the 15 000 samples, to no avail. Would it be practical to use a sample of the data solely for the purposes of the semi-variogram modelling? If not, what would be the best approach to dealing with this problem? Any suggestions would be welcomed.


title: How to georereference a TIFF file which has already a spatial reference?

text: I have a TIFF file of Poland and a self drawn vector map of Poland. The vector map has no spatial information. I am intending to reference the TIFF exactly to the shape of the self drawn map. My problem is, that the TIFF is not choosable in the georeferencing tool. I suspect it is because it already has a CRS and so on. Unreferenced data like a JPEG can be choosed and referenced. Is there a way to rereference my raster data? It is very important to contain the exact shape of the self drawn map and I think the geoeferencing tool should do well to fix my raster appropriately. It is furthermore important to contain the classification info, it would not be suficient to convert it to a jpg. ![georeference](http://i.stack.imgur.com/0Wooa.jpg)


title: OpenLayers API Documentation vs. Developer Documentation

text: The OpenLayers web site provides two sets of reference documentation:   * API Docs: http://dev.openlayers.org/apidocs/   * Developer Documentation: http://dev.openlayers.org/docs/ For most classes, the API Docs contain a small subset of what is in the Developer Documentation. I find that I usually can't get much done using just the features described in the API Docs, so I use the Developer Documentation (and I read the source and examples). What is the official distinction between these two documentation sets? Do the API Docs describe interfaces that are expected to be stable? Am I risking future breakage if I use features described only in the Developer Documentation?


title: ArcGIS Geoprocessing - how to set a condition for data

text: I would like to write a script in Python which takes data and does some things with it. So far, I have written the following code :               import arcpy     arcpy.env.workspace = "C:\wody.gdb"     arcpy.env.overwriteOutput = True     fcList = arcpy.ListFeatureClasses()     bufferList = []     for fc in fcList:        if fc == "RZEKI":            arcpy.Buffer_analysis(fc, fc + "Buffer", "200 meters")            bufferList.append(fc + "Buffer")      Now, I would like to take RIVERS (RZEKI) only if river is longer than SOMETHING (they do not give data in meters but in units, so I just want to see an example seems like river_long > WHATEVER) Thank you in advance :)


title: Suite SDK gxp Print plugin

text: I have problem with gxp print plugin. I create new sdk project `suite-sdk create ~/sdk`. Next I do everything from Problems with gxp Print plugin via opengeosuite sdk but there is another problem. But I don't know where. After I click on the print button in print preview modal nothing happens. Here is a screen shot from firebug JPG Anyone know how to fix that?


title: Editing problem

text: I am working in ArcGis 10.0 , when i am selected Sketch tools for digitization like road feature after digitize single for second digitize for feature required a select again create feature road for digitised same feature ,


title: How to create Relationship Classes successfully

text: I'm new to ArcGis and I'm making the first steps at this time. At the moment I've two different shape files. The first shape file represents streets on a map with some detailed information in the attribute table. The 2nd shape file represents crossroads of the same map including some detailed information in the attribute table too. Both attribute tables has IDs and logically it’s a tree where to node is a crossroad and the edge is a street. Now the next step is to create a Relationship Class to "link" both shape files for future algorithms. But when I want to create a Relationship Class I receive different errors. I’ve read this document before and tried to create such a class using an Add-in but I received a NotImplementedException. To be sure that creating such a class is possible I tried to create a relationship class which ArcMap using ArcToolbox -> Data Management Tools -> Realtionship Classes -> Create Relationshop Class manually. I can choose both shape files but when I have to choose the Output Relationship Class I receive the error “000177 : Relationship classes can only be created in the same database that contains the feature classes or tables.“ Can someone give me some notes what I’ve done wrong and tips to solve this problem? Edit: I've created a Relationship Class with ArcCatalog, a new personal db and the imported shape files. But I can’t open this table and control if the table was successfully created and has content. Does anyone have had a similar problem? Edit2: What I've done: 1) Create a new Personal Geodatabase using ArcCatalog10 2) Import 2 Feature Classes (existing shape files filled with data) 3) Start creating a Relationship Class using ArcToolBox -> Create Relationship Class 4) For testing I created a one-to-one relation with this two imported shape files 5) The table was created successfully but: 5.1) If I want to import this in ArcMap I receive the message "Warning: A selected Item could not added to the map" and nothing happened 5.2) The preview function in ArcCatalog doesnt work for this Relationship Class In Summary I cant see if the Relationship Class is logically right and I cant see which data are selected and can be used for future algorithms.


title: How to calculate cumulative mean in Arcgis

text: I'd like to get cumulative mean value from a multiband image (4 bands). How can I do it in Arcgis, ERDAS and ENVI? Thanks in advance


title: Location of Coordinate Systems folder in ArcGIS 10.1

text: To make it easier to find and select the 3 or 4 coordinate systems we use most often in ArcGIS 9.x and 10.0 we would copy them to the top of the `Coordinate Systems` folder, generally located in `C:\Program Files\ArcGIS` and thereby skip daily repeat navigation through all the categories to find the ones we want: ![Most used projections at top of list](http://i.stack.imgur.com/esLhC.png) (The _Favorite Coordinate Systems_ feature developed to accomplish the same aim isn't available in all locations (tools), and has to be set individually for every user profile. So, doesn't save as much work.) ArcGIS 10.1 doesn't have this folder, or at least not in the same location. Where has it moved to, or is there another way to accomplish the same aim?


title: How to modify the results of a geological dataset from vertical to horizontal?

text: I have a 3-D point shapefile of a geological fault dataset consisting of x,y, and z columns. I need to create a raster dataset from this point dataset. I have been trying to do this in ArcGIS; however, ArcGIS does not do this correctly as the dataset result is a vertical surface as opposed to a horizontal one. I.e. x, y does not change but z does. **For example:**               x,            y,           z     358749        5997833      270     358749        5997833      280      Is there a way I could flip the data (to make x,y horizontal and re-flip back to vertical afterwards) so that it can be interpolated? Thanks in advance