FAIL - Tried to use command /upload via a GET request but POST is required Deploy Geoserver.war

I'm trying to deploy geoserver.war on tomcat7 but a message error is shown: > FAIL - Tried to use command /upload via a GET request but POST is required What should I do?


PostGIS ST_Contains question

Here's a quick summary about what I'm trying to do: Let's say I got two layers. One (A) with 10 polygons and one that is more granular with 100 polygons (B). Just to check if the behavior of PostGIS and ArcMap is the same, I would like to select all polygons in B that are under a polygon in A. Since the sum of all polygons of both layer got the same shape, all polygons of B should be selected. If I do that in ArcMap, everything works fine (100 of 100 polygons selected). If I use the following statement in PostGIS, some of the polygons are not in the resultset (about 10%):               SELECT layer_a.gid, layer_b.gid FROM layer_a, layer_b WHERE ST_Contains(layer_a.geom, layer_b.geom);      No I want to be more specific. Let's say I'd like to select all Polygons from B that are under a specific polygon from A with a polygon_id = 1. For this I use the following statement:               SELECT layer_a.gid, layer_b.gid FROM layer_a, layer_b WHERE ST_Contains(layer_a.geom, (SELECT layer_b.geom WHERE layer_by.polygon_id = '1');      But now, I get a empty resultset and I really don't know why. Could somebody explain me this behavior? Note: I just imported shape files without assigning a special SRID or something like this. I appreciate any help. :)


TitlePane not rendering - working with basemapGallery sample code

I am attempting to implement the basemapGallery code found in the API samples here. There seems to be an issue with the TitlePane into which my basemapGallery is nested. It simply does not render. The basemapGallery appears in place and works as expected, but since the TitlePane does not exist in the app, it is not appearing as a child within the TitlePane, and instead just sits there, with no way to collapse. Like the sample code, the basemapGallery is being created programmatically and the TitlePane is being created declaratively. Here is the JS code:               function init() {          var popup = new esri.dijit.Popup({     selectionSymbol: new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, new dojo.Color([255,0,0]))}, dojo.create("div"));          map = new esri.Map("map", {         basemap: "topo",         extent: new esri.geometry.Extent({xmin:-11420303.522028634,ymin:3387689.093598152,xmax:-6939259.175839653,ymax:6114962.262812516,spatialReference:{wkid:102100}}),          infoWindow: popup     });          dojo.connect(map, "onLoad", mapReady);          var basemapGallery = new esri.dijit.BasemapGallery({         showArcGISBasemaps: true,         map: map     }, "basemapGallery");     basemapGallery.startup();          dojo.connect(basemapGallery, "onError", function(msg) {console.log(msg)});          }     dojo.ready(init);      And the HTML:

      Notes: I am using v3.3 of the API. I am referencing the claro.css stylesheet. I have included dojo.require("dijit.TitlePane"); I have included a screencap of what I see. ![basemapGallery rendering without parent TitlePane](http://i.stack.imgur.com/cB3vD.png)


Clusters of points: Determining the centroid (QGIS)

I've basically got the same issue as this post, but can't find a way to transplant the ArcGIS solution to QGIS. I have household-level geo data for 10 villages spread out across the country. I need to find the central point of these household clusters, so that I can create a 10km buffer around that central point. Any tips would be greatly appreciated. Disclaimer: I'm a QGIS noob. ![enter image description here](http://i.stack.imgur.com/maRVw.jpg)


Can you use a large file directory of jpgs for without georeferencing

I have a large map data set of 256x256 jpg images. The file directory is organized by /map_type/zoom/x/y.jpg. I have 12 zoom levels and each zoom level directory has 2^(2*zoom level) images. I have been researching how to display map data using GeoServer and almost everything I have read says that I need to georeference the images. This would not be practical with the methods I've seen because I have such a large data set. Is there a way to display the map data based on the file location? I found a similar tile structure on wiki called Slippy Maps but after skimming through it, it sounds like they convert vector data to tiles. All of this is kind of confusing to me. Some clarification on how map data is created and served up would be very appreciated.


correct projection of GADM data

I'm trying to use a map of Austrias districts from the GADM project. The Shapefile can be found here: AUT_adm.zip (All other formats provided by the project appear exectly equal.) > The coordinate reference system is latitude/longitude and the WGS84 datum. Comparing this map with the official (but not as detailed) NUTS3 shapefiles from "Statistics Austria" and with Google Maps (all done within QGis) shows differences between the borders of the administrative areas. Google Maps (and OpenStreetMap, ...) are nearly equivalent with the files from Statistics Austria. Unfortunately, **the maps from GADM are not congruent with the other sources**. Additionally the **distortion grows from West to East**. West of Austria (GADM=red, StatA=green, Google maps as reference): ![GADM, StatA and Google Maps](http://i.stack.imgur.com/xdB55.png) East of Austria (GADM=red, StatA=green, Google maps as reference): ![enter image description here](http://i.stack.imgur.com/c1qyf.jpg) Of course I tried to import the original data as well as projections to the same CRS (epsg:3857). As expected this did not alter the results. My **questions** :   * Am I using a wrong projection for the GADM data? (Is the documentation on the homepage and the files not corret.)   * How can I get the right projection and get rid of the differences?


How do I query a string in Arcobjects that has a single quote in it?

I'm trying to query values using a cursor and loop for the process of removing diacritics. The problem I am running in to is that when I try to create a `WhereClause` like so...               qf.WhereClause = "\""+fieldname+"\" = "+"'"+address+"'";      I get a COMException about my query if the value of address has a single quote in it (i.e. `Land o'Lakes`). I have tried escaping the ' with `address.Replace("'","\'")` but the resulting string is unchanged. When I attempted to double-escape with `address.Replace("'","\\'")` , the string ends up with _both_ backslashes. What should I do?


how do i calculate polygon area with arcobjects?

i'd like to develope an application with arcengine that can calculate area of a polygon . i wrote the below code to select a polygon in combobox                for (int i = 0; i < pmapcontrol2.LayerCount; i++)                         {                                  Pfeaturelayer = (IFeatureLayer)pmapcontrol2.get_Layer(i);                             if (Pfeaturelayer.FeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon)                             {                                           cmbfeaturelayer.Items.Add(pmapcontrol2.get_Layer(i).Name);                             }                         }      but i couldn't wrote code to calculate pfeaturelayer area . i think i should use Ilayer interface and Ilayer use Ifeature to calculate area not ifeaturelayer . is there any way to use Ifeature for this application ? thank you.


How to perform a Cost Path analysis in ArcGIS 10.1?

Is it possible to model the easiest pathway through a landscape between many points (rather than just two)? I want to carry out a cost-path analysis, I would like to display the easiest pathways through the entire study region (not just one route but all)- by taking into account slope and proximity of sites to rivers or valley floors. I have a DEM raster (obtained from UK ordnance survey - Landform-panorama). River systems were in the form of a polygon shapefile, which I have converted in to a raster layer. The lat/lon coordinates of the 10 sites where added to the DEM raster as a feature class. I was wondering what would be the best way to achieve this? and whether anyone could explain in layman's terms how to do it? Any advice would be massively appreciated!


Unmet dependencies installing QGIS 2.0 on Ubuntu

I have followed the instructions-a link to install QGIS 2.0. Everything worked fine until the punch line, installing QGIS ( I do have Ubuntu 13.10);               sudo apt-get install qgis python-qgis qgis-plugin-grass      eyalak@eyalak-ThinkPad-X220:~$ sudo apt-get install qgis python-qgis  qgis-plugin-grass     Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:               The following packages have unmet dependencies:      python-qgis : Depends: python-qgis-common (= 2.0.1-2+precise1) but it is         not going to be installed                Depends: libqgis2.0.1 but it is not going to be installed                Depends: sip-api-8.1 but it is not installable      qgis : Depends: libgdal1-1.7.0 but it is not installable             Depends: libqgis2.0.1 but it is not going to be installed             Depends: qgis-providers (= 2.0.1-2+precise1) but it is not going             to be installed             Recommends: qgis-plugin-globe but it is not going to be installed       qgis-plugin-grass : Depends: libgdal1-1.7.0 but it is not  installable          Depends: libqgis2.0.1 but it is not going to be installed          Depends: grass641 but it is not installable      E: Unable to correct problems, you have held broken packages.      Not sure what to do on this one


How to create a map from the highest and lowest average values

Anybody can help me, how to generate the map from assumption data. I have 100 points data (from GPS reading) showing the **location of the bee nest**. Unfortunately there is no record on how much volume they harvested from each nest. However, from my respondent, they gave me the two values from the highest and lowest average of the volume production, ex. 5.99 liter (highest) and 1.03 liter (lowest).   I want to make a map to see where is the highest possible production volume per unit area and the other showing the lowest possible production volume per unit area.


LeafletJS animated marker with video

I have used the `leaflet.animatedmarker` from openplans on GitHub to create a marker that moves along a line. I also have added a video that will popup above the line. This plays fine with the marker moving. What I want to be able to do is have a button that is able to start and pause the video and marker at the same time. I would also like the added benefit of being able to move backwards and forwards in the video and marker on the line. I am just wondering if this possible, and how I might go about it?


Abnormal DEM values after fill operation

With arcmap 10.1. after filling the DEM the value range is -70 to 1078, but it should be between 225 to 1200. Can anyone suggest me a methodology or the necessary steps in arcgis 10.1 to mend my dem?.


How to restrict buffer extent within land area only?

I need to create buffer for a point feature, but the buffer area will be restricted within the land area only. For example consider the following: A buffer of say 500 km radius is to be generated around Washington or Rome. However the generated buffer will be covering the land area of US(west-ward) or Europe(towards east or north) only, respectively and not the water areas. How can I achieve this, preferably in PostGIS. The input tables will be land area boundary polygons and a point layer.


Why does copy convert my Tiff raster value range?

Recently I have worked with some raster dataset. And I found there are different kind of raster dataset. Till now I have worked with grid type raster dataset and my add-in works fine with this type. But recently I tried to work with a tiff type raster dataset and the tool didn't work properly. I couldn't find any problem with my code and after converting that tiff data to grid format also worked fine. So, I think data is valid and also my code is okay too. Here is my question now: is there any difference between different type of raster from a programmer perspective? There I found another question like mine. But that answer is not from programmer's perspective and also an old thread. I am using arcgis 10.0. I use arcpy and arcobjects.net both in my add-in. **EDIT:** After investigating a lot, I found some strange things. To describe those, need to describe the process. **Process Description:**   1. I exported a raster in tiff format.   2. Copy that raster to a different folder.   3. I did `Fill (Spatial Analyst)` through arccpy on copy tiff raster.  the `Fill (Spatial Analyst)` tool gives a wrong output for copy tiff raster. And of course from my arcpy code also. And that was the reason behind posting this question. But suddenly I noticed that, the exported tiff raster gives correct output for `Fill (Spatial Analyst)` tool. The value of the copy tiff raster is same as exported tiff raster but the range of highest value and lowest value is changed. And most important thing is, when I clipped from copy tiff raster, then the clipped raster also gave correct answer. ![value range of two rasters](http://i.stack.imgur.com/crj0m.jpg) What can be the problem with this raster? Why does it behave this way? Does this problem can occur any time?


Loading shapefile into CartoDB throws 2001 error?

I've been trying to load shapefiles (that are zipped in windows compressed folder) into CartoDB and I always get an error 2001. These shapefiles were exported out of an ESRI geodatabase (SQL Server). I believe they are in the correct projection - Web Mercator auxilliary sphere. Has anyone had a similar experience or might know what is happening?


How to make pgRouting faster?

I have table network which has about 2 million records (only 3 countries in Europe). When I run Shorthest-path it is very slow, it takes 3 min to take records only. I tried with dijkstra-sp-delta-directed but it is also slow, about 2-2.5 min. This sp is using bounding box and gist index so it should be faster but it is not. In the future I should add some other country so table will be very large. What could I do to make this routing faster? As far as I know Postgre doesn't have option to save temp table in RAM, it works only in one session. I have 4 GB RAM, I work with OSM and Postgre because it is free, I realy don't know is there any solution for this problem? I am not in position to buy some expensive solution, I have demand to work with open sources. Of course everyone expects quick and cheap solution that works like Google :) Update: For the fastest route (avoid toll , avoid highway) my query is:               SELECT * FROM shortest_path(        'SELECT gid AS id,                 source::int4 AS source,                 target::int4 AS target,                 time + cost::float8 AS cost,                 time + reverse_cost::float8 AS reverse_cost          from network where toll is null and road_class!=1 ',          257027, 276521, true, true)       For the shothest route (avoid toll , avoid highway) my query is:               SELECT * FROM shortest_path(        'SELECT gid AS id,                 source::int4 AS source,                target::int4 AS target,                 length + cost::float8 AS cost,                 length + reverse_cost::float8 AS reverse_cost          from network where toll is null and road_class!=1 ',          257027, 276521, true, true)


Tips and advice for Filtering on a large dataset

I am attempting to build an application using the ArcGIS JavaScript API that will allow my users to research competitor pipelines across the country. The main layer in this application is comprised of a large feature class containing over 673K features. One major aspect that I want to give my users is the ability to "filter" features. For example, show only pipelines of companies X, Y, & Z that are transmission, and greater than 24" in diameter. Another major aspect is that it has to be simple to use. I have been experimenting with using ComboBoxes so that the possible options are already populated in the list. By using more than one of these for each field I can create a simple way to create a SQL query of sorts. The problem I have with the ComboBox is that only one option can be chosen at a time. But with nearly 2000 possible options I'm not really sure what else to use. Any one have any ideas? Is there something that I am overlooking? Has anyone spent much time using the EnhancedGrid? I have added the image below that is using an EnhancedGrid. Could it be possible to use the "Check Boxes" as a selection method. ![](http://i.stack.imgur.com/sHN1j.jpg) Thanks for you input. -Mike


What is the sequence of select query execution in Mapinfo?

I have confusion with the following query: **Query 1:**                Select * from TABLE where vendor = "vendor1" OR                                           "vendor2" OR                                          "vendor3" AND site_status = "staus1"      into sel      **Query 2:**               Select * from TABLE where ( vendor = "vendor1" OR "vendor2"                                  OR vendor ="vendor3")                                  AND  site_status = "staus1"      into sel      **Query 3:**                Select * from TABLE where vendor = "vendor1" OR                                 vendor = "vendor2" OR                                vendor ="vendor3" AND site_status = "staus1"       into sel      **Query 4:**               Select * from TABLE where (vendor = "vendor1" OR vendor= "vendor2" ) AND                                 (site_status = "status1" OR site_status = "status2") into sel      How to find sequence of execution of query?


Sextante modeler feature selection

i am trying to select grids (polygon geometry) that intersected with building layer. i can do it by using "select by location" tool. and then i generate centroids from the selected grids. there is no problem in this steps. later i generated a model with sextante modeler but it doesnt work properly. select by location tool dosnt work in sextante modeler. it cannot select features. interesting that i can run perfectly this tool directly from sextante toolbox !!! so i need your idea that how can i extract the grids that interseced with another layer.


Is there a way to programatically force RGB (3 bands) in a raster with arcpy?

I'd like to include conversion to a 3 band RGB raster in a script to prepare multiple DEMs for image processing. The input files are rasters extracted from a raster mosaic. The manual option is to use the Export Data option in the TOC, but I have to repeat this for 15-25 different rasters so I'd like to automate it. _Each input raster is a single band that I'd like to force RGB like the image below (maunal method)._ ![enter image description here](http://i.stack.imgur.com/PyZzl.png)


QGIS & WMS: Different aspect ratio between width/height and bbox

I am experiencing a small screen space offset when using a WMS layer (origin is GeoServer 2.1.4). Looking at the requests from QGIS (1.7.4) to my GeoServer I realised that the aspect ratio between the `WIDTH/HEIGHT` and the `BBOX` is different. Calculating the aspect difference back into screen space gives a difference of ~1 pixel - I wonder if it could be the reason for my offset? Due to devices with non-square pixels it makes sense that the aspect ratio can differ. **But what is the reason for QGIS not enforcing equality between the aspect ratios?**


Problems creating TIN from British Columbia DEM data

Is anyone familiar with creating a TIN using ArcGIS9.3 and British Columbia DEM data (.GEN files)? I can't figure out how to get the breaklines to work during the creation of the TIN. Using Workstation/AML it works perfectly. I can provide more details if anyone's familiar with the problem I'm encountering. See the images below. Thanks. ![enter image description here](http://i.stack.imgur.com/VOg1E.jpg)


'erdas apollo how to enable this service'?

we have installed ERDAS Apollo, and open the welcome page and tell us " you've setup ERDAS APOLLO 2011, v11.0 successfully", but test Sample HTTP requests and got same error: eg: when test '.../vector/ATLANTA_VECTOR?version=1.0.0&service=WFS&request=GetCapabilities' got the following error: javax.servlet.ServletException: Cannot construct provider ATLANTA_VECTOR. The construction of the provider ATLANTA_VECTOR has already failed.Failure was due to The provider ATLANTA_VECTOR is unknown or more probably, the license is either invalid or does not enable this service!! 'how to enable this service'? ![enter image description here][1]


Bing Maps / JavaScript - trying to open InfoBox with the PushPin click event

I am experimenting with the sample code on the Bing SDK site but am unable to get the click event to work with the pushpins I am adding in a JS .each loop that pulls in longitude, latitude coordinates from a sql server. I can get the push pins to display fine, I can get the InfoBoxes to display fine if I set their visible to true in the loop, but if I set the visible property to false in the loop and then try to set visible to true with the pushpin click event nothing happens. Please advise, thank you.


Forcing Lat/Lon Bounding Box to appear on LCC Projection Map in matplotlib-Basemap

I'm trying to do some plots of data on a basemap of Australia using matplotlib-Basemap. I'm finding the interface for creating the basemap to be tricky. Specifically, I have lat/lon definitions for the Australian region (including Tasmania), but the map set up using the Basemap API excludes parts of the desired region. Here's a small sample code, which invokes matplotlib- Basemap's Basemap with the BoM's LCC projection parameters. If you run this, you'll find the northern portion of the Cape York Peninsula and the western portion of WA are missing. I'm hoping to do this automatically for Australia and for two of its states for which the standard map projection is also LCC (Tasmania and Victoria). How can I get a basemap that will have as a guarantee that it contains all of a lat/lon region defined by a lat/lon bounding box?               import matplotlib.pyplot as plt     from mpl_toolkits.basemap import Basemap          """     Equatorial/Polar minor radii for WGS84 ellipsoid     approximation of the geoid     """     rEquat = 6378137.00     rPolar = 6356752.3142     """     Standard latitudes for LCC projection.  Used in this     projection by Australia's BoM.     """     trueLat1 = -10.     trueLat2 = -40.          """     lower-left/upper-right corners for the Australian domain.     """     ozMinLat = -43.575     ozMinLon = 112.925     ozMaxLat = -10.075     ozMaxLon = 153.575          """     Central lat/lon coordinates.     """     centerLat = 0.5 * (ozMinLat + ozMaxLat)     centerLon = 0.5 * (ozMinLon + ozMaxLon)          """     CASE 1:     BoM's projection parameters.  Cuts off W. edge of      WA and N end of Cape York Peninsula.     """     m = Basemap(llcrnrlon=ozMinLon, llcrnrlat=ozMinLat,                  urcrnrlon=ozMaxLon, urcrnrlat= ozMaxLat,                 rsphere=(rEquat,rPolar), resolution='c',                 area_thresh=1000.,projection='lcc',                 lat_1=trueLat1, lat_2=trueLat2,                  lat_0=centerLat, lon_0=centerLon)          m.drawcoastlines()                 plt.show()


Leaflet error: Uncaught TypeError: Cannot read property '_controlCorners'

I'm trying to implement the Leaflet choropleth example on a map I already built. I've followed the instructions and seen many implementations of the i.control and control hover option on Github but I can't figure out what my type error is. Uncaught TypeError: Cannot read property '_controlCorners' I dug into the leaflet.js code but frankly can't figure out what controlcorners is doing. It has a problem with the line "info.addTo(map);" (see below) I've console.logged info and it is defined. Where is this undefined part then? Error in Chrome console:               Uncaught TypeError: Cannot read property '_controlCorners' of undefined      o.Control.o.Class.extend.addTo     (anonymous function)      Code:               var map;          var mapquestOSM = L.tileLayer("http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png", {         maxZoom: 19,         subdomains: ["otile1", "otile2", "otile3", "otile4"],         attribution: 'Tiles courtesy of MapQuest . Map data (c) OpenStreetMap contributors, CC-BY-SA.'     });               // experiment with info.update                      function style(feature) {                     return {                         fillColor: getColor(feature.properties.POBTOT),                         weight: 2,                         opacity: 1,                         color: '#666',                         dashArray: '3',                         fillOpacity: 0.7                         };                     }                          var geojson;                          function highlightFeature(e) {                         var layer = e.target;                              layer.setStyle({                             weight: 3,                             color: '#F00',                             dashArray: '',                             fillOpacity: 0.7                         });                              if (!L.Browser.ie && !L.Browser.opera) {                             layer.bringToFront();                         info.update(layer.feature.properties);                         }                     }                          function resetHighlight(e) {                         geojson.resetStyle(e.target);                         info.update();                     }                          function zoomToFeature(e) {                         map.fitBounds(e.target.getBounds());                     }                          function onEachFeature(feature, layer) {                         layer.on({                             mouseover: highlightFeature,                             mouseout: resetHighlight,                             click: zoomToFeature                         });                     }                          var info = L.control();                          info.onAdd = function (map) {                         this._div = L.DomUtil.create('div', 'info');                         this.update();                         return this._div;                     };                          info.update = function (props) {                         this._div.innerHTML = '
Población en México
' + (props ?                             '' + props.NOM_ENT + '
' + props.POBTOT + ' personas'                             : 'Mueva el cursor sobre el mapa');                     };                     console.log(info);                          info.addTo(map);


Generating random points on a route

I am trying to generate random points on a route from one point to another. What I have till now is, given a source and a destination, I can get a route using Google's API. But how do I get the coordinates of random points on the route?


How do I export a 3GB ArcGIS Raster to KML w/o losing resolution?

I have a 3GB raster layer, and I'd like to export it to KML for use with Google Earth. When I use the "Layer to KML" conversion tool in ArcMap, I end up with a low- resolution overlay: looks like one 2000x2000 pixel image (give or take). I've tried messing with the "layer output scale" parameter, but it isn't having any effect.


What's the unit of measurements produced by "sum line lengths"?

My goal is to find the total length of roads per county for a particular state. You would think there would be a simple government spreadsheet with this information in it.... I cannot figure out how to find the summed lengths of a polyline layer(roads) in each county (polygon) in QGIS. I have tried using _Vector-> Analysis -> Sum line lengths_ but it just reproduces the county shapefile with a length column, of which I have no idea **what unit** it is in. Thanks for any and all help!!


ogr2ogr coverting DXF to shapefile, why am I losing part of the feature?

I'm starting to mess around with some of the GDAL toolsets, specifically the ogr2ogr. I'm working with converting a 2000 ACSII DXF file to shapefiles depending on geometry. Everything seems to work fine, but I'm not getting the complete feature. Here's an example of my command:               ogr2ogr -where "OGR_GEOMETRY='LINESTRING' AND LAYER='E-TRANSFORMER'" -f "ESRI Shapefile" transformers.shp System_Map.dxf      Now this does create a polyline shapefile with a good amount of data, but I'm losing a key part I need, here's an example of what I need: ![enter image description here](http://i.stack.imgur.com/dbgGI.png) The problem is that the conversion is only giving me the line up to the circle. Each pie of the circle is its own feature and the line is its own feature. So in this picture there are 4 separate features, but they are all part of the E-TRANSFORMER layer. Can you think of a reason I am only getting the line leading up to the circle and not the circle too? FME converts it fine, but I'd rather use GDAL if I could. Thanks for any help.


Looking for a tool that will place the cursor to a specific x,y coordinate

I am a new user to Quantum GIS. I am looking for a tool/function that will allow a user to type in coordinates, and place the cursor on that exact position. This is for navigation in the field... Here is a bit of context... I need to provide a laptop with an interactive map to a colleague. He will hike around with a gps and the laptop. When he stops, he will check his position on the gps, and (hopefully) be able to type in the coords in QGIS on the laptop to see were he is on the map. I know how to do this with ArcGIS (its the "go to x,y" tool). Hopefully there is something similar in QGIS. Thanks a million!


MapInfo displays a JP2 raster weirdly - why?

We have some JP2 files created with FME 2013. They work just fine in ArcGIS, MapModeller and QGIS. But when viewing it in MapInfo (11.5) we get what looks rather like a 60's drug trip. ![enter image description here](http://i.stack.imgur.com/DSq8P.jpg) Zooming in all the way doesn't resolve the issue, so its not just with the pyramids. ![enter image description here](http://i.stack.imgur.com/jdJ6y.jpg) Any thoughts? I'm going to try re-generating the bad ones. Note: Not all of them are "bad" - but most are.


I'm trying to import united_states.osm into Spatialite and spatialite_osm_net just quits with no error

When I try to run spatialite_osm_net using united_states.osm as input, the program simply stops after Windows presents a pop-up saying the program ended with an error. No other information is presented. The failure occurs in the first phase of spatialite_os_net processing after about 3 hours of processing. I merged the downloads from cloudmade and unzipped the combined .bz2 file. I created the output DB with spatialite_gui. The program level is 3.0.0. There is more than 250GB of space on the disk and wen te failure occurs the output db is only 7GB. Has anyone ever successfully done this? Regards, Jim


What is the SRID of census.gov shapfiles?

I downloaded the county files from: http://www.census.gov/cgi-bin/geo/shapefiles2011/main I cannot figure out what **SRID** to use with them. When I am trying to generate a class file from `./manage.py ogrinspect ...`, I get an SRID of `-1` in the polygon field. I don't think that this is right. GDAL gave me the **Proj4** of `+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs`. I know an SRID of -1 means unkown. Wouldn't that make my geometries useless? How can I figure out what SRID to use? I am really new to GIS. I already miss the days when the Earth was flat. This may also be useful:               SELECT PostGIS_full_version();                                              postgis_full_version                                               -------------------------------------------------------------------------------------------------------      POSTGIS="1.5.3" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.8" USE_STATS     (1 row)      * * *               >>> import django     >>> django.VERSION     (1, 4, 0, 'final', 0)


How can I create a custom form to display the attributes of the selected object?

I have already appealed to the selected objects, and found a way how to put them in a MsgBox. But I need to output was in the form


Use 'if' statement in ModelBuilder to stop model

I would like to use an `if-else` statement in my model (along the lines of this Esri blog). My model works fine (several intersects, dissolves, calculating fields, joins). However, I would like to add a check after the first process runs, which is an `Intersect`. If the output has 0 rows (using `Get Count`), the model should stop, else continue. Using the following code in the `Calculate Value` code code block               def countRows(rowcount):         import arcpy         if %rowcount% == 0:             return false         else:             return true      and expression               countRows(%rowcount%)      The model runs and generates a warning               The process did no execute because the precondition is false.      It then just carries on running the other processes, all which generate the warning               All the inputs are not current.      To summarise: The input is intersected, and the rows in the output are counted. If the number of rows is 0, return false and stop. If true, carry on processing. The `Calculate Value` tool is set as a precondition before all the other processes can run. I've looked at the `Stop-Continue` tool as well, but I'm not sure how (if?) I should be using it in this instance. **edit** Ran the model on an input that I knew would generate some rows after the intersect, when the `Calculate Value` ran and returned `true`, the model stopped with the error               Error 000539: Error running expression: countRows(3546) <type 'exceptions.NameError'>:     global name 'true' is not defined. Failed to execute (Calculate Value).


Why do i get an input error no module named arcpy when i try and import it into pythonwin?

Here is the error i get when i use the import arcpy command in pythonwin: Traceback (most recent call last): File "", line 1, in ImportError: No module named arcpy Can any one tell me how to fix this? Thanks.


I am trying to use a conditional statement to generate a raster with binary values from a raster with probability values (floating point raster). This is easily done within ArcMap by batching the process, but I need to do it >300 times with a different 'threshold' value each time. Here is my code:               # Import arcpy module         import arcpy          # Import environment and spatial analyst modules         from arcpy import env         from arcpy.sa import *         arcpy.CheckOutExtension("Spatial")          # Set Workspace for Rasters          env.workspace = "C:\May_2014\python_example.gdb"         Rasters = arcpy.ListRasters("*", "All")          # Local Variables         MyTable = "table_for_python"              with arcpy.da.SearchCursor (MyTable, ["threshold"]) as mycursor:             counter = 0             for row in mycursor:                 raster = Rasters[counter]                 outCon = Con(raster >= mycursor, 1,0)                 outCon.save("C:\May_2014\python_example_2.gdb\Con_" + raster)                 counter = counter + 1      I keep getting the following error message after the line:               outCon.save('Con_' + raster)      AttributeError: 'int' object has no attribute 'save'. Any suggestions would be most welcome. Thanks in advance!


Leaflet WMS Google Maps Engine

I am trying to connect to my Google Maps Engine Map using WMS in my leaflet application. I am able to connect just fine with ArcMap. ![enter image description here](http://i.stack.imgur.com/NdiFN.png) ![enter image description here](http://i.stack.imgur.com/QZt64.png) However when using leaflet, I get 'no data for requested layers'. Here is a jsfiddle.               // create a map     map = new L.Map('mymap');          // set the map's starting view     map.setView( new L.LatLng(22,79), 4 );          L.tileLayer.wms("https://mapsengine.google.com/15658084116283052074-10602818151822182906-4/wms/", {       layers: 'x',       format: 'image/png',       version: '1.1.0',       transparent: true,       attribution: "",       tiled:true     }).addTo(map);      Do I have the wrong settings/layer? Edit: GetCapabilities returns...               <Layer queryable="0">         <Name>15658084116283052074-10602818151822182906-4</Name>         <Title>x</Title>         <Abstract/>         <CRS>EPSG:3857</CRS>         <CRS>EPSG:3785</CRS>         <CRS>EPSG:900913</CRS>         <Layer queryable="0">             <Name>15658084116283052074-00933023778830223306-4</Name>             <Title>x</Title>             <Abstract>Raster layer</Abstract>             <CRS>EPSG:4326</CRS>             <EX_GeographicBoundingBox>               <westBoundLongitude>-100.00045742818516</westBoundLongitude>               <eastBoundLongitude>-92.99988641904172</eastBoundLongitude>               <southBoundLatitude>39.99928465598993</southBoundLatitude>               <northBoundLatitude>47.00075398041749</northBoundLatitude>             </EX_GeographicBoundingBox>         </Layer>     </Layer>


Any GIS program with GPX support and free hand selection tool?

I'm looking for GIS program that has good support for KML/KMZ or GPX route files and also has free hand selection tool. Right now I use 3dem and it would be perfect for my needs if only it had that free hand selection tool. All I need is to load a terrain (HGT file), and then select only the part of it that is close to my route plan (KML file). And finally save that selected part to DEM file or any other format that I could edit later in some 3D modeler. I'd appreciate it very much if someone could point me to some GIS program that fully meets my requirements.


Creating prepared geometries with OGR from Python

Is it possible to create a prepared geometry object using the Python SWIG `geos.ogr` module? It seems that Shapely and GeoDjango both have this functionality, but I can't see any mention of it in the standard Python module source or documentation. Unless I'm missing something, this seems somewhat of an oversight. http://toblerity.github.io/shapely/manual.html#prepared-geometry-operations https://docs.djangoproject.com/en/dev/ref/contrib/gis/geos/#prepared- geometries


Offline Phonegap/Openlayers App

I have a mobile app that uses Phonegap with OpenLayers and Geoserver. Now, I need to make the app available completely offline. The amount of data points can get very large depending on what client is loaded into the app, and each point has related properties. So, I need to be able to pull the data down to the phone when it is online and then use the local data when it is offline. I like the speed of GeoJSON and would like to use it if possible. I have built a GeoJSON file that loads on the map like I want it to. Now, I have to save edits/moves to the GeoJSON file and I'm stuck. Using a save strategy isn't working and from what I read it looks like I have to have a server script to make that work. How do I save the edits back to my GeoJSON file? Or am I going about this all wrong and need to use something else for offline data with OpenLayers?


Find Perpendicular Distance and Minimum Perpendicular Vector between a Point and a Line using GeoTools and JTS

I have a line formed by 2 lat/lon pairs, and the lat/lon of a point. I would like to find out the perpendicular distance between the line and the point on the Earth surface (can assume Earth as great sphere), and the minimum perpendicular vector (i.e. the projected "cross point" on the line). I am trying to use Geotools 8.0 and JTS for this. Below captured my testing code:                   //Coordinates in lon, lat         Coordinate linePt1 = new Coordinate(-5.71472, 50.06639);         Coordinate linePt2 = new Coordinate(-3.07000, 58.64389);              //Multiply all longitudes by the cosine of latitude.         //http://gis.stackexchange.com/a/29713/10772         linePt1.x = linePt1.x * Math.cos(linePt1.y);         linePt2.x = linePt2.x * Math.cos(linePt2.y);              LineString line = createLine(new Coordinate[]{linePt1, linePt2});              Coordinate pt1 = new Coordinate(-6, 54);         pt1.x = pt1.x * Math.cos(pt1.y);         Point point = createPoint(pt1.x, pt1.y);              double distanceOp = DistanceOp.distance(line, point);         System.out.println("Distance = " + distanceOp);              //Find the minimum perpendicular vector using "closestPoints()"         for (Coordinate c : DistanceOp.closestPoints(line, point)) {             System.out.println("=== " + c);             //verify if the point is on the line             System.out.println(CGAlgorithms.isOnLine(c, new Coordinate[]{linePt1, linePt2}));         }      the createPoint() and createLine() methods:               public static LineString createLine(Coordinate[] coordinates){         GeometryFactory factory = new GeometryFactory(new PrecisionModel(                 PrecisionModel.FLOATING), WGS84_SRID);         LineString line = (LineString) factory.createLineString(coordinates);         return line;     }          public static Point createPoint(double longitude, double latitude) {         if (longitude < -180 || longitude > 180) {             throw new IllegalArgumentException(                     "Longitude should be between -180 and 180");         }         if (latitude < -90 || latitude > 90) {             throw new IllegalArgumentException(                     "latitude should be between -90 and 90");         }         GeometryFactory factory = new GeometryFactory(new PrecisionModel(                 PrecisionModel.FLOATING), WGS84_SRID);         Point point = (Point) factory.createPoint(new Coordinate(longitude,                 latitude));         return point;     }      However, the result of "isOnLine()" return false. I was wondering if there is anything wrong. Is there something wrong with my verification method, or actually the way I used to find out the perpendicular distance and the "cross point" on the Earth surface is not correct? Please kindly advice


Making an access plan with openstreetmap

What tool would be best to create an access plan (with directions written on roads, local zooms, etc.) from OpenStreetMap (preferably using the MapQuest Open map)? ![example of access plan](http://i.stack.imgur.com/bpbeQ.gif)


How to create CGA rules in esri cityengine

I'm new in using esri cityengine 2011 . i red it's tutorials . it was very interesting and helpful for but there is no references or tutorials for how to create cga rules . how can i find tutorial or help about this subject?


Using String Functions (LEFT, RIGHT, MID) in Select By Attributes against a File Geodatabase using ArcMap 10

I finally (albeit reluctantly) made the switch from a personal geodatabase (pGDB) to a file geodatabse (fGDB) not too long ago. The main reason it took so long to switch has to do with how Select by Attributes deals with string functions. For example, I used to be able to easily select all records where the first character of a particular field starts with "A".               left([Some_Field],1 = "A")      This works without a hitch when querying against a pGDB. However, try to do the same thing against a fGDB.               left("Some_Field",1 = "A")      This returns the following error: There was a problem selecting An invalid SQL statement was used. I realize I can use the field calculator to calculate a new field equal to the first character of some other field. But who wants to do that every time? Is there a way to use string functions inside Select By Attributes?


Rhombus shaped pixels when viewing an image referenced in WGS84

Following the Question What is the projection of WGS84 in GIS software?, in the comments section of the answer http://gis.stackexchange.com/a/73578/5256, Jake very well explains that > Because the coordinates -180°,-90° in WGS84 are in angular units, and they > need to be mapped to cartesian coordinates. In this case, that's done using > the trivial equirectangular projection, which simply exchanges the angular > units with linear units, but that process is still a projection. I think that a related visual example of an image referenced in Geographic Coordinates is illustrated below. Perhaps my guess is completely wrong. I would like to understand what causes the "skewing" of pixels, which happens in both OpenEV as well as in ArcGIS (using data from the same satellite acquisition, packed in an NTF file). So, the question is **What is this skewing effect?** ## A visual example A small fragment from a WorldView-2 image, purely in Geographic Coordinates, for which gdalinfo reports the following               Coordinate System is `'                                                                                GCP Projection =                                                                                GEOGCS["WGS 84",                                                                                DATUM["WGS_1984",                                                                                SPHEROID["WGS 84",6378137,298.257223563,                                                                                AUTHORITY["EPSG","7030"]],                                                                                TOWGS84[0,0,0,0,0,0,0],                                                                                AUTHORITY["EPSG","6326"]],                                                                                PRIMEM["Greenwich",0,                                                                                AUTHORITY["EPSG","8901"]],                                                                                UNIT["degree",0.0174532925199433,                                                                                AUTHORITY["EPSG","9108"]],         AUTHORITY["EPSG","4326"]]     GCP[  0]: Id=UpperLeft, Info=               (0.5,0.5) -> (-16.8511111111111,13.0025,0)     GCP[  1]: Id=UpperRight, Info=               (9215.5,0.5) -> (-16.6588888888889,13.03,0)     GCP[  2]: Id=LowerRight, Info=               (9215.5,7167.5) -> (-16.6588888888889,12.8911111111111,0)     GCP[  3]: Id=LowerLeft, Info=               (0.5,7167.5) -> (-16.8511111111111,12.8641666666667,0)      when displayed in OpenEV as _Non-Georeferenced_ (squared pixels, term derived from OpenEV's related Viewer icon/button) ![small fragment from a WorldView-2 image, Non-Georeferenced viewing](http://i.stack.imgur.com/gxmUW.jpg) and Georeferenced (rhombus-shaped pixels!) ![small fragment from a WorldView-2 image, Georeferenced viewing](http://i.stack.imgur.com/ub7az.jpg). As explained in OpenEV's manual, for the _Georeferenced Display_ icon/button: **_Non-Georeferenced_** means that _the view is being displayed in raw pixel/line coordinates for the source raster_ and **_Georeferenced_** means that _the view is trying to display in georeferenced units (if any are available)_. The same skewing effect appears also in ArcGIS when viewing another fragment from the same acqusition (credits for the screenshot to a friend): ![skewing effect in ArcGIS](http://i.stack.imgur.com/VBQ2y.jpg)


Error .ecw is not a supported raster data source

I am a user from Spain and a I have recently installed QGIS 2.0 in my computer which has Ubuntu 13.04 and when I try to use an .ecw file it says: Error, .ecw is not a supported raster data source. I am new in Linux and in QGIS, so please could you help me and explain what could I do step by step. Thank you very much.


How to drag label using DragFeature or ModifyFeature?

I am new to openlayer. I have seen the examples in which DragFeature is able to move my points, polygon and lines. But when it comes to test the Label moving in IE8, then the dragging functionality doesn't work. though I am able to drag the label in Firefox. Please provide me help here.


How to read BMP file location of image used for picture symbol in LYR file?

I have a number of *.lyr files which are pointing to various .bmp files which are used as marker symbols in ArcGIS for Desktop 10.1 I was wondering if there is a way to extract the file paths of the *.bmp files each *.lyr file uses for its picture symbol. Is it possible to do this using Python?


Categorized Style : showing all possible values, not just the ones in use

I am new to QGIS and experimenting before rolling this out to my colleagues. I have a shapefile with some codes, and i have a csv with those codes and other information that i need. I have joined them, and that works fine - BUT is there a way to stylize the shapefile so that only records present in the shapefile show up in the layer manager and legend? At present, my shapefile is nicely coloured by "description" but the layer props shows every single code/description in the CSV, not just the ones in use in the shapefile. In ESRI (for example) it would only show records with non- null values - I only have 4 or 5 codes in the shapefile, and, i mean, some of the values listed i know are not even polygons! But they are displayed, because the csv file has them.


calculate average commute time within 15 miles of city center

I am trying to figure out how to calculate the average commute time to work within 15 miles of the city center (and then map it in a form of continuous symbols (red to green gradient) with a legend, scale and everything. That would be called “average commute times to work). Could you help me for the first part of the problem? Thank you very much


keep the same field headers after joining a table to a shape file in QGIS

I noticed that after joining a table to a shape file the headers of each fields in the table used for the join are changed by QGIS and they are attributed to a different name. For instance, i had a shape file with vegetation_codes and a table with vegetation_codes and veg_definition (these were the headers). After joining the table to the shape file and also saving the shape file and creating a new one, the vegetation_classes header was changed into vegetati_1. Is there a way to keep the original headers? Notice: i am using QGIS dufour on windows 7 and teh table that i join to the shape file is csv (tried with dbf as well and the problem is the same)


QGIS 1.8 not loading after install

I have just installed QGIS 1.8 on Windows 7. Once the install completed and I tried to open QGIS (via the desktop icon) nothing happened. I had this issue when installing QGIS 1.7. I was able to get 1.7 to open by using the qgis.bat file, but it is not in the the bin folder in the QGIS 1.8 version. I began to have this issue after installing OpenGeoSuite 4W. I thought I uninstalled everything I needed. I am worried I may need to re-install Windows. Does anyone have any ideas as to what I can do to get QGIS 1.8 to load and open. Thanks...


Does GPS Navigator send data to Satellite?

Does GPS Navigator send data to satellite? Is this true about regular devises available in the market?


ArcGIS 10.2 Release Date

Anyone have an idea on an ArcGIS 10.2 release date? I wans't even aware of it until stumbling upon this article: UC Agenda Sneak Peek: Part I


Unable to explode multipart polygon

I have a taxlot that is giving me troubles in a Union. When I try to run the union I get the tried and true ''Geometry is not M-Aware'' message. (there are no Polygon-M features). Based on readings on this site and the ESRI forums, I'm now trying to explode my taxlots prior to the union. However I seem to have come across a mystical indestructible shape. I've tried check and repair geometry with no results. I've tried the Multipart-to-Singlepart tool and receive this message:               Cannot process feature with OID ...     Failed to execute      So I tried the explode function in the Advanced Editing Toolbar and go this lovely message: ![explode fail](http://i.stack.imgur.com/hEl0v.png) I calculated (!SHAPE!.partCount) the number of parts into a field and came up with 22. Here is what the shape looks like:![enter image description here](http://i.stack.imgur.com/Hg2Lu.png) Help?


How to convert from dgn to shp or dwg files?

I am a frequent recipient of microstation dgn files and don't like it because I don't have software to convert it to autocad. I do have ARCVIEW, but I can't edit the files. I have tried other open source programs to convert, but they all are lacking. I'm wondering if anyone has used QGIS to convert from dgn to shp or dwg file types? I'm skeptical because I noticed that QGIS supports dgn file types, but **_doesn't_** support dwg file formats. This is odd... Anyways, please post up, I'm probably going to install QGIS this week on a production machine! Thanks


What is the best way to handle geometries between Python functions?

What is the best way to handle geometries between different Python functions? For example: I have a function that exports a line from grass.script. The line will be a parameter of another function where it will be passed in. Is it best to export them to WKT, or safe them in a GPX, or GeoJSON? The formats OGR offers are endless. But which one is most recommended?


GeoTools Oblique Mercator Example

I would like to use the Oblique Mercator projection in GeoTools. I'm currently using a WGS84 Mercator projection like this:                       final CoordinateReferenceSystem wgs84CoordSystem = CRS                     .decode(LATLON_EPSG_CODE);             final CoordinateReferenceSystem worldMercatorCoordSystem = CRS                     .decode(MERCATOR_EPSG_CODE);             final MathTransform latLonToMercator = CRS.findMathTransform(wgs84CoordSystem,                     worldMercatorCoordSystem);             final MathTransform mercatorToLatLon = CRS.findMathTransform(worldMercatorCoordSystem,                     wgs84CoordSystem);      The Oblique Mercator EPSG code doesn't appear to be supported (and I want to be able to specify the latitude of centre and azimuth anyway). Could anyone give me an example of how to create a WGS84 Oblique Mercator projection and MathTransform to allow me to convert to/from Lat/Lon please?


Spherical Mercator projection invented by Google and not conformal?

I had some certitudes on the Google Spherical Mercator also known under EPSG code 900913 and 3857 before looking at this presentation, I was sure that this projection was in the Mercator family (so conformal). With this input, I'm now not sure about conformal status of Spherical Mercator. I didn't dive enough in mathematical "stuff" here to be able to qualify validity of the doc. I also want to confirm / infirm this exact projection was never there before Google Maps landing. Any opinions on those 2 questions?


Kernel Density output labeling

I have been looking for a way to try and make the output of the **Kernel Density** function in ArcGIS for Desktop make a little more sense to our administration. I ran the function on a sample dataset with 500 points, and the 'density' where only 1 point was within the search radius was given a value of 6.2342 at the peak. I then divided the entire raster by this value. The scale is now at least in relation to the peak value found at one point. Is this methodology sound?   Has anyone found better ways to label the scale that go beyond 'more dense, less dense'? EDIT: Just wanted to reference How to interpret GRASS v.kernel results? as the method for checking the values of the output is beneficial. This helps to clarify how these values are computed and provides a way to validate results which helped me to understand the assigned values.


Can't save result of "Extract Values to Points (Spatial Analyst)" inside the working feature dataset!

I have a file geodatabase in which I have a feature dataset. I have some feature classes inside the feature dataset. I wonder why when I attempt to save the result of Extract Values to Points (Spatial Analyst) inside my working feature dataset, the result is genereated inside the file Geodatabase but not under my feature dataset. No matter what I do I can't make it save the result inside my feature dataset. I can easily save the results of for instance Extract Values to Points (Spatial Analyst) inside my working feature dataset. But "Extract Values to Points (Spatial Analyst)" seems to be different in that regard. Any idea why this is happening? Edits: I am using Arcmap 10.0 calling this tool from Arc toolbox. All the layers are in the same coordinate system. Here is a snapshot before I run the tool: ![enter image description here](http://i.stack.imgur.com/ssRoY.jpg) But as can be seen here the result is generated outside the feature dataset: ![enter image description here](http://i.stack.imgur.com/Frgba.jpg)


I just want to make a simple loop in PostgreSQL

In the PostGIS SQL Editor, I just want to make a loop to make this function work This query is to give the UTM Zone number to one column of Global DTM raster table               For Loopid = 0 to 1000, then execute the following statments:          UPDATE public.globaldtm      SET "UTM" = loopid      WHERE rid IN (SELECT rid FROM globaldtm WHERE ST_Intersects(rast,(select geom from utm where gid =loopid)));      ![enter image description here](http://i.stack.imgur.com/mqyEJ.png) How to write a simple code inside this SQL editor to make the loop work. Thanks.


PostGIS - Interpolate point between contours

Using PostGIS, what is the best method to interpolate the z value for points (the orange dot in the image below) located between each contour layer (blue lines and red lines in the image below)? So for the blue contours it's going to be ~ 917 and for the red contours it'll be ~ 819. ![example-map](http://i.stack.imgur.com/UUmeS.jpg) The blue contours are a 2D Multipolygon and the red contours are a 2D Multilinestring (so for both, the contour value is an attribute field. If necessary I could update the geometries to have a z value). Thanks!


Geometry Operands - BBOX vs Within - What's the difference?

What is the difference between the "BBOX" and "Within" spatial operators. Can anyone please shed some light?


How to serialize IStyleGallery Object?

> **Possible Duplicate:**   >  Can I store an ArcObject inside a BLOB or XML field? I am saving shape file in database and now i want the symbology selected for the feature layer also get stored in database. I am facing an issue I cannot serialize IStyleGallery, and if its not serialized than how can i store that in database. Anyone got any good solution?


Pan sharpen Landsat 8 using Grass 7

I have followed this great tutorial on pan sharpening using Grass GIS 7 (I'm using beta 3). Everything in the tutorial seemed to have worked, but my final output is not as expected (pictured below). ![PanSharp RGB output](http://i.stack.imgur.com/v5hx0.png) I tried with various sharpening methods, colour balancing stages and with and without atmospheric correction. I also tried with different images. Any advice on where I'm going wrong? Here's the output from r.univar: ## Of the non-null cells: n: 41623319 minimum: 0.089549 maximum: 1.17079 range: 1.08124 mean: 0.161591 mean of absolute values: 0.161591 standard deviation: 0.110987 variance: 0.0123181 variation coefficient: 68.6836 % sum: 6725971.35730981


Recommendations for creating contour map from depth points

I am trying to put together a safe routes map for a local lake. I have an old paper map that has a grid of various depths as points. I would like to draw contour lines through these points and create a topographic map of the lake depth. From here I would like to apply a graduated shading pattern for some specific depths to show safe routes etc. I've mostly used MapInfo, GlobalMapper and such tools, and mainly for generating heat maps on targeted demographic data. I've never worked with contours or other topographic data before. Any recommendations on tools/plugins or online guides that might help me on my project? Thanks!


How can I use GDAL to batch define a projection?

I have a fodler with 1500 ECW rasters, no spatial reference information defined. Can I use GDAL to batch define a projection for all 1500 in the folder?


Clip raster layer with *raster* mask layer in QGIS

Given two input layers   1\. The clip layer - an arbitrary layer (though in my case it's a float 1 band geotiff)   2\. The mask layer - a paletted _raster_ in which every pixel is either NO DATA or a single "color" value, same for every pixel. I want to create an output raster whose overall extent matches the extent of the mask layer and each pixel is either NO DATA if the corresponding pixel of the mask layer is NO DATA or the value of the corresponding pixel from the clip layer if the corresponding pixel of the mask layer is not NO DATA. I know I can mask the clip layer with a polygon, but the mask layer is a raster. Polygonizing the raster layer is possible in principle, but would result in a polygon with a lot of very short edges. Is there a direct way to do this in QGIS? I suppose there's probably a path that involves creating a new layer and using the raster calculator, but I'm hoping there's something more direct. Further complicating the matter is that the two rasters might not have the same resolution and origin. I believe this is equivalent to Extract by Mask in ArcMap. A gdal command solution is equally acceptable to QGIS. A solution in R is OK, but not preferred.


Data source for determining postal codes given location?

What is the best data source for determining international postal codes given a latitude & longitude?


d.out.file is not working

I'm trying to use 'd.out.file' to save the displayed map to a PNG file. It failed and produced this message: "Command 'd.out.file' not yet implemented in the GUI. Try adding it as a command layer instead." How can I resolve this? It also seems that I cannot run other d.* commands


qgis - slope from DEM - errors due to projection and oversimplified 'z factor'

I'm trying to generate a slope raster from a DEM raster. It seems there is a pretty significant error due to the 'z-factor' option. I'm fairly new to this, but some other posts and responses indicate a general workflow: 1) obtain a DEM. The ones I got (NED) are unprojected: horizontal coords are lat-lon, and vertical coords are meters. Two possible branches here, A or B: A2) project the DEM to UTM so that horizontal and vertical coords are in the same units A3) then do slope analysis on the UTM-projected DEM, using z-factor = 1.0 OR B2) do slope analysis on the unprojected DEM, using z-factor = 111120 (which has been suggested in some posts as a number of meters per degree - see error discussion below) B3) then project the raster to UTM Problem with option A: the projection process introduces gridded artifacts, and these get amplified in the slope raster: Original DEM (NAD83, unprojected; zoomed in to one peak; min/max set to show high contrast here): ![Original DEM \(unprojected\)](http://i.stack.imgur.com/Z0s4A.png) DEM projected to NAD83 UTM zone 10, note gridded artifacts: ![enter image description here](http://i.stack.imgur.com/EyGrn.png) slope analysis output from NAD83-UTMz10-projected DEM, note the same artifacts: ![enter image description here](http://i.stack.imgur.com/r7sGk.png) Problem with option B: 111120 seems vastly oversimplified and produces significant errors, see error table below - though, gridded artifacts are greatly reduced since they don't exist in the DEM that you run slope analysis on. First, number of meters per degree of latitude is not the same at all latitudes, due to the earth not being a perfect sphere. Second, and more obvious, number of meters per degree of longitude is a function of latitude, varying from ~111km at the equator to 0 at the poles. For our area (Nevada County, California) here are some numbers from an online calculator, referenced in other places as a trusted source (but feel free to verify these): Nevada County S extent ~ 39.0deg (WGS84) Nevada County N extent ~ 39.5deg (WGS84) Nevada City ~ 39.25deg (WGS84) 39.0 deg: 1 deg lat = 111015.45 meters 1 deg lon = 86626.37 meters 39.25 deg: 1 deg lat = 111020.23 meters 1 deg lon = 86320.71 meters 39.5 deg: 1 deg lat = 111025.01 meters (about 9.5 meters longer than at S extent of Nevada County) 1 deg lon = 86013.39 meters (about 613 meters shorter than at S extent of Nevada County) (at equator, for reference:) 0.0 deg: 1 deg lat = 110574.27 meters 1 deg lon = 111319.46 meters So, making some straightforward assumptions about how qgis uses the 'Z Factor' argument, here are some resulting errors (note this is in Nevada County but not the same location as the above images), along with Range-Bearing Line from Terrain Navigator Pro which is treated as gospel in this case; also note that this is just for one sample set of from/to; error would vary by compass direction of the from-to line also: ![enter image description here](http://i.stack.imgur.com/2WrZu.png) (z-factor is entered by hand for each row; all the other columns are calculated from it) So, any ideas? Am I calculating something wrong, or is there a better workflow, or is there just no really good way to get around the error?


What is the maximum attachment file size in Esri file and ArcSDE geodatabases?

I am trying to figure out the maximum size of attachment in a file and ArcSDE geodatabases while working on a project specification details. I am not able to find these figures documented by Esri anywhere. Running own tests, it seems as a file geodatabase has a limit of ca 600MB per file that is being attached. When trying to attach everything that is larger than 600MB, I am getting an error (where `Points3D` is the name of the feature class I am trying to attach a file to). ![enter image description here](http://i.stack.imgur.com/QGFIz.png) Just to see whether it is a file geodatabase only limit, I have run some tests with a SQL Server enterprise geodatabase and here I am getting stuck at somewhere between 700 and 800MB and either get the same error message (except that instead of the feature class name I have my SQL Server database filegroup name) or have ArcMap unexpectadly crashed and closed. **What is the official/documented maximum file size limit that one can upload to an Esri file geodatabase?** I also welcome comments if someone has succeeded uploading anything larger than 1GB to a geodatabase as an attachment.


What does shading indicate in home range plot?

I've simulated a home range in R using the clusthr function from the adehabitatHR package. The home range is made from 50 x,y coordinates. The output is attached. ![enter image description here](http://i.stack.imgur.com/AQYIE.png) I'm trying to get clear on what the shading indicates. The shading is clearly related to the size of the polygon. Smaller polygons = darker shading, larger polygons = paler shading. But how exactly is a polygon assigned a shade? Does the shading represent a percentage of the area covered?


PostGIS stored procedures

I am wondering if there are open source applications that make extensive uses of the special functions (the ST_* stored procedures) provided by PostGIS? I found many apps that support storing map data in PostGIS, but they seem to just fetch and store data from PostGIS and then operate on them in application code. I would like to learn about how to use those special functions as part of the queries by looking at sample applications. Thanks!


OpenLayers code didn't response popup featureinfo

Hey I'm trying to popup the featureinfo of WMS layer using OpenLayers code. But it does'nt work. Instead the cursor moves in the state of continous moving when I click on map. Here is my code:               <title>Untitled 1</title>             <script src="http://localhost:8080/geoserver/openlayers/OpenLayers.js" type="text/javascript">         </script>         <script type="text/javascript">             var map;              var wms;              var wms1;                  function init(){                      alert("inside function");                 var bounds = new OpenLayers.Bounds( 143.853, -43.648,                     148.479, -39.574);                       var options = {             controls: [],             maxExtent: bounds,             maxResolution: 0.0180703125,             projection: "EPSG:4326",             units: 'm'             };                           map = new OpenLayers.Map('map', options);                 wms = new OpenLayers.Layer.WMS("Peoples Colony",                                     "http://localhost:8080/geoserver/wms",                                    {                                         LAYERS: "topp:tasmania_state_boundaries",                                        STYLES: '',                                        format: "image/jpeg",                                        transparent: "true",                                        tiled: 'true'                                         },                                    {                              isBaseLayer: true,                         yx : {'EPSG:4326' : true}                                         }                                    );                                    wms1 = new OpenLayers.Layer.WMS("tasmania_roads",                                     "http://localhost:8080/geoserver/wms",                                    {                                         LAYERS: "topp:tasmania_roads",                                        STYLES: '',                                        format: "image/jpeg",                                        transparent: "true",                                        tiled: 'true'                                         },                                    {                              isBaseLayer: false,                         yx : {'EPSG:4326' : true}                                         }                                    );             map.addLayers([wms,wms1]);             map.zoomToMaxExtent();                       map.addControl(new OpenLayers.Control.Navigation());                   map.addControl(new OpenLayers.Control.Scale($('location')));                       var info = new OpenLayers.Control.WMSGetFeatureInfo({             url: "http://localhost:8080/geoserver/wms",              title: 'Identify features by clicking',             queryVisible: true,             eventListeners: {                 "getfeatureinfo": function(event) {                     map.addPopup(new OpenLayers.Popup.FramedCloud(                         "chicken",                          map.getLonLatFromPixel(event.xy),                         null,                         event.text,                         null,                         true                     ));                 }             }         });         map.addPopup(info);         info.activate();                              }               </script>         Anyone plz help me out? I think that I didn't mention the layers here. Is this the problem?


Is it possible to have measurements in centimeter and decimeter in 2D flat (geometry)?

Is it possible to have measurements in centimeter and decimeter in 2D flat (geometry) for ArcGIS?


Download MODIS data for Mexico

I would like to download MODIS npp images for Mexico but I cannot figure out which files correspond to the country. How can I associate each tile to its location without looking at the million of browsing images. I am an experienced python and R user if that helps. I am manually downloading the images from this link: http://e4ftl01.cr.usgs.gov/MOLT/MOD17A3.055/2000.01.01/


XMLHttpRequests clogging/pending in Leaflet.js

If I have a lot of active layers and eg. zooom in and out, dozens of tile xmlhttprequests are sent. This causes a problem in most browsers, clogging it so to speak, and leaving the map blank and dozens of Pending resource requests in Network Console (in eg. Chrome). Any known work-around for this issue? I'm creating a map with dozens of layers for a client, and with some activity on the map (zoom, adding lots of layers simultaneously, etc), this issue will appear. What is needed, I believe, is some internal queue in Leaflet.js, as the queue in eg. Chrome browser is buggy. Any advice much appreciated.


Are there any open source network analysis tools?

A researcher in my field* recently created an "Urban Network Toolbox", an ArcGIS extension built upon Network Analyst. It calculates a number of measures on urban networks, such as betweenness and reach. He was criticized for relying on ArcGIS, a commercial tool not available to many researchers, especially outside the US. But ArcGIS was a convenient platform, since it contains the Network Analyst extension, simplifying the work required for the analysis. **Are there open source network analysis tools that do the work of the Network Analyst extension?** Are there other methods for creating the _network datasets_ required as input for the toolbox? My understanding of the toolbox is that it uses the network dataset to calculate a distance matrix for a given set of points on the network. The toolbox does not use any of the higher level problem solving tools in Network Analyst. * _Quantitative Urban Morphology, perhaps? No one seems settled on a name for the broader field. The particular brand of research I do is with Space Syntax._


Find point close to points from postgis table

I have a postgis point table with a large list of cities. I need to find duplicates in it, but only if they are 10km close each other, which means that is the same city. For example, I have 5 points called 'Eneby', and supose that 4 of this are 10Km close each others, and the 5th is 300Km away, what will mean that is another Eneby town. The query in this case should only have to show 4 points. So, I've made this query, but is not showing the expected result:               Select p1.id, p2.id, * from points as p1, points as p2 where p1.name='Eneby'     and st_dwithin(p1.geom,p2.geom,0.1, true)     and p1.id=p2.id      The result is the same 5 points, no matter what distance (in degrees) I set. I'm trying with different distance values, but is always the same result. Does anybody know if is there any mistake in this query? I've been looking through this forum, and found some simmilar questions, but can't find exactly this problem. Thanks.


How to properly use PostGIS with Maps

First time using PostGIS in an app. Target:   \- Get Heat Map of customers from address table using leaflet.js and heatmap.js Have DB called store_dev. Installed OSM Bright from Mapbox in it. Have a table called "addresses" with street, city, state, zip, lat and lng. When user enters Address I get lat / lng from openstreetmap nomination service. Do I need to store anything else?   Nomination returns things like boundingbox and polygonpoints, any advantage on storing this?


Add a time dimension in ESRI mosaic raster dataset

I am in the process of creating a script to pull daily .asc files from a ftp server, convert them to a raster format, and push them into a mosaic raster dataset. Ultimately, the raster dataset will be updated with a new image every day, and I would like a time slider to appear when the dataset is viewed in ArcMap. I think I will want to use:               AddRastersToMosaicDataset_management(in_mosaic_dataset, raster_type, input_path,                                                {UPDATE_CELL_SIZES | NO_CELL_SIZES},                                                {UPDATE_BOUNDARY | NO_BOUNDARY},                                                {NO_OVERVIEWS | UPDATE_OVERVIEWS},                                                {maximum_pyramid_levels},                                                {maximum_cell_size},{minimum_dimension},                                                {spatial_reference},                                                {filter}, {SUBFOLDERS | NO_SUBFOLDERS},                                                {INCLUDE_DUPLICATES | EXCLUDE_DUPLICATES},                                                {NO_PYRAMIDS | BUILD_PYRAMIDS},                                                {NO_STATISTICS | CALCULATE_STATISTICS},                                                {NO_THUMBNAILS | BUILD_THUMBNAILS},                                                {operation_description},                                                {NO_FORCE_SPATIAL_REFERENCE | FORCE_SPATIAL_REFERENCE})      This seems to be used for a 'batch' of raster files, however (e.g. fiter='*.tiff'). I will only be adding one raster at a time (1/day after processing the received .asc files). It is not clear to me exactly how / where I'll add the time information. The rasters will all be overlapping, so having a time slider is rather critical... or it won't be so interesting! Does someone have suggestions on how to accomplish what I am trying to achieve?


Model not editable on a different PC

I am using ArcGIS 10.1 model builder on windows 8 to create create models for my processes. But when I open the model using Arc GIS 10.1 open model for editing with Arc GIS 10.1 running on Windows 7 it appears not to be editable. I can run the model but I cannot edit it. When I open the model in ArcGIS 10.1 running on windows 7 the model appears as on the screenshot attached below...!Does anyone have an idea what the problem might be Could? I am yet to check if I will have the same problem when I try and edit the model on another windows 8 platform... The model does not use additional tool from extensions like "spatial analyst and so on..." it only uses data management tools. Thank you in advance. ![enter image description here](http://i.stack.imgur.com/9kknf.jpg)


Correct coordinate systems, but trustworthy distance between points?

I have limited GIS experience with projections and I have some questions about trying to accurately display point data from two different sources in ArcGIS 10.1 in order to do a proximity analysis. The first data set, which already contains Latitude and Longitude coordinates, is from a state government agency and its metadata lists Horizontal Coordinate Scheme (projection): Not Applicable, Ellipsoid: GRS80, Horizontal Datum: NAD83, Horizontal Units: Feet, Distance Resolution: Not Applicable, and Geographic Coordinate Scheme: Decimal Degrees. The second data set contains addresses that must be geocoded. I used the 10.0 US Streets Geocode Service (ArcGIS Online) from the Geocoding toolbar to create a point layer based on this second dataset. Everything appears to line up perfectly well, but since the goal is an accurate proximity analysis, I hoped to confirm that the distances among points seemed plausible before doing more work. I have tried different approaches for projections, ranging from assuming the geocoded points were WGS84 and then projecting as NAD83 to trying to re- project both of the layers to a Projected Coordinate System such as a relevant State Plane NAD83 system. Again, the points look fine and the "Source" coordinate system information matches across both layers and the data frame. The problem is that, no matter what I do, the distance tool is giving me what seem to be extremely low distance values compared to an online tool that measures linear distance between points. For example, the online tool reports a linear distance of 6,214 feet between 2 reference points, while different projection approaches with ArcGIS are giving me distances of 4,418.753176 feet and 4,384.41136 feet between the same 2 reference points. Here are my questions: 1) Does the 10.0 US Streets Geocode Service automatically display points with WGS84? If so, is the correct strategy to then define the Geographic Coordinate System for the points layer as WGS84 and, after that, use the Projections and Transformations->Feature->Project tool to display in NAD83? 2) Is it a mistake to think of a website that uses Google Maps to calculate linear distance between points as some sort of verification? Are the reported distances on the website also flawed due to the "Web Mercator" projection used for Google Maps? If it is a mistake, can anyone suggest a better resource? Does an 'authoritative' resource even exist? Any feedback or advice would be greatly appreciated. Apologies if I'm incorrectly using some of the terminology or missing something very basic. Thank you!


Get info from WMS layer with Openlayers mobile

I am trying to build a webapp for iPad using OpenLayers Mobile. One of the features it should have is that you can tap on a tree displayed on a basemap and get info about this tree. These trees are stored as a WMS service in geoserver and the info should be displayed in a popup. In the standard version of OpenLayers I would use WMSGetFeatureInfo to achieve this, but this seems not to be working with the mobile version. When using OpenLayers mobile, I get an error message saying: TypeError: OpenLayers.Control.WMSGetFeatureInfo is not a constructor Can you help me fix this? Thnx in advance.


How to set the length of a line using openlayers

I'm trying edit a polygon by changing the length of some lines by code. Found this method to calculate based on the bearing. But I didn't find anything on how to calculate the bearing, before I start research my math notes and code this bearing calculation, any recomendations ? thanks


plot path of points

I have a sample of the address histories of households.               ID  ZIP1   ZIP2   ZIP3     01  XXXXX  XXXXX  XXXXX     02  XXXXX  XXXXX  XXXXX     03  XXXXX  XXXXX  XXXXX     04  XXXXX  XXXXX  XXXXX     ...      It's easy enough for me to find the centroids of the ZIP codes. What I would like to do is link those centroids together to create an image showing household `i`'s path from `ZIP1` to `ZIP2` to `ZIP3`. Does anyone know any tools to make this easy in QGIS (or even better: R)? I have the feeling there must be some tool, but I don't know enough to think of what the name would be.


How to manage user privilege on layers to Arcgis 10 Desktop?

**Problem:** I am a Computer Analyst on a town hall. Here we have the sector A and B. Both work in ArcGIS 10 Desktop. The sector A has granted to access/edit everything. The sector A has all the privileges! The sector B can see everything. But, the sector B can only edit some Layers/Dataset. I'm having problems with the Oracle user B sector in SDE. **What I tried:** I tried to grant privileges in Oracle. To the user of sector B I grant to access/edit all. I only blocked the sector B some tables (layers). That he can't change. The user of the sector B can access the ArcGIS Desktop and can see all Layers. But, the user of sector B get an error when, by the ArcGIS Desktop, he try to edit a Layer that he has privileges. I can't understand, because I grant all the tables, including the temp tables of ArcGIS, just don't grant some tables (of some layers). The error occurs when giving a "Start editing" a layer that user B has full permission. **That is the description of the error:** " Error: No editable layers ArcGIS 10 None of the layers in your map can be edited. You cannot start an edit session on this data. Solution: Make sure that the data you want to edit is in a format that can be edited in ArcGIS and that you have the proper permissions to edit it. More information: In ArcGIS, you can edit data from shape files; geodatabase feature classes; stand-alone table formats, such as INFO or .dbf; and the attribute tables of certain rasters. If your map has data in any other format, you are unable to edit it. Make sure that the data you are attempting to edit is in one of these supported formats. If the data is not from any of these workspaces, it may be possible to export it to one of these formats to be able to edit it. Many times, you encounter this error along with layer warnings that may provide more specific reasons why the layer cannot be edited. For example, if you have data from a geodatabase in the map but the feature classes are read-only, you also receive a warning message telling you that you need to check the permissions. " **Question:** Anyone have any suggestions? How do you control your users in ArcGIS 10 Desktop? What I did wrong? Can I manage in ArcGIS Server Manager users of ArcGIS Desktop? The idea is simple, the user sector B in ArcGIS Desktop can not access some layers. But I do not know do it. **Thank you!**


How to join nodes to network lines ( and not the other points)

I'm trying to do a shortest path analysis on my network. In order to prepare the network and attach polygon centroids to the roads, I used GRASS' V.NET operation=connect. the problem with this approach is that instead of connecting points to nearest line, it connect nodes to nearest line OR node which in turn results in unrealistic paths. For example, as you can see in the screen shot, nodes in the central region instead of being connected to the nearest road, are connected to the line that is three time further away. Is there a way to fix this? Thanks P.S. I'm using Grass 6.4 on Mac. ![enter image description here](http://i.stack.imgur.com/3OIRP.png)


Arcpy error message: 'Layer' object is not subscriptable?

What the code does successfully so far, is gets a list of the layers in the first data frame of the current map. What it doesn't succeed in doing is, joining the layer names to the gdb location using os.path.join(), so I can then do a clip against an existing feature class. I think I need to convert the lyr names to a string before I can use it in a Clip_analysis, how do I do that? Here is what I've got so far:               import arcpy     import arcpy.mapping     import os          #Set the current map     mxd = arcpy.mapping.MapDocument("CURRENT")          # Set the dataframe     df = arcpy.mapping.ListDataFrames(mxd)[0]          # Get list of Layers from toc     layers = arcpy.mapping.ListLayers(mxd,"",df)          #Set the output workspace     outWorkspace = r'C:\Users\jsommerville\Documents\ArcGIS\California\ProjectData.gdb'          for lyr in layers:          outFeatureClass = os.path.join(outWorkspace, lyr)          arcpy.Clip_analysis(lyr, "extent", outFeatureClass)      The error message I'm getting: 'Layer' object is not subscriptable


How to configure 3rd parties for the sextante plugin in qgis?

I'm currently exploring the enourmous potencial that the sextante plugin for qgis has to offer. The model builder will surelly be a very handy tool. The problem is I'm not beeing able to run 3rd party (like SAGA or Orfeo). I know I have to configure the paths, but i'm not sure how. I did it like this 1 but still don't get tools running. ![enter image description here](http://i.stack.imgur.com/MDcAJ.png) I'm getting this error: ![enter image description here](http://i.stack.imgur.com/G5jEB.png) ERROR with SAGA:               global name 'false' is not defined Traceback (most recent call last):        File "C:\Users\vbnunes/.qgis/python/plugins\sextante\core\GeoAlgorithm.py", line 115, in execute     self.processAlgorithm(progress)        File "C:\Users\vbnunes/.qgis/python/plugins\sextante\saga\SagaAlgorithm.py", line 153, in processAlgorithm     self.calculateResamplingExtent()        File "C:\Users\vbnunes/.qgis/python/plugins\sextante\saga\SagaAlgorithm.py", line 109, i      Any help? Thanks


ERDAS Imagine: negative z-coordinates for automatically set tie points

I'm a new ERDAS Imagine user, so it's probably a beginner problem I'm facing: I get negative elevations in my DTM after automatic tie points setting.. I am geo-referencing a stereo-pair of ASTER images to a reference image (with x,y,z, coordinates) in order to generate a DTM from them. When I set the GCPs in the point measurement tool of LPS _without_ the use of tie points, then triangulate, I can generate a quite useful DEM. However, if I use the option 'automatic tie generation' and check the coordinates after triangulation, I get, what seems, random elevations for the tie points (although x and y seem ok, both in the ASTER-images and the reference image): basically any value between -30'000m and +50'000m. Consequentially, the resulting DEM is useless (but this also confuses me somewhat, as I don't expect the 'DTM extraction' process to use the z-coordinates of the tie points, but only the ones of the GCPs). Anybody has experience with this? Any clue what I am missing? I'm glad for every hint!


How do I convert a text file with coordinates to database table in Python?

How do I convert a text file with point coordinates to database tables in the Dbase.dbf format in Python?


Cloud and Snow Differentiation

I am doing unsupervised classification of a mountaneous terrain and I have used 500 classes to classify the land use. In my result, **cloud** and the **snow** are categorized in the same class. How do I differentiate them. Can someone please help me? I want to eliminate the cloud but not the snow. Possible solution to it in either ERDAS IMAGINE or ArcGIS would be appreciated. Thanks!


Attribute error:'NoneType' object has no attribute

I tried to run a python script for getting the coordinate system of a feature/shapefile as follow               >>> import arcpy       >>> from arcpy import env       >>> env.workspace="D:\data"       >>> fc="river.shp"       >>> dsc=arcpy.Describe(fc)       >>> dsc.spatialReference.Name       >>> print dsc        i'm getting following error at line 5 > Attributeerror:'NoneType' object has no attribute Name.


What is primary difference between ArcGIS for Desktop and ArcGIS for Server?

What is the primary difference between ArcGIS for Desktop and ArcGIS for Server?


Implementing non-default keyboard shortcuts in Openlayers

Following on from this thread, I am trying to implement @Aragon's suggestion and add some keyboard shortcuts to OpenLayers via a handleKeyEvent method in `OpenLayers.Handler.Keyboard`. This ought to be a simple task that many people implement but for some reason I'm just not getting it.               var keyboardControl = new OpenLayers.Control();          var keyHandler = new OpenLayers.Handler.Keyboard(keyboardControl, {         handleKeyEvent: function(evt) {                 alert("You pressed a key!");                 switch(evt.keyCode) {                     case 87:                         doSomething([0, 1]);                     case 83:                         doSomething([0,-1]);                     case 65:                         doSomething([1,0]);                     case 68:                         doSomething([-1,0])                 }             },     });          function doSomething(vals){         alert("Something will happen here eventually...");     };          map.addControl(keyboardControl);      I get no errors but neither of my alerts get fired. What am I doing wrong? Many thanks!


Convert and export lat longs from text layer - QGIS

I have imported a `Text Delimited Layer` that was a `csv` file with three fields `id, lat, long`. The layer shows up correctly and the values are in `Feet`. I need to convert the `Feet` to `Decimal Degrees` and then export the file. None of the menu options seem to point towards this goal. Can this be done? I have been searching for solutions on the Internet without luck so far. Edit: I tried right clicking on the layer and `Save As` to csv, but it has the same values even after changing the CRS to a Decimal Degree projection.


Mapnik: mapnik.has_pycairo() returns False. How to fix this on Windows for Python27?

I'm trying to modify rundemo.py (comes canned with Mapnik Windows binaries) to render output files at a higher resolution, but it seems I still have issues with my Mapnik-to-Cairo setup. I've got mapnik and its python bindings working, and I've also got cairo and these python bindings working (..I think). If I start Python, I can do the following without issue:               E:\x_FOSS\mapnik\v2.0.0\mapnik-2.0.1rc0\demo\python>python.exe     Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32     Type "help", "copyright", "credits" or "license" for more information.     >>> import mapnik     >>> import cairo     >>>      Meanwhile, back in rundemo.py line 351, it fails on this condition:               if HAS_PYCAIRO_MODULE and mapnik.has_pycairo():      And this.. `print mapnik.has_pycairo()` **# returns False**. But this conflicts with what I'm reading in the Mapnik blog which says these Windows binaries are built with Cairo backend support. Does anyone know what conditions have to be in place for `mapnik.has_pycairo()` to return True? * * * **[Update, are these build, or runtime instructions?]** Per Zero_Qualms' advice, I downloaded the mapnik source and found reference to `HAVE_PYCAIRO` in %\mapnik-v2.0.1\bindings\python\mapnik_python.cpp. I'm not familiar with C++, so I'm not sure if these are build instructions or runtime instructions. First, line 86 has this block following several `#include` statements:               #if defined(HAVE_CAIRO) && defined(HAVE_PYCAIRO)     #include <pycairo.h>     static Pycairo_CAPI_t *Pycairo_CAPI;     #endif      Then there are a couple insignificant calls to `defined(HAVE_PYCAIRO)`, followed by this `has_pycairo()` property at line 347:               // indicator for pycairo support in the python bindings     bool has_pycairo()     {     #if defined(HAVE_CAIRO) && defined(HAVE_PYCAIRO)         Pycairo_CAPI = (Pycairo_CAPI_t*) PyCObject_Import(const_cast<char *>("cairo"), const_cast<char *>("CAPI"));         if (Pycairo_CAPI == NULL){             /*               Case where pycairo support has been compiled into               mapnik but at runtime the cairo python module                is unable to be imported and therefore Pycairo surfaces                and contexts cannot be passed to mapnik.render()              */              return false;         }         return true;     #else         return false;     #endif     }      That block comment seems to imply my mapnik-pycairo linkage just isn't correct, and that it can be fixed. Next I searched for `PyCObject_Import` and found the following block in this file: %\mapnik-v2.0.1\bindings\python\python_cairo.cpp:               void register_cairo()     {         Pycairo_CAPI = (Pycairo_CAPI_t*) PyCObject_Import(const_cast<char *>("cairo"), const_cast<char *>("CAPI"));         if (Pycairo_CAPI == NULL) return;              boost::python::converter::registry::insert(&extract_surface, boost::python::type_id<PycairoSurface>());         boost::python::converter::registry::insert(&extract_context, boost::python::type_id<PycairoContext>());     }      Blast! It seems reasonable that I could create the registry entries manually, but ..what entries?


what is the visualization technology behind cartoDB?

does cartoDB uses mapserver/geoserver/other? what is the technology behind its visualization? thanks allot!


How to do geo coding with openlayers?

How can I achieve Geocoding with the JavaScript OpenLayers API, in the same fashion as the Google Maps API?


Using group by to set a PostGIS datasource using QGIS Python API

I am writing a QGIS Plugin and wish to obtain data from a PostGIS table using the Group By clause using something like the following code:               uri = QgsDataSourceURI()     uri.setConnection('localhost', '5432', 'postgis', 'postgres', 'xxx')     Query="select param_id, st_union(the_geom) as the_geom from myTable group by param_id"     uri.setDataSource('', '(%s)' % postGisQuery, "the_geom",'','gid')     vlayer1 = QgsVectorLayer(uri.uri(), 'testlayer1', "postgres")       This gives the error "No key field for query given." because it is looking for the gid key field. But if gid was put in the select statement of the Query, we won't get aggregated rows, just distinct rows. If I try an aggregation function on gid, I get the same error. If I try aliasing the aggregate, I get an "Erroneous query" error (even `count(gid) as gid`), same as if I put 'param_id' as the key field in setDataSource, because 'param_id' is not a primary key, I guess. In this case, forcing the key field in the uri seems to make the group by clause useless. Is there another workaround I haven't thought of or is this the expected behaviour? EDIT: in QGIS version 1.7.3 and my plugin code like below works, but not in my dev version (1.9.90):               Query="select param_id, st_union(the_geom) as the_geom from myTable group by param_id"     uri.setDataSource('', '(%s)' % postGisQuery, "the_geom",'','param_id')     vlayer1 = QgsVectorLayer(uri.uri(), 'testlayer1', "postgres")       So it allowed the use of param_id as a key, even though it isn't a primary key. Has something changed in recent versions that doesn't allow such code? In fact there doesn't seem to be an error message in the Log Messages, QgsVectorLayer just doesn't load the layer - using `QgsMapLayerRegistry.instance().addMapLayer(vlayer1)` Does anyone know if such code should work in the latest dev version (maybe there is a more recent version that allows this or the feature has been deliberately discontinued?) Ian


OpenGeo Dashboard.app won't start on Mavericks

I've installed the new OS X Mavericks and OpenGeo Dashboard 3.1 won't launch. My console has this message: "2013/10/25 12:25:36,909 PM OpenGeo Dashboard[11811]: The function `CGFontSetShouldUseMulticache' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance." followed by "2013/10/25 12:25:38,254 PM com.apple.launchd.peruser.501[208]: (org.opengeo.suite.50368[11811]) Exited with code: 1" A problem with the dashboard and the new Mavericks? I have reinstalled OpenGeo Dashboard twice...


QGIS select feature, "add to current selection" feature

I am trying to perform a feature selection on qgis similar to "add to current selection" interactive selection method in Arcgis Desktop, is that possible? An example: I perform a spatial query and select a set of features, afterwards I need to manually add a couple of features to this set, if I use the feature selection button I lose my first selection, and start a new one. Any way of adding features to a selection? Many thanks everyone in advance,