Problem when creating database based on template_postgis

I have created a PostGIS template but when I try to create a database based on this template this is what happens: Connecting to the template:               \c template_postgis;          You are now connected to database "template_postgis" as user "postgres".          \dt                    List of relations       Schema  |      Name       | Type  |  Owner        ----------+-----------------+-------+----------      public   | spatial_ref_sys | table | postgres      topology | layer           | table | postgres      topology | topology        | table | postgres     (3 rows)          create database prueba with TEMPLATE template_postgis;     CREATE DATABASE      Connecting to database prueba:               \c prueba;     You are now connected to database "prueba" as user "postgres".          prueba=# \dt                   List of relations      Schema |      Name       | Type  |  Owner        --------+-----------------+-------+----------      public | spatial_ref_sys | table | postgres     (1 row)      You can see only the public schema was copied, no topology schema layer or topology were copied. I had no errors when I created the template:               #createdb template_postgis           #createlang plpgsql template_postgis           #psql -d template_postgis -f /usr/pgsql-9.2/share/contrib/postgis-2.1/postgis.sql            #psql -d template_postgis -f /usr/pgsql-9.2/share/contrib/postgis-2.1/postgis_comments.sql            #psql -d template_postgis -f /usr/pgsql-9.2/share/contrib/postgis-2.1/spatial_ref_sys.sql            #psql -d template_postgis -f /usr/pgsql-9.2/share/contrib/postgis-2.1/rtpostgis.sql           #psql -d template_postgis -f /usr/pgsql-9.2/share/contrib/postgis-2.1/raster_comments.sql            #psql -d template_postgis -f /usr/pgsql-9.2/share/contrib/postgis-2.1/topology.sql            #psql -d template_postgis -f /usr/pgsql-9.2/share/contrib/postgis-2.1/topology_comments.sql      Could you please help me? Thanks in advance


Postgres casting between varchar and double precision suddenly stopped working

I have been importing data into PostgreSQL tables all day using ogr2ogr and then spatially enabling the data with no issues up to now. I have been cutting and pasting the code and this is what I have been using:               ALTER TABLE mytable ADD COLUMN geom geometry(POINT,4326);     UPDATE mytable SET geom = ST_SetSRID(ST_MakePoint(cast (lon AS double precision),cast (lat AS double precision ) ),4326);      On the last table, I suddenly get this error:               ERROR:  invalid input syntax for type double precision: "#VALUE!"      Nothing has changed, at least as far as I know, I was importing a csv file, same as all the others. I checked the csv file for spaces or unusual characters but it looks in order > > Column lon, lon are of type **character varying** here is a sample of the data               id,name,name_alt,lat,lon,description     1,Abbott Seamount,,31.8,174.3,A seamount located north of Midway Islands (US) in the North Pacific Ocean; name origin unknown.     2,Abra Canyon,,17.51667,120.36667,An undersea canyon located off the northwest coast of the Philippine island of Luzon in the South China Sea; named after the Abra River     3,Abraham Canyon,Abraham Sea Valley,52.61667,172.33333,An undersea canyon in the area of the Aleutian Islands in the North Pacific Ocean; named in association with Abraham Bay; Attu Island; Alaska (US).      4,Abrolhos Bank,,-18.5,38.75,A bank located off the coast of Brazil in the Atlantic Ocean; upon which sits the Arquipélago dos Abrolhos (archipelago).      5,Abrolhos Seamounts,Abrolhos Ridge; Cadeia dos Abrolhos,-17.33333,36.5,Seamounts located off the coast of Brazil in the Atlantic Ocean; named in association with the Abrolhos Bank and Arquipélago dos Abrolhos (archipelago).      6,Abubacer Ridge,,36.8,1.65,An undersea ridge located off the coast of Spain in the western Mediterranean Sea; named for Ibn Tufayl (known as Abubacer to Europeans); 12th-century Spanish-Arab philosopher and physician.      7,Aby Canyon,,4.25,-3.66667,An undersea canyon located off the coast of Côte d'Ivoire; named in association with Lagune Aby; Côte d'Ivoire (lagoon)      What am I missing here?


How much permgen space should i add for using 5 geoserver

My computer is windows 7 64 bit with 4 gb ram. I am using 5 geoserver in a single apache. How much amount of space i should added..


How to Lock Grid and Scalebar in QGIS Atlas

Have just started using Valmeira and I am looking at generating an Atlas. I am using irregularly sized features as the index. The challenge I have, is when I set up the template page and scalebar and grid, if I go to another page (with a different sized feature) the resulting scale change makes the scalebar push out, and the grid become too small too read. There are two workarounds -   1. Use regularly sized index features - then Grid and Scalebar size are not an issue, as the scale doesn't change between pages.   2. Group the Features by their approximate scale to reduce the amount of changes in scale, and break the project into a number of atlases. My preferred option would be if there were a 'Disconnect Object from Atlas' style of option. This would mean that I could set the Scalebar and Grid for that page, then disconnect them from the Atlas automaitc refresh once I have completed them.. Cheers.


TileStache : Unknown geometry type in geoJSON file

I'm currently trying to set up a **TilSstache** server on Ubuntu 12.04 to serve some GeoJSON tiles from a shapefile/JSON file (administratives boundaries) for a web mapping project using the Leaflet framework, but I keep having **weird geoJSON files** with **"Unkown" geometry type and "null" coordinates** :               "geometry": {"type": "Unknown", "coordinates": null}.      Here's the complete story : I struggled a bit to install everything, but the Tilestache instance seems to be up and running. When using the following `proxy` provider in `tilestache.cfg`, **the OpenStreetMap tiles are correctly displayed** :               "osm":     {         "provider":         {         "name": "proxy",         "url": "http://tile.openstreetmap.org/{Z}/{X}/{Y}.png"         }     }      The next step was therefore to create the geoJSON tiles from either the shapefile or the JSON file. I'm using one of the "official" shapefile for french administratives boundaries, provided by the IGN (the National Geographic Institute of France), available HERE. This shapefile is provided in `EPSG:2154` (Lambert-93), a projection not directly supported by TileStache. QGIS 2.2.0 was used to project it to `EPSG:4326` (WGS84), save it as a new shapefile and also export it as a JSON data file. The resulting shapefile (`departement.shp` and the associated files) and JSON data (`departement.json`) are available for download HERE. I then set up the following config file to test both approaches (file paths were modified) : For the JSON data :               "test":     {       "provider":       {         "name": "vector",         "driver": "GeoJSON",         "parameters": {"file": "/XXX/XXX/departement.json"},         "properties": ["CODE_DEPT"]       }     }      For the shapefile :               "test2":     {       "provider":       {         "name": "vector",         "driver": "shapefile",         "parameters": {"file": "/XXX/XXX/departement.shp"},         "properties": {"CODE_DEPT": "code_dept"}       }     }      **The TileStache server run smoothly with this parameters (no errors thrown in the log file)**. However, when trying to access the relevant URLs (`http://127.0.0.1/test/0/0/0.geojson` or `http://127.0.0.1/test2/0/0/0.geojson`), i get a geoJSON like this :               {"type": "FeatureCollection",           "features": [     {"geometry": {"type": "Unknown", "coordinates": null}, "type": "Feature", "properties": {"NOM_DEPT": "AIN", "CODE_DEPT": "01"}},     {"geometry": {"type": "Unknown", "coordinates": null}, "type": "Feature", "properties": {"NOM_DEPT": "AISNE", "CODE_DEPT": "02"}},      {"geometry": {"type": "Unknown", "coordinates": null}, "type": "Feature", "properties": {"NOM_DEPT": "ALLIER", "CODE_DEPT": "03"}},      ...     ...     ]}      I thought it may be related to projection problem, so **I tried to add the following parameter for the two providers, to specify the projection used** :               "projection":"WGS84"      However :   * **The unknown geometry type / the null coordinates is still there.**   * **Many features are now absent in my geoJSON** (many departements are missing when I access `http://127.0.0.1/test/0/0/0.geojson` or `http://127.0.0.1/test2/0/0/0.geojson`). I'm totally new to GIS (I didn't know about QGIS, TileStache or even tiles 2 weeks ago), so I may have missed something really obvious... Thanks !


Problem validating parent model with nested models in modelbuilder

I have a parent model with several nested models. I'm having trouble getting the parent model to validate. The issue is with sub model 4. The two screenshots are of the parent model and sub model 4. The output from sub model 3 feeds into parameter “Merged_BBK_Assets” in sub model 4. There are no other input model parameters in sub model 4. If I run the first three sub models then open, validate and run sub model 4 from within its model window, it runs fine. The Merged_BBK_Assets is created in sub model 3 and does not exist till then.   ![Sub Model 4](http://i.stack.imgur.com/Thvth.png) ![Parent](http://i.stack.imgur.com/XavLt.png)


problem transforming pgr route to a line - unexpected extra lines from St_MakeLine

I have created a line geometry from a pgr_dijkstra querry and I am getting an unexpected looking line in qgis. The following image illustrates the problem: ![enter image description here](http://i.stack.imgur.com/yFc70.png) The magenta line is the line created from mapping the route from my table where I have created a line geometry using the following code:               update analysis.routing     set     routeline = (select st_makeline(pgr.geom) ,     from (select * from pgr_dijkstra('ways',61789,64493)) as pgr)      The dotted red line is the line created in qgis from calling the same select statement in the DB manager and adding the results to canvas:               select * from pgr_dijkstra('ways',61798,64493)      Does anyone have any recommendations on how to fix this problem with ST_MakeLine. That is what appears to be the problem. It looks like ST_MakeLine is connecting additional points which is adding the additional lines above that are not part of the pgr network. Thanks for your help.


Finding normal vector to DEM

I have a DEM grid (Surfer, or whatever format) and an x,y position on that grid. I also have a series of depths from the surface. I need to calculate, for each depth, the x,y,z of the projected point, normal to the DEM. The application is the display of a new type of geophysical dataset where the energy returns are normal to the surface. The dataset has 256 depths for each x,y position, and there are thousands of x,y positions. Hoping that there's a simply way to do this? Thanks :)


How do I convert coordinates to raster (bsq, bil) lookup?

I have a .bil file, which has `interleave = bsq` in the hdr file. I'm having trouble finding any insight into how I would essentially do a lookup on the file. I have no problem reading a specific chunk of bytes randomly from the file, but am unsure of how I would go about converting a lat/lon pair to a specific offset within the file. I've only seen solutions in R, but ideally I'd like to be able to do this in python or javascript, using proj4 or something to that effect. Any advice?


How to query DEM elevation values in a web application based on cursor/click point location?

I work for a city government that has LiDAR derived DEM rasters which we would like to make accessible to other departments in the city. The problem is that many departments don't have anyone with GIS skills and/or licenses. We are looking to develop a simple, easy to use application that will just return elevation values from the DEM based on cursor click/point location. We would like to do this without having to serve out the high resolution DEM dataset for speed and ease of use of the application. We currently have GeoPDFs that can return elevation data as long as users have the TerraGo toolbar installed. This is expensive and extremely cost- prohibitive so we are looking for a cheap option that can be used by employees and the public alike. We are just looking to query based on XY location of a point which will return the elevation value based off of the DEM. Has anyone done this or have advice on the best way to proceed? We do have access to Google Maps Engine (the Elevation API is SRTM so resolution isn't good enough for our purposes), as well as ArcGIS Online. Also worth mention: We are currently running Oracle Spatial but are transferring to SQL Server 2012 with ESRI's LGIM for our spatial data(geodatabases and feature classes).


Why are legends absent from ArcGIS Online map service?

With reference to an older thread I posted, (How to use map service legend on ArcGIS Online?) We have installed a security certificate for our host machine, but the absence of a legend using the AGOL templates persists. As an example, this is a **public map** we have created. Aside from the gray canvas basemap, it uses a map service hosted in our machine for " **road classification** ": What would be the rationale behind this legend issue and what can be done?


Which are the most useful NMEA sentences for location based services

I am pretty new to GIS, I have been learning about all the different NMEA sentences from this website http://aprs.gids.nl/nmea/#allgp What is $GPGSV and $GPGSA and why are they useful to location based services system?


No clue of the Georeferencing tool in gvSIG

I have kept trying to locate the georeferencer in gvSIG but I could not find it. Some tutorials say it is under Tools from the main menu! I installed several versions of gvSIG, both on Windows and Linux but the georeferencer does not appear anywhere. I also tried to install a georeferencing plugin from `http://downloads.gvsig.org/download/gvsig- desktop/pool/org.gvsig.georeferencing/` but after I installed it, the gvSIG won't start. Any idea?


Conversion From Transverse Mercator To Longitude & Lattitude

I have to transform (7-parameters datum transformation) coordinates from northings & eastings to lattitude & longitude. Following are details of source coordinate system(i.e. northings & eastings one) :               1) Projection Details:       1.1)Projection Name      1.2)Origin Lat/Lon      1.3)Origin North/East      1.4)Scaling Factor     2)Datum Name: AGD84     3)7-parameter Datum Details:      3.1)Rotn X:0.292      3.2)Rotn Y:-0.443      3.3)Rotn Z:-0.277      3.4) Trans X:117.763      3.5) Trans Y:-51.51      3.6)Trans Z:139.061      3.7)Scaling Factor:-0.03939657799319541      Please note that I am using `"Proj4Js"` for the above mentioned transformation for which following is the "defs" settings:               ***Proj4js.defs["<EPSG-CODE>"] = "+proj=<someProjectionImplementation>       +towgs84=-117.763,-51.51,139.061,0.292,-0.443,-0.277,-0.03939657799319541 +no_defs";***      Could anyone confirm that is there any issue in this setting? Thanks, Gajendra


Mapnik style editor

Is there any tool or editor which can shorten the cycle for experimenting on different styles for mapnik. It would be wonderful with something like cloudmade's editor, but with the possibility to download the result as xml or cascadenik. What i want is:   * Short iteration time (ie. few steps and fast generation time for newly changed style) preferably live edit   * Tool which gives help to generate the styles (both graphical tools and word completion would be great alternatives. Any ideas?


show message if map service unavailable

If any of my ESRI REST map services are down I want to be able to tell the user, at minimum with an alert or message. I thought I could use onLayerAddResult(layer, error) but it doesn't seem to be getting called if the layer based on a stopped/down service is added to the map, only when a layer is successfully added. I see some examples using esri.request but it doesn't seem like I should have to do an extra call to the service since in the Firebug console I see these calls like this to each service: > http: > //myserver/ArcGIS/rest/services/Streets/Mask/MapServer?f=json&dpi=96&transparent=true&format=png8&layers=show%3A-1&callback=dojo.io.script.jsonp_dojoIoScript2._jsonpCallback With a response of either: > *dojo.io.script.jsonp_dojoIoScript2._jsonpCallback({"serviceDescription" : > null,"mapName":"Layers","description":"","copyrightText":"","layers":[{"id":0,"name":"LMBCO_Mask","parentLayerId":-1,"defaultVisibility":true,"subLayerIds":null}],"tables":[],"spatialReference":{"wkid":2263},"singleFusedMapCache":false,"initialExtent":{"xmin":806353.163236593,"ymin":139639.306949227,"xmax":1165380.94101437,"ymax":327833.751393672,"spatialReference":{"wkid":2263}},"fullExtent":{"xmin":824755.941014371,"ymin":38597.6402825604,"xmax":1146978.16323659,"ymax":323319.862504783,"spatialReference":{"wkid":2263}},"units":"esriFeet","supportedImageFormatTypes":"PNG32,PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,BMP","documentInfo":{"Title":"","Author":"","Comments":"","Subject":"","Category":"","Keywords":"","AntialiasingMode":"Normal","TextAntialiasingMode":"Force"},"capabilities":"Map,Query,Data"});* if the service is up and running, or: > > *dojo.io.script.jsonp_dojoIoScript2._jsonpCallback({"error":{"code":400,"message":"Unable > to complete operation.","details":["Service 'NYCStreets/LMBCO_Mask' of type > 'MapServer' does not exist or is inaccessible."]}});* if the service is not available. Is there a way to handle this reponse that is already coming back? Thanks for your help! Chad Wilcomb


OSM_id missing from ways table created by Osm2pgrouting

GIS newbie here so excuse my ignorance if this has a simple answer. I have been playing about with pgRouting and using Osm2pgrouting to load OSM files from Geofabrik. However I just noticed that the OSM_id isnt being created by Osm2pgrouting. I'm trying to exclude some roads in pgRouting that are tagged "motors=no" in OSM but cant because I cant match them without the osm_id field?


What is the best colour-ramp to use for elevation?

This is maybe rather subjective as it concerns style, but I would like to have a few decent colour ramps for my DEM when it is layed over my hill-shading. I have created the Swiss hillshade model as shown here, but I'm not too convinced that the colour scheme is good. Any examples or screenshots would be great.


Adding a delimited text layer in QGIS 1.8 only imports a fraction of the total rows

I am trying to add a delimited text layer, and I think I've formatted it correctly as a CSV file. There are no errors when I import the data. But even though there are 1300 rows total, only 189 appear in the table when I right click on the layer and open the attribute table. Is there any reason why it would import so few rows? Thanks!


how to create a network from gps tracks?

I'm trying to build a network from several GPS-trakcs, to digitalize hiking routes on my land. I have several GPX-files from routes I've tracked with the gps. I managed to display them in Arcmap 10.2 and also create lines between the points. But my knowledge/skills kind of fall a bit short from here on. so can somebody give me an easy step-by-step how to create a network from gps- tracks? one of my problems so far is this: several of the routes have some line segments overlapping, how do i make the overlapping segments in to one(preferably the averaged/middle one) and create a junction where they split? see picture "Q1"![black red and green symbolizes three different track logs](http://i.stack.imgur.com/61KRI.png) **My second challenge is this:** I want to add an attribute with information about average speed between my gps point, this is a simple operation but since there is a lot of gps points i need to be able to do it fairly automatic. So far what I've tried is "points to line" to get a line, then i used "split line at vertices" to get separate line segments between each gps point. Then I tried to join tables, between the line segments and gps-points, so that the line segments would have time information on its start and end, then it would be easy to calculate the speed for every row. So i tried using "spatial join", the problem here is that it creates separate rows for the join of "line segement and its start point" and the "line segement and its end point" see table: ![enter image description here](http://i.stack.imgur.com/zjDuB.png) marked in yellow is one line segment and its join to two gps points(see Shape Length is the same and DateTime is different) My goal is as mentioned to find the average speed the used on this line segment. If my approach to the problem is totally off I'm open to try other methods!


ModelBuilder: How to extract data by date, export to separate tables and interpolate tables to rasters

I've been using ArcGIS for a couple years, but when it comes to model builder I've only worked with very simple models. I'm hoping someone that is much smarter than myself can help me in building a complicated model. I've got a very large table of data (about 300k rows) that contains points with lat/lon data, wind speed and date/time. There are about 60 different points with wind values that have been recorded for each hour during 2012. What I'd like to do is build a model that will:   1. Iterate through each row and select/export the data associated with first hour (00Z) Jan 1st 2012 (about 60 rows) to a separate table, then the 2nd hour (01Z) of Jan 1st 2012 to its own separate table and so on through all of 2012.    2. Perform Inverse Distance Weighting on all of the hourly tables with lat/lon and wind values that were created from step 1 above   3. Reclassify the rasters so that points in the raster that have wind values of 5 or greater are reclassified to "1" and all other cell's wind values are reclassified to "0"   4. Then iterate through the rasters created in step 3 and use something like "Collect Values" & "Cell Statistics" to sum up all of the rasters into a final summed raster for all hours in 2012. Was going to include screenshot of my data, but I guess since this is my first post I'm not trusted yet. I've broken the date down several different ways (just date, just time, date-time, and date-time in text format) because I've had issues trying to iterate through and select the data in my original, very large table only by date. Hopefully I provided enough information, but if not I will try to go into more detail. Thanks in advance for any assistance.


Conversion from Shapefile to TopoJSON format results in incorrect map when rendered using d3js

I am trying to build a map of Canada showing FSA boundaries using d3js. I got shape data from Statistics Canada [http://www12.statcan.gc.ca/census- recensement/2011/geo/bound-limit/bound-limit-2011-eng.cfm]. To convert the SHP file to topojson, I am following the process from Mike Bostock's Tutorial 'Lets Build a Map' [http://bost.ocks.org/mike/map/]. First convert the map to GeoJSON using ogr2ogr, then using topojson in Node.js, convert the GeoJSON file to a TopoJSON file. I am executing the commands:               > ogr2ogr -f "GeoJSON" -s_srs EPSG:21781 -t_srs EPSG:4326 output.geojson input.shp      Followed by the command:                > topojson --id-property CFSAUID -p name=PRNAME -p name -o output.topojson output.geojson      The resulting map that is generated renders some provinces properly, however, the following provinces show up as jumbled lines.   * Ontario   * Newfoundland    * Quebec    * Manitoba    * Saskatchewan    * Alberta    * British Columbia Here is a basic version of my d3 call.               var g = svg.append("g").attr("id", "fsa");     d3.json("can/output.json", function (error, json) {         var counter = 0;         var subunits = topojson.object(json, data);         g.selectAll("path")         .data(subunits.output)         .enter()         .append("path")         .attr("d", path)             });      This is what the map looks like: https://www.dropbox.com/s/k776hg2doynurxi/canada.png


Getting: org.opengis.referencing.NoSuchIdentifierException: No transform for classification "Transverse Mercator Zoned Grid System" with geotools

Using geotools I've been trying to create a referenced envelope after converting/reprojecting from WGS 84 to UTM with specific zones and it seems that either I need to do something with authority factories or figure out some kind of a workaround for this. Here are the errors:               Exception in thread "main" org.opengis.referencing.NoSuchIdentifierException: No transform for classification "Transverse Mercator Zoned Grid System".     at org.geotools.referencing.operation.DefaultMathTransformFactory.getProvider(DefaultMathTransformFactory.java:290)     at org.geotools.referencing.operation.DefaultMathTransformFactory.getDefaultParameters(DefaultMathTransformFactory.java:316)     at org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateOperation(DirectEpsgFactory.java:2610)     at org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateOperation(BufferedAuthorityFactory.java:1041)     at org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateReferenceSystem(DirectEpsgFactory.java:1955)     at org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateReferenceSystem(BufferedAuthorityFactory.java:783)     at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:801)     at org.geotools.referencing.factory.FallbackAuthorityFactory.createCoordinateReferenceSystem(FallbackAuthorityFactory.java:640)     at org.geotools.referencing.factory.FallbackAuthorityFactory.createCoordinateReferenceSystem(FallbackAuthorityFactory.java:644)     at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:801)     at org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:731)     at org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179)     at org.geotools.referencing.CRS.decode(CRS.java:489)     at org.geotools.referencing.CRS.decode(CRS.java:417)      Here is the block of code that caused the error, it is related to trying to use CRS.decode():                   MathTransform mathTransform = CRS.findMathTransform(aoi.getCoordinateReferenceSystem(), CRS.decode("EPSG:" + epsg));         DirectPosition2D srcDirectPosition2D = new DirectPosition2D(aoi.getCoordinateReferenceSystem(), aoi.getMinX(), aoi.getMinY());         DirectPosition2D destDirectPosition2D = new DirectPosition2D();         mathTransform.transform(srcDirectPosition2D, destDirectPosition2D);         DirectPosition2D srcMaxDirectPosition2D = new DirectPosition2D(aoi.getCoordinateReferenceSystem(), aoi.getMaxX(), aoi.getMaxY());         DirectPosition2D destMaxDirectPosition2D = new DirectPosition2D();         mathTransform.transform(srcMaxDirectPosition2D, destMaxDirectPosition2D);      This is what I got when I printed out the coordinate reference system:               PROJCS["WGS 84 / UTM zone 18N",      GEOGCS["WGS 84",      DATUM["World Geodetic System 1984",        SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],        AUTHORITY["EPSG","6326"]],      PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],      UNIT["degree", 0.017453292519943295],      AXIS["Geodetic latitude", NORTH],      AXIS["Geodetic longitude", EAST],      AUTHORITY["EPSG","4326"]],      PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]],      PARAMETER["central_meridian", -75.0],      PARAMETER["latitude_of_origin", 0.0],      PARAMETER["scale_factor", 0.9996],      PARAMETER["false_easting", 500000.0],      PARAMETER["false_northing", 0.0],      UNIT["m", 1.0],      AXIS["Easting", EAST],      AXIS["Northing", NORTH],      AUTHORITY["EPSG","32618"]]      Apparently I may need to set a comparison tolerance when I use CRS related functions, but I'm not sure how to go about doing that. http://docs.geotools.org/latest/javadocs/org/geotools/referencing/CRS.html


Unable to cast COM object (IMapServer --> IMapServerObjects)

I have just deployed an AGS-based application to our web server. This app worked great in development, but after deployment to the server I get the following errror: `Unable to cast COM object of type 'System.__ComObject' to interface type 'ESRI.ArcGIS.Carto.IMapServerObjects'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{651521F3-AAFF-42B9-8C2D-1980625A13BF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).` The C# code generating this error is:               IServerContext context = som.CreateServerContext(ConfigurationManager.AppSettings["mapService"], "MapServer");     IMapServer mapServer = (IMapServer)context.ServerObject;     IMapServerObjects serverObjects = (IMapServerObjects)mapServer;      For some reason, the `IMapServer` instance cannot be casted to `IMapServerObjects`. What could be wrong?


Which interpolation method for noise mapping?

I want to create a noise map with measured point data. But i want to have a planar representation, so I need an interpolation method. Which one is the 'best' one for measured noise data? I prefer to 'IDW' interpolation, but I´m not sure about that. Any ideas? thanks in advance!


Main OpenStreetMap-based sites?

I don't like the way the standard OSM maps look (too much details), and would like to check if some OSM-based services are better than Google Maps. "List of OSM based Services" doesn't list them by popularity. What are the main sites that use OSM maps for general purposes (ie. alternative to GoogleMaps)? Thank you.


arcpy update cursor: can't connect to a database table

I am using updateCursor to retrieve some rows from a non spatial table using a connection of type "Spatial Database Connection" (That creates a .sde file) from ArcCatalog. However, it doesn't work, I have the following error: > (RuntimeError('ERROR 000972: Table must have Object IDs in order to be > sorted.',))) Even if my table is not spatial (there is no objectid field). Also, when I try to connect to another non spatial table from another database, It works and I can retrieve the rows. Does anyone have a solution please? D.M


Third party base layer other than Google map

Can we use third party base map (images tiles) for displaying vector data?, like we use google map as base layer for displaying vector data in OpenLayers application.


What's the Semantic Web got to do with GIS?

A few years ago there was a lot of discussion about the Semantic Web. Are any of the concepts underlying the Semantic Web coming into fruition with respect to GIS? Or is it just another hippie dream? > I have a dream for the Web [in which computers] become capable of analyzing > all the data on the Web – the content, links, and transactions between > people and computers. A ‘Semantic Web’, which should make this possible, has > yet to emerge, but when it does, the day-to-day mechanisms of trade, > bureaucracy and our daily lives will be handled by machines talking to > machines. The ‘intelligent agents’ people have touted for ages will finally > materialize. \- Tim Berners-Lee Sounds like Tim may have been fishing the same streams as Richard Brautigan, whose poem published in 1963, All Watched Over by Machines of Loving Grace has everything but the cloud:               I'd like to think (and     the soner the better!)     of a cybernetic meadow     where mammals and computers     live together in mutually     programming harmony     like pure water     touching clear sky.


Where can i find oceanic borders defined as a set of lat/long points?

I'm trying to write some code that, given a latitude and longitude, will report which ocean (if any) this point is in. Is there a public resource available that defines the borders of the oceans as a set of lat/long points that I can download?


How to get easting & northing of cell in raster using ArcPy?

It might be very simple task. But I would appreciate if someone can comment on How I can get easting and northing of a single cell raster using arcpy as this value is used for in further steps. Thanks!


How to make sure OnSketchFinished always works?

In my VBA application i have a listener setup that listens for OnSketchFinished, when the polygon is created a messagebox appears and then a userform. My problem is that the listener will work 90% of the time, not 100%. Here are the snippets of code in ThisDocument:               Private WithEvents EditEvents As Editor     Private m_pEditor As IEditor     Public Sub SetEvents()               ' This is the listener for the Editor     Dim pID As New UID     pID = "esriEditor.Editor"     Set m_pEditor = Application.FindExtensionByCLSID(pID)     Set EditEvents = m_pEditor          End Sub               Private Function MxDocument_OpenDocument() As Boolean     Call SetEvents     End Function               Private Sub EditEvents_OnSketchFinished()         Call frmCityDev.EditEvents          End Sub      In my form I have code for EditEvents which brings up a msgbox to notify that a new polygon has been created. Am I missing something to make sure that the listener will always work? Cheers


How to correctly use cursor.execute() with PostGIS?

I do not understand how the operator works some times... Here is an example that works,               "SELECT ST_Distance(ST_GeomFromText('POINT(-3.16496271127842 55.9262620593642)'),ST_GeomFromWKB(a.geometry)),ST_AsText(ST_Centroid(a.geometry)) FROM <table> As a;"      and here ia an example that fails,I use a simple execute methos like this,               cc = conn.cursor()     a = ('POINT(-3.16496271127842 55.9262620593642)')     b = "SELECT ST_Distance(ST_GeomFromText(%s),ST_GeomFromWKB(a.geometry)),ST_AsText(ST_Centroid(a.geometry)) FROM <table> As a;"     cc.execute(b,a)      sometimes, the operator works fine and sometimes it does not. I have read documentation about the operators and how to use python with SQL but I have not found WHY it acts like this in a random kind of way. Does anyone have any hints and tips? Cheers, A


ArcGIS 10 MapControls in MS Access, can it be done?

In the past (9.3 ArcGIS) I was able to develop forms in MS Access where I could drop a MapControl on and have GIS functionality all within Access as long as ArcMap was installed on the same machine. I now have ArcGIS 10 and Office 2003 and when I start Access go to VB editor and create a form I am unable to add a MapContol, it says I do not have the appropriate license. I've had a search on the ESRI website and Help and I have not found a clear answer. Am I correct in understanding that they have changed something behind the scenes with regards to the MapControl, one cannot simply use it anymore? I've tried dropping an ESRI LicenseControl on the form and I get the same message rejecting me as I have no license to use the LicenseControl! It would be good if someone clarifies this and explain how one can embed a MapControl into a MS Access form?


QGIS FIle Read Error when opening an existing project

My computer will not open a project i have been working on for weeks! it is coming up with an error of > Project file read error: unexpected end of file at line 1 column 1 for file > C:/Users/xxxx/Documents/Nxxxx/Exxxx.qgs Is there anyway to get it back?


How to drop ArcSDE connection using Python scripting?

I want to be able to control connections to ArcSDE via python. Here is my script so far using ESRI's example.               import arcpy     from arcpy import env     env.workspace = r"SDEConnection"      fcList = arcpy.ListFeatureClasses()     print str(fcList) + "\n"     env.workspace = ""      arcpy.ClearWorkspaceCache(r"SDEConnection")     print arcpy.GetMessages() + "\n"      But this isnt working .. it crashes my Python window :(


Display Table of contents of the map in ArcMap in the online published Map/Web map application

The following is the sample layer information of the map in ArcMap 10.1: ![enter image description here](http://i.stack.imgur.com/eOYZM.jpg) How can I have the same Table of contents in the published map online or in web map application, so that user can select/unselect layer's content? Is there any feature I need to enable to have all contents appear for online user? Do I need to implement JavaScript API?Is there any sample available? Thanks


Dissolve polygons in QGIS (GEOS) with tolerance

I have a polygon vector layer representing the area inundated in a flood. The layer has been produced in a such a way that some of the areas are composed of multiple smaller touching polygons (see screenshot below, labelled "original data"). I would like to dissolve the polygons where they touch. If I use the dissolve geoprocessing tool in QGIS's fTools, which uses the GEOS library, I get some unexpected results (see "dissolve with QGIS fTools"). It seems that GEOS doesn't use a threshold in determining if polygons are touching, as mentioned in these issues: http://trac.osgeo.org/qgis/ticket/3126 http://trac.osgeo.org/qgis/ticket/3184 http://hub.qgis.org/issues/2806 The same approach in ArcGIS gives the expected result (see "dissolve with ArcGIS 10.1"). Apparently this is a "feature" of GEOS, rather than a bug. Is there any way to fix the data I have to produce the expected result? A minor loss of precision (a few cm?) could be acceptable for me. Ideally the solution would be something I could write into a QGIS plugin, as a pre-processing step. Related question (with no answers): How to set tolerance value of Geoprocessing tool in QGIS? Link to sample data as a shapefile: https://www.dropbox.com/s/c8ns7wwfv289ad0/sample.zip ![dissolve polygons](http://i.stack.imgur.com/Ayteo.png) ![v.dissolve](http://i.stack.imgur.com/AA59l.png)


Visual Studio 2010 templates for ArcGIS missing

It seems that I do not have ArcGIS templates in VS 2010 templates folder - > \Program Files (x86)\Microsoft Visual Studio > 10.0\Common7\IDE\ProjectTemplates\CSharp\ and as a result ArcGIS templates do not show up as installed templates for New Project. To get these templates will I need to reinstall VS or can I get the zipped ArcGIS templates from somewhere? Thank you, -Dee


Color matching between Google Earth and Google Maps (same KML)

I'm working on a custom Google Map using API v3. I'm creating my KML files in Google Earth, uploading to Maps and then accessing the KML from there. I'm having problems matching polygon colours to the defaults in Maps - everything looks fine in Earth, but when viewing it on google maps, the colours have shifted. **How the KML looks on Google Earth:** ![enter image description here](http://i.stack.imgur.com/ewj0g.jpg) **How the KML looks on Google Maps:** ![enter image description here](http://i.stack.imgur.com/NX3j3.jpg) You can download the KML here.   KML file. Is anyone can help me with this issue?


Fusion Tables API advanced visualizations

From the google example; i want to replace the column bar chart with a dynamic pie chart. How do i do that. What codes do I need to change?


ArcGIS 10: How to programatically project coordinates?

Let's say I have coordinates defined for SRID 4686, is there a way to programatically transform them to SRID 4682?


Is it possible to simplify orthogonal polygons with OpenCarto Java Library?

I want to know if simplification of orthogonal polygons can be done with OpenCarto Java Library. If yes, does it have any API documentation? Cheers, Sanjeewa


Why do FusionTable layers sometimes not work / slow down?

Fusion tables layers are great. I have uploaded some data and polygons of areas in Europe and most of the time they respond very fast. First thing in the morning (after prolonged inactivity I assume), the layer will sometimes take some time (about 5 minutes) before it appears. Occasionally (about once a day), even whilst I am looking at and using the map layer, it drastically slows down, or stops working all together. This lasts for roughly half an hour. Are these common and unavoidable problem of using a service I neither control nor paid for, or is there something I might have done wrong? Is anyone else experiencing issues? Thanks


How to draw Sprite on Graphics layer?

I want to draw sprite on Graphics layer like this:                           var sp:SpriteVisualElement = new SpriteVisualElement();                 sp.graphics.beginFill(0x00ff00,1);                 sp.graphics.drawRoundRect(10,10,100,100,150,150);                 sp.graphics.endFill();                 var myGraphicMarker:Graphic = new Graphic();                 myGraphicMarker.symbol.draw(sp,geom,null,map);                 graphicsLayer.add(myGraphicMarker);      It complaints at line myGraphicMarker.symbol.draw(sp,geom,null,map); about that TypeError: Error #1009: Cannot access a property or method of a null object reference. Can anyone please guide me what to pass instead of null to make this sprite drawn. Thanks


Why do we need Mapserver/Geoserver to present data from spatial database to web browser?

I was trying "How I set up GeoServer on an old machine" and By @iant I was setting up Tomcat and all. I suddenly had a question why we need Mapsever and Geoserver? Can these server pull data from database forming layer as user asks and only presenting what user has asked for from database?


How to identify Polygon within another Polygon layer

I have two polygons files. The first one has several smaller polygons within it eg.a shapefile with all US states, the other polygon file has a single polygon eg. a river basin. I am trying to get all the polygon (states) within the second polygon(river basin). Intersection tool in Arcgis10 clips the first polygon whereas I want all the intersecting polygon to maintain its original boundaries.In this way I will have the exact state boundaries. The basic idea here is to identify all the polygons intersecting another polygon layer. thanks in advance.


Where can I find a high quality real globe of a decent size without axis?

I'm trying to find a physical globe of a high map quality that _doesn't have any axis or bearings_ as the axis mounted on standard desk globes completely obscures the arctic regions. High-quality map globes seem to be available but repeated searches failed me to find a globe model of a decent size (say 12'' and up) with an Atlas quality map and _without_ axis, so that one can view the earth from any angle and the arctic regions are fully mapped and easily visible. Do you know whether/where such a product exists? * * * Edit: Magnetic globes won't do, as they are too small and the one example from an answer also obscures the polar regions through its magnets. What I'd really like is a complete sphere without any knobs or visible seams (I don't mind seams if they are well covered) that can be placed in a holder. Inflatable globes seem quite OK, but their map-quality is very low as far as I could find. Hmmm ... it seems these would go in the right direction (as far as I can trust the images): http://www.worldglobeu.com/movaglobes \-- but they only go up to 8,5'' the maps look so-so and they are insanely expensive for the size and map-quality they offer. This one seems to get the axis/seam thing halfway right, but the mapwork is more artistic that accurate: ![Blue Green Earthsphere](http://i.stack.imgur.com/n3BWM.jpg). (Note that if that globe offered an Atlas quality map it's price tag _might_ even be acceptable at 30''.)


3D roof polygon creation from polylines in ARCGIS 10.1

I am Working in arcgis 10.1,I would like to create roof polygons from lines, the lines are captured with photogrammetry technique. As per my requirement I have found tool "3D Building Generator Tool", but tool is based on VBA language. Please can anyone guide me in arcgis 10.1 to create Buildings roof polygon using with Arctoolbox or is there any alternative process. Thanks Venu


Missing lxml in QGIS 2

I made a QGIS plugin in QGIS 1.8 doing a lot of XSLT transformation and other XML handling with the library lxml. After upgrading to QGIS 2.0 this plugin does not work anymore:               "ImportError: No module named lxml.etree"      What libraries do one use to handle XML and XSLT in Python in QGIS 2.0? Would it be a mess to try and get lxml working, in regard to distributing the plugin to other computers?


How to acquire schema lock is one already exists?

I'm trying to delete a feature class from a feature dataset or to add a field to it, but I keep getting an error message (pics attached below). I have imported a geometric network I've created from one PGDB to another. However couldn't add any fields. I'm receiving the following error: ![enter image description here](http://i.stack.imgur.com/04ewc.png) Than I planned to delete the feature classes that were imported - I've received the following error: ![enter image description here](http://i.stack.imgur.com/ujWQD.png) I have the feeling that both errors are related but couldn't figure out the problem from ESRI help or from other posts in gis.stackexchange.


How can I improve the performance and start-up time of arcgis 10.x?

ArcGIS 10.0 take about 3 minutes to start. ESRI recommends doing these steps (http://support.esri.com/cn/knowledgebase/techarticles/detail/31672) but does not explain the consequences or adverse side-affects with respect to other installed applications. I have also heard from a recent ESRI Seminar that decreasing the number of installed printers on the System will also improve start-up performance. Can anyone comment. My system is Win7 64bit 4gb Ram. No Licence server.


Postgresql Trigger to insert records in my table from another one

I spent few days trying to resolve this question but it was impossible. I have two tables: Table1.               CREATE TABLE point     (       id_point integer NOT NULL DEFAULT,       layer text,       elevation numeric,       geom geometry(POINT,25830)     )      Table2.               CREATE TABLE point2     (     id_point2 integer NOT NULL DEFAULT,     layer text,     elevation numeric,     geom geometry (POINTZ, 25830)     )      In this situation I want get the values from **point.elevation,point.geom** and insert to **point2.elevation, point2.geom** each time I insert a new row in point table. Also to say I need transform the point.geom value before to insert into point2.geom like this:               geom=st_setsrid((st_makepoint(st_x(point.geom),st_y(point.geom),point.elevation)), 25830)      I tried to create this trigger but I did not get the expected result, my trigger inserted all my records from point to point2, but I need do it for each new record from point table: The function:               CREATE OR REPLACE FUNCTION function_prueba() RETURNS TRIGGER AS $$     DECLARE     BEGIN          INSERT INTO              point2(elevation,geom)             VALUES                 NEW.point.elevation,                  st_setsrid                     (                         (                                st_makepoint(st_x(NEW.point.geom),st_y(NEW.point.geom),NEW.point.elevation)                         ), 25830                     )                     FROM                              point                     ;          RETURN new;     END;     $$ language plpgsql;      The trigger:               CREATE TRIGGER trig_geotrans          AFTER INSERT ON point          FOR EACH ROW          EXECUTE PROCEDURE function_prueba();      How can I resolve this question? Thanks.


how create a dyamic layer in openlayer map

I am using geoserver, Postgis(database) and OpenLayers for map. Now I want to create a layer (WFS, WMS) dynamically. The goal is to allow the user to create any number of layers from front end without hardcoding in (map.js) file. Is it possible?


How to write script for Line of sight and Viewshed analysis in Global Mapper

I wanted to write script in Global Mapper for Line of Sight and Viewshed analysis. I tried to calculate using Viewshed and Global Mapper Tools but the issue I am facing is that analysis is user specific, meaning we have to give observer point manually. Every time it is very difficult to give observer point. I wanted to know whether there are any other methods to give multiple points or point to a .shp file as input point and DEM as input raster. I am very new to Global Mapper. I am reading about scripting in Global Mapper but I didn't understand how to use it. My thinking is to write script which will give multiple points as input (similar to batch processing) which will give me output of the viewshed of each points. Is it possible? Does anyone know about it? Thanks in Advance


Geoserver Caching does not save tiles

I want to cache a layer from Geoserver. I use Geoserver 2.5.1 on Ubuntu 13.10.   * In the `web.xml` file under `tomcat7/webapps/geoserver/WEB-INF` I added the following part: ` <context-param> <param-name>GEOWEBCACHE_CACHE_DIR</param-name> <param-value>/opt/gwc</param-value> </context-param> `   * I enabled `Enable direct integration with GeoServer WMS` under Caching defaults.    * I use the sample data `tiger:giant_polygon` where `Create a cached layer for this layer` is enabled After opening the tile preview with `EPSG:4326 /jpeg` for the layer, the folder where my tiles are supposed to be saved is still empty. Also the `DISK USED` colum shows `N/A`. ![enter image description here](http://i.stack.imgur.com/BDZbb.png) What is missing?


Keeping up to date with OSM changes in pgRouting

I'm working on a routing application using OSM and pgRouting. I'm only interested in a subset of data, mostly North America (performance was difficult for large amounts of data, so don't want to use the whole world). I want to be able to keep up with updates to OSM data, but I haven't seen any place that provides a smaller changeset then for the whole world. Is reimporting the data every time I want to update the only way?


Why does QGIS 2.4 crash at every shutdown?

I am using QGIS on two Win7, 64 bit machines for years. After upgrading to QGIS 2.4 it crashes on both machines at every shutdown with the message "Minidump...". The crashes occur independant of what I have done before or whatever project I am working on. Until now there seems to be no loss of data, but it is annoying. (I do not have installed the LecoS-plugin on either machine.) Any ideas, solutions or similar problems?


How to add a new permanent column that contains result from ST_AREA select queries

I am a total newbie here, I have a bunch of polygons in my cartodb map, and I want to create a new column called "AREA" in the table MY_TABLE that contains values from my area calculation query: select ST_Area(the_geom::geography) as area_sqm FROM My_TABLE this statement works, but the column area_sqm that contains the area vlue clears every time I clear the query, how can I have this permanently as part of my table so I can display the area value in the info table of my map?


Go to XY tool in an ArcGIS online web map and/or application

Has anybody created any language to attach to an ArcGIS online web map and/or application for a "Go to XY" tool?


postgresql export database with command or pgAdmin III

I want to export my postgresql db with pgadmin.   I search all of its GUI, I also searched the web and I don't find some sueful information.   I know how to import the db into postgresql: create a db with `template0' and then:                c:\program files\postgresql\9.3\bin> psql -h localhost -p 5432                                      -U postgres newDBname < D:\backup.sql      But I don't know how to export it. please help me to export my db.


Bootstrap and Leaflet - Grid Issue

Trying to use integrate a simple leaflet map within Bootstrap grid / column. While I am trying to follow tutorials and templates, for some reason the `<div> id="map"</div>`does not seem to be nesting within the column. The column only seems to be 1px in height. In fact, when looking at Firefox Inspector, the full extent of the map window doesn't even appear to be registering as part of the body (apologies for any dubious terminology - very much starting out and probably running before I can walk). My simple code is as follows:

Simple Mapping Page

Some witty lead in text...

Some test text

      I also apply the following CSS:               #map {     width: 100%;     position: absolute;     height: 600px;     margin:0;     padding:0;      border: 1px solid black;     border-radius: 8px;     }      While the second column appears to the right of the map, there is no padding etc.


German coordinate system from Lat/Long

I have WGS latitude and longitude for data points near Munich and I'd like to use a grid-type coordinate system, like the Ordnance Survey grids in Ireland or the UK. What coordinate system do you recommend? Does Germany have a similar national grid? Then a bigger question, for any location how does one find out what the recommended local grid is? apart from asking here of course!


WFS Layer - capabilities document contained no layers

I use Quantum GIS 1.8.0 on Windows 7 Professional, 64 bit. I have problem with WFS Layer. I tried tree WFS: 1) Download services - Parcels (Czech Republic) http://services.cuzk.cz/wfs/inspire-cp- wfs.asp?service=WFS&request=GetCapabilities 2) Geonames (Czech Republic) http://geoportal.cuzk.cz/WFS_GN/WFService.aspx?SID=27082012_03561414729376000_PM_021892838861&service=WFS&request=GetCapabilities 3) Example geoserv.weichand.de:8080/geoserver/wfs?service=WFS&request=GetCapabilities Example #3 is OK. Example #2 shows Error "The layer geoportal.cuzk.cz/WFS_GN/WFService.aspx?SID=27082012_03561414729376000_PM_021892838861&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=gmgml:GEONAMES&SRSNAME=EPSG:102067 is not a valid layer and can not be added to the map" Example #1 shows Error "capabilities document contained no layers." I don't know, where are the differences between services. Could you help me? Thanks Petr


Quantum GIS Standalone Installer Windows folder

I have a very simple question for you: what is the "Quantum GIS Standalone Installer Windows" folder? Is it, as usual, something like "c:\program files\quantum gis"? I cannot make a test (at this moment) in a Windows machine. Thank you very much.


Retrieving XY from point graphics set in WPF network (arcgis 10.0)

I have a WPF application using ArcGIS 10. In the application I can set two point by clicking on map and calculate route between them. every time I click on the map, The application creates a GraphicsLayer and a Graphic element using this code:               GraphicsLayer stopsGraphicsLayer = myMap.Layers["myStops"] as GraphicsLayer;     Graphic stop = new Graphic() [Geometry = e.MapPoint };      My question: I need to get the XY Coordinates of the points clicked on the maps. Does anybody know what elements\attributes\methods to get this information? Thanks.


Does QGIS support MT83F

Does QGIS support NAD83 Montana State Plane Zone, US Foot? I have vector data in a CSV file that I would like to display, but the coordinate system is MT83F. I don't see a matching CRS. Is there a user defined CRS that is appropriate?


How to round a column in attribute table (ArcMap)

I want to use the Field Calculator in ArcMap to round an existing column to two decimals. Currently I have a column that is 6 decimal places long and would like to simply round it down to 2 decimals. I had planned on using the Field Calculator (possibly using Python) to do this, but maybe there is an easier way? **Edit** The accepted answer is probably the easiest way to change a single field, however, here is how to do it with the field calculator for both python and VB. VB:               round([column], 2)      Python:               round(!column!, 2)


Best Resampling Method for DEM reprojection in QGis

I need to reproject a DEM (aster file) in order to have the same CRS as all my other project data - I have different SHP for the same DEM's location but they have a different CRS. Which resampling method would you recommend? I am using QGis.


Where is the Road Graph panel?

I am trying to use the Road Graph plugin within QGIS 1.8 (running under Windows 7 64-bit). When I click Vector -> Road Graph -> Settings I get the settings-panel: ![enter image description here](http://i.stack.imgur.com/oyeBK.png) But, I don't know how to enable the "working-panel", which should appear on the left side of the main window, according to the producers of the plugin (screenshot of pic #2 is taken from their site): ![enter image description here](http://i.stack.imgur.com/PqLW2.png) Any hints? What am I doing wrong / what's missing?


looping the mask in python for arcgis 10

I am working with raster data on a worldwide level with a resolution of 30 arc seconds. I need to export the data into a table format but given the high resolution you can not run the "Sample" (Spatial Analyst) command for the entire dataset at once. Therefore, I have created a mask for each country(with The Set Null command). I was trying to write a code in Python, using a loop where each time the mask will become a different zone, i.e. env.mask = zone1, then zone2 and so on. However, I suppose that within a python session one cannot keep on changing the mask using a loop. Could you kindly suggest a way loop the mask (so that I can just have one code for all the countries but my program still runs)?


QGIS Attribute Table Not Displaying Data

Using QGIS and one minute I could see the attribute table, the next minute I couldn't. Using QGIS on Linux Mint 13. I tried purge/autoclean/reinstall to get a completely new download of all dependencies and no saved config files, but the problem persists. I can't see the attribute tables for either shapefiles or SpatiaLite data (haven't tested PostGIS yet). Note, the underlying data _is_ there. I can open the DBF in LibreOffice and see the expected data, and if I click on a feature with the Identify Features tool, I do see the attributes associated with that feature. Symbolization of the data (e.g. a simple choropleth map) also works based on the underlying data. The attribute table displays all expected columns, but no rows, as if it was a newly created completely empty layer. This was a recent install on a new computer, but for the last week I have been able to add data and view attribute tables as expected. Today I set the configuration option to "Open attribute table in a dock window (QGIS restart required)" and then when I tried look at the attribute table, no data was displayed. I restarted QGIS, still the same. I then turned off the docking, no effect, restarted the computer, no effect. Completely reinstalled QGIS as indicated above, no effect. One obvious gotcha is that "Show selected only" could be checked, but that is not the case here. Has anyone run into this or know how to fix it?


Distributed versioning of geospatial data

I'm getting started on the design of a new system that would reconcile, merge, and synchronize changes made across numerous geospatial databases of common ancestry, on an ongoing basis. These databases are distributed across numerous different organizations that have an interest in eliminating duplication of effort. I read that OpenGeo is working on a project called GeoGit, which is interesting but seems very much a work in progress. Are there any other tools, projects, or research that would be worth looking into? I don't want to reinvent the wheel, but can't seem to find much out there on this topic.


Where can I get road data that includes max speed?

Does anyone know how to detect the road speed I. E. If one of our vehicles was driving on a certain road above the speed limit, we would want to know But no idea where to get this data from Any help appreciated Thanks


Any open source alternative for ESRI maps for office

I am looking for an alternative for ESRI maps for office. I know it is very good product for analyzing data within MS office environment. My requirement: -I have few stores data contains location details. -Trying to analyzing the trend on the map itself in the excel document +Statistical analysis  -Is there any tool/app in the Open office(or MS Office & going through EuroOffice tool but it looks like its paid extension)? -Researching on Google. Any help regarding this will be great thanks in advance !!!


How to show number of patches in a neighbourhood?

Given one raster file containing only one zone that indicates patches of vegetation in a city and a shape file containing neighbourhoods for the city, explain how you could create a map that shows the number of patches in each neighbourhood. Do you use topology?


How does manual Label Placement in QGIS 1.9 work?

There are a bunch of questions here related to labeling in QGIS, but it's not clear which version they are referring to, and I know this is something that has changed recently. Hopefully it makes sense to start a new question due to the new labeling functionality. I'm trying to label a road network so that every street is labelled. I have the 'auto' labeling doing a decent job, but it is not placing a label on every street. How can I (with the minimum of effort) _keep the existing auto-placed labels_ (possibly with a few tweaks/manual moves,) but then also go in and manual 'force' missing labels to appear, and position them myself and/or change font size to make them fit? The new label tools in the toolbar are not very easy to figure out, and the 'pinning' concept is lost on me. Can anyone explain the steps?


Quick Way to Finish Area of Interest GIS Data Export Requests

I would say that after custom map creation, data requests are the most frequent GIS requests I have on a daily basis. Now they don't take long, but they add up and I have much more important work to do sometimes. So I am wondering if there is a quick and easy way finish a request like this. Usually these requests involve a picture like this in my inbox: ![Area of Interest Request](http://i.stack.imgur.com/6jPLm.png) After I figure out where the heck the person is talking about I usually need to clip about 1 to 6 layers in the area of interest for them. Then I need to zip it up and send it back. Like I said, it's not hard whatsoever, but it is time consuming. I've tried using batch Clip, but it seems to take forever and takes a while to set up. I'm open to any suggestions: programming, ArcToolbox, Open-Source, ect.


Postgres SSL SYSCALL error: EOF detected with python and psycopg

Using psycopg2 package with python 2.7 I keep getting the titled error: `psycopg2.DatabaseError: SSL SYSCALL error: EOF detected` It only occurs when I add a `WHERE column LIKE ''%X%''` clause to my pgrouting query. An example:               SELECT id1 as node, cost FROM PGR_Driving_Distance(       'SELECT id, source, target, cost           FROM edge_table          WHERE cost IS NOT NULL and column LIKE ''%x%'' ',       1, 10, false, false)      Threads on the internet suggest it is an issue with SSL intuitively, but whenever I comment out the pattern matching side of things the query and connect works fine. I understand this may not be the best 'Stack' for this query given that it is not really GIS orientated so just let me know if I should migrate it to where it best fits.


VB ArcGIS 9.3 Field Calculator

I'm trying to join one column into another. one is "acct id" and the other is "taxid number". Acct is from one county whereas the tax is from another, so there are blanks in the number of parcels/rows. I did it before last week and I had it written down how to do this. What I need to do is move 'acct id' into the 'taxid' column. I remember having " " as part of the vb script. What are the steps involved as I keep getting a blank field when I attempt it. Thank You, Z


Querying data linked to a postGIS database

My project is coming along nicely! A brief background on my project. I have a world map that is colored to show the country of origin of the students at a college. Each color represents the number students (a range). E.g. any country colored red has 1 to 20 students at the college. When you click on a country, I was successful in displaying data specific to that country in a pop-up. Hopefully I can describe what I want to do next.... I want to add the ability to query the map such that the countries that satisfy the query will be highlighted on the map.   So for example, in my html form I enter > 300... click on submit.... England, India and USA are highlighted. I've figured out that I need to use WFS getFeature but as you can see it's the how that I need help with... Can anyone direct me to an example of the above or give me some suggestions, I would be most appreciative. I am using MapSever, PostGIS and Openlayers Chris


Can GeoNetwork store metadata for a PostGIS table?

Can GeoNetwork be used to store Metadata for a PostGIS table? Or is it only for WMS/WFS services? If it can be used to create a store metadata for a PostGIS table, how is it done? I can't seem to find this in the GeoNetwork documentation. Thanks. DBlack


Write to FGDB in C++ code?

Anyone know the correct syntax for this? I'm a C++ beginner but experienced in GIS.. I'm guessing ofstream won't do it and am not sure what else to try. Never written to any sort of database in C++.


Converting/clipping KML to shapefile in QGIS without truncating field information (data)?

While I am clipping KML file by using polygon shapefile in QGIS, filed information (data) are truncating .Anybody can suggest a solution for this one.The same data losing issue occurring, at the time of KML to shape file conversion also


QGIS, CRS's and metric measurements of distance matrix and nearest neighbour

I have thousands of points on a multiple layers and I need to get the distances between each point and every other point within a layer (so i can get min, max, mean and median distances) and the nearest neighbour values. I have used the distance matrix to achieve distances between each point, and the nearest neighbour tool to get the nearest neighbour value. It all seemed to be working fine until I realised that the distance values are wrong. I assumed they were in km as the measuring tool displayed the distances of known distances correctly. However, when running it through the distance matrix and nearest neighbour, the values are massively different. In a similar vein to this question: Distance Matrix tool in QGIS. How to get result in metric?   * **Example:**   * **Point 1 to Point 2** is 1.12km in reality   * **Manual measuring tool on QGIS** says 1.12km   * **Distance matrix** says 0.010682   * **Nearest neighbour mean observed distance** says 0.010682 I have tried changing CRS and reprojecting and saving as a new shapefile, but it still doesn't work. I can get the measuring tool to display the correct measurements but as soon as i run it through the distance matrix or the nearest neighbour i get the same wrong values no matter what the CRS is. I thought it might be in degrees, but how do I then convert it to km's so when I am writing up my results I can say that 'the mean value was Xkm' rather than some obscure number which doesn't readily mean anything to anyone? Can anyone offer any advice? Is there a projection I should be using (my points are plotted from long/lat)? Is there a setting I need to change for the plugins? Is there another tool which will do this for larger numbers of points? Is there a formula I can use to change all the 'wrong' values (possibly degrees) into m/km's? I don't know python, but is there a clever bit of code I can use to do this? I'm lost and this is driving me insane! Help gratefully appreciated! **UPDATE** This worked for a while, but now it's reverted again. I managed to batch execute the reprojection, and then batch distance matrix and nearest neighbour and it seemed to work. For all except one layer. I've tried reprojecting just one file using save as manually, but it won't work. I've installed it on a second computer and tried it won't work. I went back to the original data, imported it into QGIS from csv, straight into ESPG:27700 with the project set to ESPG:27700 and it's still measuring in degrees. It's not the coord's, i've checked and know what the measurements should be. I then ran it with the second year of data ready to disregard one bad file, and it is refusing to work. I really don't understand the problem. It says it's reprojected the file, but it isn't, or it is but something is making QGIS continue to measure in degrees. I didn't changed any settings from the set which worked, to the set which didn't. Is this a glitch in the program? Is there another free GIS program that can do distance matrix and nearest neighbour which might save me this continuous circling? **UPDATE2** I have just taken an original unsplit file and reprojected the entire year as one file. I saved and then split it by date, before using distance matrix. It is still running and outputting files and this is likely to take some time but the first couple of outputs so far appear to be in metres. I believe the problems I am experiencing are related to a bug. I will try to report it as such, but for anyone experiencing similar problems all I can suggest is that you disregard any files which aren't working and start right from the very beginning with the data, reprojecting before any other analysis as it seems something lodges itself in the file and stops it working properly when you try to run distance related analysis at some point.


Reduce shapefile to outline

I have a shapefile consisting of 10 contiguous polygons. I want to reduce this to a single polygon encompassing the entire area of the existing 10. I don't need to retain data. I've googled but without the proper terminology I get pointed to Merge and Clip functions which I don't think are what I am looking for.


Pull Data from Specific Excel Cell into ArcPy

I am new to Python and ArcPy, and wish to create a short script that pulls in a value from one specific Excel worksheet cell (namely, A2) and then performs an 'if' statement, whereby if the value of A2 is greater than 1, then a certain text string is returned, but if it is less than or equal to 1, then a different text string is returned. So far, my code looks like this:               import arcpy     from arcpy import env     arcpy.env.workspace = r"C:\MMO_Model_Test\testdata.xlsx"     inputData = "data"      So I have defined my workspace, and set the relevant worksheet as a variable. I now need to reference the cell 'A2' as part of an 'if' statement. This is probably simple for someone who knows how, but I haven't managed to find a relevant example online. Any help is hugely appreciated.


Delete files that were used in python code

I have a code that creates some tif images in .qgis2 folder, but I want, in the end, delete these files. How do I do that? I try with os.remove but it gives me the error32, that said that the process can´t access to file because this is used by another process. Hope you help me.


selection by attributes with python

I have a problem concerning the selection by attribute with python on arcmap. I use this code:               import arcpy     from arcpy import env     arcpy.env.workspace= "E:\cities"     Mi=(r"E:\cities\rivers.shp")     rows = arcpy.SearchCursor(Mi,'"NAME" = \'Mississippi\'')     row = rows.next()     largeur = row.getValue("MILES")     arcpy.selectLayerByAttribute_management("rivers","New_SELECTION",'"MILES" >' + str(largeur))      And i got this error: > Traceback (most recent call last): File "E:\cities\scripts\Selection.py", > line 8, in > arcpy.selectLayerByAttribute_management("rivers","New_SELECTION",'"MILES" > >> ' + str(largeur)) AttributeError: 'module' object has no attribute 'selectLayerByAttribute_management' > > Échec de l’exécution de (SelectionByAttributes) Can u help me please??


Failure to Access DBMS Server Error - ArcGIS/Postgres

If connected to an SDE enabled Postgres database via ArcGIS (10.1) for a long period of time, maybe an hour +, I will often receive an error from ArcGIS stating "Failure to access the DBMS Server[my schema name.sde.GDB_items]. I can't pin down any specific event causing the error, and my fix is to simply restart ArcGIS. Disconnecting and re-connecting the database connection without an ArcGIS restart results in the same error message. Its a minor inconvenience, but one that would save myself and others daily grief if corrected. Any ideas?


How to get the width and height of a rectangular polygon in PostGIS

I have a table with point features saved in the my PostgreSQL database, and I can run the following query to get the extent of the point features and I turned the extent back into a geometry:               SELECT ST_AsText(ST_SetSRID(ST_Extent(pts.geom), 4026)) AS Extent_Geom           FROM Table_w_Point_Features pts      Here is how the output geometry of a rectangle polygon that represents the extent of the point features looks like:               POLYGON((-117.536012078 33.7130048820001,              -117.536012078 34.3860049530001,              -116.825011941 34.3860049530001,              -116.825011941 33.7130048820001,              -117.536012078 33.7130048820001))      And here is my question: Is there any way in PostGIS that I can get the Width and Height of the extent that I created above? Thanks a lot!


Garmin conversion track

I have problem when import garmin GPS tracks with software for Android. I found this code:               public static int importTracks(String path, Context context) throws ClassNotFoundException, IOException     {         TracksDB tracksDB = new TracksDB(context);         TrackPointsDB trackPointsDB = new TrackPointsDB(context);         tracksDB.open();         trackPointsDB.open();              File file = new File(path);         ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));              int count = 0;              try         {             Track track;             while ((track = (Track) in.readObject()) != null)             {                 long id = tracksDB.insert(track.getName());                      ArrayList<TrackPoint> points = track.getTrackPoints();                 for (TrackPoint point : points)                 {                     trackPointsDB.insert(id, point.getLongitude(), point.getLatitude(), point.getAltitude(), point.getAccuracy(),                             Long.toString(point.getTime()));                 }                      count++;             }         }         catch (EOFException eof)         {              }              // !// finally?         in.close();         tracksDB.close();         trackPointsDB.close();              return count;     }      Can someone help me?


Problems converting csv to shp in QGIS 2.01 on a Mac

When converting a csv to shp, I have been using the 'Add delimited text layer', and get one of two errors. With 'First record has field names' clicked, I am told that there is 'no data found in file'.   With 'First record has field names' unclicked, I am able to save the file, but get errors that there are 'invalid X or Y fields at line 1.' If I drag in the csv, and do 'Layer' 'Save as''shapefile', it will create a .dbf, .prj, and .qpj, but no .shp. Any help?


Cannot Save Edits to File Geodatabase Replica in QGIS 2.2

When trying to edit a File Geodatabase Replica in QGIS 2.2, everything works as expected until the user saves their edits. When pressing save, all edits revert back to their original state with no errors. If I copy the Feature Class into a new FGDB (thus breaking it out of the replica), I can edit it without any problems. Anyone have any thoughts on a solution for this? FGDB Replica created in ArcGIS Desktop 10.2 from a SQL SDE Geodatabase.


Update multiple features attributes in loop - JavaScript

I am trying to update multiple features in a feature layer through a loop. I have a feature layer that I would like to select and then assign someone to the features (through an attribute update. I can select the features and see all of the attributes but I can't figure out how to update the the features. See below for a sample of what I am trying to do. Right now it is a bit messy where I am trying to set the visibility of a form and button on after the selection so the user can choose an assignment. Has anyone updated multiple features without using the attribute inspector or editor widget which I have only seen examples for editing a feature at a time.                var map, geocoder, currentBaseMap, assignWindow, featureLayer;      var locatorUrl ="http://gisaprd/ArcGIS/rest/services/SDE.AddressLocator_Comp/GeocodeServer";      var selectedPoints = new Array();          require([     "esri/InfoTemplate",     "esri/map",     "esri/layers/FeatureLayer",     "esri/layers/ArcGISTiledMapServiceLayer",     "esri/layers/ArcGISDynamicMapServiceLayer",     "esri/dijit/Geocoder",     "esri/symbols/SimpleFillSymbol",     "esri/symbols/SimpleLineSymbol",     "esri/tasks/query",     "esri/toolbars/draw",     "dojo/dom",     "dojo/on",     "dojo/parser",     "dojo/_base/array",     "dojo/_base/Color",     "dijit/form/Button",     "dojo/domReady!"      ],      function (      InfoTemplate, Map, FeatureLayer, ArcGISTiledMapServiceLayer, ArcGISDynamicMapServiceLayer,         Geocoder, SimpleFillSymbol, SimpleLineSymbol,     Query, Draw, dom, on, parser, arrayUtil, Color      ) {            parser.parse();            var selectionToolbar, featureLayer;            // Create the map       map = new Map("map")            aerialsLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://gisaprd/ArcGIS/rest/services/Aerials_4inch_12inch_Cached/MapServer", { "id": "Aerials", "visible": false });       map.addLayer(aerialsLayer);            streetsLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisaprd/ArcGIS/rest/services/SRSLandbase/MapServer", { "id": "Streets" });       map.addLayer(streetsLayer);       currentBaseMap = "Streets";            map.on("load", initSelectToolbar);            document.getElementById("AssignFrm").style.visibility = "hidden";       document.getElementById("AssignBTN").style.visibility = "hidden";            highlightSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255, 255, 0]));            var content = "Address: ${SDE.GasServiceLocation.LOCATIONDESCRIPTION}";       var infoTemplate = new InfoTemplate("${SDE.GasServiceLocation.CU_ID}", content);            featureLayer = new FeatureLayer("http://gisadev:6080/arcgis/rest/services/ISS_Inspections/FeatureServer/0",         {             mode: FeatureLayer.MODE_ONDEMAND,             infoTemplate: infoTemplate,             outFields: ["*"]         });            featureLayer.setSelectionSymbol(highlightSymbol);       featureLayer.on("selection-complete", createListForAssignment);       //featureLayer.on("selection-clear", function () {       //    dom.byId('messages').innerHTML = "No Selected Fields";       //});       map.addLayer(featureLayer);            var myGeocoders = [{           url: locatorUrl,           name: "SDE.AddressLocator_Comp"       }];       geocoder = new Geocoder({           map: map,           autoComplete: true,           arcgisGeocoder: false,           geocoders: myGeocoders,           value: "",           zoomScale: 1200            }, "search");       geocoder.startup();            on(dom.byId("selectFieldsButton"), "click", function () {           selectionToolbar.activate(Draw.EXTENT);       });       on(dom.byId("clearSelectionButton"), "click", function () {           featureLayer.clearSelection();       });       on(dom.byId("BaseMapToggle"), "click", ChangeBaseMap);       //on(dom.byId("assignCrew"), "click", AssignInspectionCrew);            function initSelectToolbar(event) {           selectionToolbar = new Draw(event.map);           var selectQuery = new Query();                on(selectionToolbar, "DrawEnd", function (geometry) {               selectionToolbar.deactivate();               selectQuery.geometry = geometry;               featureLayer.selectFeatures(selectQuery,                 FeatureLayer.SELECTION_NEW);                    });       }       function ChangeBaseMap() {           if (currentBaseMap == "Streets") {               currentBaseMap = "Aerials";                    aerialsLayer.setVisibility(true);           }           else if (currentBaseMap == "Aerials") {               currentBaseMap = "Streets";               aerialsLayer.setVisibility(false);           }       }       function createListForAssignment(event) {           document.getElementById("AssignFrm").style.visibility = "visible";           document.getElementById("AssignBTN").style.visibility = "visible";                arrayUtil.forEach(event.features, function (feature, index) {               selectedPoints.push(feature);           });        }       });       function assign() {       if (document.getElementById('Jordan').checked) {         x = document.getElementById('Jordan').value;         for (var i = 0; i < selectedPoints.length; i++) {             selectedPoints[i].attributes.ASSIGNED_TO = x;         }       }       else {         y = document.getElementById('Trenton').value;         alert(y);       }       }


Extracting z values from shapefile using OGR Api

Is there an example of how we can extract the z value from a shp file given the x,y coordinate value (namely utm) using gdal/ogr c++ lib? alternatively, would it be easier if we convert the shp file into raster layer format and read off value from there? Woukd it be easier? Is there some examples of how this could be done? Thanks


Map accuracy assessment by moving window in R

I would like to make an **accuracy assessment** using a confusion matrix between classified Landsat image and reference dataset. Maps have the same resolution and extent. I would like to evaluate the agreement by **pixel-by- pixel**. In many studies I have found that they used **moving-kernel window** (ideal 3x3) to "deal" with the Landsat pixels misregistration. However I couldnt find any approach to do use this moving window for confusion matrix evaluation in R, normally it is used to values interpolation. Do you have any ideas how to **implement moving window into classification accuracy assessment**? Or am I misunderstanding this approach? Thanks a lot, Example:               library("raster")     clas <- raster(ncols=5, nrows=5)     values(clas)<-c(2,1,0,0,1,              2,1,0,0,0,              1,0,0,0,0,              0,0,0,0,0,              2,1,0,0,2)     reference <- raster(ncols=5, nrows=5)     values(reference)<-c(2,1,0,0,0,              2,1,0,0,1,              0,0,0,0,0,              1,2,0,0,2,              0,0,0,0,0)      EDIT: After utilisation of movingFun (raster) I think this is mostly to get information in one cell taking into consideration the cells around. so if I have a               ref<-c(0,0,0,0,1,0,0,0,0)     class<-c(0,0,0,0,1,1,1,0,1)      and I apply movingFun               mov_ref<-movingFun(ref, n=3)     mov_clas<-movingFun(class, n=3)      I will obtain               mov_ref     NA, 0.0000000 0.0000000 0.3333333 0.3333333 0.3333333 0.0000000     0.0000000        NA          mov_clas     NA 0.0000000 0.0000000 0.3333333 0.6666667 1.0000000 0.6666667     0.6666667        NA      For **accuracy assessment needs** could I directly compare mov_ref and mov_class? Or do I have maybe to reclass it into 0,1 (by threshold 0.5) to compare them? If I leave the numbers as 0.3333 I dont reach a good result in classification accuracy. Thanks for your help.


OpenLayers vector feature not being highlighted

I'm trying to highlight a clicked area of a layer using a vector:               var highlightLayer = new OpenLayers.Layer.Vector("Highlighted Features", {         displayInLayerSwitcher: false,         styleMap: mystyle     });     // the layer is added to the map, GetFeatureInfo controls setup and added etc.      ...and this is the callback for the GetFeatureInfo call:               function showInfo(event) {         console.log( event );         highlightLayer.addFeatures( event.features[0] );         highlightLayer.redraw(); // i've tried without this too         console.log( highlightLayer );     }      No highlighting happens though. The object (event) passed to the callback looks alright, it has a features property containing an array with one vector feature element. But while inspecting the highlightLayer vector object printed to the console in the callback, I noticed that the returned vector feature object has been added to the `unrenderedfeatures` property. OpenLayers obviously could not render the feature, but I don't understand the reason. There doesn't seem to be a callback for detecting problems with rendering. How could I debug this further? I should also mention that the `bounds` property of the geometry object is a valid `OpenLayers.Bounds` object with values. **Edit** :   I dug into the OpenLayers source and added some debug logging. It turns out that the redrawFeature function belonging to the renderer is returning false, resulting in the feature to be added to the unrenderedfeatures property of the vector layer. The reason it's returning false is because of this:               var bounds = feature.geometry.getBounds();     var worldBounds;     if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {         worldBounds = this.map.getMaxExtent();     }     var intersects = bounds && bounds.intersectsBounds(this.extent, {worldBounds: worldBounds});     rendered = (style.display !== "none") && !!bounds && intersects;      The `intersects` variable is **false**. Why might that be? Could it be that some sort of conversion is needed on the bounds values returned from the GetFeatureInfo call? **Edit2:**   Here's some logging of the points that are compared in the `intersectsBounds` function: Feature / Renderer-Canvas-Extent   Bottom: 719322.39 / 7022915.0167624   Left: 689914.61 / -740991.87193189   Right: 689947.66 / -740514.14050517   Top: 719349.21 / 7023273.3153324


How to calculate Median of a table field in the Dissolve Tool of ArcGIS?

The Dissolve Tool of ArcGIS 10.0 has some statistical parameters as a type of calculation new values of each field in a process of dissolving of identical parameters . It has SUM, MAX, MIN, RANGE, STD and a bit more Statistical types , but it doesn’t have MEDIAN. It’s very strange, why it doesn’t have Median (and some others important statistical parameters). But maybe it’s possible to “turn on” calculation “Median” in the Dissolve Tool, or solve this task in some other way?


Is it possible to use two layer.bindPopup functions in Leaflet

I have two different layers in a leaflet map. I have one layer in which I would like the popup to return some text from the layer's attributes. They other layer I would like the popup to return an image which I have embedded the link to in the layers attributes. I have successfully implemented both of the layer.bindpopup functions successfully individually but I'm having no luck implementing them together.               function onPlot(feature, layer) {     if (feature.properties) {         layer.bindPopup('');     }     };     function onEachFeature(feature, layer) {     if (feature.properties) {         layer.bindPopup( '' +feature.properties.Anum +'
 Hunting District: ' +feature.properties.DISTRICT+ "
 Elk Hunter Success " +feature.properties.Success +" %");     }     };     function style (feature,layer){     if (feature.properties) {      return  {color: feature.properties.color,fillColor: feature.properties.fillColor,fillOpacity: feature.properties.fillOpacity};     }     };          var Plot= new L.geoJson(Plots, {         onPlot:onPlot         style:style     }).addTo(map);          var S_2006= new L.geoJson(Success_2006, {         onEachFeature: onEachFeature,         style:style     }).addTo(map);


qgis pdf doesn't show google street

Apologies I've created a map? using location data imported from a csv file and labelled nicely and I've added (a very inaccurate) Google Street map. When I use Print Composer to create an annotated map with title, legend etc. and then export to pdf - everything is exported except the Google Street background map. I must be doing something wrong, can some kind person lead me on the path to righteousness please?


jQuery element value to js object ID

I am trying to set the visibility of a layer in Openlayers map according to a checkbox status with a class ".layercheck" and value is the name of the Openlayers layer. So here is my HTML:               <input type="checkbox" class="layercheck" value="layer134431245">text      And here is JS:                  var layer134431245 = new OpenLayers.Layer.WMS(...);         $(".layercheck").on( "click", function() {         var layer = $(this).val();         if ($(this).is(":checked")) {             $("#"+layer).setVisibility(true);         } else {             $("#"+layer).setVisibility(false);              }        });      This function and HTML does completely nothing. It also does not give an error in the js console. So how do I make this work, and switch the layer visibility with any of the checkboxes which have the class "layercheck" and value is the layer ID? I also understand that the $("#"+layer) is not the layer, but a jQuery object which maybe does not have the properties setVisibility. So then how do I convert a value (string) into a Openlayers layer name?


transform bound for google map

i have wms layer with coming geoserver and it's bounds is                bounds = new OpenLayers.Bounds(417138.6205791628, 4243634.852681775, 486211.1950145211, 4331542.555877601).transform(WGS84, WGS84_google_mercator);      but when i use google baselayer, in the opening map it shows me full extends how can i transform my bound with harmonic google. ?


Error when using spatial query in arcgis silverlight api

I'm developing a webgis using ArcGIS Silverlight API 3.1 . I used esri interactive SDK sample for spatial query in the webgis .The problem is when i draw a freehand polygon and the polygon intersect itself (fig1), the error "Query failed: Error code '400':unable to complete operation." raised (fig2) . How can i solve the problem ? ![fig1](http://i.stack.imgur.com/toGaa.png) ![fig2](http://i.stack.imgur.com/ztqJV.png)


SST process using just GDAL and python

I am trying to process AVHRR 4km SST using a module that uses only GDAL and Python. OSGEO4W, GDAL, Python 3.4.1. I borrowed the download code from http://grasswiki.osgeo.org/wiki/AVHRR. The rest I worked on. The code is highly inefficient but it works. My concerns are: 1) Being able to adjust quality flags. I have it set for >3 but it is easy to change. 2) Filling small Nodata holes. 3) Keeping the integrity of the land mask. **I need help automating some of this such as reading the scale automatically from the .txt. Running the multiply of the SST and the NoData,1 Binary quality data in an automated manner. This code works but is piecemeal and inefficient. I would like to make it efficient** I would like to streamline and improve the process but we must stay in GDAL python. V5.0 Eight day. Make our own month with high quality flags of 4 or grater only and fill small hole via a 5 by 5 kernel. http://www.nodc.noaa.gov/SatelliteData/pathfinder4km/userguide.html 1) Get The HDFs Via Filezilla or a web browser are two options. FTP http://data.nodc.noaa.gov/pathfinder/Version5.0/8day/2000/ 2) Downlaods and create folders, be sure to note 32 bit or 64 bit. 2a) CYgwin with Wget (https://www.cygwin.com/) 2b) OTSGEO4w From VTECH or similar (http://trac.osgeo.org/osgeo4w/) 2c) Install Python (https://www.python.org/downloads/release/python-341/) 2d) Bind it to GDAL http://www.lfd.uci.edu/~gohlke/pythonlibs/%20(GDAL%E2%80%911.11.0.win%E2%80%91amd64%E2%80%91py3.4.exe)%20or%20(GDAL%E2%80%911.11.0.win32%E2%80%91py3.4.exe) 2e) Create 4 Folder in C:\temp QUAL TXT ARCHIVE LANDMASK and download the landmask http://www.nodc.noaa.gov/SatelliteData/pathfinder4km/userguide.html 3) Get Data using Cygwin 8-day for January 2000 ---change drive to C:\temp Point out how to change night or day . Download just night (clouds) for TIME in 1 = night for TIME in 3 = day for TIME in 1 3 = night and day               DAYS="\     2000001-2000008     2000009-2000016     2000017-2000024     2000025-2000032"          BASE_URL="http://data.nodc.noaa.gov/pathfinder/Version5.0/8day/2000/"     for TIME in 1 ; do       for JULIAN in $DAYS ; do         wget "${BASE_URL}${JULIAN}.s048${TIME}pfv50-sst-16b.hdf"         wget "${BASE_URL}${JULIAN}.m048${TIME}pfv50-qual.hdf"       done     done      4) Convert to TIFF - HDF to Tiff, Set the projection, set the extent, compress the data, convert to GTiff. then move old HDF manually to Archive and move the quality files to QUAL. -ot Float32 to use decimals but we are using Ints               for %A in ("C:\temp\*.hdf") do gdal_translate -of GTiff -a_srs "+init=epsg:4326" -a_ullr -180 90 180 -90 -co "COMPRESS=PACKBITS" -sds "%A" "%A.tiff"      5) Set NoData, a_nodata 0 will convert the 0 to NoData if required (not required for this method but usually is) 6) Sacle Factor - Check for Metadata Scale factor (hopefully 0.07500000298) and Move Quality ito own folder (QUAL) and do same for Text (TXT)               for %A in ("C:\temp\*.tiff") do gdalinfo "%A" >>"%A.txt"      7) Quality 1 - In quality field- Convert Quality <3 to 0 and Quality >3 to 1. Manually move old quality files to Archive.               for %A in ("C:\temp\QUAL\*.tiff") do gdal_calc.py -A "%A" --outfile="%ABINARY.tiff" --calc="0*(A<3)" --calc="1*(A>3)"      8) Scale data from 6, be sure to first to cd back to temp cd .. Move old files without_C to Archive NOTE THis is for whole degrees if decimals are required set output raster to float. in step 4.               for %A in ("C:\temp\*.tiff") do gdal_calc.py -A "%A" --outfile="%A_C.tiff" --calc="A*(0.07500000298)"      8) Transfer Quality to SST files, so if quality is 4,5,6,7 then times SST pixels by 1 (QUAL) so they stay the same. If Quality if 0,1,2,3 times by zero (QUAL) so they become zero.               gdal_calc.py -A 2000001-2000008.s0481pfv50-sst-16b.hdf.tiff_C.tiff -B C:\temp\QUAL\2000001-2000008.m0481pfv50-qual.hdf.tiffBINARY.tiff  --outfile=A1_8_SSTQUAL4.tiff --calc="A*B"     gdal_calc.py -A 2000009-2000016.s0481pfv50-sst-16b.hdf.tiff_C.tiff -B C:\temp\QUAL\2000009-2000016.m0481pfv50-qual.hdf.tiffBINARY.tiff  --outfile=A9_16_SSTQUAL4.tiff --calc="A*B"     gdal_calc.py -A 2000017-2000024.s0481pfv50-sst-16b.hdf.tiff_C.tiff -B C:\temp\QUAL\2000017-2000024.m0481pfv50-qual.hdf.tiffBINARY.tiff  --outfile=A17_24_SSTQUAL4.tiff --calc="A*B"     gdal_calc.py -A 2000025-2000032.s0481pfv50-sst-16b.hdf.tiff_C.tiff -B C:\temp\QUAL\2000025-2000032.m0481pfv50-qual.hdf.tiffBINARY.tiff  --outfile=A25_32_SSTQUAL4.tiff --calc="A*B"      9) Combine SST - Combine all the SST QUALT 4 rasters together               gdal_calc.py -A A1_8_SSTQUAL4.tiff -B A9_16_SSTQUAL4.tiff -C A17_24_SSTQUAL4.tiff -D A25_32_SSTQUAL4.tiff --outfile=SST_SUM_C.tiff --calc="A+B+C+D"      10) Combine Quality - Combine all Quality Binaries together (0-4) 0 = no good pixels and 4 = Four Good Pixels. Be sure to cd into QUAL Folder               gdal_calc.py -A 2000001-2000008.m0481pfv50-qual.hdf.tiffBINARY.tiff -B 2000009-2000016.m0481pfv50-qual.hdf.tiffBINARY.tiff -C 2000017-2000024.m0481pfv50-qual.hdf.tiffBINARY.tiff -D 2000025-2000032.m0481pfv50-qual.hdf.tiffBINARY.tiff  --outfile=QUAL_final.tiff --calc="A+B+C+D"      11) Get to Monthly Mean - Divide SST by Pixel Count (Quality greate than four 0,1,2,3,4) Be sure to cd into temp Folder               gdal_calc.py -A SST_SUM_C.tiff -B C:\temp\QUAL\QUAL_final.tiff  --outfile=SST_Final_C.tiff --calc="A/B"      11) Convert 0 to NoData, calculate stats, Float . Move final to archive               gdal_translate SST_Final_C.tiff -of GTiff -ot Float32 -a_nodata 0 SST_Final_C_NoData.tiff      12) ALthough this has Stats for QGIS ir GRass ArcGIS requires you to build Sstats in ArcCatalog (Clear first then make new in arcatalog). 13a) In ArcMap do this to fill small holes. Watch out this will shrink the land. focal_sst_C (do it to a geodatabase) NOT USING               Con(IsNull("SST_Final_C_NoData.tiff"), FocalStatistics("SST_Final_C_NoData.tiff", NbrRectangle(5,5, "CELL"), "MEAN"), "SST_Final_C_NoData.tiff")      13b) Use NoData filler in QGIS 13c) gdal_fillnodata SST_Final_C_NoData.tiff -md 5 -si 2 SST_Final_C_NoData_Foc.tiff 14) CHange to Mask to tiff, as step 4 but this time add change NoDta to 2 (delete old HDF file) cd to landmask               for %A in ("C:\temp\landmask\*.hdf") do gdal_translate -of GTiff -a_srs "+init=epsg:4326" -a_nodata 2 -a_ullr -180 90 180 -90 -co "COMPRESS=PACKBITS" -sds "%A" "%A.tiff"      15) Change 2 to 1 in landmask `for %A in ("C:\temp\landmask\*.tiff") do gdal_calc.py -A "%A" --outfile="%A_FINAL.tiff" --calc="1*(A<`5)" NOW MULTIPLY BY FINAL 16) Burn landmask back into final SST, cd ..               gdal_calc.py -A SST_Final_C_NoData_Foc.tiff -B C:\temp\landmask\pfv50_land.m04.hdf.tiff_FINAL.tiff  --outfile=SST.tiff --calc="A*B"      17) General Clean up Build sats, compress, 0 to No Data,               gdal_translate SST.tiff -of GTiff -ot UInt16 -a_nodata 0 -stats -co "COMPRESS=LZW" SST_ALLDONE.tiff


Can we manually select which satellites to use in solution?

For example, I have used below satellites ID in current solution:               ID    Signal Strength     ______________________      1         21     22         23     19         12     36         26     20         18      3         29     32         14     13         15      But I want to filter and use only those satellites with **higher signal strength** in my solution, let say `satellite ID: 1, 22, 36, 3`. Is it possible?


OpenLayers with MVC and SQL Server

I have imported some shape files into SQL Server 2008. Now i want to use OpenLayers with my MVC 4 application to render those shape files from SQL Server Database. Any help in this regard?


I have successfully use tilestache-seed.py to get tiles in different zoom levels, and I use processing to render the geojson tiles. Now I want to use tilestache-server.py to get local tiles in a way like local/roads/x/y.geojson, maybe something like this. But I don't know how to write the cfg files.