What are benefits of using ArcGIS with PostgreSQL over simply ArcSDE?

I understand that in order to benefit from ArcGIS spatial datatypes (ST_GEOMETRY, versioned geodatabases etc.) ArcSDE needs to be installed - and with the 10.1 client it is automatically installed (two-tier client>>DBMS, see **here**. However, I'm still trying to figure out the benefits of connecting an Esri front end to PostgreSQL (or Oracle). Is it purely back-end benefits, such as scalability /performance / redundancy / DBAability, or are there any extra front-end features offered by a PostgreSQL / PostGIS setup? The Esri **help** does not seem to elaborate FYI, I'm pretty much a database newbie who is designing a GIS dissertation aimed at illustrating why Postgresql / PostGIS / QGIS is more scalable / flexible (and cheaper) than ArcGIS / any database, so must also consider above scenario, which I can't afford to implement. Any links on this last point, especially regarding workflow (e.g. not having loads of shapefiles cluttering everything up) most welcome. d.


What is the formula to convert WGS84 coordinates to EPSG 2163?

I'm looking for the formula which converts wgs84 coordinates to epsg 2163. I know that QGIS can do the calculations but I need the exact formula. Cheers!


Spatial graphing, distribution of polygon area over latitudes

Given a polygon in a PostGIS database, what is the best way to create a graph of its distribution over a range of latitudes? I'm picturing a graph of a curve, where the proportion of the total area under the curve that lies between two points on the x-axis (latitude) represents the proportion of the polygon's area between those latitudes. The tools I have at my disposal are PostGIS and R. It seems like this should be a fairly routine exercise for which there are well established approaches that I simply haven't been able to find.


How do I add elevation data to a GeoJSON line from a GPX file?

I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to convert gpx to geojson. I've also loaded the gpx file into QGIS and saved as a geojson file, but neither method brings in elevation when I do this to the gpx tracks. It will bring in elevation as a Property if I convert the points, but I need a line. Ultimately, I want to diplay these lines in Leaflet and build elevation profiles for them. Is there any easy way to do this other than parsing out the gpx files and building my own geojson files?


Creating a featureclass in memory and adding to the map error

I have the code below, which is supposed to create a new featureclass in memory then add the FC to the map, but I get a Automation error when I use the createfeatureclass method > Set pFC = pFeatWS.CreateFeatureClass("NewBus", pFields, Nothing, Nothing, > esriFTSimple, "Shape", " ") Here' s the full code               Public Sub InMemoryWorkspace()          'Create Workspace factory     Dim pWorkspaceFactory As IWorkspaceFactory2     Set pWorkspaceFactory = New InMemoryWorkspaceFactory          'Create workspace     Dim pWorkspaceName As IWorkspaceName2     Set pWorkspaceName = pWorkspaceFactory.Create("", "MyInMemoryworkspace", Nothing, 0)          'Get a handle on Name     Dim PName As IName     Set PName = pWorkspaceName          'Get handle on Featureworkspace     Dim pFeatWS As IFeatureWorkspace     Set pFeatWS = PName.Open          'Create field object and set number of fields     Dim pFields As IFields     Set pFields = New Fields     Dim pFieldsEdit As IFieldsEdit     Set pFieldsEdit = pFields     pFieldsEdit.FieldCount = 3          'Create objectID field     Dim pField As IField     Set pField = New Field     Dim pFieldEdit As IFieldEdit     Set pFieldEdit = pField     With pFieldEdit         .Name = "OBJECTID"         .Type = esriFieldTypeOID     End With     Set pFieldsEdit.Field(0) = pField          'Create postcode field          Set pField = New Field          Set pFieldEdit = pField     With pFieldEdit         .Name = "POSTCODE"         .Type = esriFieldTypeString     End With     Set pFieldsEdit.Field(1) = pField          'Create Shape field     Set pField = New Field     Set pFieldEdit = pField     With pFieldEdit         .Name = "SHAPE"         .Type = esriFieldTypeGeometry     End With     Set pFieldsEdit.Field(2) = pField               Dim pGeomDef As IGeometryDef     Dim pGeomDefEdit As IGeometryDefEdit     Set pGeomDef = New GeometryDef     Set pGeomDefEdit = pGeomDef     With pGeomDefEdit       .GeometryType = esriGeometryPolygon       Set .SpatialReference = New UnknownCoordinateSystem     End With     Set pFieldEdit.GeometryDef = pGeomDef     pFieldsEdit.AddField pField          ' Create featureclass      Dim pFC As IFeatureClass      Set pFC = pFeatWS.CreateFeatureClass("NewBus", pFields, Nothing, Nothing, esriFTSimple, "Shape", " ")           Dim pmemLayer As IFeatureLayer      Set pmemLayer.featureClass = pFC           Dim pmxdoc As IMxDocument      Set pmxdoc = ThisDocument      Dim pmap As IMap      Set pmap = pmxdoc.FocusMap           pmap.AddLayer pFC      Can someone explain where I am going wrong. Cheers


ArcGIS Routing on Android with Network Analyst module

I am currently developing an Android App for navigation purposes. It is based on the ArcGIS Android API. I have an ArcGIS server (with network analyst module) with all the needed data running. At the moment the App displays a map with the current position (point A) and has a search form, where you can search for a building (point B). The next step would be to display a route from "point A" to "point B". Does anybody know if there is a way to do that natively with the Android API? Also it would be possible to compute the routing information on a Java web service and then send it to the app, which only has to display it. I cannot find any sample code on the ArcGIS resource page.


IDRISI .vec file translator to ESRI shapefile format?

I've recently got hold of almost 20 years old IDRISI .vec files which I'd like to convert to ESRI shapefile. I've been struggling to find any translator for this file format so far. Does anybody know of a way to convert this type of file? Any help much appreciated! Many thanks. P.S. I'm going to post cross post on the http://forums.arcgis.com/


Sea routes network dataset

I am now working on a system to perform routing on a network of shipping lanes. See this dataset that I have as the base: http://geocommons.com/maps/109850 I have postgres and pgrouting up and running and I was able to run basic queries on the above dataset after importing it to postgres/postgis. However I have encountered some problems for which I seek advice from you.   1. A lot of lines have a duplicate, so say line A goes from source id 1 to source id 2 and line B goes from source id 2 to source id 1 and they overlap completely. This can be experienced a lot of times, and frankly, I would be happy to get rid of them so that finally I could have a network with only one polyline per direction.   2. I discovered that the distance value attributes of the referenced dataset are false. I noticed this when I checked the dataset with Global Mapper by using the Info tool. In the window that pops up, you can see the geometry textbox with bounds and length data. For a line I inspected that displayed a length value of 5300 some kilometres while the max value in the length column of the dataset was 110. I seek for a way to acquire those polyline length values, and assign them to a new attribute column. I have already found posts about how to do this in qgis and arcgis, but neither of them provided the results I wanted to get. The route dataset is in WGS84, latlon I hope the lines above make sense, and I appreciate any help! Thanks in advance! Tamas


Google maps POI download

Is there any legal way to search and download google maps POI , based on user location and search radius (50 km) + search criteria ( eg restaurent) ? Output shall be Kml/csv .


Why is the database connection lost on every query?

Every time I started a query the connection with the database is lost. Anyone familiar with this problem? This problem occurs with various query, for instance:               CREATE TABLE table     SELECT a.*, b.column, b.column      FROM table_a a JOIN table b      ON ST_intersects (a.geom, b.the_geom)     WHERE st_IsValid (a.geom);      I just updated from postgis 1.5.3 to 1.5.5 but that doesn't seem to help. Anyone an idea? * * * **UPDATE** I solved the problem. There was something wrong with the topology of one of the layers. After editing the query worked without disconnecting. I find it rather strange that the program and service crashes when the topology is not correct. Can someone shed a light on this issue.


uDig Connects to PostGIS but not QGIS

I recently installed QGIS 2.0.1 and uDig 1.40b on the same computer. PostGIS (from OpenGEO Suite) is running on my server. I'm able to connect to PostGIS and access layers with uDig but not with QGIS. Any thoughts why uDig works but not QGIS? I've tried previous versions of QGIS but without success. UPDATE: Thanks to all of you responding to my question. I have a few items to update my original question. Below is the parameters entered in QGIS to connect to PostGIS on a remote server (and, yes, the port for PostGIS is 54321). ![enter image description here](http://i.stack.imgur.com/BBi2d.png) The error message is below. ![enter image description here](http://i.stack.imgur.com/gGN78.png) I have recently connected to the PostGIS database with OpenJump without problems (as well as with uDig). Your thoughts are greatly appreciated. Scott UPDATE 2: In response to recent questions: (1) uDig, OpenJump and QGIS are all on the same client computer and OpenGEO is on a separate server, (2) pg_hba.conf has the following settings: # IPv4 local connections: host all all 0.0.0.1/0 trust, (3) postgresql.conf has the following settings: listen_addresses = '*' port = 54321, (4) tables and field names are all in lower case, and (5) same credentials used for QGIS, uDig and OpenJump. UPDATE 3: In place of the computer name (on the local network) I entered the IP address of the server and the connection was made between QGIS and PostGIS. It appears (in my situation) I cannot enter the hostname of the server to make the connection, only the IP. Anyone else encounter this phenomena? FINAL UPDATE: YES! The issue with the setting for IPv6 solved the problem. I'm able to connect to the server by its hostname as well as its IP address.


Rings not displaying on .TAB import to .SHP save

I have some strange behaviour happening when importing a MapInfo .TAB file into QGIS. One feature contains internal rings which are ok on initial import but do not show on the first .SHP save. I can see the ring perimeter but selecting picks the feature as a whole, shading in the ring areas. It's only if I save again that they appear properly cutout and all appears ok. I've used the MapInfo file with Manifold and no issues in that software. However saving the file as a .MIF in Manifold and importing into QGIS I lose the rings in the initial import and again need to save twice to .SHP to get them to appear ok. Just wondered if anyone had an explanation?


Should slow refresh rate be expected while viewing 1000 points out of 100 million using ArcSDE/Oracle?

Is it normal to experience very slow refresh rate in ArcMap with 1000 points shown out of 100 million using ArcSDE/Oracle? I’am testing a setup with ArcSDE/Oracle database to contain geographical data. One table contains 100 million and another table contains 70,000 polygons. The refresh rate while viewing the polygon table in ArcMap is fast but very slow for the point table. I do not expect to be able to look at all the 100 million points at the same time, but thought it should be possible to use the “definition query” option to only work with a subset of the data (for instance the points with id between 1-1000). The definition query works fine and only the points with id between 1 and 1000 are shown on the map, but the refresh rate is extremely slow for some areas. These areas are where points are located in the point table, as expected these points are not shown because of the definition query but then why is the refresh rate so slow when only 1000 points total are shown? When zoom to layer is used refresh takes 1 sec at scale 1:30,000 and 4 min at 1:500.000 with the same data shown. See http://youtu.be/b-9ubqHy7nM . The network activity shows that the local computer only receives data for areas where the points are shown and the CPU is not stressed either so it is not because the local computer are doing anything. It seems almost like there is no spatial index or there is something wrong with it, but this is not the case. In Oracles SQL Developer spatial queries for points within a certain polygon and for a certain id works very fast. Is it possible that a setting somewhere in the setup causes the poor refresh rate in ArcMap or is this normal behavior for tables containing this amount of points? I appreciate it if any of you guys can cast some light on what refresh rate I should expect. **UPDATE** Versions in use: ArcGIS 10.1, Oracle 11g, I’m a little unclear about the version of ArcSDE but the describe function (arcpy.Describe(“DB_connection.sde").release) returns 3,0,0. Feature Class Properties->Index under spatial index shows this ![enter image description here](http://i.stack.imgur.com/rGTZO.png)


MapServer: How to display and style a Text layer?

I'm trying to display a text layer using MapServer, but I'm kind of confused how to get it to display properly. When opening the .TAB file in a GIS application (in this case, MapInfo Profressional) the labels show up correctly. They all show up in the correct location with varying sizes and angles. When looking at the output of MapServer for this layer, there are the following problems: The layer is blank unless I set `STYLEITEM "AUTO"` for the layer. If I try to set the style manually, the settings seem to be ignored. When displaying the layer using `STYLEITEM "AUTO"`, all of the labels are rendered in the same font size and with no rotation. Excerpt from the .map file is below (I've excluded other layers):                       MAP             NAME    mymap             IMAGETYPE   PNG             EXTENT          259997 100002 399997 160002             SIZE        550 450             SHAPEPATH   "./"             CONFIG "MS_ERRORFILE" "/var/log/mapserver/mymap_error.log"         WEB                 LOG '/var/log/mapserver/mymap.log'                 METADATA                 WMS_TITLE   "My WMS Title"                 wms_srs     "EPSG:27700"                 wfs_srs     "EPSG:27700"                 wfs_title   "WFS Test"                 wfs_enable_request  "*"                 ows_enable_request  "*"                 wfs_onlineresource  "http://[AN IP]/maps/vectors/mymap&"                 ows_onlineresource  "http://[AN IP]/maps/vectors/mymap&"                 wfs_maxfeatures "50"             END #METADATA         END #WEB              PROJECTION             "init=epsg:27700"         END #PROJECTION          LAYER             NAME "Mastermap_Text"             DEBUG 2             METADATA                     "wfs_typename"          "Mastermap_Text"                     wfs_title               "Mastermap_Text"                     wfs_srs                 "EPSG:27700"                     gml_include_items       "all"                     gml_featureid           "PRN"                     wfs_enable_request      "*"                     ows_enable_request      "*"             END #METADATA                  TYPE ANNOTATION             STATUS OFF             DUMP    TRUE             CONNECTIONTYPE OGR             CONNECTION "/path/to/maps/vectors/Mastermap_Text.tab"             STYLEITEM "AUTO"                  PROJECTION                 "init=epsg:27700"             END #PROJECTION                  CLASS                 NAME "Mastermap_Text"             END #CLASS     END #LAYER      When trying to view this layer, I'm using an URL similar to: `http://[AN IP ADDRESS]/maps/vectors/mymap?LAYERS=Mastermap_Text&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A27700&BBOX=328800,146642,329680,147522&WIDTH=256&HEIGHT=256` As states, the above .map file results in an image of the text labels being generated, but they are all the same font size and they have no rotation. If I remove the `STYLEITEM "AUTO"` line and add a `STYLE` block to the `CLASS` (with `COLOR` and `SIZE` attributes), I get a blank image. Similarly, adding a `LABEL` block with the respective styles also doesn't help. What am I doing wrong? _Edit to add images:_ **Mastermap_Text layer viewed using MapInfo Professional** ![Mastermap_Text layer viewed using MapInfo Professional](http://i.stack.imgur.com/mZggi.png) **Mastermap_Text layer rendered by MapServer when using the above URL** ![Mastermap_Text layer rendered by MapServer when using the above URL](http://i.stack.imgur.com/66gfI.png) **Mastermap_Text layer generated by shp2img:** `shp2img -m mymap.map -o test.png -l Mastermap_Text` ![Mastermap_Text layer generated by shp2img](http://i.stack.imgur.com/xlri7.png)


How to create good quality picture marker symbols with ArcMAP

I have created a nice clean symbol in Illustrator. After exporting to .emf format and appending to objects in ArcMap the symbol looks terrible (see Attatchment). Has anyone found a way to import good vectors into ArcMAP? ArcMAP Symbol ![Symbol in ArcMAP](http://i.stack.imgur.com/XyANo.jpg) Illustrator Symbol ![Symbol Illustdrator](http://i.stack.imgur.com/P6qM4.jpg)


Grouping Multiple Raster Layers

My question is how to create multiple raster layers group, for example when using several aerial photos. I wish to group the layers into one so that I can edit/select as a batch rather than having to click on individual layers. I use ArcGIS 10.2. Thank you in advance!


Arcpy Closest Facility Layer unable to retrieve CFRoutes table

I am using the following code:               import arcpy, os, sys          from arcpy import env          arcpy.env.workspace = "C:\\Users\\Ant\\Documents\\ArcGIS\\ITN.gdb"     arcpy.RefreshCatalog("C:\\Users\\Ant\\Documents\\ArcGIS\\ITN.gdb")     env.overwriteOutput = True     inNetworkDataset = "C:\Users\Ant\Documents\ArcGIS\OSMaster.gdb\ITN_Network\ITN_NetworkDataset"     impedanceAttribute = "Drive"     searchTolerance = "5000 Meters"     accumulateAttributeName = ["Length", "Drive"]     inFacilities = "TL_chemistsV3"     inIncidents = "BLPUs_Points"     outLayerFile = "ProxChemistsCF.lyr"     outNALayer = arcpy.na.MakeClosestFacilityLayer(inNetworkDataset, "ProxChemistsCF", impedanceAttribute, "TRAVEL_TO", "", 1, accumulateAttributeName, "NO_UTURNS", "", "", "", "TRUE_LINES_WITHOUT_MEASURES")     outNALayer = outNALayer.getOutput(0)     subLayerNames = arcpy.na.GetNAClassNames(outNALayer)     facilitiesLayerName = subLayerNames["Facilities"]     incidentsLayerName = subLayerNames["Incidents"]     arcpy.na.AddLocations(outNALayer, facilitiesLayerName, inFacilities, "", searchTolerance)     arcpy.na.AddLocations(outNALayer, incidentsLayerName, inIncidents, "", searchTolerance)     arcpy.na.Solve(outNALayer)     tableName = subLayerNames["CFRoutes"]     if arcpy.Exists("ProxChemists"):         arcpy.Delete_management("ProxChemists")     outTable = "ProxChemists"     arcpy.CopyRows_management(tableName, outTable)      but the last line fails with error message:               ExecuteError: Failed to execute. Parameters are not valid.     ERROR 000732: Input Rows: Dataset Routes does not exist or is not supported     Failed to execute (CopyRows).      But the dataset I am inputting is CFRoutes, not Routes as per this line tableName = subLayerNames["CFRoutes"] Any ideas? I am trying to extract the CFRoutes table to use in a SearchCursor EDIT: I tried skipping the CopyRowsand jumping straight into the search cursor using this:               with arcpy.da.UpdateCursor("BLPUs", ["FID", "ChemistsFID", "ChemistsDist", "ChemistsDrive"]) as cursor:         for row in cursor:             OID1 = str(int(row[0]))             searchrows = arcpy.da.SearchCursor(tableName, ["ObjectID", "FacilityID", "Total_Drive", "Total_Length"])             for searchrow in searchrows:                 searchrow1 = str(int(searchrow[0]))                 searchrow2 = str(int(searchrow[1]))                 searchrow3 = str(float(searchrow[2]))                 searchrow4 = str(float(searchrow[3]))                 if searchrow1 == OID1:                     row[1] = searchrow2                     row[2] = searchrow4                     row[3] = searchrow3                     cursor.updateRow(row)      But the error is 'RuntimeError: cannot open 'Routes'' So I guess calling CFRoutes tries to open the sub-table Routes intentionally but failing


How to offset labels on a web application from two different services

I have multiple layers that are labeled within our online web mapping application. Two (zoning and land use) are located in our Planning/Zoning ArcGIS Server 10.1 Service. The other (Parcels) is within our 10.1 Parcels service. Problem I'm having is that the layers are stacked on top of each other (centroid of parcel). How might I go about adjusting the label properties so that they don't appear stacked when these layers are turned on? **Screenshot** the top label is from our parcels service, below that in the white mask is the future land use label from our planning/zoning service. ![enter image description here](http://i.stack.imgur.com/wRJZa.png)


How to run QGIS server on EC2 micro?

I'd like to learn something about web maps and so decided to start out using EC2, following different tutorials I was able to start a micro instance but I can't find my way on how to get qgis server running. Any good tutorial to follow?? Thnaks a lot


MySQL with geoserver

I am storing all my features in mysql db and I am getting them with ajax and adding to the openlayers map. Now I have to many features and it's taking a lot of time to get all of them and adding them, so I want to load only little bit from them and show all the rest with geoserver in a wms layer. I found some plugins but nothing really worked, and I didn't find any example. The features are stores in the database as a regular table not as spatial data, only have attributes and a col for WKT for the location. Is there a way to add this features from mysql db to geoserver layer? Thx


Why do I get these bands on my Height/Dem/Raster

I can't seem to get rid of them, and I've no idea (ok scrap that, I have a vauge idea) whats causing them. First an apology, yes this is quite a large pic apologies, but here goes: ![Fig 1 : Height raster with bands](http://i.stack.imgur.com/V6d7f.jpg) ## How to reproduce Ok, so how did I end up with that.   * 1) I downloaded the ess-sh meridian 2 map from the OS Open data site   * 2) I unpacked the archive, and got the 'gridded height' folder For the purposes of the image above, I only used the files in the NZ folder for now (I intend to do the entire UK once I perfect my method   * 3) I used the QGis shape merge tool to combine all the shape files in the NZ folder into one large NZ grid of height points, each point is 200 meters apart (According to the measure tool)   * 4) I then loaded the combined shape file into QGis, and did a visual inspection, each tile of points lined up perfectly, with no strange gaps (One tile starts 200 in from the edge of the tile, and the previous stops 200 after (That is it stops right on the grid square boundary (I've checked this using the OS grid locator shapes and everything is lined up on the boundaries using OSGB36)   * 5) I then used the QGis interpolation tool, with the following settings:   *     * Input layer : My NZ layer of gridded points   *     * Interpolation attribute : Height   *     * Interpolation method : TIN   *     * Num of columns : 10000   *     * Num of rows : 10000   *     * Cell size X : 9.98000 (Auto)   *     * Cell Size Y : 9.98000 (Auto)   *     * X min, Y Min : 400100, 500100 (Min extents of entire NZ area)   *     * X max, Y max : 499900, 599900 (Max extents of entire NZ area)   * 6) Hit ok and waited for the raster to render, the result you see above. ## What I suspect I suspect that the bands are some artifact of the shape-file joiner either not joining the source files correctly, or the data in the grids not being what I expect it to be. However, IF there is discrepancies in how the OS has mapped these (and it wouldn't be the first time) then looking at the boundaries of the sources pre merge, I believe that I should also see these bands running vertically too. If anyone has any thoughts, I'd appreciate to hear them. I'm putting this down for the night now, but I'll come back to it over the weekend. Cheers Shawty # Update 23/6/14 Sorry it's took me a little while to get back to this one. I've since used a derivative of user30184's answer, which with a little help for here : http://darrencope.com/2010/05/07/merge-a-directory-of-shapefiles- using-ogr/ i turned into the following batch file:               @Echo off     Cls     if "%1" == "" goto NoParams          if not exist merged ( mkdir merged )          cd %1          for %%f in (*.shp) do (     if not exist ..\merged\%1merged.shp (     ogr2ogr -f "esri shapefile" ..\merged\%1merged.shp %%f -nln %1merged) else (     ogr2ogr -f "esri shapefile" -update -append ..\merged\%1merged.shp %%f -nln %1merged)     )          cd ..          goto Finished                    :NoParams     ECHO This utility must be run from within the "Gridded_Height" folder as part of the OS     Meridian 2 map product     ECHO EG: merid2_essh_gb\data\Gridded_Height     ECHO.     ECHO When run, you must provide a 2 letter grid tile to process, the output of which     will be placed in a folder     ECHO called merged, EG: '%0 NZ'  will process all the shapes in the NZ tile square, and     produce     ECHO NZmerged.shp in the merged folder.     ECHO.          :Finished      Everything went smoothly, as anticipated, and so I ran the new shape file through the interpolation generator again, only to find that I still have these vertical lines on the raster. ![Second attempt](http://i.stack.imgur.com/ZLmaq.png) As you can imagine, this is quite perplexing now, and I'm suspecting that either I have corrupted data (So am going to try and download a new copy) or ogr2ogr and other tools on the PC I'm using are broken (It is a possibility) so am going to try repeating the process on an entirely different machine and in a clean VM that's only ever had the geo tools I use installed. For now however, still no dice, so all I can keep doing is fiddling, and see what happens. I will keep this post updated in due course, if / when I get any further. Shawty # Update (2) 23/6/14 - Yes I've been working through the night Further to the notes above, I've now taken the entire NZ layer and pushed the data into a postgis table, I've manually loaded each tile by hand, and then pulled this into QGis and processed as described previously. This has still produced the banding previously seen, but I now have some additional information. Beacuse I now have this in postgres, I was able to overlay other layers onto the output in QGis, doing this with the various grids I have from the Ordnance survey (I have a number of rectangular grids provided by them to aid positioning raster tiles), after trying a few different grids, Iv'e noted that these bands are exactly on the 10km grid boundaries, but only vertically, horizontally works fine. At this point I think I can rule out the shapefile merge tool in QGis and any problems with Ogr2Ogr, this is now looking either like bad data (Which I have yet to find) or a problem in how the QGis raster interpolation tool is producing the output. Next step I think is going to be try the same procedure on a different machine, but accessing the same database data. For reference (In case any one knows of any bugs) I'm using QGis valmiera (2.2.0) in the process of loading all the shapes into individual tables inside postgres, I came up with this script to merge them all into a single table (Posting it as it may be useful to others)               DO     $$     DECLARE         tables        record;         tablename     text;         theschema     text;         tile          text;         tilenumber    text;         sqlstring     text;          BEGIN             SELECT 'temp' INTO theschema;             FOR tables IN           SELECT *           FROM   pg_tables           WHERE  schemaname = theschema           ORDER  BY tablename        LOOP              SELECT quote_ident(tables.tablename) INTO tablename;         SELECT substr(tables.tablename, 1 , 2) INTO tile;         SELECT substr(tables.tablename, 3 , 2) INTO tilenumber;              RAISE NOTICE 'Processing Table Name % (tile %, number %)', tablename, tile,     tilenumber;         SELECT 'insert into meridian.gridded_height(originaltile, tilenumber, featurecode, height, geometry) (select ''' || tile || '''::character(2) as originaltile, ''' || tilenumber || '''::character(2) as tilenumber, "FEATURE_CO"::integer as featurecode, "HEIGHT" as height, geometry as geometry from ' || quote_ident(theschema) || '.' || tablename || ')' into sqlstring;         EXECUTE sqlstring;             END LOOP;     END$$;      The destination table schema the above script pushes the tile data into is:               CREATE TABLE meridian.gridded_height     (       pkid serial NOT NULL,       originaltile character(2),       tilenumber character(2),       featurecode integer,       height double precision,       geometry geometry(Point,27700),       CONSTRAINT gridded_height_pkey PRIMARY KEY (pkid)     )     WITH (       OIDS=FALSE      Shawty # Update (3) 23/6/14 In follow up to user30184's most recent comment i'm using the following: 64 Bit Windows 7 with a 64 Bit build of QGis, I don't have a seperate install of Gdal (or any other geo utils, Ogr2Ogr as far as I'm aware runs out of my QGis install) Versions reported by QGis (2.2.0 Valmiera) are as follows:   * QGIS version 2.2.0-Valmiera   * QGIS code revision c3a2817   * Compiled against Qt 4.8.5   * Running against Qt 4.8.5   * Compiled against GDAL/OGR 1.10.1   * Running against GDAL/OGR 1.10.1   * Compiled against GEOS 3.4.2-CAPI-1.8.2   * Running against GEOS 3.4.2-CAPI-1.8.2 r3921   * PostgreSQL Client Version 9.2.4   * SpatiaLite Version 4.1.1   * QWT Version 5.2.3   * PROJ.4 Version 480   * QScintilla2 Version 2.7.2 These versions have been taken directly from the QGis about box Further more, I've been doing some further analysis on the data. The gridded height was apparently derived from the Landform panorama dataset sampled at 50 meters, however the distance between each point in the meridian grid appears to be 200 Meters. When I overlay the 10km grid (as previously mentioned) the grid lines run perfectly neatly between the grid points, looking at the co-ordinates of the height points, they are set in 100 meters from the edge of the grid, with 200 meter spacing. This measures out at a 100 meter border between grid square edge and first column of points, but overall from the last column of the previous tile to the next, 200 meters to match the spacing for the rest correctly. Iv'e been trying different row and column counts in the interpolation generator, and have to some degree succeeded in removing some of the bands, and some combinations are worse than others, Iv'e not yet removed all of the bands, but given Iv'e found some changeable parameter that seems to be able to affect them, I believe that the data has not been produced in a fully suitable format by Ordnance survey to be used correctly for this purpose. Following up on the new comments below, I'm going to try different versions of Gdal and co, see if that makes any difference at all. Since last update, have also tried on a different machine, with same data and gotten the same results. Shawty


Getting tiles from WMTS document

I was wondering if there is a library which I can use to retrieve TileMatrix/Tile information from a WMTS Capabilities document. I have been trying to use geotools but it seems as though it does not support WMTS(just WMS). Any help is greatly appreciated.


Leaflet - Enable/Remove popup on mousedown/mouseup?

I'd like to do as the title suggests and can get the popup to appear on mousedown with the following code, but mouseup doesn't close the popup:               // Quick look at info on mouse hold     marker.on("mousedown", function(e){         this.openPopup();     });     // TODO: can we get mouseup working?     $(marker).mouseup( function(e){         this.closePopup();     });      Am I missing something? If I log within the functions I see the mousedown hitting but mouseup never happens.


"Select Features" tool returns error in ArcMap when using OLE DB connection feature layers

I have a spatial enabled OLE DB Provider corresponding to OGIS simple feature specification for OLE/COM revision 1.1 I can add spatial data as ArcMap layers successfully using this provider and by making OLE DB connection in "Add Data" menu in ArcMap TOC.All tools in "Tools" toolbar of ArcMap can work with this layers except **"Select Features"** tool. When I want to use this tool to select some features of my data,I receive this error: **"There was an error executing the query"** I found that when ArcMap wants to select features of my data source it requests some properties of provider. it requests 2 propertysets.I can interpret only one of them and the other isn't documented in MS OLE DB Provider toolkit.The first propertyset Id is **{e9be80e6-ffaa-11d0-9a97080009ec734b}** which is unknown for me and I couldn't find it in "oledb.h",and in this propertyset there is only one property id equal to 0. The second propertyset is **DBPROPSET_DATASOURCEINFO** and there are 2 property id for **DBPROP_MULTIPLESTORAGEOBJECTS** and **DBPROP_STRUCTUREDSTORAGE** and my provider return **"VARIANT_TRUE"** for first and **"DBPROPVAL_SS_ISEQUENTIALSTREAM"** for second. Now,May you help me to find what's wrong with my code?what may be the source of this error.and how can I find the meaning of this unknown property set?ESRI is a member of OGC and says their products support OGC standards explicity,so this code can not be a secret code specific to ESRI providers,sure there is something wrong with my provider but I can't find it after some weeks trying and I'm exhausted.May you help me please? Thanks in advance


Extra lines in Sketchup DTM when using stamp tool

I have a DTM in Sketchup. I am trying to use the stamp tool to make a level area on which to build a building. However, when I use the stamp tool lots of extra lines appear on the DTM seemingly at random (I realise these are the lines that form the DTM but only _some_ of them appear). The lines are _not_ hidden geometry. It may be that this is the reason they are showing - they aren't hidden and the rest of the lines are. If this is the case I'm not sure how to hide them again without exploding the DTM, which I don't want to do. Can anybody tell me why this is happening? Can anyone tell me how to prevent it? **Example:** Left: Original DTM Right: DTM after using stamp tool. _Note: The images are of different parts of the DTM! My problem isn't that the DTM is changed (the stamp tool works exactly as it should), it is just that the lines become visible._ ![alt text](http://i.stack.imgur.com/CFazg.png)


Calculating distance scale factor by latitude for Mercator

This was really inconvenient topic to google out - so I'm asking for clarification, did I understood things correctly. I'm talking about measuring short distances in Mercator projection (3857). You can calculate distance in map units (using Pythagoras theorem). In equator, it equals to distance on earth (scale factor = 1); if you move towards poles, distance in map units and in earth are not equal anymore - scale factor starts to increase. Question is: how to calculate scale factor for given latitude? Did I understood correctly, formula is `factor = 1 / cos(latitude)`?


error (407) Proxy Authentication Required plugins mmqgis e geocoder Qgis

By using Geocoder plugins and mmqgis QGIS to geocode some addresses using Google the error (407) Proxy Authentication Required occurs. I entered the settings and put the QGIS network address, User and password to authenticate to the proxy and the error persists. This is a bug in the plugin? Someone used successfully in version 2.2.0?


Changing basemaps from cartodb.js

Is there a good way to change leaflet basemaps from cartodb.js or leaflet.js? I am able to grab the map object and basemap layer from the layers property in the done() promise.               cartodb.createVis(map, layerUrl, mapOptions)           .done(function(vis, layers) {               var map = vis.getNativeMap();               var basemap = layers[0];           })           .error(function(err) {             console.log("An error occurred: " + err);           });      Right now I'm thinking I need to be able to grab tileLayer from the basemap object or the map object, then use leaflet's setUrl method as per http://leafletjs.com/reference.html#tilelayer-seturl, but so far no luck there. Appreciate any help, thanks!


Labeling a Feature Class - how to force the label to use a particular field

I am trying to make a map with the voter blocks labeled. The label command uses the county identifier field. Can I force it to label with the voting block field?![enter image description here](http://i.stack.imgur.com/rHJii.png)


Alternatives for ArcGIS Data Reviewer?

What are some QA/QC tools that act similar to the Data Reviewer to point out and save mistakes? I want to know all alternatives, but mostly would want to run them in 10.1 and or using arcpy. I want to be able to use the basica functionality of checking the data then sending mistakes back to the analyst. I'm using 10.1 Windows 7 x64 machine.


How to enable sde Reader in fme2014

I have windows 7 64bit running ArcGIS Desktop 10.0 and fme 2014. On another server I have ArcSDE9.3. I want to create an SDE Reader in FME but am unsure about how to connect. At the moment SDE Geodatabases are not activated. Looking at this - Link to FME Site \- I need to connect to various SDE dlls etc and set environment variables and install the sde SDK. Is this really the only way to be able to connect to sde with fme?


Trouble Using Selection Expression in QGIS

I am trying to use the selection expression box to highlight counties by state FIPS. When I use the OR conditional all counties across the US get highlighted. So for example, STATEFIPS = 1 will successfully highlight just counties in alabama, like I want. But when I do STATEFIPS = 1 OR 12 then I get all counties across the US highlighted, not just the ones in Florida and Alabama. Is this a bug or am I doing the expression wrong? Your help would be much appreciated!


Convert coordinates

I have some data that I need to convert to Lat-Lon in order to plot. It originally came from an Esri Shapefile which I managed to get it out of with QIS. The issue is that the coordinate reference system is this (the data is for New York City): USER:100000 - * Generated CRS (+proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs) And the numbers for X and Y in the fields are in the hundreds of thousands.


toolbars.Draw: Clear last point when a new point is clicked.

I am creating a map that will provide coordinates when a point is clicked on the map. I want to have a graphic provided on the clicked location so I am going to using the drawing functionality as well. Where I am stuck so far is how do I clear the last point when a new point is clicked? I have posted my code below.                           <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">                                                         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>                     <meta http-equiv="X-UA-Compatible" content="IE=7" />                     <meta name="viewport" content="width=device-width,user-scalable=no"/>                                          <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>                     <title>Maps Toolbar</title>                     <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dijit/themes/claro/claro.css">


ArcGIS Editor Toolbar

Does anyone know how to change the properties of a vertex to keep 3 places after the decimal place? My problem is when I go to draw a line and snap to a point, the properties of the line I am drawing are rounding to the nearest whole number instead of keeping the correct number of decimal places and the vertex positions arent staying where I need them to stay. Is there some way to fix this in some kind of settings or options menu. In the Editor Menu - Options, I have Display measurements using 3 decimal places but when I start drawing a line, it rounds to a whole number for each vertex so every vertex is just a little off of where it needs to be.


How do I rotate the OSM map before printing?

What is the simplest way to rotate and render Openstreetmap data, and still get a nice render? For example Toronto, would fit best rotated slightly on a page in landscape mode, so the northern boundary of the city are parallel to the top edge of the printed page. Example: Toronto rotated here with Gimp, works fine but the labels are not really supposed to be rotated. ![Image of a Map slightly rotated \(with bad label placement\) see:](http://i.stack.imgur.com/gb2eY.png) The most common thing for Openstreetmap is to import the data into PostgreSQL+postgis and render with Mapnik. But really any solution is fine, e.g. doing it in ESRI tools. PS. This is a repost of a question asked on help.openstreetmap.org, I'll repost the answers there if I'm allowed.


Interpolation: irregular shape, merging DEM's

my problem is quite complex, though I hope that solution may be simple or at least possible. I do have .img DEM 0.5x0.5m. DEM consists of river bed, river valley and adjacent areas (it is strip of 5km with the river in the centre). DEM was derived from ALS, so it does not show depth of water feartures and of course that something I am interested in. I do have some cross-section of the river bed and will have surveys of certain sections, lets say I have various point data for cross-section of the river bed, which will be 200-300m apart. My aim is to interpolate points for those 200-300 m gaps, convert it in to DEM and somehow combine with the original DEM. So as you see there are several issues. How to extract shape of the river corridor from original DEM? How to interpolate points within such irregular shape as river corridor, so I can receive valid DEM for river bed? How to combine original and river bed DEM? Any suggestions? Cheers Tomek


IronPython + ArcObjects

Is it possible to access ArcObjects with IronPython?


Error Importing Arcpy - Python

I have written a script and am trying to run it in Python IDLE 2.7.6. I first try to import arcpy, but I get an error message saying "ImportError: No module named arcpy". Why doesn't it work? I'm working off ArcGIS 10.2 if that matters. Thanks!


Editting Attribute properties in QGIS

I am trying to edit the precision of my area attribute in QGIS 2.0. It is currently at 0 but I want to change it to 3. I have not been able to find the answer to this anywhere. Is there a way to edit the properties of an attribute, or do I need to create a new column and plug the data into the new column.


How to force dropping a table/Index

I was working to import CSV Files into PostGres.               CREATE TABLE NY(Name varchar,Latitude float,Longitude float);          COPY NY FROM 'data/NY.csv' DELIMITERS ',' CSV;          ALTER TABLE NY ADD COLUMN gid serial PRIMARY KEY;          ALTER TABLE NY ADD COLUMN geom geometry(POINT,4326);          UPDATE NY SET geom = ST_SetSRID(ST_MakePoint(Longitude,Latitude),4326);          CREATE INDEX idx_NY_geom ON NY USING GIST(geom);      I have imported the wrong file, while trying to drop the table and doing the same thing. I couldn't do that. How can I force dropping a table. I used : Drop index idx_NY_geom; Drop table NY;


consistency of cell phone gps readings

I want to record the location of each grave site in a cemetery for overlaying on Google maps. My Android cell phone (HTC Thunderbolt) reports an accuracy of between 10 meters and 25 meters. I'd like to get accuracy of around 3 meters or better. Would it increase my accuracy if I take a GPS reading from a precisely known survey marker in the cemetery first and use the difference between that reading and the actual longitude and latitude to correct the grave site readings? What kind of accuracy could I expect to get with that method? I estimate it would take about 3 hours to survey the cemetery. How consistent are the readings? Do I need to recheck the survey marker during that period? If so how often?


How do I combines tile caches to serve them as 1 layer with TileStache?

I have an OpenLayers map that has over 50 layers, and will be growing. I am having trouble with displaying many layers since a large monitor will request approximately ~100 tiles per layer. Rather than limiting the user to displaying a certain number of map layers, I want to be able to combine map layers on the fly and serve them as a single set of map tiles. My TileStache setup reads tiles from a MBTiles database for each layer. Given the following example: user turns on layer_x, layer_y and layer_z, how do I return a single composite tile set from TileStache that combines layer_x, layer_y and layer_z? Is this possible?


How to make my ArcGIS Online gallery completely public?

I have created a map gallery in arcgis.com. All the content is public, but when I send my friend the link, he is unable to access it and it looks private. Can arcgis.com galleries be totally public?


How to connect ArcMap 10.0 query layer to a different port?

I have an instance where I have a server that has postgres 8.3 and postgres 9.2 on it. I have the 8.3 version on port 5432 and 9.2 on port 5433. I want to connect to the 9.2 instance, here is a screenshot of the setup: ![enter image description here](http://i.stack.imgur.com/Xmso8.png) This however is not working. It comes back as an invalid username and password because it is trying to connect to the 8.3 version, which the username and password does not exist on. However, if I do try one with the username/password of the 8.3 it works. I believe I am missing something with how ArcMap wants to configure the port number in the configuration box.


Set a Field as a Parameter for use in Calculate Field

Is there any way to specify a field as the parameter (user defined) for calculate field in modelbuilder? I have a model that will take a parameter (label) and another input, that is currently just a field:               "%Asset 1 Label%"&": "& [FACILITYID]      Possible to make that field a parameter? EDIT ![enter image description here](http://i.stack.imgur.com/5M7nq.png) So, the field should be coming from Meters, it is currently [FacilityID], but this could change according to a users dataset, so I want to make this field a parameter in the model.


attach point grid data non-grid points

Possibly a strange one: I have a dataset with loads of fields of environmental (explanatory) data, as a regular grid of points (black dots in image), and another dataset of sampled (response) values as non-gridded points (red dots). I'd like to append all of the environmental data fields to the sample dataset, but am not sure how. Most of the environmental fields are simple numeric data e.g. depth, temperature, salinity, etc., and subsequently I'm hoping it's possible to have QGis calculate the values at each red dot based on an interpolation from the nearest 'n' black dot sites. Firstly, if someone knows if that's possible, and how I can do it, please let me know. Secondly, some of the fields aren't so easy: one is substrate, so the values are character strings e.g. "sand", "gravel" etc, and thus I'd like the red dot field value to take the value of the nearest black dot site. Four of the fields are compass directions, i.e. numerical from 0 to 360, which won't pose a problem in most cases, but will do for bearings near 360/0, as a two point average of 359 & 0 will equal 179.5 rather than 359.5. Any thoughts on that much appreciated also. Again, using nearest black dot site will very probably suffice. Thanks in advance!! ![Image](http://i.stack.imgur.com/2JaWd.png)


How to find out projection code for the sid file?

I have a miami.sid file and miami.sdw and miami.sid.aux.xml files. How to find out the projection code? This question is similar to: I have a .sid image but can't figure out the CRS               GDALInfo output:     ----------------     Driver: MrSID/Multi-resolution Seamless Image Database (MrSID)     Files: C:\Users\Miami_25ft.sid            C:\Users\Miami_25ft.sdw            C:\Users\Miami_25ft.sid.aux.xml     Size is 112000, 60000     Coordinate System is `'     Origin = (876995.250000000000000,539495.000000000000000)     Pixel Size = (0.250000000000000,-0.250000000000000)          Metadata:       IMAGE__ENCODING_APPLICATION=GeoExpress 8.0.0.3065       IMAGE__FORMAT=MrSID/MG3       IMAGE__INPUT_FILE_SIZE=20165006292.000000       IMAGE__INPUT_FORMAT=TIFF w/ World File       IMAGE__INPUT_NAME=D:\11715_7_color_adjusted\0.25 Ft\10NE.tif,  D:\11715_7_color_adjusted\0.25 Ft\10NW.tif, D:\11715_7_color_adjusted\0.25 Ft\10SE.tif, D:\11715_7_color_adjusted\0.25 Ft\10SW.tif, D:\11715_7_color_adjusted\0.25 Ft\11NE.tif, D:\11715_7_color_adjusted\0.25 Ft\11NW.tif, D:\11715_7_color_adjusted\0.25 Ft\11SE.tif, D:\11715_7_color_adjusted\0.25 Ft\11SW.tif, D:\11715_7_color_adjusted\0.25 Ft\12NE.tif, D:\11715_7_color_adjusted\0.25 Ft\12NW.tif, D:\11715_7_color_adjusted\0.25 Ft\12SE.tif,       .....     .....     D:\11715_7_color_adjusted\0.25 Ft\8SE.tif, D:\11715_7_color_adjusted\0.25 Ft\9NE.tif, D:\11715_7_color_adjusted\0.25 Ft\9NW.tif, D:\11715_7_color_adjusted\0.25 Ft\9SE.tif, D:\11715_7_color_adjusted\0.25 Ft\9SW.tif       IMAGE__LTI_ESDK_VERSION=8.0.0.3065.Bob_3062_br win64-vc8/Release                                     IMAGE__MODIFICATIONS=COMPRESSED EMBEDDED MOSAICKED       PShop__ImageResources=       VERSION=MG3     Image Structure Metadata:       INTERLEAVE=PIXEL          Corner Coordinates:     Upper Left  (  876998.250,  539499.000)      Lower Left  (  876998.250,  524499.000)      Upper Right (  904998.250,  539499.000)      Lower Right (  904998.250,  524499.000)      Center      (  890998.250,  531999.000)           Band 1 Block=1024x128 Type=Byte, ColorInterp=Red       Minimum=0.000, Maximum=255.000, Mean=143.114, StdDev=49.379       Overviews: 56000x30000, 28000x15000, 14000x7500, 7000x3750, 3500x1875, 1750x938, 875x469, 438x235, 219x118, 110x59          Band 2 Block=1024x128 Type=Byte, ColorInterp=Green       Minimum=0.000, Maximum=255.000, Mean=145.812, StdDev=46.856       Overviews: 56000x30000, 28000x15000, 14000x7500, 7000x3750, 3500x1875, 1750x938, 875x469, 438x235, 219x118, 110x59          Band 3 Block=1024x128 Type=Byte, ColorInterp=Blue       Minimum=0.000, Maximum=255.000, Mean=141.074, StdDev=47.739       Overviews: 56000x30000, 28000x15000, 14000x7500, 7000x3750, 3500x1875, 1750x938, 875x469, 438x235, 219x118, 110x59


PostGIS : check if 2 lines are at contrary sides of third line

I am looking for a workflow to select a line on the condition that it is located on the contrary side of a middle line. So there are 3 lines (2 are given, 1 I want to select). I don't need you guys to write the code, I just need the idea (already tried some things but none worked perfectly) Thanks


How do I restrict a fme transformer to work only within a polygon mask?

I would like to define the area in which a transformer should be applied by using a polygon mask. I know this can be done in FME but I can´t find any references to it. Can anyone enlighten me?


leaflet choropleth map using dynamic value

I am doing a choropleth map using leaflet and JSON data. I got a clean tutorial in leaflet site. In that tutorial the used us-states.js JSON file where the choropleth was based on the `feature.properties.density` feature of the JSON if I am not wrong. If we see the JS file we can found there is a field called "ID" which is state id. I have a database where I have 5 different categories of data based on state ID. Categories are population, density, male_population, female_population, literacy_rate. I am calling those data through ajax and get a GeoJSON data state-wise as follows (Its a dummy data).               [{"state_id":"01","population":"123456","density":"1234","male_pop":"65432","female_pop":"57421","literacy_rate":"98"}]     ...     [{"state_id":"50","population":"123456","density":"1234","male_pop":"65432","female_pop":"57421","literacy_rate":"98"}]      I want to integrate this data as choropleth value. when I call on literacy function the variation of color will be based on literacy_rate data. I can make the changes in getcolor function category wise. Thanks


EVI and SAVI indices for Landsat 7 and Landsat 8

I'm trying to run the indices Savi and EVI at landsat 7 & 8\. About SAVI I read this from ESRI and explains very good this index. About SAVI I have a question, I will choose buy my self the L factor if it is 1, 0.5 or 0? About EVI index I will use the some value for L factor like SAVI? and what about coefitiens C1 & C2.


Longest common prefix of geohashed points

I currently use Geohash to index some points and retrieve information faster by providing a geohash prefix for a given point for a given distance.. For example if I get a given point at '1600 Pennsylvania Ave, Washington, DC' with geohash dqcjqcpsr4t0 and I get all point that geohash starts with dqcjqc. I would like to know if there is an algorithm **and index solution** to get the points ordered by the longest common segment **without iterating through them all.** For example: I got a given point at '1600 Pennsylvania Ave, Washington, DC' with geohash dqcjqcpsr4t0 and I would like to get the nearest point first:   * point with geohash dqcjqfzg038b will be returned first (common prefix 'dqcjq'=>5 letters)   * point with geohash dqcjz4p344cu will be returned next (common prefix 'dqcj'=>4 letters) The idea behind this is to get the nearest points first by providing the full (8 chars) geohash of a given point (in this case we don't use geohash to get points for a given box)


ArcMap Symbology: Assign Color by one attribute, symbol by other attribute

I've got a question concerning the symbology in ArcMap. I want to use the Unique values/Many fields option to assign unique values based on three attribute fields. To symbolize the first attribute field, I would like to use a color, the second and third attribute field shall use a symbol. Obviously, this can easily be done manually, but as I have nearly 1000 unique values, I was wondering whether there is a possibility to assign the color first, and then the symbols to each same combination, without having to click every item individually. I hope I have been clear about what I want to do. I am running ArcGIS 10.2 Basic, and do not know much, or rather nothing, about python. Edit: The answers so far do not seem to work properly for me. Therefore, I will try to be more clear with what I need. I have got a point-shape with 3 fields and 988 features. I want to make a layer of this to apply to different shapes afterwards. So here is what I want:   * Every unique value (13 unique values) of the first field to have the same color    * Every unique value (4 unique values) of the second field to have the same symbol   * Every unique value (18 unique values) of the third field to have the same symbol   * The different symbols for the second and third field must not superpose each other I do know how to realise this manually, but I do not want to choose and click every single one of 988 features in the symbology window, especially as they cannot be sorted by the second or third field. ![Example](http://i.stack.imgur.com/b1do9.jpg) Is there any possibility to automatically assign colours to the values of one field and symbols to the values of another field?


How do I display null data in a choropleth?

I am working in ArcMap and I have created a choropleth map (using a "population" attribute) that is rendering things basically correct except that when the "population" attribute is null, representing no data, it does not render the associated polygon at all. I would like the null data polygons to render white with a grey outline, as I have the polygons _with_ data rendering with a shade of purple (depending on the "population" value as mentioned above) and a grey outline. Is there a better way to go about it other than copying the layer and sticking it under the choropleth layer? This seems to me a bit of a "freshmen fix" but maybe it is the way to go? Any advice?


Ensure relative path in Arcgis layer files

I'm looking for the arcgis python equivalent of the VBA How to save a layer file with a relative path. I'm using a script to change the paths in a collection of about 75 layer files before distributing to outside offices. The script works well, except that the new layer file paths are not relative, which means they usually are broken for the recipients as they rarely use the same drive letters etc. as we do, which pretty much defeats the purpose. Paths follow the pattern `X:\Layers\Category1\Group3`, and `X:\data\One.gdb`, i.e. the layers and data are one the same drive but not in the same tree. ![enter image description here](http://i.stack.imgur.com/SH7N7.png)


mapserver layer classes display order

My layer Point (OGR geojson) has several classes:               CLASS         NAME "Station1"         EXPRESSION ([extrude]=0)                 STYLE             COLOR 0 0 250             OUTLINECOLOR 255 255 255             SYMBOL 'circle'             SIZE 6         END             LABEL             SIZE TINY             COLOR 0 0 0             OUTLINECOLOR 255 255 255             POSITION AUTO         END     END     CLASS         NAME "Station2"         EXPRESSION ([extrude]=1)                 STYLE             COLOR 250 0 0             OUTLINECOLOR 255 255 255             SYMBOL 'circle'             SIZE 10         END             LABEL             SIZE TINY             COLOR 255 0 0             OUTLINECOLOR 255 255 255             POSITION AUTO         END     END         CLASS         NAME "Station3"         EXPRESSION ([extrude]=2)                 STYLE             COLOR 128 0 128 #purple             OUTLINECOLOR 255 255 255             SYMBOL 'circle'             SIZE 14         END             LABEL             SIZE TINY             COLOR 128 0 128             OUTLINECOLOR 255 255 255             POSITION AUTO         END     END      If N points are overlaying I need to have a specific order. Station3 on top of Station2 on top of Station 1. Inverting the order nothing has changed. Ideas?


What is the difference between nominal, categorical, ordinal, interval and ratio measurements?

Given the following examples, which are examples of nominal, categorical, ordinal, interval or ratio measurements?   * bushels of wheat per county   * vegetation type   * average maximum daily temperature   * parcel street address   * parcel ID number   * pH measurements of a stream   * state rank for average wage   * number of voters in a district   * student grade in a class   * soil type In particular, I am having trouble figuring out which one is a ratio measurement.


How to edit Shapefile Attributes?

How might I go about exporting a polygon shapefile (e.g. CSV) so that attributes (not geometry) are editable by others, and importing it with the changed attributes (of which there are several columns worth)? I tried the **mmqgis** plugin (Transfer > Attributes Export/Join to/from CSV file), but   1) it seems to only be able to import one attribute at a time and   2) creates a separate temp.shp without geometry and   3) does not attach the new attributes to the existing polygon shapefile. Is there something I'm doing wrong here, or do you have a better solution for my task at hand? ![attributes polygon qgis](http://i.stack.imgur.com/N71Pc.png) Thanks!


Openlayers Zoom based icon size

I am displaying icon in feature. I want the size of icon to be dependent to zoom level of map i.e. the icon appears smaller in low zoom levels and bigger in high zoom levels. i used stylemap for that but the icon size does not change on zoom change.               var styleschool = new OpenLayers.Style({                 pointRadius: "${radius}",                 label:"${name}",                 fillOpacity: 0.7,                 fillColor:'blue',                 strokeColor:'blue',                 fontcolor:'blue',                 externalGraphic:'icon/school_color_icon.png'             },             {                 context:{                     radius: function(feature){                         return map.getZoom()*0.9;                     }                 }             })


How to convert polygons to centriods without losing attribute names?

I have a GeoJSON file of polygons and I need to convert it to centroids. Finding the centroid is very easy in QGIS. **Problem** My attribute names are very long and have a colon between them, e.g. _building:structure_ and _shape:elevation_. Converting to centroids results in a shapefile format. It gives the geometry but changes the attribute names, truncating them and converting colons to underscores, e.g. _building_l_ and _shape_elev_. I need the attribute names in the centroids to be the same as in the original polygon.


How to SUM all the values in a field?

I am intersecting a base road layer with 6 separate road layers to create 6 line feature outputs. I am using Model Builder for this. I was wondering is there a way I can SUM all of the values in a field for each of the separate road layers output? My other option is to export the road output attribute tables to excel and make the calculation there but I'd much rather if I could add such a calculation to model builder.


How to save data from QGIS 1.8 to PostGIS without shapefile intermediate?

Is it possible to save data directly into an **existing** PostGIS database from QGIS without having to first save it as a shapefile? I know about the SPIT plugin but that requires a shapefile. I want to know if is there a way to skip the save-to-shapefile-use-SPIT/shapefile-loader-to-import-to-Postgis process after an analysis in QGIS. Edit: Example: Load road layer from PostGIS to QGIS. Calculate shortest path using road graph plugin and export as temporary (temp) layer. Right click on temp layer, select save as... the save as options include the general vector type files (shapefile,GeoJSON) and at the bottom of the list is an option to save as a spatiallite database. This, unfortunately, only creates a new spatiallite database with only the one shortest path road layer (no postgis option). What I would like to know is, is it possible to save a temp file directly into an **existing** PostGIS database?


Why does ArcGIS map document (MXD) appear empty of data?

A colleague created a map for me using ArcGIS for Desktop and emailed it to me in another state. I was able to open the document using ArcGIS for Desktop but no map appears, why? She also sent it to her boss using data from a central fileserver and again the map didn't appear why?


MapInfo Thematic mapping - line width based on a field

I want to apply thematic mapping to a layer in MapInfo with varying line thicknesses based on a float column. Is this possible?


Field calculator script to work out first 5 dominant area fields?

I have 5 fields of different landcover types with areas of each and found below:               > PRC_Water| PRC_Bare| PRC_Urban| PRC_LVeg| PRC_LVeg|     >     5        20         40        20         15      I have 5 more fields of dominance [Dom1, Dom2, Dom3, Dom4, Dom5] which I would like to populate with the field_name of the landcover type. I would like to know if it is possible to write a script/conditional statement in the field calculator to return the field name of the '#th' largest area, and if there is a way to return both names if the areas are equal?? ![enter image description here](http://i.stack.imgur.com/B7bR3.jpg) Sorry I have limited knowledge of python, but am puzzled how I can rank these areas by returning a field name? Please I would like to ask if anyone can help in this regard. Many thanks


How to recover deleted data from an edited point layer?

As a newbie in GIS, I didn't fail to make a newbie mistake. While editing a point layer I accidentaly deleted all the introduced data. I duplicated a layer, as it was more convenient (same style and attributes), but forgot to save it as a new layer before editing it and saving it. It resulted in the deletion of all the previously introduced points. It appears nonetheless that the datas haven't totaly disapear. If I open for instance the related .dbf file with notepad, it still show the deleted lines (not the case in excell though). Same is true for the shapefile that weighs much more than the empty one I saved later. Is there a way to retrieve the lost data and to make them reappear on the layer? Thanks for your help.


Guide for esriRasterOpCode

I'm building dynamic cartographic symbols to display inside ArcMap, but they are displaying "wrong". Is there a guide somewhere that will show what raster op code does? I mean, not only show, but perhaps demonstrate the symbology. The esri pages has confusing descriptions like "it's the inverse of rasterOpCodeXOR" for example. I've always struggled with this. Any change there are good resources on this?


GeoServer VendorOption for SLD to place labels overlapping and out of bounds

I use GeoServer 2.1.1. and have an SLD to serve a layer with labels in OpenLayers. I noticed that some labels are not displayed because other labels are to near. GeoServer wants to make your labels look nice. Weird enough: _I don't_. Using the VendorOptions in the SLD I figured out some of the problems. I read the SLD cookbook. I am now using:               <TextSymbolizer>      ...      <VendorOption name="spaceAround">-1</VendorOption>      <VendorOption name="conflictResolution">false</VendorOption>      ...     </TextSymbolizer>      These two options makes GeoServer draw multiple labels on top of each other even though it will render the labels unreadable (which is what I require). The problem that still remains is the positioning of the labels. I have the labels set to:               <LabelPlacement>      <PointPlacement>       <AnchorPoint>        <AnchorPointX>0.5</AnchorPointX>        <AnchorPointY>0.5</AnchorPointY>       </AnchorPoint>      </PointPlacement>     </LabelPlacement>      But as soon as the labels are to near of the edge of the image/bounds the it no longer centers the labels but will anchor it left or right depending on the position. My question if someone knows how I can make GeoServer ignore trying to make it look so damn nice (I know it sounds weird!) and just let my labels run out of the image/bounds.


Viewing Multiple Grouped Data as ESRI Map Service in ArcGIS Explorer Online

I'm trying to add ESRI Map Service to ArcGIS Explorer Online. This map service consists of 3 group layers, one of which contains 3 further subgroups. I tried adding my mapservice to the web viewer using the following URL REST interface structure: http://myserver/ArcGIS/rest/services/myservicename/MapServer However, this returns no results. The viewer recognizes the map service, and when I add it up, I can see all the layers and individual shapefiles in the legend window, but not in the actual viewer. It also recognizes the spatial extent for each layer - when I zoom in on a particular layer, the viewer centres on the correct extent. I can turn them on and off in the legend but I am unable to see them. When I add each individual map service layer separately it works fine (with the exception of a couple of layers), as follows: http://myserver/ArcGIS/rest/services/myservicename/MapServer/2 The other odd aspect is that the same map service works properly in ArcGIS.com map viewer, even when added by its general map service name (http://myserver/ArcGIS/rest/services/myservicename/MapServer). Basically, my question is whether you can add an ESRI map service to ArcGIS Explorer Online with multiple grouped data in a single operation, just as in ArcGIS.com? I'd appreciate any help as I've been unable to find an answer elsewhere. Thanks, Magda P.S. I'm going to post cross post on the http://forums.arcgis.com/


Taking a 'custom' map and transforming its x/y co-ordinates to 'real' long/lat co-ordinates?

I was wondering if someone could help me out with a little project I'm working on. I'll try to describe what I'm trying to achieve - if it doesn't make sense, please let me know. I have in front of me a 'custom' map of an area I like to visit. It's just a representation of the area, so there's no real connection between the points on the 'custom' map (a) and how they would relate on a 'real', geographically correct map. As an example, think of how a ski resort map represents a ski area whilst looking nothing like a real map. I'd like to take this custom map and, given some relationships between notable points on it and their actual lat/long co-ordinates, create a [x/y --> lat/long] co-ordinates map. Ideally, the more points I can relate to real lat/long co-ordinates, the more accurate this map should be. The end result would allow me to take a lat/long co-ordinate (e.g. from GPS) and pin-point that location to a point on my custom map. I'm sure a lot of the GIS tools out there allow for this kind of thing, however I have no idea where to start (I don't even know what it'd be called). Any pointers would be appreciated!


Which GIS best for this problem?

This problem is similar to retail presence optimization. I'd like to know which GIS's could help us do the following: Given a set of point locations,   1. create a circle of radius n meters around each.   2. each circle has a unique score.   3. replace the circle's unique score with the sum of its score and the scores of all circles with which it intersects.   4. create a polygon(s)--the union of all circles with sum >= a threshold.   5. Layer in a new set of points and take the set of all these new points that are contained within the polygon(s).   6. Export as a table those points and their metadata. I once upon a time was reasonably fluent with Manifold, and I think this could be done in Manifold, I think. We're interested in a GIS, for now, costing no more than Manifold. Shortest learning curve super appreciated too. Thanks in advance for any guidance you can provide, Steve


How can I update the label of a Polygon Vector after it has been drawn?

I am quite new to OpenLayers. Right now, I have a polygon vector with some styling applied and a label.               var style = $.extend(true, {}, OpenLayers.Feature.Vector.style['default']);     style.pointRadius = 15;     style.label = "My Polygon";     style.fillColor = #f00;     style.strokeColor = #000;          var styleMap = new OpenLayers.StyleMap({"default" : style});          var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer", {styleMap: styleMap});      At some point after doing some processing, I want to display the result as a label. How can I update the label? I figure it would be something like this               polygonLayer.options.styleMap.styles.label = "Updated label";      Thanks in advance.


Where are Esri LasDatasetBuilder examples?

Does anyone know of any working examples leveraging the new ESRI ArcGIS 10.1 Lidar classes i.e LasDataSet or LasBuilder class? I've looked around on http://resources.arcgis.com/en/help/arcobjects-net/ but have not found anything other than the brief descriptions of individual class names and parameters they take in. However, nothing in respect to working examples and how to tie everything together.


How to use ECWP protocol with QGIS?

Is there a way to retrieve remote data through ECWP protocol in QGIS? I've read that .ecw files can be opened with QGIS, but haven't found anything concerning this particular protocol and QGIS.


How to Select polygon feature in ArcMap and pass Selection into Python Addin?

I have a script that uses a arcpy's 'SelectByAttribute' syntax to choose a record in a polygon feature class. Following that, I do a 'SelectbyLocation' to select points from a feature class that lie within the **selected** polygon. I do some processing on the points afterwards. What I want to know is, can I somehow use the 'Select Features' tool from the 'Tools' toolbar to select the polygon and then use that selection to pass into a python addin button instead of using the 'SelectByAttribute' noted above? I hope this makes sense. I'm new to python addins.


gdal_grid data from 2 different utm zone

I'm developing a component which grid data over Vietnam region using gdal_grid from gdal. Follow gdal example I've successfully griding data within 1 specific UTM zone. However, for data over the whole Vietnam region which cover 2 UTM zone 48N and 49N, I cant find the way to represent data in .csv file, header in .vrt file and also the bounding region in gdal_grid command parameters. Can anyone give me a suggestion? Should I convert the data from 49N zone to 48N zone? Thanks very much!


GeoServer and local PostgreSQL database without Internet

simple question: can I work on GeoServer and local PostgreSQL database on my PC without need for Internet connection ? would I be able to connect GeoServer to the database and create layers ? also would I be able to use pgAdmin and postGIS full usage ?


Setting a query loop

I am looking to apply a Select By Location protocol to my data, but need to first query individual IDs in my target and source layer (the same ID in each table, one at a time). How do I loop through a query? I have far too many IDs to manually set a query in each table then perform the selection. Is there a way to create a looping model (with parameters) or script that will systematically select each (matching) ID in my target and source layers then perform the tools I specify? **UPDATE:** I have used the Iterate Feature Selection tool in ModelBuilder to select by ID field in my target layer, but ModelBuilder will not let me have two iterators in the model (even if I could, there is no way to guarantee the iterators are selecting the same IDs at the same time). I have tried linking the _Value_ output of the iterator to a Select by Attribute tool for my source layer but the value can only be set as the whole expression, not part of it.   So I am nearly there. If anyone has any advice or an alternative method I have not thought of, I would appreciate it! ![enter image description here](http://i.stack.imgur.com/w47BU.jpg) **UPDATE 2:** So after extensive discussion with Roy (Thanks again!) this is the code I've come up with. Unfortunately, while no errors pop up when I run it, nothing actually happens. The process is marked as completely immediately after I run it and nothing has changed. Any thoughts?               rows = arcpy.SearchCursor("hmb_logbook_2009")     for row in rows:         whereClause = '"trip_id" = ' + str(row.trip_id)         arcpy.MakeFeatureLayer_management("hmb_logbook_2009", "currentLines", whereClause)         arcpy.SelectLayerByLocation_management("hmb2009", "WITHIN_A_DISTANCE", "currentLines", "1 Miles", "NEW_SELECTION")         arcpy.SelectLayerByAttribute_managemet("hmb2009", "SUBSET_SELECTION", ' "trip_id" = ' + str(row.trip_id))         arcpy.CalculateField_management("hmb2009", "match_activity", 1)         arcpy.SelectLayerByAttribute_managemet("hmb2009", "CLEAR_SELECTION")         arcpy.Delete_management("currentLines")     del row, rows


How to Verify if a FeatureLayer already exists?

I am currently working on a project where when user loads up their map (mxd) into our system, we create several custom featuerlayers for them. My problem is though, I have no idea how to check if I have ALREADY created those layers already (say user loads up mxd, layers created, save, re-load the mxd, should verify if layers already exists). Is there a Unique Id for a FeatuerLayerClass in ArcEngine10, there are OIDName, and ObjectClassID in FeatureLayerClass.FeatureClass, but those don't seem to work (cannot assign ObjectClassId, and want to use UniqueId for OIDName)? I created my layer as featurelayerclass business object like this. Code:                /// <summary>         ///     Unique Route LayerId         /// </summary>         public static Guid RouteFeatureLayerId         {             get { return Guid.Parse("ba25a332-0e48-4ce5-a4c5-38dc36c0700c"); }         }          /// <summary>         ///     Feature class that stores info on the routes         /// </summary>         public FeatureLayerClass RouteFeatureLayer         {             get             {                 if (_routeFeatureClass == null)                 {                     IPropertySet property = new PropertySetClass();                     property.SetProperty("Id", RouteFeatureLayerId);                          _routeFeatureClass = new FeatureLayerClass();                     _routeFeatureClass.FeatureClass = CreateFeatureClass(Workspace, null, ShapeType.Polylines.ToString(), CreateFields(ShapeType.Polylines, FeatureLayerType.Routes), null, null, "");                     _routeFeatureClass.Name = "Routes";                     _routeFeatureClass.Visible = true;                     _routeFeatureClass.Cached = true;                     _routeFeatureClass.AddExtension(property);                     CustomLayers.Add(_routeFeatureClass);                       }                      return _routeFeatureClass;             }             set             {                 _routeFeatureClass = value;             }         }      Creating workspace                  /// <summary>         ///     Create a workspace for the shapefile or geodatabase         /// </summary>     private IWorkspace CreateWorkspace(string workspaceType, string workspaceDirectory)     {         Type factoryType = null;         IWorkspaceFactory workspaceFactory = null;              switch (workspaceType)         {             case "Shapefile":                 // Instantiate a Shapefile workspace factory                 factoryType = Type.GetTypeFromProgID("esriDataSourcesFile.ShapefileWorkspaceFactory");                 break;             case "PersonalGeodatabase":                 // Instantiate an Access workspace factory                 factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.AccessWorkspaceFactory");                 break;             case "FileGeodatabase":                 // Instantiate a file geodatabase workspace factory                 factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBWorkspaceFactory");                 break;         }              workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);              //Create a directory hierarchy to seperate out datasets created for Points, Polylines, and Polygons         Directory.CreateDirectory(workspaceDirectory);              IWorkspaceName workspaceName = workspaceFactory.Create(workspaceDirectory + "\\", workspaceType, null, 0);         IName Name = (IName)workspaceName;         IWorkspace workspace = (IWorkspace)(Name.Open());         return workspace;          }      Creating FeatureClass               /// <summary>             ///     Helper to create a Feature Class.             /// </summary>             private IFeatureClass CreateFeatureClass(IWorkspace workspace, IFeatureDataset featureDataset, string featureClassName, IFields fields, ESRI.ArcGIS.esriSystem.UID CLSID, ESRI.ArcGIS.esriSystem.UID CLSEXT, string configKeyword)             {                 IFeatureClass featureClass = null;                 IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace; // Explicit Cast                 string shapeFieldName = String.Empty;                      try                 {                     if (featureClassName == "")                     {                         return null; // name was not passed in                     }                     //else if (((IWorkspace2)workspace).get_NameExists(esriDatasetType.esriDTFeatureClass, featureClassName))                     //{                     //    featureClass = featureWorkspace.OpenFeatureClass(featureClassName); // feature class with that name already exists                     //    return featureClass;                     //}                          // assign the class id value if not assigned                     if (CLSID == null)                     {                         CLSID = new ESRI.ArcGIS.esriSystem.UIDClass();                         CLSID.Value = "esriGeoDatabase.Feature";                     }                          // locate the shape field                     for (Int32 j = 0; j < fields.FieldCount; j++)                     {                         if (fields.get_Field(j).Type == esriFieldType.esriFieldTypeGeometry)                         {                             shapeFieldName = fields.get_Field(j).Name;                         }                     }                          // finally create and return the feature class                     if (featureDataset == null)                     {                         // if no feature dataset passed in, create at the workspace level                         featureClass = featureWorkspace.CreateFeatureClass(featureClassName, fields, CLSID, CLSEXT, esriFeatureType.esriFTSimple, shapeFieldName, configKeyword);                     }                     else                     {                         featureClass = featureDataset.CreateFeatureClass(featureClassName, fields, CLSID, CLSEXT, esriFeatureType.esriFTSimple, shapeFieldName, configKeyword);                     }                 }                 catch (Exception ex)                 {                     Debug.Assert(false, ex.ToString());                     Logger.Log.Debug(ex);                 }                 return featureClass;                  }      Code to get layer                 /// <summary>                 ///     Finds the layer                 /// </summary>                 /// <returns>the subcatchment layer</returns>                 private IGeoFeatureLayer GetLayer(FeatureLayerClass featureLayer)                 {                     IGeoFeatureLayer layer = null;                     ILayerExtensions layerExtension;                          for (int x = 0; x < MapControl.LayerCount; x++)                     {                         layerExtension = ((ILayerExtensions)MapControl.get_Layer(x));                              if (featureLayer.ExtensionCount > 0 && layerExtension.ExtensionCount > 0 &&                             layerExtension.get_Extension(0) is PropertySetClass &&                             featureLayer.get_Extension(0) is PropertySetClass &&                             ((PropertySetClass)layerExtension.get_Extension(0)).GetProperty("Id") == ((PropertySetClass)featureLayer.get_Extension(0)).GetProperty("Id"))                         {                             layer = MapControl.get_Layer(x) as IGeoFeatureLayer;                             break;                         }                     }                          return layer;                 }      Thanks and Regards, Kevin


Incremental retrieval of data from a database - OpenLayers

I have a new task now: The user will input the lat-lon values in a html Form and when an INSERT button is clicked these values should be stored the DB. Now when a submit button is clicked the markers of all the lat-lon values stored in a table in DB should be visible on the map. This is fairly not a tough task, but... when the user provides next value of a point, this should be stored in the same table and this particular point marker should be added to the map(the map already contains markers of previous points).......... that is, instead of reading the whole data(including the new point) from the DB and projecting on the map, since before adding new point to the DB we have already pointed the markers of previous values, now only the new point marker should be added to the map. For better understanding here is the example.... I already have 999 points in my DB and these are pointed on the map. Now the user gives 1000th point values and this will be stored in the DB. now if we reload(click on submit button) the page , instead of reading all the 1000 points from DB and create markers, it should only read the new point and add this to already existing map with 999 markers. I have a simple logic for this, table1 in DB contains all the values and table2 only the new value. whenever the user insert a points it is simultaneously added in both the tables and when the user submits the only value from table2 is deleted(so that next new value can be stored). so reading just from table2 works here, but how to add this point to the already existing map is the main task. I don't have any idea whether this can be done in OL or not, so please help me how to do this Hope my intention is understandable. Till now I have not worked with databases in OL, so please suggest me which DB(like mysql,etc..) suits better for this task.... and any other suggestions on storing/retrieving to/from DB Thanks a lot in advance


Creating dynamic links between features

I currently want to create links between 2 features. Ie., I have 2 basins that flow out and I want to use a line/polyline to have a link out of them and both point to a common 3rd feature, indicating that both basins have flows to the 3rd feature (area). Is there a way I can do that or do I have to create a polyline feature class myself with the two endpoints being the location of the basin and the outflow area? If I do it this way, when I move my basin around, the polyline won't follow. Is there a way I can make a LINK between the two? Thanks and Regards


TomTom OpenLayers zoom effects

This site has excellent resizing (and drifting) animations. http://www.tomtom.com/livetraffic Anybody know how the zoom effect is achieved? OpenLayers has an ancient sandbox with animated zooming, but it was never integrated.


How to use Eclipse/PyDev's debugger with ArcGIS

Has anyone successfully been able to configure ArcGIS 10 to use PyDev's debugging server for debugging? How do you set that up? I have PyDev working fine by itself, with ArcPy working fine, but I can't bind the debugger to scripts I run from ArcToolbox. I notice you can specify a debugger in ArcGIS, so I was wondering if it's possible to use the PyDev debug server. Anyone have opinions/tips/guidance?


Negative values in Flex app

I have a contractor working for me on a Flex application. He retrieves recordset for a intersect query from the web service published in house. But he is getting some ids as negative random number instead of integer (generally 9-10 digits). He says it is at our end but when I query from REST service, I get everything fine. He is using the query to display results in app. I don't know his code in details because I have tasks to develop server side functionalities and have my plate full. The mapping service, in question, is a query layer and retrieving data from ORACLE database. Has anyone else noticed similar behavior? or any suggestion on this? Thanks


How to display data from multiple layers in OpenLayers?

I am new to using openlayers and Geoserver. I currently have a few shapefiles of a place with a background map of that place. I have imported both shapefiles into postgresql and geoserver. After loading the layers onto geoserver I am being able to open the WMS layer in the OpenLayers preview of GeoServer. Is there any way I can add extra data to these shapefile and view those data in the WMS layer? * * * _**Update_** It's a TIFF image of a scanned map of a tea garden in North-East Assam. I have some shapefiles of that garden containing its bound area,drains and roads. I want to show these together on an open layer map(if possible on the above mentioned tiff image) How do I do this?


How to apply ArcGIS time slider on Multiple Data Frames at once?

Is there a way to use the Time Slider on multiple data frames simultaneously? Example: My Dataframe 1 shows precipitation values over an area and DataFrame 2 shows corresponding temperature.. I want to be able to use the slider to advance both DFrames at once. Right now only the 'activated' dataframe is being changed with the slider.. Thanks


Publishing OSM data in GeoServer that has been imported into PostGIS

I'm trying to publish data on GeoServer. I'm using Postgres/PostGIS and I've used osm2pgsql to load the data into the database. I've configured a store correctly (I can see the tables from the database listed when I add a new layer and choose the store). However when I go to add a new layer, what I see is different to the manual at geoserver (refer Publishing a PostGIS Table). The point that is different is the "Create a Layer" section, step 3 and 4. On step 3 it states the following: > From the New Layer chooser drop-down menu, select `cite:nyc_buidings`. I choose the data store and then get the list of layer names in the form: ![enter image description here](http://i.stack.imgur.com/dmBTu.png) The above screen shot is different to the doco for point 4. The doco for point 4 is as follows: ![enter image description here](http://i.stack.imgur.com/hG53R.png) While I expect the names to be different, the problem is that none of the names are selectable. The only text that is selectable is `Publish`. It's slightly confusing, partly because I've not been able to find any example specific to what I'm trying to do, so I've had a lot of missteps along the way and have learnt the hard way not to make any presumptions. My question is: is the `Publish` action against each table the same as the selectable text in the doco? My concern is that I don't want to accidentally publish all the data in a table.


Is it possible to have a single foreign key column referenced to two or more different tables?

In Spatialite (3.0.1), having a normal (non-spatial) table, I would like to relate it to two different spatial tables, with different geometries types (multipolygons and polylines), using the same column as a foreign key, and constraint it to their primary keys. The general idea would be to, while inserting a new record in the non-spatial table, one can choose to relate it to a line or a polygon from two distinct spatial tables. Example:               CREATE TABLE sp1_polygons       poly_id TEXT NOT NULL PRIMARY KEY;          SELECT AddGeometryColumn(       'sp1_polygons', 'geometry',       27493, 'MULTIPOLYGON', 'XY');          CREATE TABLE sp2_lines       poly_id TEXT NOT NULL PRIMARY KEY;          SELECT AddGeometryColumn(       'sp2_lines', 'geometry',       27493, 'MULTILINESTRING', 'XY');          CREATE TABLE t1 (       t1_id INTEGER NOT NULL PRIMARY KEY,       geo_id TEXT NOT NULL,       CONSTRAINT fk_sp1         FOREIGN KEY (geo_id)          REFERENCES sp1 (sp1_id)),       CONSTRAINT fk_sp2         FOREIGN KEY (geo_id) -- Equal to before         REFERENCES sp2 (sp2_id));      In my particular case, the non-spatial table represent management actions (harvesting, planting, cutting, fixing, etc...) in a farm, while the spatial tables represent homogeneus plots (polygons) to be managed (farmland, forest, natural vegetation), or homogeneus lines (water streams, natural fences, etc...).


How to extract area programmatically?

is there a possibility to extract the area covered by one geometry of a shapefile (polygon)? I tried with               thepoly.area()      but get "nan" as result. * * * Ok. I think you are right and there is something wrong with thepoly, so I'll need to post some code. I have a buildings vector (polygon) layer containing three polygons (which I created for testing). This layer is called "build" in the code. To extract its geometries, I wrote a little function:               def extract_poly_geometry(self, layer):          feature = QgsFeature()         geom_list = []         while layer.dataProvider().nextFeature(feature):             geom_list.append(feature.geometry())         return geom_list      In the main part of my program it is called by               theINPolyShapeField = self.extract_poly_geometry(build)      Later I iterate over the polygons and try to run some code for each of them:               for a in range(0, (len(theINPolyShapeField) - 1), 1): # going through buildings        thepoly = theINPolyShapeField[a] # extract building number a        QMessageBox.information(None, "DEBUG:", str(thepoly))        # polyarea = float(thepoly.area())        QMessageBox.information(None, "DEBUG:", str(thepoly.asPolygon()))      I use the QMessageBoxes for debuging. The first says > qgis.core.QgsGeometry object at 0xbbe889c (thanks for the reminder, andytillia), which I assume is correct. The second one however deliveres an empty list, "[]". * * * I tried to convert to MultyPoint by               QMessageBox.information(None, "DEBUG:", str(thepoly.asMultiPoint()))      to have a look at the points, but this crashes qGIS with segmentation fault… * * * I checked the type of thepoly on the console by               print(thepoly.wkbType())      which returns "3". According to Quantum GIS API Documentation this means "WKBPolygon". So thepoly is a polygon, is it? * * * Hm, i tried thepoly.validateGeometry() on the python console. When I tried it for my first geometry, it returned "[]". A call for the second one crashed QGIS with segmentation fault… The theINPolyShapeField list should not be the problem, as the issue also occures on the console, where I use geom_list directly. Yes, exactly, I see three polygons (that I drew before). I just created them using the "New shapefile" tool. I think I selected the right layer as I checked with build.name() and got the right "test_buildings", what is correct. len(theINPolyShapeField) returnes 3. Unfortunatelly thepoly.area() does not return anything as QGIS crashes with segmentation fault… Oo Thanks for the loop. It really looks lot nicer than mine. However I think this is not the problem, as I diden't use the loop on the console and the same issue occures.


Map Package is not showing points on map

I am fairly new to GIS, but I am working on an interactive legend and I need to just be able to add a map package to the xaml and it place the points on the map. The legend seems to be working. All of the label names are right, but the points do not show up. When I did this before with just each individual layer it worked. Any help would be appreciated. Here is my xaml.               <esri:Map x:Name="MyMap" Background="#FFE3E3E3" WrapAround="True" MouseClick="MyMap_MouseClick" MouseMove="MyMap_MouseMove" MouseRightButtonDown="MyMap_MouseRightButtonDown">                     <esri:ArcGISLocalDynamicMapServiceLayer ID="Calvert_City" Path="C:\Users\jessical\Documents\ArcGIS\CalvertCity_Test.mpk"/>                     <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />     </esri:Map>                      <Border Background="{StaticResource PanelGradient}" BorderThickness="1" CornerRadius="5"                 HorizontalAlignment="Left"  VerticalAlignment="Top"                 Margin="20" Padding="5" BorderBrush="Black" >                     <esri:Legend Map="{Binding ElementName=MyMap}"                                   LayerItemsMode="Tree"                              ShowOnlyVisibleLayers="False"                              Refreshed="Legend_Refreshed">                         <esri:Legend.MapLayerTemplate>                             <DataTemplate>                                 <StackPanel Orientation="Horizontal">                                     <CheckBox Content="{Binding Label}"                                         IsChecked="{Binding IsEnabled, Mode=TwoWay}"                                         IsEnabled="{Binding IsInScaleRange}" >                                     </CheckBox>                                     <Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" />                                 </StackPanel>                             </DataTemplate>                         </esri:Legend.MapLayerTemplate>                         <esri:Legend.LayerTemplate>                             <DataTemplate>                                 <CheckBox Content="{Binding Label}"                                 IsChecked="{Binding IsEnabled, Mode=TwoWay}"                                 IsEnabled="{Binding IsInScaleRange}" >                                 </CheckBox>                             </DataTemplate>                         </esri:Legend.LayerTemplate>                     </esri:Legend>                 </Border>      If you need anymore information, please let me know. Thanks!


How to fix "Unable to initialize ODBC connection to DSN for ALC_AV_CO"?

So I am new to the QGIS community, and I have been trying to bring in some rather large access databases with little to no success. I have windows 7, so I've gone in through administrative tools/Data Sources (ODBC) to create a new user DSN. I made it a Microsoft Access Driver ( _.mdb,_.accdb), and linked it to the database I wish to use. Then in QGIS, I have used add vector layer, selected Database, left type ODBC, given it a name, specified localhost and for Database, written in an identical name to the User DSN I created... BUT... every time I try to test it, it gives the following error:               Connection failed - Check settings and try again.          Extended error information:     Unable to initialize ODBC connection to DSN for ALC_AV_CO,     [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application      Why is it doing this? Interestingly enough the only time I had success, I managed to somehow create a User DSN which was a Microsoft Access Driver (*.mdb) without the .accdb (I saved a version of my DB in .mdb to make this work too). However, for reasons unknown to me, this option is no longer available to me in the create new data source menu, so I can't use it again! I would really appreciate if someone could give me advice on what I am doing wrong!