How to change area inside mask to different RGB Value in ECW Format with FME

I have 3 Band RGB ECW Raster files and would like to change all the RGB values within the masked area to 0,0,0. I am using the SpatialFilter to set the masking area and thought that I could use the RasterExpressionEvaluator(REV) to manipulate the rgb values. However I cannot find an expression which works. I am using FME 2014 and setting the SpatialFilter to Mask = Filter, ECW File as Candidate with the Filter being "Intersects"and if does not pass, then the REV should work its magic. For each band in the REV (red8,green8,blue8) I set the the expression to               if ((A[0]+A[1]+A[2])>0, 0, A[0])      changing the last parameter for each band ...ie A1, A[2]...but this changes the whole image to 0,0,0. This doesn´t seem to be working.


Why am I getting 'Error 000732 Raster does not exist'?

I am trying to apply symbology to a raster layer via kernel density analysis. When I run the Python script below in ArcMap, I am get the error message below. I have searched and tried the common suggestions but none seem to work. Any help would be great.               Runtime error Traceback (most recent call last):   File "<string>", line 42, in <module>     File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 5722,     in ApplySymbologyFromLayer     raise e ExecuteError: Failed to execute. Parameters are not valid.      ERROR 000732: Input Layer: Dataset C:\Users\cbriglia\Desktop\GIS\Python_Test\clip_raster      does not exist or is not supported Failed to execute (ApplySymbologyFromLayer).               #____________________________________________________________________________________________________     # testpy.py     # Created on: 2014-02-24 15:34:03.00000     #   (generated by ArcGIS/ModelBuilder)     # Description:      # ---------------------------------------------------------------------------          # Import arcpy module     import arcpy          # Check out any necessary licenses     arcpy.CheckOutExtension("spatial")               # Local variables:     Input_Table = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\test.gdb\\test"     state_border_shp = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\state_border.shp"     Python_Test = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test"     xy_layer = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\xy_layer"     xy_output_shp = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\xy_output.shp"     Hot_Spot_Output = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\hot_spot1"     Hot_Spot_Raster = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\clip_raster"     symbologyLayer = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\HotSpotSymbology.lyr"               mxd=arcpy.mapping.MapDocument("CURRENT")          # Process: Make XY Event Layer     arcpy.MakeXYEventLayer_management(Input_Table, "longitude", "latitude", xy_layer, "GEOGCS['GCS_North_American_1983_CSRS',DATUM['D_North_American_1983_CSRS',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision", "")          # Process: Feature Class to Feature Class     arcpy.FeatureClassToFeatureClass_conversion(xy_layer, Python_Test, "xy_output.shp", "\"Time\" >= '0:00:00' AND \"Time\" <= '0:04:59'", "RowNumber \"RowNumber\" true true false 8 Double 0 0 ,First,#,,RowNumber,-1,-1;Date \"Date\" true true false 8 Date 0 0 ,First,#,,Date,-1,-1;Time \"Time\" true true false 255 Text 0 0 ,First,#,,Time,-1,-1;Day \"Day\" true true false 255 Text 0 0 ,First,#,,Day,-1,-1;Location \"Location\" true true false 255 Text 0 0 ,First,#,,Location,-1,-1;Actual_Cal \"Actual_Call_Type\" true true false 255 Text 0 0 ,First,#,,Actual_Call_Type,-1,-1;Sub_Type \"Sub_Type\" true true false 255 Text 0 0 ,First,#,,Sub_Type,-1,-1;Agency \"Agency\" true true false 255 Text 0 0 ,First,#,,Agency,-1,-1;District \"District\" true true false 255 Text 0 0 ,First,#,,District,-1,-1;Latitude \"Latitude\" true true false 8 Double 0 0 ,First,#,,Latitude,-1,-1;Longitude \"Longitude\" true true false 8 Double 0 0 ,First,#,,Longitude,-1,-1", "")          # Process: Kernel Density     arcpy.gp.KernelDensity_sa(xy_output_shp, "NONE", Hot_Spot_Output, "2.04744399999998E-03", "1.70620333333332E-02", "SQUARE_MAP_UNITS")          # Process: Clip     arcpy.Clip_management(Hot_Spot_Output, "-73.7275781441499 40.9867050023656 -71.7867901391991 42.0506901260974", Hot_Spot_Raster, state_border_shp, "-3.402823e+038", "ClippingGeometry")          # apply symbology     arcpy.ApplySymbologyFromLayer_management (Hot_Spot_Raster, symbologyLayer)


How to find X,Y coordinates of a single point in ArcMap 10.1?

I have a shapefile of a road layout (name: US-101). I drew a line across the road section which intersects the left and right edges of the road and pavement marking (which is also the part of shapefile US-101). Now, I want to find the X, Y coordinates (location in arcmap) of the intersection points of Us-101 and drawn line. The projected coordinate system of dataframe and shapefile is NAD_1983_StatePlane_California_III_FIPS_0403_Feet. This means that the coordinates should be in feet. If I use identify tool, it selects the whole shapefile and gives some location but I am not sure if that represents the location of the particular point I clicked on OR the location of shapefile. Please help me finding the coordinates. Refer to attached image. ![enter image description here](http://i.stack.imgur.com/Vbqrd.png)


geoprocessing libraries for Google Maps

Are there any GeoProcessing libraries that I can use with Google Maps to get some more advanced features?


merging TIGER Line shp files for better labeling in ArcGIS

When working with TIGER line shp data at county level scale the labeling of roads, rivers, railroads, etc. is cumbersome due to all of the tiny line segments. Merging the dozens of segments that comprise a particular road or river will result in much cleaner labeling. The only problem is the amount of tedious work this requires. Anyone know of a Python script that will automate this process? It needs to find all records with the same name and merge them into one record. I thought ET Geowizards had a tool for this but can't seem to locate it. ![enter image description here](http://i.stack.imgur.com/uypna.png)_screen shot for better explanation_


Divide Line Into Sections Using Points Offset from It

I have track (line) and milemarkers (point). Each point is offset by a different distance. Is there a way to find where each point would intersect the line if going perpeniduclarly out from the line? As an analogy, imagine riding a train, sitting perpendicular to the direction of travel, looking out the window. Each time you see a milepost directly in front of you, you make note of your position on the track. Any help is greatly appreciated, Thanks


NOAA IWS Data as a point layer

Does anyone know how to get observation data from the NOAA IWS Data as a point layer? http://w1.weather.gov/obhistory/KEET.html http://weather.noaa.gov/


adding feature grid using ClientSDK

I am adding a Feature Grid in the Map page using this tutorial and I am not sure where exactly I have to add,               autoLoadFeatures: true      The tutorial says that I need to edit the feature manager section of the app.js but despite making the changes, I am still getting an empty feature grid. Here is my code of the app.js that I modified,               {                 ptype: "gxp_featuremanager",                 id: "states_manager",                 paging: false,                 /*layer: {                     source: "local",                     name: "usa:states"                 }*/                 autoSetLayer: true,                 autoLoadFeature: true             }, {                 ptype: "gxp_featuregrid",                 featureManager: "states_manager",                 outputConfig: {                     loadMask: true                 },                 outputTarget: "south"             }


Bulk insert geometry in PostGIS inserting geom from an already existing table in database

My goal is to bulk insert original data into a table I created within PostGIS. I want to insert geographical data into this same table as well; this geographical data already exists within my database. I'm creating my table using the command:                    CREATE TABLE schema.DOCUMENT (             id    SERIAL PRIMARY KEY,              name  varchar,              geom  geometry(multipolygon, 2972)  );      Even though I am not getting an error message, my geometry column is not populated when I am inserting data:                   INSERT INTO schema.DOCUMENT (name, geom) VALUES            ('perimeter', (SELECT ST_Union(geom) FROM schema.perimeters)::geometry(geometry, 2972)        );      PostGIS performs the resquest without error message, QGIS reads the table within postGIS, displays its attributes, but not its geometry. Is there any type conversion I should have perform?


Revealing the different layers of a shape file in QGIS

Shapefile I am referring to is 'NUTS_RG_03M_2010' which is together with several other Shapefiles available in a ZIP file on the Eurostat web site. the ZIP file the available map sets at Eurostat I am importing NUTS_RG_03M_2010.shp as a vector layer. ![enter image description here](http://i.stack.imgur.com/NUX13.jpg) Actually I am interested in the NUTS 2 or 3 level - not the here displayed national level. Now I print this map in a PDF and when I open it I can see the different layers in short intervals displayed - from very fine grained to the national level. The screen shot shows one intermediate level: ![enter image description here](http://i.stack.imgur.com/b9xal.jpg) My conclusion is that those levels, layers or whatever it is called are "hidden" somewhere and must be displayable and editable in QGIS. How do I access them? **My ultimate goal is** to convert a NUTS 3 level layer to GeoJSON or SVG.


Removing a Table from several MXD-Files using ArcPy

I'm trying to remove a certain Table (xlsx-File) from some MXD-Files using python, but I can't finguring out how. I tried the code sniplet for removing:               import arcpy, os     from arcpy import env          arcpy.env.workspace = 'V:/Projects/ZEL'          mxd =arcpy.mapping.MapDocument('V:/Projects/ZEL/test04.mxd')          df=arcpy.mapping.ListDataFrames(mxd, 'u')[0]          for lyr in arcpy.mapping.ListLayers(mxd, '', df):         if lyr.name.lower()=='header_vorlage$':             if lyr.dataSource == 'V:\Projects\ZEL\SHP\Daten_111004\ZEL_LB_Tabelle_V3_2010_2030.xlsx':                 arcpy.mapping.RemoveLayer(df, lyr)               mxd.saveACopy('pt.mxd')          print 'fertig'          del mxd      It works, but when I open the new created 'pt.mxd' there is still the symbol of the xlsx-Table with an '!' and you have the option to fix the datasource, because I have removed the path, but not the table... I hope its not too confusing :) My question is: Is there a way to remove a xlsx-Sheet from MXD-File without opening?


Working out the coords of a square x miles from a center point

I am trying to create a x mile square (or circle) around a central point, where all sides of the square would be x miles from the centre. I need the 4 corner coordinates. It is scrambling my brain trying to get my head round it? I can work out the distance between two points using the haversine formula but maths is seriously not my strong point and I don't understand sin,cos etc.. and trying sort this out has lost me! I have come across this post but I just don't get it! Would anyone be kind enough to explain how I do this in apples and pears terms? **EDIT** To explain exactly what I trying to do; I have a website, where users can search for buildings in a specific area. They will enter a town or place (which I will know the lat long of) and they search within a specific radius of say 10 miles of the place. I need to find the min/max lat and longs of the 10mile radius so I can query my database using a where clause similar to:               Where buildingLat <= maxLat        and buildingLat <= minLat        and buildingLong >= minLong         or buildingLong >= maxLong      I need some kind of formula! My coordinates are in decimal degrees


Clear ArcGIS server rest cache with an in through script

I would like to script the process to clear the rest cache on the \rest\admin page after I do a start/stop with the AGSSOM.exe provided on arcscripts. Is it typical to have to clear the cache after creating new services or start/stop- ing services. We seem to have to. Thanks.


How to display mouse position as tooltip in OpenLayers?

I want map coordinates as mouse over effect in OpenLayers. I am using the following code, however it is showing pixel coordinates:                   map.events.register("mousemove", map, function(e) {               var position = e.map.x + e.xy.y;         OpenLayers.Util.getElement("tooltip").innerHTML = position          });      thank you


How to convert a line Shapefile into a CSV with nodes and links?

Is there a way to convert a linear shape file into a csv file of the following format:               Node_1, Node_2, attribute_1, ...., attribute_x          1       2       "hello"        567845.334      I have looked at GDAL/OGR2OGR and PostGIS and i don't think either converts the data to the format I want. I don't mind writing a script to do it, if i'm guided in the right direction.


How do you normalize a field in Qgis symbology?

I'm trying to normalize a field in symbology in Qgis but there is no normalization option like in Arc. I've tried to add a field to the attribute table and use the field calculator to do the normalizing but it doesn't seem to work. Is there a plugin or some other way to normalize without adding a new field to the table? Thanks, MG


How do you create an ArcCatalog-friendly xml metadata file from a url metadata?

How do you take metadata information from a url like this and create an xml file that ArcCatalog's "import xml" metadata tool will accept? I have tried a few variations on pasting the url information into a text editor and saving as xml but haven't found the right method. I am using ArcGIS 10.


Processing(.org) for geospatial visualization?

Does anyone know if Processing is being used for geospatial visualization? I can't find much out there, but this is impressive: http://benfry.com/zipdecode/ Here's one I just found: http://fathom.info/projects/countyhealth.html


Open source tool for point/node conflation/matching?

## The Question Are there any **open source** tools for **conflating** (matching) two layers of **point** (node) data? ## Motivation I'm particularly interested in using such a tool to sync data with **OpenStreetMap** , where I've created a wiki page on the subject of conflation. That page links to some university research projects on the conflation of vector datasets using open source software ( **OpenJUMP** and **Quantum GIS** ), however they don't share their work. ## Implementation if tool doesn't exist I know algorithmically this task shouldn't be that difficult especially compared to handling generic vectors, as it would simply use **distance** and similar **properties** along with some math, however I suppose I'm more interested in a **graphical interface** implemented in open source software. **I wrote up a possible workflow for conflating nodes** here on the OSM wiki. I thought of trying to implement it in JOSM, however if there are others from the broader GIS community interested in this then it would make sense to implement it in something like QGIS, especially if other developers would get involved. ## Use cases I think it might be useful to say what I'd be interested in using this tool for.   * Syncing Virginia interstate exit data from VDOT with OSM   * Syncing GNIS feature points with OSM After an extension to conflate polygons (using their centroids), the tool could also be used for:   * Transferring properties (tags, attributes) between nodes representing a house along with addressing data to a polygon (area, closed way) of the actual building I'm sure there are many other possibilities, but these are the few I'm planning to use it for.


Problem overlaying WFS on top of Bing maps using OpenLayers

I have a simple set of 99 polygons loaded into GeoServer from PostGIS. They were loaded from GeoJSON using ogr2ogr. (I'm using OpenGeo Suite 3.1 if it matters.) When I go to the layer preview and select OpenLayers it does display successfully. When I copy pasted the code and adjusted it slightly it also worked on the different server. However, now I'm trying to overlay it on top of a Bing base map. The base map displays just fine. The overlay does not display. (That is in Chrome, in Firebug it fails on map.addLayer() and aborts the entire script.) Based on that walk through it would seem that the problem is somewhere in my declaration of the vector layer. BTW, I went into the geoserver workspace area and explicitly set the URI to what is listed under "featureNS." I've tried both declaring and not declaring the geometry name explicitly.               function init()     {            var map = new OpenLayers.Map("map");              var road = new OpenLayers.Layer.Bing({              name: "Road",              key: apiKey,              type: "Road"             });             var aerial = new OpenLayers.Layer.Bing({                 name: "Aerial",                 key: apiKey,                 type: "Aerial"             });//,{isBaseLayer: false});*/             var hybrid = new OpenLayers.Layer.Bing({                 key: apiKey,                 type: "AerialWithLabels",                 name: "Bing Aerial With Labels"             });                  map.addLayers([road, hybrid, aerial]);              var data = new OpenLayers.Layer.Vector(         "WFS Display",          {                protocol: new OpenLayers.Protocol.WFS ({             version: "1.1.0",             url: "http://<servername:port>/geoserver/opengeo/wfs",             featurePrefix: "opengeo",             featureType: "ogrgeojson1",             featureNS: "http://<servername:port>/data/opengeo"         }),             strategies: [new OpenLayers.Strategy.Fixed()]         });              map.addLayer(data);     }      Any thoughts? Just for the heck of it I tried using OSM instead of Bing (although that's the job) and still no joy. So it isn't Bing at least. What did I do stupid?


Question about Import 71 and file permission in ArcGIS

I am making a map for my thesis. While using ArcGIS, I must use Import71 to convert some .e00 files (In this particular case, political boundaries and Hydrography networks). When I select my output folder, I receive the message: [ "E:\ File Path" This file cannot be accessed. Make sure you have security privileges on the drive."] I use Windows 7. Is this simply a Windows/administrator problem or am I doing something wrong? If someone knows, I would appreciate any suggestions.


ArcGIS - Is It Possible To "Lock" Metadata

I've been asked by a customer if I can "lock" the metadata in their various geodatasets. I immediately asked why, and was told that they don't want other organizations/users editing/deleting certain tags. A quick search hasn't really turned anything up. Anyone have any ideas/suggestions on how I could accomplish this?


Looking for good resources for batch files in relation to databases/geodatabases

I hesitated a bit before asking this, as it isn't necessarily a GIS specific question, though I'm using it to update geodatabases. I have found plenty of hits on a Google search, but frankly, many of the websites out there for .bat files are hacky and not real trustworthy. Do you have a resource that you use for database manipulation through batch files? Any GIS/Geodatabase specific resources for .bat's? A little background, I'm just starting to dabble in batch files. I'm aware that I can automate many things that are done manually, but am terrified of doing anything I shouldn't be doing/cannot undo. I have found introductory sites that don't give much more information than printing to the console. I'm looking for something that goes into detail about databases. Mods, feel free to move this to another area if this is too objective of a question. Thanks for your help!


Centroid of the equator and a point

Suppose I already have a way to compute the centroids of different geometry types:   * **Points** (arithmetic mean of Cartesian coordinates).   * **Linestrings** (polylines) (weighted mean of segment mid-points in Cartesian coordinates, weighted by great-circle distance).   * **Polygons** (weighted mean of spherical triangle centroids converted to Cartesian coordinates, weighted by spherical triangle areas). I've included my methods for computing each type of centroid, but they can probably be ignored. According to the PostGIS documentation for ST_Centroid: > The centroid is equal to the centroid of the set of component Geometries of > highest dimension (since the lower-dimension geometries contribute zero > "weight" to the centroid). The dimension here refers to points (0), lines (1) and polygons (2). What is the most consistent way of defining the centroid if the geometries of highest dimension have **undefined** (ambiguous) centroids? There are two possibilities:   1. The combined centroid is also **undefined** (I assume this is what ST_Centroid does).   2. The combined centroid is equal to that of the geometries of highest dimension with **non-zero weight**. If a geometry has no defined centroid, then we give it zero weight. An example ambiguous situation is an equally-spaced LineString going around the equator. In this case, the centre of mass is at the sphere's origin. Another situation is two hemispherical polygons, N and S, covering the whole sphere. If such ambiguous geometries are combined with a point, should the point be the centroid? One possibility is to interpret the centroids physically: the Earth is an invisible sphere suspended by a string, such that it can rotate about its centre. The centroid is therefore the point at the southernmost point if a collection of features are present on the spherical surface and the sphere is allowed to spin until it comes to rest. In this situation, it seems reasonable that if the sphere is covered by area polygons, then adding a single point (of infinitesimally small area) is sufficient to make it come to rest at that point.


To what extent is SQL's language accessible via ArcGIS tools?

That question just sounds so redundant...   At any rate, I have been asked to explore the uses of SQL in ArcGIS. We use an SDE DB for all server-side storage and DB managing/large-scale editing. However, I am attempting to delve deeper into just how integrated SQL is in ArcGIS's tools. There is a note in the SQL Query Reference Guide of ArcGIS 10's help that clearly states SQL syntax does **not** work when using the Field Calculator tool. I find this very disappointing as it would seem very useful to be able to pull and mangle information directly from the database itself when calculating field values. What are the largest limitations and pitfalls one might fall into when attempting to make use of SQL in ArcGIS? Which tools see best functionality when integrated with SQL? If an example is required to make this a clearer question, I am attempting to track the number of points of interest that are of a certain type in a given region. Each point has an attribute which describes its type and region. My current solution involves heavy use of cursors for counting and data retrieval, but a superior pointed out that a simple SQL query could do all of this and more. Unfortunately, it seems the functionality is not present for this. Or is it?


Geonode to harvest metadata from Geonetwork-like services?

I am in charge of setting up a gis web portal and one of the functionalities would be to harvest some metadata from metadata servers like Geonetwork. I have been thinking of using Geonode because I have already used Geoserver. Apparently Geonode uses Pycsw to publish metadata but I can't see whether it allows to collect metadata from other servers and how? Is it possible to do it through the Geonode interface?


Database for offline slippy map tiles

I currently have an offline HTML5 map application (built on Leaflet & KendoUI with custom additions) that has an app manifest and works fine on multiple platforms. However, I am hesitant to use the manifest to store the actual map tiles this way(PNG files stored as a TMS style Tile Cache). **Issues:**   * There could be a lot of tiles (10MB - 50MB) in about 1,000 PNG files   * The initial download could be really slow (and hard to show progress to the user)   * App Manifests work or they don't if they don't the entire offline caching will fail (accord to [whatwg.org][1])   * The offline user will occasionally reconnect and need to get refreshes of the Tiles, These are small deltas but the app manifest mechanism would reload all the js, css, and PNG files as soon at the manifest updates **Alternative idea:** keep the web application separate from the storage of the slippy map tiles. Store the tiles in a web application friendly database # Update: **[PouchDB recently added support for binary blobs. I am getting good initial results. See:http://stackoverflow.com/questions/16721312/using-pouchdb-as-an- offline-raster-map-cache ]**   * This is suggested by Ben Nolan http://bennolan.com/2011/06/03/offline-mapping.html     * Similar work on Maps on a Stick: http://developmentseed.org/blog/2010/oct/02/maps-stick-version-2-released/ ([deprecated][2])      * MBtiles http://mapbox.com/developers/mbtiles/     * TileStream https://github.com/mapbox/tilestream     * Lous Remi: http://louisremi.com/2011/10/07/offline-web-applications-were-not-there-yet/ **Question:** What does the collective wisdom (and experience) say about the following choices for a JavaScript friendly DB:   1. **SqlLite**     * Seems like you need to create a native app wrapper for this to allow it to talk to JavaScript     * E.g. Add you DLL to a native program for windows, and PhoneGap for android/IOS   2. **WebSQL**     * depricated     * but it was a SQL Lite that I could easily generate and distribute from the host web server   3. **IndexDB**     * Storing blobs seems to work see: https://hacks.mozilla.org/2012/02/storing-images-and-files-in-indexeddb/     * I am concerned if this is the only way to initially populate the DB     * Is this basically a SQLLite file? Can I ship it for bulk DB upload?     * I am leaning towards this as a solution. Are their gotchas I don't know about? **Requirements:**     * Fast initial population (via download) to the client Web DB     * Compatible with current Leaflet TileLayer API (i.e. I would rather not write a custom layer, but if needed ...) (e.g. MbTiles)     * Platform: Windows Laptops, but Android and IOS tablets desired (I can wait till IndexDB is released, don't need immediate support)     * I would rather not write a native app (EXE, IOS, Android) but it if that is the best way...     * Server Side generation of web maps (this will be an automated process). The user picks a location, chooses maps, and they get dynamically transformed and turned into a slippy tile cache (this work is already largely done).     * Fast bulk initial download     * Map change delta refreshes (I will write this logic, based on constant stock numbers, and update date logic)     * Minimal impact on current Leaflet & KendoUI web application **Update:** Key background idea: while the web app is fairly stable, the slippy map tiles are generated on the fly for your location and what type of problem you are doing (at the back-end). So I thought of two other ways for transferring the initial 'big bang' and then updates: Zip File (probably not a good idea - as it adds server load) also expansion on client machine will require user interaction, but it does allow slippy tiles to use local url's HTML5 File API: I have not looked at this in great detail. But it appears has most operations to create a local file tree in TMS format: http://www.html5rocks.com/en/tutorials/file/filesystem/ what will be interesting to test is the performance (e.g. can I use web works to maximize the bandwidth to disk and across the net). IndexDB is not widely implemented to be web worker friendly (sync interface: http://stackoverflow.com/questions/10698728/indexeddb-in-web-worker-on-firefox I have found some additional info about using IndexDB with Leaflet: https://github.com/calvinmetcalf/leaflet.pouch (syncs couchdb with indexdb for offline) Also here are some tests for the read/write speeds for indexdb, websql, & local store: http://jsperf.com/indexeddb-vs-localstorage/15 And here is how to use the read/write file API from javascript: (and also to ask to increase storage limits) http://www.html5rocks.com/en/tutorials/file/filesystem/ * * * Thank you,Tom MacWright (aka tmcw), for some good feedback. Your example is really going to help when I get to creating custom layers to ingest the binary blobs. I did some testing yesterday with IndexedDB and by using some polyfills and libraries I think it will solve my issues. Now it is time to put some sweat equity into this, and I will report back. * * * **BTW: if you want to see my results of my study on client side databases see:** http://stackoverflow.com/questions/14113278/storing-image-data-for-offline- web-application-client-side-storage-database * * *


Labeling from a defined string in MapBasic

I am currently working on a code to apply a variety of different changes to layers with certain attributes, I have been successful with this so far (thanks to Peter). However I now want to add a text box to this so the user can enter the name of the field they want labeling (as this is the only thing differs in the .TABs I intend to use this tool for). I have currently created a dialog box for the user to input this however when it comes to labeling (I assume), MapInfo is looking for a field with the same name as my string to label with, instead of looking at what is stored there. For example               Dim sLabinput As String               Set Map Window nMID                 Layer nLayer                      Display Global Global Line (2,2,16711680)                     Arrows On                         Label With sLabinput Auto On Visibility On                         Font ("Arial",257,9,0,16777215)      I haven't put the rest of the code as I want to try and learn this myself however if that is the only way to solve it I can post it. Am I right in assuming in this instance MapInfo is looking for a field called sLabinput, rather than the value stored in there? Thanks, Alan


Using QgsSpatialIndex for spatial join

I've written a bit of code to do a simple spatial join in QGIS 2 and 2.2 (points that lie within a buffer to take attribute of the buffer). However, I'd like to employ a QgsSpatialIndex in order to speed things up a bit. Where can I go from here:               pointProvider = self.pointLayer.dataProvider()     rotateProvider = self.rotateBUFF.dataProvider()          all_point = pointProvider.getFeatures()     point_spIndex = QgsSpatialIndex()     for feat in all_point:         point_spIndex.insertFeature(feat)          all_line = rotateProvider.getFeatures()     line_spIndex = QgsSpatialIndex()     for feat in all_line:         line_spIndex.insertFeature(feat)          rotate_IDX = self.rotateBUFF.fieldNameIndex('bearing')     point_IDX = self.pointLayer.fieldNameIndex('bearing')          self.pointLayer.startEditing()     for rotatefeat in self.rotateBUFF.getFeatures():         for pointfeat in self.pointLayer.getFeatures():             if pointfeat.geometry().intersects(rotatefeat.geometry()) == True:                 pointID = pointfeat.id()     bearing = rotatefeat.attributes()[rotate_IDX]     self.pointLayer.changeAttributeValue(pointID, point_IDX, bearing)     self.pointLayer.commitChanges()


Epoch Time Incorrectly Auto-formatted As Int

I'm accessing seismic data from a USGS geojson (set to sync in CartoDB). When the data is brought into CartoDB the column is set as an int when it should be a long int. What is the best way to convert the field column so future syncs of the data come in correctly? I tried the following with no luck: UPDATE table SET field= CAST (field AS bigint)


How to automatically set polygons borders to improve map readability when rendering thematic maps?

When mapping an value as a color to render a thematic map the objects borders can alter the map readability a lot. For example in this thematic map of the US counties with black borders: ![enter image description here](http://i.stack.imgur.com/TJW7S.jpg) There are a lot of small objects in some areas, and it makes them look darker because of the borders without respect to the thematic color. If the borders are drawn with 30% opacity it results in the following map: ![enter image description here](http://i.stack.imgur.com/Ex3iw.jpg) This one is obviously better at communicating the data mapped on the objects. However having a static opacity rate can also degrade readability since it makes the objects boundaries less visible, which is a problem if there is only a few big objects. Moreover the change in readibility also depends on the contrast between border and fill colors. Do automatic ways of finding the good color/opacity for layers exist? What GIS software provide method to properly handle this issue?


How to display raster attributes by default?

I have a 4-bit thematic raster image with a color map from white to dark blue (Figure 1). The values 1 - 6 represent tree canopy cover at various breakpoints. I also created a raster attribute table with the various classified breakpoints (Figure 2). Is there a way (i.e. other than creating a .mxd document) for the image to immediately display the "Cover" attributes in Figure 2, rather than what currently displays in figure 1? Essentially what I am trying to do is eliminate the classes with no data (e.g. 0, 7-15) and make the "Cover" raster attributes display by default when the user brings up the image in the viewer. **Figure 1** ![enter image description here](http://i.stack.imgur.com/DUNjY.jpg) **Figure 2** ![enter image description here](http://i.stack.imgur.com/ppsM7.jpg)


How to obtain the width and height of an image using arcpy

This Stack Overflow question shows how to obtain the pixel dimensions of an image using Python. Is it possible to find an image's height and width using arcpy and ArcGIS? arcpy.Describe would seem like a logical place to start, but I can't see whether it returns the height and width properties. I looked at File Properties and Raster Dataset Properties \- am I missing something obvious?


Distinguish between the types of cultivated crops in remote sensing

I recently produced map of LULC but there is the difficulty of distinguishing between the types of crops. Is there a method to distinguish between the types of cultivated crops such as wheat, barley, maize etc.?


WFS layer doesn't display in OpenLayers

I have a few layers in a PostGIS database that I serve through Geoserver and that I try to display in OpenLayers. When I had the geoserver installed on localhost, it worked flawlessly. Now that I migrated the Geoserver on a remote server, the WFS is no longer displayed on my OpenLayers map. Looking at Firebug, the request is sent to the server but no answer is received. What is even weirder is that I can access the WFS from Qgis without any problem. Also, even the Geoserver examples (WMS though) work perfectly. The page is here: http://www.henriod.info/khub2/khub2.html Do you see any problem with this part of the code?               var schools        = new OpenLayers.Layer.Vector("Schools", {                        styleMap: style_schools,                        strategies: [new OpenLayers.Strategy.BBOX()],                        projection: new OpenLayers.Projection("EPSG:4326"),                        protocol: new OpenLayers.Protocol.WFS({                        version: "1.1.0",                                        url:  "http://thething.disco.unimib.it:12080/geoserver/wfs",                        featurePrefix: "humadat",                        featureNS: "http://thething.disco.unimib.it:12080/geoserver/khub2",                                        featureType: "schools",                        geometryName: "the_geom"                                    })                     });      Or could the problem be somewhere else? Thanks in advance!


What solution is there to project google/bing layers to another EPSG (e.g. 3844)?

I am using Geoserver and Openlayers. The Openlayers map has all the layers in EPSG:3844. I need to overlay Google/Bing layers. I am currently trying to do it with proj4js, mapproxy.org as openlayers doesn't have reproject support for WMS. Any solutions?


Methods of cloud shadow detection for Landsat data?

Detecting clouds doesn't seem to be much of a problem, rather the challenge is in selecting cloud-shadow classes that don't also include coastal areas, agriculture, etc. For a project I'm working on, I've been using two methods: Fmask (https://code.google.com/p/fmask/) is powerful and fully automated, plus it works for TM, ETM+, and OLI/TIRS data. It is great at catching harder to detect haze and the majority of other clouds/shadows. The problem I have with it however is that it tends to miss certain cloud types, namely smaller low altitude clouds and their shadows. I played around with the input parameters and found the best success using default values. My other method is a semi-automated classification. I create NDSI, NDVI, and NDWI for a particular scene, stack those as RGB, and perform unsupervised classification in ERDAS Imagine 2013 (k-means, 10 iterations, 0.95 convergence threshold, and usually 256 classes). After working on several scenes, I preferred to use the stacked indices over classifying individual bands because it took less time and did a slightly better job at separating clouds/shadows from other classes. In the end, I had fairly good success with detecting and removing clouds by combining these two methods, but ended up losing good data in my classification of cloud-shadows in particular. Has anyone had success in removing shadow areas that they'd like to share, or perhaps some insight into improving my classification process?


What is the best way to host mbtiles?

What is/are the best way(s) to host mbtiles? I have tried:   * **hosting on my own server** with tileserver.php: this works and is very straighforward and simple to set up, but doesn't seem to be super fast (maybe a problem with my server) and I fear that when the site opens to the world it will simply break down; (also, tileserver.php sends HTTP error 500 when a tile isn't found, which I find misleading?)   * **hosting on S3** (1 tile per S3 object): serving tiles is very efficient and fast, but uploading to S3 using tilecloud always raises an S3 error "connection reset by peer" in the middle of the process, so uploading never ends properly and more than half the tiles are not sent (and it seems that trying again just restarts everything from the beginning) MapBox would be the obvious choice but their prices seem very high? The mbtiles file is under 500 Mo for zoom levels [9,15], gets to 1 Go for levels [9,16] and 2.7 Go for levels [9,17]; I can live with [9,15]. S3 would be the simplest for me, if I can find a way to upload all tiles without error (or, with an error that can be debugged: S3 logging doesn't show anything for the error I'm experiencing). Any other idea?


Using geotag photos with Geoserver

Anyone has an idea how I can add geotaged photos inside Geoserver? At the end I want to have a map that has as background Google Maps APIs and on top of it with some geotaged photos. The photos I want to appear on the map as I zoom in. Thanks, Corina


How can I use the QGIS api on Jenkins

I have a python script with another script for unit testing. I would like to add it to jenkins to get continuous integration. Since I can't pip install qgis, how am I supposed to get the qgis api onto jenkins so that a build passes? I'm using version 1.8 of the api


How to activate edit tools

I have opened a project I worked on earlier on another machine, but the edit tools are not active, so i cant turn on editing to change a layer. What is the reason for them to be gray, and how can i continue to edit the layers in the project? Here is an image if its for any more use.. ![enter image description here](http://i.stack.imgur.com/3saAJ.jpg)


Custom infowindow exception in CartoDB

I'm building a runtime layer and til a couple of days ago my code was working. Since today it started giving me an exception that is causing subsequent code not to work.               Uncaught ReferenceError: layerView is not defined       The problem is caused by this call:               cdb.vis.Vis.addInfowindow(map, sublayer1, ['cartodb_id','ppe_ma']);      I guess something has changed in the api but i dunno how to track this changes as these functions are not yet documented.


What is the difference between QGIS for Windows and QGIS for Android? Is the functionality the same?


Is it safe to store coordinates on NFC tags always in one CRS and rely on conversion for others

I'm involved in NFC (Near Field Communication) standardization of a record structure for geographic point locations. That will allow to put coordinates on NFC memory tags which can be read with a smartphone or to exchange between phones and the like. A first proposal made was to always include the coordinate tuple (2D or 3D) and the CRS, so a coordinate tuple for a specific CRS could be stored. To this, an alternative opinion claimed that the CRS could set implicitly (for example WGS-84) and coordinates for any other CRS be computed, of course only for the same dimensions. It may be worth to note that a compact encoding format is important because NFC tags, especially the cheaper ones, do not provide a lot of memory. So any byte less is good if functionality isn't reduced (one envisioned use case is that NFC tags could be affixed to landmarks and allow the location be read electronically - this was thought to sometimes require other CRS than WGS-84). So the question is, if a coordinate tuple is given in one CRS is it safe to assume that it can be converted to any other CRS of practical relevance? To make this more open-ended, would there be any drawbacks if a data format for geographical coordinates is fixed to only one CRS and requires conversion to and from other CRSs if needed. And as further explanation, the intention is not to derive a format for a specific application but for general use by anyone who wants to store or read a location from an NFC tag/card or share with another smartphone when touched (like to show the location on a map application). Similar to what RFC 5870 (Geo URI) provides but more compact.


Custom Tools not Saving in Toolbar on Startup/ Normal.mxt?

I am trying to save some tools that I have created into the default toolbar layout that is present when ArcMap 10.1 is launched. It is possible to change the arrangement of toolbars, add new ones and even add in existing tools, but any custom tools I set in the commands category "geoprocessing tools" are gone and do not appear in the toolbar. How can I save these custom tools to the default layout that appears on startup? **Update:** Saving a document with the custom tools added and reopening it preserves the tools, but opening a template (10.1 mxd) containing the tools, then opening and older document will cause the tools to disappear. Oddly enough, any other changes made after the custom tools were added are preseved. **Update (03/18/2014):** I have upgraded to 10.2 and this has still not been fixed. I did not see this issue in the 10.21 changelog so I doubt it will address it. For those interested in this issue, I have started a forum post on the ESRI forums here.


QGIS and ArcGIS on the same PC

I work for a small non profit conservation organization and we have a reasonably high turnover of people... so it stands to reason that some people don't want to change from a preferred program. this in mind... Can i install ArcGIS 10.1 and QGIS on the same PC without problems?


Convert MapInfo raster file (.tab) to use it in QGIS and/or ArcGIS

I am trying to convert raster files from MapInfo (.ecw, .jpg, .TAB) in order to use them with QGIS or ArcGIS. I have access to all 3 softwares. I have tried Data interoperability tools in ArcGIS but it is not working ("Tool execution failed."). I have also used a MapInfo tool (.mbx) designed for this purpose (http://georezo.net/wiki/main/logiciels/mapinfo/outils/ut4rt) with more success. I can then open the file with QGIS, but the output file is a bit off (even with the right coordinate system). Any ideas ? Sincerely


JS API WebApp Zoom Problem in IE8

I implemented a zoom to feature extent function in my code, it works fine in new FireFox, Chrome, and IE10, but the tester's are having troubles with it in IE8. I noticed that all the data shows up on the map and in the table, yet it doesn't zoom. What am I doing wrong? Here is where I call my zoom function.               function displayResults(results, messages) {         var featureset = results[0].value;              var simplePolySymbol = new esri.symbol.SimpleFillSymbol();         simplePolySymbol.setOutline(new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 96, 170, .75]), 1));              dojo.forEach(featureset.features, function (feature) {             feature.setSymbol(simplePolySymbol);                  resultsLayer.add(feature);         });              myMap.addLayer(resultsLayer);         myMap.Search.handleStats(results, messages);              var extent = esri.graphicsExtent(featureset.features);         myMap.setExtent(extent, true);     }      Also my table doesn't populate in IE8, althought im seeing the values I need in the console. Here is my table code:               myMap.Search = {         gpGetStats: new esri.tasks.Geoprocessor(gpURL),         getRouteStats: function () {             console.log(dojo.byId('resultsLayer').value);             var params = {                 "ZIP_CRID": dojo.byId('resultsLayer').value             };             resultsLayer.Search.gpGetStats.execute(params, resultsLayer.Search.handleStats);         },              handleStats: function (results, messages) {             console.log(results);                  var content = '';                  content += '
';             content += '
 ZIP CRID 	 Bus 	 Res 	 Tot 	 <200 	 DS Key
';                  dojo.forEach(results[0].value.features, function (crid, i) {                 console.log(crid.attributes.ZIP_CRID + ', ');                 content += '
' + crid.attributes.ZIP_CRID;                 content += '	 ' + crid.attributes.BUS_CNT;                 content += '	 ' + crid.attributes.RES_CNT;                 content += '	 ' + crid.attributes.TOT_CNT;                 content += '	 ' + crid.attributes.LT_200_IND;                 content += '	 ' + crid.attributes.DS_KEY + '
';             });             content += '
';             dojo.byId('details').innerHTML = content;         },


Default Opengeo suite print module- scales given in selector differ when using the zoom slider

Using a default installation of the 3.0.2 suite, opening the Composer view(with the MapQuest OSM tiles as background) and clicking print (to pdf) to activate the print preview there appears to be a couple of issues with the scale given in the scale selector box. _One_ \- if one slides the zoom slider so that the scale selector box gives 1:512 000, and then opens the scales list in the box and chooses 1:512 000 the scale visibly changes in the print preview map (it goes to the next smaller scale). _Two_ \- the scales in the scales list in the scale selector box do not entirely match the list of scales given in config.yaml: the smallest (1:524288000) is not listed. _Three_ \- there are 17 zoom levels in the default Composer map, 18 in the print preview's zoom slider, and 19 in the scale selector box. The scales given by the zoom slider in the default Composer map roughly match the scales given in Config.yamls, i.e 1:68k something becomes 1:64k etc, but this should not be reason for this default behaviour? I have tried changing the number of scales config.yaml as well as changed the maxZoomLevels for the map, but besides zoom slider in the print preview following the number of zoom levels (scales) of maxZoomLevels, even if the main map's zoom slider does not, I cannot get things to precisely line up. A search here and abroad did not reveal this issue described, but if parts of this (or all) is due to a lack of understanding of certain fundamentals on my side, then pray tell where I can go read :) Many thanks for reading.


Extract BoundingBox of Cities

For simple geocoding purposes I want to extract all cities from a single country of openstreetmap. They only queries I want to do are:   * ZipCode -> (List of) BoundingBox of City/Village   * City/Villagename -> (List of) Boundingbox of City/Village I'm not interested in streetnames, rivers etc. Is this possible using `osmfilter`. Can anyone point me towards the tags of the data i'm looking for?


Programmatically manipulate GPX data

I need to do the following in Python   * open OSM & GPX files (I have packages for this)   * transform points from GPX (like stick a track to roads)   * calculate the results (distances, cumulative distances, etc.) I need to do this repeatedly, so a Python script is much more preferred. Desktop software with plugins is not suitable. I'll prefer some Python & C modules than a quest of installing plugins. PostGIS may be an option too. Shapely (Python package) seems to not be able to do this (it works only in 2D on a plane, and mentions it has no projections). I don't need 3D, but I have the input as lat&lon coordinates, and need to do geometric transformations (project a point on a polyline) and calculate distances in metres. What modules should I use?


Using Custom Map Projection On Leaflet

I have an application displaying a EPSG:3414 map running on Openlayers - jsfiddle working sample that works. I am trying to implement the same on Leaflet - jsfiddle non-working, it is not working as I may have left out something or may have gotten some concept wrong. Unfortunately, I am quite unfamiliar and am in the process of figuring out how to get this to work. Any help would be welcome. Thanks! **Updates:**   1. map is ESRI type using ZYX and SVY21 projection):   2. updated code here (JS fiddle not updated) **Leaflet Sample:**               var proj = new L.Proj.CRS.TMS('EPSG:3414', "+proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +units=m +no_defs",         [4257.9355, 11470.3186, 64359.3062, 49067.5413],          {             resolutions:[76.4372195411057,38.2186097705529,19.1093048852764,9.55465244263822,4.77732622131911,2.38866311065955,1.19433155532978,0.597165777664889,0.298450596901194]         }     );          var map = L.map('my_map', {         crs: proj,         continuousWorld: true,         worldCopyJump: false     });          map.addLayer(new L.Proj.TileLayer.TMS('http://{s}.onemap.sg/ArcGIS/rest/services/basemap/MapServer/tile/{z}/{y}/{x}', proj, {         subdomains: ['t1', 't2'],         tms: true,         continuousWorld: true     }));      Update, more information to help. I used openlayers to implement, have not had time to try out leaflet.               Spatial Reference: PROJCS["SVY21",GEOGCS["SVY21[WGS84]",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",28001.642],PARAMETER["False_Northing",38744.572],PARAMETER["Central_Meridian",103.8333333333333],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",1.366666666666667],UNIT["Meter",1.0]]          Single Fused Map Cache: true          Tile Info:              Height: 128         Width: 128         DPI: 96         Levels of Detail: (# Levels: 9)             Level ID: 0 [Start Tile, End Tile]                 Resolution: 76.4372195411057                 Scale: 288896              Level ID: 1 [Start Tile, End Tile]                 Resolution: 38.2186097705529                 Scale: 144448              Level ID: 2 [Start Tile, End Tile]                 Resolution: 19.1093048852764                 Scale: 72224              Level ID: 3 [Start Tile, End Tile]                 Resolution: 9.55465244263822                 Scale: 36112              Level ID: 4 [Start Tile, End Tile]                 Resolution: 4.77732622131911                 Scale: 18056              Level ID: 5 [Start Tile, End Tile]                 Resolution: 2.38866311065955                 Scale: 9028              Level ID: 6 [Start Tile, End Tile]                 Resolution: 1.19433155532978                 Scale: 4514              Level ID: 7 [Start Tile, End Tile]                 Resolution: 0.597165777664889                 Scale: 2257              Level ID: 8 [Start Tile, End Tile]                 Resolution: 0.298450596901194                 Scale: 1128          Format: JPEG         Compression Quality: 80         Origin:             X: -5878011.89743302             Y: 10172511.897433         Spatial Reference: PROJCS["SVY21",GEOGCS["SVY21[WGS84]",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",28001.642],PARAMETER["False_Northing",38744.572],PARAMETER["Central_Meridian",103.8333333333333],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",1.366666666666667],UNIT["Meter",1.0]]          Initial Extent:              XMin: -3250         YMin: 13872.0314312493         XMax: 68250         YMax: 56958.47469375         Spatial Reference: PROJCS["SVY21",GEOGCS["SVY21[WGS84]",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",28001.642],PARAMETER["False_Northing",38744.572],PARAMETER["Central_Meridian",103.8333333333333],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",1.366666666666667],UNIT["Meter",1.0]]          Full Extent:              XMin: -3250         YMin: 13872.0314312493         XMax: 68250         YMax: 56958.47469375         Spatial Reference: PROJCS["SVY21",GEOGCS["SVY21[WGS84]",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",28001.642],PARAMETER["False_Northing",38744.572],PARAMETER["Central_Meridian",103.8333333333333],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",1.366666666666667],UNIT["Meter",1.0]]          Units: esriMeters          Supported Image Format Types: PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP


Satellite/Aerial Imagery for Nepal for mapping in OpenStreetMap

I was trying to map places in Nepal using satellite imagery but there is no high resolution imagery available at zoom level 15-16 . I was looking to map places like Illam, Dhankuta. Is there a free source of aerial imagery for these places so that i can use it with JOSM to map these places in openstreetmap?


Android app to save offline map + POIs?

I don't know much about GIS and would like to find an application for travelling with the following features:   * support Points of Interests (sights, restaurants, etc.); Clicking on any POI should display a pop-up with a bit of information (eg. address, history of a building, etc.)   * download maps for offline use, so that no data connection is required   * should display the user's current location using GPS. Apparently, a data connection is not required to use GPS, although it might speed things up when enabling GPS Are there Android applications that can do this? That would make it easier to travel rather than carrying infos on paper. Thank you. \-- Edit: Android Google Maps doesn't support layers for offline maps, so adding one's locations through the web Google Maps won't work. Users recommended MapsWithMe which is supposed to support "bookmarks" in the Pro version. If someone uses the Pro version, can you confirm that locations are downloaded and saved in offline maps? Also, is it possible to build a list on a PC through eg. Google Maps/MapsEngine, and tell MapsWithMe Pro to download it? E-mails to the author (info@, support@, and android@) returned no reply.


How do I open the GeoDB files on NaturalEarthData's site without ArcGIS?

I'm trying to use the admin1 dataset from the NaturalEarthData website. The site offers this data as both shapefiles and GeoDB. The shapefile attribute data is apparently encoded in Windows-1252 and a lot of the characters in some of the attribute data I need are just '?' characters. The NaturalEarthData site mentions that:               The GeoDB format preserves local scripts better than SHP format.      I built GDAL against the FileGDB SDK from ArcGIS and verified the GDAL FGDB driver is working correctly using this link: http://trac.osgeo.org/gdal/wiki/FileGDB But I can't open files from NaturalEarthData. I always get the following error:               Unable to open datasource `ne_10m_admin_1_states_provinces.gdb' with the following drivers     ...     FileGDB     ...      I don't have access to ArcGIS. Am I doing something wrong? Is there any way I can access the GeoDB data?


ArcGis File Geodatabase with Null values (Field Calculator)

I want to use the field calculator to get the sum of a couple of columns. The problem is that some of them has Null Values. I am not able to find a solution. I tried this Python functions:               stack( !basic.Blue_Thickness!, !basic.Green_Thickness!, !basic.Red_Thickness!, !basic.F1_Thickness! )      Version 1:               def stack(*args):       myList = list(args)       myList = [item for item in myList if (item is not None)]       return sum(myList)      Version 2:               def stack(*args):         return sum(filter(None, args))      Version 3:               def stack(*args):       myList = list(args)           for item in myList:         if item is None:            myList.remove(item)       return sum(myList)      The result of all this functions is that I get always NULL back, only if there is a row with no NULL then I get a result. Background: I have a File Geodatabase with one main table and some tables which joins this table. The calulation takes place only in the main table (source columns and write column). I am using ArcGIS 10.0. The Source of these functions is this discussion: calculating a field in which null values may be present I would be really happy if somebody could help me. cheers Immanuel


Tool/Algorithm for generalizing OSM-Files for printing maps

Is there a tool or algorithm to (topological) generalizes OSM-shapes? I would like to build a printable map in different scales. In the image below you can see the same divided road (yellow) at different scales. ![enter image description here](http://i.stack.imgur.com/PPrTd.png)


How to Change the schema of SDE dataset in Connected environment

We continuously use to receive changes in Schema ( field +/-, domain changes etc ) for our Utility dataset.. Since we have swicthed to a multiuser Geodatabase ( ArcSDE on Oracle ) , we would like to make apply this schema changes without affecting our current workflow. How can we change\update the new schema on our existing SDE dataset , with minimal stoppage of the workflow ? One easy way would be to remove the existing dataset and configuring the new dataset ( which has new schema ) but wouldnt that make the existing completed jobs incompatible with the new schema ? A quick response from experts highly appreciated.


ARCGIS10: updatelayer results in error - LayerObject: Get attribute renderer does not exist

I'm quite new in using python in Arcgis 10. I wanted to use the symbology of a geostatistical layer in the TOC in another geostatistical layer in the TOC. Therefore, one should use arcpy.mapping.updatelayer. I saved the geostatistical layer as Layer file (TensorStyle.lyr). The code to copy the symbology looks like               import arcpy          mxd = arcpy.mapping.MapDocument("CURRENT")          df = arcpy.mapping.ListDataFrames(mxd)[0]          updateLayer = arcpy.mapping.ListLayers(mxd, "*", df)          sourceLayer = arcpy.mapping.Layer("TensorStyle.lyr")          for lyr in updateLayer:              arcpy.mapping.UpdateLayer(df, lyr, sourceLayer)      If I run the script I get the message: > Runtime error : LayerObject: Get attribute renderer does not exist Could you please help me. Thank you in advance, Ronny


Compile a plugin in 1.9 Qgis-dev

I am actually learning qgis and how to devellop a plugin. I have to write this plugin in C++ and not python because people coding in C++ want to modify it after. I have found some plugins in the git repository in C++ and I manage to compile it with 1.9 librairies on Qgis. But it's seems they change the constructor of the QgisPlugin. QgisPlugin( name_, description_, version_, type_) all the parameters are QString in 1.9 Qgis but "type_" was a QgisPlugin parameter before. I put a string on the constructor and I could compile the plugin in ".dll" but qgis 1.9 does'nt recognize my plugin. Do you know where I can found the source of a plugin made in 1.9 ? Thank you if you can answer my question Regards


How to display partially a WFS layer? (just the content within a box)

I need to know how to display a WFS layers, but not the whole content, only the part within a rectangle. I have this code:               var SMap = new OpenLayers.Layer.Vector("Status map", {         strategies: [new OpenLayers.Strategy.BBOX()],         protocol: new OpenLayers.Protocol.WFS({             url: "http://demo.opengeo.org/geoserver/wfs",             featureType: "states"         }),     });     SMap.setVisibility(true);     map.addLayers([SMap]);      And I also have two coordinates from this code:               controlS = new OpenLayers.Control();     OpenLayers.Util.extend(controlS, {         draw: function () {             this.box = new OpenLayers.Handler.Box(controlS,                 {"done": this.notice},                 {keyMask: OpenLayers.Handler.MOD_SHIFT});                 this.box.activate();         },         notice: function (bounds) {             var ll = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom));              var ur = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top));              alert(ll.lon.toFixed(4) + ", " +                    ll.lat.toFixed(4) + ", " +                    ur.lon.toFixed(4) + ", " +                    ur.lat.toFixed(4));         }     });     map.addControl(controlS);      What can I do to display only the WFS layer's content within the imaginary box formed by 2 pairs of coordinates? Thanks and regards, Rafael


Graphic drag and drop using ESRI Javascript API 3.7 in IE10

I am using ESRI JS API 3.7 and Dojo 1.9. I have a problem with graphic DnD in IE9 and 10, but not IE8.               this._listeners.connect("dropListener",this.esriMap, "onMouseUp", d_lang.hitch(this, function(evt) {         // some code     }));      I registered an event handler for onMouseUp to retrieve the coordinate of the location where the graphic is dropped. In IE, onMouseUp is fired only when I clicked on the map. When I dragged the graphic, the _pointerUp method in PointerEvents.js was called, but then it stopped there. No further events are fired until I clicked on the map, where the _pointerUp method will be called and in the end, onMouseUp will be fired. Any ideas how I could retrieve the location information without first clicking on the map? Thanks in advance.


How do I find the intersection of two polylines in PostGIS?

I have a set of road conditions reported for small segments of road, and I am hoping to determine the specific subset of each segment which intersect with a route along the road so that I can draw the intersection of the route and road conditions on a map. Is there a way to determine the specific points of intersection of two polylines in PostGIS in a way suitable for plotting on a Google Map? I am new to PostGIS so please accept my apologize if I am getting any terminology wrong.


Career advice in Gis field

I am a B.Tech graduate(2013) in Geo Informatics and Geo Technology.Presently, i am working i an company as Junoir Executive in Gis . I also know some programming languages like "V.B.net" and C#.My doubt is how can i improve my Career strength in this field so that i can earn handful salary ?


OpenLayers - How do I change the WMS URL in Code

I want to be able to change the url for a layer in code. The reasons is that I am implementing local caching. When local caching is Not enabled, we use 4 servers to deliver tiles to run parallel http requests. However, when the caching is enabled, it caches tiles for the four servers. There is no guarantee that the request for the same tile will be for the same server, so, potentially, the local cache may end up four times the size it needs to be. (and four copies of the same tile will be in the cache) To counter this, we have set up another server to be used only for users who are using the local cache to guarantee that the cache will always return a tile if it is there (simply because the server is always the same) I have experimented with layer.getFullRequestString( { }, url ); I am able to actually retrieve the request string if I use this syntax: layer.getFullRequestString( { } ) (note, it errors if you do not put the {} ) but have not been able to actually cause a change in the layers fetch url. The function seems to ignore the supplied url completely. I have tried a single url and a url array to no avail. Openlayers Documenmtation is as follows:               getFullRequestString:function(  newParams, altUrl   ) Combine the layer’s url with its params and these newParams.      > Add the SRS parameter from projection -- this is probably more eloquently > done via a setProjection() method, but this works for now and always. > > Parameters newParams {Object} altUrl {String} Use this as the url instead of > the layer’s url Returns {String} Any thoughts or better ways to address this very much appreciated Thanks


How to work with tables in MapBasic?

I try to get data from table use MapBasic:               Dim nCol = "ColumnName"     Fetch First From Untitled     Do While Not EOT(Untitled)       colValue = Selection.nCol     Note colValue     Fetch Next From Untitled     Loop      Compilation ends success but when i start application in MapInfo get error:               Not defined Selection.nCol      How to work with columns in this case?


How to select a polygon feature on mapservice?

I manage to publish a mapservice with lots of polygon. I wish to select a polygon and see its attributes. May I know how to I perform that with javascript API? There doesn't seems to be a straight forward solution on their sample page.


Best way to group datasets by country/region

I 'm using ArcGIS 10.0 and have a folder with misc GIS datasets from all over the world. I wrote a script that finds all of these datasets and writes them to a .csv file, but I also want to identify what country/region that dataset falls into and write it to the CSV. I thought of pulling the extent and comparing that to country specific extents would be one way to group the datasets but there would be overlap causing some data to grouped incorrectly. Any suggestions besides doing desc.extent need to be very timely since I'll be sorting through lots of data. Thanks for your help.


Why does ArcGIS for Desktop legend not always show symbol as desired?

I have a problem with the legends in the ArcMap because the patch does not show the marker symbol inside it well. Whenever, I move the legend it changes but never to what I want for every patch. I have tried legend properties, and so on but nothing helped me. You can see my legend **here**.


How to return values of its order?

I have a matrix like this:                  10 0.646519601   0   0.085929349 0.255477717 0.012073334        40 0.138403594   0   0.065979943 0.776693742 0.018922721      I want to keep the first column, and get rest numbers sorted by row. The result should be like this:                  10 5 1 2 4 3  #0.64 is the largest; 0 is the smallest in the row#        40 4 1 3 5 2


How to create filled contour lines in QGIS?

How can I create contour lines that are filled with a graduated symbol usinq QGIS? In ArcGIS for Desktop I can do **this**. What about in QGIS?


How to make grid lines opaque so just lat/long coords are on map border?

Can any one help me with adding graticules to my map? I have managed to add a lat/long grid over my map, however I want the grid lines to be opaque with just the lat/long coords on the map border - is this possible? I am using QGIS 1.8


How to add a new data frame to an MXD using C#

Does anyone have code in C# to add a new data frame (map) to an MXD? I have an MXD created in ArcMap 10.1 that has an existing data frame. I need to programmatically add a new data frame and populate it with several layers from a personal geodatabase. I'm using VS2010 with .Net 3.5. I have created a MultiItem that reads the names of folders that contain the PGDB files. After selecting a name from the list (which is populating correctly) it triggers OnSelChange. In that routine I need to create a data frame named based on the folder name selected from the MultiItem list. The name comes in just fine, but I'm stuck creating the new dataframe. I tried using IMaps.Create() but it doesn't add anything to the count of maps. I have tried then using IMaps.Add() but VS reports that Add is not defined for IMaps contrary to being described in the ArcObjects reference. The only procedure I have found is the one written in VBA using ArcObjects 10. It seems rather convoluted given there are supposed to be functional methods for IMaps to do exactly what I need. Any help would be greatly appreciated.


Splitting a bounding box into n amount of bounding boxes

Firstly, I've never worked in the GIS area before nor do I have much knowledge of the mathematics behind some of the stuff I am trying to implement. Perhaps i'm getting in over my head. **My Situation** I am creating a geospatial map viewer in Qt. So far I have a MapTile class which stores its center location (lat and long) and the width of the box in kilometers, which may or may not be a good idea. From this information I can construct a bounding box from the center point and the width by using the algorithm found here. The MapTiles are all square, no irregular shapes or rectangles. Is this a bad implementation? **My Problem** Now I am stuck with implementing my MapTileMatrix class which stores a multidimensional array of MapTiles[rows][cols]. I figured I could tell the MapTileMatrix what its bounding box is, and then have it generate the MapTiles position and width from this data. I haven't been able to find any algorithm online or mention of how to split a bounding box down into n number of sub- boundingboxes. Is there a method of dividing a bounding box into say 4 equal parts? What about 9, 16 or 25? If this is not possible perhaps I should reconsider my design. **On a side note:** Are there any guides / tutorials to implementing a map viewer application? I have read over the Web Map Tile Service and am using this as a guide. This has been my introduction to GIS programming and I have only been working on it for a few days so have little to no knowledge of the domain.


SpatiaLite: dumpkml with name and description

How does one get the optional arguments in .dumpkml working? According to the .help .dumpkml should work like this: > .dumpkml table_name geom_column kml_path [precision] [name_column] > [desc_column] I can get it working with > .dumpkml table geom table.kml But every point is just called 'name' and when I try: > .dumpkml table geom table.kml name_column=column All I do is lose the geometry (x,y=0,0) and everything still gets called 'name' rather than the value within the specified column. Any assistance appreciated, Phil.


Asynchronous Geoserver WPS Example

Anyone have a Java based example of how to implement an asynchronous Geoserver web processing service (WPS)? Based on some presentations that I found, async GeoServer WPS support was added in 2.1.3. I've searched the internet and also the GeoServer and GeoTools websites with no luck. Thanks in advance. My environment = PostgreSQL 9.2.7 + PostGIS + GeoServer 2.4.5 + JDK 1.7


ArcGIS basemap Url and querystring parameters

This is very basic question but might quite important.While creating Arcobjects addin we give Url for basemap as Following: `http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer?f=lyr&v=9.2` At the end of the url there are few querystring parameters such as f=lyr and v=9.2. For this example they are **f** stand for Format as Lyr and **v** is I think is gdb version that is 9.2 . My question there will be more such querystring parameter and values that might determine datum and projection etc.So if anybody has any help regarding this then please shed some light.


Export "Zonal Statistics As Table" output in Modelbuilder

I have an extremely simple model that takes as input a shapefile for zones along with a value raster. All the model does is produce a table of my desired zonal statistic for each zone (the mean). **Next, I hope to get Modelbuilder to export those results** into a txt or other file I can easily manipulate later in Excel. I have about 48 rasters for which I would like to do this, and I can copy and paste the desired columns side-by-side into the Excel file myself, so although it will be a bit tedious I'm not worried about that. But it _would_ be nice if there were a way to automatically export the table. Is this possible in Modelbuilder? _Other background info, if helpful: I found the following exchange intriguing (Iterate through multiple Raster files and compute statistics using Zonal Statistics), and had hoped to be able to iterate my rasters and have them automatically append all in one table which I could later export myself in one easy click. I was unsuccessful in getting this to work, perhaps due to my misunderstanding of properly calling the target files, column names, etc. (I got the models described here to work perfectly well on my data... except that I could not successfully automate adding and naming new fields... my result had one field with the final raster/statistic having overwritten the others.)_ ETA: I'm using ArcGIS 10.2.1


clip linestring by length

Is there a way to clip a linestring based on distance? For example, linestring from a to b is 150 meters. I would like to get the linestring from a to a point that is is 75 meters away from a following the a-b linestring. What I have thought until now is to get the line NpointCount and start adding together small line segments until I get close to 75 meters, but still, how am I supposed to add the final line segment? I hope I am making sense here.. thanks in advance!


GDAL tiling DTED (dt2) dataset as gdal2tiles for 3D Maps

i am searching some webgl technologies to create 3d map with digital elevation data. for web tech. i have found ReadyMap SDK to create 3d map from TMS... in ReadyMap for elevation data it uses sth below to create a json data from tile which consists of tifs.               map.addElevationLayer(new ReadyMap.TMSElevationLayer({                 name: "Elevation",                 url: "http://readymap.org/readymap/tiles/1.0.0/9",                 args: "json=true",                 tmsType: "google"             }));      in TMS mechanism one tile scheme is sth like this: tms scheme : 10/294/752.jpg in google scheme : 10/294/271.jpg and for elevation data ReadyMap uses tiles as below: http://readymap.org/readymap/tiles/1.0.0/9/7/157/94.json?json=true i think in above link in zoom 7, folder name 157 and tile name 94 is both jpg and json format . jpg formats for tiles is in other storage or server.... and my question is that for creating digital elevation how can i tile my dted files like TMS scheme for creating digital elevation data? can i tile dted 2 with gdal2tiles or sth? thank you...


How to calculate tortuosity of a coastline?

I would like to calculate the **tortuosity** (or fractal dimension) of a coastline within a 1km buffer surrounding a point on that coastline. I have hundreds of points and therefore need a tool or scripts that will do the calculation on a mass scale. Can someone help me please? I am using ArcMap10


How to access .shp file from local computer or some other server

Below is the code in which we can access a feature layer from ArcGIS sample server. queryTask = new esri.arcgis.gmaps.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3"); But I want to access my own .shp file residing on my local computer or on another server, e.g this.. queryTask = new esri.arcgis.gmaps.QueryTask("http://172.20.100.12/Demo/Resources/ABC.shp"); In this case, queryTask does not return featureSet and so .shp file could not display on Map. Can anybody help me .. where is problem and how i can fix it.


ArcGIS Server 10.1 publish geoprocessing tools

I have been trying to publish a geoprocessing tool to our new ArcGIS for Server 10.1 with SP1. I configured the serves to not to copy data to server when publishing services. The tool ran well and was shared as a service definition file successfully from ArcCatalog. It however always failed in publish server from ArcGIS Server Web Manager due to the following error:               ERROR 001488: The service you are trying to publish includes data but the site has been configured such that data cannot be copied to the server. ERROR 001364: Validation of service definition failed. Failed to execute (Publish Service Definition). Failed.      I have been kind of fed up with the cumbersome and doggy way of publishing map/geoproc services introduced in the new ArcGIS Server 10.1. Version 10 has a much easier and clearer way of doing it. Can anyone help with any hints? Thanks Alex


Why is my polyline on the wrong bearing?

I am trying to overlay duplicate segments of polylines on a map via javascript. I am using latlon.js and geo.js from here The idea is that a user can input the distance they have travelled and when the map is refreshed, a second multipolyline will be added. To calculate the the point which represents where the user currently is, I am using a known previous location and known 'next location' to calculate a bearing between the two and then using that bearing, combined with the distance the user has travelled to calculate where they are now, before finally creating a new polyline based on that data. The problem is that this new polyline is drawn incorrectly on my map and I don't understand why. You can see the problem at [removed]. Log in as User2/pass2 and then select 'challenges' from the nav bar. The most relevant code from map.js follows. I am using leaflet maps.                 var userDistance = GymloopChallenge.user_distance;       var lastPoint;       var comparisonArr = []; //used to calculate bearing       if (userDistance <= dist1) {           comparisonArr = [rioLL,laLL];           distToAdd = Math.abs(userDistance);           userPoly = [];           lastPoint = rioLL;           console.log('if 1');            } else if(userDistance >= dist1 && userDistance <= dist2 ) {           comparisonArr = [laLL,nyLL];           distToAdd = Math.abs(dist2 - userDistance);           userPoly = [line5];           lastPoint = laLL;           console.log('if 2');       } else if (userDistance > dist2 && userDistance <= dist3) {           comparisonArr = [nyLL,lonLL];           distToAdd = Math.abs(userDistance - dist3);           userPoly = [line5, line1];           lastPoint = nyLL;           console.log('if 3');       } else if (userDistance > dist3 && userDistance <= dist4) {           comparisonArr = [lonLL,sydLL];           distToAdd = Math.abs(userDistance - dist4);           userPoly = [line5,line1,line2];           lastPoint = lonLL;           console.log('if 4');       } else if (userDistance > dist4 && userDistance <= dist5) {           comparisonArr = [sydLL,tokLL];           distToAdd = Math.abs(userDistance - dist5);           userPoly = [line5,line1,line2,line3];           lastPoint = sydLL;           console.log('if 5');       }          console.log("Distance to add: "+ distToAdd)     //console.log("COmparison array: "+comparisonArr);       var bearing = comparisonArr[0].finalBearingTo(comparisonArr[1]);       var userLocation = lastPoint.destinationPoint(bearing, distToAdd);       //console.log(userLocation);            userLineStartPoint = new L.LatLng(lastPoint._lat,lastPoint._lon );       userLocationMapPoint = new L.LatLng(userLocation._lat,userLocation._lon );       userPoly.push(new Array(userLineStartPoint ,userLocationMapPoint));       console.log(userPoly);         var userPolyline = new L.MultiPolyline(userPoly, {           color: 'red',           id:'poly2',           weight: 3,           opacity: 0.8            });       map.addLayer(userPolyline);


How can i calculate average slope and length of slope of a multiple field farm in Arcmap 10?

I always calculate slope on farms i review with 2' contour lines. Some fields are difficult since i need the average slope, but the field is rolling hills. I usally take several slopes and take the average. I want to have a way to do this in ArcMap 10. Most farms have 6 - 10 fields and every field needs its individual slope (in degree) and slope length.


How to start creating a map and exporting it as a raster MBTiles file

I am new to this whole GIS thing (my background is software-development, but not GIS) but I am super interested in making maps. So I started playing around with TileMill and was making my first steps there. Now I know the basics of where to get data from, CartoCSS, Elevation Data, GeoTiffs and so on... My goal: A outdoor map as an MBTiles file with raster data in it. The data should cover parts of Europe. Alright... I guess I should start by asking the following questions: **Tools:** Which tool would you suggest for that job? Would TileMill work? Will I have problems with TileMill2 if I want to render raster data? (Would this tool help?) I need to add GeoTiff overlays as well. TileMill2 wont be able to do that right? I also don't want to add the raster data on top of the rest, but as a layer in the middle. I am on a Mac, so Tools that would run on my machine would be best :) But if there is like _THE_ tool for it that only runs on Windows or Linux I should be able to get my hands on it as well... Oh, and inexpensive/free tools are preferred **Data:** Where do I best get my data from? When playing in TileMill1 I downloaded data from geofabrik. Now it seems as if the data isn't complete in there. Especially information about mountains... where there is forest and so on is pretty limited it seems... So I went over to TileMill2 and started playing around there. The "Mapbox Streets V4" layer has quite some information in there... But then I get very little information about f.e. where buildings are. Are there any other remote sources I can add to TileMill2? Some that are more suitable for an outdoor map? **Style my map:** In MapQuest when you zoom out you get this nice world map with sand in Africa, green in Europe, Ice at the poles.... how do they draw that? Is that the Humanitarian Data Model? I already learned how to get elevation data and how to make it visible with gdal. Is this the way to go? But then I would need a tool (like TileMill1) where I can add this raster layer. TileMill2 wont support that, right? So many questions! Thanks in advance for any tips!


Importing multiple GeoTiffs in TileMill

I am a software engineer that is very new in the geo world. So excuse my ignorance if this question seems simple or if terms I use are totally wrong. **Problem:** I have been tasked with taking multiple geotiffs and serving them from a map tile system on our servers. From my research so far, I believe that I need to convert these geotiffs to mbtiles. I've got the serving of the mbtiles part figured out, what I really need help on is coming up with a quick way to convert the geotiffs into mbtiles. **Things I've tried:** I currently have a script that can do this conversion of 56GB of Geotiffs in about 7.25 hours using gdalbuildvrt, gdalwarp, and gdal2tiles. Here is what it does:               ls -1 *.tiff > files.txt     gdalbuildvrt -input_file_list files.txt project.vrt     gdalwarp -t_srs EPSG:3857 -of VRT project.vrt project_mercator.vrt     gdal2tiles.py project_mercator.vrt project.mbtiles      It works but I'd like to improve on this. I've heard that it might be faster to use TileMill to export, but so far my attempts to import the geotiffs into TileMill have failed. I have 158 geotiffs and I don't want to have to "Add Layer" for each one using the interface. I thought I might be able to import the .vrt file I generated in my own script but when I try to add it in TileMill I get an error that says, "GDALWarpOptions.Validate() hSrsDS is not set". **Question to the community:** What is the best way to import multiple geotiffs into a TileMill project?


How to get a set of all buildings of an OpenStreetMap section in form of single points / Multiple polygons as one point

The objective is to get a set of all buildings of an Open Street Map section in form of single points in a shapfile.   1. I downloaded the section from osm.    2. Imported the section into QGIS (and later imported it into a PostGis db using osm2pgsql)   3. To transform the polygons (representing buildings) into points I used the Polygon Centroids function Unfortunately some of the buildings are represented by multiple polygons subsequenty I did get multiple points for one building which I is not what I wanted. Searching the web I found out that these polygons should be multipolygons but neither qgis nor osm2pgsql does import these relations so that I could merge the poygons of a building Any ideas how i could get single point list of the buildings?


Howto create complex polygon with pyshp

using the pyshp library (https://code.google.com/p/pyshp/) I am trying to create a "complex" polgon with one hole inside the main-poly plus one island- poly. It should look like this: ![enter image description here](http://i.stack.imgur.com/fgahs.jpg) I used the following code from the docu, only changing the number of points and using anticlockwise rotation for the hole:               import shapefile     w = shapefile.Writer(shapefile.POLYGON)     w.poly(parts=[[[0,50],[50,50],[50,0],[0,0],[0,50],[10,40],[10,10],[30,10],[30,40],[10,40],[70,20],[100,20],[100,0],[70,0],[70,20]]])     w.field('FIRST_FLD','C','40')     w.field('SECOND_FLD','C','40')     w.record('Poly','PolyTest')     w.save('TESTPOLY')      I get this: ![enter image description here](http://i.stack.imgur.com/JRQbD.jpg) Obviously I am making a stupid python-rookie-error. Any hints are very appreciated. Thanks.


Why can't I save a line shapefile?

I'm working with qgis v. 2.0.1. I have some data points and I just wanted to create a new shapefile with line geometry. In the new vectorlayer-window, I added some attributes (approx. 10) and klicked ok but it didn't create a shapefile (nothing happened). I tried again without adding any attributes and it worked. Why is there a problem when I want to add some attributes? Of course I could add attributes with the Table Manager or manually in the attribute table but I'm just wondering why it's not working this way. Thanks.


Failed to create signature file

I need some help, because I've no clue how solve this issue the exercise that I'm trying to perform. The point where I'm stuck is 4. "Create signature file as LandsatCompS.sgs". I've done what it says in the exercise. I got a error message "Failed to create signature file. The aim of the exercise is to carry out a supervised image classification of the Northern half of Jutland. 1\. Start ArcMap and add the Landsat images from the B series (summer images).   1. Create a composite image composite image for all bands except band 6 – the thermal band. Save the image as LandsatCompS (S for summer).   2. Open the orthophotos for land (not urban). Add eventually more orthophotos from the Geodata library. Try to identify the necessary number of different land cover classes to cover all areas on the orthophotos. Not more than 15!   3. Open the Image Classification window, and start digitising training areas. Two for each class. **Create the signature file as LandsatCompS.gsg.**   4. Carry out maximum likelihood classification using LandsatCompS as input raster and LandsatCompS.gsg as signature file. Output is ML_class_NJ1. Use default values for the other inputs.   5. Put the right colours on the new map and compare with the orthophoto and other maps available for Northern Jutland.   6. Where are the problems? Try to make an improved classification by increase the number of classes and digitise new training areas. Carry out the classification and assess the result. Which one is best? ![Classes](http://i.stack.imgur.com/uj7N0.jpg) ![Error message](http://i.stack.imgur.com/OWrS6.jpg) ![Landsat Image](http://i.stack.imgur.com/OQfRO.jpg) ![Training samples](http://i.stack.imgur.com/mNU3E.jpg) ![enter image description here](http://i.stack.imgur.com/wNgdZ.jpg)


How to properly assign spatial reference to converted AutoCAD data?

I know this is a frequent problem, I myself confronted with this problem many times, yet somehow each Autocad dataset I received is different (although they're from the same area). To some data, the projection I gave them worked perfectly, and in this case it didn't. So, I've recently received some AutoCad data. Converted them in ArcMap. They are missing spatial reference. But I know their location. They're suppose to be in a specific city in Romania. So first thing I did, I gave them the Stereo 70 projection (Romania's national projection), I assumed this is the projection they were created in, the data gets somewhere in the middle of the Mediterranean Sea. Second thing I tried is is giving them WGS84, and they got somewhere in the Atlantic Ocean ;) PS: I use ArcGIS 10.1 PS2: I've tried all 3 conversion methods (I know) in ArcMap. PS3: The autocad data came with no spatial reference. I only know they should be in a specific city.


404 Error with Openlayers WMS layer

I'm trying to create a map with the combination of openlayers and extjs. The map works fine and everything seems to be fine except for a a few 404 errors which I get in the browser console. Although this doesn't seem to affect any functionality, I had to get rid of this. The code and the error is as below: Layer creation:               var wmsLayer = new OpenLayers.Layer.WMS("vmap0",                               "label",                               {'displayInLayerSwitcher':false                               });      Error:               "NetworkError: 404 Not Found - http://localhost:8080/myproject/label?DISPLAYINLAYERSWITCHER=false&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-16.857142857143,-106.85714285714,56.285714285714&WIDTH=256&HEIGHT=256"      I get 15 error of same type except that the value in the `BBOX` parameter alone changes. Please help to get rid of this errors. Code to draw layers:               var vecLayer = new OpenLayers.Layer.Vector("vector", {                           rendererOptions: { zIndexing: true },                           styleMap: new OpenLayers.StyleMap({                               'default': allCountryStyle,                               "select": new OpenLayers.Style({                                   strokeWidth: 3,                                   strokeColor: "#000000",                                   graphicZIndex: 2                               })                           }                           ),                           protocol: new OpenLayers.Protocol.HTTP({                               url: url,                               format: new OpenLayers.Format.GeoJSON()                           }),                           strategies: [new OpenLayers.Strategy.Fixed()]                       });


Accessing GeoServer on my own domain

I am running GeoServer 2.4.3 on Ubuntu Server 12.04 and tomcat7 and I want to access it on mydomain.com. I have searched a lot and found the all the solutions suggest to use a ProxyPass. One of the posts on GIS Stack Exchange that has a similar problem is this one but the website to the solution provided in the post is down! This is what I have been doing so far: Added the follwing to `/etc/apache2/sites-available/default`                ServerName mydomain.com      ProxyRequests Off      ProxyPreserveHost On           <Proxy *>          Order deny,allow           Allow from all       </Proxy>      ProxyPass /geoserver http://servername:8080/geoserver      ProxyPassReverse /geoserver http://servername:8080/geoserver      Then I have edited `/var/lib/tomcat7/webapps/geoserver/WEB-INF/web.xml`               <context-param>           <param-name>PROXY_BASE_URL</param-name>           <param-value>http://mydomain.com:8080/geoserver/</param-value>         </context-param>      Finally, I have added In GeoServer > Global Settings > Proxy Base URL > http://mydomain.com:8080/geoserver/ Now, when I am trying to enter mydomain.com:8080/geoserver I get Unable to connect error! What I have been doing wrong? Any ideas?


How to use Advanced Symbology in ArcGIS for Android?

I try to use the advanced symbology in order to draw nato symbols in JAVA I need little help about it,   1. What the parameters _WKID mean like in this command : lmessage.setProperty("_WKID", "3857");   2. What the parameter UniqueDesignation mean?   3. THE MOST IMPORTENT QUESTION: How can send parameters to symboles llike the symbole "Target" (TACGRP.FSUPP.PNT.TGT.PTGT) (2.X.4.1.1.1) with sic G*FPPTS--- _*_ *X parameters like "Target Alt" , "Description" and "Name"?


How to access the button on the form?

I have a form that appears when you start the plugin.How do I properly apply to the button on the form, so that when you click on the button performed "function".               import sys,os     import win32api     from PyQt4.QtCore import *     from PyQt4.QtGui import *     from qgis.core import *     import ctypes     from PyQt4 import uic          class HelloWorld:        def __init__(self, iface):             self.iface = iface           self.canvas = iface.mapCanvas()             def initGui(self):             pushButton=QPushButton("pushButton")           self.action = QAction(QIcon(":/plugins/"), "&HelloWorld", self.iface.mainWindow())           self.action.setWhatsThis("Configuration for test plugin")           self.action.setStatusTip("This is status tip")           QObject.connect(self.action, SIGNAL("activated()"), self.hello_world)                 QObject.connect(pushButton, SIGNAL("clicked()"),self.function)                self.iface.addPluginToMenu("HelloWorld", self.action)                def unload(self):               self.iface.removePluginMenu("HelloWorld",self.action)           self.iface.removeToolBarIcon(self.action)             def function(self):           QMessageBox.information(self.iface.mainWindow(), QCoreApplication.translate('HelloWorld', "HelloWorld"), QCoreApplication.translate('HelloWorld', "HelloWorld"))           return             def hello_world(self):                 path = os.path.dirname( os.path.abspath( __file__ ) )           self.optionsDialog = uic.loadUi(os.path.join(path,"untitled.ui"))           self.optionsDialog.show()          if __name__ == "__main__":        pass


Where does Geo-Platform fit in a GeoStack?

I am totally new to GIS development and I am trying to grasp the concept. From my understanding the stack looks as follows (Please correct me): Back End GIS Server: GeoServer/GeoNode/ArcGIS Server (Some of the back end servers do have their own spatial database - however, PostGIS can still be used in conjunction with them) Back End Spatial Database (optional): PostgreSQL/PostGIS database can be used in conjunction with back end GIS server (ArcGIS for example) Front End Library (to display the shapes/points on top of a map(Google Maps/Open Street/etc.)): Openlayers, lefletjs and GeoExt Now I am reading about Geo-Platform and I am not sure where exactly does it fit in the above?


Field-based hyperlinks in an ArcMap map package (.mpk)?

I have a point shapefile where each point has multiple hyperlink fields in its attribute table as per this useful question and answer. These hyperlinks are to photos stored locally. Ideally I want to bundle up the map (shapefiles and all) and the photos and export them as a map package (*.mpk) so that the receiver can open it up and click on the hyperlinks in the shapefiles. Is there any way of doing this? I know the map package export function has the option to include additional files but I am not sure how to get this to work for me. Attachments are not an option, as my licence is Basic, and geodatabases or dynamic hyperlinks are not options as I need each point feature to link to multiple photos. Thanks!


Examples of Animated maps

I am currently looking examples of animated maps. Creating animated maps with the help of this post and similar post checking Animaps site also I am presenting this map in local school so those students should take interest to learn and create various simple interactive maps. I am in process to create animated map contains Gardens and amusement parks across the city. So any help will be great !!! Thanks in advance : )