Get Type of Arcobjects objects

Trying to check the type of some Elements if they are `(ITextElement , MarkerElement)`, when i try `.getType()` function it returns always "System._COM_object". How i could get the type of an object if i don't know its type before ? because i could only detect the types that i pretend using `(obj as Interface) != null`. but for the types that i don't pretend i get always `null` from `(obj as Interface)` . Any help please.


How to serve OpenStreetMap Tiles locally using ArcGIS Server 10?

We want to serve OpenStreetMap Tiles locally using ArcGis Server 10 to use as base maps in our ESRI Silverlight and Flex GIS clients. We've downloaded our regions OSM file and created PNGs using **Maperitive** for Zoom 1 thru 18 and tested with **Leaflet**. Also used a script to generate PGW files for each PNG. Is this goal possible, should we use raster datasets or something different ?


Error at or near "select" PostGIS

I'm using node.js to connect to a PostGIS database to check if an input feature significantly intersects with an existing feature. The error seems to be with the nested SELECT statement - can anyone correct this for me? I've checked that the randomnum and drawingGeo variables are valid inputs (examples below). the_geom is also definitely the geometry column. > drawingGeo = > {"type":"Polygon","coordinates":[[[-337154.39223673707,6715717.913400569],[-337111.09782618494,6715721.794968411],[-337102.4389440745,6715706.865861325],[-337135.2829796658,6715702.088547057],[-337154.39223673707,6715717.913400569]]]} > randomnum = 11702               var drawquery = client.query('SELECT gid from buildings          where(st_area(st_intersection(ST_GeomFromGeoJSON("'+drawingGeo+'"),ST_GeomFromGeoJSON(             SELECT ST_AsGeoJSON(the_geom) from buildings where gid = '+randomnum+'))))/                 st_area(ST_GeomFromGeoJSON("'+drawingGeo+'")) > .8');      EDIT: Error given in node:               events.js:72             throw er; // Unhandled 'error' event               ^     error: syntax error at or near "type"      Error when I copy the query into PgAdmin:               ERROR:  syntax error at or near "SELECT"     LINE 2: ...141033,6706842.085406107]]]}'),ST_GeomFromGeoJSON(SELECT ST_...                                                              ^          ********** Error **********          ERROR: syntax error at or near "SELECT"     SQL state: 42601     Character: 335


How are Esri's ArcGIS,Google Maps, Mapbox different in their products in providing support maps for Web/App developers?

I am trying to understand their business models. I am not a techie - Angle guy. So kindly explain in layman terms.How is Mapbox innovating?


Qgis action adding layers using relative paths

in QGIS 2 windows I have some index layers I use for loading raster and vector tiles through an Python action. Currently I am using absolute paths which works fine but I would like to set it up so other teams can use the tiles. I have been trying to get the path of the active layer (the index layer) and use that but had no luck. I would also like to be able to load the new layers in a specific group to keep projects tidy - can this be done?


Connect AutoCAD Map 3D 2014 with MySQL

I need to connect AutoCAD Map 3D 2014 with an Spatial MySQL database (version 5.5) but first I have to install " **libmysql.dll** " to connect as specified in the software user's manual. This file is currently inside MySQL 5.5 instalation folder. I've tried to register it using the typical regsvr32.exe step in comand line, both as Administrator and not. I've tried to put this file inside system32 and syswow64 folders (as I have W7 x64) and then tried to register again. I've tried to place the file inside the AutoCAD Map 3D 2014 folder (bin/FDO) and then register again. Every time I get an error saying that the module was loaded but the DllRegisterServer was not found. In the program's help it is specified that libmysql.dll must be installed before connecting but doesn't say **how** and **where**. I know it's not the most used GIS but maybe someone had to deal with a similar problem using MySQL 5.5. Can someone specify it please?


ST_Length (GEOM, true) for calculating distances in Geographic Reference System

Good afternoon all, I use (1) ST_Length (ST_Transform (geom, 3395)) to get distances in meters from points in Geographic Reference Systems EPSG: 4326. The thing is I found that with (2) ST_Length (geom, true) you can get also the distance in meters but using the spheroid. Am I right? Is the option (2) more accurate if the GIS project use a Geographic Reference System for Global data, especially near to the poles? Many thanks, ST_Length reference: http://postgis.org/docs/ST_Length.html EPSG:3395 reference: http://spatialreference.org/ref/epsg/3395/


Extract MultiValuesToPoints yields identical value for each band

I'm attempting to extract hyperspectral remote sensing data to a point featureclass using the ExtractMultiValuesToPoints ArcGIS tool. The value of each band (228 bands) should be appended as a field to each point in the input feature class. The problem is: each appended field contain identical values for each point. So it seems that only the value of the first band is extracted and assigned to each next band. Does anyone have this same problem? I'd appreciate any comments. I've scripted the tool as follows.               import arcpy     import os     inRasts= "L:/MyData/StudySite.IMG"     fcDir= "L:/MyData/Geo.gdb"     fcIn= "Plots"     inPoint= os.path.join(fcDir, fcIn)     arcpy.sa.ExtractMultiValuesToPoints(in_point_features= inPoint, in_rasters= inRasts, bilinear_interpolate_values= "NONE")      The Remote sensing image properties are:   * data type: File System Raster   * Format: IMAGINE Image   * pixel type: floating point   * Admittedly, the raster data may be a bit weird. The NoData pixels have a pixel value of -3.40282346639e+038 I don't quite know how I ended up with that, must be a rounding error somewhere. I'm using ArcGIS 10.1 on W7 computer. I cannot find any service packs installed. Thanks in advance!


How to retain crs data when datum-shifting using ogr2ogr?

I'm converting a shapefile from OSGB36 to WGS84 using ogr2ogr like so: `ogr2ogr -f "ESRI Shapefile" new.shp original.shp -s_srs EPSG:27700 -t_srs EPSG:4326` However, the original contains the following CRS data (obtained using Fiona):               {u'ellps': u'airy',      u'k': 0.9996012717,      u'lat_0': 49,      u'lon_0': -2,      u'no_defs': True,      u'proj': u'tmerc',      u'towgs84': u'446.448,-125.157,542.06,0.15,0.247,0.842,-20.489',      u'units': u'm',      u'x_0': 400000,      u'y_0': -100000}      Whereas the converted file only contains the following:               {u'datum': u'WGS84',      u'no_defs': True,      u'proj': u'longlat'}      Ideally, I want to retain the `lat_0` and `lon_0`, in particular. I can't seem to find any mention of how to do this in the docs, though.


How can I use Leaflet with esri-leaflet and ArcGIS Online services

I've used public ArcGIS Online services plenty of times in ESRI JS web apps and I imagine that using them as layers in Leaflet is pretty much the same. The one problem I can see is how would one access a private service? In the ESRI JS api provides an Identity Manager to facilitate OAuth and cookie handling. Leaflet provides no such facilities. Has anyone done this?


Transparency in Labels/annotations

I am trying to get my labels transparent. I have converted them into annotation and unable to make the annotations transparent. I have kept annotation in the map. My annotation layer does not appear on table of contents! Ideas of getting the lables transparent or annotations transparent will be appreciated.


How can a single line be computed from multiple possibilities

I have datasets containing continuous GPS streams of data that represent routes or trails. For any given route, I probably have at least 5 (in some cases many more) different sets of data. Given that it's uncorrected GPS data, there can be a lot of variation in the location of the route. Is there a way to algorithmically computing the "best" representation of the location of the route? Does anyone know of an implementation in existing softare? The only literature I've found thus far is this, which looks promising, but would be custom development.


Adding ECW file to MXD with ArcPy?

I'm using Desktop 10.2 and I tried ,with this script, to add ecw file to mxd's but the result is a black & white raster(stretched symbology) instead of colored raster(RGB composite symbology) :               import arcpy     import arcpy.mapping     import os     import sys     from arcpy import env     import string               env.workspace = r"C:\project"     for mxd in arcpy.ListFiles("*.mxd"):       print mxd       mapdoc = arcpy.mapping.MapDocument(r"C:\project\\" + mxd)       df = arcpy.mapping.ListDataFrames(mapdoc, "Layers")[0]       Layer1 = arcpy.mapping.Layer(r"C:\project\layers\F1292_KVISH6_25CM_.ecw")       arcpy.mapping.AddLayer(df ,Layer1 )       mapdoc.save()     del mxd # i added      this is the image i get: ![black & white image](http://i.stack.imgur.com/6dPM5.jpg) i don't know how to changed the python script so i will get RGB colored image ?


Where can I find historic maps of city size?

I'm interested in examining basic dimensions of city size, primarily area (though population would also be of interest) from the earliest possible records. It does not matter where the city is in the world - though ideally there would be several measures through time. I realize that the much of this will not be digitized which is ok; I'm just looking for any sources.


Creating trade flow maps in ArcGIS for Desktop (or any free software)?

I am trying to represent trade flows on a world map where the size and direction of arrows indicate the exports/imports of a given country. This type of map is commonly found in magazines and newspapers. However, I find it extremely difficult to make. Is there any function in ArcGIS for Desktop or any free software that would help me in making it?


Testing IIS and Tomcat fails, How to solve it?

I'm installing and configuring arcims 9.3 and I have many problems with it. I followed all steps in ESRI article here (http://support.esri.com/en/knowledgebase/techarticles/detail/35515), but I have a problem with step 8. When I verify IIS and Tomcat were installed successfully, when I enter test URL in my browser:               http://localhost/examples/servlets/servlet/HelloWorldExample      An error occurs, HTTP 400 Bad Request. So what can I do about the issue, my OS is Windows 7.


problem merging polygons based on a column value - using Spatialite

**edit:** as I am unfamiliar with any tools I decided to try my luck with PostGis. I imported my data. and executed the query :               create merged as     select delomrade_code, st_union(geometry)     from grunnkrets     group by delomrade_code      it seems to be doing a much better job on my data. first it executed in minutes not in hours. and the result set has only 6 MULTIPOLYGONS out of 1546 as oppose to over 200 I got with the Spatialite. I'm OK with this result and will try to dig deeper and understand why I couldn't get these 6 areas as I wanted. Thank you all for your help ! / _---------------------_ / I'm new to GIS. I have seen relevant and possibly duplicate questions but can't solve this problem. I'm using Spatialite. I have a table with the basic statistical area units of norway (Grunnkrets) - 13990 polygons. I added a column to the table named "delomrade_code" with the code of groups of these smaller polygons - 2224 unique values. I'm trying to convert the these 13990 polygons to 2224 bigger polygons containing these smaller polygons. first I tried running the query :               select delomrade_code, GUnion(Geometry) as geometry     from Grunnkretser     group by delomrade_code      **/edit: ** The result geometry column has mostly polygons (success) but a few hundred lines contain MULTIPOLYGONS. I need the result to be polygons only. what do I need to do in order to try to avoid the multipolygons in the result ? I suspect there is some minor difference in LatLng of point in adjoining polygons and therefore GUnion fails to merge these polygons. I then tried running :               select delomrade_code, GUnion(Buffer(Geometry, 0.02)) as resulting_polygon     from grunnkretser     group by delomrade_code      results were better, more of the 2224 rows in the result were polygons but still not all. The documentation of the `Buffer` function says : > return a geometric object defined by buffering a distance d around geom, > where dist is in the distance units for the Spatial Reference of geom   1. How do I find my : > ...distance units for the Spatial Reference of geom >   2. am I in the right direction at all ? can anybody suggest a solution ? >


GME use in ArcGIS 10

I have downloaded GME from spatialecology.com but I can not find a toolbar for it in ArcGIS 10. Should I be able to use GME within ArcGIS? If so, how do I add the extension. If not, how do I run GME? Thanks, James


How to determine area of pixel in meters with GDAL and Python?

I have a raster loaded in Python using GDAL bindings. I'd like to be able to determine the area of a pixel in meters although I'm not confident that the projection is in meters. On this page I see a reference to `OGRSpatialReference::GetLinearUnits()`, but no corresponding Python bindings. Any suggestions on how I can determine the are of a pixel in meters? _EDIT:_ Here's an example of how to get at the linear units:               srs = osr.SpatialReference()     srs.SetProjection(dataset.GetProjection())     print srs.GetLinearUnitsName(), srs.GetLinearUnits()


Error accessing spatial database connection with ArcGIS 10

I set up a new SDE database with ArcGIS 10 and everything appeared to go correctly. The service is running and I'm able to view the database in SQL Server. However, when I try to access the spatial database connection in ArcCatalog 10, I get the following error: > Failed to connection to the specified server. This release of the > GeoDatabase is either invalid or out of date. DBMS table not found > [Microsoft SQL Server Native Client 10.0: Invalid object name > 'sde_mymap.dbo.GDB_Release'.] [sde_mymap.dbo.GDB_Release] Both ArcSDE and ArcCatalog are version 10. I checked the sde_setup.log file and I can find no record of that table being created, or any other errors. Please advise. Thanks, Seth


WMS Meteorological Data sources?

I was looking in Google Earth and saw lots of feeds/KMZ for historical and current Hurricanes. I am after some Meteorological WMS feeds into data that is related to past and present hurricanes and topical storms [like Irene (2011)] so that I can create a mashup, most likely in one of the ESRI APIs. Meteorological data in particular, but anything else you think would be relevant.


postGIS: what is more efficient: single or two-point search

I have seen different approaches to conducting searches. Which is the best approach in storing the data for database efficiency:   saving both longitude and latitude points               longitude     latitude      vs saving a generated point from both longitude latitude?               POINT(#{longitude} #{latitude})      Context: `rails 3.2.18 application`, `postgresql 9.3.4`, `postgis 2.1.3`   Two types of queries are to be conducted for finding objects:   1. Point with radius and    2. Within a polygon Instinctively, a single point would mean less indexing.   Jason Scheirer's comment below is of the same opinion: `I would think that having the point geometry pre-generated as a column value would be more efficient than building it for each row on every query.` However, that does not mean there are underlying mechanics, particularly for the polygon, are more efficient in one mode rather than the other...


Is there any pseudocode for MFD (multiple flow direction) algorithm available?

Still stuck with the simulation system, is there any good pseudocode for the multiple flow direction (MFD) algorithm? I read a pseudocode example and implemented it, however the simulation was linear: that is the first cell gets the highest amount of rainfall and the last cell does not get any water. I'm resorting to sorting the elevation of the cells from highest to lowest so that the water would spread out properly. I don't want to use r.terraflow or TOPMODEL since this is an independent project and I don't want to use existing simulation systems. Any ideas as to how to implement MFD or correct my algorithm would be very appreciated. BTW, null values were set to -500 by the DEM reader. The code is implemented in C# and is not yet optimized, I just want a correct MFD simulation at the moment. * * *               static void rainfallAlgo() {       double total, percentage, transfer;       double[] tile = new double[10];            for (int i = 0; i != Convert.ToInt32(totalRow); i++){         for (int j = 0; j != Convert.ToInt32(totalCol); j++){           if ((elev[i, j] != -500)&&(elevrain[i,j]>=elev[i,j])){            Console.WriteLine();             total = 0;             for (int k = 1; k <= 9; k++){               if (k != 5){                 tile[k] = compare(i, j, k);                 total += tile[k];               }             }             for (int k = 1; k <= 9; k++){               if (total == 0){                 Console.WriteLine("I am ZERO");                 total = 1;               }               if (k != 5){                 percentage = tile[k] / total;                 Console.Write(k+ ":");                 Console.WriteLine(percentage);                 transfer = percentage * (elevrain[i,j]-elev[i,j]);                 if (k == 1)                   elevrain[i - 1, j - 1] += transfer;                 else if (k == 2)                   elevrain[i - 1, j] += transfer;                 else if (k == 3)                   elevrain[i - 1, j + 1] += transfer;                 else if (k == 4)                   elevrain[i, j - 1] += transfer;                 else if (k == 6)                   elevrain[i, j + 1] += transfer;                 else if (k == 7)                   elevrain[i + 1, j - 1] += transfer;                 else if (k == 8)                   elevrain[i + 1, j] += transfer;                 else if (k == 9)                   elevrain[i + 1, j + 1] += transfer;               }             }             if(total!=1)               elevrain[i, j] = elev[i, j];             Console.WriteLine(elevrain[i,j]);           }         }       }     }               static void addRain(){       rainfall = new double[Convert.ToInt32(totalRow), Convert.ToInt32(totalCol)];       elevrain = new double[Convert.ToInt32(totalRow), Convert.ToInt32(totalCol)];            int i = 0, j = 0;            while (i != Convert.ToInt32(totalRow)){         while (j != Convert.ToInt32(totalCol)){           rainfall[i, j] = 2;           elevrain[i, j] = elev[i, j] + rainfall[i,j];           j++;         }         i++;         j = 0;       }     }          static double compare(int i, int j, int k){       double total=0;       if( k==1 ) {         if ( (elevrain[i, j] > elevrain[i - 1, j - 1] ) && (elev[i-1, j-1]!=-500.0) )           total = (elevrain[i, j] - elevrain[i - 1, j - 1]) / 1.414213562373095;         else           total = 0;       } else if( k==2 ) {         if ( (elevrain[i, j] > elevrain[i - 1, j]) && (elev[i - 1, j] != -500.0))           total = elevrain[i, j] - elevrain[i - 1, j];         else           total = 0;       } else if( k==3 ) {         if ( (elevrain[i, j] > elevrain[i - 1, j + 1]) && (elev[i - 1, j + 1] != -500.0) )           total = (elevrain[i, j] - elevrain[i - 1, j + 1]) / 1.414213562373095;         else           total = 0;       } else if( k==4 ) {         if ((elevrain[i, j] > elevrain[i, j - 1]) && (elev[i, j - 1] != -500.0) )           total = elevrain[i, j] - elevrain[i, j - 1];         else           total = 0;       } else if( k== 6 ) {         if ( (elevrain[i, j] > elevrain[i, j + 1]) && (elev[i, j + 1] != -500.0) )            total = elevrain[i, j] - elevrain[i, j + 1];         else           total = 0;       } else if( k== 7 ) {         if ( (elevrain[i, j] > elevrain[i + 1, j - 1]) && (elev[i + 1, j-1] != -500.0) )           total = (elevrain[i, j] - elevrain[i + 1, j - 1]) / 1.414213562373095;         else           total = 0;       } else if ( k== 8 ) {         if ((elevrain[i, j] > elevrain[i + 1, j]) && (elev[i + 1, j] != -500.0) )           total = elevrain[i, j] - elevrain[i + 1, j];         else           total = 0;       } else if ( k== 9) {         if ( (elevrain[i, j] > elevrain[i + 1, j + 1]) && (elev[i + 1, j +1] != -500.0) )           total = (elevrain[i, j] - elevrain[i + 1, j + 1]) / 1.414213562373095;         else           total = 0;       }       return total;     }


OpenLayers vector does not draw (or re-draw) on zoom level change or layerswitcher off/on

Here is the full code (i'll highlight the important parts after):               jQuery(document).ready(function($) {          // =========================================================================================================================================     // -----------------------------------------------------------------------------------------------------------------------------------------     //      DEFINE THE OPENLAYERS MAP     // -----------------------------------------------------------------------------------------------------------------------------------------     // =========================================================================================================================================              //var pathArray = window.location.href.split( '/' );         //var base_url = pathArray[0] + '://' + pathArray[2];              // Base URL (Modified by provisioning script)         var base_url = 'http://192.168.111.222'              // Set up URL's         var arctic_wms = base_url.concat('/geoserver/arctic/wms');         var arctic_wfs = base_url.concat('/geoserver/arctic/wfs');              // User the OpenLayers ProxyHost         OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";              // Define OpenLayers click Control         OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {                                         defaultHandlerOptions: {                             'single': true,                             'double': false,                             'pixelTolerance': 0,                             'stopSingle': false,                             'stopDouble': false                         },                              initialize: function(options) {                             this.handlerOptions = OpenLayers.Util.extend(                                 {}, this.defaultHandlerOptions                             );                             OpenLayers.Control.prototype.initialize.apply(                                 this, arguments                             );                              this.handler = new OpenLayers.Handler.Click(                                 this, {                                     'click': this.trigger                                 }, this.handlerOptions                             );                         },                               trigger: function(e) {                             var lonlat = map.getLonLatFromPixel(e.xy);                             // Create the json_string for frames/get/closest                             json_string = '{ "type": "Feature", "properties": { "location": "arctic", "x":' + lonlat.lon + ', "y": ' + lonlat.lat + ', "season_names": [ "" ] } }';                                  // Make the ajax call                             $.ajax({                                 url: base_url.concat('/ops/frames/get/closest'),                                 type: "POST",                                 data: ({app:'rds',data:json_string}),                                 success: function(response){click_alert(response);},                                 error: function(){alert('Error creating popup');}});                         }                     });              // DEFINE OpenLayers MAP Options         var options = {             maxExtent: new OpenLayers.Bounds(-1500000,-4000000,1500000,0),             units: 'm',             projection: "EPSG:3413",              // Add controls to the map         controls: [new OpenLayers.Control.Navigation(),             new OpenLayers.Control.ZoomBox(),             new OpenLayers.Control.PanZoomBar(),             new OpenLayers.Control.MousePosition({prefix: '' +'EPSG:3413: '}),             new OpenLayers.Control.ScaleLine(),             new OpenLayers.Control.LayerSwitcher({'ascending':false})]};              // DEFINE MAP OBJECT AND POPUP VARIABLE         var map = new OpenLayers.Map('map',options);              // ADD AND ACTIVATE CLICK         var click = new OpenLayers.Control.Click();         map.addControl(click);         click.activate();              // DEFINE WMS LAYERS FOR MAP         var grn_coast = new OpenLayers.Layer.WMS("Greenland Coastline",arctic_wms,{layers: 'arctic:greenland_coastline'});         var grn_nat_90 = new OpenLayers.Layer.WMS("Greenland Natural 90m",arctic_wms,{layers: 'arctic:greenland_natural_90m'});         var grn_bw_45 = new OpenLayers.Layer.WMS("Greenland BW 45m",arctic_wms,{layers: 'arctic:greenland_bw_45m'});         var rds_fl = new OpenLayers.Layer.WMS("Radar Depth Sounder Flightlines",arctic_wms,{layers: 'arctic:arctic_rds_line_paths',transparent:true,isBaseLayer:false});         var accum_fl = new OpenLayers.Layer.WMS("Accumulation Radar Flightlines",arctic_wms,{layers: 'arctic:arctic_accum_line_paths',transparent:true,isBaseLayer:false},{visibility:false});         var snow_fl = new OpenLayers.Layer.WMS("Snow Radar Flightlines",arctic_wms,{layers: 'arctic:arctic_snow_line_paths',transparent:true,isBaseLayer:false},{visibility:false});         var kuband_fl = new OpenLayers.Layer.WMS("KU Band Radar Flightlines",arctic_wms,{layers: 'arctic:arctic_kuband_line_paths',transparent:true,isBaseLayer:false},{visibility:false});         var polybound = new OpenLayers.Layer.Vector("Polygon Search Boundary",{'displayInLayerSwitcher':false});         var selectLine = new OpenLayers.Layer.Vector("Selected Line Vector",{'displayInLayerSwitcher':false});              // ADD DRAWING CONTROLS TO THE MAP         drawControls = {polygon: new OpenLayers.Control.DrawFeature(polybound,OpenLayers.Handler.Polygon)};         for(var key in drawControls) {map.addControl(drawControls[key]);};              // STORE PROJ4 PROJECTIONS         var wgs = new Proj4js.Proj('EPSG:4326');         var ups = new Proj4js.Proj('EPSG:3413');                  // Deactivate drawing on double-click             drawControls['polygon'].events.register("featureadded",' ',endDraw);                 function endDraw(data){                          // Deactivate                     drawControls['polygon'].deactivate();                           // Transform the polygon to WGS84 (EPSG:4326)                     var polybound_wgs  = polybound.features[0].geometry.transform(new OpenLayers.Projection("EPSG:3413"),new OpenLayers.Projection("EPSG:4326"));                          // Get the extent/vertices of the polygon drawn                     var polyExt = polybound_wgs.getBounds();                     var poly = polybound_wgs.getVertices();                          // Set the coordinate boxes to the polygon bounds                     max_lat.value = polyExt.top; min_lat.value = polyExt.bottom; max_lon.value = polyExt.right; min_lon.value = polyExt.left;                      };                  // Clear any polygons on re-activation of draw             drawControls['polygon'].events.register("activate",' ',clearLayer);                 function clearLayer(data){polybound.removeAllFeatures();};              // ADD LAYERS TO MAP AND ZOOM TO MAP EXTENT         map.addLayers([grn_coast,grn_nat_90,grn_bw_45,rds_fl,accum_fl,snow_fl,kuband_fl,polybound,selectLine]);         map.zoomToMaxExtent();          // =========================================================================================================================================     // -----------------------------------------------------------------------------------------------------------------------------------------     //      TOOLS FOR THE BROWSER     // -----------------------------------------------------------------------------------------------------------------------------------------     // =========================================================================================================================================               $('#draw_bound').click(function() {         alert("POLYGON DRAWING INSTRUCTIONS:\n\nLeft-Click to add a vertex to your polygon.\nDouble-click to end drawing.");              // Activate The Polygon Drawing Tool         drawControls['polygon'].activate();     });          $('#clear_bound').click(function() {         polybound.removeAllFeatures();     });          $('#clear_coords').click(function() {         max_lat.value = ""; min_lat.value = ""; max_lon.value = ""; min_lon.value = "";     });          $('#clear_frame').click(function() {         selectLine.removeAllFeatures();         if (typeof popup != 'undefined'){map.removePopup(popup);};     });          $('#get_csv').click(function() {              document.getElementById("status").innerHTML = "
STATUS: GENERATING CSV
";              // Check if max_lat,min_lat,max_lon,min_lon are empty         if (max_lat.value == "" || min_lat.value == "" || max_lon.value == "" || min_lon.value == ""){             alert('Please enter coordinates or "Draw Boundary" to get CSV');document.getElementById("status").innerHTML = "
STATUS: NORMAL
";}              else{                  alert('Your CSV is being generated. A download will pop-up when the file is ready. Make sure your pop-up blocker is disabled.');                  // Construct the bound polygon 'POLYGON((min_lon min_lat,min_lon max_lat,max_lon max_lat,min_lon min_lat,min_lon min_lat))'             var mla = min_lat.value; var mlo = min_lon.value; var mala = max_lat.value; var malo = max_lon.value;             var bound_str = ("POLYGON(("+mlo+" "+mla+","+mlo+" "+mala+","+malo+" "+mala+","+malo+" "+mla+","+mlo+" "+mla+"))");                  // Check if polygon string from draw exists (if so overwrite bound_str)             if (typeof polybound_wgs != 'undefined' && polybound_wgs != ""){bound_str = polybound_wgs;};                  // Construct JSON string             var json_string = JSON.stringify({'bound':bound_str,location:'arctic'});                  // Call the get csv django view and return the response             $.ajax({                 url: base_url.concat('/ops/layer_points/get/csv'),                 type: "POST",                 data: ({app:$('#system').val(),data:json_string}),                 success: function(response){csv_alert(response);},                 error: function(){alert('Error creating CSV. Unknown Error.'); document.getElementById("status").innerHTML = "
STATUS: NORMAL
";}});         };     });          function csv_alert(response){         if (response.status == 0) {alert(response.data); document.getElementById("status").innerHTML = "
STATUS: NORMAL
"; return;};         alert('Your CSV is ready for download, a new window will open. Please save the link, your csv will be available on the server for 7 days.');         document.getElementById("status").innerHTML = "
STATUS: NORMAL
";         return window.open(response.data,'CSV Download Ready','width=600,height=200');     }          function click_alert(response){              // Clear the previously selected line         selectLine.removeAllFeatures();              // Clear any existing popups         if (typeof popup != 'undefined'){map.removePopup(popup);};              // Parse the response from django         data = jQuery.parseJSON(response.data);              // Create the vector feature and plot the vector         var points = new Array();         for (idx=0;idx<=data.x.length;idx++){             points.push(new OpenLayers.Geometry.Point(data.x[idx],data.y[idx]))             };         var line = new OpenLayers.Geometry.LineString(points);         var style = {strokeColor: '#FF0000',strokeWidth: 5};         var linefeature = new OpenLayers.Feature.Vector(line,null,style);         selectLine.addFeatures([linefeature]);              // weird thing that makes it work...         //data = data;              popup = new OpenLayers.Popup.FramedCloud("Selected Frame", //id             new OpenLayers.LonLat(data.x[0],data.y[0]), //lonlat             null, //contentSize             "
Season: " + data.season_name +"
Frame: " + data.frame_name+"
", //contentHTML             null, //closeBox             true); //closeBoxCallback              map.addPopup(popup);              // Check for NO ECHOGRAM ONLINE         if (data.echogram_url == 'NO ECHOGRAM ONLINE'){alert('No echogram to display in pop-up. Sorry.'); return;};              // Return a new window with the echogram         return window.open(data.echogram_url,'Echogram Image');     }          $('#get_kml').click(function() {              document.getElementById("status").innerHTML = "
STATUS: GENERATING KML
";              // Check if max_lat,min_lat,max_lon,min_lon are empty         if (max_lat.value == "" || min_lat.value == "" || max_lon.value == "" || min_lon.value == ""){             alert('Please enter coordinates or "Draw Boundary" to get KML');document.getElementById("status").innerHTML = "
STATUS: NORMAL
";}              else{                  alert('Your KML is being generated. A download will pop-up when the file is ready. Make sure your pop-up blocker is disabled.');                  // Construct the bound polygon 'POLYGON((min_lon min_lat,min_lon max_lat,max_lon max_lat,min_lon min_lat,min_lon min_lat))'             var mla = min_lat.value; var mlo = min_lon.value; var mala = max_lat.value; var malo = max_lon.value;             var bound_str = ("POLYGON(("+mlo+" "+mla+","+mlo+" "+mala+","+malo+" "+mala+","+malo+" "+mla+","+mlo+" "+mla+"))");                  // Check if polygon string from draw exists (if so overwrite bound_str)             if (typeof polybound_wgs != 'undefined' && polybound_wgs != ""){bound_str = polybound_wgs;};                  // Construct JSON string             var json_string = JSON.stringify({'bound':bound_str,location:'arctic'});                  // Call the get kml django view and return the response             $.ajax({                 url: base_url.concat('/ops/layer_points/get/kml'),                 type: "POST",                 data: ({app:$('#system').val(),data:json_string}),                 success: function(response){kml_alert(response);},                 error: function(){alert('Error creating KML. Unknown Error.'); document.getElementById("status").innerHTML = "
STATUS: NORMAL
";}});         };     });          function kml_alert(response){         if (response.status == 0) {alert(response.data); document.getElementById("status").innerHTML = "
STATUS: NORMAL
"; return;};         alert('Your KML is ready for download, a new window will open. Please save the link, your kml will be available on the server for 7 days.');         document.getElementById("status").innerHTML = "
STATUS: NORMAL
";         return window.open(response.data,'KML Download Ready','width=600,height=200');     }          $('#get_mat').click(function() {alert('MAT download in development.');});     $('#max_lat').blur(function() {         if (max_lat.value > 90){alert("Latitude must be between -90 and 90")};     });          $('#min_lat').blur(function() {         if (min_lat.value < -90){alert("Latitude must be between -90 and 90")};     });          $('#min_lon').blur(function() {         if (min_lon.value < -180){alert("Longitude must be between -180 and 180")};     });     $('#max_lon').blur(function() {         if (max_lon.value > 180){alert("Longitude must be between -180 and 180")};     });     });      So I have a button on an html page that activates the drawing of a polygon on a vector layer. When a feature is added the drawing is halted. When the buttom to draw is clicked again the features are removed, and the cycle starts over. Here is the layer:               var polybound = new OpenLayers.Layer.Vector("Polygon Search Boundary" {'displayInLayerSwitcher':false});      Here is adding the drawing controls:               drawControls = {polygon: new OpenLayers.Control.DrawFeature(polybound,OpenLayers.Handler.Polygon)};     for(var key in drawControls) {map.addControl(drawControls[key]);};      Here is the function that activates drawing:               $('#draw_bound').click(function() {         alert("POLYGON DRAWING INSTRUCTIONS:\n\nLeft-Click to add a vertex to your polygon.\nDouble-click to end drawing.");              // Activate The Polygon Drawing Tool         drawControls['polygon'].activate();     });      This clears any existing features on activation:               // Clear any polygons on re-activation of draw     drawControls['polygon'].events.register("activate",' ',clearLayer);         function clearLayer(data){polybound.removeAllFeatures();};      What happens that I cannot figure out is this:   1. User clicks the draw button and draws a polygon   2. User double clicks and drawing is finished, all is well   3. ERROR HERE: User zooms in/out or uncheks-rechecks the layer in the layer switcher and the polygon they drew disappears. The object still exists, it's just not visible. Any ideas? Thanks.


How to set "hit" tolerance for touch dragging in Openlayers

I have a Openlayers map with a single point feature on. When pressing a button I activate a drag handler. My problem is when using mobile devices dragging the point is virtually impossible. No matter the settings in the stylemap (size of the feature), you have to hit it exactly on the point. Is it possible to set a hit tolerance, or create a buffer? Any alternate solutions is welcome.


How to remove outer boundary in country's administrative shapefile (polygon)?

I got the "rare" shapefile from https://research.cip.cgiar.org which polygon only. But I want to use it with HIU country borderline. How to remove the outermost boundary line easily? Currently after converting to lines I use scissor tool. I know that stupid :( EDIT: Basically I want to reverse the polygonize process (into segmented lines not closed polyline)


How to use ArcGIS Online Web Maps/Apps to Collect Community Input securely?

I want to set up a computer at a public hearing that runs an ArcGIS Online Web Application from my subscription account where citizens can choose from predefined editable point layers I've already created (EX Critical Safety Issue, Transportation Need) to place points in our project study area. I've already customized the point features with the attributes I want to collect (Ex: Date, Name, Address, Comment etc) in a File Geodatabase in ArcCatalog. My first thought was to use a Web Map which allows editing of layers. However, Web Maps are not very secure i.e. a citizen could alter another persons comment and so on. Looking for a direction to take to best implement a data collection web app that allows users to choose my predefined editable layers without being able to click on other citizen comments and edit those as well. In short, I'm looking for a more secure editable Web App template. The big application would be to post this web app on a website to collect the input of people who can't make it to public hearings. I apologize for the long winded question but does someone have a direction I can take? I may be overlooking some very obvious concepts of ArcGIS Online but I feel I should be able to do this.


Using ESRI Dojo version for building web application

If I am using ESRI's JavaScript API for my application, then I cannot load a different version of Dojo other than the one shipped with ESRI. I have to rely on ESRI for Dojo. The map appears in only 3 pages. Do I have to use ESRI Dojo on the rest of the pages? Does ESRI dojo load all components or only things specific to ESRI map? If I want to use other components, can I load those from ESRI?


Problem with creating a "blank" basemap in an application built with arcgis javascript api

I'm building an application where I'd like the user to be able to select a blank basemap from a gallery of basemap options. I've found that if I initialize the app with a "white" "blank" or "none," I get the blank basemap I desire. Unfortunately, when I set this property it seems to "lock" the basemap into the "blank" property. When the user selects a new basemap, such as "topo" from the gallery I've created, the basemap stays blank. On the other hand, if I initialize the app with a basemap such as "topo," the user can switch between other basemaps, but if they try to select "blank" the basemap doesn't change. Even though it isn't listed as an option in the API, is it possible to switch between a "blank" basemap and the others?


Create a Line FeatureClass from IPointCollection

I want to create a new line layer from a point layer. I store the points in an IPointCollection. I want to use that IPointCollection to create a line IFeatureClass. I know how to create a single Feature and how to put it in a layer, but this doesn't work.


Delete rows that share the same geometry value in postgis

Hello I have the following problem: I created a grid in QGIS. For some unknown reason QGIS doesn't tesselate the plane correctly. Sometimes there are polygons with different "id" that represents the same portion of the area. I loaded the Shapefile into postgis (without noticing this) and began to have troubles in queries. When I look for the problem I saw that sometimes 2 or even 4 polygons represent exactly the same region. How could I delete those repeating polygons?


Connect QGIS to the custom application server

I'm new to QGIS and investigating how to migrate one home made GIS application on QGIS. The biggest difficulty for me now is to find the way how to plug QGIS to the application server that is being used now to fetch and save data. What is the right direction to begin with?


Managing outages to make ArcSDE updates?

I would like options to manage ArcSDE outages for making updates to schema, which I am not able to do when users are just reading the feature classes. I would like to not have to stay late to get these changes and I would like to not have downtime for an hour. I imagine well thought design would mitigate this. I need to delete a few objects and create a few objects.


trying to create array reader for feature fields

I am trying to create a functionality that creates array data for any layer that user selects. Now I am able to get all the data in the feature layer that the user selects but I am having some trouble with the `ArrayReader` to which I need to assign the field names of the feature data. So this is field collection loop,               for (var prop in e.features[0].attributes) { attrfields.push(prop); }      As of now I am hard coding the `ArrayReader` like this,               var myReader = new Ext.data.ArrayReader({},[                         {name: 'family'},                         {name: 'species'}                     ]);      I need to replace,               [{name: 'family'}, {name: 'species'}]      with the `attrfields`, which looks like this,               [Object {"Family"}, Object {"Species"}]      Now am confused as to how I should create `attrfields` to replace it in the `ArrayReader`? Any suggesstions?


How do I detect traffic incidents in a set of geospatial gps traces?

I have a large database of gps traces (long, lat, timestamp) and would like to see if I can detect when congestion occurs on roads from that data. Any idea's or pointers on good algorithms to use? I've seen loads of stuff using fixed point collectors (ANPR systems, video cameras, infra-red detectors, etc) but not from GPS traces.


Representing degrees between -1 and 0 in Degrees:Minutes:Seconds

When representing latitude and longitude in degrees, minutes and seconds, with   * -180 <= D <= 180 (or -90 and 90)   * 0 <= M < 60 (0 if D is at an extreme)   * 0 <= S < 60 (0 if D is at an extreme) How can values between -1 degree and 0 degrees be represented? Since there is no distinction between 0 and -0, there is no way to distinguish between 0:12:34 and -0:12:34. Is this just a limitation of this kind of representation, or is there some convention that allows it to cover this gap?


Where/how to find ortophotos

I am very new to Geographic Information Systems. I have a very basic inquery; How do I get hold of the newest ortophoto of South Africa to use as a background map for my GPS data? I'm using QGIS but I guess it doesn't matter which platform/system you use..?


Delete empty attribute columns of a shapefile with QGIS or ogr2ogr

I have a shapefile with a lot of empty columns but many of them are empty. Using QGIS or ogr2ogr, how do I remove all attribute columns where everything is `NULL`?


PostGIS ST_SummaryStats

I need some help writing the sql for returning the "MEAN" value from a raster(in postgis db) that intersects a defined(inquery) polygon(in postgis db). The polygon layer is called: public.farmpaddocks The raster layer is called: public.l8_9385_20131118ndvi_vg94 Both are SRID :3111 I have a field in the public.farmpaddocks table that I would like to filter the result on. Field: farmpaddocks.farmid = '511'. I assume i need to use the ST_Summarystats function? along with intersection and clip ?? This is my first attempt at an intersect. I get no error or result from the pgadmin output pane?? Not sure whats going on. sql:               SELECT      l8_9385_20131118ndvi_vg94.rast,      farmpaddocks.farmid      FROM      public.l8_9385_20131118ndvi_vg94,      public.farmpaddocks     WHERE     farmpaddocks.farmid='511' AND ST_Intersects(l8_9385_20131118ndvi_vg94.rast,     farmpaddocks.the_geom);


drawing tools for (lines,polygon and points) in QGIS 2.4.0

I want to draw lines, polygon and points without necessarily creating a shapefile in QGIS. Please help


Python script does not work for a LGA with space

Thanks! I got my script working now with replace gp.AddMessage() instead of print when running the script in ArcMap and replace the quote with blank as well since Python would include the quotation marks in the LGA name. Attached is my Python script, I add it to ArcToolBox to run. If the LGA name has no space, it works fine, the report file created. The problem is: when the LGA name has a space, it run but no report file is created. If manually run the script with space in LGA name, no report created, but all the debugged messages are corrected. Can somebody help me to look at what goes wrong? I try lot of options, it is still not working for me. I am running ArcGIS10 and Python v2.6.5. Do I need to attach any data for debugging?               # Create the Geoprocessor     import arcgisscripting     gp = arcgisscripting.create(9.3)          gp.overwriteOutput = 1          # Read the arguments for LGA and Status     LGA = gp.GetparameterAsText(0)     CyclewayStatus = gp.GetParameterAsText(1)          #LGA = "Blue Mountains"     #CyclewayStatus = "Existing"     print LGA     print CyclewayStatus          classList = ["Bicycle Lane", "Bicycle Path", "Shared Path", "Separated Path", "Road Shoulder", "Freeway Shoulder", "Mixed Traffic", "Unknown", "No Access Permitted"]          Production_sde = "Database Connections\SPG3p 5154 on sispd4 by LaiS.sde"     cyclewayFC = Production_sde + "\GDA1.CYCLEWAYS\GDA1.CYCLEWAYS"     LGBdysFC = Production_sde + "\GDA1.ADMINISTRATIVE_BOUNDARIES\GDA1.LOCAL_GOVT_BDYS"          # Write the selected features to a new featureclass     gp.workspace = "D:\Data\Python_Cycleways.gdb"          # Put in error trapping in case an error occurs when running tool     try:         # Make a layer from the LGA feature class         gp.MakeFeatureLayer_management(LGBdysFC, "LGBdyslyr")              # Select the required LGA         # eliminate the space as some LGA has a space in between, feature class name created cannot have a space         LGA_s = LGA.replace(' ', '', 3)         print LGA_s              where_clause = " LGA_NAME = '" + LGA + "'"         gp.SelectLayerByAttribute("LGBdyslyr", "NEW_SELECTION", where_clause)              LGAFC = LGA_s + "_LGA"         #print LGAFC +  " is the LGA feature class."              if gp.Exists(LGAFC):            gp.Delete_management(LGAFC)         gp.CopyFeatures("LGBdyslyr", LGAFC)         print LGAFC + " feature class has been created."              # Select the LGA Cycleways with apecified status         gp.MakeFeatureLayer_management(cyclewayFC, "lyr")         where_clause = " STATUS = '" + CyclewayStatus + "'"         gp.SelectLayerByAttribute("lyr", "NEW_SELECTION", where_clause)              StatusFC = CyclewayStatus + "_Cycleways"         if gp.Exists(StatusFC):            gp.Delete_management(StatusFC)         gp.CopyFeatures("lyr", StatusFC)         print StatusFC + " feature class has been created."              # Clip the Cycleways data using the Regions polygon         LGA_CyclewaysFC = LGA_s + "_" + StatusFC         #print LGA_CyclewaysFC + " is the LGA Cycleways feature class."              if gp.Exists(LGA_CyclewaysFC):             gp.Delete_management(LGA_CyclewaysFC)         print "start Clip_Analysis"         gp.Clip_Analysis(StatusFC, LGAFC, LGA_CyclewaysFC)         print LGA_CyclewaysFC + " feature class has been created."              statFC = LGA_CyclewaysFC + "_stat"     #    statFC = StatusFC + "_stat"         if gp.Exists(statFC):             gp.Delete_management(statFC)         gp.Frequency(LGA_CyclewaysFC, statFC, "CLASS", "SHAPE_Length")         print statFC + " feature class has been created."              field = "Class_Desc"              # Check to see if the field already exists.         lstFlds = gp.ListFields(statFC, field)              # Check for items in list object.         if len(lstFlds) == 0:                 # Add new field to the stat feature class             gp.AddField_management (statFC, field , "Text")         else:             print "Field already exists"              # print the classList         ##count = 0         ##for eachClass in classList:         ##    count = count + 1         ##    print "Class = " + str(count) + " with Description " + eachClass              # Create update cursor for all rows in stat feature class.         cur = gp.UpdateCursor(statFC)              count = 0         row = cur.Next()         while row:     ##        print row.Class     ##        print classList[row.Class - 1]     ##        print row.SHAPE_Length             count = count + 1     ##        while row.Class > count:     ##            print count     ##            print row.Class     ##            row.SHAPE_Length = 0     ##            row.Class_Desc = classList[row.Class - 1]     ##            cur.updateRow(row)     ##            count = count + 1             row.Class_Desc = classList[row.Class - 1]             cur.updateRow(row)             row = cur.Next()         del cur, row              print "Class Description has been added successfully"              # Set up variables for output path and report file name         OutDir = "D:\Data"         #filename = statFC + "_Report.txt"- cannot use the filename to concatenate         reportFile = OutDir + r"\report.txt"         print reportFile              # Remove existing report file if it exists     ##    if os.path.exists(reportFile):     ##        os.remove(reportFile)     ##        print reportFile + " already existed. Remove it."         # This part does not need to check whether the file exist or not. It will be overwritten.              f = open(reportFile, 'w')         s = 'Length of %s Cycleways in %s LGA are as follows:\n\n' % (CyclewayStatus.lower(), LGA)              print s         f.write(s)         cur = gp.SearchCursor(statFC)              count = 0         length = 0         Total_Length = 0         Unknown_Len = 0         Not_permitted_Len = 0         row = cur.Next()         while row:             count = count + 1             print "Class = ", row.Class             while count < row.Class:                 # This is for some class missing and thus the length is 0.0km.                 s = '%19s is 0.000 kilometres\n' % (classList[count -1])                 if row.Class <> 8:                     print "while count " + s                     f.write(s)                 count = count + 1             ##print "Length for " + row.Class_Desc + " is " + str(row.SHAPE_Length) + "km"             if row.SHAPE_Length <> 0:                 length = row.SHAPE_Length/1000             s = '%19s is %.3f kilometres\n' % (row.Class_Desc, length)             if row.Class == 8:                 print "count = ", count                 Unknown = row.Class_Desc                 Unknown_Len = length             elif row.Class == 9:                 print "count = ", count                 Not_permitted = row.Class_Desc                 Not_permitted_Len = length             else:                 print "else" + s                 f.write(s)                 Total_Length = Total_Length + length     #        print "while row" + s     #        f.write(s)             row = cur.Next()         del cur, row         s = '\n       Total length is %.3f kilometres\n' % (Total_Length)     #    print "unknown = " + unknown         print "Total Length " + s         f.write(s)         s = 'with %19s is %.3f kilometres\n' % (Not_permitted, Not_permitted_Len)         print s         f.write(s)         if Unknown_Len <> 0:             s = 'and %19s is %.3f kilometres\n' % (Unknown, Unknown_Len)             print s             f.write(s)         f.close()     except:         # If an error occurred, print the message to the screen         print gp.GetMessages()


Is it possible to get geoJSON Geometry from GetFeatureInfo WMS request from ArcGIS Server 10.x

I'm trying to perform a GetFeature info request to an ArcGISserver 10.x WMS service and would like to get response in geoJSON format including the feature geometry. Here's the request :               http://mapservices.gov.yk.ca/arcgis/services/GeoYukon/GY_OilGas/MapServer/WMSServer?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=-140.742239%2C64.444492%2C-131.499347%2C69.721576&SERVICE=WMS&INFO_FORMAT=application%2Fgeojson&QUERY_LAYERS=1&FEATURE_COUNT=50&Layers=1&WIDTH=578&HEIGHT=330&styles=&srs=EPSG%3A4326&version=1.1.1&x=201&y=207      and the response contains a null geometry.               {       "type": "FeatureCollection",       "features": [         {           "type": "Feature",            "geometry": null,            "properties": {            "OBJECTID": "7",            "SHAPE": "Polygon",            "SEDIMENT_BASIN_NAME": "Eagle Plain",            "SEDIMENT_BASIN_ID": "E",            "BASIN_LOCATION": "onshore",            "DESCRIPTION": "Northern Yukon Fold Complex",            "REGION_NAME": "North Yukon",            "AREA_KILOMETRES": "20803.8",            "AREA_ACRES": "5140816.4",            "AREA_HECTARES": "2080375.7",            "SHAPE.AREA": "20803756917.106998",            "SHAPE.LEN": "1391344.050657"          },          "layerName": "1"          }      ]     }      Is it possible to get the geometry ? In geojson format ? In an other format ? To achieve this result, do I have to configure the ArcGIS Server ?


Google Maps: Decoded polylines showing up incorrectly

I'm trying to draw an encoded polyline via the Google Maps API (v3), and it seems to draw 'sort of' correctly (as in, roughly in the right area of the world ;) ) but otherwise is very, very wrong. (Pictures to follow) Essentially, I'm using the Strava API (v3) to get road 'segments', which include encoded polylines (http://strava.github.io/api/#polylines). The short version is, I'm decoding these as per the Google documentation and then creating a new Polyline object with the new path and adding it to the map. I've been very brief in summing up that part, simply because my method doesn't seem to be the issue here... If I take the encoded polyline string directly from the response of the API call and paste it into Google's Interactive Polyline Encoder Utility (https://developers.google.com/maps/documentation/utilities/polylineutility) I see the same 'wrong' path. So, that leaves two possibilities... Either the Strava API is passing out incorrect data, or I'm not correctly understanding what I'm supposed to do with it. I've attached the relevant images + polyline below. Am I doing something obviously wrong? Thanks in advance for any help. Example 'encoded' polyline: ` {ae{HntiQtCcDzG_I|^uc@rFgHhC{CxAiA~AaA~BkAvB}A|F_G|AgBbBkCtAwCd@sA|BoIVw@Pc@|@gBt@}@|@y@lCwBvA_B`@k@~@aBt@iBlAaE~@oEp@sDX{BP_BJaDAcEIeCe@gHo@yMUaEk@uDm@iD]mCAwBNsDXyDL}@nByIZyCt@cLr@gNB_ABoEAkFJmDTkBVeAZ_Af@gAnDwF|@gBbAoChHgUPWlAT`@B|@GbE_@dAW`Cu@vBe@tDs@xD{@`Bg@bBq@hBaAtB}@dCi@bF}@jBg@pBeAj@SNE\\\C^@\\\DbAZ`Ah@~C`A\\\H|ALzAFLA^Gl@UdBgAjBaBZSh@Qz@MjD_@`FoAtCa@j@Ez@DxE|@xF\\\nBP~@TxHvBf@Tb@\\\pBvC\\\^`@XxAf@fBT|BDfAIr@MfBe@rBa@rBMvBYxBg@xA_@^Ir@@NF|@l@nBfAjAj@dBV`Bb@lBbAbB~ALPhC`FV`@n@z@^VNBX?LGZa@d@eAp@qAt@Sx@Cz@G\\\IZOhCcBb@c@T]jA_CrE_HfEiFz@}@p@k@|@o@`C{A`A{@rBwBx@oAbByCp@wArAoDLWxA}BhAcBjAqAlAiB~AaDr@sBp@{CD[TkC^}FZyD^oCx@gF`@qAh@kAz@yAtAgBpD_E|JoKdDuEjBcCfC{ExCqGdAgBlBuBrAyBpEkIpEsI\\\\]^YbAg@|GaBzKeEfBe@lCW`AQr@U|A_AtAkAhDyCpAeA|Aq@`EeCrDgBvA{@tD}C`BmAzBm@t@QvAQxBOl@Q~Ai@~BsAlCcB ` Strava map (correct): ![Strava \(Correct\)](http://i.stack.imgur.com/wbVDl.png) Decoded polyline (wrong): ![Decoded polyline \(WRONG\)](http://i.stack.imgur.com/bfB26.png)


How to count points once with overlappying polygons?

All, We're using parcel data (polygon) to count student locations (point) based on parcel type. We're doing this using SQL and the ST_Intersects function. It works great, except the City and County of Denver stores parcels with condominiums on them as multiple overlapping polygons, that is, each condo at a location gets its own parcel polygon - if there are 20 buildings on a parcel, there are now 20 coincident parcel features stacked on top of one another. This is a problem because each parcel would count 1 student at that location once for every condominium parcel. So while there is only 1 student at that 'spatial location', if there were 20 condos at that location, that would be counted as 20 students. Using a SQL 'distinct' does not seem to work... How can we either: a) Generalize the polygon data such that all overlapping polygons become a single polygon layer b) Use some other SQL wizardry to eliminate the overlapping polygons from the query? Thanks!!! -m


How to batch export using r.out.gdal command in GRASS

I created a list of files (`NPPFILES`) using `g.mlist` command in GRASS 7. Now I would like to export these files as .tiff files. I tried this command in GRASS prompt               for files in $NPPFILES; do     r.out.gdal input="$NPPFILES" output="$NPPFILES.tiff" format=GTiff ; done      This is not working for me. I'm running it in the directory where output files need to be stored, still no result.


What is issue in this request to Google map engine API

i want to use the batchInsert of google map engine, i am calling this with dojo/request               request("https://www.googleapis.com/mapsengine/v1/tables/1453899488279955151311853667273131550346/features/batchInsert",                         {                             headers : {                                 "Authorization": 'Bearer '+ token.access_token,                                 "Access-Control-Allow-Origin" : null,                                 "X-Requested-With": null,                                 "Content-Type": "application/json"                             },                             handleAs : 'json',                             method : 'POST',                             data :datastring                         }                 ).then(function(data){                             console.log("Got data :"+data);                         }, function(err){                             console.log("Got error :"+err.response.text);                         }, function(evt){                             console.log("Got Event :"+evt);                         });      Request as below               {     "features":[     {"type":"Feature",     "geomerty":         {         "type":"Point",         "coordinates":[-34.678393740116476,150.765380859375]         },     "properties":     {     "gx_id":"2",     "FID":2,     "sapobjectid":"12345sdf",     "sapobjectname":"Test",     "Features":"Point"}     }     ]     }       But i am getting the error as               Got error :{     "error": {     "errors": [      {     "domain": "global",     "reason": "required",     "message": "A value is required.",     "locationType": "other",     "location": "features[0].geometry"     }     ],     "code": 400,     "message": "A value is required."     }     }


Inactive remove duplicate labels function, what's up with that?

I am using arc 10 and I am having a heck of a time getting duplicate labels to not appear. The remove duplicate labels in the conflict detection tab is checked but inactive or non selectable. I don't think I have ever seen it selectable and i can't find another solution to limiting the labelling to one of the grouped points with the same name. It looks messy and is very frustrating, does anyone have any suggestions. thanks


How do I organize my GIS projects?

I have been struggling for quite a long time now with keeping my project files organized. What are your tips for keeping your datasets, images, shapefiles, etc.. organized?


GeoJSON shape distorted on Leaflet.js spherical mercator WMS map

I have a map with a simple **WMS** layer in spherical mercator projection (rendered by a OSM-Mapnik-TileCache server stack, everything is in **EPSG:900913 / EPSG:3857** ). First: I can't understand why, if Leaflet uses CRS **EPSG:3857** , whose unit is _**meters**_ , I still have to provide coordinates, like _maxBounds_ and _center_ , in WGS84 format, which is _**degrees**_. Is it an API inconsistency? Second: I need to render a **GeoJSON** feature expressed in WGS84 coordinates ( **EPSG:4326** ), but the shape is visibly distorted (see pics below). Should I _**convert**_ the shape from EPSG:4326 to EPSG:3857? How? If I did so, I would have coordinates expressed in meters, while Leaflet still expects degrees! _I made a double check with a simple wms layer in OpenLayers and a GeoJSON overlay and it works fine, so I proved that the distortion is not in the data._ Any clue? Here is the test GeoJSON, hope someone can understand the reason of the issue:               {         "type": "Polygon",         "coordinates": [             [                 [14.740017498458682, 40.673078870109705],                 [14.740132563378529, 40.673283531348574],                 [14.741625561383819, 40.67246759585111],                 [14.741671820229074, 40.672308542443076],                 [14.74151049646397, 40.672262934612235],                 [14.740017498458682, 40.673078870109705]             ]         ]     }      GeoJSON feature on Leaflet map: ![snap 2014-03-13 at 18 19 02](https://f.cloud.github.com/assets/6525042/2421556/5cc77dcc- ab83-11e3-838a-0b0a913e13c6.png) GeoJSON feature on OpenLayers map: ![snap 2014-03-13 at 18 18 48](https://f.cloud.github.com/assets/6525042/2421557/5ce1f972-ab83-11e3-9e4d-a8d8107c1f83.png)


How to refresh QgsMapcanvas?

I am using Qgis 1.7 and I want to refresh the mapcanvas so I am using refresh() function of QgsMapcanvas class and Nothing is happening to the Map Canvas. I am using Python for customizing


How to add labels to a WMS layer using OpenLayers and GeoServer?

I have point of data in mysql server. I am displaying this layer as WMS using OpenLayers and GeoServer. How can I add label to this layer?


Round decimal number in ArcGIS10.1

How can I round the decimal number in a table in Arcmap: e.g.![enter image description here](http://i.stack.imgur.com/dTHJf.jpg) how can I set it to 2.60?


Why it takes long time to open a map page

While opening for the first time it takes more than 30 minutes to open this map page. What might be the reasons. Any suggestions from experienced professionals? The link is http://ngiip.gov.np/THEMATIC_MAPS/TestPopden.html Complete html is as below:               <!DOCTYPE html>                 <title>Population Density</title>       <meta charset="utf-8" />     <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />     <link rel="stylesheet" href="POPCEN/Popcen.css" />                                                    <link rel="stylesheet" href="POPCEN/Popcen.css" />

                   <input type="button" id="btnSummary" value="Summary" onclick="mySummary()" class="btnStyle span2" />                   <input type="button" id="btnZoomToNepal" value="Zoom To Nepal" onclick="myzoom()"   class="btnStyle span2"  />


Is it possible to create a Balloon Callout with a leader? I am using the following code:               public void DrawText( IActiveView view, BalloonParms balloonParms ) {         ITextElement textElement = new TextElementClass();         textElement.Text = balloonParms.TextString;         textElement.ScaleText = true;                                // ???         textElement.Symbol = GetTextBalloon( balloonParms );         IElement element = textElement as IElement;         element.Geometry = balloonParms.AnchorPoint;         view.GraphicsContainer.AddElement( element, 0 );         view.PartialRefresh( esriViewDrawPhase.esriViewGraphics, element, null );     }      (Ignore the details of GetTextBalloon() it is just standard dance of formatted text, balloon callout, simple fill, and simple line. BalloonParms is just struct with all the settings bundled.) I'm clicking on a polygon feature, getting the point location, and then calling this code. It works like a charm. But there is no leader line! The IElement interface allows me to set an anchor point and I can fiddle with various settings for the IBalloonCallout.LeaderTolerance but nothing will cause the leader line to appear. I can offset the anchor but still no leader. Is there a way to set both the anchor and another point that will determine where the balloon is drawn? I can't find that prooperty. Am I missing it?


How to import data from excel and associate it with individual shapes?

New user on ArcMap - Working with shapefiles... Question: the shapefile I am working on, a polygon is a plot of land, each plot of land has a history of owners. I am currently having to copy/paste the ploygon in mapview, edit the attributes, and repeat... Data includes the owner, price paid, length of ownership, acreage, etc. looking for a quicker way to import or "join" or connect excel information with each plot/polygon... so in short - the issue is one polygon, many owners with differing information of said polygon Not a python expert yet... Thanks


How to create new legend using ArcObjects?

I am trying to add simple legend to the map. I wrote some simple test code below to see what happens but it did not work.               var map = activeView.FocusMap;                      IGraphicsContainer graphicsContainer = activeView.GraphicsContainer;                 IMapFrame mapFrame = graphicsContainer.FindFrame(map) as IMapFrame;                 UID uid = new UID();                 uid.Value = "esriCarto.Legend";                 IMapSurround mapSurround = map.CreateMapSurround(uid, null);     mapFrame.CreateSurroundFrame(uid, null);                      var legend = (ILegend)mapSurround;                      var legendItem = new VerticalLegendItemClass();                 legendItem.HeadingSymbol.Text = "served";                 legend.AddItem(legendItem);                      var legendItema = new VerticalLegendItemClass();                 legendItema.HeadingSymbol.Text = "unserved";                 legend.AddItem(legendItema);                           IElement element = legend as IElement;                 element.Geometry = envelope as IGeometry;                 graphicsContainer.AddElement(element, 0);                      activeView.Refresh();      The legend I am after, must be similar to this: ![legend](http://i.stack.imgur.com/EY0cj.png) Does anyone have any link or advice that could assist me to achieve this, please?


What datastructure is a good choice for objects in a map-editor?

I am planning to implement a map-editor. But I don't really know what data structure are a good choice for storing the map-object in. When the user pans (scrolls) the map, there will be much looking up of what objects are in the visible area, usually by having an min_x, min_y and max_x, max_y coordinate pair. I have read that R-trees are good for this type of use, but they seem to be complicated to implement. So far I have just used a linked list that I have to loop through very often; it's not optimal, but it works. Are there any better choice of data structures?


GPS and One-way Streets

I'd like to know how GPS can determine if a street is one-way. Does it detect one-way signs or parked car positions if any?


Are there sources for more esoteric data than streets worldwide?

Related to this question. For example, things like:   * political world map (as polygons)   * cities of the world   * geolocated climate data (avg temp, humidity, rain, as polygons),   * earthquakes,   * hurricanes (as polylines hopefully with strength as z-axis data)   * store location of international chains (mcdonalds, for example) If you know sources only for specific countries/regions, that is still helpful. Please point out if the source provides only a WMS layer or supplies downloadable data


Trilateration using 3 latitude and longitude points, and 3 distances

I want to find out an unknown target location (latitude and longitude co- ordinates). There are 3 known points (latitude and longitude co-ordinate pairs) and for each point a distance in kilometers to the target location. How can I calculate the co-ordinates of the target location? For example, say I have the following data points               37.418436,-121.963477   0.265710701754km     37.417243,-121.961889   0.234592423446km     37.418692,-121.960194   0.0548954278262km      What I'd like is what is the math for a function that takes that as input and returns 37.417959,-121.961954 as output. I understand how to calculate the distance between two points, from http://www.movable-type.co.uk/scripts/latlong.html I understand the general principle that with three circles like these you get exactly one point of overlap. What I'm hazy on is the math needed to calculate that point with this input.


VRT vs KML superoverlay

We've got GB's of raster data that I want to make available as mosaics with overviews internally within my office. We have people using ArcGIS (although we are never all at the same version) and we have people who prefer Google Earth. Is there no one format I can build that can be read by both clients? I thought **VRTs** were going to be the answer; I was pysched with the idea of using an open format as opposed to mosaic datasets (and those are finicky when it comes to versions), but GE can't read them, right? Nor can Global Mapper, which I use frequently as well. And Arc still can't read superoverlays without converting them first. Is there a way to build a simple web viewer like what gdal2tiles does but by referencing the VRT? And even better would be a raster format that could also be opened by a image viewer like Irfanview. Any suggestions?


Automate Naming of Stormwater Network (Geometric network)

We have a geometric network representing our stormwater network. For anyone unfamiliar with stormwater drainage networks, they are composed of pipes and pits (simplified for this question). Pits are required wherever two pipes join or a change of direction is required. So in the geometric network, pits are junctions and pipes are edges. The feature classes within the geometric network are a Point Feature for the pits and a polyline Feature for the pipes. My task is attribute every pipe and pit with unique name in line with our Naming Policy. The name of the pipe or pit is dependent on its location within the network. Simplified naming policy is as follows: Pits are given a number starting with 1 at the outlet (furthest downstream) Pipes are given the number of their upstream pit I would like to automatic this naming process. I have little experience in arcgis and python, but i have a background in Java. Does anyone have any advice as to how to achieve this? Manually naming the pits/pipes will take 4-8 weeks. I would rather spend 8 weeks learning ArcObjects etc. I’m guessing i need to represent the network as a graph in java, from there the naming process would be easy. Any advice on how to extract the geometric network relationships into a graph would be greatly appreciated. Thanks in advance.


Northern Ireland Roadway Network shapefile

Does anyone know of an open-source alternative to the £7k+ offering in the Ordinance Survey map shop?


Using Code Block in Field Calculator with ArcObjects (VB.NET)

I'm having trouble using a code block in the Field Calculator with ArcObjects. Ideally, I'd like to be able to read a text file which contains the Python code for the code block. I've tested this code before in ArcMap and am sure it works. However, ArcMap keeps crashing when I try to do this. Stepping through the code, it crashes at the line that executes the tool. I also tried a simpler code block without reading from a text file and it still crashed at the same step (executing the tool). I've included my code below. If anyone can point me in the right direction, I'd really appreciate it!                   'Create new geoprocessor         Dim GP As IGeoProcessor2 = New GeoProcessor         GP.AddOutputsToMap = True         GP.OverwriteOutput = True              'Read the text file containing the python code for the code block         Dim codeBlock As String         Dim sr As New StreamReader("path to text file")              codeBlock = sr.ReadToEnd()         sr.Close()              'Using a simpler code block:         'codeBlock = "def test():" & vbLf & "  out = ""test""" & vbLf & "  return out"              'Add the parameters into array         Dim parameters As IVariantArray = New VarArray         parameters.Add("path to feature class")          'Feature class         parameters.Add("RepStyle")                       'Field name         parameters.Add("trans( !CODE!, !STYLE! )")       'Expression         'parameters.Add("test()")         parameters.Add("PYTHON_9.3")                     'Expression type         parameters.Add(codeBlock)                        'Code block              'Run the field calculator         GP.Execute("CalculateField_management", parameters, Nothing)


Shapely MultiPolygon Construction - Will not accept the entire set of Polygons

I am new to Shapely, so I am using a work request to learn a bit more about it. I need to execute a number of unions to build larger geometries from assessment neighborhoods in DC. I am curious about why a MultiPolygon does not seem to be able to be constructed from a list unless it's sliced (or why what I am doing is incorrect). More importantly, I cannot seem to get all of my polygons in there. Here is the set up.               #Open assessment neighborhood shapefile     asmt=fiona.open(data_dir+'ASNBHDPLY.shp')          #Initiate iterator     nbhd=asmt.next()          #Create container for features     nbhd_list=[]          #For each feature...     for nbhd in asmt:         #...throw the feature in the list         nbhd_list.append(shape(nbhd['geometry']))      From here, I attempted to generate a MultiPolygon object with both of the following choices.               nbhds=MultiPolygon(nbhd_list)      and               nbhds = MultiPolygon([shape(nbhd['geometry']) for nbhd in asmt])      The second version was tried because of the success of the technique here. In both cases, an exception was thrown:               NotImplementedError: A polygon does not itself provide the array interface. Its rings do.      I did note, however, that both the following approaches worked:               nbhds=MultiPolygon([nbhd_list[0],nbhd_list[1]])      and               nbhds=MultiPolygon(nbhd_list[:62])      The kicker, however, is that there are 71 assessment neighborhoods and I get the above error as soon as I exceed 62. Any thoughts would be greatly appreciated.


Field format lost when exporting events layer to shapefile - long field type converted to double

I have a MS Access 2010 database with about 80 000 records in it. It is point data for animal locations. I would like to bring this into GIS and project the data into lambert conformal conic. I am experiencing some difficulties. First I tried exporting the database in MS Access 2010 as a .csv before importing to ArcGIS 10.1, but there is apparently a known bug where Access will cut off your double fields to two decimal places. This doesn't work for me: I need those lat longs to be precise! Then I tried exporting the data as an Excel .xlsx file type. Here all of my long integer fields from Access were converted to doubles (no good - for future processing I need those fields to be longs or integers in GIS). Then I tried to directly import the x,y data using an OLE DB Connection. So far so good... the events file from the x,y data is imported as NAD 83 and the integer fields from Access are shown as being the long data type in Arc GIS. Crossing my fingers I tried to then export this events file (NAD 83) as a shapefile (using the background data frame projection, lambert conformal conic, as to properly project the data for visualization). All of my fields that were previously classed as "long" in GIS have become doubles - and now they don't work in any of my post processing programs (namely, GME the geospatial modeling environment). This is my first question - not sure if I can upload some sample data but I'm happy to provide it if I can figure out how to do it! I have considered just bulldozing through them and making all new fields in GIS using the field calculator to change the field types, but I will be performing these kinds of operations regularly and since my data has about 50 fields I'd rather get this solved! I am trying to export these data to a shapefile so that UDID is in long format. ![Table showing offending field: UDID \(never has Null values\)](http://i.stack.imgur.com/9fUvT.jpg)


Cross-validation and optimal p power in IDW

I use the "Geostatistical Wizard" in ArcMap 10 to do my interpolations. For example, when I do IDW and I want to decide for the optimal p power or the optimal number of neighbors that will contribute with weights to my interpolation I try several runs with several combinations (f.i. for 5: min number of neighbors and 10: max number of neighbors), I try all different p powers from 1 and above, and every time I check the RMSE and ME provided. I write down on an excel table all my results and decide for the optimal p or number of min - max neighbors based on which combination gives me the smallest RMSE and ME. What I don't understand and I ask you to help me is, why when I press the optimal button for the p power, the p that is computed usually gives an RMSE and ME larger than what I have computed when I try the different p powers manually?


How to use the Cartographic Composer of GRASS 6.4.3?

Following on from my previous question (which was, again, how to use the Cartographic Composer)... I've got a GIS in GRASS. I need to print various bits of it. Problem is, it needs images on it whenever we print it - the logos of our clients and stuff. Now, I've managed to get the Cartographic Composer to show the logo images, now I just need it to show the map - or more rather, the Map Display and what that is currently showing. As everyone who will be using the GIS is used to ArcMap (but it would cost too much to get the licences), we basically want it so that the user can just press the print button and GRASS will print out the Map View, plus the logos.


Accessing pgsql db set in cygwin from qgis installed on windows through osgeo4w, possible?

As the title of this question, I want to know if it is possible to access a PostgreSQL database set in cygwin (version 9) from QGis installed in Windows 8.1 through the OSgeo4W application, is that possible? if so, could you explain some simple steps to do so? Thanks for any pointers,


How to show a toolip over a feature with OpenLayers?

This is a continuation (part 2) of this previously asked GIS question. I have an `array of objects`. Each object has a name, some score and some Well Known Text. For each object, I'm displaying the `WTK` over an OpenLayer map. I'm trying to have a tooltip over each shape, but only when the mouse hovers over that shape/feature. if I have this code here..               var data = [         { 'aaaa', 100, <some WKT>' },         { 'bbbb', 32, <some WKT>' },         { 'cccc', 93, <some WKT>' },         { 'dddd', 46, <some WKT>' } ]      and for each object in that array I need to generate the feature.. which is more or less like this..               var feature = format.read(data.WellKnownText);     shapeLayer.addFeatures(feature);          var highlightControl = new OpenLayers.Control.SelectFeature(shapeLayer, {         hover: true,         highlightOnly: true,         renderIntent: "temporary"     });          map.addControl(highlightControl);     highlightControl.activate();      I'm guessing I need to define something after the `renderIntent`? Like onhover call this function? Don't forget, i also need to pass to that function `data.Name` and `data.Score` ... Any suggestions, folks?


What WMS server would be suited for serving many aerial photos?

Given a big set of aerial photos taken. 7000x5000 pixels. What is the best way to serve these in a WMS. When reading up about different WMSs, I get confused about the complexity and have a hard time finding the simple answer to how we can serve large about of images. One of the confusing things are raster layers. I assume we need to serve raster layers since our original data is aerial photos from a plane. My readings seeem to lead me on the path that a raster layer is one big picture which the WMS then slices up. But its really not possible to stich all the aerial photos together to one big picture. The other path is to create many layers with one aerial photo in each and therefore have a raster layer per image, which also seems stupid. Is there any WMS implementations out there where we can hook our images into such when a request comes in for a BBOX, then we tell it what image it should use and then it slices it up and not having to have one big image in memory with the hole world. (An answer to all this could be, how do openstreetmap create its internal map?)


Creating Anaglyphs from Nadir Images

Has anyone made an anaglyph photo from Nadir geospatial data? I have found some excellent examples of making anaglyphs in GIMP from digital photography. I would like to do a similar process with Nadir geospatial data. I have a 11km x 11km Nadir image of a TIN that I would like to convert into an anaglyph. I was wondering if I could apply a shift to one of the images (ie: shift one image X metres west and X metres north) to create the "left" image of the anaglyph. My question is related to the amount or percentage of the shift needed. Is there a mathematical way to calculate this, if I know my resolution, extent and scale? My other thought was to simulate overlap by creating two images that have 60% or 80% overlap between the images. Has anyone successfully tried this? Any help would be appreciated. Thanks...


Can i use GPS Garmin GPSmap 62s in GIS projects with high accuracy?

i have GPS Garmin GPSmap 62s, is this can be dependable in GIS projects with high accuracy, and what is the "RMS", the minimum error rate in meter, and can i linking it with arcpad to draw road or buildings with high accuracy.


US National Grid (USNG) map service?

Anyone know of a map service (WMS, WFS, Esri, other) for the US National Grid?


What constitutes a valid spatial layer when connecting QGIS to MySQL?

I'm trying to work with a MySQL 5.5 table using QGIS 1.8. I can do "Add Vector Layer", choose "Database", and successfully connect to the MySQL connection I previously set up. QGIS shows me a "Select vector layers to add" dialog that lists the tables in my database, including the one I want to use which shows a "Geometry type" of "Point" (which is correct, there's a POINT column in that table). When I highlight that table from the list and click OK I get an error message: `The layer MySQL:[redacted connection info] is not a valid layer and can not be added to the map` Is there something that needs to be done to make a MySQL table a "valid layer" other than making sure that it has a geometry field (like a point)?


Is the PostGIS Shapefile Import Manager able to upload to phpmyadmin or only pgadmin III?

After trying to import a shapefile into pgadmin III with no success I was wondering how to successfully upload it, but also if it is possible to upload to phpmyadmin instead. In any case, how exactly do I change the encoding so that they are compatible in pgadmin. No matter what I don't want to change the shapefile as it was more likely my error in uploading and configuring the local server that caused this. Connection succeeded. Connecting: host=localhost port=5432 user=postgres dbname=AdminBoundaries ============================== Importing with configuration: adminboundaries, public, geom, H:\AdminBoundaries, mode=c, dump=1, simple=0, geography=0, index=1, shape=1, srid=0 Shapefile type: Polygon PostGIS type: MULTIPOLYGON[2] Failed SQL begins: "SET CLIENT_ENCODING TO UTF8; SET STANDARD_CONFORMING_STRINGS TO ON; BEGIN; CREATE TABLE "public"."adminboundaries" (gid serial, "ID_0" int4, "ISO" varchar(3), "NAME_0" varchar(75), "ID_1" int4, "NAME_1" varchar(75), "VARNAME_1" varchar(150), "NL_NAME_1" v" Failed in pgui_exec(): ERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist LINE 59: SELECT AddGeometryColumn('public','adminboundaries','geom','... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. Shapefile import failed. ============================== Importing with configuration: adminboundaries, public, geom, H:\AdminBoundaries, mode=c, dump=1, simple=0, geography=0, index=1, shape=1, srid=0 Shapefile type: Polygon PostGIS type: MULTIPOLYGON[2] Failed SQL begins: "SET CLIENT_ENCODING TO UTF8; SET STANDARD_CONFORMING_STRINGS TO ON; BEGIN; CREATE TABLE "public"."adminboundaries" (gid serial, "ID_0" int4, "ISO" varchar(3), "NAME_0" varchar(75), "ID_1" int4, "NAME_1" varchar(75), "VARNAME_1" varchar(150), "NL_NAME_1" v" Failed in pgui_exec(): ERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist LINE 59: SELECT AddGeometryColumn('public','adminboundaries','geom','... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. Shapefile import failed.


Add WMS Layer into map using Arcobjects

I am going to add a wms layer to my existing map.I use this code:               public load_wms(ESRI.ArcGIS.Controls.AxMapControl mapcontrol) {                          // Create an WMSMapLayer Instance - this will be added to the map later                         IWMSGroupLayer wmsMapLayer = new WMSMapLayerClass();                    // create and configure wms connection name                    // this is used to store the connection properties                         IWMSConnectionName connName = new WMSConnectionNameClass();                               IPropertySet propSet = new PropertySetClass();                     propSet.SetProperty("URL", "http://173.244.165.194/geoserver/Land_Managment/wms?");                     connName.ConnectionProperties=propSet;                              // uses the name information to connect to the service                       IDataLayer dataLayer = (IDataLayer)wmsMapLayer;                       dataLayer.Connect((IName)connName);                         // get service description out of the layer                    // the service description contains inforamtion about the wms categories                    // and layers supported by the service                          IWMSServiceDescription serviceDesc = wmsMapLayer.WMSServiceDescription;                     IWMSLayerDescription groupDesc = serviceDesc.LayerDescription[0];                              // for each wms layer either add the stand-alone layer or                    // group layer to the WMSMapLayer which will be added to ArcMap                     for (int i = 0; i < groupDesc.LayerDescriptionCount - 1; i++)                     {                         IWMSLayerDescription layerDesc = groupDesc.LayerDescription[i];                            //  if (layerDesc.Title == WMSLayers.SelectedItem.ToString())//Checking if this is the selected layer                        // {                             // Configure the layer before adding it to the map                             ILayer newLayer;                             IWMSLayer newWMSLayer = wmsMapLayer.CreateWMSLayer(layerDesc);                             newLayer = (ILayer)newWMSLayer;                             wmsMapLayer.InsertLayer(newLayer, 0);                             // add layer to Map                                  mapcontrol.AddLayer((ILayer)wmsMapLayer);                             IActiveView activeview=(IActiveView)mapcontrol.ActiveView;                             activeview.Refresh();                                      //  }                          }      But it does not draw anything I can add it to openlayers but when I add it to ArcMap it does not drow anything..Can you help me fix it I am on arcobjects 10.2.2 and arcmap 10.2.1 also


Can't display overlay

I am trying to add a WMS radar overlay to my map but it won't seem to gather it.                 noaaRdr = new OpenLayers.Layer.WMS("Latest Radar", "http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?", {         layers: 'RAS_RIDGE_NEXRAD',         transparent: true,         format: 'image/png'       }, {         visibility: true, isBaseLayer: false, singleTile: true,         ratio: 1,opacity: 0.7       });                 radarArray = [noaaRdr];     //adding more layers later..       map.addLayers(radarArray);      I have seen this URL used elsewhere but i can't figure out whats wrong. The layer shows up in the layer switcher but the image never shows on the map and the file "obs" never gets requested from the NOAA server ?? Can anyone help me with this.


Issue nesting two iterators for cost distance calculation (Model Builder)

I am attempting to calculate cost distances iteratively for each point element in different datasets. I created a model that does the job for a single dataset but when I try to batch it I'm getting the following error `"ERROR 000865: Input raster or feature source data: I_atlanta_OBJECTID does not exist"`. This is, the output layer generated in the "feature select" submodel is not a valid input in the cost distance or in any other process I put after the iterator. This error occurs only when I nested the model to run it in different datasets and not when I run the model in only one dataset. ![snapshot of the model](http://i.stack.imgur.com/n6o8P.png) Is there any consideration I have to take into account when nesting models? I have read the documentation available with no luck so far.


Is there a way to detect that the extent has changed in an app using the ESRI iOS SDK?

Is there a delegate, callback, or other method that can be used to detect that the extent of the map has been changed in the ESRI iOS SDK?


How does Watson solve Geography problems?

In spite of losing to humans on the geography question, Watson still won Jeopardy. The explanations regarding this incorrect answer seem a bit lame to me (at 3:40 in the video). ![watson](http://i.stack.imgur.com/nYYZ4.jpg) With a logo like this, I would expect Watson to perform better at finding a city based on airport attributes. Does anyone have any links describing how Watson performs geospatial reasoning?


CQL_TEXT in CSW doesn't work

I need to retrieve some data from CSW server running GeoNetwork. I'm using this query but it doesn't work:               http://serverurl/geonetwork/srv/en/csw?     REQUEST=GetRecords&     SERVICE=CSW&     VERSION=2.0.2&     OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&     constraint=AnyText+EqualTo+Africa&     constraintLanguage=CQL_TEXT&     constraint_language_version=1.1.0&     typeNames=csw:Record&     RESULTTYPE=hits      Always returns to me the whole metadata (instead of 0; that's what I expect because there aren't any resources with name 'Africa').


Floating point calculations in QGIS

How do I manage floating point calculations in QGIS? I have carried out 3 consecutive calculations on landsat bands. I end up with 32 bit floating point rasters on which I can't carry out a 4th calculation. The calculation result gives a substantial file but the values of the pixels are shown as "Inf". I am not able to find a syntax guide for the float() function although I use it successfully in 1 of the preceeding calculations. And I do not have an in- depth understanding of how to manage integer/floating point or how to convert between them in QGIS. I found these but no big clues How to reclassify a float raster? Floating point: understanding their inaccuracy


Passing variables through infoTemplate

I have a problem passing variables through infoTemplate. Its like there's something funny happening with the scope. Certain variables work but when I get too crazy with them my map doesn't load. Example1 works:               template = new InfoTemplate({         title: welltitle,         content: "ID: "+coords[i][0]+"
"+coords[i][0]+"
"+datatext     });      Example2 does not:               template = new InfoTemplate({         title: welltitle,         content: "ID: "+coords[i+1][0]+"
"+coords[i+1][0]+"
"+datatext     });       EDIT `coords` is a multidimensional array of values EDIT NEW SYMPTOM! map crashes in firefox but not Chrome...this may be just a cross-browser issue


Create Ms-Access type queries in ArcMap

We have a dataset with a personal GDB (mdb) with several feature classes and an mxd tied to those features to create layers based on definition queries… Currently to QAQC our data we use MsAccess queries to cross check data both within a feature class table and across feature classes that have common ID’s… This is building space data, so things we check are a field that marks the space vacant [sp_vacant ] and another field within the same feature class that marks the space classification (hallway, stair, office, etc [sp_type])… Since we do not want to mark public areas as vacant the query checks any vacant values against the space type to get a list of possible errors… Another type of MSAccess query we run would be to check personnel recorded for that building [sp_person] in one feature class against a matching field [sp_type] from the other feature class where both features contain matching room ID’s [sp_ID]… To do the previous we build queries in Access, export those tables in Excel and use them as a checklist to edit possible mistakes. I then have to go back in Access once edits are made to re run the queries to check for completeness. Rather than all that I would like to create, run and view the same type of queries in ArcMap rather than using MsAccess. Or perhaps getting an editable layer with attributes that I can change directly and those changes will propagate to the original feature class data. So a table or preferably layer that responds to a sql like query.


How do I select specific colors within a raster to create polygons with in QGIS or ArcMap?

We have a few georeferenced zoning map rasters and would like to convert specific zones (colors) to polygons, sometimes multiple zones as different polygons. Our workflow has been in the past to georeference an image and use the magic wand select tool in a graphic editor to select all colors, invert selection, delete everything except the color desired, then save a copy while renaming the .aux.xml to the new file name, then opening in ArcMap & running the raster to polygon tool. This has worked fine in the past but is tedious- I have to think there is a more elegant way to perform this in either ArcMap or QGIS, the latter preferred for future development. Any suggestions would be greatly appreciated!


Self-Sizing Labels

I have labels now in my application that work fine using the usual ILabelEngineLayerProperties2. When I set them up I set the .Expression property and using the .Symbol property I set the font, style, size, and color. Is there a way that the font can resize itself based on the map's current extent? (Just asking.)


Automatically determine polygon overlap 'islands'

I have a shapefile with many polygons. Some partly overlap with each other, some are not overlapping. I'm considering a polygon to be overlapping given a minimum area of overlap. 'Islands' of partly overlapping polygons occur. I'm interested to find out how many islands are there and which polygons are forming them. I can use ArcGIS 10.2 and/or OGR, both with Python but I'm not sure how to proceed. I know there is an overlap function in OGR but it just finds overlapping polygons. Is there maybe functionality already available which does the above? Example: ![selected polygons form one 'island'](http://i.stack.imgur.com/i7Zea.png)


Problem loading view from postgres

My problem is loading view table from Postgres. Here is my view table:               SELECT h1.gid, h1.st_buffer        FROM vmo_buffer_2m h1        LEFT JOIN vodomjeri h2 ON st_intersects(h1.st_buffer, h2.geom)       WHERE h2.gid IS NULL;      and that works normally in qgis. When change last row with: `WHERE h2.gid IS NOT NULL;` I can see sql query normally with results in pgAdmin, but adding this view table in qgis show error: `(st_buffer) sql= is an invalid layer and cannot be loaded.`


Openlayers zoomToExtent from array of coordinates

I have a dropdown list. On Selection, it will request extent of selected property to database (PostgreSQL). I am using PHP for server-side processing. At client-side on console log gives extent output result (variable `res`):               [74.3965356273929, 75.2484319931094, 35.6450698628058, 34.776235256942]      Also I am sure that coordinates are float and not string using `parseFloat()` function. later I am passing that variable to `OpenLayers.Bounds`.                   var extent = new OpenLayers.Bounds(res);         map.zoomToExtent(extent);      `OpenLayers.Bounds` gives following output:               OpenLayers.Bounds.OpenLayers.Class.initialize {left: 74.396535627393, bottom: 75.248431993109, right: 35.645069862806, top: 34.776235256942, left: null…}      Which is I guess correct. But Openlayers is not zooming to the provided extent and it is zooming to maximum zoom level at current map view only.