High number of unique user defined views

We're just at the stage of starting to developing a GIS application accessible through a web front end. We're thinking of using the boundless stack which includes GeoServer and PostGIS. One of our key requirements is having bespoke combinations of objects visible to each user. These can combinations of any type of object, which I expect would all exist across several layers in a mapping system. My question is, how best to manage this high number of unique views? There can be a very high number of objects that make up one view, while another might have quite a small number, so I'd expect some form of caching will be necessary for performance and drawing them "on the fly" will be too slow. But my understanding of caching is that it will only be beneficial or practical if the same view is seen by number of users. We have around 100,000 different objects (about half are vectors and half points) to give you a clue of the scale of data and some users will have access to all of it while others only a section. The definitions of what objects are available to each user are already stored as queries in a relational database, so can potentially pass them over as a list of object ids if that's the right way to do things. I have two ideas about how to solve this: >   1. Break these definitions down into tiles at a certain zoom level, so all > the unique user access will be a list of tiles. This will have the > disadvantage that the smallest section we can filter by is the size of a > tile and other objects we might not have wanted them to have access to are > shown. >   2. Have a general low detail view that everyone sees and some user > interaction is performed to see which part they want to see in detail and > this can be drawn "on the fly". This will mean only a small number of > objects is drawn at the time so performance isn't too bad but will also mean > they can't see everything they have access to at one time. > > > Or a combination of the two. I'm really after a pointer in the right direction as am pretty new to developing G.I.S. software rather than a complete solution. I just want to check whether I'm on the right track. Thanks very much. edit: changed client to users


drawing concentric circles in arcmap 10.1

I am using ArcMap 10.1 and I would like to know if there is a way to draw circles at a specific distance from a georeferenced coordinate. I have a property and I would like to know how far you can walk from it within different amounts of time, and I would like to portray this with multiple circles.


Labels are not showing in a published ArcGIS Feature Service

I'm using ArcMap 10.1 to publish a feature service. The labels show on the mxd, but not on the service (on a web application or on mobile application). Do I have to create an annotation layer or am I just not setting something up correctly in my mxd?


In ArcGIS 9.3, how do I eliminate the slivers of missing data between polygons?

I am editing a single-band .tiff file in ArcGIS 9.3. I started with an image that I had to georeference, but unfortunately, the image had these little slivers of missing data between the data cells. I get left with a raster file that has lots of "slivers" of nodata between my coding cells (shown here in white). ![enter image description here](http://i.stack.imgur.com/A9HOi.jpg) I would like to use something analogous to vector snapping, in which I eliminate those white slivers, instead making those sliver raster cells equal to the value of one of the adjacent cells. thank you.


How can I migrate my toolboxes and styles from ArcGIS 9.x to 10.x?

I am migrating from ArcGIS 9.3.1 to ArcGIS 10 SP4. I have several toolbox and style files that I want transfer to my new computer which is now running Windows 7. Can anyone tell me where I should put them?


PostGIS convert GeoJSON to geography

While there are functions to convert geography to GeoJSON: text ST_AsGeoJSON(geography geog, integer maxdecimaldigits=15, integer options=0); I do not see any way to go the opposite direction (GeoJSON to geography) only to geometry. http://postgis.net/docs/reference.html#Geometry_Constructors Is this on the roadmap? * * * Update: The data in the database has geography polygons or multi-polygons to describe each item in the DB. The query is coming from lealfet.js, which allows me to easily get the shape in GeoJSON. What I am doing is just a simple ST_Intersects() to check for overlap and return. Yes, I have a hack to convert this to EWKT right now, but I was wondering if it was on the roadmap to support this in a future version of PostGIS, or where one adds it as a wish list (since symmetry is a good thing, and it seems a shame that only geometry is supported in that direction).


Geomedia WebMap WFS to vector marker layer in Openlayers

Looking for minimal example/advice on getting a WFS service to show up as a vector layer with markers/icons in Openlayers map. I have created the WFS service in Geomedia WebMap 6.01.11.19 and the Openlayers map. a snippet from my map html code:               var wfs = new OpenLayers.Layer.Vector("myFeats", {                 minScale: 100000,                 maxScale: 99,                  strategies: [new OpenLayers.Strategy.BBOX()],                  protocol: new OpenLayers.Protocol.WFS({                         version: "1.1.0",                         srsName: "EPSG:900913",                         url: "http://gisdev2/OL_WFS/Request.aspx",                         featureType: ["myFeats"],                         featurePrefix: "gmgml",                         featureNS: "http://www.intergraph.com/geomedia/gml",                         geometryName: "GEOMETRY_PT",                   }),                  renderers: OpenLayers.Layer.Vector.prototype.renderers             }         );           Opening the IE11 debug console it bombs near this line in the Openlayers.js code {return this.xmldom?"string"==typeof a?this.xmldom.createNode(1,b,a):this.xmldom.createNode(1,b,""):document.createElementNS(a, b)} I suspect the problem is with the namespace in the WFS. I have read elsewhere to toggle the checkbox "on" for the 'Feature Collection in WFS namespace' setting in Geomedia WebMap. I have done this. I have also kept the 'Features namespace' value equal to 'http://www.intergraph.com/geomedia/gml' and the 'Features namespace prefix' equal to 'gmgml'. Still no luck getting the feature to show in the Openlayers map.


How to Use .tif File as a separate input for neural network Toolbox

I am facing some problems in building neural networks for flood prediction. The problem i am facing is i have basically 4 attributes which i am taking into consideration for flood prediction in my area of study. I have rainfall data from jan - dec from 1901-2001 I have an DEM image from which i will figure out slope, flow direction and flow accumulation using ARC- Hydro. Now i want to put these data each one as a separate input layer to network so that it can predict the outcome of flood.


r.shaded.relief plugin on a DEM layer

I loaded a raster digital elevation map from the DEM explorer website. I defined the projection and created a mapset. I then loaded the raster file into GRASS with the r.in.gdal plugin to create a DEM layer. So far, everything seems to work well. But when I try to create a shade effect on the DEM layer with the plugin r.shaded.relief, I receive the following message : r.shaded.relief map=dem@basin shadedmap=dem_shaded altitude=30 azimuth=270 zmult=1 scale=1 Calculating shading, please stand by. ￼Unable to open raster map ￼In calculation, script aborted. Finished with error And I cannot view any output. Your help will be very much appreciated. Many thanks.


how to compile qgis-1.8.0 on ubuntu

i have downloaded qgis-1.8.0.tar.bz2 and I want to install it on my linux computer(12.04 LTS). How can I perform it please? I do it because I am desperate with Qgis 2.0.1 Dufour on ubuntu 12.04, when I wan to create a mapfile (I have many errors with RT-mapserver). Thanks!


Check for overlaps in polygons

I want to get a list of all the polygons from table 2 which overlap with one polygon from table 1. Following is the query which I am trying to use which doesnt give any result.                Select b.bg_id      from table1 a,table2 b      where a.store_id = '74073'      AND SDO_Relate(a.geometry,b.geometry,'mask=anyinteract')='TRUE';      Any suggestions on what would be wrong here. Thank You.


ArcGIS 10.2 with MatPlotLib Non-Blocking Plot

ArcGIS 10.2 ships with MatPlotLib 1.1.1 installed. I am trying to display a non-blocking plot window. Trials: Launch an interactive plot in a Tk window from a toolbox. This causes the plot to display and the toolbox dialog continues to run in the foreground.                   import matplotlib.pyplot as plt              fig = plt.figure()         plt.plot(range(10), range(10))         plt.show()      Changing `plt.show()` to `plt.show(block=False)` should make the plot non- blocking. This crashes ArcMap. Attacking this from another direction - Create a python addin-in with a single button. That button executes the above code. Also crashes ArcMap. Is it possible to get a non-blocking MatPlotLib plot via arcpy?


Result Window in ArcGIS 10.1 is not Opening

I booted up ArcMap 10.1 today and found out the **Results Window** was not opening up. Background info:   * ArcMap is running through a virtualization program through at my company.   * Similar issue has came up in the past but with the search window not showing up.   * IT couldn't figure out what caused the issue with the search windows not opening up so they uninstalled the virulization program cleared the cache associated with ArcGIS.   * I noticed whenever I click on Geoprocessing->Results (I have also added in the results button through customization), the right edge in the following image blinks.   * I noticed a windows update went through last night so that may be the culprit? Then again, how did the search windows get borked? I've scoured stack-exchange/internet and could not find any info relating to this issue. Tools successfully run and I can view the history log as mentioned here but i really need to view the results window so I can rerun various tools again without filling out the parameters again. Does anybody know of any registry keys/services that I can look into that that may need to be tweaked? I don't want to resort to IT since I know for a fact they will uninstall everything, in turn loosing all my defaults e.g. shortcut keys, toolbars, and document customization.


raster overlap count

Would it be possible to simply detect and count overlaps between raster files, i.e. not polygons against rasters, using arcpy? By default I don't have the spatial analyst extension for ArcMap 10.1 but if need be I could acquire one temporarily. I need to iterate over small tif files in various directories and test them against large rasters.


DesignJet 800 36" by 42" arcmap Print acrossed the whole paper

I'm trying to print a map using the whole size of paper... possible?


What is the recommended ram for an ArcServer 9.3 box?

I've dug around on the ESRI site for a while and can't find a conclusive answer. Can someone tell me what ESRI's recommenced RAM is for an server running ArcServer 9.3, with hopefully a link to document it?


Rasterize shapefile using another raster's size and resultion

Rasterizing a vector (shp) I face the following problem: I want my output file (the rasterized vector) to have the same resolution and dimensions as an existing raster. If I understand the interface correctly, the option "keep size and resolution of existing layer" should do this job. However, there is no option to choose an existing layer. Any hints? Of course, I can achieve (at least approximately) what I want to do **using the –te and –tr** parameters. However it would be interesting to know if and how the "keep seize and resolution of existing layer" works.


Convert Google Street View urls from OLD to NEW

My website accepts google street view links as submissions. Google has updated the url format some months ago. Does anybody know how the old format is converted into the new format (and vice versa)? There are some parts obviously in common, others I cannot associate. Here is an example of what the urls look like. OLD: https://maps.google.com/maps?ll=8.253284,-75.570099&spn=0.18,0.3&cbll=8.253284,-75.570099&layer=c&panoid=5_ZZUCFHDYJsB1ZUtJbNYg&cbp=,42.83,,3,4.169998 NEW: https://www.google.com/maps/@8.253284,-75.570099,3a,15y,42.83h,85.83t/data=!3m4!1e1!3m2!1s5_ZZUCFHDYJsB1ZUtJbNYg!2e0


Data migration through ETL Tool from file to personal geodatabase with existing geometric network and cardinality rule?

I want to perform data migration through ETL tool from file geodatabase to personal geodatabase with existing geometric network and cardinality rule. Please describe how to migrate?


What is the math behind rasterization?

I'm taking the first steps in QGIS (version 2.2 Valmiera) and I am having some difficulties in knowing what mathematical criterion that QGIS uses when converting polygons (shapefile) to raster. I'm using a resolution of 100 by 100 pixels. Commands: Raster - Conversion What is the percentage that the program uses?When I overlap the shapefile and raster that the information is not 100% coincidental. I understand that the information is not completely coincident, because the raster consists in squares (pixels). As I understand the raster is a binary system 0 (absence) and 1 (presence of what is to be studied). This "1" corresponds to a square (pixel). what is your percentage? What is the mathematical mechanism? I'm losing information? * * * In Figure 4 you can see how the overlap is not complete (marked with circles). What I would like to know which algorithm that QGIS uses the rasterization? What is your standard? Is there a percentage to exclude certain information? I understand that in geometric terms the result of a shapefile is not the same as a raster. For the program to do the rasterization process will have to be a mathematical foundation? ![enter image description here](http://i.stack.imgur.com/4vcPi.png) ![enter image description here](http://i.stack.imgur.com/utgtK.png) ![enter image description here](http://i.stack.imgur.com/1flMw.png) ![enter image description here](http://i.stack.imgur.com/Q8d2x.png)


How can I import the export file (*.sdx) from ArcSDE9.3 to ArcSDE10.1?

We got some files (*.sdx) from our clients using **sdeexport** from ArcSDE 9.3. We only have ArcSDE 10.1. We tried to use sdeimport command like this:               sdeimport -o create -t NHDFCODE -f c:\temp\NHD.NHDFCODE -v -i sde:oracle11g:**\** -u sde** -p **.       When run this command, there is the only message we see:               Copyright (c) 2009 Microsoft Corporation.  All rights reserved.          ArcSDE 10.1  for Oracle11g Build 679 Thu Apr  5 11:43:21  2012     SDEX File Import         Administration Utility     -----------------------------------------------------      Since I cannot tell what was going on based on this,I am just wondering if we can import the sdx file from ArcSDE 9.3 to ArcSDE 10.1. Thanks. **Update:**               sdexinfo -o describe -f c:\temp\NHD.NHDFCODE     ------------------------------------------------------------------------     SDEX File:             c:\temp\NHDNHDFCODE.sdx     Version:               SDEX 10.0.0_1     Type:                  Final     Volume Type:           Single          SDE Attribute Columns: 15     Name                                 Type    Width numDecimal  NULL?   RowID     -------------------------------- ----------- ----- ---------- -------- -----     OBJECTID                         SE_INT32       10      0     NOT NULL  SDE     FCODE                            SE_INT32       10      0     NOT NULL     DESCRIPTION                      SE_NSTRING    255      0     NOT NULL     CANALDITCHTYPE                   SE_NSTRING     32      0     CONSTRUCTIONMATERIAL             SE_NSTRING     32      0     HYDROGRAPHICCATEGORY             SE_NSTRING     32      0     INUNDATIONCONTROLSTATUS          SE_NSTRING     32      0     OPERATIONALSTATUS                SE_NSTRING     32      0     PIPELINETYPE                     SE_NSTRING     32      0     POSITIONALACCURACY               SE_NSTRING     32      0     RELATIONSHIPTOSURFACE            SE_NSTRING     32      0     RESERVOIRTYPE                    SE_NSTRING     32      0     STAGE                            SE_NSTRING     32      0     SPECIALUSEZONETYPE               SE_NSTRING     32      0     KCODE                            SE_NSTRING     30      0     NOT NULL


Decoding Mapbox grid response

Can anybody give me insight into the grid json structure that Mapbox returns for use with overlays on tiles. What is the significance of !,#,$? Thanks in advance. ![Screenshot from HTTP Proxy of Mapbox .grid.json response](http://i.stack.imgur.com/zGNzj.png)


Is the derived area/length/xy values of a polygon/polyline layer in QGIS usable?

I have a raster that is projected to a state plane CRS and I am adding polygon/polyline shapefiles that are projected to WGS84. On the fly transformation is set to reproject to my raster CRS. When I use the identify features tool to select a feature, under derived I can see the correct area/length measurements. Is there a way to transfer that exact information into a new column(s) in the attributes by using the field calculator?


Problem with Swiss coordinate system overlay in WMS

I have administrative boundaries data for communities in Switzerland from SwissTopo. Original data came in shape files with 'Bessel 1841 Hotine Oblique Mercator Azimuth Natural Origin' projection. Full info from ArcGIS:               Projection: Hotine_Oblique_Mercator_Azimuth_Natural_Origin     False_Easting: -9419820.590700     False_Northing: 200000.000000     Scale_Factor: 1.000000     Azimuth: 90.000000     Longitude_Of_Center: 7.439583     Latitude_Of_Center: 46.952406     Linear Unit: Meter (1.000000)          Geographic Coordinate System: GCS_Bessel_1841     Angular Unit: Degree (0.017453292519943299)     Prime Meridian: Greenwich (0.000000000000000000)     Datum: D_Bessel_1841       Spheroid: Bessel_1841         Semimajor Axis: 6377397.155000000300000000         Semiminor Axis: 6356078.962818188600000000         Inverse Flattening: 299.152812799999990000      I tried defining and projecting this data into 'CH1903 LV03' (as described here) in ArcGIS 9.3 and loaded into GIS Cloud service. When I overlay my data onto Google Maps or Open Street Map, they seem to be shifted ~200/300m NE from correct position. This happens to both original data in CH1903 LV03 and data reprojected to oter CS. ![alt text](http://i.stack.imgur.com/gNdjZ.jpg) Has anyone of you encountered solution for such problem?


How do I use GDAL to convert from an arbitrary projection/datum into Equirectangular/WGS84?

I've been trying to use GDAL to convert from an arbitrary projection/datum into Equirectangular (aka Plate Caree, aka Equidistant Cylindrical, aka Geographic, aka Lat/Long) with WGS84 datum. All of my input files have an associated PRJ file that I've been using with GDAL with this statement:               gdalwarp -s_srs Input.prj -t_srs Output.prj Input.xyz Output.tif      So far, I've had mixed results. I've been able to successfully transform a Lambert Equal Area projection in WGS84 to Geographic/WGS84, but performing a transform on LEA in RT90 projection causes an error of ~1km. Stranger still, I tried to transform two Sinusoidal projections in RT90 and in WGS84, both of which resulted in an error of 16km! I suspect that these errors are largely due to some sort of ellipsoid/sphere discrepancy. I'm very confused as to why these errors are so random, but more concerned that they are happening at all. Shouldn't `gdalwarp` take any ellipsoid information about the source and target from the PRJ files and transform between them? What can I do to correct my issue?


How to get the result of wms getFeatureInfo Request result into a array

I am using openlayers 2.1.3 and using open layers i get the featureinfo result but it is a web page i want to get the output fields into a variable so i can display them in grid, Plz help me


How can I determine which service is associated with a particular ArcSOC.exe process and vice versa?

I've got a development arcgis server machine configured with multiple mapservices, gp services and SOE's. Sometimes an arcgissoc.exe process gets hung. There also seem to be too many SOC's running based on what I can see in ArcCatalog. How can I figure out which ArcSOC.exe (process id) goes with which service in arccatalog? I'm running 10.0.


retrieving polygon shapes from postgis in geodjango

Can anyone explain how to extract polygon shapes that are stored in a PostGIS database and display it in the browser? I am using geodjango framework in python. I would like a step by step guide on how to achieve this.


Shapefile of European Parliament constituencies?

Is there any shapefile (or similar vector data set) of European Parliament electoral constituencies? Some countries (e.g. Germany) are basically one constituency, but others (e.g. UK) are not. Is there any shapefile of all the constituencies in one file?


CartoDB "Error loading rows, check your SQL query" & "There is a pb with your connection"

I have been trying to install my own CartoDB server for a few weeks. I succeeded to install each part with no error (after few corrections) with this tutorial. Make check with CartoDB-SQL-API and Windshaft-CartoDB are ok! I can import data : when I am in my dashboard, I can see my file with its 193 rows. But when I try to see the table, the message " **Error loading rows, check your SQL query** " appears. All columns of my file are here but empty. I try to click on Map View, which give me the following error : " **There is a problem with your connection** ". The view is allready focused on the area which contains my data. I have been trying to fix this problem for a looooong time but I haven't succeeded anyway. Any help will be welcome. Thanks, Alex.


OpenLayers SelectFeature control ignores graphicZIndex

I am having trouble with SelectFeature control with hover = true and highlightOnly = true. There are two adjacent polygons on the same layer, one on top of the other. There's also a SelectFeature control that highlights a polygon on hover. Layer has styleMap with 'default' and 'select' intents. Select intent has a higher graphicZIndex. But it's ignored - whenever I hover upper polygon its lower border (the one that's common with the lower polygon) is rendered _under_ the lower polygon. If you go to http://jsfiddle.net/vLpt6/12/ you'll see two adjacent polygons - hover the upper polygon and its lower border will be rendered under the lower polygon as if graphicZIndex had no effect. Here's the HTML code:

      And javascript code:               var map = new OpenLayers.Map({         div: 'map',         allOverlays: true,         controls: [],         fractionalZoom: true     });              var layer = new OpenLayers.Layer.Vector('Layer');     map.addLayer(layer);          layer.rendererOptions = { zIndexing: true };     layer.styleMap = new OpenLayers.StyleMap({         'default': {             fillColor: '#a9a8a7',             strokeColor: '#ffffff',             strokeWidth: 1,             graphicZIndex: 10         },         'select': {             fillColor: '#a9a8a7',             strokeColor: '#5d7cc4',             strokeWidth: 5,             cursor: 'pointer',             graphicZIndex: 100         }     });               var format = new OpenLayers.Format.WKT();     var features = [         format.read('POLYGON((0 0, 100 0, 100 50, 0 50, 0 0))'),         format.read('POLYGON((0 0, 0 -50, 100 -50, 100 0, 0 0))')     ];     layer.addFeatures(features);          map.zoomToExtent(layer.getDataExtent());               var hoverControl = new OpenLayers.Control.SelectFeature(         [layer],         {             hover: true,             highlightOnly: true         }     );     map.addControl(hoverControl);     hoverControl.activate();      What should I correct so that graphicsZIndex would have effect?map


CSV to KML can't show the clickable link in the bubble of Google Maps

I have 200 places in CSV in the following: Name of the place, Lat, Lon, Link I convert CSV to SHP than convert it KML in ArcMap with KML Converter extension, but if i upload the KML file to Goggle Maps it shows only the name of the place in the header no more. I tryed the all variations in KML extensions but it doesn't work... Too much work if i paste the link to the bubble one by one... The following map whows my idea how should look: http://goo.gl/maps/P0XRI Does anybody can help me?


How to solve an instalation problem requiring "liblwgeom" to work with "shp2pgsql"

I am trying to import shape file to postgis. I have problem configuring shp2pgsql. I am getting this error :               dyld: Library not loaded: @loader_path/../lib/liblwgeom-2.1.1.dylib       Referenced from: /Library/PostgreSQL/9.3/bin/shp2pgsql       Reason: image not found      I am trying to explore where the command is:               macbook$ locate shp2pgsql     /Library/PostgreSQL/9.3/PostGIS/man/shp2pgsql.1     /Library/PostgreSQL/9.3/bin/shp2pgsql               macbook$ ls /usr/bin/shp2pgsql     /usr/bin/shp2pgsql      I installed "liblwgeom" using homebrew,               macbook$ ls /usr/local/opt/liblwgeom/lib     liblwgeom-2.1.1.dylib      Do you have any idea how to resolve this issue .


How to implement bivariate Ripley's K function in ArcGIS 10?

The attached image shows a forest gap with red pine represented as circles and white pine represented as crosses. I am interested in determining if there is a positive or negative association between the two species of pine trees (i.e. whether or not they are growing in the same areas). I am aware of Kcross and Kmulti in the R spatstat package. However, since I have 50 gaps to analyze and am more familiar with programming in python than R, I would like to find an iterative approach using ArcGIS and python.   1. How can I implement a bivariate Ripley's K function in ArcGIS?   2. Would another form of spatial statistics within ArcGIS be more suitable for this type of analysis? I am also open to R solutions as an alternative to ArcGIS. ![enter image description here](http://i.stack.imgur.com/Icl47.jpg)


Leaflet Javascript: Layer Control Style in Internet Explorer Messed Up

[Update: Never mind. Got it. Will post the answer later. Thx] Please see this link: http://gisdev.clemson.edu/ffliestemp/ . Only in Internet Explorer the Layer's Control box/panel is expanded all the way across the screen. Here is the relevant code for the Layer's Control. Thanks, Meengla               map = new L.Map("map",{             center: [34.8, -82.0],             zoom: 12,             layers: [mapquestOSM, fireflies]         });              var baseLayers = {             "MapQuest Streets": mapquestOSM,             "MapQuest Aerial": mapquestOAM         };         var overlays = {             "Fire Flies:": fireflies         };              layersControl = new L.Control.Layers(baseLayers, overlays, {             collapsed: false         });              map.addControl(layersControl);


Using R to calculate the area of multiple polygons on a map that intersect with another overlaid polygon

I have a shapefile downloaded from the Ordnance Survey that gives electoral ward (division) boundaries for a county of the United Kingdom. I have successfully used R to load the shapefile and plotted various maps using `ggplot2` as described in this question. It's all working rather well. Now I would like to create a new polygon of arbitrary shape, add it to the map, then calculate the population living in the area lying under the shape, which might cover or partially cover multiple divisions. I have the population for each electoral division and I can make the simplifying assumption that the population in each ward is uniformly distributed. That suggests the following steps. 1) Overlay a new shape on the map that partially covers multiple electoral divisions. Let's say there are 3 divisions, for the sake of argument. It would look something like this. [Edit: except that in the image below the shape straddles 5 divisions rather than 3] ![enter image description here](http://i.stack.imgur.com/BCbCy.png) 2) Calculate the percentage of the area of each of these 3 divisions that intersects with the overlaid polygon. 3) Estimate population by getting the percentage of the area of each division covered by the overlaid shape and multiplying this by the population of each division. I think I can probably work out how to create the polygon and overlay it on the map i.e. add it to the existing data frame using the useful answer to this and other questions. The bit that worries me is the task of working out the percentage of each division that is covered by the overlaid shape. The `lat` and `long` columns in the data frame are those strange Ordnance Survey OpenData figures (Eastings and Northings or something). **So my first question is: How would I go about finding the area (or a subset of the area) of the polygons that define the borders of an electoral division using this data?** Because even a meaningful subset of this data frame is large I have used `dput` to create a 500k file (which can be copied and pasted or downloaded from here) rather than posting it in this question. The map that forms the base for the image above was created with the following:               require(ggplot2)     ggplot(smalldf, aes(x = long, y = lat, group = group)) +         geom_polygon(colour = "grey50", size = 1, aes(fill = smalldf$bin))      **My second question is: am I using the right tools?** Currently I am using `readShapePoly` from the `maptools` package to read the shapefile. I then use `fortify` to create a data frame of about 130k lines, suitable for use in `ggplot`. Maybe I should be using a different package if there is one with useful tools for such processes?


How to enumerate ArcGIS Server 10 map services with ArcPy

I need to connect to ArcGIS server with ArcPy and enumerate over map services. I need to:   * Loop through each ArcGIS server map service   * Stop/Start the service   * Get the service source document (MXD/MSD) path I am going to be running the `findAndReplaceWorkspacePaths` function on each service. Can someone point me in the right direction how to do get a handle to the ArcGIS server map services please?


Is convention to denote Building Elevation with respect to ground or sea level?

Have a query on shapefile. I have a shapefile containing a number of polygon features representing buildings. I am trying to extract the elevation of the building. I would like to know if the usual convention in denoting the shapefile elevation is given with respect to the sea level or is it given with respect to the ground?


How can i change vertex option programmatically using python in QGis?

I want to activate the option "Show markers only for selected features" in Setting-> options->vertex markers ,using python. does anyone know if i can do it programmatically ? i attached a photo of the ui and i market the option,![enter image description here](http://i.stack.imgur.com/wY4Ez.png)


Calculating Stream Length-gradient Index (Hack Index) with the field calculator

I'm trying to calculate the Stream Length-Gradient Index of a stream (example data below). Just started to get into python, but am struggling with a solution to this problem. I have 42 streams to run this code on and doing it by with excel is tedious. The stream is broken up into segments and I'd like to get a SL index for each stream. The equation: SL = (10/Length of segment)*(sum(length of segments) * (length of segment/2)) In each stream attribute table I have: Length 69.98 <-- top of stream 90.228 94.206 85.429 94.039 99.095 92.983 76.736 56.657 <----head of stream Now the biggest hickup I have is that all the data is backwards I need to run the calculation from the head of the stream (bottom of the attribute table) to the top of the stream. Thanks!


Leaflet.js displaying incomplete base map

I am working on a tile server with a `leaflet.js` UI. I have successfully created the tiles for my base map and the tiles for the overlay. The result can be seen here (zoom in further to see overlay). Unfortunately, as can be observed, the base map is incomplete and is wrapping in a weird way. This is not the result of a fault tiling process I believe as I am using the same tile hierarchy here, using `openlayers.js`. As you can see, in that UI, the base map is complete. This is my current leaflet interface:                        <title>Mapea - Mapeamento Meoteorológica Inteligente</title>         <link rel="stylesheet" href="style/leaflet.css" />         <link rel="stylesheet" href="style/map.css" />         <link rel="stylesheet" href="style/L.Control.MousePosition.css"  />

                                 Although I doubt this has to anything to do with the tiling process, as I wrote the following based on this [google tutorial][3], here is my tiling script.*   * Sorry, I could not post the link directly, I'm new to this stackexchange.               #!/bin/bash     ##     ## tiler: creates tiled hierarchy from an ungeoreferenced image.     ## usage: tiler <input_image> <N> <E> <S> <W>     ##          prefix=$(basename ${1%%.*})     N=$2     E=$3     S=$4     W=$5          # First, recover the image's dimensions.     IMG_CHARS=`identify "$1" | cut -f 3 -d' '`     xsize=`echo $IMG_CHARS | cut -d'x' -f 1`     ysize=`echo $IMG_CHARS | cut -d'x' -f 2`          # Insert georeferencing points, prepare for map projection.     gdal_translate -of VRT -a_srs EPSG:4326 -gcp 0 0 $W $N -gcp $xsize 0 $E $N -gcp $xsize $ysize $E $S $1 ${prefix}.vrt          # Projection itself.     gdalwarp -of VRT -t_srs EPSG:4326 ${prefix}.vrt ${prefix}.vrt          # Create the tiles according to rules above.     gdal2tiles.py -t $prefix -p geodetic ${prefix}.vrt      UPDATE - I have followed the recommendations of the solutions below, but to no avail (see comments). Still, @Sorin is correct in his analysis. This is the tree output of the first few levels of my base map tile hierarchy.               natural     ├── 0     │   ├── 0     │   │   └── 0.png     │   └── 1     │       └── 0.png     ├── 1     │   ├── 0     │   │   ├── 0.png     │   │   └── 1.png     │   ├── 1     │   │   ├── 0.png     │   │   └── 1.png     │   ├── 2     │   │   ├── 0.png     │   │   └── 1.png     │   └── 3     │       ├── 0.png     │       ├── 1.kml     .     .     .      As @Sorin said, the folders seem to have something wrong. For example, zoom 0 should only have one folder, the 0 folder, which only has one file, the 0.png file. Instead it has a 1 folder, which itself has another 0.png. Inspecting these files, I have come upon the other missing half of the map (0/1/0.png). link [3]: developers.google.com/kml/articles/raster


Is it possible to import SAGA colour styles in QGIS?

iam still using QGIS and SAGA independently in my productive use (despite the excellent SEXTANTE toolbox, which is sometimes a little buggy). SAGA has some very nice default styles and i am wondering if it is possible to import SAGA color palettes (extension .pal) into QGIS?


How to add a vector layer in QGIS in python

Someone please can help me how to start with the library qgis ? At first, i'd like to know, by clicking in a button on my litle plugin that i created for QGIS how to add a vector layer with python code. Thank you for your help.


How to Warp vector file based on control points in ArcMap?

I have a very comprehensive polyline file that, when compared with imagery, is obviously offset by a few hundred meters, but the offset varies from one area to another. It would be easy for me to create a set of control points to correct this, but I can't find the correct tool to do so. I'm using ArcMap, and have just about every ESRI extension known to man, if that helps. I've entertained the idea of creating a raster and using the raster warp tool, then reconverting back to vector, but I don't want the inevitable loss of fidelity from multiple conversions. If anyone has another way to do this I'm all ears.


Average Proximity Metric

I'm looking for a metric that gets at average distance to a given feature. For example, for a point in the water, how far, on average, is the land or to what extent is the point surrounded by land. Scenario: two points are the same distance from shore, but one is adjacent to the tip of a narrow peninsula of land while the other is at the bottom of a narrow bay. Clearly one point has more land around it than the other. I'm looking for a way to quantify this. I'm not concerned with the specific software tool. Formulas or names of metric would be useful to get me looking in the right place in the literature.


Error while scripting ArcGIS in VB.NET "Exception from HRESULT: 0x80040202"

I am getting this Run time Error while coding ArcGIS in VB.NET script to calculate distance between two 3-D objects. > “Exception from HRESULT: 0x80040202” I tried to understand the problem but failed. Please help me to debug. I am trying to add a screen shot but it looks like i need at least 10 reputation to post images. Actually my work is to create a Rectangular plane with 3D vertices below earth's surface and to find distance to the plane from all the points of a Grid created on earth's surface. All this work is to be done in ArcGIS. So I created a Geodatabase in Geographic Coordinate System WGS-1984. Then I created a grid file and added envelope, lats and longs etc. Then I created two shape files a point and a polygon in GCS and projected them to UTM system. Then I used an interface called I3DProximity to find the distance. Then it gave the error. So here's my code. First I created Geodatabase here and assigned Geographic coodrinate system: Though I have given the whole code, I guess the error is somewhere in the last 2 parts, like in spatial referencing and using IProximity3D interface.                       Dim wksp As IWorkspace             wksp = CreateFileGDB(mainPath, GDBName)             Dim fWS As IFeatureWorkspace             fWS = CType(wksp, IFeatureWorkspace)                  Dim pSpatialReferenceEnvironment As SpatialReferenceEnvironment             pSpatialReferenceEnvironment = New SpatialReferenceEnvironment             Dim pGeographicCoordinateSystem As IGeographicCoordinateSystem             pGeographicCoordinateSystem = pSpatialReferenceEnvironment.CreateGeographicCoordinateSystem(esriSRGeoCSType.esriSRGeoCS_WGS1984)                  Dim pfeatclass As IFeatureClass             pfeatclass = CreateFeatureClassWithFields(mainName, fWS)                  'Adding Fields to the GDB file             newfields()                  'polygons             Dim pworkedit As IWorkspaceEdit = CType(wksp, IWorkspaceEdit)             Dim pfeaturebuffer As IFeatureBuffer                  pworkedit.StartEditing(True)             pworkedit.StartEditOperation()             pfeaturebuffer = pfeatclass.CreateFeatureBuffer                  Dim pfeature As IFeature = CType(pfeaturebuffer, IFeature)             Dim nfeatcursor As IFeatureCursor = pfeatclass.Insert(True)                  Dim Xmin As Double             Dim Ymin As Double             Dim Xmax As Double             Dim Ymax As Double                  If ToolStripTextBox10.Text = "Xmin" Then                 Dim player As ILayer = axMapControl1.ActiveView.FocusMap.Layer(0)                 Xmin = player.AreaOfInterest.Envelope.XMin 'longitude of left bottom point                 Ymin = player.AreaOfInterest.Envelope.YMin 'latitude                 Xmax = player.AreaOfInterest.Envelope.XMax 'longitude of top right point                 Ymax = player.AreaOfInterest.Envelope.YMax 'latitude             Else                 Xmin = Val(ToolStripTextBox10.Text)                 Ymin = Val(ToolStripTextBox11.Text)                 Xmax = Val(ToolStripTextBox12.Text)                 Ymax = Val(ToolStripTextBox13.Text)                  End If                  Dim numgridsLong As Integer = CType((Xmax - Xmin) / gInterval, Integer)             Dim numgridsLat As Integer = CType((Ymax - Ymin) / gInterval, Integer)                  ReDim gridLong(numgridsLong, numgridsLat)             ReDim gridLat(numgridsLong, numgridsLat)                  gridLong(0, 0) = Xmin             gridLat(0, 0) = Ymin                  For j = 0 To (numgridsLat - 1)                 For i = 0 To (numgridsLong - 1)                     gridLong(i, j) = Xmin + i * gInterval                     gridLat(i, j) = Ymin + j * gInterval                     Dim pPolygon As IPolygon = getPolygon(gridLong(i, j), gridLat(i, j))                     'createPolygon(gridLong(i, j), gridLat(i, j), interval1, interval2)                          pfeature.Shape = pPolygon                     nfeatcursor.InsertFeature(pfeaturebuffer)                 Next i             Next j                  nfeatcursor.Flush()             pworkedit.StopEditOperation()             pworkedit.StopEditing(True)                  'Adding lattitude and longitude field values to the mainName fileGDB             AddLongLat()                  ' Adding a featureclass as a layer to Map Control             Dim featWS As IFeatureWorkspace = retFWspace(PathName)             Dim featclass As IFeatureClass = featWS.OpenFeatureClass(mainName)             Dim gridFLayer As IFeatureLayer = New FeatureLayer             With gridFLayer                 .FeatureClass = featclass                 .Name = mainName                 .Visible = True             End With                  axMapControl1.AddLayer(gridFLayer)             axMapControl1.ActiveView.FocusMap.RecalcFullExtent()                  disp_stat("GDB : " & PathName)             disp_stat("Grid Interval: " & gInterval)             disp_stat("Grids: " & numgridsLong & " * " & numgridsLat)             Count = 0             disp_stat("Feature count: " & FeatCount())              Else             Exit Sub         End If              MakeGridTable()         populategridtableAddcolumn()         initialization()         'AddColumn("Latitude")         'AddColumn("Longitude")         'AddColumn("Test")         transfer("Latitude")         transfer("Longitude")         mruList.AddItem(mainPath) 'MRU List Loader         disp_stat("Create GDB Executed")         'save_log()              watch.Stop()         disp_stat(watch.Elapsed.TotalMilliseconds)      Here I created a rectangle using four 3D points:                   Dim pPoint As IPoint = New PointClass()         Dim pPointCollection As IPointCollection = New RingClass()         Dim pGeomCollection As IGeometryCollection = New PolygonClass()         pPoint.PutCoords(lat2, long2)         pPoint.Z = Z2         pPointCollection.AddPoint(pPoint)         pPoint.PutCoords(lat1, long1)         pPoint.Z = Z1         pPointCollection.AddPoint(pPoint)              pPoint.PutCoords(lat4, long4)         pPoint.Z = Z4         pPointCollection.AddPoint(pPoint)         pPoint.PutCoords(lat3, long3)         pPoint.Z = Z3         pPointCollection.AddPoint(pPoint)         pGeomCollection.AddGeometry(pPointCollection)         Dim pOutGeometry As IGeometry = CType(pGeomCollection, IGeometry)         Dim pZaware As IZAware = CType(pOutGeometry, IZAware)         pZaware.ZAware = True      Now I created a 3D point to check if the distance calculation works fine                   Dim gpoint As IPoint = New PointClass()         Dim gridgeometry As IGeometry = CType(gpoint, IGeometry)         Dim gZaware As IZAware = CType(gridgeometry, IZAware)         gZaware.ZAware = True         gpoint.PutCoords(71.558, 21.663)         gpoint.Z = 0      Here I gave Geographic coordinate systems to bothe polygon and point and projected them to UTM coordinate system as 3D operators works in projected systems rather than geographic coordinate systems                   Dim pSpatRefFact As ESRI.ArcGIS.Geometry.ISpatialReferenceFactory         pSpatRefFact = New ESRI.ArcGIS.Geometry.SpatialReferenceEnvironment              Dim pGCS As ESRI.ArcGIS.Geometry.IGeographicCoordinateSystem         pGCS = pSpatRefFact.CreateGeographicCoordinateSystem(ESRI.ArcGIS.Geometry.esriSRGeoCSType.esriSRGeoCS_WGS1984)              pOutGeometry.SpatialReference = pGCS         gpoint.SpatialReference = pGCS              'Now Define the Projected Coordinate System         Dim projectedcosys As IProjectedCoordinateSystem         projectedcosys = pSpatRefFact.CreateProjectedCoordinateSystem(esriSRProjCSType.esriSRProjCS_WGS1984UTM_43N)              'Now We need to project it         pOutGeometry.Project(projectedcosys)                 gridgeometry.Project(projectedcosys)      Now I use IProximity3D inerface to return the distance                   Dim pProxOp As IProximityOperator3D = CType(gpoint, IProximityOperator3D)         Dim pReturnDistance As Double = pProxOp.ReturnDistance3D(pOutGeometry)         MsgBox(pReturnDistance)      ![Visual Studio](http://i.stack.imgur.com/3zfv3.png)


ArcObjects open report wizard

ArcMap provides a function to create report and after the creation can save as different formats. Now I want to allow user to skip the intermediate steps. I want do the report function using ArcObjects (python access arcobjects). In my design, the using of create report tools has 3 steps: (1) Use a script tool to allow user to choose the report target attribute and the criteria to generate the report. (2) display the report viewer on map (the same as use ArcMap View ->Reports ->Create Report). (3) allow user to export the report as different formats provide by report viewer. After my research, I know some people use ReportLab to generate pdf report, but I am interest in whether I can get the report viewer the same as using ArcMap (in Step (2), if I can do this, then I can export the report as the formats what provided by the report viewer. If arcobjects cannot make it, is there any workaround solution?


Alternatives to bilinear interpolation for raster extraction in R

I have a set of coordinates for which I want to extract temperature values from a raster. I am using the extract function from the raster library in R. Looking at the interpolation methods, there are options for simple and bilinear interpolation. I am not very familiar with raster extraction literature but I was wondering if there are other alternatives in R for other interpolation methods which give a better estimate for values at a point than bilinear interpolation. Also is bilinear the usual method used in practice? Thanks.


How to Represent large data using google map api in javascript

1) I am trying to represent data using bins as the data was too large to display each and every point simultaneously. ![enter image description here](http://i.stack.imgur.com/S9x9q.jpg) but the problem with this also existing if the no of bins are getting larger than 15K ,map get hang while zoomin and zoomout. So I thought of using WMS , I am new to this, I have setup geoserver ,but confused how to add layer to this and how to access that layer. 2) Can I add layer dynamically to geoServer as the scenario is               a)User Uplaods a geopoitns information file and then view the data in that file      I am creating a geojson data format from the uploaded file of user .So is it possible to upload that geojson data as a layer at runtime at geoserver and then ready to view. 3)IS the huge data representation is possible using open layer


DEM/DSM from contour lines and slopes

I want to create a DEM with as much detail as possible. The problem is, that the area contains several (manmade) slopes. I got contour lines and lines that mark the location of the slopes, but no further information on the slopes. At the slopes, not only the height changes, but also the surface inclination. So my idea to create the DEM, was to build a TIN and interrupt it at the slope lines. In this case to slope face would get lost, but that would be ok. Is there any chance to do this in QGIS or ArcGIS? I tried QGIS but in the interpolation tool you can only add breaklines with a certain elevation. But they don't have a certain height, because they go along the surface inclination. I also tried the "Create TIN" in ArcGIS 3D-Analyst, there you can insert breaklines without elevation, but only to get the elevation calculated through the TIN. Further information that should be contained in the DEM is an area (polygon) to clip it (should be no problem), surface mines (polygon) (will be also cut out, because the depth is unknown) and some lakes (polygon) (partly with known lake surface height, partly not, not sure how to handle these). Is it possible to do this in QGIS, ArcGIS or maybe SAGA? Or might I'm following the wrong path, trying to solve this with a TIN? p.s. Sorry for my bad english, I'm not a native speaker as you may realized.


How to call ogr2ogr from command line with Python 2.7 from ArcGIS 10.2 for Desktop?

I am trying to access ogr2ogr in the command line, and this is the message I receive:                'ogr2ogr' is not recognized as an internal or external command, operable program or batch file.       This is current python setup-up. I am using the python version installed with arcgis 10.2 (aka. python 2.7). I have installed and linked Python(x,y) to python itself. I call on arcgis and a variety of python gis function using the Spyder editor, which comes with the Python(x,y) editor. I installed a compiled gdal package from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Now I am able to call the gdal function inside of Spyder, but I am unable to call ogr2ogr from the command line. I did not create a environmental variable for windows yet. My primary issue is that I dont know how create a enviornmental variable for gdal that allows me to call ogr2ogr in the command line, given that I am using the compiled gdal package. Does anyone know what to do? Here is the location of the ogr2ogr on my installation: C:\Python27\Lib\site-packages\osgeo\ogr2ogr.exe


Linear Referencing : Locate Features Along Routes

I've ran into a bit of a roadblock using this tool. I have roughly 3 million points that coincide with 200,000 routes. My routes have the From/To measurements, and my points contain X,Y data for their locations. Running the 'Locate Features Along Routes' tool takes forever, and when it finishes, I get the measurement of each point and the line it is on. Question: How do I group these point measurements into their own line to use as a line event table. Basically, trying to end up with offset lines running alongside the route features. Using ArcGIS 10.2.1 Advanced Edit: I can run the Points to Line tool on my points, but the line is jagged and doesn't follow the street line. Using Linear Referencing I was hoping I could get lines that match the street line offset on each side by 5meters. Routes ![Routes](http://i.stack.imgur.com/5jaYY.png) Points ![Points](http://i.stack.imgur.com/vsWpk.png) The ZIPCRID field is the pre-determined route the points are assigned too. My Route* field is just an increment of 1 for each street segment. In the end, the points are to be made into lines of similar "ZIPCRID"s, with left/right offset as determined by address location. ![Sample Route](http://i.stack.imgur.com/B2pu8.png) This is a route using the former method, I was seeing if Linear Referencing could fix some of the sharp edges, and have parallel lines running alongside the roads. These were created by using the first/last address loc for each street then running a points-to-line tool with the ZIPCRID as the unique route.


How to export layer attribute table to specific worksheet of already existing Excel workbook?

How to export a feature layer attribute table to a specific worksheet of an already existing Excel workbook?


Unique and Range value symbology in Arc Desktop 10.1

I am facing a issue in which i have to give symbology depending on unique value of one attribute and range value of another attribute. That is symbology on gender and age. like   1. symbol1 - Male(gender) and 21-30(age)   2. symbol2 - Male(gender) and 30-50(age)    3. symbol3 - Male(gender) and 50 -100(age)    4. symbol4 - Female(gender) and 21-30(age)   5. symbol5 - Female(gender) and 30-50(age) Thank you in advance.


How to improve the speed of Export to PDF?

I am working with the Fire Station Wall Map template in ArcGIS 10.1. My export to PDF is taking upwards of 30-45 minutes. Using the default PDF settings in the export menu. My map is 60" x 36" so its not too big. My resulting file size is approx 7mb. Any idea how I can improve the speed?


WFS layer not visible in openlayers

I'm trying to add a WFS layer in openlayers and it's not working. Can anyone point me in the right direction. The data is stored in postgis and I've added it to geoserver. I am aware that I'm using port 8081 on geoserver but I can't forsee this being an issue. It would be useful to know where I'm going wrong. Here is the code:               <!DOCTYPE html>     <script type="text/javascript" src="http://maps.nationalparks.gov.uk/resources/openlayers/OpenLayers.js"></script>      <script type="text/javascript" src="http://maps.nationalparks.gov.uk/resources/js/geotools2.js"></script>     <script type="text/javascript">           var map;          function init() {     map = new OpenLayers.Map('map_element', {});               var wms = new OpenLayers.Layer.WMS(     'OpenLayers WMS',     'http://vmap0.tiles.osgeo.org/wms/vmap0',     {layers: 'basic'},     {}     );               var world_cities = new OpenLayers.Layer.Vector("world_cities", {                               minScale: 15000000,                     strategies: [new OpenLayers.Strategy.BBOX()],                     protocol: new OpenLayers.Protocol.WFS({                         url: "http://localhost:8081/geoserver/web",                         featureType: "world_cities",                         featureNS: "http://www.opengeospatial.net/cite"                     }),                     renderers: ['Canvas','SVG']                     })          map.addLayer(world_cities);          if(!map.getCenter()){     map.zoomToMaxExtent();     }     }                    </script>     </head>          <body onload='init();'>     <div id='map_element' style='width: 500px; height: 500px; border-style:solid; border-width:5px;'>     </div>     </body>     </html>      Thanks


Problem with generating contour lines and filled contours

I am trying to create contour lines and filled contours from a shape file of height points using the contour plug in (have tried other tools but with no success). The data is sourced from the UK Ordnance Survey in tiles of 400 x 400 points (NTF format). Each tile has been opened as a vector layer and then saved as a shp layer. The plug in will run properly with a single tile. However, the area I need is 3 x 3 tiles i.e. 1200 x 1200 points. Initially I generated contour lines and filled contours for each of the 9 tiles. This is unsatisfactory since the spacing is slightly different for each tile according to its height range resulting in mismatch at tile boundaries. I then merged the 9 shp layers using the mmgis and vector menu merge. Running the contour plug in against either merged file fails with the dialogue box showing 'Not Responding'. I am running QGIS 1.8 Lisboa on Windows 8 x64 pro with 32gb of memory and plenty of free disk space on all drives. I have had no problems with other imported layers, adding new layers of data. However, this is the first time I have attempted to generate a shaded layer or contour lines. I guess there must be a setting somewhere to allow the plug in to handle the larger data block - I found and increased the cache setting in 'options') or I am using the wrong tool for the job. My project is mapping local history routes/settlements. The shading is needed to provide context. Any help will be much appreciated


Are there any known problems using GPS connection in Android version of QGIS?

I install QGIS both my netbook (windows win7 starter) and My tablet (android 4.0). I can used GPS option in windows version and I can save location points from GPS. However, I could not manage same operation in android verion of QGIS. Is there any problem on android version?


Populate a new field with list of the top 5 values of all fields for that record

I have 15 fields. I would like to add a new field that is populated with the field name and value of the top 5 highest values of the 15 fields for each record in the table. The new field would be a string like: "Field 1: 20, Field 5: 15. Field 2: 10 etc. This is an example of the data and what the new field should look like:                   A   B   C   D   E   F   G   NewField          X   1   4   5   3   9   6   4   E:9, F:6, C:5, B:4, G:4     Y   3   5   0   9   8   4   7   D:9, E:8, G:7, B:5, G:4      I'm using ArcGIS 10.1. This example is very close to what I want to do except that I'm interested in more than just the max value: Compare attribute columns of a feature class in ArcGIS


Error reporting with WMTS

I am looking for information regarding error reporting with WMTS. I have consulted the official documentation at http://www.opengeospatial.org/standards/wmts and I found several chapters discussing exceptions. All the information is there, but it is a large document and I am having trouble quickly determining where to look. I also found this website https://github.com/nasa-gibs/onearth/wiki/WMTS- Response-Codes which gives a clear overview of how an exception should be formatted. I have two questions. Is the second link the correct way of doing it according to the standard? And does anyone have any more resources explaining WMTS error reporting (Google so far has not helped me).


App using latitude and longitude, should decimal degrees be a separate selection from metric?

So silly question to some I suspect. I am coding a mobile app that displays coordinates in parts of the interface. We currently have an option to toggle between Imperial and Metric. But I am unsure if decimal degrees (vs D/M/S) should be its own option or if it is something that should be tied to the Imperial/Metric display option as well? Thank you for your answers.


cloud shadow detection

I am trying to detect cloud shadows in Landsat images. I came up with producing good shadows and cloud masks. Now I'd like to implement my cloud mask adding cloud shadows. Do You have a good idea to do that? OPTION 1: I thought combining the two masks I have to be a good idea, but I would need an oriented buffer to do that, given that I know the solar azimuth. I found a post with a super good explanation, but I have no idea how to translate the R prototype code provided there into Python (which I use), as I have too few programming skills. Does anybody know how to deal with this (maybe Whuber himself who provided the code)? OPTION 2: As I know sun azimuth and angle (from .MTL file of Landsat), I thought to be a good idea to create a fake DEM with the cloud mask inside. Clouds would have their elevations as value in the DEM. Then I would cast the shadows against this "fake DEM" to obtain my cloud shadow mask (or to "play with" it and my shadow mask). Anyway, I don't know a good way to estimate cloud elevations, and, having tried with 5000, 8000, and 10000 meters values with very poor results, I am not totally convinced this is the best method. Any help would be greatly appreciated.


edit aggregate polygons

i have one file, with 32000 record ,its polygons for city ,when i want to merge some polygons for get one rooftop polygon from many polygons ,this new polygon remove or it's have unwanted lines between the old polygons , how i can to merge polygons for get aggregate polygon ? i need edit by hand not tools , ![enter image description here](http://i.stack.imgur.com/x3Nu9.jpg) thanks ;


QGIS Get extent of layer

Is there a way to get the extent (bbox) of a vector layer in QGIS? I see that I can update the extent, but I am looking for the actually for coordinates of the extent.


What is the PostGIS 2.x equivalent of the pre-PostGIS 1.5 ~= operator?

Stemming from my other question: When would a PostGIS geometry compare using ~= return true when ST_Equals returns false?, what is the PostGIS 2.x equivalent of the pre-PostGIS 1.5 ~= operator? It appears that from 1.4 to 1.5, the `~=` operator changed from an "exactly equal" to an "bnd equal": For example, in v1.3:   http://postgis.net/docs/manual-1.3/ch06.html#id439812   `The "~=" operator is the "same as" operator. It tests actual geometric equality of two features. So if A and B are the same feature, vertex-by- vertex, the operator returns true.` and in 1.5 and later:   http://postgis.net/docs/manual-1.5/ST_Geometry_Same.html   `Returns TRUE if A's bounding box is the same as B's.` I'm mostly interested in PostGIS2.0, but I'm not tagging a specific version and leaving it open.


recalculate latitude and longitude from a pixel in a cropped map

i want to recalculate a geographic coordinate from a pixel in a map. For this i have the size and the coordinates from the map to convert a coordinate to a pixel is use the algorithm, you find at https://gist.github.com/gagern/6636176 But how can i convert this back to the orginal geographic coordinate? for the longitude i simply use                Math.toDegrees((x+from.getLongitudeAsRad()*xFactor)/xFactor)      but how can i calculate the latitude? best regards


Leaflet Heatmap Dynamic data layer

I am trying to add heatmap layer to my map. I have tried the following plugin: http://www.patrick-wied.at/static/heatmapjs/example-heatmap-leaflet.html From this plugin the data came from heatMapData.js. If I put the static data in heatMapData.js like following my heat map is working.               var testData={       max: 500,       data:[         {lat:23.6681520914, lon:90.0811805, value:0.3},         {lat:23.9010258772, lon:90.2883834839, value:0.9},         {lat:23.7930778593, lon:90.423535, value:0.7},         {lat:24.0279042498, lon:90.371648, value:0.5},         {lat:24.1049427335, lon:90.2680428995, value:0.8}       ]     };      For this I am using the following code in my index page:               $(function() {         var baseLayer = L.tileLayer(             'http://{s}.tile.cloudmade.com/ad132e106cd246ec961bbdfbe0228fe8/997/256/{z}/{x}/{y}.png',{                 attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © CloudMade',                 maxZoom: 18             }         );              var heatmapLayer = L.TileLayer.heatMap({             // radius could be absolute or relative             // absolute: radius in meters, relative: radius in pixels             //radius: { value: 15000, absolute: true },             radius: { value: 20, absolute: false },             opacity: 0.8,             gradient: {                 0.15: "rgb(0,0,255)",                 0.35: "rgb(0,255,255)",                 0.65: "rgb(0,255,0)",                 0.95: "yellow",                 1.0: "rgb(255,0,0)"             }         });              heatmapLayer.setData(testData.data);              var map = new L.Map('map', {             center: new L.LatLng(23.7588, 90.38967),             zoom: 7,             layers: [baseLayer, heatmapLayer]         });              // make accessible for debugging         layer = heatmapLayer;     });      Now I want to add data from my database. I have written a heatMapData.php which gives me following data as JSON format:               [{lat:23.6681520914, lon:90.0811805, value:0.3},     {lat:23.9010258772, lon:90.2883834839, value:0.9},     {lat:23.7930778593, lon:90.423535, value:0.7},     {lat:24.0279042498, lon:90.371648, value:0.5},     {lat:24.1049427335, lon:90.2680428995, value:0.8}]      What should I do to implement dynamic data layer that comes from heatMapData.php?


Cant see my Table of Contents in Arc10

I am new to Arc10. I am using a students version on my home laptop. I have lost my table of contents completely from the left side of my screen. Does anyone know where I can find the damn thing? Thanks! Jonah


Professional Certificates

Which professional certificates are most desired by employers seeking GIS professionals? Are there any online courses available online that provides certification? Thanks


installing GEOS, PROJ, GDAL/OGR into a python virtualenv on Mac OS X

I am trying to setup an isolated python virtualenv to work on GIS projects on my Mac OS X. Sounds like I will need to install the GEOS, PROJ, GDAL/OGR from the kyngchaos site here http://www.kyngchaos.com/software/frameworks and not easy_install it into my virtualenv. Is that accurate? The downloads available on kyngchaos are pkg installers and not just an egg or bdist of python modules. So, I am not very sure as to what else the installer is doing to the environment other than just copying files to /Library/Framework/geos.framework folder. How would I go about installing a specific version of GEOS, PROJ, GDAL/OGR into my new python virtualenv? I would appreciate your help/suggestions on this issue. Thank You, Vish


My development environment is Visual studio 2010 with ArcGIS Desktop 10.1 installed. I need my add-in to support 10.0 AND 10.1. Right now, if I try to install it on ArcMap 10.0, it fails. Is it possible to target an ArcMap add-in to an earlier version?


Legal issues with tracing a map from an image

* Client "A" provided a paper copy map of certain routes.   * The owner of the map (map creator) wants to sell the SHP file   * Looking at the map, I figure it'll take me an hour tops to digitize the thing Are there any legal issues with me doing that? **EDIT - ADITIONAL INFO** The map is very similar to a TSP solution. So all i have to do is draw or linear reference the same routes as the map.


ArcFM v/s Network Engineer

Which software would you prefer for a telecom GIS project and why? I have experience with both, but I personally prefer Telvent ArcFM over Telcordia Network Engineer because of it's functionality and tighter integration with ESRI products, especially ArcGIS Server. Any other opinions? Edit:   I would like to have your views based on (but not limited to) these factors:   1. Performance   2. Scalability   3. Database Support   4. Customization options/ ease of customization   5. Interoperability with other (GIS) systems   6. Data exchange to/from other non-GIS systems (like Sharepoint, middlewares etc.)   7. Availability of a web-based offering  I am purposefully ignoring cost at this moment as I would like a completely technical aspect for the comparison.


Why CQL DWITHIN returns different result than PostGIS DWITHIN?

I have 2 tables in PostGIS that I publish to geoserver. both have same SRS (2039). When I do the following query in PostGIS , I get 69 results :                SELECT a.gid,b.gid      FROM Table_A a INNER JOIN Table_B b      ON ST_DWithin(a.geom, b.geom,1);      But when I do the same in CQL , I get error that result contains more than 1000 features. This is my CQL :               http://localhost:8080/geoserver/wms?     LAYERS=a,b&STYLES=&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&     REQUEST=GetMap&EXCEPTIONS=application/vnd.ogc.se_inimage&     SRS=EPSG:2039&     BBOX=589042.42768447,4914010.3926913,609134.78143081,4928059.3431623&     WIDTH=512&HEIGHT=358&     CQL_FILTER=     DWITHIN(geom,collectGeometries(queryCollection('b','geom','INCLUDE'),1,meters);     EXCLUDE      The Exclude at the end is because I don't want to see layer b as result. Any explanations on this ? _**_* UPDATE _*_** Layer A and Layer B are published to Geoserver , The dimensions in the request I get by default when I use PREVIEW LAYER (Layer A are lines and B are polygons)


Visual edit geographic data with geotools

With JMapFrame I have options for to visualize my geographic datas, but I don´t know how to add tools for to edit this data, equals conventional GIS. It´s possible to do this? att, Augusto


QGIS startup error (out of range pointer)

I downloaded QGIS (for Windows) and installed the software. However, when I start QGIS, I get an error message:               "The Instruction at 0x04c20d55 referenced memory at 0xffffffff. The memory could not be read."      Any ideas how to solve this problem??


Drive time analysis using Network Analyst with ArcInfo 9.1

What is the most common SETTING for the Layer Properties when creating time- travel polygons? I am in the process of creating 4, 5, 6 minute polygons using Network Analyst. Every time I generate these polygons they have different shapes. I would like to be consistent from one year to another based on the number of streets that are being added to our Center Line Street Network. Using ArcInfo – 9.1 SP #1


represent multiple geometry as single feature

There is a school. it is on two disjoint areas, one is primary wing and other is secondary. I need to make single feature from the two areas such that, there is only one column in gis table, i.e. only one record. Also is it possible for them to have separate values but still show up as one record.


Reset Object ID After Truncating Table In SQL Server

I am working on a program to export data from a view containing a geometry type in Sql Server 2008, to an ArcSDE table on another server which also stores data using the geometry type. The source database is not running ArcSDE. This will be a nightly job. Following the documentation at the link below, I am able to generate an Object ID with every new insert: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/in_SQL_Server/006z00000017000000/ My problem (if it is indeed a problem) is before I copy records between the two servers, I first delete all items in target table using a SQL statement:               DELETE FROM target_table_name      However, when I insert the first record after the delete, the ObjectID starts off at the next highest value from before when I deleted the table. For example, lets assume that the highest ObjectID in the table before I deleted it was 1000. After I delete the contents of the table, and start to load new data, the new ObjectID the dbo.i_get_ids stored procedure returns is 1001. Each load has around 100,000 records and since this runs nightly, the ObjectID can become a pretty big value pretty quickly. My question is, is there a way I can reset the value? If I use the following ArcObjects code to truncate the table the ObjectID is reset to zero:               ((ITable)targetTable).DeleteSearchedRows(null);      However, if there is a way to do this without ArcObjects, it would be preferred.


Persistent settings in MapInfo programs

I have a couple of MapInfo programs that use external EXEs for some functionality (e.g. ogr2ogr for layer conversion and OV2 Tools for satnav data output). In my programs I would like to have a settings dialog where you set the location of these EXEs and then _somehow_ store these so that they are remembered even after Mapinfo has been closed down. What's the best way to do this?


Looking for open source component to create PDF from WMS in a web application

I want to create a PDF from WMS in a web map application. Please can anyone recommend a robust component? I'd like free open-source under an relatively business-friendly licence (no GPL, BSD/MIT etc. would be ideal, LGPL would be OK).   * Our WMS layers are produced by ncWMS and UNM MapServer. We will also want to overlay some layers from external WMS providers.    * _EDIT_ : We are developing our own JavaScript client based on OpenLayers.    * _EDIT_ : We have some backend code in Java. We would also consider PHP or other platforms to create the PDF. MapFish would be excellent but it is GPL.


Is it possible to export a GeoJSON with an array field from a joined layer?

I'm using QGIS to 1) load a shapefile, 2) join the shapefile data with a CSV- file and finally 3) exporting the layer as GeoJSON. Hence, I end up with something like this, where the `properties` object contains the original CSV data.               {       "type": "FeatureCollection",       "features": [         {           "type": "Feature",           "geometry": {              "type": "Point",              "coordinates": [102.0, 0.5]            },           "properties": {              "prop0": "value0",              "prop1": "value1",              "prop2": "value2"           }         },...      What I really want to do is to store some of the properties in an array, as such:               "properties": {         "prop0": "value0",         "arr": [             "value1",             "value2"     ]      Is it possible to export GeoJSON in such a format using QGIS? If not, does anyone have any other ideas as to how to edit GeoJSON data like that?


binding nested arrays as geojson popups in leaflet

I am struggling with geojson popups in leaflet.js I have nested arrays as properties for my features - an example would be counts of fish caught at a location (not my actual project data!)               {"type":"FeatureCollection",     "features":[{"geometry":{"type":"Point",     "coordinates":[-122.679416,     45.516632]},     "type":"Feature",     "properties":{"fisher_id":"401",     "river":"Willamette",     "fishcaught":[{"type":"Salmon",     "count":5},     {"type":"Sturgen",     "count":1},     {"type":"Bass",     "count":2}]}},     {"geometry":{"type":"Point",     "coordinates":[-121.318584,     44.050165]},     "type":"Feature",     "properties":{"fisher_id":"401",     "river":"Deschutes",     "fishcaught":[{"type":"Trout",     "count":10},     {"type":"Whitefish",     "count":1}]}},     {"geometry":{"type":"Point",     "coordinates":[-124.102962,     43.983057]},     "type":"Feature",     "properties":{"fisher_id":"401",     "river":"Siuslaw",     "fishcaught":[{"type":"Steelhead",     "count":2},     {"type":"Salmon",     "count":6}]}},     {"geometry":{"type":"Point",     "coordinates":[-121.776289,     42.220382]},     "type":"Feature",     "properties":{"fisher_id":"401",     "river":"Klamath",     "fishcaught":[{"type":"Trout",     "count":3},     {"type":"Steelhead",     "count":2},     {"type":"Salmon",     "count":3}]}}]}      I am trying to put a popup on each feature (onEachFeature) that states river and a count of each type caught. I'm binding using a function like this               function onEachFeature(feature, layer) {             if (feature.properties.fishcaught) {                 var popupcontent;                 popupcontent = "River: "+feature.properties.river                 for (i=0;i<feature.properties.fishcaught.length;i=i+1){                     var fishstring = "
"+feature.properties.fishcaught[i].type+": "                     +feature.properties.fishcaught[i].count                     popupcontent = popupcontent+fishstring;                 }                 layer.bindPopup(popupcontent);             }         }          geojson = L.geoJson(inData, {         onEachFeature: onEachFeature     }).addTo(map);      The problem is that the onEachFeature is caught in an endless loop. If I remove the for loop from the function, everything works fine. Any thoughts on this?


Time-aware layers WCS Service

I am currently developing an application that requires to display raster images over a period of time (I'm looking how Hurrican Sandy progressed). While investigating, people have suggested that I could use a WCS service and view it on a viewer. We are currently using Google Maps API. My question is, how can I publish these rasters in a WCS service (or relevant format) that can allow a viewer to loop through all images. Is there a standard practice everyone follows to accomplish this? I have knowledge using ArcGIS 9.3 Desktop/Server, ArcGIS Flex Viewer, and QGIS. I appreciate any information regarding this topic or tutorials (haven't found any good ones yet). The images are geotiffs. Thanks in advance!


What is the future of ArcGIS web development ? Is it JavaScript and HTML5?

I want to know about the future of ArcGIS web development; is it HTML5? I used to work with ArcObjects and .NET Web ADF so what is the best technology I must follow, especially when I know that Silverlight version updates have been stopped? So I think that the best technology that must follow .NET in the future is JavaScript with HTML5. Is it true?


How to generalize a point feature class

I have a point featureclass with a point for every 25cm - in Total 400,000 Points. I would like to reduce this resolution to one point every Meter. How could I instruct ArcGIS Advanced(ArcInfo) to do this? I can´t see a thinning tool or generalization tool for Point feature classes and don´t want to create a raster from the data yet to resample.


MapFish PDF: Geoserver WMS layers not generated as tree structure

I am using the mapfish printing module in my web map application.In that everything is working fine but layers not generated as tree structure in output PDF file and "ODC_Graphics_Data" wms layer not printed. I have used below code to generate pdf. System: Windows XP / Tomcat7 / Geoserver 2.4.0/printing-2.1-SNAPSHOT.jar Kindly help me to fix this. Thanks in advance.                 http://localhost:8080/geoserver/pdf/print.pdf?spec={       "layout":"A3 portrait",       "srs":"EPSG:404000",       "units":"m",       "dpi":300,       "outputFilename": "ggg",       "layers":[         {             "baseURL":"http://xxx.xxx.xx.xx:8080/geoserver/cite/wms",             "opacity":1,             "singleTile":false,             "type":"WMS",             "layers":["Oxford_Map"],             "format":"image/png",             "styles":[],             "overview":true         },         {             "baseURL":"http://xxx.xxx.xx.xx:8080/geoserver/cite/wms",             "opacity":1,             "singleTile":true,             "customParams":{"CQL_FILTER": "User_id = 234"},             "type":"WMS",             "layers":["ODC_Graphics_Data"],             "format":"image/png",             "styles":[],             "overview":false         },         {                "baseURL":"http://xxx.xxx.xx.xx:8080/geoserver/cite/wms",             "opacity":1,             "singleTile":true,             "type":"WMS",             "layers":["Plymouth_Buildings"],             "format":"image/png",             "styles":[],             "overview":false         },         {             "baseURL":"http://xxx.xxx.xx.xx:8080/geoserver/cite/wms",             "opacity":1,             "singleTile":true,             "type":"WMS",             "layers":["Plymouth_Hard_Surface_Block_Paving"],             "format":"image/png",             "styles":[],             "overview":false         },         {             "baseURL":"http://localhost:8080/geoserver/cite/wms",             "opacity":1,             "singleTile":true,             "type":"WMS",             "layers":["Plymouth_QUERIES"],             "format":"image/png",             "styles":[],             "overview":false         },         {             "baseURL":"http://xxx.xxx.xx.xx:8080/geoserver/cite/wms",             "opacity":1,             "singleTile":true,             "type":"WMS",             "layers":["Plymouth_Street_Lights"],             "format":"image/png","styles":[],             "overview":false         }     ],      "pages":[         {             "center":[248744.93342196,55350.945],             "mapTitle":"",             "company":"testuser2_portrait",             "comment":"",             "scale":439,             "rotation":0         }     ] }      Please find screenshot for output PDF: ![enter image description here](http://i.stack.imgur.com/5eMOD.png) ![enter image description here](http://i.stack.imgur.com/f88A3.png)


How to store the CHANGES to a map database

I'm looking into providing a map amendment service for a particular map series. The service will help map owners look into the changes made to the operational features of the map, after the map was published. There are three basic types of changes: 1) An object has been added. 2) An object has been deleted. 3) An object has changed, either an attribute or its geometry. For object changes, the user should get both the old and the new value of the attribute or geometry. Now, I'm looking into a clever way to implement this. The basic idea is that the database administrator edits the map data in an interface, just as he would edit a normal map, and the rest is taken care of behind the scenes. As I see it, there are two basic approaches: 1) Store the changes in a separate table, and keep the main database current. 2) Timestamp the records in the main database. In case of changes, I cannot change a record, but timestamp the old one as expired and add a new urrent one. My main concern is not performance (not huge amounts of data), but ease of implementation. Is there a way I can make the DBMS (say, PostGIS) handle this automatically (for example by using triggers), Or can I build my own interface on top af an exisiting GIS (say, QGIS or ArcGIS) to handle the storage of records in the various tables as the database administrator makes changes to the map. Preferrably, I'd like a Web-interface. Any Ideas anyone?


using Map Service or Feature Service for Feature Layer

Both, Dynamic Map Services and Feature Services allow for querying data (through FeatureLayer) and bringing FeatureSets to the browser. Which of the above would yield better performance at querying attributes and geometries of large datasets?


Extract Street, City, And State/Region from Planet.osm with Osmosis

How can I extract street, city, and state/region data from Osmosis, and nothing else? I know using Xapi I could query under ways and use name=* to get streets, but I need to do this with Osmosis, in addition to city and state. My end goal is to query with xapi to get streets cities and regions in a given bounding box


Rendering custom OpenStreetMaps style (land=white, water=black): do I need a dedicated computer just to do this?

EDIT: My goal is NOT to use OpenStreetMap or cloudmade as a web map. I described exactly what I want ("a full, rasterized set of tiles for the entire world at zoom=10 (around 68 Gigapixels, water=black, land=white, no labels"). I only meant to use the cloudmade.com link as an example to illustrate what I'm shooting for. (As it is, the cloudmade style is only 90% of the way there.) I need the tiles offline. I need the image (68 Gpix) I described as a mask in a larger raster map task for a custom map I'm building using NASA and USGS data. * * * **As an illustration** I made a custom style that sort of shows what I want:   * http://maps.cloudmade.com/?styleId=22688# (No labels, no roads, no features of any kind except all water features (rivers, lakes, oceans, you name it) as black with land being solid white, and the nice Mapnik antialiasing of values in between.) * * * **What I really want** I would like a full, rasterized set of tiles for the entire world at zoom=10 (around 68 Gigapixels). I considered downloading and installing Planet.osm (11 GB compressed) and running Mapnik (for days/weeks?) to get this data. However, Planet.osm looks like it will take 100GB or maybe even 1TB once the database and index are built. I don't have that kind of disk space on my laptop and since I don't need the full dataset, is there a smaller subset of the data I could download (it says here that the polygon data is only 700 MB)? Actually from what I can tell, the data has doubled in size in the last year so I would need a beefy machine to deal with this. Is there an easier, direct way to get these tiles (level 10, black and white, just land on water) batched, or do I basically need a dedicated computer to do this?


DrawPolyLine not drawing completely on the right layer

I zoom into a map, then do a screenDisp.DrawPolyline(polyline); Now the line is in the correct place, but the map that is the background of the polyline object is actually the initial map and not the zoomed in map. Here's a screenshot: http://i11.photobucket.com/albums/a173/iteration_x/LineBehavior.jpg What you are seeing is a really zoomed in map of minnesota with most of the layers turned off, and that interior picture is part of the West Coast from the initial map load.


How do I disable ArcGIS Server web adf calls when zooming with a mouse wheel?

When zooming using the mouse wheel on a web adf based map, every time the map wheel clicks, requests are sent to ArcGIS Server for maps etc. (as evident in Fiddler) Is there any way to harvest an event that would disable the requests until you got to zoom level you want?


Issues with geoprocessing with .NET

There are some nice features in ArcToolbox we can use, but for some reason, this is NOT working properly. It doesn't even throw me an error. My software is running inside ArcMap, so no need to AoInitialize again, corret?                   public void Execute()         {             InitializeProduct();             try             {                 Geoprocessor gp = new Geoprocessor();                 gp.OverwriteOutput = true;                      FeatureToPoint featureToPoint = new FeatureToPoint();                      string outputPathName = CurrentWorkspace.PathName + "\\teste_centroide";                      featureToPoint.in_features = InputFeatureClass;                 featureToPoint.out_feature_class = outputPathName;                 featureToPoint.point_location = "INSIDE";                      IGeoProcessorResult result = (IGeoProcessorResult)gp.Execute(featureToPoint, null);                      if (result == null)                 {                     for (int i = 0; i <= gp.MessageCount - 1; i++)                     {                         Console.WriteLine(gp.GetMessage(i));                     }                 }                      IGPUtilities gpUtils = new GPUtilitiesClass();                 this.OutputFeatureClass = gpUtils.OpenFeatureClassFromString(outputPathName);             }             catch (Exception ex)             {                 MessageBox.Show(ex.Message + "\r\n");             }      This is a code example I'm having here. I generated the DataManagement tools assembly, but I could not find the file to sign it. This code just gives me an error. is it because of the signing? I've tried the other way too, using IVariantArray and calling from the tool name, without sucess. Is it just me or...? Can anyone point me a "nicer" solution? I need to run several process that are already built in ArcToolbox that I really don't want to duplicate. Any tips or pointers? Thanks guys!


unique value symbolize layers from a lookup table

I need to create a large number of Arcmap layer files (v9.3 or 10), perhaps a hundred, from lookup tables. I don't have to set the symbol patch itself, that can be random, but I do need the value and label attributes filled out. The lookup tables look like:               "FC","VALUE_FIELD","VALUE","LABEL"     "Wooded_area","CODE","1240012","Extracted"     "Wooded_area","CODE","1240022","Interpreted"     "Wooded_area","CODE","1240032","FCS-EOSD"     "Wooded_area","CODE","1240042","Land Cover, Circa 2000 - Vector"      And the result would resemble (except the symbols themselves): ![screen shot of layer properties](http://i.stack.imgur.com/fkerZ.png) I'd prefer a python based solution, via arcobjects+python if required, C# next, but anything that works, even partially or only conceptually, is welcome.


Quickly create contour polygons from cost points using OSS for web app

This is related to a previous question I've asked: Create filled contour map with GRASS I've created a point layer using OpenStreetMap data and pgRouting's driving_distance() function, where the points contain a cost attribute which contains the walking distance from a school. I've used QGIS and the contour plugin to create what I want: ![walking distance isolines](http://i.stack.imgur.com/ieyuV.jpg) **However I'd now like to do this programmatically for a web app, and in addition result in polygons rather than a raster.** I've got something working using GRASS, however it is quite slow, around 30 secs on my machine versus less than 1 sec using QGIS and the contour plugin. Here the short version (or see Python version):               # read file and set resolution and bounds     v.in.ogr dsn=cost_points.shp output=cost_points     g.region vect=cost_points rows=256 cols=256     # interpolate points and make bands of 0.4km increments     v.surf.rst input=cost_points elev=interp zcolumn=cost     r.mapcalc res='int(interp/0.4)'     # convert to polygons and write out file     r.to.vect -s input=result output=polys feature=area     v.out.ogr -c input=polys dsn=polys.shp type=area      **Are there other GRASS functions I should use?** r.surf.rst takes the majority of the time, so perhaps it is too robust for my needs, but even then the results aren't smooth enough for my liking. **Are there other open source libraries I should be considering for this?** If you'd like to know more about my overall goals, see this page.


OpenLayers + Geoserver: how to dynamically retrieve the "geometryName" of a feature layer in GeoServer

I am trying to get the list of feature layers on GeoServer and then user can add layers into map at anytime they want. my question is: when using `OpenLayers.Protocol.WFS` loading a layer, is "geometryName" required? since from the response of "WFSGetCapabilities" request to Geoserver, for each featureType, there are only "name, title, srsName, and featureNS". If “geometryName” is required, I have to retrive this from "DescribeFeatureType" request by enumerating the feature's properties . however, these two requests are asynchronous, I am not sure how to load this layer without user's interaction input. anybody helps? appreciated!!


Network Analyst: Location Allocation for Model Builder

I am trying to create a model to answer a question using a network analysis. Background:   * 10 possible fire station locations (shapefile)   * Calls for demand points (shapefile)   * Impedance is 5 minutes from facility to demand Product: I need to make a model to select 1-3 stations from the list of 10 for the best locations to meet as many calls as possible with a 5 minute drive from the station. Below is an image of what I have so far, but when I try and run it I get an Error saying:   * Error 000735: Input Network Analysis Layer: Value is required   * WARNING 030036: A layer with this name exists Not sure how to fix these two items. ![current model](http://i.stack.imgur.com/u9pqI.png)


Data Security for Geoserver - Users errantly seeing Workspaces not assigned to them

I'm having trouble with Data Security in my Geoserver 2.5 application. Let me preface my situation. I am using Geoexplorer composer which is making GeoServer API calls through ows and wms. I have multiple clients which should not be allowed to see each other's wms services. The implementation of my data security rules are scatter shot when ows and wms are used through GeoExplorer. CompanyAUser can see all layers in the CompanyAWS and 1 layer from CompanyB's ws. CompanyBUser can see 10 out of the 60 layers in CompanyA's ws. A further twist to this problem is that if I sign in as each company's user in Geoserver's webapp and I navigate to Layer Preview each user can only see the layers which I have specified that they are allowed to see in Data Security. I have made some edits to the Geoexplorer Composer code but nothing major. I don't think that this should effect the security in any way since security is implemented by the Geoserver application. I have included my security parameters below.               Groups:     group, role     CompanyA, COMPANY_A     CompanyB, COMPANY_B     CompanyC, COMPANY_C          Users:     user, group     CompanyAUser, CompanyA     CompanyBUser, CompanyB     CompanyCUser, CompanyC          Data rules:     Roles, rule path     Company_A, COMPANYAWS.*.r     Company_B, COMPANYBWS.*.r     Company_C, COMPANYCWS.*.r          Service rules:     *.*     ADMIN,COMPANY_A,COMPANY_B,COMPANY_C          Roles are independent and do not have parent/child relationships.      Are my roles, groups, data rules and service rules set correctly? EDIT1 I've noticed that the only layers that are errantly shared to users belonging to different company groups are 'Group Layers'. This leads me to my next question. What causes a regular layer to be hidden and a group layer to be shown to roles that do not have permission to do so?


Graphical Modeler to rotate points based on line layer azimuth

I am trying to create a model using the QGIS 2.0 Processing Toolbox graphical model to replicate the process described in this thread: How to horizontally align irregularly shaped point symbol to vector layer in QGIS? ![enter image description here](http://i.stack.imgur.com/webgJ.png) However, I get an error when trying to execute the Distance to Nearest Hub algorithm: Invalid name attribute: bearing. When I go through the process manually, using the same data, this doesn't happen. UPDATE: running the field calculator using the python console doesn't populate my vector layer's bearing field as I expected it to. A field called "bearing" is created in a new output layer (i've corrected to link this to distance to nearest hub instead of how it is currently), but the field is blank. I ran the script like so after import processing:               processing.runalg("qgis:fieldcalculator", resLayer, 'bearing', 0, '(atan((xat(-1)-xat(0))/(yat(-1)-yat(0)))) * 180/3.14159 + (180 *(((yat(-1)-yat(0)) < 0) + (((xat(-1)-xat(0)) < 0 AND (yat(-1) - yat(0)) >0)*2)))', 'bearingdata.shp')


ArcGIS JavaScript manually render a layer with supplied JSON

Given the following JSON which is retrieved outside the ArcGIS/dojo framework, how would I go about rendering this layer? Thanks in advance!                   {             "currentVersion": 10.01,             "serviceDescription": "",             "mapName": "Layers",             "description": "",             "copyrightText": "",             "layers": [                 {                     "id": 0,                     "name": "Transportation Stations-unexpired",                     "parentLayerId": -1,                     "defaultVisibility": true,                     "subLayerIds": null,                     "minScale": 400000,                     "maxScale": 0                 }             ],             "tables": [],             "spatialReference": {                 "wkid": 102100             },             "singleFusedMapCache": false,             "initialExtent": {                 "xmin": -10398329.13791846,                 "ymin": 2687052.938617364,                 "xmax": -7541451.81403804,                 "ymax": 5379667.868452799,                 "spatialReference": {                     "wkid": 102100                 }             },             "fullExtent": {                 "xmin": -10152568.449939176,                 "ymin": 2795685.894150028,                 "xmax": -7787215.334097848,                 "ymax": 5828927.975739868,                 "spatialReference": {                     "wkid": 102100                 }             },             "units": "esriMeters",             "supportedImageFormatTypes": "PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP",             "documentInfo": {                 "Title": "test.mxd",                 "Author": "test",                 "Comments": "",                 "Subject": "",                 "Category": "",                 "Keywords": "",                 "Credits": ""             },             "capabilities": "Map,Query,Data"         }


Is it possible to install 9.3 Desktop Administrator as a standalone program?

I have ArcServer 9.3 installed on a server that I use for running scheduled Python geoprocessing scripts. I have several running, and now I'm trying to schedule one to rec/post, delete and recreate our database versions. The issue that I'm having is this line of code               gp.SetProduct("ArcEditor")      Apparently to run the versioning tools, I need to have valid license of ArcEditor or higher availible to the server. I would really rather not install ArcGIS desktop on my server box, but I'm stuck for a solution. My main question is, is it possible to install the 9.3 Desktop Adminstrator as a standalone program, then point it at my license manager so that the script can find a license file? If not, that's fine, any ideas are appreciated.


Use Python lists in Field Calculator?

I couldn't find this question, although I am sure it has been asked. How could I use a python list to condense this script? This code block currently works, but is clearly not very efficient.               def Reclass(test):     if test == '2 7':         return 'Padmounted Single Phase'     elif test == '2 4':         return 'Padmounted Three Phase'     elif test == '2 2':         return 'Padmounted Three Phase'     elif test == '2 1':         return 'Padmounted Three Phase'     elif test == '1 4':         return 'OH Single Phase'     elif test == '1 2':         return 'OH Single Phase'     elif test == '1 1':         return 'OH Single Phase'     elif test == '1 5':         return 'OH Second Phase'     elif test == '1 3':         return 'OH Second Phase'     elif test == '1 7':         return 'OH Third Phase'      I was attempting to use (as an example of a list):               elif test == ['1 1', '1 2', '1 3']      but the code was being skipped over and not working.


Persisted member in an application extension does not save to stream

I have an ArcMap extension in which I'm trying to persist a string value. When the document is saved, the public member m_LayerName in the application extension class is not being persisted. Either it's not being written to the stream or it's not being loaded correctly once the document is reopened. I'm not sure what I'm doing wrong. The Save and Load events are definitely being executed appropriately, but no data is being saved. This is my first attempt at persisting data with an extension so I'm missing something. Below is the relevant code.               Public m_LayerName As String          ...          Public ReadOnly Property ID() As ESRI.ArcGIS.esriSystem.UID Implements ESRI.ArcGIS.esriSystem.IPersistVariant.ID         Get             Dim typeID As UID = New UIDClass()             typeID.Value = Me.GetType().GUID.ToString("B")             Return typeID         End Get     End Property          Public Sub Load(ByVal Stream As ESRI.ArcGIS.esriSystem.IVariantStream) Implements ESRI.ArcGIS.esriSystem.IPersistVariant.Load         m_LayerName = CStr(Stream.Read())         Marshal.ReleaseComObject(Stream)     End Sub          Public Sub Save(ByVal Stream As ESRI.ArcGIS.esriSystem.IVariantStream) Implements ESRI.ArcGIS.esriSystem.IPersistVariant.Save         Stream.Write(m_LayerName)         Marshal.ReleaseComObject(Stream)     End Sub


Identifying user triggering ArcGIS Server invalid username or password error

Can anyone tell me if there is a way to identify the culprit of an "Invalid Username or Password" error in ArcGIS Server logs? For source, it just says 'Admin' for source, and nothing for User. Is there a .txt log stored somewhere that would tell me which username is causing the bad login?