delete feature from database by selecting feature from vector layer

I want to delete a feature attribute for example say grid completely from the map that is it has to be deleted from database. I am using OpenLayers 2.12, postgis 2.0 and postgresql 9.0. Please guide how to remove grid from database. Below is my code               function loadMap()      {                         map = new OpenLayers.Map('map', {               controls: [                    new OpenLayers.Control.PanZoom(),                         new OpenLayers.Control.Navigation()                ]            });          DeleteFeature = OpenLayers.Class(OpenLayers.Control, {     initialize: function( layr, sm) {         OpenLayers.Control.prototype.initialize.apply(this, [sm]);         this. layer = layer;         this.handler = new OpenLayers.Handler.Feature(             this,  layer, {click: this.clickFeature}         );     },     clickFeature: function(feature) {         // if feature doesn't have a fid, destroy it         if(feature.fid == undefined) {             this.layer.destroyFeatures([feature]);         } else {             feature.state = OpenLayers.State.DELETE;             this.layer.events.triggerEvent("afterfeaturemodified", {feature: feature});             feature.renderIntent = "select";             this.layer.drawFeature(feature);         }     },     setMap: function(map) {         this.handler.setMap(map);         OpenLayers.Control.prototype.setMap.apply(this, arguments);     },     CLASS_NAME: "OpenLayers.Control.DeleteFeature"     })           layer = new OpenLayers.Layer.WMS(                         "Road", "http://localhost:8089/geoserver/IIRS1/wms",                         {                             height: '512',                             width: '502',                             LAYERS: 'IIRS1:india_road',                             transparent: "true",                             srs: 'EPSG:4326',                             tiled: 'true',                                  format: 'image/png',                             format_options: 'antialias:none'                                //  tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                         },                         {transitionEffect: 'resize',                                  buffer: 0,                             displayOutsideMaxExtent: false,                             visibility: false                         }                     );                           //Similarly I added OMS layer and other functions of zoom n navigate     //here is the delete function      action = new GeoExt.Action({             text: "Identify",             control: new OpenLayers.Control.Button(),             map: map,             allowDepress: true,              iconCls: "icon-feature-identifyIcon",             tooltip: "Identify",             map: map,             listeners: {             click: function(){                     control = new OpenLayers.Control.GetFeature({                protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer),                box: true,                hover: true,                multipleKey: "shiftKey",                toggleKey: "ctrlKey"            });            control.events.register("featureselected", this, function(e) {                select.addFeatures([e.feature]);       road_id = e.feature.attributes.road_name; // road_id contains the id of the road             //alert(road_id);                     del= new DeleteFeature(layer,road_id);                 alert("remoned");                     });            control.events.register("featureunselected", this, function(e) {            select.removeFeatures([e.feature]);            });            control.events.register("hoverfeature", this, function(e) {            hover.addFeatures([e.feature]);            });            control.events.register("outfeature", this, function(e) {            hover.removeFeatures([e.feature]);            });                 map.addControl(control,del);            control.activate();               }                                      }         });         actions["getfeatureinfo"] = action;         toolbarItems.push(action);         toolbarItems.push("-");


Where can I find a shapefile basemap for the Indian Ocean?

I need to plot point data over a basemap of the Indian Ocean. Can anyone tell me where I can find such a basemap in shapefile format? I use ArcView 9. Thank you.


Label Expressions to replace null values with text not in feature class

I need to label some hydrants (points) - some of these belong to the fire brigade and have a number assigned to them, some do not and thus do not have a number. I would like to write an expression along the lines of: 'Label Hydrant with number if number exists, if hydrant has null value label with 'WO'.' I just can't figure it out. The simplest way for me to do this would be to change the null values to WO but the data is not mine, and I do not want to make changes to it. I suppose I could make a copy and put the values in the copy, but ideally I would like an expression. Thanks!


Is there a way to find the closest anticorrelated polygon or automate what is learned in the semivariogram?

I am trying to do spatial autocorrelation of sorts based on a layer of polygons of mean rainfall data. I want to see how rainfall deviates from a certain point on the landscape. Essentially, I want to see how far someone would need to go in order to find another polygon of rainfall that is most different to the polygon they live in. I have found the interpretation I need from the semivariogram function in Geostatistical Analyst, but I want to be able to click on a polygon and see where the closest, yet most different (in terms of rainfall amounts) polygons are. I want to try doing one of the methods of spatial autocorrelation, but it appears all of the methods I have tried calculates z-scores based on the mean of the ENTIRE area of polygons, not the single polygon that I want to calculate the correlation from. Do you have any ideas on how to best do this? Is spatial autocorrelation not the best route and are there other spatial statistics that I may want to pursue? Or is there a way to fiddle with the settings on spatial autocorrelation to ensure it is calculate the Zscore from a single point?


role of gis in geotechnical engineering?

Sir, i am a pg student and presently doing my project work in 'bore hole data management and analysis using GIS'.in this i created different layers of soils coming under my study area using arcGIS software,and developed a 3D soil model. but now i am little confused that wether my project divert from geotechnical engineering.heard that GIS is a tool to aid Geotech.i want to know is there any further applications in GIS which helps to modify my project


ESRI Javascript polygon

I'm using ESRI JavaScript API 3.5. My polygon cannot load. Please help.                 dojo.require("esri.map");       dojo.require("esri.graphic");            var map;       function init() {         map = new esri.Map("map",{           basemap:"topo",           center:[103.8, 1.35], //long, lat           zoom:13         });         dojo.connect(map, "onLoad", loadData);       }//end init            function loadData(){          var arr = [];          var p = new esri.geometry.Point(103.8, 1.35);          arr.push(p);          p = new esri.geometry.Point(103.8, 1.35222);          arr.push(p);          var polySymbolRed = new esri.symbol.SimpleFillSymbol(            esri.symbol.SimpleLineSymbol.STYLE_SOLID,            new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,              new dojo.Color([0, 0, 0, 1]), 1),            new dojo.Color([255, 0, 0, 0.2])          );               var gra = new esri.Graphic(arr,polySymbolRed);          map.graphics.add(gra);        }


QGIS - How to avoid -2147483648 value from imported CSV?

I am attempting to join a spreadsheet containing all the CIA Factbook Country Comparison Data (many columns) to the existing Natural Earth world countries shapefile. I followd the tutorial here, but a couple of things occurred: 1) Several of bits of data were changed to -2147483648 2) The imported field lengths all show as "0" in the properties. I am not trained in GIS and I have never worked with databases. I am simply trying to combine this data and shapefile, so that my students will be able to graphically manipulate and analyze the information in a new Global Studies course. I've tried taking the spreadsheet (from Excel) and putting it through Access and then exporting to a dbf file. I have set all the field lengths to 100 (and even tried 50), but I get a "field will not fit in record" error. I even tried truncating the column headings to 10 (thinking that might have been the problem, based on internet searches), but it didn't help. * * * As Per Comment: Here is a link to a version of the spreadsheet with truncated headings. Here is a picture of the corrupt data.   https:// docs . google . com/file/d/0BzHj6AzbbxcINy1jTGRPTDh1bFU/edit?usp=sharing


US MAP using Zipcode in R

I have a set of US zip codes grouped into two groups. I'm plotting those two groups on US MAP using R code. I'm using following code to plot group A & B combining together               zip.plot(zipcode,col=rgb(zipcode$Red,zipcode$Green,zipcode$Blue,max=255),cex=1,pch=20,)      then I'm using following code to create two data set sub setting group A & B               zipcode2=zipcode[which(zipcode$Group =="Group B"),]     zipcode3=zipcode[which(zipcode$Group =="Group A"),]      Now I'm plotting group A & group B seperately in two US Maps               zip.plot(zipcode2,col=rgb(zipcode2$Red,zipcode2$Green,zipcode2$Blue,max=255),cex=1,pch=20,)     zip.plot(zipcode3,col=rgb(zipcode3$Red,zipcode3$Green,zipcode3$Blue,max=255),cex=1,pch=20,)      I'm using two separate R-G-B code to identify group A & B. The points which are showing for Group A & B in combined plot is different with the points showing in separate maps of Group A & Group B. It is looking that some of points of group B are showing as group A in combined Map by Group A's color code. I checked the R-G-B code for group A & Group B in my data & they are different. Can you please help me to understand what wrong is happening with my codes?


How to migrate data directory of opengeo geoserver?

How to migrate data directory of geoserver in opengeosuite 3.1 to stand alone geoserver version 2.5.1. Is it to copy data directory and restart the server only or any thing else..


FME: why do my readers sometimes not get added to the canvas?

Sometimes when I generate a workspace in fme 2014, the reader and writer get created but not added to the workspace. Can anyone explain why?


How to draw polygons from watershed boundary dataset?

I'm working on a web map using esri arcgis javascript api. I'd like to use the NHD Watershed Boundary Data to draw polygons based on the boundaries of the watersheds. Does anyone have any ideas of how to start? I've looked at the National Map where I can download data but ideally, I could pull data from an online source rather than hosting it myself where I would be responsible for any changes to the data. I'm already using the NHD Watershed Basemap as my basemap but I don't see where the watershed boundaries are available. Any tips would be greatly appreciated. Thanks!


If I were flying over a flat world at constant zoom ("elevation"), taking aerial screenshots ("photos"), how would I patch them into a mosaic?

I'm not sure if this is the right place to post this question (please comment on this rather than downvote, etc), but if I were flying over a 2 dimensional world, at a constant altitude, taking aerial photos (ahem, cropped screenshots), how would I patch those images together? I'm using some tools right now that assume I'm doing a panorama ("AutoStitch", works for 2 images sort of) or am taking real aerial photos ("MapTiler") and thus somehow screw this up for me. That "somehow" is, I think, the coordinate reference system (CRS) being used by those programs as the model for patching those images together. The algorithms that use image recognition to patch the photos together are being misinformed in these latter two programs. The first one, AutoStitch works wonderfully for 2-3 images compared with other programs I've used. I can't actually get MapTiler to work, but it appears to be for real aerial mosaic patching. I need one for a 2D world at constant zoom ("altitude"). Thanks


Pyqgis :2.2 : link between a signal and an event

I'm writing a pyqgis 2.2 plugin with qgis 2.2 I succeeded in accessing and displaying vector data (geometries & attributes). I succeed also to create a 'beforecomitechanges' signal ( emitted, before changes are commited to the data provider). Thus a message has appeared into qgis logwindow ("comit change" label) after editing operations and before commiting toward the dp). Please read following piece of code allowing to do that: def beforeLayerCommitChange(self):               QgsMessageLog.logMessage( "commit change" )     QApplication.beep()          layer.beforeCommitChanges.connect(self.beforeLayerCommitChange)      Now I would like to generate others signals. i would like generate the displaying of information messages (number of features that have been added,modifyied,deleted, the id of the features which have been modified, the name of the layer..). COuld you throw light for me ? THanks.


How to load an external WFS (GML output format) in a Leaflet map?

I need to build a Leaflet map loading data from this external WFS service http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/wfs/Numeri_Civici_2012.map&service=wfs&request=getCapabilities with these output formats               <OutputFormats>      <Format>text/xml; subtype=gml/3.1.1</Format>     </OutputFormats>      Here you are a sample of the data http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/wfs/Numeri_Civici_2012.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=IN.NUMERICIVICI.2012&SRSNAME=EPSG:4326&bbox=7.59,44.83,7.75,44.94&outputFormat=GML2 I know how to load an external WFS if the output format: here you are a sample                           <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />       <title>Get External JSONP</title>

                       ... but this obviously doesn't work with GML. Any suggestions in case of GML output formats? Thank you very much in advance!!! Cesare


arcGIS in Android Studio

I want to using arcGIS in Android Studio. I followed this site: http://blogs.esri.com/esri/arcgis/2012/10/26/developing-with-the-arcgis- runtime-sdk-for-android-and-intellij-idea/ This is my build.gradle file:               buildscript {         repositories {             mavenCentral()         }         dependencies {             classpath 'com.android.tools.build:gradle:0.5.+'         }     }     apply plugin: 'android'          repositories {         mavenCentral()     }          android {         compileSdkVersion 18         buildToolsVersion "17.0.0"              defaultConfig {             minSdkVersion 7             targetSdkVersion 16         }     }          dependencies {         compile 'com.android.support:appcompat-v7:18.0.0'         compile 'org.jsoup:jsoup:1.7.2'         compile files('libs/ArcGIS_Android.jar')         compile files('libs/jackson-core-lgpl-1.9.5.jar')         compile files('libs/jackson-mapper-lgpl-1.9.5.jar')               }      And I added as a jar file to libs folder : ArcGIS_Android jackson-core- lgpl-1.9.5.jar jackson-mapper-lgpl-1.9.5.jar And I am getting this errors: Gradle: package com.esri.android.map does not exist Gradle: package com.esri.android.map.ags does not exist Gradle: cannot find symbol class MapView Gradle: cannot find symbol class ArcGISTiledMapServiceLayer Arcgis jar is appear extarnal libraries. And I am getting errors at run time not compile. Thanks for help


not exporting some fields in attribute table in arcgis 10

I just carried out join operation in arcgis version 10. I used a common field in shp file and common field in table. Then I export the shp file. After than once I open the attribute table all fields and data of both files (i.e shp and table) were present in newly created shp file. However, then I export the attribute table of the newly created shp file (i tried different options) the merge data is not visiable when open in excel.


How do I get arcpy.mapping autocomplete to work in IDLE (in a new window)

new GIS python programmer here. I want to write scripts in IDLE, but I love how the built in python window in ArcGIS 10.2 automatically fills in the module names as you start typing them. For example, if I type `arcpy.Lis...`, the python window in ArcGIS will suggest `arcpy.ListDataStoreItems`. In IDLE, that doesn't occur, and I feel that if I type one wrong letter or mess up a case, it will cause the script to crash and burn. At the top of my script, I write:               import arcpy.mapping as mapping     # etc      However I don't believe this runs until the script runs, so how can the window know what I've imported. Can I do something in the shell so that the autocomplete works in IDLE?


ShapeFile with Z Co-ordinates

I have 3 shapefiles, two of them wihtout the Z Co-ordinates elevation but 1 of them has a Z co-ordinate elevation. I can load two ShapeFiles into my SQL Server Database which does not have Z Co-ordinates. But I am having issue loading the Z Co-ordinate file into the database. I have been reading different forums and got a suggestion that I need to trim the Z coordinates(chnage 3D to 2D) to load into the database. I was just wondering how can I achieve this? Can anyone suggest free tools or any method to do the same?


What is the target .NET Framework of ESRI ArcObjects SDK 10.2

I had ArcMap 10 Add-In project built with ArcObjects SDK for .NET 10.1 where I could not reference external COM DLL build on .NET 4.0 due to a .NET forward compatibility issue. (ArcObjects SDK 10.1 uses .NET 3.5 SP1) I wonder if the newer ArcObjects SDK 10.2 release targets the .NET 4.0 framework. That will solve my problem. Does anyone know? Thanks


What does the "service" box in the PostGIS connection dialog stand for?

Can sоmеbody explain me what to write in the "service" box when connecting to the local DB. QGIS Lisboa and Postgres are installed.


Non-spatial database analysis in ArcGIS - need alternative solution

I've recently joined an organisation where we use ArcGIS to do a lot of non- spatial analysis on a spatial dataset. Our main dataset is an environmental polygon survey with lots of attributes (in an ESRI file geodatabase), and I'm frequently asked to conduct analyses such as: - Calculate the summed area of all polygons which meet certain queries (specified by a Where clause across several fields, for example) My problem is that I don't know very much at all about traditional database development, but it strikes me that all I'm doing is querying the database (across multiple fields) and then summarizing the results. I've been doing this is in ArcGIS and Python using tools search as Summary Statistics or objects such as searchcursors to scroll through my layers, select records and sum them. But I imagine non-spatial databases must be a lot faster. But which one? Please tell me what platform I should use to conduct routine summaries on a 500k records sized database. MS Access? Excel and pivot tables? SQL? I don't know where to start, but have a feeling that doing this in ArcGIS (v 10, not 10.1) isn't the best way. I'm not looking for long answers, just a short shove in the right direction to fill in my lack of knowledge about databases in general. Thank you


Using Web APIs with ArcFM Data

Has anyone worked with ArcGIS server, when the data is stored in SDE with ArcFM? While researching this Issue for a friend, I found out that ArcFM Server would be needed. What is not clear, is if a Map can be published, and consumed via Flex or Silverlight API. Has anyone successfully done something like this? Any pointers would be gladly appreciated.


How to create spatial tag clouds or "tag maps"?

I'm looking for implementations of spatial tag clouds or "tag maps". Some papers I found talk about a Yahoo Tag Maps API, but I couldn't find any such thing. I'd prefer OpenLayers-based solutions, but others would be interesting too. Edit: Example images can be found at http://www.soi.city.ac.uk/~sbbb717/go2/iv_figs/, e.g: ![alt text](http://i.stack.imgur.com/bvklS.png)


Geoportals in context of INSPIRE

Do you know any geoportals which are fully (or almost) compatible with INSPIRE directive?


Detecting trends in local business web services

Do you know any research paper about spatial data mining algorithms to retrieve trends about local business services (such as google places.. etc) let's say most rated restaurants this week.. etc ? I need scientific material about it. thanks


Model built in ArcGIS 10 won't open in 10.1

I've built a model to batch clip rasters. It uses iteration and works fine on machines running arcGIS 10. However, colleagues that have upgraded to 10.1 cannot open it. the red x appears with a "unable to execute selected tool" pop up. Below is a picture of the model (I can't export the script for some reason): ![Batch clip rasters tool](http://i.stack.imgur.com/AjxIv.png)


OpenLayers, Geoserver, Postgis, GITHUB and content management

Im not sure if this is the right forum for this question. I am working on a project to look into developing a prototype mapping applications for the agriculture industry. I am using asp classic, openlayers, geoserver and postgres for the application atm I plan on changing from asp classic to php soon. Could a CMS be used to manage page layouts, map layers styles, user profiles, user permissions etc in my current aplication. Can GIT repository be used to store code, and manage code versioning used in the application? I have no idea where to start. Has anyone got any advise or links to share. I have done some searching on the web but there is just some much to trawl through. I do have both cartaro and drupal installed, but I can find any simple way to use them for my application. Here is a link`http://54.252.203.210/FARMWEB/FARMWEB2.0_DEMO_STEP3_PG.asp?farmid=354` to what I have developed so far.


Connect to Web Feature Service using python/C#

I want to connect to WFS using either python or C#, it would be great if anyone can tell me how to connect and extract features from the service. I'm very new to this. Any help on this is most welcome. Thanks


How to snap dangling nodes with prescribed angle?

I have got a streets shape file, to snap the dangling nodes in ARCGIS. ![enter image description here](http://i.stack.imgur.com/qGAnq.png) But, I have to snap only some nodes(of feature) with a prescribed angle (green node in the image, and the angle marked in grey). And the other features (marked in red) has to be left out. Any preset tool or python script available? Also, is this possible in QGIS?


Join Attributes by Location: .mdb and shapefile in QGIS

I can join attributes by location in QGIS using 2 shapefiles. However, I do not know how to do the join when one of my files is in a .mdb format while the other is a shapefile.


Access CommandItems programmatically with ArcObjects in ArcGIS Engine application

I'd like to programmatically execute a command in my ArcGIS Engine application with ArcObjects. I know in Desktop I would do it like this:               ESRI.ArcGIS.Framework.ICommandBars commandBars = m_application.Document.CommandBars;     ESRI.ArcGIS.esriSystem.UID uid = new ESRI.ArcGIS.esriSystem.UIDClass();     uid.Value = cmdname; // Example: "esriFramework.HelpContentsCommand" or "{D74B2F25-AC90-11D2-87F8-0000F8751720}"     ESRI.ArcGIS.Framework.ICommandItem commandItem = commandBars.Find(uid, false, false);     commandItem.Execute();      but IApplication is not available in an Engine environment. Is there an alternative way for standalone (ArcGIS Engine) applications to do this?


Counting number of points in 1 km grid covering surface of Earth?

I want to cover surface of earth with equal sized shapes and count number of points within each cell. shape of cell doesn't matters (triangle, hexagon ...), neither area, but equality of them is essential. The problem is that I can not do this in a software like ArcGIS and need to calculate it using formula. Here is what I am thinking:   1. convert geographic coordinates into Cartesian coordinates,    2. divide surface of the earth to equally distributed points   3. round all points to nearest such point. Problem is step 2. How to distribute points equally? Have any ideas?


Remove Duplicate Polygons Using Open Source Tools

I have a shapefile containing features with duplicate geometries, but different attributes (e.g. a polygon with attribute XX, and an identical polygon with attribute XY). I want to identify the duplicates, then pick the one with the correct attributes, deleting the other. I've tried topology tools in OpenJump/Kosmo, but without success. They have a 'delete duplicates' tool that does what I want, except seems to arbitrarily delete one of the features rather than letting me pick which one to keep. I have access to QGIS, OpenJUMP, Kosmo, etc. and am able to install other open source/free tools if required. Thoughts?


Creating simple image from vector data

Can anyone suggest a quick (and preferably open source) way to create an image from a shapefile. For example, I have a shapefile containing parcel boundaries, I want to create a png file depicting these parcels. The symbology required for this image will be bare-bones (solid outline and fill). I know that shp2img from MapServer would do the trick. I am just curious if there is anything else available. Any references to pre-compiled tools or api's/sdks welcome.


Geoserver WFS get feature doesn't work - "SyntaxError: missing ; before statement"

I'm trying to use geoserver WFS json for creating vector layer (instead of using WMS) because this is a layer I redraw every 20 seconds. This is the code I use :               function getJSON() {              var geoJsonUrl = "http://localhost:8080/geoserver/test/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=test:Coords&srsName=EPSG:4326&format=text/javascript&outputFormat=json&format_options=callback:loadGeoJson";              $j.ajax({             url: geoJsonUrl,             dataType: 'jsonp'         });          }          function loadGeoJson(data) {         console.log('success');     }      The JSON from the request is :               {         "type": "FeatureCollection",         "features": [             {                 "type": "Feature",                 "id": "DIView.fid-25487b92_142a9c99a7e_-5722",                 "geometry": {                     "type": "Point",                     "coordinates": [                         34.8923,                         32.1893                     ]                 },                 "geometry_name": "DeviceLocation",                 "properties": {                     "Id": 1,                     "DeviceSerial": "046009117212",                     "DateTime": "2013-12-03T12:20:48.080Z",                     "Spd": "4.72175   ",                     "Brn": "143.3     ",                     "Alt": "91.6      ",                     "DeviceName": "12",                     "DeviceReversedName": "21",                     "DeviceBattery": 3.71                 }             },             {                 "type": "Feature",                 "id": "DIView.fid-25487b92_142a9c99a7e_-5721",                 "geometry": {                     "type": "Point",                     "coordinates": [                         34.8025,                         31.2813                     ]                 },                 "geometry_name": "DeviceLocation",                 "properties": {                     "Id": 2,                     "DeviceSerial": "046009117224",                     "DateTime": "2013-12-03T12:41:12.313Z",                     "Spd": "0         ",                     "Brn": "136       ",                     "Alt": "349       ",                     "DeviceName": "24",                     "DeviceReversedName": "42",                     "DeviceBattery": 0.29                 }             },             {                 "type": "Feature",                 "id": "DIView.fid-25487b92_142a9c99a7e_-5720",                 "geometry": {                     "type": "Point",                     "coordinates": [                         34.8026,                         31.2812                     ]                 },                 "geometry_name": "DeviceLocation",                 "properties": {                     "Id": 3,                     "DeviceSerial": "047180050069",                     "DateTime": "2013-12-03T12:41:14.140Z",                     "Spd": "0.690988  ",                     "Brn": "161.8     ",                     "Alt": "340.2     ",                     "DeviceName": "4",                     "DeviceReversedName": "4",                     "DeviceBattery": 3.65                 }             }         ],         "crs": {             "type": "EPSG",             "properties": {                 "code": "4326"             }         }     }      and I get error in firebug : ![enter image description here](http://i.stack.imgur.com/wHSBl.png) Any idea ?!


How to find points inside each polygon in Mysql?

I have points table (with latitude and longitude columns) and polygons table with geometry stored in Mysql. I want to get points inside one polygon, for example in polygon which has column name="California". This is my query which returns all points inside all polygons, but I need all points inside polygon with name 'California':               $sql = "SELECT points.name FROM polygons, points WHERE ST_CONTAINS(polygons.geom, Point(points.longitude, points.latitude));"


How much time do I have untill the job status is no longer available?

After launching a SubmitJob operation, how much time is left before the job status is no longer available?


Weight dependent routing in ArcGIS

I'm looking for a solution to the following problem. I want to find the shortest route for a truck, picking up garbage from households. I know the amount of garbage each household is producing and I do know how much garbage the truck can hold. The scenario is of course that the truck drives of to pick up garbage until its full, or to the point where it is almost full, but the next household is providing so much garbage that the truck would be overloaded. Then the truck should come back. I do have ArcGIS and the Network Analyst extension at hand and was wondering if this is possible to achieve with these tools. I don't mind if there is some scripting required, that's not the problem. Has one of you done something similar and could give me a hint on how to do it?


Map background and style

I'm very new at GIS and GeoServer. I managed to import some maps but they look like this. Somehow it has the data required but displays it as dots. How can I have it like google maps? With city names and background? Thank you. ![map](http://s13.postimg.org/t3iwk8zs7/map.jpg)


Imagery Database/Metadata Store

I'm a Remote Sensing PhD student, and as such I have a large number of satellite images that I'm working with. I'm starting to fail to keep track of them all and I have a lot of metadata that I want to track for each image (sensor, resolution, processing steps, format, source etc). I have been using the SPECCHIO database for storing Spectral Libraries for a while, and was wondering whether anything similar exists for storing images. I've had a search and can't seem to find anything, but that doesn't mean that it doesn't exist! Ideally I'm looking for something which can store a database of metadata and allow you to search for images that meet certain criteria (spatial resolution > 10m, or includes a certain lat/long co-ordinate). Does anyone know if anything like this exists? If it doesn't exist then I might have a go at writing something, which may involved SQLite, ENVI, IDL and a lot of late nights...


Effectively displaying a large amount of data on Google Maps APi

I have about 20 layers that I'd like to put on a Google maps API. I assume I'll need some form of a tile cache server and perhaps under mapserver or geoserver. These layers amount to about 400mb so the option of using static maps using kml/kmz is not an option. The data exists on two geodatabases, ESRI and PostGIS. Can you provide insights on publishing large amounts of data to google maps api? especially in a way that allows users to easily do queries,load and unload layers at a relatively acceptable speed? Are there any good reads that improve the understanding of the issues and challenges?


application of gis in geology

I am a student of geophysics and I am studying geographic information systems (ArcGIS) and we have been given a project. As I do not have much information about GIS capabilities can you please suggest me a topic for my project which is related to geology or geophysics? For example, my fellow classmates are doing project on they creating a tectonic map which will also show where earthquake occurs. thanks


Lambert_Conformal_Conic: converting from shapefile to geojson fails

I have a shapefile that also contains a **proj** file that looks like so:               PROJCS     [         "MGI_Austria_Lambert",         GEOGCS         [             "GCS_MGI",             DATUM             [                 "D_MGI",                 SPHEROID["Bessel_1841",6377397.155,299.1528128]             ],             PRIMEM["Greenwich",0.0],             UNIT["Degree",0.0174532925199433]         ],         PROJECTION["Lambert_Conformal_Conic"],         PARAMETER["False_Easting",400000.0],         PARAMETER["False_Northing",400000.0],         PARAMETER["Central_Meridian",13.33333333333333],         PARAMETER["Standard_Parallel_1",46.0],         PARAMETER["Standard_Parallel_2",49.0],         PARAMETER["Latitude_Of_Origin",47.5],         UNIT["Meter",1.0]     ]      I want to convert this shapefile into a geojson like so:               ogr2ogr -f GeoJSON \         -s_srs STATISTIK_AUSTRIA_STADTREGIONEN_3MIO.prj \         -t_srs EPSG:4326 \          STATISTIK_AUSTRIA_STADTREGIONEN_3MIO.geojson \          STATISTIK_AUSTRIA_STADTREGIONEN_3MIO.shp      This fails with the following error message:               ERROR 6: No translation for Lambert_Conformal_Conic to PROJ.4 format is known.      Changing the **proj** file to contain either `PROJECTION["Lambert_Conformal_Conic_2SP"]` or `PROJECTION["Lambert_Conformal_Conic_1SP"]` instead of `Lambert_Conformal_Conic` results in valid geojson files that seem to have the correct coordinates **BUT** the resulting coordinates differ in their 2nd or 3rd decimal places, e.g.,               LON               , LAT     16.526053978650904, 48.32876392574797      vs.               16.527168091786308, 48.32902755664574       My questions are:   1. Which one of the two (if any) is the correct result?   2. Is there a intuitive explanation for the difference between Lambert_Conformal_Conic, ~_1SP, and ~_2SP that also a non-cartographer is able to understand.   3. There is an inaccuracy in the value of the `GEOGCS UNIT` value in the **proj** displayed above compared to the value given for the respective projection at spatialreference.org. Is this the reason for the differences?   4. The publisher of the dataset states that there is a more accurate (but non-free) version (`1:500000` vs. `1:3000000`) of the data. May it be that the inaccuracies due to the data source is bigger than the inaccuracies due to inaccurate re-projection?


Importing data into a project with a custom CRS incorrectly projected

I created a custom CRS for a project I am working on. I then started a new project, set to my custom CRS and turn on "on the fly" transformation. I import Rail data that I know is in my custom CRS, and it imports as expected. However when I import Road data from our library that is in a different CRS, this data goes to a totally different area. I tried the reverse situation. I opened the Road data in a new project, set the CRS to this layer and turn on "on the fly" transformation. When I import the Rail data (which is in my custom CRS) it imports fine. I would appreciate your guidance on:   1. Is it possible to create a project based on a Custom CRS?   2. Any tricks/tips when importing data and converting it. Ultimately I want to import the data I am interested in, convert it to my custom CRS so I can test out some of the grass functions (which I understand needs to be in the same CRS), and use qconsolidate to store it is a separate location.


Cannot find Enable Attachments in ArcCatalog 10.1

I am using ArcCatalog 10.1 but I cannot find the option "Enable Attachments" when I right click on a shape file. Please see the pic below too. ![enter image description here](http://i.stack.imgur.com/m9zJm.png) There was another question similar to this in this forum but the solution proposed was to convert shape file to GDB. Can anyone guide me how to do that? Or is there another way to enable attachments.? I also converted the shapefile to shapefile stored under geodatabase. See the picture below ![enter image description here](http://i.stack.imgur.com/OglhM.png) However my TestingB.shp also doesnot have the attachments option on right click same as TestingA file.


Georeferencing an aerial image based on satellite imagery

As part of a bigger project I need to georeference an aerial image based on a landsat image downloaded form usgs. I use qgis. can I somehow place the layers on top of each other and mark certain points to apply the references of the downloaded image to the aerial photage?


Script to turn layers on/off in Data Driven Pages?

I'm working with Data Driven Pages to create a map series of communities (points). I'm using Model Builder to create a line poly feature for each community. The line poly shows the time away from each community by hour to a max. of five hours by road. With Model Builder, I can automate the creation, symbology, and addition of the poly lines to my DDP map series display. The problem is that I cannot automate enabling page definition query for each of these poly line features. This means that they do not match up with their respective community on DDP when they are added to the display. I'm working with over 2000 community points. To go in after the poly lines are created from the model and added to the map and manually enable page definition for each of them is rather time consuming. It would be nice if enabling Page Definition could be done in Model Builder so that when the newly created features are added to the map series, they already match up with their respective community. Then I could move on to tweeking the layout for each extent and exporting the maps ect. The only alternative I have thought of is to use a script that automatically turns the line features on or off depending on which Data Driven Page I am viewing. Does anyone know of a script like this?


Finding points that are within a set distance of other points

I have a large point file: several thousand. They are all GPS coordinates, recorded at different times, by different people. Many of them have unique data. So, for example, there will be one coordinate with one name, and a different coordinate, 50 meters away, with a different name. I'd like to select, or otherwise find, all the points in the file that are within a set distance of any other point in the file. So if the distance was 500 meters, then the end result should be a selection of all points that are within 500 meters of another point. Basically I need to go through the points and decide which one to keep and what data from each one to keep. There is no way to do this programmatically, I have to sort it out manually. But if there is a way to at least programmatically find the ones I need to look at, that would be very helpful. What is the best way to do this in ArcGIS?


Creating points based on coordinates in MapBasic

I am currently working on a MapBasic tool that generates start and end coordinates for a polyline layer. So far I have successfully populated 4 columns in a table (SX, EX, SY, EX) with coordinates of start and end nodes. The tool then exports the table as a csv. Now I want to open the exported table (I can do this) then create points based on these 4 columns in mapbasic. How would I go about doing this?


Error adding Geoserver store from PostGIS

I cant get a connection up when creating a PostGIS-store.   * Geoserver is running fine on IP:80/geoserver.    * PostGIS is running and working fine with psql commands   * Created database/table 'mydb' and 'mytable' then changed ownership to postgres ERROR MESSAGE               Error creating data store, check the parameters. Error message: Unable to obtain connection: Cannot create PoolableConnectionFactory (FATAL: no pg_hba.conf entry for host "127.0.0.1", user "postgres", database "main", SSL off)      PG_HBA.CONF # Database administrative login by Unix domain socket #local all postgres peer local all postgres trust # TYPE DATABASE USER ADDRESS METHOD               # "local" is for Unix domain socket connections only     local   all             all                                     peer     # IPv4 local connections:     host    all             all             127.0.0.1/32            md5     # IPv6 local connections:     host    all             all             ::1/128                 md5     host    all             all             128.187.0.0/16          md5     host    all             all             69.169.0.0/16           md5     #llow replication connections from localhost, by a user with the# replication privilege.     #local   replication     postgres                                peer     #host    replication     postgres        127.0.0.1/32            md5     #host    replication     postgres        ::1/128                 md5      Any idea what is going wrong? Im on a Ubuntu on AWS-EC2.


Is there a way to clip a polygon layer according to DEM elevation?

I have a polygon layer on top of a DEM. Is there a way to clip the polygon layer according to elevation, ie the clipped result being only those areas of the polygon layer between x and y altitude? The result needs to be a vector layer. Many thanks in advance.


Finding the shortest network distance from A to C via the closest B in ArcGIS?

I have an intern wanting to model the network distance from origin (A) to destination (C) via the closest detour (B). There are approximately 1,000 origin, 200 destination, and 500 detour points. I have looked through all of the tools in the network analyst extension but to no avail. VRP looked promising, but we not not have a travel time field so that option is unavailable.


How to get bbox from capabilities?

I have WMS layer and want use zoomToExtent after CQL filter. So i gonna get bbox from geoserver.               wms = new OpenLayers.Format.WMSCapabilities();     OpenLayers.Request.GET({     url:"http://localhost:8080/geoserver/wms/filedata?request=GetCapabilities",     success: function(e){     var response = wms.read(e.responseText);     var capability = response.capability;     for (var i=0, len=capability.layers.length; i<len; i+=1) {      var layerObj = capability.layers[i];      if (layerObj.name === 'filedata') {          map.zoomToExtent(OpenLayers.Bounds.fromArray(layerObj.llbbox));          break;      }      }     }     });      But zoomToExtent dont wanna work with lon lat, so how to get bbox in meters? My map showed in epsg900913.


not all polygons showing up in qgis 2.0

I am working with the block group shp files that I got from tiger 2010. When I bring in the shp files some of the block groups show up, but this is spotty. I have adjusted the CRS and still nothing. I have tried highlighting everything and checked the attributes table; all of the polygons seem to be there but only about 50 are highlighted. When I tell it to zoom to the layer extent it goes to the area that looks like it would encompass the entire state. I have also re-downloaded the zip file and extracted them but with no success. please help


ModelBuilder Branching & Conditions

I have a modelbuilder model setup that, in short, takes all selected features from ArcMap and exports it to a dwg. I need to add two things to this model which I'm not sure can be done in modelbuilder. The ArcMap document has several feature classes which don't necessarily overlap so first I need the model to run only on the feature classes that HAVE selected features and ignore the rest of the feature classes. Second, I need the model to NOT run if more than 10000 features are selected from any of the feature classes in ArcMap. This can probably be easily done in Python but I have no experience in Python hence I'd like to confirm if it can be done in modelbuilder. If not, I'll have to explore Python. Edit: I need a statement where if the number of features are greater than 0 and less than 10000 then it should be true and proceed. I think the "Get Count" and "Calculate Value" tools can be used to do this in modelbuilder, just not sure how.


Error when running a geoext example

I have the following source code (MapAndTree.js). This file belongs to a extjs 4.2 MVC app:               var mypanel = Ext.create('GeoExt.panel.Map', {             border: true,             region: "center",             // we do not want all overlays, to try the OverlayLayerContainer             map: {allOverlays: false},             center: [14, 37.5],             zoom: 7,             layers: [                 new OpenLayers.Layer.WMS("Global Imagery",                     "http://maps.opengeo.org/geowebcache/service/wms", {                         layers: "bluemarble",                         format: "image/png8"                     }, {                         buffer: 0,                         visibility: false                     }                 ),                 new OpenLayers.Layer.WMS("OpenStreetMap WMS",                     "http://ows.terrestris.de/osm/service?",                     {layers: 'OSM-WMS'},                     {                         attribution: '© terrestris GmbH & Co. KG
' +                             'Data © OpenStreetMap ' +                             'contributors'                     }                 ),                 new OpenLayers.Layer.WMS("Country Borders",                     "http://ows.terrestris.de/geoserver/osm/wms", {                         layers: "osm:osm-country-borders",                         transparent: true,                         format: "image/png"                     }, {                         isBaseLayer: false,                         buffer: 0                     }                 ),                 new OpenLayers.Layer.WMS("Gas Stations",                     "http://ows.terrestris.de/geoserver/osm/wms", {                         layers: "osm:osm-fuel",                         transparent: true,                         format: "image/png"                     }, {                         isBaseLayer: false,                         buffer: 0                     }                 ),                 new OpenLayers.Layer.WMS("Bus Stops",                     "http://ows.terrestris.de/osm-haltestellen?",                     {                         layers: 'OSM-Bushaltestellen',                         format: 'image/png',                         transparent: true                     },                     {                         singleTile: true,                         visibility: false                     }                 ),                 // create a group layer (with several layers in the "layers" param)                 // to show how the LayerParamLoader works                 new OpenLayers.Layer.WMS("Tasmania (Group Layer)",                     "http://demo.opengeo.org/geoserver/wms", {                         layers: [                             "topp:tasmania_state_boundaries",                             "topp:tasmania_water_bodies",                             "topp:tasmania_cities",                             "topp:tasmania_roads"                         ],                         transparent: true,                         format: "image/gif"                     }, {                         isBaseLayer: false,                         buffer: 0,                         // exclude this layer from layer container nodes                         displayInLayerSwitcher: false,                         visibility: false                     }                 )             ]         });          var mystore = Ext.create('Ext.data.TreeStore', {     model: 'GeoExt.data.LayerTreeModel',     root: {         expanded: true,          children: [                     {                         plugins: [{                             ptype: 'gx_layercontainer',                             store: mypanel.layers                         }],                         expanded: true                     }, {                         plugins: ['gx_baselayercontainer'],                         expanded: true,                         text: "Base Maps"                     }, {                         plugins: ['gx_overlaylayercontainer'],                         expanded: true                     }                 ]     }});          var mytree = Ext.create('GeoExt.tree.Panel', {       region: 'west',     title: 'Map Layer Selection',     width: 250,     collapsible: true,     autoScroll: true,     store: mystore,     rootVisible: false,     lines: true});          Ext.define('RioColorado.view.layout.MapAndTree',{     extend: 'Ext.Panel',     layout: 'border',     alias: 'widget.layout.mapandtree',     title: 'My app title',     items: [mypanel,mytree]});      When the code is executed, chrome shows me the following error:               Uncaught TypeError: undefined is not a function ext/src/grid/header/Container.js:173     Ext.define.initComponent ext/src/grid/header/Container.js:173     Ext.define.constructor AbstractComponent.js:1209     Base.implement.callParent ext-dev.js:6952     Ext.define.constructor Component.js:377     constructor ext-dev.js:8161     Ext.define.initComponent ext/src/panel/Table.js:365     Base.implement.callParent ext-dev.js:6952     Ext.define.initComponent ext/src/tree/Panel.js:239     Base.implement.callParent ext-dev.js:6952     Ext.define.initComponent geoext/src/GeoExt/tree/Panel.js:48     Ext.define.constructor AbstractComponent.js:1209     Base.implement.callParent ext-dev.js:6952     Ext.define.constructor Component.js:377     Base.implement.callParent ext-dev.js:6952     Ext.define.constructor ext/src/tree/Panel.js:169     constructor ext-dev.js:8161     (anonymous function) VM8083:3     Ext.ClassManager.instantiate ext-dev.js:8911     (anonymous function) ext-dev.js:3388     (anonymous function)          Uncaught Error: The following classes are not declared even if their files have been loaded: 'RioColorado.view.layout.MapAndTree'. Please check the source code of their corresponding files for possible typos: 'app/view/layout/MapAndTree.js ext-dev.js:10844     Ext.apply.onFileLoaded ext-dev.js:10844     (anonymous function) ext-dev.js:3374     onLoadFn      what I'm doing wrong?


Parcel Editor 10.0 Selection

I am trying out the ArcEditor 10.0 trial version and am having problems with the Parcel Editor. I am attempting to "select" using SELECT PARCEL FEATURE tab, nothing gets selected. I did the START EDITING under Parcel Editor, clicked SELECT PARCEL FEATURE, tried selecting the parcel features to no avail. After I click the SEL PAR FEATURE, it does show that features symbol on the pointer/scroll arrow. When I click START EDITING, only the SEL PAR FEATURE is clickable, the rest of the other PARCEL EDITOR buttons are unclickable. I am using shp files I created while using 9.3 ArcView. Would that have anything to do with it (which I can't see any reason why it should)? Some guidance in resolving this problem is appreciated.


Countries with a small number of sides

Please accept my appologies if this question is off-topic here; this is the closest match to the topic of my question. I am looking for countries and states whose map is a polygon with a small number of sides. There are several such states in the USA, such as: Colorado (4 sides), Wyoming (4 sides), New Mexico (apparently 8 sides). But, looking at a map of the world, I could not find other countries or states that have small number of sides. My question is: what country or state, ouside the USA, has the smallest number of sides?


Query MapInfo TAB Files

My company currently uses MapInfo Professional to map our client's addresses into territories. I have been asked to figure out a mechanism to do the same thing but real-time via a web service call. Is there any way to store the data from teh Mapnfo TAB files in a database and query it with lat/long in order to determine which "object" the lat/long belongs in? I've seen that there are multiple data formats for geospatial information, so if it isn't possible with the MapInfo TAB files, would it be possible with other formats? Am I coming at this issue in the correct way or is there alternative mechanisms for solving the problem?


Fixing Hole in DEM?

I have what looks like a hole in my DEM! I don't think it is affecting my calculations, but either way, I would quite like to correct it. Does anybody have any idea how? Please see the attached picture to understand what I mean. ![enter image description here](http://i.stack.imgur.com/oNnhq.png)


based map follow layer wms tiled

I am new to OpenLayers. I want to develop a system. I already get a layer from GeoServer using WMS services; this is the code:                var hilirPerak = new OpenLayers.Layer.WMS("hilirPerak",                     >>"http://>>localhost:8080/geoserver/hilirPerak/wms",                     {                        workspace: 'hilirPerak',                        layers: 'hilirPerak:lot',                        styles:'',                        format: 'image/png',                        tiled: true,                        transitionEffect: 'resize',                        units: 'degrees'                               },                     {                         maxResolution: 1000,                         singleTile: false,                          ratio:1,                         isBaseLayer:false,                         tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom,                         buffer: 0,                         visibility:true,                         maxExtent: OpenLayers.Bounds.fromString("3.873635,4.074956,101.14974"),                         //ratio: 1.9,                         //buffer: 0,                         //displayOutsideMaxExtent: true,                         //isBaseLayer: true,                         yx : {'EPSG:4326' : true},                         displayOutsideMaxExtent: true,                         transparent:true                          }                 );      It show on system, for basemap I am using Google, but the problem is, when I tick check layer, the basemap follows size layer. If the layer point at certain place, basemap follow layer bounds.


How to combine adjacent polygons sharing similar trait into single polygon?

I have a large dataset of habitat classes which I have further simplified down into my own unique classes. However, it resulted in there being habitats adjacent to each other with the same forest classification system. Is there any way to join these two (or however many there are touching that are classed as the same type) adjacent polygons into a single larger polygon? When I use the tool Dissolve, it takes all of the habitats of the same class for the entire map and creates a single polygon.


Getting the workspace from IGxDialog:DoModalSave

I'm writing an application that allows a user to save data into a table in a variety of formats: dBase, File or Personal Geodatabase, or SDE. I'm trying to see if there's a way to determine what type of workspace was chosen in the IGxDialog that is language independent. In a previous version, I was using the IGxDialog.ObjectFilter.Name property, but this varies with localization. On an English language machine, it will return 'dBASE tables', but on a German language machine, it returns 'dBASE-Tabelle'. I've tried working with the objectfilter, but the following code will give me both messages.                       If TypeOf pObjectFilter Is ESRI.ArcGIS.Catalog.GxFilterdBASEFiles Then MsgBox("Dbase")             If TypeOf pObjectFilter Is ESRI.ArcGIS.Catalog.GxFilterPGDBTables Then MsgBox("geodatabase")      How can I get a workspace from that dialog and determine what it is using IWorkspace:WorkspaceFactory:ClassID?


QGIS still not rendering WMS layers

Similar to Neil's question of March 8th 2013: QGIS not rendering WMS layers I can down load the BGS 1:50K bedrock and superficial deposits maps OK, but they don't render except at scales greater than about 1:50,000 - this seems to vary; sometimes "only" 1:25000 renders correctly. These scales are within the range quoted by the supplier (British Geological Survey). Neil asked a very similar question, but there does not seem to be a definite explanation yet. I'm using QGIS 2.2.0-Valmeira.


Generate MXD layer info report

I'd like to generate a report about MXD layers for a handful of MXDs. I want the report to display their name, workspace path and scale range settings. I can get the first two with ArcPy but I didn't find a way to get the scale ranges. Can this be done with ArcPy? Or perhaps there's some other way to generate the type of report I'm looking for? I found this but it doesn't give me scale range info: http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=A910AB18-1422-2418-3418-3885D388EF60 Here's the code I've started with:               import os, arcpy          directory = r"D:\MapTemplates\Map_Templates"     for root, dirs, files in os.walk(directory):         for myFile in files:                 fileExt = os.path.splitext(myFile)[1]                 if (fileExt == ".mxd"):                     fullPath = os.path.join(root, myFile)                     print myFile                          myMap = arcpy.mapping.MapDocument(fullPath)                     layers = arcpy.mapping.ListLayers(myMap)                     for layer in layers:                         wsPath = ""                         try:                             wsPath = layer.workspacePath                         except:                             pass                         if wsPath:                             print "    " + layer.name + " : " + wsPath


How to access the map coordinates show in QGIS status bar?

Is there a way to access the map coordinates show in qgis status bar? I found only this,               iface.mainWindow().statusBar().currentMessage()      But I know it's not the way. Or is there any way to capture the coordinates when cursor moves on map?


ITableWindow2 does not show all records

I have to develop an extension in C# for ArcMap 10.2 and I need to show information from a datatable in an a table window. I can show the table without problems, but I have a problem I can´t resolve. If I show table with one record, for example, and then I want to show the information of another table, even if the new table has several records, the table window show only one. This is the piece of code I use:               if (pTable != null) { IStandaloneTable pStandAloneTable = new StandaloneTableClass();     pStandAloneTable.Table = pTable;     pTWindow.StandaloneTable = pStandAloneTable;     pTWindow.Application = Connector.ConnectorExtension.Aplicacion;          if(!pTWindow.IsVisible) pTWindow.Show(true);          if (pTable != null)     {      IStandaloneTable pStandAloneTable = new StandaloneTableClass();      pStandAloneTable.Table = pTable;      pTWindow.StandaloneTable = pStandAloneTable;      pTWindow.Application = Connector.ConnectorExtension.Aplicacion;           if(!pTWindow.IsVisible)       pTWindow.Show(true);                System.Diagnostics.Debug.Print("Table: " + pTWindow.StandaloneTable.Name);      System.Diagnostics.Debug.Print("Records: + pTWindow.StandaloneTable.Table.RowCount(null).ToString());      pTWindow.StandaloneTable.Table.RowCount has the correct number of records in the table but the table window doesn´t show them Thanks in advance


Traversing all possible road routes

I have created a topology from OSM data and would like to simulate a car driving every possible route along the map. The purpose is to "survey" the osm data as if in a car. My ultimate objective is to find every unique journey segment of five miles, I am aware that there will be a LOT of them. I am using pgrouting/postgis and have created a topology from roads. I've also written an algorithm that given any osm_id will find all connected osm_id's to a depth of N. This works by finding all connected osm_ids and then recursing through these until the depth is reached. I could modify this to change N to a distance of five miles. But is there a better way of traversing every possible path in a network? For information, here is my current algorithm which is sub-optimal as it does not deal well with junctions that have more than one connection ** Find connections **               CREATE OR REPLACE FUNCTION ng_research.get_connections(id bigint, table_param character varying)     RETURNS bigint[] AS     $BODY$     DECLARE       ret_vals integer [];     BEGIN     --quite simply given a source node for a line string returns all of the connected nodes including its own target          WITH CTE AS (      SELECT source from ng_research.all_roads WHERE osm_id=id     )           SELECT array_agg(osm_id)  into ret_vals FROM ng_research.all_roads AR,CTE  WHERE  AR.target=CTE.source or AR.source=CTE.source;     RETURN ret_vals;     END;     $BODY$      LANGUAGE plpgsql VOLATILE      ** Build linestring arrays **               CREATE OR REPLACE FUNCTION ng_research.road_string_finder(node bigint, table_param character varying, depth integer default 0, max_depth integer default 2, previous_nodes bigint[] DEFAULT NULL::integer[]) RETURNS bigint[] AS     $BODY$     DECLARE      connected_nodes bigint[];      node_var integer;     BEGIN               IF depth = 0 THEN      DROP TABLE IF EXISTS ng_research.nodes_visited;      CREATE TABLE ng_research.nodes_visited (id bigint);     END IF;          previous_nodes := array_append(previous_nodes, node);          SELECT ng_research.get_connections(node, table_param) INTO connected_nodes;          IF connected_nodes IS NOT NULL THEN      FOREACH node_var IN ARRAY connected_nodes LOOP            IF NOT (node_var = ANY(previous_nodes)) THEN         RAISE NOTICE '% :  %', node_var, previous_nodes;        IF depth < max_depth THEN              IF (SELECT node_var from ng_research.nodes_visited WHERE id=node) IS NULL THEN         SELECT ng_research.road_string_finder(node_var, table_param, depth + 1, max_depth, previous_nodes) INTO previous_nodes;         INSERT  INTO ng_research.nodes_visited (id) VALUES (node_var);        END IF;       END IF;      ELSE      RAISE NOTICE 'SEEN YOU';     END IF;     END LOOP;          END IF;          IF array_length(previous_nodes,1) > 1 THEN           previous_nodes := array_remove(previous_nodes, node);      END IF;      return previous_nodes;      END;     $BODY$     LANGUAGE PLPGSQL;      ** find connections for a single linestring **               SELECT ng_research.road_string_finder(204359430, 'ng_research.all_roads',0,5);


Route optimization for field engineers

I have a set of field engineers, each with a specific expertise and I have to plan a schedule and assign customers based on their nearest reachable address based on customer requirement. Is there an algorithm or any application where i can integrate my existing database and start the route optimization with google, bing maps or any other source ?


How to compute the ls factor equation for USLE model in qgis grass r.mapcalc

To compute the LS factor for the USLE model, the following equation easily works in ArcGIS. How can I perform the same in QGIS under GRASS `r.mapcalc`?               LSfator = Power (("flowaccNW") * resolution/22.1, 0.6) *     Power(Sin("slope_degnw") * 0.01745) / 0.09, 1.3


how to load in_memory data as input for an ARCGIS 10.1 model?

I'm trying to run a model that gets stops from an in_memory workspace and creates a route with directions based on the route, here is what the model looks like: ![enter image description here](http://i.stack.imgur.com/BJqzK.png) **Problem is** that the following error (error 030024: Solve returned a failure) Occurs: ![enter image description here](http://i.stack.imgur.com/OaYTS.png) **AND MY QUESTION::** I understand that the model doesn't recognize the stops I put in the in_memory, but as I couldn't find documentation on how to enter data into the in_memory and use it as model input (all documentation I found was how to use in_memory for the output), could anyone explain how it's done? Thanks in advance. EDIT: I need to make the stops come from in_memory (and not a shp) as the model is supposed to turn into a geoprocessing package (gpk) in which the user will have to input the stops by clicking them on the map.


Adding count of features in categories to legend using ArcGIS for Desktop?

I am using ArcGIS 10.1 for Desktop and I would like to know How to add the Count (which is visible on the Symbology tab of the Layer Properties dialog) to the legend? ![Layer Properties](http://i.stack.imgur.com/wQNRo.jpg)


Coordinate systems and bearings

Ok so I've got a noodle scratcher and want some input before I open my mouth to my higher-ups. I recieved a new boundary description from a surveyor that uses metes and bounds in the form of bearings N XX°XX'XX" W going XX feet and so on. The coordinate system they used was a custom Traverse Mercator projection. However, my state, North Dakota, uses State Plane S Nad83 Int. Feet (a Lambart Conformal Conic projection) as its standard coordinate system; so I believe that all their records would be stored in that system. My question is what, if any, difference will there be in the bearings if it were transformed into the State Plane system? Both systems use the same units, datum, and spheroid. I understand their reasoning for using the custom coordinate system as they shifted the false easting and northing to reduce distortion in the location they preformed the survey and using a perfect square coordinate system without converging lines of longitude make sense at this scale. However, because all the records I see for the state never specify a coordinate system I think it is implied that the state's standard coordinate system is used. I don't want this data on file without the custom coordinate system attached and have someone in the future go out and use the description using the wrong coordinate system. Or is the discrepancy between the two, if any, so miniscule that I'm being needlessly nit-picky?


raster landuse calculation

I want to calculate the counts of each landuse type based on the unique landuse code from each raster datasets. Raster dataset consists of six major landuse and their unique codes are below: 1) Agriculture : Landuse code(2100, 2200, 2300, 2400) 2) Barren Land: Landuse code( 7100,7200,7300,7400, 7500, 7600) 3)Forest: Landuse code(4110, 4120, 4210,4220, 4230, 4311, 4312,4321,4322, 4410) 4)Urban: Landuse code(1110,1120,1130,1140,1150,1200,1211,1214,1300,1400,1410,1411,1420) 5)Water: Landuse code(1419,5100,5190) 6)Wetlands Landuse code (1461,1711,1750,1850) I have the code only for agricultural area to simply test whether the code is working or not for one category of landuse. When I ran the code neither did I get any error message nor the result for agricultural land. I know it's a pretty big description, sorry for that. Thank in advance ! I am providing the code below:                import arcpy, os           from arcpy import env           #To overwrite output           arcpy.env.overwriteOutput = True           #Set environment settings           env.workspace = "C:/Subhasis/Project-06-02-14/Landuse/New folder/Merged/Landuse_raster"           outws="C:/Subhasis/Project-06-02-14/Landuse/New folder/Merged/Landuse_raster/Table"           inraster = arcpy.ListRasters("*", "GRID")           for i in inraster:               flds = ("VALUE", "COUNT")                 dct = {row[0]:row[1] for row in arcpy.da.SearchCursor(i, flds)}               Agriculture=[]               Barrenland=[]               Forest=[]               Urban=[]               Water=[]               Wetland=[]               for j in dct:                   if (dct.keys()==2100) or (dct.keys()==2200) or (dct.keys()==2300) or (dct.keys()==2400):                       Agriculture.append(dct.values())                       print Agriculture                   else:                       break


How to SUM the fields selected in aqlistwidget using PyQgis?

I'm beginner user of PyQGIS and I'm trying to write my first plugin(API 2.0). In my ui file I created a qcombobox to select a layer, and a qlistwidget to select one or more than one fields (x,y,..). I would like to create one button that's create a new object z would be represent the "sum of selected fields values" z=x+y Thanks for your help. Best regards. Aline


Recommended specs for a single-country OSM tile server

What specs would you recommend for an OSM tile server dedicated to serving tiles for a single, small country (e.g., Portugal only)? Total server load is estimated to be no more than two/three users accessing tiles at the same time.


How to calculate an expression for a field using PyQgis?

I'm beginner user of PyQGIS. I would like to create one button to calculate one expression for example the relative frequencies for each field. How can i do it? Thanks for your help. Best regards. Aline


How to integrate Proj4 into an iOS / iPhone project?

This may be overkill, but I need to **reproject a point** coming from the CLLocationManager, which is in EPSG:4326, to Dutch RD (Double Stereographic, EPSG:28992) in my iOS application and I am using **Proj4** to do it. At least that's what I set out to do. Here's what I tried:   * I grabbed a Proj4 Xcode project from route-me and added it to my Xcode project.    * I added a dependency on Proj4 to my build target. (Target -> Properties -> General -> Direct Dependencies -> + (add)   * I added the path to the Proj4 project directory to my Library search paths. (Target -> Properties -> Build -> Library Search Paths)   * I added the path to the Proj4 project directory to my Header search paths. (Target -> Properties -> Build -> Header Search Paths)   * I added a reference to Proj4 (-lProj4) to my linker flags (Target -> Properties -> Build -> Other Linker Flags) But I still get a linker error when compiling: `ld: library not found for -lProj4` What am I missing here?


MakeXYEventLayer_management not creating final file?

I'm using python to generate x and y coordinates for the start and end of lines in Arc. I have successfully done this part but when I try and generate the nodes I have no idea where the output file ends up or if it even exists. I get no errors when running the script but I just don't get an output points layer at all. I've tried defining the workspace and also tried not including this line. When I run the Make XY Event Layer from the toolbox it works fine. Can somebody help me with where I'm going wrong!? ![enter image description here](http://i.stack.imgur.com/0mazO.png)


Accuracy vs Precision GPS

I am doing some research on consumer grade GPS accuracy and precision. I took 5 readings for 20 known locations (100 readings). Am I correct in assuming that the standard deviation between the 5 readings at each location would indicate precision, whereas the average distance from the five points to its known location would indicate accuracy?


How to remove border and legend of 1:50 000 rasterfile in QGIS?

How does one remove the border and legend of a 1:50 000 map? Want to combine several maps to form one.


What is the projection of an Android Location class instance?

What is the projection of a Location object returned from the LocationClient by a class implementing the LocationListener interface with a fused provider in the Google Play Services SDK? For example, if I performed the following, 1)               Location mLocation = mLocationClient.getLastLocation();     double mLongitude  = mLocation.getLongitude();     double mLatitude   = mLocation.getLatitude();      2) converted those values to String objects, 3) performed I/O to a file/network/database, 4) converted or outputted them to a `.csv` file of the form,               Longitude,Latitude     -85.26418009999999,35.1050902      5) and then finally imported this file into QGIS, **what projection would I choose**?


Table to Table script fails when copying to SDE

Since TBL2SDE no longer exists (we're running a 64-bit server and ArcGIS 10 doesn't include that executable on a 64-bit installation) I've been using the Table to Table script in ArcToolbox to copy some Info and DBF tables to SqlServer. This has been working fine but I ran into a problem today where it simply does not allow me to copy any tables. When I run the command, it returns:               ERROR 999999: Error executing function.     Item with the same path name already exists.     DBMS table not found [Microsoft SQL Server Native Client 10.0: Invalid object name 'gismo.RFCGIS.aocondo'.] [gismo.RFCGIS.aocondo][STATE_ID = 19653]     DBMS table not found [Microsoft SQL Server Native Client 10.0: Invalid object name 'gismo.RFCGIS.aocondo'.] [gismo.RFCGIS.aocondo][STATE_ID = 19653]     Failed to execute (TableToTable).      I use `sdetable -o delete` to remove the tables and that, too, has been working fine, so I don't think there's a problem with SDE. I've also checked to see if there are any remnants of the table names in sde_table_registry, sde_layers, sde_column_registry, and even gdb_items (though the tables should not have been registered with the GDB). I also checked against various owners (dbo, rfcgis, and sde) to see if it was a problem with the file existing but owned by a different user and that's not it either. Oh, and it does work when copying from DBF to DBF, so it's not contention on the source file. I've run out of ideas and hope someone can suggest another direction to take with this.


Algorithm to calculate coverage + overlaps from a set of arcs

I have a shapefile containing arcs representing the path travelled by a truck spreading fertiliser onto a farm. Let's say I know the spread width is 30m, i.e. the truck can spread fertiliser 15m either side of the vehicle. I want to generate a set of polygons, which show:   1) The total area that received fertiliser   2) The areas of overlap, i.e. where two separate passes were too close together, such that some parts of the farm received twice the correct "dose" of fertiliser. A naive approach is to just create the coverage polygons as buffers around the arcs. This works in the special case where the spread lines are distinct from each other. However, the truck could conceivably travel around the farm in an ever-decreasing spiral, and a simple buffer would fail to show overlaps where two passes of the spiral were too close together (if the spiral is a single arc, I would end up with a single polygon with no overlapping parts). If it's relevant, I'm using the TatukGIS VCL DK, but I'm really looking for an algorithm rather than a specific solution. Some clarifications in response to the discussion so far: 1) I can't rely on the vector data having any particular metadata (e.g. GPS logs or spread rate). I allow the user to choose a layer and specify a spread width, then the report runs. 2) The purpose of the report is really to show the user how "skilled" the vehicle operator was, where "skilled" means "achieved the highest coverage with the lowest overlap". 3) I'm more comfortable in vector land than raster land, so will prefer vector-based solutions. Thanks, Darren.


Null values in plugin data source

How do you appropriately setup a plugin data source to allow for null values (in .NET - C# preferred)? I'm currently setting up a field using:               field.Type_2 = esriFieldType.esriFieldTypeSingle;     field.IsNullable_2 = true;     field.Name_2 = "Foo";      Then, later, during the cursor's QueryValues call, I'm trying to set a null value via:               // Given: public int QueryValues(IRowBuffer row)     row.Value[i] = null;      However, the value always maps through as 0, not null. How do you properly setup the data source in a plugin data source to allow for a null value?


How to recode field values based on field contents?

Is there a convenient (or even effective) method for recoding field values using the field calculator or standalone python script? In this case, I am given several unique strings to identify a type of road feature. For the purpose of creating a unique ID-based join field, I want to give each road type a number to act as its equivalent when matching and classifying. I would like to avoid using cursors, as I have been told that cursors are inefficient for large data processing (in this case, the table is a few million records). However, if necessary, it will be better than the alternative of doing it by hand. Perhaps there is a way to create a dictionary at runtime, establishing a field value and its numerical code by sequential steps when processed? For example, creating a key-value pair for a value the first time it is encountered in the dataset being processed? I apologize if this is a duplicate question, but I was unable to find anything even remotely similar via search or the ESRI forums. For example: Say we have a shapefile of road line links called "Roads" with attributes "Type" and "TypeCode". If there are 3 types "Foo", "Bar", and "Other", I would like the calculation to assign the number 1 to whichever type it encounters first, and fill "TypeCode" with 1 for each successive row that contains the same type. It would do the same for the other two types, assigning 2 and 3 based on order encountered and fill the "TypeCode" for the appropriate rows. In an attempt to make things more clear, another way of explaining what I'm looking for: With a table of polyline road links, we have two fields, STYLE and STYLE_CODE:   `\------------[STYLE]----------[STYLE_CODE]   Feature 1 -- [4WD]----------------[]   Feature 2 -- [DIVIDED]------------[]   Feature 3 -- [HIGH CLEAR]---------[]   Feature 4 -- [4WD]----------------[] ` The point is to have the hash table created after being given a set of data. In this case, the script would see Feature 1's Style as the first ocurrence of the Style and assign it an arbitrary unique value (Let's say the value is 1). Feature 2's Style would also be the first occurence, so the script assigns it the value 2. Feature 3's Style gets the value 3. When Feature 4 is iterated, the script already has a value set for the key 4WD, so it assigns a 1 to the STYLE_CODE field again. This continues until the end of the table. Result:   `\------------[STYLE]----------[STYLE_CODE]   Feature 1 -- [4WD]----------------[1]   Feature 2 -- [DIVIDED]------------[2]   Feature 3 -- [HIGH CLEAR]---------[3]   Feature 4 -- [4WD]----------------[1] ` I'd like to create a ubiquitous script that processes a table in this fashion. Sure, I only have to make the hash table once per product if I do it by hand, but making it for every product will eat up too much time. Thank you in advance. Nathan


How would I group values in a field based on range of number using python, and then update the attribute table?

An example of what I'm trying to accomplish is described below, however they don't describe how to use the data update cursor to update the attribute column. data - Group values based on range of number in python - Stack Overflow http://stackoverflow.com/questions/20437394/group-values-based-on-range-of- number-in-python               fc = r'C:\Users\Test.gdb\Test1a'     print "fc set"     class_field = "Numbers"     name_field = "GroupedID2"     lst = sorted(arcpy.da.SearchCursor(fc, [class_field,name_field]))     class Delta:         def __init__(self, delta):             self.last = None             self.delta = delta             self.key = 1         def __call__(self, value):             if self.last is not None and abs(self.last - value[0]) > self.delta:                 # Compare with the last value (`self.last`)                 # If difference is larger than 2.5, advance to next project                 self.key += 1             self.last = value[0]  # Remeber the last value.             return self.key          import itertools     for key, grp in itertools.groupby(lst, key=Delta(2.5)):         for tup in grp:             print(tup + ('project{}'.format(key),))     with arcpy.da.UpdateCursor(fc, "GroupedID2") as cursor:         for row in cursor:             cursor.updateRow(row)             print (row[0])      The trouble that I have is that no matter where I place the update cursor, I can't get it to record each row correctly. It will make the entire attribute the last project number or the first project number instead of rows 1-3 project1, 4-6 project2, and 7-8 project3. This is what the code prints. The feature class remains project 1 but it isn't updated to include the correct project number from the 3rd column.               2014-07-16 07:26:59.135000     fc set     (1279015.0, u'project1', 'project1')     (1279017.5, u'project1', 'project1')     (1279020.0, u'project1', 'project1')     (1279022.5, u'project1', 'project1')     (1279027.5, u'project1', 'project2')     (1279030.0, u'project1', 'project2')     (1279032.5, u'project1', 'project2')     (1279037.5, u'project1', 'project3')     (1279040.0, u'project1', 'project3')     (1279042.5, u'project1', 'project3')      when I alter the code to read this:               import itertools     for key, grp in itertools.groupby(lst, key=Delta(2.5)):         for tup in grp:             print(tup + ('project{}'.format(key),))             test = ('project{}'.format(key))             with arcpy.da.UpdateCursor(fc, "GroupedID2") as cursor:                 for row in cursor:                     test = row[0]                     cursor.updateRow(row)                     print (row[0])     print(datetime.now()-startTime)      It still keeps it as project 1.


Which type of File Geodatabase format to use?

What is the practical difference between fgdb API format and fdgb ArcObjects in FME? When to use each of them in FME? Thank you.


d.rast.edit error when attempting to edit a raster

I always get an error when I try to edit cell values in a raster with the GrassGIS command „d.rast.edit“. The error under Windows XP/GrassGIS 6.4.3 says:               Exception in thread Thread-29:     Traceback (most recent call last):       File "D:\OSGeo4W\apps\Python27\lib\threading.py", line     552, in __bootstrap_inner         self.run()       File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co     re\gcmd.py", line 538, in run         os.pathsep + env['PATH']     TypeError: 'NoneType' object is not subscriptable     Traceback (most recent call last):       File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\gu     i_core\forms.py", line 657, in OnRun          gcmd.Command(cmd)       File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co     re\gcmd.py", line 389, in __init__          _("Error: ") + self.__GetError()))     core.gcmd     .     GException     Exception in thread Thread-30:     Traceback (most recent call last):       File "D:\OSGeo4W\apps\Python27\lib\threading.py", line     552, in __bootstrap_inner         self.run()       File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co     re\gcmd.py", line 538, in run         os.pathsep + env['PATH']     TypeError: 'NoneType' object is not subscriptable     Traceback (most recent call last):       File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\gu     i_core\forms.py", line 657, in OnRun          gcmd.Command(cmd)       File "D:\OSGeo4W\apps\grass\grass-6.4.3RC1\etc\wxpython\co     re\gcmd.py", line 389, in __init__          _("Error: ") + self.__GetError()))     core.gcmd     .     GException      … and under openSUSE 11 SP2/ Grass GIS 6.4.2:               Traceback (most recent call last):       File "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/menu     form.py", line 662, in OnRun          gcmd.Command(cmd)       File     "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/gcmd.py",     line 350, in __init__          _("Error: ") + self.__GetError()))     gui_modules.gcmd     .     GException     :     Execution failed: 'd.rast.edit --overwrite --verbose     input=DEM_m_float_polypoi@PERMANENT output=123456'     Details:     Error:     Traceback (most recent call last):       File "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/menu     form.py", line 662, in OnRun          gcmd.Command(cmd)       File     "/usr/local/grass-6.4.2/etc/wxpython/gui_modules/gcmd.py",     line 350, in __init__          _("Error: ") + self.__GetError()))     gui_modules.gcmd     .     GException     :     Execution failed: 'd.rast.edit --overwrite --verbose     input=DEM_m_float_polypoi@PERMANENT output=123456'     Details:     Error:      Does anyone have an idea about the reason why I'm getting this error and/or how to avoid it ?


Why does Geoserver not serve my primary key/ id?

I have a postgres/postgis table with the columns:   * gid [PK] serial NOT NULL,   * geom geometry(MultiPolygon,900913),   * crop text My layer in Geoserver however only shows me the feature types "geom" and "crop", the "gid" is not listed. Problem is, I need the gid to update data of a particular (the selected) polygon. Is there a way to get the gid? If not, how do you bypass this problem?


ArcGIS 10.1 MakeTableView doesn't filter records

I'm running ArcGIS10.1 on Win7 64bit with Oracle 11g and I'm having trouble with database table connections in Oracle. In Modelbuilder I use the MakeTableView tool and apply a filter expression so that I only get the 5 records I want from a table. When I run the CopyRows tool after that, I get all 150,000 records copied over. Arcpy does the same. When running the same procedure on another machine with Arc10.0 it works fine and I get only the 5 records... Any ideas what the problem might be? Thanks, Frank


Metadata in ArcExplorer

Is it possible to access feature class' metadata in ArcGIS Explorer? I noticed the ArcGIS Idea but not sure if it has been implemented..


How can I pan an ArcGIS map from an external application?

I have a web application with geocoded addresses. I would like to be able to click on an address within that application, and have ArcMap 10 respond by panning the map to the corresponding location. Is there some sort of API or Python script that could accomplish this task? I imagine my application would work similarly to Skype, and have a link to an address like: `arcgis://46.52,-84.46` where `arcgis` is the application, and `46.52,-84.46` are the coordinates to pan to. I may be reaching pretty far here, but perhaps someone has tried to do this before.


Join two lines in one line

I have an array of Lines and I am using it to draw vectors in my map. I want to replace two superposed Lines (or have short distance between them) with one Line. Here is a picture that helps you to understand this problem: The Input Lines : ![The input Lines ](http://i.stack.imgur.com/ApvND.jpg) The Output ![Output](http://i.stack.imgur.com/drpuR.jpg) PS: A Line is an ArrayList of points.


We have a SDE set up on a SQL Server and we're using the Silverlight API. Our layer has buildings on it. The flare clustering and large clusters show when the map is opened and the actual buildings show when we zoom in. I want to change the settings that control when the clustering starts and stops. Where are the settings that control when clustering starts and stops? Thanks!


How to add a "loading" image is ESRI JSAPI AMD

Does anyone have an example of how to display a "loading" image in the new AMD environment of ESRI's JSAPI? Familiar with doing it in the past, just seems there's quite a lack of documentation. Thanks.


How to export labels to DXF file?

Is it possible to export labels based on Shapefile attributes into a DXF file? I use Quantum gis in Version 1.7.4. I've been reading a CSV file and view it as a Shape Layer. With the help of attributes from the File I will label the points. Now I want a DXF export with the labels. However, only the Points in the DXF file Export. I do not have ArcGIS. I am using AutoCAD LT 2011 for viewing DXF files. In AutoCAD I have to go through the "Insert / Link & extraction" under only the possibility to find data from Excel.


Export data driven pages only in changed mxd, with arcpy script

I have an arcpy script below to export a map book to pdf. The index layer are forty acre boundaries (township and range quarter sections). The data in the mxd is on an oracle database and updated nightly.   I want to use task manager to run the script nightly but I would like to add code so that only mxd's with edits/changes to the data in its geographic extent from the previous days version will export.   The reason for this is there are approximately 12,000 of these boundaries and it takes about 21 hours to run. I am hoping to dramatically reduce that. Here is the code:               import arcpy     arcpy.env.overwriteOutput = True     mxd = arcpy.mapping.MapDocument(r"C:\SamplePath\SampleMXD.mxd")     for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):       mxd.dataDrivenPages.currentPageID = pageNum       pageName = mxd.dataDrivenPages.pageRow.FORTYAC       arcpy.mapping.ExportToPDF(mxd, r"C:\SamplePath\SampleFileName_" + str(pageName) + ".pdf")     del mxd      Any suggestions are much appreciated!


OpenLayers and WFS: Using a mapfile correctly with featureType and featureNS

For starters, I went off the example at http://openlayers.org/dev/examples/wfs-reprojection.js and got that working just fine with the states vector layer showing up. Now I'm trying to use my own mapfile (wfs_navdata_02.map) and do the same. Just one layer for now, cities_1x.               var wfs = new OpenLayers.Layer.Vector("My Layer", {                 strategies: [new OpenLayers.Strategy.Fixed()],                 protocol: new OpenLayers.Protocol.WFS({                     version: "1.1.0",                     srsName: "EPSG:4326",                     url:  "http://my_local_url/cgi-bin/mapserv.exe?map=/file_location/wfs_navdata_02.map",                     featureType: "cities_1x",                     featurePrefix: "",                     featureNS: "http://yourdomain/application/catalogLayer"                 }),         });         map.addLayer(wfs);      What do I put in for `featureNS`? For the url, is referencing the mapfile like that ok? I read one poster that said he needed to use `featurePrefix` but I don't think thats necessary here. Also for `featureType`, is that the name of the `LAYER` or the `wms_title` within the layer? I've successfully used WMS before but WFS is a bit more confusing. I am not having any errors in the javascript console via Chrome. Snippet of mapfile can be seen here: http://codeshare.io/C1hki Not sure if `OUTPUTFORMAT` is necessary. Any input is appreciated.


One Layer in Two Maps with Esri JS API

Is it possible to put a single `FeatureLayer` in multiple maps in the same app with the Esri JS API? I have two maps that I want to contain the same layer and I want the maps both to honor and changes to that layer. For example, if there is a selection on the layer in one map, it should honor that selection in the second map. Is this possible?


How to set up account and start using Collector for ArcGIS?

I'm working on a presentation topic around mobile-based data collection solutions. I've used ODK and Fulcrum in production and absolutely love them. However, I'm going to be presenting to an ESRI crowd so I want to at least add Collector for ArcGIS to the pool of candidates for comparison. That said... How the heck do you get this working??? It's a bit ridiculous how much trouble it is to "test" this product out. I've had a ESRI global account now for about 10 years... I can't use that ArcGIS.com account in collector because it is not an "organizational account" (which I don't understand because it is the login tied to our corporate licenses). I created a new account using the "30-day Free Trial" found here... http://www.esri.com/software/arcgis/arcgisonline. I create a new map, added editable layer to the map, saved the map, shared the map publicly, and to a fake group I made, I even added a dummy email (user account) as a member of the group/organization, and yet when I go into Collector and login with either my admin email, or the dummy email, no maps show to be available? I've been poking around online and within the ESRI forums this morning for about 3 hours trying to troubleshoot the issue. My first thought was that I couldn't use Collector with a "trial" AGO account, but most everything I read from ESRI reps stated otherwise. Perhaps that has changed? Anyway, If anyone has any insight to provide on this issue it would be greatly appreciated. Otherwise, I'll close the door (for now) on Collector and stick with other solutions.


Conflation integration in geoserver

I have a task at hand to provide conflation functionality in our software. We are using JTS for other WPS operations. Open source JCS library is available but we need it as a WPS service integrated in GeoServer. I found that GeoServer has support for JTS, but couldn't find if it has support for JCS by default in latest version (I am using GeoServer 2.2.3). In case it doesn't is it possible to add JCS into GeoServer? I found that a new **WPS process can be added to GeoServer** , on similar lines I added the jcs jar (jcs-1.0.1.jar) to WEB-INF/lib in GeoServer and started my jboss instance which is hosting it. However, after restarting jboss, the WPS GetCapabilities is not listing jcs processes. I am sure i am missing something here but don't know where. I have the JCS opensource code; will it have to be modified to make it compatible with hosting in GeoServer as in the link above or is there a way where GeoServer WPS can upload an api and host it? I am new to GIS specially these GIS protocols part but trying to connect the loose ends.


Convert long/lat to indian grid system

how to convert lat/long coordinates to Indian Grid system? I've googled for a couple of days but didnt find the exact algorithm for this. and i got a link Indian Grid System. but i didnt get a picture how the zones(there are 9 zones) are divided among india and how to convert the coordinates? Thanks in advance


Rewrite query to match two points with a linestring in a different database table

OK, not sure if I've worded the title brilliantly, but here goes: Suppose I have:   * a table "gps_nodes" containing columns:     *     * "EASTING" (containing longitude data)     *     * "NORTHING" (containing latitude data)     *     * "geom_point" (containing POINT geometry data, calculated from EASTING & NORTHING columns).     * a table "linestrings" containing a "geom_line" column (containing LINESTRING geometry data, each linestring contains only 2 points). Given a new long/lat position (eg -1.911782 53.26144), I need to select a point position from the "gps_nodes" table, where a linestring created between these two positions does NOT already exist in the "linestrings" table. Something like this:               SELECT *     FROM gps_nodes      WHERE     (SELECT count(*) FROM linestrings       WHERE ST_equals(geom_line, ST_GeomFromText('LINESTRING(gps_nodes.EASTING gps_nodes.NORTHING, -1.911782 53.26144)'))     ) = 0     LIMIT 1      But the problem seems to be that I can't reference the row from the gps_nodes table in the WHERE subquery, as I think that subquery gets executed first, before the SELECT. (Note that there may be minor syntax errors in that query example, as I've just quickly written it here to demonstrate the general issue) How could I rewrite this query to get the data I need ? Many thanks !


How do GPS/Glonass/Galileo satellite know their position?

We use satellites to calculate our position. How do satellites know their position if it is right or wrong ? I have heard that the base station records and corrects the satellite path but how do they know what is right path what is wrong path ?


How can I change the priority for MapService Process?

I've got an asynch GP service that exports mxds to pdfs. Typically the mxd contains mapservice layers. The same MapServices are also used by interactive clients where draw speed is important. Drawspeed is not that important for the GP service though. When the GP service does an export there is a noticeable spike in CPU usage on the machine hosting the MapServices. I would like to reduce the impact on the CPU posed by this GP service which is hosted on a different machine. To do that I'm considering creating some new MapServices specifically for use by the GP service. I'd like for them to serve the same mxd/msd's but run at a lower priority. Is there a way to configure this? If not, would setting Process.PriorityClass to BelowNormal with a Server Object Extension (SOE) when IServerObjectExtension.Init gets called have any ill side effects?


How to convert two line to polygon

> **Possible Duplicate:**   >  Lines to Polygons Hi all, this is first my Q, so can any one help me, how to convert two line to one polygon feature, thank you.