Could not create tool plugin with ptype: gxp_zoomtolay

I am new in OpenGeo Suite Library and SDK client. I am following the tutorial for the tools: http://suite.opengeo.org/opengeo-docs/webapps/sdkintro/viewer/featureinfo.html http://suite.opengeo.org/opengeo- docs/webapps/sdkintro/viewer/zoomtolayerextent.html But I get this error when I try to refresh my application: > Error: Could not create tool plugin with ptype: gxp_wmsgetfeatureinfo > src/ext/ext-all.js Line 7 My code is not long as I just started the tutorial and I havent modified much.   What I am doing wrong. Thanks in advance for your guidance.               /**      * Add all your dependencies here.      *      * @require widgets/Viewer.js      * @require plugins/LayerTree.js      * @require plugins/OLSource.js      * @require plugins/OSMSource.js      * @require plugins/WMSCSource.js      * @require plugins/ZoomToExtent.js      * @require plugins/NavigationHistory.js      * @require plugins/Zoom.js      * @require plugins/AddLayers.js      * @require plugins/RemoveLayer.js      * @require RowExpander.js       * @require overrides/override-ext-ajax.js      * @require plugins/ZoomToLayerExtent.js      * @require plugins/WMSGetFeatureInfo.js      **/          var app = new gxp.Viewer({         proxy: "<PROXY_URL>",         portalConfig: {             layout: "border",             region: "center",                     // by configuring items here, we don't need to configure portalItems             // and save a wrapping container             items: [{                 id: "centerpanel",                 xtype: "panel",                 layout: "fit",                 region: "center",                 border: false,                 items: ["mymap"]             }, {                 id: "westpanel",                 xtype: "container",                 layout: "fit",                 region: "west",                 width: 200             }],             bbar: {id: "mybbar"}         },              // configuration of all tool plugins for this application         tools: [{             ptype: "gxp_layertree",             outputConfig: {                 id: "tree",                 border: true,                 tbar: [] // we will add buttons to "tree.bbar" later             },             outputTarget: "westpanel"         }, {             ptype: "gxp_addlayers",             actionTarget: "tree.tbar"         }, {             ptype: "gxp_removelayer",             actionTarget: ["tree.tbar", "tree.contextMenu"]         }, {             ptype: "gxp_zoomtoextent",             actionTarget: "map.tbar"         }, {             ptype: "gxp_zoom",             actionTarget: "map.tbar"         }, {             ptype: "gxp_navigationhistory",             actionTarget: "map.tbar"         },{             ptype: "gxp_wmsgetfeatureinfo",             outputConfig: {             width: 400             },             actionTarget: {                 target: "map.tbar",                 index: 1             }          },{             ptype: "gxp_zoomtolayerextent",             actionTarget: ["tree.tbar", "tree.contextMenu"]         }],              // layer sources         sources: {             local: {                 ptype: "gxp_wmscsource",                 url: "/geoserver/wms",                 version: "1.1.1"             },             osm: {             ptype: "gxp_osmsource"             }         },              // map and layers         map: {             id: "mymap", // id needed to reference map in portalConfig above             title: "Map",             projection: "EPSG:900913",             center: [-10764594.758211, 4523072.3184791],             zoom: 3,             layers: [{                 source: "osm",                 name: "mapnik",                 group: "background"             }, {                 source: "local",                 name: "usa:states",                 selected: true             }],             items: [{                 xtype: "gx_zoomslider",                 vertical: true,                 height: 100             }]         }           });


Getting a final count of integrated points from map [Add XY, Merge, Integrate]

I'm trying to get a final count of points in my data, using ArcGIS for Desktop, 10.1 with an advanced license. The data I'm working with is about 2,000 addresses from 10 sets of data taken by various organizations at various times with various methods. I decided to geolocate all the addresses and integrate duplicates inside GIS to achieve a count of how many sites actually exist today, without duplicates. Here's what I've done so far:   1. Pulled 10 sets of data into my GIS. Then added XY data for any points that didn't have them   2. Merged all the points data into one master XY file.    3. Then, I used Integrate to merge points that were within a certain XY tolerance together, getting rid of duplicates.  That part went fine. Now, where I need your help is in figuring out how to get a count of all the points I'm left with after the integrate function goes through. Integrate seems to be changing the look of the map, but not the actual attributes table itself? Even if I use Integrate at an XY tolerance of 1000ft, the attributes table still shows the 2,000 entries, though the map changes dramatically. Is there a better way to pursue this? I'm not sure of a way to count the points I am left with after the Integrate process. Thanks in advance.


Geoserver is not running on port :8080 on Windows 7

After Installing geoserver on my windows machine, then I restarted tomcat but it doesn't start. Before installing the geoserver localhost:8080 is working. whats wrong ? Any help would be appreciated ?


How to add Checkboxes in Geoserver

I have a POI table with some data of categories like Airport,ATM,Bank etc. I want to show these categories as checkbox so that if I click in the ATM Checkbox, only the ATM Points will be display. Is there any option in Geoserver? Regards, Sreesha


GetCapabilities Request for WMS

I'm trying to connect to a WebMapServer with the Geotools WMS classes. My problem is, that the resonse-object "capabilities" doesn't contain all layers. When I'm doing the request in a browser, I can see all layers.               URL url = null;           try {             url = new URL("http://www.test.de/wms?service=wms&version=1.1.1&request=GetCapabilities");           } catch (MalformedURLException e) {           }                WebMapServer wms = null;           try {             wms = new WebMapServer(url);           }     catch(Exception e){}          WMSCapabilities capabilities = wms.getCapabilities();                Layer[] layers = WMSUtils.getNamedLayers(capabilities);                List<Layer> alle = capabilities.getLayerList();      The GetCapabilities.xml is (part of the document):               <?xml version="1.0" encoding="UTF-8"?>     <WMT_MS_Capabilities version="1.1.1">     <Service>         <Name>OGC:WMS</Name>         <Title>Titel</Title>         <Abstract>  abstract.</Abstract>         <KeywordList>             <Keyword>WMS</Keyword>         </KeywordList>          <Layer queryable="0" opaque="0" noSubsets="0">             <Title>Rasterdaten</Title>             <Name>Rasterdaten</Name>             <SRS>EPSG:31467</SRS>             <BoundingBox SRS="EPSG:31467" minx="3340000" miny="5230000" maxx="3615000" maxy="5550000"/>             <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>             <Layer queryable="0">                 <Name>DOP_RGB</Name>                 <Title>DOP_RGB</Title>                 <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>             </Layer>         </Layer>               <Layer>             <Name>Touristik</Name>             <Title>Touristik</Title>             <SRS>epsg:31467</SRS>             <BoundingBox SRS="EPSG:31467" minx="3340000" miny="5230000" maxx="3615000" maxy="5550000"/><LatLonBoundingBox minx="7.33273" miny="47.4683" maxx="10.6673" maxy="49.8177" />             <Layer>               <Name>Radwege</Name>               <Title>Radwege</Title>               <SRS>EPSG:31467</SRS>               <BoundingBox SRS="EPSG:31467" minx="3340000" miny="5230000" maxx="3615000" maxy="5550000"/><LatLonBoundingBox minx="7.33273" miny="47.4683" maxx="10.6673" maxy="49.8177" />                       <Layer queryable="0">                        <Name>DTK50-grl</Name>                        <Title>DTK50-grl</Title>                        <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>                       </Layer>              </Layer>              <Layer queryable="0" opaque="0" noSubsets="0">                 <Title>Thematische Linien</Title>                 <Name>Thematische Linien</Name>                 <SRS>EPSG:31467</SRS>                 <BoundingBox SRS="EPSG:31467" minx="3340000" miny="5230000" maxx="3615000" maxy="5550000"/>                       <Layer queryable="0">                         <Name>DTK50-gll</Name>                         <Title>DTK50-gll</Title>                         <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>                       </Layer>                       <Layer queryable="0">                         <Name>DTK50-bll</Name>                         <Title>DTK50-bll</Title>                         <LatLonBoundingBox minx="7.60" miny="47.40" maxx="10.00" maxy="50.00"/>                       </Layer>                     </Layer>                 </Layer>     </Capability>      The node "Rasterdaten" isn't shown in the capabilities-object. Does anybody know, why?? Thanks for helping.


How to prevent Qgis clipper to clamp nodata values?

I'm trying to crop some old georeferenced cartography in order to have a continuous map (every map has its blank borders that overlaps).   Usign raster->extract->clipper and setting no value to -32768 as the original maps, I got the same message:               for band 1, destination nodata value has been clamped to 0, the original value being out of range.      the problem is all the blacks in the map are translated to nodata. If I set no data value to something greater than 255, it clamps to 255 and all the whites are hidden. Is there a way to fix that?   the commandline is like that:               gdalwarp -dstnodata -32768 -q -cutline "borders.shp" -crop_to_cutline -of GTiff "source.tif" "destination.tif"


How to get started with mapping the flow of natural gas using GIS?

I'd like to get involved with GIS, im a marine engineer and clueless about it and although i've tried to research it, I'm overwhelmed by the amount of programs available & information. I wanted to do a personal project, what i have in mind is try to map the flow of Natural Gas. So how should i go about it to complete my project? I need a free program to start? Which one would you suggest? and does it have forums / documentation support? (I'm alone on this, so the easier i can get info/answers the better). I'd rather get a local program ie. not web based. I run windows7. As I understand it i need also: a) a world map with countries? b) some import/export data which i think i've found. c) What else would I need to do the analysis from the program pov? d) some analysis tool to get the flows? is that included in the program or must i find an addon or something like this? My future targets include finding/plotting sea routes & also pipelines, would the suggested program be capable of doing that? would it automatically be able to plot the sea routes? Thanks edit1: sorry if i wasnt clear but what im asking what free gis program can do all of the above? is there a step by step guide to learn? edit2: As Suggested from the posts QGIS is a starting point & read its manual with a goal to do networks analysis. ArcGIS is the industry standard and when i have enough money i should consider it... getting a book as well would help. Longterm doing python programming or something. thnx all :)


Tell Google Maps to hide left panel?

I found that just using the "ll" and "z" parameters are enough to zoom in on an area, but I didn't find how/if Google can be told to hide the left panel ("Get Directions", "My Places", etc.) so that users see a full map when visiting a URL: http://maps.google.com/maps?ll=54.868705,-1.593018&z=9 Is there a way? Thank you.


Ogr2Ogr doesn't work with QGIS 1.8

I'm trying to use `Ogr2Ogr.exe` to import some shapefiles. It came installed with QGIS 1.8. When I try and run it, i get the following error:               C:\Program Files (x86)\Quantum GIS Lisboa\bin>ogr2ogr -overwrite -f MSSQLSpatial "MSSQL:serve...<snip>           ERROR 4: Unable to open EPSG support file gcs.csv.      Try setting the GDAL_DATA environment variable to point to the      directory containing EPSG csv files.      ERROR 6: No translation an empty SRS to PROJ.4 format is known.          C:\Program Files (x86)\Quantum GIS Lisboa\bin>      Can anyone help? It looks like it's an issue with some `PATHS`. I just opened up a normal command prompt, when to that directory (listed above) and ran the command.


How to clip/export multiple selected vector layers in a map to extent of another raster/vector layer in ArcGIS?

Is there a way to clip/export selected vector layers (more than one) in a map to the extent of another raster/vector layer at a time?? in Arcgis or any other software. I am using Arcgis10. I am having many vector layers as shown in figure. I want to clip for example "Australia" region of all vector layers. I can do it each and every layer separately. But I want to clip all layers/few layers in the map to Australia region at a time as a bundle. So-that I can avoid re-work of clipping each layer and save time. ![enter image description here](http://i.stack.imgur.com/PtuTJ.jpg)


Linestring to CartoDB api

I want to add a linestring to a CartoDB API web app for one time use, I have SQL statement being ran at the same time and just want the linestring in the SQL statement to be displayed.


How to install DTclassifier for QGIS?

I want to install a dt-classifier plugin I have downloaded from a web page (http://gis-lab.info/qa/dtclassifier-eng.html). I unzipped it to the qgis plugin directory but it won`t show up in my plugin manager in Q-GIS.What can I do?


Missing field in address locator when geocoding

I'm a newbie to creating address locators, and I'm hoping someone here can help with a problem I'm having. I'm using ArcMap 10.1. I created a US - single house address locator using a shapefile of 911-based addresses. I created the address by right-clicking on my geodatabase in the catalog window ---> New---> Address Locator. When creating the locator, I included information for the House Number, Street Name, and Suffix Type fields. The locator appears to be created correctly, as it is showing in the geodatabase in the catalog window, and I can select the address locator through File-->Add Data-->Geocoding-->Geocode Addresses. After I click on Geocode Addresses and select my address locator, the Geocode Addresses window opens correctly, and I'm able to select my excel table as the Address Table. At that point, though, instead of showing fields for House Number, Street name, and Suffix Type, I'm given only a field/drop-down box for Street. I'd never seen this before, so I tried to geocode my addresses using the concatenated address that contained the Street Number, Street Name, and Suffix Type, which didn't work. I also tried to geocode the addresses using just the Street Name field, which again didn't work (which I expected...). Any ideas as to what might be causing this, or possible fixes?


Mapping reefs in Madagascar using R

I need to project a number of reef sites onto the coastline of southwest Madagascar. I was hoping to use R for this as I find ArcGIS too big and clunky. I need to create a basemap for both the reefs and coastline. Is there anyway to 'trace' an existing map and input the coordinates into R since reef are rarely shown on world maps. How would I do this?


How do I change the data type in attribute table in QGIS

I have county data in which the FIPs (actually State FIPS and County FIPS combined). I have data imported as CSV with the sames FIPS data titled STCounty. However, the shapefile FIPS is listed as a Real and the CSV came in as an Integer and the Join function does not seem to work. The drop boxes are greyed out/empty. So the bigger questions is how do you change the attribute type in a table? I tried to create a new column in the shapefile (county data) and set it to an integer and then multiply the FIPS*1, but got a column full of "NULL". I am new to QGIS and have a lot of experience in MapInfo, so the join concept is not new to me, just the syntax in QGIS.


What's the proper format for WKT linestrings when importing into QGIS?

I'm trying to run the following test CSV through the Delimited Text plugin as WKT data:               oid,Line     1,LINESTRING((45.554194 -122.686101, 45.433001 -122.762632))     2,LINESTRING((45.432505 -122.598327, 45.423743 -122.592932))     3,LINESTRING((45.285959 -122.333998, 45.423743 -122.592932))     4,LINESTRING((45.548994 -122.514218, 45.519204 -122.679675))     5,LINESTRING((45.491189 -122.873493, 45.433001 -122.762632))     6,LINESTRING((45.380535 -122.743911, 45.397011 -122.79874))     7,LINESTRING((45.347019 -122.350363, 45.423743 -122.592932))     8,LINESTRING((45.582386 -122.689115, 45.536485 -122.65859))     9,LINESTRING((45.430841 -122.782667, 45.380535 -122.743911))      All I'm getting for my trouble is this error: The layer file:/// **$PATHTOFILE**?delimiter=%5B,%5D&delimiterType=regexp&wktField=Line is not a valid layer and can not be added to the map I have to be missing something simple here, but I have no idea what it is, and Google hasn't been helpful. I'm using QGIS 1.8.0-Lisboa.


Kml not overlaying onto Google Map

I created a basic dashboard with MVC 4, visual studio 2012, The dashboard displays a Google map. Here is an image of the dashboard: ![enter image description here](http://i.stack.imgur.com/jkXIA.png) My intention is to be able to take this Kml file: ![enter image description here](http://i.stack.imgur.com/4MN1y.jpg) And successfully overlay it, onto the Google map, on the dashboard. I have heard about the 'Geomxl3', the Kml map parser, below is my layout of how i used the Geoxml3: ![enter image description here](http://i.stack.imgur.com/MHzEl.png) However, it built without a problem and the dashboard opened up without a problem, but, there was no kml to be seen,the kml had not been overlayed. Is there a mistake in my script? am i not using the correct method of overlaying kml files onto a a Google map? must i use the Xml schema of my Kml file instead of the kml file itself? any advice would be helpful. Please note: I have the Google Maps Api Javascript V3, I am using MVC4, visual studio 2012, My Kml is stored on a local server.


Resources on using R in QGIS for R users?

This is a very basic question, but I'm having a heck of a time figuring it out because so much of the QGIS documentation is oriented toward use of the GUI. I want to be able to run R scripts in QGIS, but am having trouble finding a resource that will ground me in the relationship between QGIS and R data structures and how to pass structures between the two. A related question (Is it possible to create and run custom R scripts in QGIS 2.0?) directed me to this page: http://www.qgis.org/en/docs/user_manual/processing/3rdParty.html, but the I'm finding the documentation there is coming at things from more of a QGIS-expert direction than what I'm looking for. Any suggestions?


Tips design a good key for HashMap using java

The very basic need for designing a good key is that **we should be able to retrieve the value object back from the map without failure** HashMap Reference says that HashMap is used for storing collection of the data in the form of key and value pairs. HashMap is not a Thread safe collection and need synchronization handled properly, you can also go for other Thread safe Map implementations. My Question is that **How design a good key for HashMap using java** Am running the code in `Net beans7 IDE`


What is the action name in qgsinterface for the deselect feature from all the layer tool?

I want to add the deselect feature from all the layer tool in the toolbar when the qgis user start editing a vector layer. anyone know what is the name of this action in qgis api 1.8?


Given two lat/long/time points I need to extrapolate an entire path along the earth

**Given two points and the times between them, I'd like to draw a line around the earth.**   Everything I've tried led to some crazy lines, due to my inexperience with longitudinal movements. Here is the code I'm using:               $orbx = $actualx - 1;     $orby = $actualy;     $steps = 360;     $fullorbit = "$actualx,$actualy,$elevation";     while ($steps-- > 0) {       $orbx = getDegreesLat($orbx);       $orby = getDegreesLon($orby);       $fullorbit .= " $orby,$orbx,$elevation";       $orbx -= 1;       $orby += 0;     }     $fullorbit .= " $actualx,$actualy,$elevation";      Of course, my line looks perfect as long as I'm translating only latitude, **how can I make this work for both latitude and longitude?**


Query with dimension parameter as a metadata in Mapserver's client

I've read the documentation to use mapserver as a client but I can't see how to query a layer which get a dimension parameter using a metadata value. The only way I found is to add the dimension parameter/value in the connection string this way :               CONNECTION      "http://host?DATE=2014-08-20&"      Can't it be done with metadata? Is it possible to add custom metadata that will be included in the url or mapserver only understand predefined ones?


Is Spatialite Really Slow?

I have a couple of thousand polygons in SpatiaLite. I am trying to do a "touches" query:               select map1.* from map1,map2     where touches(map1."Geometry",map2."Geometry")      and wow, is it SLOW! However, if I ask it to just do it for one parcel in map1, it runs really fast.               select map1.* from map1,map2     where touches(map1."Geometry",map2."Geometry")     and map1."ROWID" = 753      I do expect that the first query will run slower, but it is amazingly slow. It runs very fast in SQLServer, Manifold GIS, and PostGIS. Is Spatialite just really inefficient?


Performing transformation from GHANA GRID to WGS 84 using QGIS?

I have a shapefile which was referenced using Ghana's grid system. I imported it to QGIS and specified WGS 84 but the coordinate bar still displays the Ghana grid values in the coordinate bar. Is there a way to perform coordinate transformation in QGIS?


Trilateration on a Sphere given 2 points and 3 distances

Given the points: A) N 38° 38.000 W 90° 20.000 B) N 38° 39.000 W 90° 21.000 I can calculate the distance between the 2 using a spherical earth model as 7710 feet. Given this segment and 2 other distances, say 4,000 ft and 5,000 ft, how do a find the 2 points that are 4,000 feet from point A and 5,000 feet from point B (thus forming one triangle to the north east and one triangle to the south west. ![map](http://i.imgur.com/ZN54g.jpg) Any help converting coordinate systems if I need to is appreciated as well, and extra credit if you can point me towards a .Net library, c# function or Java function. Thanks!


How to feed data to a Openlayers page

I have a webpage, on which I am running Openlayers to query a WMS server. Now, I want to provide my own data to Openlayers. I do not want to use a WMS server. I have a php script, which will generate tiles in png format, and I want to display them in Openlayers. The reason for not going with WMS is that I have 6 or higher dimensional data, and I will make two dimensional projections thereof, and I want Openlayers to treat this as a map. How do I feed data to openlayers? I asked this question in the IRC, and also looked on the Internet. I didn't find much.


Find Coordinates of Larger Area from Sub-Areas

If I have the sets of coordinates of the borders of some sub-areas is there a way to calculate the overall border of the total area? (The coordinates are 2D Cartesian coordinates.) E.g. if I have the coordinates of the borders of the contiguous areas/states of the US, is there a way to calculate the set of coordinates for the entirety of the contiguous part of the US? Originally I thought the Convex Hull algorithms might be of help here, but they don't seem to be giving the correct result, since they consider the coordinates all independently of the actual inter-area borders.


Converting QGIS Labels to a Polygon Shapefile

I am trying to create an annotation feature from labels and then export this out as a polygon shapefile (the resulting shapefile can then be loaded into ArcGIS online to basically have labels without using feature services from ArcServer). In ArcMap, you can label the features, turn the labels into annotation, and then use the "Feature Mask Outline" GP tool with a mask of "0" to essentially 'mask' the annotation labels into exact polygons of the label text (as a shapefile). I am looking to do the same process described above, but do it in QGIS?? Any thoughts on what tools may accomplish this? Thanks, Eric


How to hand over polygon attribute to new point while digitizing?

My task is to work with bird observation data in an area, that is divided into zones as different polygons (A1, A2, etc.). I have the hand-written lists of observations and want to bring all entries into a database. My idea was to create a point feature somewhere in the corresponding zone for each line, and then enter all data that is provided (Species, number, begin of observation, end of observation, etc ...) with a custom form. I also need to have the polygon ID in the data, which I of course could enter manually, but I would rather prefer to learn how to include it automagically by querying to position of the point over the polygon and extract the polygon ID somehow. As I want to work with a spatialite database, i thought about creating a trigger that queries the polygon the new point is created above and include the ID in my point data. My problem: I have no idea how to start and can't find examples on that. Anyone some ideas? Thanx Bernd ![My areas and some points](http://i.stack.imgur.com/DuMu0.png)


Refresh Legend when a layer in TOC is checked/unchecked

I am using V3.5 of ArcGIS Javascript API. My web application has a legend dijit and nliu's TOC widget. The legend updates whenever the map extent changes. However in the TOC, when a layer is checked/unchecked the legend does not refresh until the map extent changes. I am a newbie and I tried to use this.legend.refresh() method from TOC.js however it says this.legend is undefined. So I am not sure how to refresh the legend. Any pointers would be of great help! Thanks Here's the code snippet when a checkbox is clicked/unclicked on a layer in TOC widget. I am trying to see if I can refresh the legend but this.legend is null.               _onClick: function (evt) {         console.log("I am inside checkbox click");         var t = evt.target;         if (t == this.checkNode || dijit.getEnclosingWidget(t) == this.checkNode) {              if (this.serviceLayer) {             this.serviceLayer.visible = this.checkNode && this.checkNode.checked;           // if a sublayer is checked on, force it's group layer to be on.               if (this.serviceLayer._parentLayerInfo && !this.serviceLayer._parentLayerInfo.visible) {             this.serviceLayer._parentLayerInfo.visible = true;             }           // if a layer is on, it's service must be on.           if (this.serviceLayer.visible && !this.rootLayer.visible) {             this.rootLayer.show();           }           if (this.serviceLayer._subLayerInfos) {             // this is a group layer;             dojo.forEach(this.serviceLayer._subLayerInfos, function(info){               info.visible = this.serviceLayer.visible;             }, this);           }           /* 2013-07-23: do not deal with checkbox legend any more.*/           this.rootLayer.setVisibleLayers(this._getVisibleLayers(), true);           this.rootLayerTOC._refreshLayer();         } else if (this.rootLayer) {           this.rootLayer.setVisibility(this.checkNode && this.checkNode.checked);         }         // automatically expand/collapse?         this._toggleContainer(this.checkNode && this.checkNode.checked);         this.rootLayerTOC._adjustToState();              //This is where I think I should be able to refresh the legend but this.legend is    //null at this point.         //this.legend.refresh();            } else if (t == this.iconNode) {         this._toggleContainer();       }     },          _getVisibleLayers: function(){         var vis = [];         dojo.forEach(this.rootLayer.layerInfos, function(layerInfo){          if (layerInfo.subLayerIds) {           // if a group layer is set to vis, all sub layer will be drawn regardless it's  sublayer status           return;         } else if (layerInfo.visible) {           vis.push(layerInfo.id);         }       });       if (vis.length === 0) {         vis.push(-1);       } else if (!this.rootLayer.visible) {         this.rootLayer.show();       }       return vis;     }


How to assign geometry to records in a table that contain an ID of a geometry point?

We are looking to map out 'incidents' at schools, but the incident table, which contains a few thousand records, only has a school number (plus the incident data). The table format is an Excel Spreadsheet with around 20,000 records. We have schools (around 250 records/points) that share the same ID and of course the geometry for each school. The schools are a point SDE feature class, but can be converted to SHP or other geometry type if needed. How can we assign the geometry from the schools to each record in the 'incidents' table? I'd like to have something like a shapefile or other type of table. Keeping the excel file in its current format is not necessary, ie. we're converting the excel file to a feature class / shapefile / etc. Any software option is on the table.


How to set workspace as Python script tool variable/parameter?

I'm pretty new to Python. I'm trying to write a script and as I want to automate it as much as possible, I'm wondering is it possible to set the workspace as a variable so that when it's run as a standalone script or as a tool in ArcToolbox that it will allow everything else to run? Below for example would it be possible to get the user to select a workspace and then for the script to pick up the shapefiles from this workspace and also create the new geodatabase there?               # Create file Geodatabase     # Import ArcGIS modules     import arcpy     print arcpy.ProductInfo()     # Check out the ArcGIS Spatial Analyst Extension     arcpy.CheckOutExtension("spatial")     # Need to be able to OverWrite Outputs     arcpy.env.overwriteOutput = True     # Set workspace     arcpy.env.workspace = "C:/Prog_Data"     # Set up variables     out_folder_path = "C:/Prog_Data"     out_name = "Prog.gdb"     # Execute CreateFileGDB     arcpy.CreateFileGDB_management(out_folder_path, out_name)     # Set local variables before importing shapefiles to Geodatabase     inFeatures =  ["Points.shp", "Extent.shp", "Rivers.shp", "Population.shp"]     outLocation = "Prog.gdb"     # Execute shapefile to Geodatabase     arcpy.FeatureClassToGeodatabase_conversion(inFeatures, outLocation)      As I said, I'm new to Python so apologies if this is a stupid question etc. Thanks


Arcobjects- IAnnotateLayerPropertiesCollection2.QueryItem in Python

Anyone tried access label properties trough ArcObjects with Python? I try to obtain reference to label object with IAnnotateLayerPropertiesCollection2.QueryItem, but when I do:               pA = pGLyr.AnnotationProperties     new = NewObj(esriCarto.LabelEngineLayerProperties,esriCarto.IAnnotateLayerProperties)     pA.QueryItem(0,new)      I get: _Runtime error : call takes exactly 2 arguments (3 given)_ I'm not sure where is the error comming from. Any ideas?


Why do I get an "Type 'IPoint' is not defined" error in VB.NET

I am writing an add-in for ArcMap 10. I am trying to do Dim clickedPoint as IPoint in VB.NET, but I get "Type 'IPoint' is not defined" error. Do I have to import a class or how do I make this work?


Problem in refreshing FeatureLayer in Openscales

I have a refresh feature layer problem, because i need to delete all the markers and add the new markers so i tried this piece of code , but it doesn't work :(                           //refresh                 markers.clear()                 markers.reset();                 markers.removeFeatures(markers.features);                 markers.redraw(true);                 //refresh                      trace(markers.features,"features before");                 trace(Snaps ,"Snaps" );                 for each(var Car in Snaps)                     {                         var mat = Car[0];                         var Loc = Car[2];                         var snap_id = Car[1];                         var direction = Car[3];                         //Alert.show(Loc[0]);                         var marker:CustomMarker = CustomMarker.createUrlBasedMarker("images/markers/iconFlag1up_.png", new Location(Number(Loc[1]),Number(Loc[0])));                         marker.addEventListener(MouseEvent.CLICK,handlesClickMarker);                          marker.name=snap_id;                              markers.addFeature(marker);//add marker to markers                     }                          trace(markers.features,"features after add");      thanks in advance


How should I correctly exaggerate a hillshade raster (ArcGIS10, Spatial Analyst)?

I once wanted to generalize a high resolution raster and instead of MEAN i accidentally selected the default SUM technique, using a cell factor 5 (Lidar DEM is 1m resolution). When I used this result as input to the hillshade funciton what I got was what I can only describe a highly exaggerated hillshade. I deleted the results and recreated the generalized DEM but **now I have the need to show more exaggerated terrain characteristics in a topographic map** and it seems to produce the results I want albeit generalized. **Is this a common way to do this or should I be using a different technique? How would I exaggerate a DEM without having to aggregate the raster?** Hillshade created from generalized (Mean, Cell factor 5) LiDAR DEM ![enter image description here](http://i.stack.imgur.com/BvVDn.png) Hillshade created from generalized (SUMm Cell factor 5) LiDAR DEM ![enter image description here](http://i.stack.imgur.com/ooCtg.jpg)


ArcGIS Spatial Join Options Missing

The ArcGIS SpatialJoin online help page has a long list of match_options when joining data spatially, including HAVE_THEIR_CENTER_IN. However running the arcpy.SpatialJoin_analysis tool in Python with this option results in an error:               ExecuteError: Failed to execute. Parameters are not valid.     ERROR 000800: The value is not a member of INTERSECT | CONTAINS | WITHIN | CLOSEST.     Failed to execute (SpatialJoin).      These options are also missing from ArcToolBox: ![enter image description here](http://i.stack.imgur.com/bfaFw.png) The licensing on the help page suggests this tool is available for all versions of ArcGIS: > ArcView: Yes ArcEditor: Yes ArcInfo: Yes So is this an error in the docs, licensing on keywords, or a misunderstanding on my part?


Client Zoom in OpenLayers with Google layer

I'm displaying some features on a map, but the features are somewhat on the small side and can't be easily viewed at default zoom levels. Using the Client Zoom example, I was able to enable acceptable zoom levels on an OSM layer. However, I'd like the features to be displayed on a satellite/hybrid layer. Google is my first choice, but I have been unable to get client zoom working properly on their hybrid layer. Attempting to zoom in past the server's maximum zoom level results in the feature itself being zoomed, but not the map tile around it. Has anyone gotten this to work? Other satellite layers would be acceptable as well.


Is there any support for Rasterlite in the Android QGIS?

Is there any support for Rasterlite databases in the Android port of QGIS? I have tried adding a raster layer as I would on desktop QGIS but there are fewer GDAL file formats listed. Is this because rasterlite is not available on Android or is there another way to bring it in? Thanks Tom


Runaway memory usage with Event Layers in ArcGIS

I have an ArcEngine application, based off an MXD with an axMapControl. Several of the layers in the map are event layers built with XY data in a SQL table. It has routing info applied from a routing table too. My problem is that when I pan the map, the memory usage grows and grows. The same behavior is exhibited in ArcMap. This inevitably leads the target computer to run at a crawl as memory is depleted, and hard disk swapping all the time. I'm assuming that the map control is caching the spatial side as new data is drawn on the map. Is there any way to manage this memory usage? Perhaps flush from time to time, or disable all together? At this stage slower drawing would be preferable as it's simply unworkable in this scenario. UPDATE: Further investigation suggests that this is always the case, though on low spec (CPU) computers, when panning a lot, the CPU simply can't manage/flush the cache as fast as it grows. On faster machines, you can see the memory climb, but it returns to a lower level pretty quickly too. So this one's simply chalked up to slow CPU's not being able to keep up with all the map control cleverness. It would still be see a good explanation of how this all works behind the scenes.


Bad data beaking IRelationshipclass.GetObjectsRelatedToObjectSet

I have two workspaces - one a File GDB, the other SDE (SQL Server). Both workspaces contain the same data with the same relationship classes. When identifying features in ArcCatalog, the results pane correctly presents the related records. When using `IRelationshipclass.GetObjectsRelatedToObjectSet`, I always get an empty result set. If however I use a loop, calling `IRelationshipclass.GetObjectsRelatedToObject`, I get the related records. I see the same result in both workspaces. I have asked someone with a known good dataset to run my code, and they report that it works perfectly.   So my question is this - **what in my workspace could cause this behavior?** I need to rectify it. For the record, I'm using ArcGIS 9.3 SP1. I've included my test code below, on the chance that there is an issue with my code.               public void test(IWorkspace workspace, IQueryFilter qf, string relClassName, string sourceTableName)     {              IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;         IRelationshipClass relationshipClass = featureWorkspace.OpenRelationshipClass(relClassName);         ITable originTable = featureWorkspace.OpenTable(sourceTableName);         var sourceSet = originTable.Search(qf, false);              var foundSet = new SetClass();         IRow row;         while ((row = sourceSet.NextRow()) != null)         {             foundSet.Add(row);         }              var resultSet1 = GetRelatedRecordsByObject(relationshipClass, foundSet);         var resultSet2 = GetRelatedRecordsBySet(relationshipClass, foundSet);              System.Diagnostics.Debug.WriteLine("Result1: " + resultSet1.Count);         System.Diagnostics.Debug.WriteLine("Result2: " + resultSet2.Count);     }          public ISet GetRelatedRecordsBySet(IRelationshipClass relationship, ISet sourceObjectList)     {         sourceObjectList.Reset();         var resultSet = relationship.GetObjectsRelatedToObjectSet(sourceObjectList);              resultSet.Reset();         return resultSet;     }          public ISet GetRelatedRecordsByObject(IRelationshipClass relationship, ISet sourceObjectList)     {              ISet resultSet = new SetClass();              sourceObjectList.Reset();         IObject sourceRow;         while ((sourceRow = (IObject)sourceObjectList.Next()) != null)         {             var indSet = relationship.GetObjectsRelatedToObject(sourceRow);                  indSet.Reset();             IRow indSetRow;             while ((indSetRow = (IRow)indSet.Next()) != null)             {                 resultSet.Add(indSetRow);             }         }              resultSet.Reset();         return resultSet;          }


Solve the following error in PostGreSQL query

Hi can you explain about the following code:               SELECT Count(*) FROM geonames_load;      -- Strip out columns we want, and create a point geometry.               CREATE TABLE geonames AS     SELECT     geonameid AS id,     name AS name,     admin1 AS state,     feature_code AS kind,     ST_SetSRID(ST_MakePoint(longitude, latitude), 4326)::Geometry(Point,4326) AS geom     FROM geonames_load;      I am getting error on: > ST_SetSRID(ST_MakePoint(longitude, latitude), 4326)::Geometry(Point,4326) AS > geom I have downloaded the table from here.


How to delete a broken index in SpatiaLite?

I managed to screw up an index in my SpatiaLite database. The index was created using spatialite-gui. In the meantime, I deleted the original table and three out of four index files: idx_tablename_Geometry is still left while idx_tablename_Geometry_node, idx_tablename_Geometry_parent and idx_tablename_Geometry_rowid have been deleted too. Whenever I start the GUI or refresh the list of tables, I'll get the error message: No such table main.idx_tablename_Geometry_node. Trying to drop the table idx_tablename_Geometry using either SQL or the GUI results in the same error message and nothing is deleted. The database is still usable in my GIS, but it's annoying to have this error pop up every minute when working with spatialite-gui. Any ideas how to fix it?


Well, since it was one of the highest rated proposed questions, hasn't been asked yet, and I would love to know the answer, I thought I'd ask it. **How do I explain what GIS is for the 11 year old kid?**


Getting the Correlated FeatureDataRecord (or meta-data) for a Given Geometry?

I'm using SharpMap 2.0, and I'm successfully loading a shapefile and parsing through it. The particular shape file that I'm working with has about 700 polygons in it, and each of those polygons has meta data associated with it (the meta data is in the .DBF file). How can I get at the meta data for each polygon? I'm not seeing any methods that allow access to this data... I've searched Google, these forums and have pretty much exhausted my resources trying to figure this one out. Any help would be greatly appreciated! Thanks, Jason


Huge differences between results for 7-param datum transform

I'm trying to transform a WGS84 lat/lon point               11d42'32.10629" E 5d12'56.75371" S      in three different software packages (Proj4, GeoTrans and Leica GeoOffice) but I receive very big differences between the results - around few hundred meters in X and Y! Note that these variations appears only with 7 parameters not with 3. **Proj4** > cs2cs +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +to +proj=utm > +zone=32 +ellps=clrk80 > +towgs84=178.3,316.7,131.5,-5.278,-6.077,-10.9792,-19.166 +south +units=m > +no_defs * * * **GeoTrans**               Delta X 178.3      Delta Y 316.7      Delta Z 131.5      Rot X -5.278      Rot Y -6.077      Rot Z -10.9792      SF = -19.166 / 0.999980834 (0.000019166)      * * * **Leica GeoOffice** ![Screenshot](http://i.stack.imgur.com/lCGbY.png) * * * The results are respectively:   1. 800392 9422525   2. 800306 9422840   3. 800941 9422891 I believe all the 3 packages use same mathematical methods for 7-param transform (Bursa-Wolf method). What could be the cause of this huge variation?


How to extract subdataset from HDF raster?

I am trying to extract a subdataset from HDF raster. Later on, I intend to make operations such as mosaicking and extracting raster averages from the extracted subdataset. The following code is supposed to extract the subdataset, but it seems to me that all it does is extracting the subdataset NAME and not the object itself:               import gdal     from gdalconst import *     filename= "Image.hdf"     dataset = gdal.Open(filename,GA_ReadOnly)     subdataset = dataset.GetSubDatasets()[1]     print(type(dataset))     print(type(subdataset))      Now, if you run this, the type of the dataset and subdataset objects will be printed out:               <class 'osgeo.gdal.Dataset'>     <type 'tuple'>      So, the extracted subdataset is just a tuple. How can I use it to do mosaicking? Am I missing something here? P.S. HDF rasters can be easily downloaded from this FTP site: ftp://ladsweb.nascom.nasa.gov/allData/5/MOD11A1/2012/193/


How to create custom coordinate system in ArcGIS?

I have a series of control points with xy coordinates in both NAD83 UTM and in a local grid. How can I go about creating a new projection file in ArcGIS 10 for the local grid? Thanks


constructing customer-derived trade areas

I am interested in creating some customer-derived trade areas that represent "most" of the customers for a given store (say 80%). I have both the customers and the stores geocoded. The ESRI Business Analyst description of the general idea (with pictures) is here. Unfortunately I work at a MapInfo shop, so I am trying to hack it together myself. Does anyone know if something like this exists already so that I don't have to reinvent the wheel? Here's a summary of what I've tried so far: I've start at the store, ranking the customers from closest to farthest, and then adding each customer in until I get to ~80% of sales for each store. Then I put the convex hull around those folks and call that the trade area. This works reasonably well, but it misses major customers who happen to be distant. I've also tried ranking the customers in terms of sales, from largest to smallest. Then I keep the ones who make up the 80%, and then snap a convex hull around them. This gets the big guys, but I loose the 80% feature since that area now includes lots of the small shrimp. I've also tried a hybrid approach where calculate z=sales/(straight line distance) for each customer, rank by z, and put CH around the folks that add up to 50%. That CH will also include other customers that were not selected, and so I then trim the farthest customers in the hull until I get back down to 80% of sales. This works the best of the 3 methods. Any advice would be greatly appreciated.


How to use the Intersects function in the Field Calculator of QGIS?

I would like to have an example on how to use the Intersects function in the Field Calculator of QGIS. Basically, I want to know which feature from a polylines layer intersects a polygons layer and store the result in an attribute. (0 = not intersecting, 1 = Intersecting). I'm aware of the geoprocessing tools "Clip" or "Intersect", but is it possible in the Field calculator ?


Coverting annotation into a shapefile

I have created an annotation feature class in Arc10 and when viewed within the database, looks great. However, whenever I go into catalog and export the annotation feature class to a shapefile, it turns the shapefile into a polygon layer. The Text is still within the attribute table, and when going into properties to set to proper fields, it does not display. I have only appended the annotation and have not feature linked them. This worked on dummy data, but now it is screwy on project data. Is there something that I am doing or a way to export annotation within a .mdb to a .shp?


excluding NaN records from FOR loop?

I am trying to create an array of Z and M values for vertices from a polyline (Z and M enabled) feature class. Some of the vertices do no have M values/geometry and I wish to exclude them from the array.                   import arcpy         from arcpy import env         ##import math   #another way I was testing....commented-out         import numpy as np              print "Modules imported."              # Set environment settings         arcpy.env.overwriteOutput = True         arcpy.env.workspace = r"E:\Projects\HaulRd\SpatialData"         arcpy.env.scratchWorkspace = r"E:\Projects\HaulRd\SpatialData\Scratch"         arcpy.env.outputZFlag = "Same As Input"         arcpy.env.outputMFlag = "Same As Input"              print "Workspaces and environments set."              # Set local variables         infc = "HaulRd_XS_linesZM_test.shp"         ##x=float('nan') # another way I was testing.....commented out              # Identify the geometry field         #         desc = arcpy.Describe(infc)         shapefieldname = desc.ShapeFieldName              # Create search cursor         #         rows = arcpy.SearchCursor(infc)                   # Enter for loop for each feature/row         #         for row in rows:             # Create the geometry object             #             feat = row.getValue(shapefieldname)                  # Print the current feature's ID             #             print "Feature %i:" % row.getValue(desc.OIDFieldName)             partnum = 0                  # Step through each part of the feature             #             for part in feat:                 # Print the part number                 #                 print "Part %i:" % partnum                      # Step through each vertex in the feature                 #                 for pnt in feat.getPart(partnum):                          #exclude records with 'nan' (i.e. null)                     if pnt[~np.isnan(pnt).any(1)]                              # Print z,m coordinates of current point                         #                         print pnt.Z, pnt.M                          else:                         # If pnt is None, this represents an interior ring                         #                         print "Interior Ring:"                 partnum += 1       I have made a number of attempts based on content I found in:   http://stackoverflow.com/questions/11620914/removing-nan-values-from-an-array   http://stackoverflow.com/questions/2695503/removing-pairs-of-elements-from- numpy-arrays-that-are-nan-or-another-value-in   http://stackoverflow.com/questions/12986996/conditional-for-in-python   But I can't seem to figure-out how the syntax (could also be a logical problem) fits into my code. Eventually, my temporary array will be be used to feed creation of vertical line graphs (see related post:   using Z and M feature geometry to create line graph in Python?) I am using Python v2.6.5. Thank-you,   Will


Openlayers FramedCloud popup appears in the wrong location

I have an application that is using OpenLayers 2.13.1. It is utilizing a bing basemap and overlaying WMS layers. I am using a FramedCloud popup. I would like the popup to appear where the user clicked and sometimes it does. Sometimes it appears randomly to the east or west of where the user clicked. Here is a snipit of code:                   this.click_radons = function(layerName) {         if (layerName == "State Boundaries") {             return null;         }         var map = innovateMapObj.map,                 layer = null,                 serviceURL = null,                 layers = map.layers.slice(),                 content = "",                 desc = null,                 img = null,                 priority = null;              //because we don't want to query base layer         for (var i = 0; i < layers.length; i++) {             if (!(layers[i].isBaseLayer)) {                 layer = layers[i];                 serviceURL = layers[i].url;                 break;             }         }                   OpenLayers.ProxyHost = innovate.proxyURL;         return new OpenLayers.Control.WMSGetFeatureInfo({             layers: [layer],             url: serviceURL,             title: 'Identify features by clicking',             queryVisible: true,             eventListeners: {                 getfeatureinfo: function(event) {                     var thisObject = new innovate.Controls(innovateMapObj)                     obj = thisObject.makeObjectOutOfResponse(event.text);                          var boxSize = null;                     var mapID = innovateMapObj.config.id;                     //hide any open popup on click                     if (innovate.popupbox[mapID]) {                         map.removePopup(innovate.popupbox[mapID]);                         innovate.popupbox[mapID].destroy();                         //$("#innovate_info_popup_" + mapID).hide();                     }                     if ($.isEmptyObject(obj) || obj === false) {                         return;                     }                     innovate.lastPopupCenter[mapID] = map.getCenter();                          if (obj['radonzone'] == 1) {                         desc = "Zone 1 counties have a predicted average indoor radon screening level greater than 4 pCi/L (picocuries per liter) (red zones)";                         priority = "Highest Potential";                         img = "3b6a386668a6d07b8d8e029744820282";                     } else if (obj['radonzone'] == 2) {                         desc = "Zone 2 counties have a predicted average indoor radon screening level between 2 and 4 pCi/L (orange zones)";                         priority = "Moderate Potential";                         img = "52edb92fef3b3447d910ea3f4e3bad06";                     } else if (obj['radonzone'] == 3) {                         desc = "Zone 3 counties have a predicted average indoor radon screening level less than 2 pCi/L (yellow zones)";                         priority = "Low Potential";                         img = "d1573b09a0505bef245b2a380a18e380";                     }                     var stateName = obj['statename'], initCapedStateName = "";                     stateName = stateName.split(" ");                     for (var keys in stateName) {                         initCapedStateName += stateName[keys].substr(0, 1) + stateName[keys].substr(1).toLowerCase() + " ";                     }                          var imgURL = innovate.mapServiceBaseURL["legend"] + innovateMapObj.config.legend["url"] + "/../0/images/" + img;                     content = "
" + obj['namelsad'] + ", " + initCapedStateName + "
" +                             "
Radon risk zone: " + obj['radonzone'] + "
" +                             "

	" +                             "" + desc + "	" +                             "" + priority + "

";                                   innovate.popupbox[mapID] = new OpenLayers.Popup.FramedCloud(                                 "innovate_info_popup_" + mapID,                                 map.getLonLatFromViewPortPx(event.xy),                                 boxSize,                                 content,                                 null,                                 true,                                 function() {                                     this.div.style.display = 'none';                                     map.panTo(innovate.lastPopupCenter[mapID]);                                     map.removePopup(innovate.popupbox[mapID]);                                     }                                 );                              map.addPopup(innovate.popupbox[mapID]);                      }             }         });     }      The problem is that sometime the popup appears east or west of where the user clicked on the map. This happens very inconsistently. I haven't been able to make the error occurr consistently. Any suggestions would be greatly appreciated. The following code is from the Innovate class:               var innovate = {     popupbox: {}     ,curMapPos: 0     ,curMapID: 0     ,openedMap: {}//collection of all innovate.Map objects     ,opacitySelectors: {}     ,legendOpen: false     ,baseFolder: ""     ,lastPopupCenter: {}     ,fullScreenOn: false     ,          proxyURL: "proxy.jsp?"     ,          buildMap: function(v_mapID) {         var obj = new innovate.Map(v_mapID);         obj.buildMap();         this.openedMap[v_mapID] = obj;     },     /*      * Defined the base URL for maps and legends so when they change, I don't have to    serach and change in all files      */     mapServiceBaseURL: {         "map": "Put base URL here",         "legend": "Put base URL here"     }     ,     getUserConfigForMap: function(mapId) {         for (i = 0; i < innovate_config.maps.length; i++) {             if (innovate_config.maps[i]['id'] == mapId) {                 return innovate_config.maps[i];             }         }         return null;     }     }      Below is code called for one map from the getUserConfigForMap               {         'id':8//must match param id         ,'header':'Map'         ,'startResolution':2//gets the resolution from serverResolutions using the startResolution as index         ,'endResolution':9//number of zoom levels you want, 21 is max and must be greater than startResolution         ,'projection' : 'EPSG:3857'         ,'maxExtent' : [-19951913.2278,-1643352.8198,20021888.1032,11554793.571]         //,'zoomToExtent' : [-14617039.6948417,2697596.8976282,-6500380.5111317,6713979.93039427]         ,'center' : [-120,38]          ,'defaultZoomLevel' : 3         ,'footNote':'This is a test footer note for this exhibit'         ,'dataSource':'Data Source'         ,'legend':{             "url":'Url without base url'         }         , 'baseMap': ['arcGisCanvasWorldLightGrayBase']         ,'layers':['wms_layer','wms_stateboundariesThick']         ,'controls':['Navigation','LayerSwitcher','click_radons','InnovateMapFullScreen','ScaleLine','Attribution','InnovateMapLegend']         ,'hide_controls':['Navigation','PanZoomBar']     }


What are Esri Geodatabases?

What are the various formats/storage technologies which fall under the name **Esri Geodatabase**?   What are the most important differences between them?   and (briefly) what are the mainstream means to utilize them? There are conversations all over the place about **personal** and **file** and **enterprise** and **(?)** geodatabases. These are each different beasts which need distinct handling, but there is a lot of confusion in the answers as to which means apply to which formats of geodatabases. **update:** I should add that don't feel any single answer has to address the whole range of possibilities. It would be okay to say _"the two single user gdb formats are personal and file gdb, they are appropriate for xxx, have these limits xxx, and the primary differences between them are xxx"_ etc.


Extract ESRI geodatabase data with QGIS

Is it possible for QGIS to extract data from an ESRI personal geodatabase (.mdb)?


File Geodatabase (*.gdb) support in QGIS?

Following questions: Open Source Tool capable of reading Esri File Geodatabase (.gdb)? How to access file geodatabase in Qgis? How to get FGDB support in GDAL 1.9 without compiling? I have spent around 2 days to find the way to open GDB (Esri geodatabase) in QGIS (or any other open source software) but still without success. I have downloaded the newest OSGeo4W installer and run the setup - express desktop install - all packages And there was no support for GDB in QGIS. So I tried again in advanced way - advanced install - checked: All - Libs - gdal-filegdb: OGR FileGDB Driver (Current version 1.9.0-1) - reinstall: All qgis and gdal (gdb) files I have found And nothing, still no support. Just desperate I have copied FileGDBAPI.dll and ogr_FileGDB.dll to OSGeo4W\apps\qgis\plugins folder, reinstalled all again, nothing... Can you please describe more detailed procedure? Please include installation and how to open .gdb in QGIS (OSGeo4W installation)


How to import info from mdb file?

I need to import info on a QGIS project. The info are in a MDB file (population, mean age, number cars and so on per Town) that is possible to connect with a region shape from an ID (the ID is the same in the MDB and in the shape file).


How to import ESRI geodatabase into QGis? (GIS beginner's question...)

> **Possible Duplicate:**   >  How to get “.GDB” (Esri File Geodatabase) support in Quantum GIS (osgeo4w - > qgis) First, I would like to apologize as I know that this topic has already got a lot of questions/answers in the last months. But despite those answers, I am stuck with my problem. The main reason might be I am not a GIS specialist and I don't have any computer programming background. I've received an ESRI geodatabase and I would like to open it with QGis. I tried to open it via the "Add layer" checking the "Directory" box but I always get the answer "It's not a valid or recognized datasource". Reading the previous comments I assume I have to set up something, QGis is not able to read ESRI geodatabase with its native configuration. Does anyone could give me any guidance? I have QGis 1.8.0 Lisboa that I installed through OSGeo4W using the Express Deskop install option. I have Windows 7. Thank you Best regards, Bap


Does the National Hydrology Dataset geodatabase work in qgis?

I am running QGIS 1.8 on a windows xp pc and trying to put the USGS National Hydrology Dataset (more info herefor Oregon into a project. I try to "add vector data", using directory option then selecting the unzipped folder but it says NHDH_OR_931v210\NHDH_OR.gdb is not a valid data source. It looks like this was created in ArcGIS 9.2 -- is that the problem? I am very new to GIS and there may be something very simple I'm doing wrong.


Where is QGIS 2.4 user guide for Esri file geodatabase?

I found no 2.4 user guides or documentation at qgis.org. I googled for 2.4 file geodatabase info but found nothing. Can someone point the way?


Geodatabase ESRI in Qgis 2.0.1

I received data saved as geodatabase from Esri (10.x) and want to open or work with it in Qgis 2.0.1. The files are like following ![enter image description here](http://i.stack.imgur.com/eGkZg.png) I read a lot in the forum about this subject but still have no idea how it could work. Can somebody please give me stepvice advice or just say it is not possible, would be also nice then I can stop searching like... Thank u.v.m.


How to find and apply reprojection parameters?

I have a data set in one projection, and a shapefile in another, and I am trying to combine the two. I am using Python. I apologize for posting a "help me transform coordinates" question on this site - there are so many. I assume the way to do this conversion is with proj4. I am unable to find/understand the proj4 string needed to do this conversion. The shapefile.prj contains this:               PROJCS["North_Pole_Stereographic",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Stereographic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",90.0],UNIT["Meter",1.0]]      Is there a simple way to find the proj4 code for this? And I have a netCDF file that I can plot correctly with the following Python code:               map = Basemap(llcrnrlon=lon[0,0],                   llcrnrlat=lat[0,0],                   urcrnrlon=lon[560,300],                   urcrnrlat=lat[560,300],                   #rsphere=(6378137.00,6356752.3142),\                   resolution='l',                   area_thresh=1E6,                   projection='lcc',                   #lat_1=90, lon_0=0)                   lat_1=71.0,                   lon_0=-39.0)      I would like to keep the Basemap (python) projection, and convert the shapefile contents to that projection. ## Edit Further research and I found this post: Shapefile PRJ to PostGIS SRID lookup table? with a helpful bit of code. Running that and I find the following:               Proj4 is: +proj=stere +lat_0=90 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs     EPSG is: None      ## Edit I found out I can determine the basemap proj string with:               map.proj4string      I'm now using the advice here http://all-geo.org/volcan01010/2012/11/change- coordinates-with-pyproj/ to try to convert from one to the other...


How to modify a LYR file using ArcObjects?

I'm creating an Add-in for ArcCatalog using C# that modifies the datasources of layers in a MXD and .LYR files by themselves. I have gotten the MXD code to work but I'm lost with how to modify a .LYR file without the use of IMap. Does anyone have any code suggestions? To load an MXD and loop and start modifying layers in the TOC was simply something like:               UID pUID = new UIDClass();                      pDoc.Open("C:\\Test\\File1.mxd");                      for (int i = 0; i < pDoc.MapCount; i++)                 {                     pMap = pDoc.get_Map(i);                          UID uid = new UIDClass();                     uid.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}"; //IFeatureLayer                     IEnumLayer layers = pMap.get_Layers(uid, true);       //Returns all layers      But I'm unsure how to get this process going for standalone .LYR files..               ILayerFile l = new LayerFileClass();     l.Open(fileName);


Map not displaying from Javascript using fusion table

I have this javascript which I am working on but the map in the HTML is just not displaying. I have a similar fusion table with layer_1 which is displaying fine but when I put layer-2 instead of layer_1 and pull up a different tableid with same code. The map does not show up.               var tableid_2 = 431xxxx;      var layer_2;     var queryUrlHead = 'http://www.google.com/fusiontables/api/query?sql=';     var queryUrlTail = '&jsonCallback=?';     var zoom = 7;     var latlng = new google.maps.LatLng(3x.7996, -11x.1668);          function initialize() {          var myOptions = {         zoom : zoom,         center : latlng,         mapTypeId : google.maps.MapTypeId.TERRAIN,         mapTypeControl: true,         mapTypeControlOptions: {         style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,         position: google.maps.ControlPosition.TOP_LEFT     },         scaleControl: true,         scaleControlOptions: {         position: google.maps.ControlPosition.BOTTOM_LEFT     },     };          var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);                         layer_2 = new google.maps.FusionTablesLayer(tableid_2);     var qry = "SELECT 'Location2', 'Name2','URL' FROM " + tableid_2;     layer_2.setMap(map);         layer_2.enableMapTips({             select: "'Name2'",             from: tableid_2,             geometryColumn: 'Location2',              suppressMapTips: false,              delay: 50,             tolerance: 5     });         addListeners();                    layer_2.setQuery(qry);          var col_list = 'Name2';          if(order_list && order_list !== 'Name2') {         query += " ORDER BY " + order_list;     }          var queryurl = encodeURI(queryUrlHead + qry + queryUrlTail);                         $.ajax({         type : "GET",         url : queryurl,         dataType : "jsonp",         success : dataHandlerCallback,         error : function() {             alert("AJAX ERROR for " + queryurl);         }     });


ArcMap 10.0 Python Field Calculator, Find/Replace Double Quotes

I'm trying to use the Field Calculator (ArcMap (10)) to strip out double quotes in an address field (I didn't put them in there, believe me). I've tried many incantations but am still unable to even get off the ground with a calculation. yes, both fields are string, and both are of acceptable length. This calculation: ![Sample calculation](http://i.stack.imgur.com/liQms.png) Results in this: ![fail](http://i.stack.imgur.com/OTskB.png) With this error message in the Results dialog: ![error message](http://i.stack.imgur.com/EVET3.png) And I repeat, I didn't put them in there.


Using R with ArcGIS Desktop

In response to comments below, a re-phrasing of the question. I've used the integration of R with QGIS, and found it a very uesful tool. Having taken a look at the R toolbox extension for 9 and the extension for 10 it appears they both offer only point clustering to demonstrate the proof of concept. The question becomes are there any analysis methods available in R that you would like to see implemented through a python script (for example, implementing specific parts of the spatstat package).


Presenting geospatial data in Powerpoint

I am looking for a more elegant way to display geospatial data in Powerpoint. KMLs seem to be becoming the norm for quickly showing interactive geospatial data to colleagues and the general public. Is there a better way to integrate these incredibly useful KMLs into Powerpoint presentations than the example I've shown below? Maybe there is a better solution for presenting geospatial data altogether in Powerpoint--I look forward to your ideas. ![enter image description here](http://i.stack.imgur.com/WWWJn.jpg)


vector with epsilon

if there are two points p1 and p2.and vector of both is ab .. now if i say **-1 < ab < 1** condition true than return F.. is that mean by points p1 and p2 intersect to each other...?


OpenLayers - Switching to Google Basemap causes a flicker as it zooms to extent

I created and example based off of the spherical-mercator example example and placed it here. I made the bing road layer the default. If you zoom in on a location and then switch to a google layer you'll see the map go to full extent and then zoom to the correct extent. It happens very quickly but it is a distraction. I've tried several hacks to get around this but none of them work (delayed opacity, calling setMapObjectCenter before setting visibility). Anyone willing to figure out (or already know) how to eliminate the flicker/animation? Note that this is only an issue the first time you select a google base layer. Subsequent switching transitions beautifully.


How to get layers from current viewport in Openlayers?

In my web map application, I have developed the printing module by using Mapfish with Geoserver. While printing, I need to send the layers to geoserver only which are falls inside the current view port. Is it possible?


How to call arcpy.RefreshActiveView() every 5 seconds using ArcGIS Python?

I have an Excel macro that generates random values after every 5 secs and I am reading it in ArcGIS for Desktop... to refresh the view I have to press f5 and the view gets updated. Now I want to automate it and run the loop infinitely. I found the command for refreshing the view is               arcpy.RefreshActiveView();      I want to call this function after a delay of 5 seconds.. I tried this code               import arcpy;     import time;          while True:         arcpy.RefreshActiveView();         time.sleep(5);      But the problem is when I run this the main thread is blocked and the program is not responding. So I tried to move it to a new thread.               import arcpy;     import time;     from threading import Thread;          def refView() :         while True:             arcpy.RefreshActiveView();             time.sleep(5);          try:         Thread(target=refView, args=()).start();     except Exception, errtxt:         print errtxt;      This is also not working and the application becomes not responding, please let me know what I am doing wrong ...


Automatic Clustering in ArcGIS for Desktop?

Given a set of random data points on a map, I would like to cluster the data points based on number of data points in a cluster, time to travel within all the data points in the cluster,and/or number of clusters needed. Is there a way or extension in ArcGIS Desktop that can automatically create the cluster?


Configuring Geoserver to use a specific postgis geometry column as the default

I have a PostGIS table with two geometry columns, both multipolygon but one with SRID 4326, the other 3857. When publishing the table in Geoserver, I realize that Geoserver defaults to using the first geometry column in the list of columns, but I was wondering if there is a way to configure Geoserver to use a specific geometry column? I’m not talking about configuring the SLD to render using a specific geometry column, ie:               <se:PolygonSymbolizer>     <se:Geometry>     <ogc:PropertyName>geom3857</ogc:PropertyName>     </se:Geometry>     …     </se:PolygonSymbolizer>      I’m talking about having Geoserver use a specific geometry column as the native SRID and default projection.


pgRouting results to LINESTRING geometry type

I am doing some routing queries, using pgRouting's second version of pgr_trsp function.   What I can't do effectively yet is storing the results. That is, I want to able to store in a table:   1. either the actual result from pgRouting (not very useful anyway),or   2. geometry(LINESTRING) data type, derived from the pgr_costresult (can be used in spatial queries). Here is the bit of code I tried (and failed :P):               --Test function to convert pgr_costresult to geometry.     --Input arguments are the arguments of the pgr_trsp function, i.e. edge id's and relational position.     --TODO: do the same function work for arbitrary points.     CREATE OR REPLACE FUNCTION fm_pgr2geom(edge1 integer, pos1 float8, edge2 integer, pos2 float8)         RETURNS geometry AS $$      --We have to do a routing query. And declare a cursor for it     DECLARE resc CURSOR FOR         SELECT * FROM pgr_trsp (             'SELECT * FROM th_2po_4pgr',             $1, $2, $3, $4, false, true);         doline geometry[];         temp_point geometry;         geom geometry;         temp_rec RECORD;     BEGIN     --Find startpoint and append to doline         doline := array_append(             doline,ST_Line_Interpolate_Point((SELECT map.geom_way FROM th_2po_4pgr map WHERE map.id = $1),$2));     --Append the rest of nodes         FOR temp_rec IN SELECT * FROM pgr_trsp (             'SELECT * FROM th_2po_4pgr',             $1, $2, $3, $4, false, true) LOOP                 doline := array_append(                 doline, (SELECT nodes.geom FROM nodes WHERE nodes.id = temp_rec.id1));         END LOOP;     --Append the endpoint         doline := array_append(             doline,ST_Line_Interpolate_Point((SELECT map.geom_way FROM th_2po_4pgr map WHERE map.id = $3),$4));     geom := ST_MakeLine(doline);     RETURN geom;     END;     $$ LANGUAGE PLPGSQL;        This piece of code is supposed to return a geometry (linestring) with all the points of the result. However the actual result is only a 2-point linestring.   Do you know any convenient way I can achieve either or both? I think second option is preferable, since I doubt postgresql tables can store complete pgr_costresults and Geometry types can be used for spatial analysis.


How to convert jpgs to RST for IDRISI Selva Image Processing

I would like to create a mosaic data set in IDRSI Selva however, my images are jpg. Is there a way to convert these within IDRISI or otherwise? Thanks.


Microsoft Surface vs. iPad for mapping

I was recently introduced to the Avenza PDF app for iPad and I've been using it in the company I work for to help our field crews find their way around, and record waypoints and tracks. The app takes georeferenced PDF's and uses the iPad GPS to show a field person exactly where they are. It works very well and the field guys love it. The only problem is the iPad isn't synchronised with our Office media, which is all PC and Microsoft products, plus our field crews are now carrying an iPad plus a laptop which they need for reporting duties. If we were able to purchase the Surface then we could do away with the iPad and the laptop and keep the Surface. So I've been asked to research the MS Surface. Does anyone out there know if the Surface has decent (if any) GPS capabilities? Or whether there is an app that would enable me to download custom made maps into the tablet? I've found Microsoft MapPoint 2013, but I have no experience with this program. Basically I'm looking for an Avenza app equivalent for the Surface. Thanks in advance...


How to create a buffer zone for notification

I am new to PostGIS. I am working on a project, for this i need to find out abutter notification that generates a list of properties within the buffer zone from the selected property with user input distance in radius and generate a mailing list of each property displayed by the buffer result. we are using Geoserver server and postgis. need to do this on the server side coding and display result in openlayer viewer. Can anyone guide me with postgis spatial query to find this parcels from the selected parcels. Distance measured for this is from the parcel outline not from the center of property. Thanks in advance for your assistance.


How to get the centroid of a set of points in POSTGIS?

I use PostgreSQL with POSTGIS extension. I have a set of points in `the_geom` column from a table myshema.myobjects I would want create a select statement to get the centroid of this cluster, so from a select statement like this :               select the_geom from myshema.myobjects      Then I search the correct syntax of a statement that could look like that :               SELECT ST_AsText(ST_Centroid( (SELECT the_geom FROM myshema.myobjects) ));


Generate ArcGIS spatial bookmarks from feature envelope

Curious if anyone has some code that would rip through a feature class and generate a spatial bookmark for each feature's envelope. You could define a field in the feature to be the bookmark's name.


Shapefile to MSSQL with ogr2ogr fails to make connection

I am using ogr2ogr from OSGeo4W on my Windows 7 box to import a shapefile into a SQL Server database on one of my servers. I was able to successfully complete the conversion using shp2sqlserver, but I can't figure out why it fails when I try the same thing with ogr2ogr directly. Here's the syntax of my ogr2ogr command:               ogr2ogr -f MSSQLSpatial "MSSQL:server=[server];database=[dbname];User Id=[uid];Password=[pwd]" C:\Path\to\file\shapefile.shp      When I run this, it fails first with an error saying "Cannot open database [dbname] requested by the login. The login failed." Next is another error that the "MSSQL Spatial driver doesn't currently support database creation. Please create database with the Microsoft SQL Server Client Tools." I have checked and double-checked that the user id and password given works properly, that there is already a database with the name given (I substituted [dbname] here to speak in generalities), and that the database is owned by the user. As mentioned, I was able to do this with shp2sqlserver so I don't think it's my database setup that is the problem. Is there a problem with my connection string? Is there some peculiarity within ogr2ogr that I'm not aware of? I am using a Windows 7 machine connecting to SQL Server 2008 R2. Gdal is version 1.9.1.


OpenLayers / Mapserver WFS Filter: <gml:null>missing</gml:null>

I'm trying to filter features in OpenLayers when moving a JQueryUI slider. It works like this: EDIT: full files available here on GitHub. ## JQueryUI slider When moving the slider cursor, `minSelection` and `maxSelection` values are defined. I need to show only features with `minSelection < height < maxSelection`. I've defined a filter that takes the current `min` and `maxSelection` and makes a query on the WFS, applying it to the vector layer (`curlayer` is the current vector layer object):               heightFilter = new OpenLayers.Filter.Comparison({         type: OpenLayers.Filter.Comparison.BETWEEN,         property: 'height',         lowerBoundary: minSelection,         upperBoundary: maxSelection     });          curlayer.filter = heightFilter;     curlayer.refresh({force: true})      ## OpenLayers.js               var _projObj = {         wgs84 : new OpenLayers.Projection('EPSG:4326'),         mercator : new OpenLayers.Projection('EPSG:900913'),         osm_wms : new OpenLayers.Projection('EPSG:3857')     };          uses_layer = new OpenLayers.Layer.Vector("US Layer", {         strategies : [new OpenLayers.Strategy.Fixed()],         projection : _projObj.wgs84,         visibility : true,         displayInLayerSwitcher : false,         protocol : new OpenLayers.Protocol.WFS({             version : '1.0.0',             url : 'http://46.105.19.68/cgi-bin/mapserv?map=/home/fradeve/public_html/ark-oia/ark-scrmap/wfs.map&service=WFS',             featureType : USType         })     });      ## Mapserver               LAYER         CONNECTION "host=46.105.19.68 user=** password=** dbname=sipdb"         CONNECTIONTYPE POSTGIS         DATA "geometry from (select gid, layer, the_geom as geometry, n1, n2, n13 as height from us) as pseudo_table using unique gid using srid=4326"         NAME "us"         DUMP TRUE         METADATA             "wfs_srs"         "EPSG:4326"             "gml_featureid"   "gid"             "wfs_title"       "us"             "wfs_typename"    "us"             "gml_include_items"       "all"             "wfs_version"     "1.0.0"              "wfs_enable_request" "*"          END         PROJECTION             "init=epsg:4326"         END         STATUS ON         TYPE Polygon         UNITS METERS         CLASS              STYLE                 ANGLE 360                 ANTIALIAS TRUE                 WIDTH 1             END         END     END      ## The XHTTP Post response Here is what I get when moving around the slider cursor: ### Request payload               <?xml version="1.0" encoding="UTF-8"?>     <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">     <wfs:Query xmlns:feature="http://localhost/cgi-bin/mapserv.exe" typeName="feature:us">       <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">          <ogc:PropertyIsBetween>             <ogc:PropertyName>height</ogc:PropertyName>             <ogc:LowerBoundary>                <ogc:Literal>870</ogc:Literal>             </ogc:LowerBoundary>             <ogc:UpperBoundary>                <ogc:Literal>900</ogc:Literal>             </ogc:UpperBoundary>          </ogc:PropertyIsBetween>       </ogc:Filter>      </wfs:Query>     </wfs:GetFeature>      ### Response               <?xml version="1.0" encoding="UTF-8"?>     <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:ms="http://localhost/cgi-bin/mapserv.exe" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://localhost/cgi-bin/mapserv.exe http://46.105.19.68/cgi-bin/mapserv?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=feature:us&OUTPUTFORMAT=XMLSCHEMA">         <gml:boundedBy>             <gml:null>missing</gml:null>         </gml:boundedBy>     </wfs:FeatureCollection>      ## So... Where is the error? Everything seems fine to me...


Hyperlinking to PostGIS Layers and Zip files with QGIS Actions

I previously asked a question about hyperlinking data in QGIS that gets loaded into QGIS (see post: Hyperlinking in QGIS - Add Data to current window). A user provided me with the code, which works perfectly [Python qgis.utils.iface.addRasterLayer("C:\Users\Ryan Garnett\Dropbox\SpatialData\Imagery\Landsat\%Image")]. I am hoping to modify this code so that I can do two different actions: 1) Load data from a PostGIS Database 2) Have a zip file saved to a location on a local computer I have data stored in a PostGIS database (ie: LUGDC as the Database, basedata as the Schema, bound_poly as the Table). In some instances there may be points, lines and polygons for the regon, so I am thinking of an Action for each of the geometry types. With regards to the zip files, I have the files in a shared location, but I would like to have it so the file is copied from that location to a specified location on a local machine through an action. Any help would be appreciated. Thanks...


Does Leaflet always work in decimal degrees?

I'm looking into Leaflet and I'm surprised that it doesn't (seem to) specify coordinates in Web Mercator like other popular APIs, but instead uses decimal degrees. Are all coordinates in Leaflet specified in decimal degrees? Is there a function to translate into other coordinate systems (as in the geographicToWebMercator option in ArcGIS)? Thanks


Using Geocode Service Published to ArcGIS Server Within Silverlight Web Map

I'm trying to replicate this sample on my web map. I have been able to build it successfully as-is within VS 2010. However, I run into some issues when I try to get it to work with my services. I've successfully been able to display my map service, but I’m getting snagged up on the geocoding part. My geocode service is published and working fine (tested it within REST). Also, a ClientAccessPolicy.XML is on our server so I don't believe there are access issues. On the xaml side of things, I've removed all but the Address stackpanel. I think my problems are arising on the C# side. This is the bit of code I believe is giving me troubles:                  private void FindAddressButton_Click(object sender, RoutedEventArgs e)         {             Locator locatorTask = new Locator("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/" +                 "Locators/ESRI_Geocode_USA/GeocodeServer");             locatorTask.AddressToLocationsCompleted += LocatorTask_AddressToLocationsCompleted;             locatorTask.Failed += LocatorTask_Failed;             AddressToLocationsParameters addressParams = new AddressToLocationsParameters();             Dictionary<string, string> address = addressParams.Address;                             if (!string.IsNullOrEmpty(State.Text))                 address.Add("Address", Address.Text);             if (!string.IsNullOrEmpty(City.Text))                 address.Add("City", City.Text);             if (!string.IsNullOrEmpty(State.Text))                 address.Add("State", State.Text);             if (!string.IsNullOrEmpty(Zip.Text))                 address.Add("Zip", Zip.Text);                  if (addressParams.Address.Count == 0)             {               GraphicsLayer graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;               if (graphicsLayer !=null)                 graphicsLayer.ClearGraphics();               CandidateScrollViewer.Content = null;               CandidatePanelGrid.Visibility = Visibility.Collapsed;               MessageBox.Show("No address field entered.");               return;             }                       locatorTask.AddressToLocationsAsync(addressParams);         }      I've replaced the GeocodeServer URL with my service. A little further down are IF statements that deal with parameters and I’m not sure how to handle. I initially tried to remove all but the first IF statements, but I get errors when I go to interact with the map (it builds successfully). I'm not a programmer so I'm not sure how involved it would be make the manipulations necessary to get this function to work. In essence, all I need is a single input parameter, Address. I have successfully manipulated the xaml side to display a single input parameter, know I just need to manipulate C# code to make this work. Any help would be awesome.


query raster in ArcGIS 10

I am using `ArcGIS 10` (includes `spatial` and `geostatistical analyst`). I have a `raster` (GRID) with a value range of -167 to 18. I would like to `query` the raster and create a new one with only the values between -117 and -69. I cannot figure out how to use the `raster calculator` to do this task. Any suggestions?


Performing a Multicriteria Analysis Using Distance Along a Road Network

There is the possibility that I will be working on a project which will look at thousands of properties in a region and measure their accessibility to different services (schools, parks, hospitals, etc). The idea is that this will highlight properties which are best serviced and properties which need better services. I've decided that a raster-based multi-criteria analysis would be ideal for this task. For previous MCA which I have performed, I've always used the Euclidean Distance for calculating distance from objects (water, forests, etc). However, for this example, this doesn't really make a lot of sense since the services would most likely be accessed via the existing road network. In the past, I have also performed an accessibility analysis using the Two Step Floating Catchment Area Method (here and here) to determine accessibility to doctors. I used the road network (with Network Analyst Extension) for this process. The accessibility was applied to a suburb level, not to an actual property. I was thinking I may need to create an attribute for accessibility to all of these services for each property. I could potentially weight them as another attribute. However, an answer to this question states that a raster approach is more ideal. Is there a way to incorporate the accessibility to these services in the form of a raster? Note, we have not yet got the job and I do not have any data to post. Let me know if more clarification is needed. I have ArcGIS and could potentially use the Spatial Analyst and Network Analyst Extensions. However, I'm open to using QGIS and GRASS as well if it's possible. Thanks.


How do I query highways with overpass turbo?

I want to use overpass to show **major highways** for a US city. How can I query that from overpass turbo? I tried the following code here and it returns tons of dots. I really want only lines showing the major highways               <!--     This has been generated by the overpass-turbo wizard.     The original search was:     “highway”     -->     <osm-script output="json" timeout="25">       <!-- gather results -->       <union>         <!-- query part for: “highway” -->         <query type="way">           <has-kv k="highway"/>           <bbox-query {{bbox}}/>         </query>       </union>       <!-- print results -->       <print mode="body"/>       <recurse type="down"/>       <print mode="skeleton" order="quadtile"/>     </osm-script>


ArcGIS Online - Programmatically Upload Tabular Data Source

I have some ArcGIS Online maps and want to reference a simple data source like a CSV or XML file. I know that I can upload the file, but is there a way I could programmatically upload the data file on a scheduled basis? Or in other words, is there an API that I can use in a program or script that allows me to send data files to my ArcGIS Online storage location? The first thought I had was to write a program that connects as me and sends the file by POSTing to the web service, but there might be a better way.


Can an arcpy.da.SearchCursor be used on a dataset residing in a ParcelFabric?

I'm using ESRI's LocalGovernmentMI.gdb data model and am managaing parcel data in a ParcelFabric dataset. I'm trying to use a search cursor on the ParcelFabric_Parcels dataset but I recieve this ... > RuntimeError: cannot open > 'P:\Mapping\Data\LocalGovernmentMI.gdb\ParcelEditing\ParcelFabric\ParcelFabric_Parcels' I'm using this but of code ...               import arcpy          fc = r'P:\Mapping\Data\LocalGovernmentMI.gdb\ParcelEditing\ParcelFabric\ParcelFabric_Parcels'     field = "Name"          with arcpy.da.SearchCursor(fc, field) as cursor:         for row in cursor:             print (row)      If I export the dataset and run the search cursor on that data it works. Any thoughts?


How to add a color table to a one band tiff using GDAL?

I have 1-band GeoTIFF file. The color interpretation for band is gray. I want a color table in order to transform my `Col.tiff` to `Col.jpeg` or `Col.png`. I tried putting a color table in this tiff via a .vrt:               gdal_translate -of VRT  Col.tiff Col.vrt      then adding in the .vrt:               <ColorInterp>Palette</ColorInterp>     <ColorTable>        <Entry c1="0" c2="0" c3="255" c4="240"/>        <Entry c1="0" c2="0" c3="254" c4="240"/>        <Entry c1="0" c2="0" c3="253" c4="240"/>        <Entry c1="0" c2="0" c3="252" c4="240"/>     </ColorTable>      And translate again :               gdal_translate Col.vrt Col.tiff      But it answered:               Warning 1: Unable to export color table to GeoTIFF file.  Color tables can only be written to 1 band or 2 bands Byte or UInt16 GeoTIFF files.      How can I do it? For information, there is gdalinfo for the Band:               Band 1 Block=55x18 Type=Float64, ColorInterp=Gray       Description = Something       Metadata:         GRIB_COMMENT=Something[p]         GRIB_ELEMENT=TMP         GRIB_FORECAST_SECONDS=0 sec         GRIB_REF_TIME=1401926400 sec UTC         GRIB_SHORT_NAME=SMTHG         GRIB_UNIT=[p]         GRIB_VALID_TIME=1401926400 sec UTC


Use Microstation wireframe model for OpenStreepMap

I've got an entire city in Microstation DGN format. I'm able to convert it into Google Earth (KML), DXF, SVG and other formats, and then in .osm with ogr2osm. However, the 3D model is build entirely with wireframes (triangulated polygon strings). This does not seem suitable for .OSM. Does anyone have experience with such problems and is it possible, and will it solve it, to change the model from wireframes into solid surfaces or solid blocks.


How to apply weight to Google heatmap?

I am trying to plot a Google heatmap based on the JSON objects returned. Here is my JavaScript:               function getHeatMap() {      heatLayer = new HeatmapLayer({     config: {         "useLocalMaximum": true,         "radius": 40,         "gradient": {             0.45: "rgb(000,000,255)",             0.55: "rgb(000,255,255)",             0.65: "rgb(000,255,000)",             0.95: "rgb(255,255,000)",             1.00: "rgb(255,000,000)"         }     },     "map": map,     "domNodeId": "heatLayer",     "opacity": 0.85     });          $.ajax({     url: "index.aspx/getBusCommuter",     type: "POST",     data: "",     contentType: "application/json; charset=utf-8",     dataType: "json",     success: function (data) {         var parsed = JSON.parse(data.d);         $.each(parsed, function (i, jsondata) {             var coordXicon = jsondata.BusStopX;             var coordYicon = jsondata.BusStopY;             var commuterAmt = jsondata.CommuterAmt;             var data = [        {            attributes: {},            geometry: {                spatialReference: { wkid: 102100 },                type: "point",                x: coordXicon,                y: coordYicon,                weight: commuterAmt            }        }             ];                  heatLayer.setData(data);              });         map.addLayer(heatLayer);     },     error: function (request, state, errors) {     }     });     }      Basically I tried to set the heat weight by commuterAmt so that it is not just simply plot a heat at each coordinates that I declared. However, it does not work. For every point on the map, it just simply plot a heat without taking account into the commuterAmt. ![enter image description here](http://i.stack.imgur.com/zrEsj.png) Attached image shows the heat plotted on each bus stop. Although each bus stop has different commuterAmt but the heat seems all the same. I wonder is there any alternate way to set the weight as the heatmap used in Google Maps.


Has anyone else experienced this? Aerials and shapefiles shifted!

I was doing some work with points and moved from one road to another parallel one, when all the sudden my parcel lines were completely shifted as were the points, and roads from the aerial. I re-opened ArcMap, same deal, over the entire map! Since I have re-added the layers to a fresh mxd and everything looks normal. It was just a weird occurrence and I'm wondering if anyone else has experienced something similar? So strange!


pyQGIS (Spatial Join): Sum features of attribute from point layer and join with vector layer

I am new to Python and QGIS. I have avoided asking questions up to now. But by now I have developed a reasonable idea of where i want to go so and where I am stuck. So, I have decided to ask but sorry if the question is too naive: I am using QGIS 2.0.1 and Python 2.6.1 What I need: I have a layer consisting of polygons which I want to spatially join with a layer of points. However, I am particularly interested in the sum of features of a particular attribute from the points layer which I want to join with the vector layer to conduct my analysis. Hope that was sufficiently clear. I am still in the process of understanding what is happening. Thus, would be happy about any advice on how to proceed. What I have understood so far: _Set the scene_               qgis.utils.iface     import qgis.core      _Import stuff_               LayerVector=QgsVectorLayer("x.shp", "x_name", "org")     LayerPoint=QgsVectorLayer("y.shp", "y_name", "org")          _Define stuff_          VectorI=LayerVector.fieldNameIndex('bearing')     PointI=LayerPoint.fieldNameIndex('bearing')     VectorF=LayerVector.getFeatures()     PointF=LayerPoint.getFeatures()          _edit_          VectorF.startEditing()          _loop stuff_          for i in VectorF:         for j in PointF:            if j().intersects(i.geometry()) == True:      ?Some function creating an attribute and accumulating integers from features fullfilling the above statement               _edit_          VectorF.commitChanges()      Thanks a lot. G


Openlayers Custom Renderer - Multiple polygons

I want to render more than one polygon for a feature in a vector layer. So, for example given a polygon render it as normal, then render it again with a different colour and offset by a Y value. I may also need to operate on the additional geometry to clip it. This would give a pseudo 3D effect. I know I can do this by using multiple layers but this seems really inefficient. I looked at extending the SVG renderer to do this and have successfully rendered multiple polygons from the drawPolygon method. BUT the style is fixed as this method simply adds the SVG path to a created node. Is there a better way to achieve this. Ideally, I want to render a wall, floor and roof for a feature, all will have differing geometries and colours. But I don't want to have to pull the geometry from the server 3 times which is what will happen if I use three layers.


Programatically detect the format/version of an arc toolbox (e.g. 10.0,10.1 etc)

Is there a way to tell programatically (from the command line) what format a given ArcMap toolbox was saved in - 10.0, 10.1 and so on?


Report Analysis Steps in ArcMap 10

Is there any way to report all the steps I did within a ArcMap project. this could help me to:   * Make a Metadata description   * Trackback possible errors afterwards and/or control the analysis   * Easier repeat the analysis some other day When working with scripts you don't need that beacause they clearly describe what has been done but when clicking around it would be fine to be able to see afterwards what was done. So instead of writing it all down to a textdocument I'm searching for an easy and convinient way to save this automatically. thx for your help.