How to draw into selection cache in ArcMap

I have a tool,something like Edit Tool in ArcMap,when I double click on mouse,and it selects a feature(polyline for example) and draw a sketch on it too,but if I change zoom,the sketch disapears because I draw sketch on the scrren.I know if I can draw sketch on into selection cache(bitmap) it will stay till selection changes,so it doesn't disapear with changing zoom. here are the steps i pass to draw the sketch with current situation: 1.I take cache count into cachecount variable using screen display object 2.I take a handle to device countext for cacheIndex=cachecount-1 3.start drawing using 2 parameters in steps 1 and 2 4.draw polyline using screen display DrayPolyline 5.FinishDrawing .............................................               HRESULT hr;          //Get handle to memory device context          HDC HandleDC;          short cacheCount;          this->m_ipSDisp->get_CacheCount(&cacheCount);          short cacheIdx=cacheCount-1;          this->m_ipSDisp->get_CacheMemDC(cacheIdx,(OLE_HANDLE*)&HandleDC);          if(FAILED(hr=this->m_ipSDisp->StartDrawing((OLE_HANDLE)HandleDC,cacheIdx)))     return hr;          //Draw feature here               this->m_ipSDisp->FinishDrawing();      ............................................. Because ArcMap has at least 3 caches,1st for feature,2nd for annotation and graphics and 3rd for selection,i supposed the last feature index must be for selection cach,if I choose another index less than this,it doesn't even draw any thing.I checked this number and it always returns 2 for cachecount,I think because I don't have any graphics or annotation on map,it returns 2(at least I wish it is a true consumption). but unfortunately it draws polyline on the screen because drawn polyline disapears at the first refresh of map. Is there something wrong with these procedure?May you tell me how I can draw a sketch on the selected feature just like Edit Tool in ArcMap? Regards


flex to java trying to get started on the plan

I have as suggested recently on this forum been "playing" with arcgis server. For reasons perhaps not obvious to "real" programmers I have built a fairly extensive series of web mapping applications (not real applications) based on flex sample viewer.   It has been very difficult for me to understand the ins and outs of flex but am beginning to get a grip on it.   I stated these are not real applications meaning - when I get an "application working with all the widgets and layers, etc working.   I simply copy that folder structure and rename it to a new application name.   I then edit config.xml (notepad) and default.htm to reflect the new application name.   I don't own any programming software i.e. msvs, flashbuilder, etc. Because of the power and marketing of apple, I am now in the delimna of whether to find an x-code programmer to help with the esri IOS application, or switch to Java for all applications, and websites.   One problem I have is even understanding the java terminology. Java, javascript, etc. My question is. Is there an easy to understand resource for Java.   I'm certain there is nothing to convert my flex applications to java.   But has any had experience with what I am going through? Any direction or comment is appreciated.


Is there an advanced way to label in ArcMap so that the label will not be dropped?


Georeferenced image goes "out of scale" upon reopening in ArcMap

We have several ArcGIS 10 map documents containing fully georeferenced images (projected UTM 16N). We also digitised them by tracing over features in the image into shapefiles. Everything seems to save correctly. However, when we re-open the map document in ArcMap, the georeferenced image goes completely off scale. It is still rotated correctly, but sometimes it ends up multiple times bigger (or smaller!) than it should be, and is not at the right place. We are baffled by this phenomenon. Can anyone help with this? Thanks.


Simple OpenLayers WFS

> **Possible Duplicate:**   >  How to add a simple WFS layer from GeoServer to OpenLayers map? I'm trying to simply add a WFS layer in OpenLayers. But completely stuck! Could someone please take a look at my code and suggest what I'm doing wrong? I have a fresh install of GeoServer on a Linux (Ubuntu) VM. I'm trying to connect to one of the default layers (medford:hospitals). I'm fairly confident I have all the parameters correct. The layer previews fine in GeoServer. My webserver is on a seperate server to GeoServer so hopefully no proxy issues? Starting to wonder if this is some weird server issue? Anyhow - the code:                           //Add WFS Layer             var wfs = new OpenLayers.Layer.Vector("Medford Hospitals",                     {                         strategies: [new OpenLayers.Strategy.Fixed()],                         projection: new OpenLayers.Projection("EPSG:4326"),                         protocol: new OpenLayers.Protocol.WFS({                             version: "1.1.0",                             url: "http://squirrel.bis.local:8080/geoserver/wfs",                             featurePrefix: 'medford', //geoserver worspace name                             featureType: "medford:hospitals", //geoserver Layer Name                             featureNS: "http://medford.opengeo.org", // Edit Workspace Namespace URI                             geometryName: "the_geom" // field in Feature Type details with type "Geometry"                         })                     }             );             map.addLayer(wfs);      Any help and advice gratefully accepted! Thanks, Steve


No primary key or unique index found?

I have a store created from oracle database in geoserver. Now after I create layer out of the store. And when I try to access the layer or try to preview the layer, I get the warning message in console as > No primary key or unique index found for 'mylayer' I see in oracle db, i have created the primary key and I have an index too. Can anybody suggest, what I am doing wrong, or am I missing something to setup in geoserver? I see the option > Primary key metadata table while creating datastore. Is it anything to do with warning I am getting? Thanks


Find the majority area within another area

I have a survey grid overlaid unto several administrative areas. Both are polygon features and I have performed a union on both features in order to determine the areal contribution of the segments created within each survey grid square. The purpose of doing this is so that I can assign each survey grid to an administrative area based on which administrative area is of a majority within each survey grid. How can I perform this using the operators in the search query builder WHERE clause? So I have an example extracted from the table: 'CCAFS_ID' is the survey grid and 'prcntArea' is the areal contribution to 'Area' calculated by dividing 'segArea' by 'Area'                   CCAFS_ID    Area    NAME_0  NAME_2  segArea     prcntArea         3138    0.00203158  Uganda  Bugahya 0.00063856  31.43169356         3138    0.00203158  Uganda  Buhaguzi  0.00060369    29.71529548         3138    0.00203158  Uganda  Kiboga  0.00078933  38.85301096         2373    0.00203777  Kenya   Kwale   0.00026393  12.95190331         2252    0.00203429  Kenya   Makueni 0.00076357  37.53496306         2252    0.00203429  Kenya   Taita Taveta    0.00064302  31.60906262         2252    0.00203429  Kenya   Kajiado 0.0006277   30.85597432         2419    0.00203864  Kenya   Kwale   0.00070346  34.50633756         2457    0.00203889  Kenya   Kwale   0.00088593  43.45158395         2567    0.00203911  Kenya   Kwale   0.00015073  7.39195041


Flex 2.4 login page with tokens

I am using AGS security and a 2.4 flex application.   I would like to login with a login screen like available in the samples.   Then utilize tokens for fc security on my services. I see a sample for both of these on esri.resources.com but nothing for both together.   Has anyone done this that can share?


How to trace a line layer (road network) through points?

OK. I've been reluctant to post this, but I've just about given up. I have a road network (purple), Point files (green) and a beginning point (yellow). I want to trace the point files based on the road network. Think of the points as telephone poles, but what I want is a map showing telephone lines (line shapefile). There is a numbering scheme for the "telephone poles" but it isn't great and for this instance I would just as well assume they are not numbered. Does anyone have a solution? One that looks pretty good is just buffering the points and then clipping the road network from the buffers. But I want something more complete. It needs to be automated since there are 12,000 of the "telephone poles" ![enter image description here](http://i.stack.imgur.com/qKJrQ.jpg)


How to define filter in WFS layer in order i can show new filter reult layer for new filter condition (i.e.redraw the layer according to filter)

I am using openlayer 2.12 for this wfs filter purpose. I wanted to redraw filter layer as conditions in filter changes dynamic. Following is my code in for wfs:                var ty=OpenLayers.Filter.Comparison.EQUAL_TO;        var propertyOP="name";         var valOP="buil2";         build1 = new OpenLayers.Layer.Vector("WFS", {             strategies: [new OpenLayers.Strategy.BBOX()],             filter: new OpenLayers.Filter.Comparison({                  type: ty,                 property: propertyOP,                     value: ValOP             }),             protocol: new OpenLayers.Protocol.WFS({                 srsName:"EPSG:4326",                 version: "1.1.0",                 url:  "http://localhost:8080/geoserver/sol/wfs",                 featureType: "ch",                 featurePrefix:"sol",                     featureNS: "http://localhost:81/sol"/*,                 geometryName:"geom"*/             }),             projection: geographic,             styleMap: styleMap             });         map.addLayer(build1);      Now i wanted to make this filter to update and show new filter layer result. In my current code previous filter result remain but show result on previous result. My Filter type,property and value get change.


In GIScience, is there a generally agreed list of top tier conferences?

In many fields, such as computer sciences, it seems to be quite clear which conferences are top tier and how a paper accepted to those conferences compares to journal publications in the same field. Is there a general agreement in GIScience about which conferences are considered top tier? And how do publications at those conferences compare to papers in, e.g. Transactions in GIS or the International Journal of Geographical Information Science?


How to convert a multi-band landsat RGB to a kml file using MAPTILER

I was able to use maptiler for converting a single raster (ortofoto geotiff obtained with UAV) into a kml file. Now I want to convert a RGB landsat into kml for visualisation in Google Earth. It is not clear to me, how this can be done as the raster has tree bands now. In addition, how I can assure that the nice visualisation of the LANDSAT in QGis, obtained after setting manually min/max values with'Colourmap', is maintained during conversion Maptiler?


How to determine storage type (ST_Geom/Oracle) from arcpy/python

We're migrating some feature classes from SDELOB (or some older binary format) to ST_Geometry. As we write our arcpy script to use the ESRI Migrate Storage Tool we'd like to test whether or not something already is ST_Geom...Other than writing hooks into the database, using the comtypes package etc., does anyone know of a simple way to determine this?


Web Mapping using the ESRI Javascript API

So I've been tasked with coding the interactive map for the city I'm interning at. I'm still a beginner with Javascript but I learn best "one the fly" by just getting started. I just need to know how to get started because I've never done any sort of web design. Do I need to start by coding in an .html or a .js? What's the best IDE for designing web applications? Visual Studio for Web? Eclipse EE? Well I need access to the web server to see how my map actually looks? I've played with the sandbox located here: http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=map_create However, I'm ready to make more progress. Any help/suggestions/insights is appreciated.


What Spatial Reference System do I store Google Map's Lat/Lng in

I am new to PostGIS, Spatial Reference Systems and projections and want to store lat/lng coordinates retrieved from Google Maps and its services like the Geocoder. I'm working with data in America and the main calculations are for nearest neighbors. Results will be plotted back on a web map (eg: via Google maps API or leaflet) **Question:** What spatial reference system is Google map using? I figured out so far that its the WGS 84 datum with the Mercator projection in the geographic coordinate system. Should I store the location data as it is, or transform to US National Atlas Equal Area EPSG:2163? Since I will be calculating distances and finding nearest neighbors, if I guess correctly that doing nearest neighbor search requires transforming the entire table to EPSG:2163, then will the solution be to store the data in both Mercator and EPGS:2163?


Extracting street segments from google maps?

I'm using the google maps v3 api and am trying to extract a list of intersections and street segments from an overlay created from a KML file. Ideally, I'd like to be able to get the poly lines in a manner similar to the way Google Mapmaker works currently when you right click and go to 'find near this point'(http://www.google.com/mapmaker?hl=en) How can this be accomplished?


How to create a line from more than two points?

I have a loop which calculates two points for each iteration (x3,y3) and (x4,y4). As seen in the code these two points are added for each iteration, which gives i-1 lines. Each line has a individual id. What I want is to add all these points at the same time, so it makes **one polyline** with only one id. This is done by adding all the points in the line:               fet.setGeometry( QgsGeometry.fromMultiPolyline([[QgsPoint(x3,y3), QgsPoint(x4,y4)]]))      instead of only these two points at the time. But I can not figure out how to change the loop to make it work. I guess for each iteration, I have to save a string with QgsPoint(x3,y3), QgsPoint(x4,y4) for the given iteration and add the next two points as a string in the next iteration. But I can not see how?               for i in range(0,len(points)-1):         coor1 = points[i]         x1 = coor1[0]         y1 = coor1[1]         dist = 0         coor2 = points[i+1]         x2 = coor2[0]         y2 = coor2[1]         dn = ((x1-x2)**2 + (y1-y1)**2)**0.5         x3 = x1 + dist*(y1-y2) / dn         y3 = y1 - dist*(x1-x2) / dn              x4 = x2 + dist*(y1-y2) / dn         y4 = y2 - dist*(x1-x2) / dn                fet.setGeometry( QgsGeometry.fromMultiPolyline([[QgsPoint(x3,y3), QgsPoint(x4,y4)]]))         pr.addFeatures( [ fet ] )


Transfer USGS overlays to Google Earth?

How to transfer aerial archives from USGS earth explorer onto GoogleEarth?


For Loop - Map Algebra (ArcGIS) using Python

**ORIGINAL QUESTION** * * * Im relatively new to python and these fourms but Im am having trouble utilizing for-loops for spatial analyses within ArcGIS. It does not appear to recognize the variable, RasterImage! Here is a part of the code im having trouble with...               import arcpy, os, sys, string     from arcpy import env     from arcpy.sa import *          arcpy.CheckOutExtension("spatial")          arcpy.env.workspace = r'O:\DATA\test'     InputFolder = arcpy.env.workspace          Temp4 = InputFolder + '\\' + 'temp4'          RasterList = arcpy.ListRasters()     for RasterImage in RasterList:         print (RasterImage)         Temp4 = FocalStatistics('RasterImage', NbrRectangle (9, 9, 'CELL'), "RANGE", "DATA")         print ('Focal Statistics Done')      I receive the following error               "Traceback (most recent call last):     File "O:\test.py", line 67, in <module>     Temp4 = FocalStatistics('RasterImage', NbrRectangle (9, 9, 'CELL'), "RANGE", "DATA")     File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Functions.py", line 4796,   in FocalStatistics     ignore_nodata)     File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Utils.py", line 47, in   swapper     result = wrapper(*args, **kwargs)     File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Functions.py", line 4790,    in wrapper     ignore_nodata)     File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 474, in <lambda>     return lambda *args: val(*gp_fixargs(args))     ExecuteError: Failed to execute. Parameters are not valid.     ERROR 000865: Input raster: RasterImage does not exist.     Failed to execute (FocalStatistics)."      It does not seem to recognize my for in loop of the RasterImage - any ideas? The print statment after the loop shows that it is recognizing the file (in python) but that the spatial analyses used in arcpy are not. I thought it might have to do something with the workspace used so I thought that adding               RasterImage = InputFolder + '\\' + RasterImage       might help locate the full path of the raster datasets but to no avail! Im lost for ideas and the only help files that utilize spatial analyses on the ArcGIS resource page do not utilize loops in their scripts. ¨ **UPDATE** * * * Issue has been resolved by implementing the following: The original question displaying the error 'RasterImage' does not exist was cause in part due to the '' marks and the spaces around the NbrRectangle. I have implemented part of my new code using the suggestions by nmpeterson whereby the geoprocessing is called through the function               def focalStats(raster):          Temp4 = FocalStatistics(raster, NbrRectangle(9, 9, 'CELL'), "RANGE", "DATA")                  return Temp4       While methodologies in which several temporary files rely on one another (i.e. a geoprocess within another geoprocess) i've used the .save function into a temporary directory as shown by om_henners before deleting all those contents afterwards.


RT Sql Layer plugin giving an error

I am trying to use the aforementioned plugin with QGIS 1.7 and Postgres 9.0/PostGIS 1.5. Added a PostGIS spatial layer w/out a problem and then clicked on the RT Sql layer button which displayed the main dialog. When I select Database-> , I got this error BTW - the **...** 's is the QGIS plugin path. Left it out for clarity):               An error has occured while executing Python code:          Traceback (most recent call last):       File ".../python/plugins\rt_sql_layer\ManagerWindow.py", line 112, in dbConnectSlot         self.dbConnect( self.sender() )       File ".../python/plugins\rt_sql_layer\ManagerWindow.py", line 163, in dbConnect         self.refreshTable()       File ".../python/plugins\rt_sql_layer\ManagerWindow.py", line 272, in refreshTable         model.loadFromDb(self.db)       File ".../python/plugins\rt_sql_layer\DatabaseModel.py", line 250, in loadFromDb         self.tree.constructTreeFromDb(self.db)       File ".../python/plugins\rt_sql_layer\DatabaseModel.py", line 96, in constructTreeFromDb         list_tables = db.list_geotables()       File ".../python/plugins\rt_sql_layer\connectors\postgis.py", line 275, in list_geotables         items[i] = geo_item     IndexError: list assignment index out of range          Python version:     2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]               QGIS version:     1.7.0-Wroclaw Wroclaw, 63ecdd7      I never used python in the past but I had a look at the source code and it seems that the query the plugin is running to get the spatial tables into a tree view is not returning anything? Had a go to running the sql statements in PostGIS and they all seem to return data. Then again- not sure if I am looking at the right place! Have you seen this before? Has it got anything to do with the s/w versions? Plugin was developed for an earlier version and **something** has changed in the latest?


JavaScript API - Query and Edit point from Feature Layer

I am attempting to recreate the ESRI example for attribute inspections (https://developers.arcgis.com/javascript/jssamples/ed_attribute_inspector.html). I am having an issue when I create my feature service that contains a point feature class vs. the polygon feature class the example uses. My initSelectToolbar(evt) function isn't "seeing" the point from the feature layer. If I only change the urls to the feature/map services (noted in commented out service declaration) the selection works successfully. Am I missing something obvious here? Why can I not grab the point? > Blockquote                           var map;                 var updateFeature;                 var map, geocoder, currentBaseMap;                 var locatorUrl = "http://gisaprd/ArcGIS/rest/services/SDE.AddressLocator_Comp/GeocodeServer";                      require([                   "esri/map",                   "esri/layers/FeatureLayer",                   "esri/dijit/AttributeInspector",                   "esri/symbols/SimpleLineSymbol",                   "esri/symbols/SimpleFillSymbol",                   "dojo/_base/Color",                   "esri/layers/ArcGISDynamicMapServiceLayer",                   "esri/layers/ArcGISTiledMapServiceLayer",                   "esri/config",                   "esri/tasks/query",                   "dojo/parser",                   "dojo/dom-construct",                   "dijit/form/Button",                   "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"                 ], function (                   Map, FeatureLayer, AttributeInspector,                   SimpleLineSymbol, SimpleFillSymbol, Color,                   ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, esriConfig,                   Query,                   parser, domConstruct, Button                 ) {                     parser.parse();                     // refer to "Using the Proxy Page" for more information:  https://developers.arcgis.com/en/javascript/jshelp/ags_proxy.html                     esriConfig.defaults.io.proxyUrl = "/proxy";                          // Create the map                     map = new Map("mapDiv")                     map.on("layers-add-result", initSelectToolbar);                     //aerialsLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://gisaprd/ArcGIS/rest/services/Aerials_4inch_12inch_Cached/MapServer", { "id": "Aerials", "visible": false });                     //map.addLayer(aerialsLayer);                     streetsLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisaprd/ArcGIS/rest/services/SRSLandbase/MapServer", { "id": "Streets" });                     map.addLayer(streetsLayer);                     currentBaseMap = "Streets";                          var ISS_Inspections = new ArcGISDynamicMapServiceLayer("http://gisadev:6080/arcgis/rest/services/ISS_Inspections/MapServer", { "id": "ISS_Inspections" });                     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                          // If I use a map service with only polygons this works                     //var ISS_Inspections = new ArcGISDynamicMapServiceLayer("http://gisadev:6080/arcgis/rest/services/testDeleteMe2222/MapServer", { "id": "ISS_Inspections" });                          ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                     ISS_Inspections.setDisableClientCaching(true);                     map.addLayer(ISS_Inspections);                          var ISS_InspectionsFL = new FeatureLayer("http://gisadev:6080/arcgis/rest/services/ISS_Inspections/FeatureServer/0", {                         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                         // If I use a feature service with only polygons this works                         //    var ISS_InspectionsFL = new FeatureLayer("http://gisadev:6080/arcgis/rest/services/testDeleteMe2222/FeatureServer/0", {                         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                         mode: FeatureLayer.MODE_SELECTION,                             outFields: ["*"]                              });                     highlightSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255, 255, 0]));                     ISS_InspectionsFL.setSelectionSymbol(highlightSymbol);                     ISS_InspectionsFL.on("edits-complete", function () {                         ISS_Inspections.refresh();                     });                     map.addLayers([ISS_InspectionsFL]);                               function initSelectToolbar(evt) {                         var ISS_InspectionsFL = evt.layers[0].layer;                         var selectQuery = new Query();                              map.on("click", function (evt) {                             selectQuery.geometry = evt.mapPoint;                                  ISS_InspectionsFL.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function (features) {                                 if (features.length > 0) {                                     //store the current feature                                     updateFeature = features[0];                                     map.infoWindow.setTitle(features[0].getLayer().name);                                     map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));                                 } else {                                     map.infoWindow.hide();                                 }                             });                         });                              map.infoWindow.on("hide", function () {                             ISS_InspectionsFL.clearSelection();                         });                              var layerInfos = [{                             'featureLayer': ISS_InspectionsFL,                             'showAttachments': false,                             'isEditable': true,                             'fieldInfos': [                               { 'fieldName': 'PS_READING_INLET_SIDE', 'isEditable': true, 'tooltip': 'Current Status', 'label': 'Status:' },                             ]                         }];                              var attInspector = new AttributeInspector({                             layerInfos: layerInfos                         }, domConstruct.create("div"));                              //add a save button next to the delete button                         var saveButton = new Button({ label: "Save", "class": "saveButton" });                         domConstruct.place(saveButton.domNode, attInspector.deleteBtn.domNode, "after");                              saveButton.on("click", function () {                             updateFeature.getLayer().applyEdits(null, [updateFeature], null);                         });                              attInspector.on("attribute-change", function (evt) {                             //store the updates to apply when the save button is clicked                              updateFeature.attributes[evt.fieldName] = evt.fieldValue;                         });                              attInspector.on("next", function (evt) {                             updateFeature = evt.feature;                             console.log("Next " + updateFeature.attributes.objectid);                         });                              attInspector.on("delete", function (evt) {                             evt.feature.getLayer().applyEdits(null, null, [feature]);                             map.infoWindow.hide();                         });                              map.infoWindow.setContent(attInspector.domNode);                         map.infoWindow.resize(350, 240);                     }                 }                 );      > Blockquote


Automatically update the result of a QueryTask

I have developed a application using the ESRI JS API to allow users to create and edit features in a web map. I have used the QueryTask to create summary statistics to report back to the user on total length and such. To create this report back, I am using .innerHTML, which works great, but the statistic is not refreshed when a change is made to the feature. Thus in order for a user to see updated statistics they need to refresh the page. This is not ideal - can I add a listener or other technique to automatically update the statistics generated with the Query Task? The Query and Query Task is:               queryTask = new QueryTask("URL");         query = new Query();         statisticDefinition = new StatisticDefinition();         statisticDefinition.statisticType = "sum";         statisticDefinition.onStatisticField = "SHAPE.STArea()";         statisticDefinition.outStatisticFieldName = "total_area";         query.outStatistics = [statisticDefinition];         queryTask.execute(query, function (result) {             total_area = result.features[0].attributes;             postExecute();              });      and the postExecute Function that gives the statistic to the DIV:               function postExecute() {         var roadLength = (total['total'])";         document.getElementById("length").innerHTML = roadLength;     }


Workflow for staking out points in ArcGIS for Mobile

I was wanting to take a line of points along a road spaced 500ft apart and put a lathe in the road. Is there an 'easy' workflow for this in ArcGIS for mobile? It looks more like you have the option to collect features or view the map. I've used Trimble Survey Controller and marked seismic lines where it guides you to the point and once you're there you hit collect and it moves you to the next point. Is there any hidden functionality like this in ArcGIS for Mobile? I need ~10 foot accuracy and using a Geo HX.


Shapefile CRS changed after exporting from QGIS. Are they equivalent?

I added a shapefile as a vector layer in qGIS 1.7 so that I could join in additional attribute data (not geodata) from another DBF file. The Shapefile that I added has this CRS (as far as I can tell using ogrinfo):               PROJCS["WGS_1984_Web_Mercator",     GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",         DATUM["WGS_1984_Major_Auxiliary_Sphere",             SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],         PRIMEM["Greenwich",0.0],         UNIT["Degree",0.0174532925199433]],     PROJECTION["Mercator_1SP"],     PARAMETER["False_Easting",0.0],     PARAMETER["False_Northing",0.0],     PARAMETER["Central_Meridian",0.0],     PARAMETER["latitude_of_origin",0.0],     UNIT["Meter",1.0]]      After joining in the extra attribute data in, I exported the original shapefile by right-clicking on the layer and choosing 'Save as.' I kept the CRS as 'Original CRS' in the 'Save vector layer as ...' dialog. However, the exported shapefile has the following CRS defined:               PROJCS["Mercator",     GEOGCS["GCS_unnamed ellipse",         DATUM["unknown",             SPHEROID["Unknown",6378137,0]],         PRIMEM["Greenwich",0],         UNIT["Degree",0.017453292519943295]],     PROJECTION["Mercator_1SP"],     PARAMETER["central_meridian",0],     PARAMETER["false_easting",0],     PARAMETER["false_northing",0],     UNIT["Meter",1],     PARAMETER["latitude_of_origin",0.0]]      Are the CRS' equivalent? If so, does that mean that some of the strings in the WKS definition of the PRJ file are just identifiers? If not, how can I make qGIS preserve the CRS of the original shapefile when exporting it? Thanks in advance for any help anyone can offer.


Tiling failing near the end of generating base level tiles

I have a GeoTiff file that I have created by using the command:               gdal_translate -gcp <my gcp> -a_srs <my wkt file> input.tif output.tif      Note that I have twelve -gcp options set on the command, not just the one as shown above. Running gdalinfo on the resulting output.tif gives this info:               $ gdalinfo output.tif     Driver: GTiff/GeoTIFF     Files: output.tif     Size is 14988, 4817     Coordinate System is `'     GCP Projection =      PROJCS["NAD83 / Lambert Conformal Conic",     GEOGCS["NAD83",         DATUM["North_American_Datum_1983",             SPHEROID["GRS 1980",6378137,298.2572221010002,                 AUTHORITY["EPSG","7019"]],             AUTHORITY["EPSG","6269"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4269"]],     PROJECTION["Lambert_Conformal_Conic_2SP"],     PARAMETER["standard_parallel_1",53],     PARAMETER["standard_parallel_2",58],     PARAMETER["latitude_of_origin",55],     PARAMETER["central_meridian",-117],     PARAMETER["false_easting",0],     PARAMETER["false_northing",0],     UNIT["metre",1,         AUTHORITY["EPSG","9001"]]]     GCP[  0]: Id=1, Info=           (2825.895,258.41074) -> (-880122.870999,429169.114123,0)     GCP[  1]: Id=2, Info=           (4287.7334,677.89484) -> (-647749.215943,385189.927027,0)     GCP[  2]: Id=3, Info=           (5770.6079,1015.5618) -> (-413230.559378,354650.048432,0)     GCP[  3]: Id=4, Info=           (8782.7646,1429.8372) -> (59130.821732,334247.905451,0)     GCP[  4]: Id=5, Info=           (11819.869,1494.3732) -> (530709.611705,368232.705719,0)     GCP[  5]: Id=6, Info=           (13468.901,2820.1733) -> (805645.946747,186796.122966,0)     GCP[  6]: Id=7, Info=           (13603.036,4243.1196) -> (847013.722386,-31779.568436,0)     GCP[  7]: Id=8, Info=           (10238.577,4364.8101) -> (327399.354203,-99445.655019,0)     GCP[  8]: Id=9, Info=           (6879.6489,4099.3042) -> (-196548.115146,-106984.902876,0)     GCP[  9]: Id=10, Info=           (3574.6519,3447.9844) -> (-717894.287773,-54297.530737,0)     GCP[ 10]: Id=11, Info=           (1518.3627,4345.4502) -> (-1023098.699938,-222975.023951,0)     GCP[ 11]: Id=12, Info=           (1955.6367,2981.635) -> (-975431.79687,-5555.816475,0)     GCP[ 12]: Id=13, Info=           (2390.9373,1619.8647) -> (-927792.139262,211739.118477,0)     Metadata:       TIFFTAG_SOFTWARE=Adobe Photoshop CS2 Windows       TIFFTAG_DATETIME=2011:05:25 08:08:20       TIFFTAG_XRESOLUTION=635       TIFFTAG_YRESOLUTION=635       TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  (    0.0,    0.0)     Lower Left  (    0.0, 4817.0)     Upper Right (14988.0,    0.0)     Lower Right (14988.0, 4817.0)     Center      ( 7494.0, 2408.5)     Band 1 Block=14988x1 Type=Byte, ColorInterp=Red       Mask Flags: PER_DATASET ALPHA      Band 2 Block=14988x1 Type=Byte, ColorInterp=Green       Mask Flags: PER_DATASET ALPHA      Band 3 Block=14988x1 Type=Byte, ColorInterp=Blue       Mask Flags: PER_DATASET ALPHA      Band 4 Block=14988x1 Type=Byte, ColorInterp=Alpha      When I run the output.tif file through our tile generator I get to 99% done with the base level and it suddenly fails with this error:               Traceback (most recent call last):       File "<string>", line 7, in process       File "/home/<my user dir>/maptiler/tiler/tiler.py", line 839, in generate_base_tiles_async         image_output.write_base_tile(tile, xyzzy)       File "/home/<my user dir>/maptiler/tiler/tiler.py", line 1000, in write_base_tile         dsquery.WriteRaster(xyzzy.wx, xyzzy.wy, xyzzy.wxsize, xyzzy.wysize, data, band_list=data_bands)       File "/usr/lib/python2.7/dist-packages/osgeo/gdal.py", line 746, in WriteRaster     buf_pixel_space, buf_line_space, buf_band_space )     TypeError: not a string      When looking at the output from the tile generator up to that point, all tiles look good. Does anyone have insight as to what this error means to gdal and how it can be fixed so the tile generator can go on and generate the overview tile levels?


QGIS and Raster Mapping in 'Seamless' layer

I would like to use Ordnance Survey base mapping in QGIS. I would like to set up something like a seamless table in MapInfo. I think that the equivalent in QGIS is a Virtual Raster Table. The files are in tif format as they were when I download them. I have built a VRT but it seems slow to load when I open the layer. I have also tried building pyramids for the data and this doesn't seem to speed it up that much. Is there a way to speed this up? Am I missing something? Are there any good resources about steps to take to prepare raster data for use in QGIS? Would I be best to start to load this information into a PostGIS database with PostGIS Raster installed?


Future of spatial databases

It may be a bit off-topic. I am eager to know the industry specific importance of Spatial Databases. Is Spatial Database a very important part of any GIS system? Or will we use other technologies to store and retrieve spatial data in the near future? I want to know these things because soon I am going to persue MS on Spatial Database Optimization. Thanks


Erdas Imagine DN to TOA reflectance for SPOT images

I would like to convet DN to TOA reflectance in Erdas Imagine 2013. I see there is a way of doing this for Landsat7 in the Radiometric tab. How can I do this for SPOT2,4,5 images?


Arcpy Performance If Then Statements

I'm rather new to python so my code might be horrid but I had a question about executing scripts from ArcMap and performance involving several if statements. The main objective is to create a toolbox with several different possible executions depending on the users input. Essentially I have two options that I see!?! --- note there might be errors as I am simply writing an example code that represents what I am doing. At the moment, iterating through only 5 (6000x6000cells) rasters my code runs in hours that in my mind should not take more than one.               import arcpy     arcpy.checkoutextension('spatial')          def main(inputfolder,outputfolder,x,y):         inputfolder = arcpy.env.workspace         RasterList = arcpy.ListRasters()              for RasterImage in RasterList:              try:                  if 'True' in x:                       sa.Slope(.....)                  else:                       if 'True' in y:                            sa.Reclassify(....)                       else:                             RasterImage * 2              except Exception e:                   arcpy.GetMessages(e)      or is defining separate functions better? i.e.               def main(inputfolder,outputfolder,x,y):         inputfolder = arcpy.env.workspace         arcpy.ListRasters()              if 'True' in x:             x(inputfolder, outputfolder, RasterList)         elif 'True' in y:             y(inputfolder, outputfolder, RasterList)         else:              for RasterImage in RasterList:                  try:                      RasterImage *2          def x(inputfolder, outputfolder, RasterList)         for RasterImage in RasterList:               ....          def y(inputfolder, outputfolder, RasterList)          .....      Any help would be most appreciated! **UPDATE** Solved my problem. Thanks for all the responses and help. The problem was not with my code but rather that a few of the datasets that I had been given were corrupt. Using a try: except: I was able to pass through those corrupt files (write an error log of those files) and later delete them.


Is it possible to convert graphics to features in ArcGIS 10 using arcpy?

Apologies if this is easy but I cannot seem to find the answer. Is there a way to convert a graphic to feature, i.e. use the "Convert Graphics to Feature" tool on the toolbar, within arcpy? I need to use a graphic as a selectbylayer feature, so either converting it or using the graphic directly would be nice.


Add layer using popup in ArcGIS Javascript API

I would like to be able to add a new feature layer within a popup window from an arcgis server. For example (purely hypothetical), you click on a state and it has 2 options: fire departments and police stations. You can then click on one of those options to add it to the map


QGIS: georeferencing report: tail cutted off

I'm using QGIS 1.8.0-2 to georeference some old maps and want to report residuals and other information via the PDF report function of the Georeferencer tool. If there's too much information, it's cut off at the bottom of the PDF page. Is there a way to get all the information (i.e. on a second page)? Regards, Thomas


OpenLayers jQueryUI Draggable

I am using open layers to render a wms inside of a div tag. This is right out of the openlayers documentation. My WMS layer is rendering well.

      Using the jquery UI documentation I have been able to create a draggable div tag that will, hopefully, house controls for editing vector features. Using the code below I am able to draw my draggable box. javascript:               $('#makeMeDraggable').draggable();      html:

      I was able to get overlap working by setting the map position to absolute and assigning appropriate z-indices to each div. (In the CSS file)               #map{ position:absolute; z-index:1;}     #makeMeDraggable{z-index:2;}      This allows the box to be dragged around the map's "container" (div tag) without issue. I am struggling to figure out how to have the map's position remain constant as I drag the box? The map is registering an onClick event over the entire page and so the box and map move in tandem. I am relatively new to jQuery and openlayers. I am probably missing something straight forward in the documentation? Thanks! Edit: URL to jsfiddle.net for anyone interested in checking out this problem. The map displays after zooming once. I still need to modify that... http://jsfiddle.net/Dn3fw/


Selecting polygons within others that share a boundary

Thanks in advance for any help. I have a feature class in ArcGIS 10.2 with 455 polygons,they are municipal boundaries. We use it to determine permissions for users in another application and it's based on sharing a boundary. So, for example, Muni A touches Muni B and C, so Muni A's rights will be: -Muni A -All towns within -Muni B --All towns within -Muni C --All towns within It's simple enough to select by location to determine the municipalities that share a boundary, however, I cannot seem to take that selection and do another based on those results to select the town polygons within B and C. Second to that, can you possibly script this to make it iterative so I can generate shp files for said permissions automatically?


Why is the Dissolve Tool not working?

I'm still having trouble with the dissolve tool and I've tried all of the solutions offered here including moving the process from the background and repairing the geography. I've also tried amending the spatial index and narrowing the dissolve area down considerably. Is there anything that I'm missing? Right now when I run the tool, it jumps right to 33% complete and stalls out. If I wait for an hour or so it gives me the 99999 error (edited to clarify, I am also getting the Invalid Topology error). I'm doing this project for work and waiting an hour each time isn't working for me (or my boss) anymore. Thanks in advance for any help or advice you might be able to offer.


ArcGIS Flex API: Keep info window on top of other widgets?

I am working on a web mapping widget using the ArcGIS flex API and ArcGIS Flex Viewer. I have a infoWindow popup when there is a mouse rollover on a map graphic. Problem: the infoWindow renders below other widgets which obscures the data in the info window. Is there a way to force the info window to render on top of all the other viewer widgets? Thanks.


How to import an Access database to GeoDjango?

I'm a I've just inherited a pile of institutional geodata that's stored in an MS Access database. I need to pull that data out into a format that I can work with in GeoDjango--so I'm OK with shapefiles or exporting it directly to a more useful database (mysql or postgres). What's the best way to do that? I'm a GIS newb, so I'm hoping there's an easy solution here. I can get access to an ArcGIS install to work with the data if necessary.


How to use geometry functions in rule based styling?

Edited: I'm trying to style some OSM data such that short fences, walls, etc just don't render. I only want to display barriers over some certain length. I've tried this rule,               tags LIKE '%barrier%' AND ($length > 100)      and quite a few variations on it, finally getting               tags LIKE '%barrier%' AND $length > 0.001      to do about what I want. Clearly, I don't know what units this is measuring in. It was awkward getting it to work though because while the "test" button next to the formula always gave me no results, the actual map stopped drawing the shorter fences like I wanted. ![test button not working](http://i.stack.imgur.com/Uf0V2.png) Indeed, the test button doesn't seem to want to work with any length attribute, as even               tags LIKE '%barrier%' AND $length != 0       returns "no results". So I guess my question now is: Am I doing something wrong, or is this a bug?


Trying to set NAD 1983 EPSG 102631 in QGIS

I was able to find the right coordinate system online NAD 1983 Alaska But now I don't know what to do. I can't find the coordinate system on QGIS. When I choose the one I think is correct it warps everything. Thank you for help, sorry if this question is asked a lot! Edit: Sorry about the poor explanation. I have a lot of shp files that were made in the coordinate system NAD 1983 EPSG 102631 which does not show when I use filter and try to set the CRS. When I load the shp files into my project and the CRS says custom everything seems fine. But when I set a CRS for my project it goes crazy. I want to use these shp files with other data and it seems I need to convert or at least get something sorted out before I can use this data with other data. It seems I need to custom set the proj strings... I've been reading the manual and I haven't found how to do this yet. Thank you all for your help.


Setting default units for Shape_Area to be Acres using ArcGIS Desktop 10.0

When I create a new feature layer polygon, how do I set the default in Shape_Area to read out in Acres? I am using ArcGIS Desktop 10.0.


Is there a "Disperse Markers" tool for QGIS?

I am using ArcGIS, but either I would like to use QGIS and maybe want to switch completely later. A have a point overlapping problem, as a result of geocoding of addresses. I have not found any tool in QGIS which could replace the "Disperse Markers" tool from ArcGIS, because if I understand well, the "Points displacement" tool in QGIS can displace the overlapping polygons only in "circle way" which has finally a very artificial effect. Please check out these two short articles about Disperse Markers to see what I mean. Please if you know any possible solution in QGIS for this, let me know. http://blogs.esri.com/esri/arcgis/2008/08/01/how-to-scatter-marker-symbols- for-stacked-or-clustered-point-features/


Is there any way to write a snipet of code with function of "SDELayer -o register" command

I try to create a geodatabase using some SQL command and then register some tables of it with SDE. I create an empty geodatabase using sde post installation and then create tables and other database objects in a program written by VC# using command like "Create Table" and other DDL scripts. but after creating database successfully user of this VC# program has to enter "Command prompt" and type sdelayer command to register tables one by one. I need to make all the process seamless for user and user must not see any change in working environment.Now my question,is there any way that I register tables of my geodatabse with SDE by VC# code programming instead of using "sdelayer" command in command prompt?(Any object model?) Regards


Can you create a ArcGIS 9.3 esri-geodatabase in ArcGIS 10?

Dooes anyone know if it's possible to create a v9.3 geodatabase from ArcGIS 10? Opening them is not a problem, but I haven't found a way to create one without going back to 9.3 and doing it there.


Problem PostGIS Spatial Query ST_Contains ST_Disjoint ST_Intersects

I'm working on a project with two different **tables** inside a database. One contains points in a column **geometry(Point,4326)** type and the second one has a column **geometry(MultiPolygon,4326)**. Now I would like to do a query on **pgAdmin III** using **st_contains** and **st_disjoint** to understand if a point is inside or outside the entire polygon. Both tables have more than one row. The multipolygon table has inside values to represent the area, instead the point table has just points that are on the map. Between tables there is no relation because the multipolygon table is created from a shapefile, instead the polygon table is created from collected data. I tried to load both tables on QGIS and I can see that some points are over the area represented by multipolygon table. I wrote this query:               SELECT distinct points.id, st_disjoint (points.geom, multipolygon.geom)     FROM points, multipolygon     ORDER BY points.id;      The result is this: ![enter image description here](http://i.stack.imgur.com/0rpAW.png) As you can see, the **id** 1,2,3,4 are ok and also checking on **QGIS** is fine. The number 5 and 6 are cointained inside the multypoligon, so the result would be false, but I get a **false** and a **true** result together. Writing also:               SELECT distinct points.id     FROM points, multipolygon     WHERE st_disjoint (points.geom, multipolygon.geom)     ORDER BY points.id;      the result is wrong with all points inside the result. It's like the result I get with               WHERE st_intersect(points.geom, multipolygon.geom)='f'      If I write:               SELECT distinct points.id     FROM points, multipolygon     WHERE st_intersects(points.geom, multipolygon.geom)     ORDER BY points.id      The result is correct, without any repetition and it looks like I did something like the st_contains. To do the **st_disjoint** , instead, I tried to do               WHERE not st_intersects(points.geom, multipolygon.geom)      or               WHERE st_intersects(points.geom, multipolygon.geom)='f'      but the result is the entire list of points. So it's not working to emulate st_disjoint. Why the **st_intersects** sometimes works, when **st_contains** and **st_disjoint** don't work?


getting from a DEM to points that could be used for a TIN

I have a DEM, and would like to create a set of points that I can use to make a mesh for a 3d modeling program, such as Maya, Blender, or SketchUp. If I were to make a TIN from a DEM in ArcGIS, ArcGIS would create a greater density of points in areas where the slope changes. How should I perform a similar process using open source tools? Do you know what algorithm is used for sampling points in a DEM to create a TIN? I'm looking for a solution that would produce less points than the number of pixels, and in locations where the DEM is more flat, produces less points. The best solution for me would use python or command line tools and result in either a mesh-like geometry or points that could easily be triangulated to create a mesh. Thanks. [EDIT: would classifying areas by some combination of slope and aspect be a first step? maybe then I could put points along the borders of these areas?]


Smartest way to union different "layers" in postgis

I'm currently using this crude approach to combine several tables/layers :               CREATE TEMPORARY VIEW p_impd_800 AS (     SELECT st_union(geom) as geom FROM rt_201     UNION     SELECT st_union(geom) as geom FROM rt_202     UNION     ...        SELECT st_union(geom) as geom FROM rt_207         );      Is there any smartest and faster way you to achieve the same result? Thank you for your time and help. C.


Realtime vector engine

Hey guys, I am looking for a real-time GIS vector engine that is to be used on a device using Embedded Linux/Qt (commercial or opensource). Any suggestions? Thanks. The usecase is a non-certified navigation system for airplanes, the data comes from a spatialite database. The data itself is not dynamic. Currently we are using rastercharts only, but we'd like to add the option of aviation vector charts, drawn on top of a raster layer.


30,000 data points... can this be reasonably served using openlayers?

I'm trying to tackle a web GIS problem and need to figure out the best strategy. I have a map with 30,000 cells on it forming a grid for the province of Alberta. I have a list of data points for each cell - about 50 indicator fields and values for every cell. For example, one value might be human population, so each cell would have a value for human population for that cell. I want to make an interactive map that can show those values visually either with squares for the cells, or a blended heat-map type of look. Beyond that, I'd like to be able to make compound calculations on all of the data points and use those calculations to make additional maps. Taking into consideration the calculations, there are roughly 300,000 permutations to the map. To top it off, it is also temporal; there are 16 different time slices. That means 16 time slices x 300,000 permutations. My strategy so far: 1) On the server side, calculate the cell values dynamically at run time and send the values to the client (all 30,000 of them). This translates to roughly a value for every 3x3 pixel square in a 525px x 525px image on the screen. 2) On the client side with open layers, use a 1px png that can be resized and have the alpha value adjusted as needed to show the different color gradient corresponding to the data value for each cell. The png would be resized as the map zooms in or out. Theoretically they would be positioned precisely to form a blanket coverage of the map as squares or else using the heat map approach they would overlap each other enough to form a blanket coverage. The Question: Is it reasonable to calculate those cell values dynamically on the server and then send to an OpenLayers interface in real time? I'm confident the server can perform the calculations, but can OpenLayers reasonably display 30,000 data points at a time on a map? Is it reasonable to expect to be able to create a blanket coverage using point data? I guess I'm trying to create the equivalent of a vector map that has 30,000 shapes giving 100% blanket coverage of the map, but using point data to simplify it. The alternative strategies in my mind are: a) to generate the maps in real time on the server and send as rasterized layers to the client b) to generate all of the permutations ahead of time and store them on the server as rasterized maps Any thoughts? Is my approach way off and barking up the wrong tree? Any advice on a better method? I'd sure appreciate any thoughts on the issue! If you're interested, I might even be looking to contract a developer to help with it. Thanks so much! Noah


Definition of a BBOX in Web GIS

In my practice I use a lot WMS and WFS in Geoserver. I have not found a document describing the concept of a bounding box(bbox). ArcGIS has map extent properties to identify map boundary. Google Map/Bing map has getbound() method to identify the map view. However, when defines a bounding box in WMS or WFS, it seems to involve projections parameters and map view extent. The parameters in an HTTP GetMap request looks confusing to me since if I use different projection systems the units in the bounding box varies significantly, and the incorrect setup of bbox would cause rendering fail So, could anyone point me to the document explaining the bbox?   Thank you!


How to calculate a percentage of an area covered by polygons ArcGIS 10.1

I created an Aspect Layer with 9 Zones on which I want to use the Tabulate Area Tool with another polygon layer namely Woods. So what I actually need to know is the percentage, covered by woods for each of these areas. I tried it with tabulate area but without success, the intersect tool might be useful here but I can choose the polygon layer there.


ArcMap - Data Driven Pages: Group features where page name field is the same

I'm using DDP to show a series of farmland areas. Some of these have the same farmland area name but different attributes (based on land cover), so are two different features (by necessity). Is there a way to group these so that I can group these features for the DDP without having to edit the featureclass to create a multi-part feature, and so lose the detail I need to display in the map?? I'm using ArcGIS 10.0.


Problems reading data from a file geodatabase using an OleDbConnection

I'm able to connect to an ESRI fgdb using an OleDbDataAdapter and read the attribute table just fine - _from within visual studio_. However, when I put the code inside a windows service it crashes (no error, just kills the service). The line it crashes on is commented in the code below (when executing the reader).                   Dim fgdbPath as String = "c:\esridata\myfgdb.gdb"         Dim tableName as String = "TableXX"         Dim conn as OleDbConnection = New OleDb.OleDbConnection("Provider=ESRI.GeoDB.OleDB.1;Data Source=" & fgdbPath & ";Extended Properties=WorkspaceType=esriDataSourcesGDB.FileGDBWorkspaceFactory.1;Geometry=WKB")         Dim reader As OleDbDataReader = Nothing         Try             conn.Open()                  Dim cmd As New OleDbCommand("Select top 2 ID, CITY  FROM " & tableName, conn)             reader = cmd.ExecuteReader() ' crashes here!      I also tried using an OleDbDataAdapter.Fill(DataSet, tableName) but it would crash on this line as well. The service will run forever as long as it doesn't hit the above line of code. The try/catch block doesn't catch the error either. If I can't get this to work, I suppose I could use arcobjects and a cursor but that's the last resort. Note: I'm using ArcGis 10, .net framework 3.5, vs 2008


How to compile QGIS with GRASS on Ubuntu?

I am on Ubuntu building qgis with grass plugin. I have build grass code separately and used --prefix to provide the path `GRASS_PREFIX` is `/usr/local/grass-6.4.2` and `GRASS_INCLUDE_DIR` is `/usr/local/grass-6.4.2/include` and `LIB_PATH` is `/usr/local/grass-6.4.2/lib/libgrass_gproj.so`. I have unchecked WITH_GRASS When I compile qgis I get the following               [  0%] Built target version     [ 17%] Built target qgis_core     [ 19%] Built target qgis_analysis     [ 19%] Built target qgis_networkanalysis     [ 27%] Built target ui     [ 40%] Built target qgis_gui     [ 40%] Built target memoryprovider     [ 41%] Built target delimitedtextprovider     [ 42%] Built target osmprovider     [ 43%] Built target qgissqlanyconnection     [ 44%] Built target sqlanywhereprovider     [ 44%] Built target gdalprovider     [ 45%] Built target mssqlprovider     [ 47%] Built target postgresprovider     [ 48%] Built target spatialiteprovider     [ 48%] Built target crssync     [ 73%] Built target qgis     [ 75%] Built target diagramoverlay     [ 76%] Built target interpolationplugin     [ 76%] Built target dxf2shpconverterplugin     [ 77%] Built target spatialqueryplugin     [ 78%] Built target sqlanywhereplugin     [ 79%] Built target roadgraphplugin     [ 80%] Built target zonalstatisticsplugin     Linking CXX shared module ../../../output/lib/qgis/plugins/libgrassplugin.so     /usr/bin/ld: cannot find -lqgisgrass     collect2: ld returned 1 exit status     make[2]: *** [output/lib/qgis/plugins/libgrassplugin.so] Error 1     make[1]: *** [src/plugins/grass/CMakeFiles/grassplugin.dir/all] Error 2     make: *** [all] Error 2      Please let me the what I am missing. Thank you. Regards, Srikanth * * * I solved it. I can see the grass plugin in qgis. But the plugin is not able to find the grass utilities. Then I tried to build using `WITH_GRASS = yes`; to link the grassplugin to grass, then I get the following. I think it says there is a build directory issue. I can't figure how do I fix it. Please advice.               Found GRASS: /usr/lib/grass64 (6.4.2)     Touch support disabled     Found Proj: /usr/lib/libproj.so     Found GEOS: /usr/lib/libgeos_c.so     Found GDAL: /usr/lib/libgdal.so (1.9.1)     Found Expat: /usr/lib/x86_64-linux-gnu/libexpat.so     Found Spatialindex: /usr/lib/libspatialindex.so     Found Qwt: /usr/lib/libqwt-qt4.so (5.2.2)     Found Sqlite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so     Found SpatiaLite: /usr/lib/libspatialite.so     Pedantic compiler settings enabled     Debug output enabled     Found Python executable: /usr/bin/python     Found Python version: 2.7.3     Found Python library: /usr/lib/libpython2.7.so     Found SIP version: 4.13.2     Found PyQt4 version: 4.9.1     CMake Error at src/plugins/grass/CMakeLists.txt:116 (ADD_LIBRARY):       add_library cannot create target "grassplugin" because another target with       the same name already exists.  The existing target is a module library       created in source directory       "/home/develop1/QGIS_Develop/qgis-1.8.0/src/plugins/grass".  See       documentation for policy CMP0002 for more details.               CMake Error at src/plugins/grass/CMakeLists.txt:140 (TARGET_LINK_LIBRARIES):       Attempt to add link library "qgisgrass" to target "grassplugin" which is       not built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:140 (TARGET_LINK_LIBRARIES):       Attempt to add link library "qgis_gui" to target "grassplugin" which is not       built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:140 (TARGET_LINK_LIBRARIES):       Attempt to add link library "util" to target "grassplugin" which is not       built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:150 (ADD_EXECUTABLE):       add_executable cannot create target "qgis.g.browser" because another target       with the same name already exists.  The existing target is an executable       created in source directory       "/home/develop1/QGIS_Develop/qgis-1.8.0/src/plugins/grass".  See       documentation for policy CMP0002 for more details.               CMake Error at src/plugins/grass/CMakeLists.txt:152 (TARGET_LINK_LIBRARIES):       Attempt to add link library "/usr/lib/x86_64-linux-gnu/libQtGui.so" to       target "qgis.g.browser" which is not built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:152 (TARGET_LINK_LIBRARIES):       Attempt to add link library "/usr/lib/x86_64-linux-gnu/libQtCore.so" to       target "qgis.g.browser" which is not built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:160 (INSTALL):       install TARGETS given target "grassplugin" which does not exist in this       directory.               CMake Error at src/plugins/grass/CMakeLists.txt:172 (INSTALL):       install TARGETS given target "qgis.g.browser" which does not exist in this       directory.


Problem opening a shp in another application

I helped a colleague converting waypoints from a gpx file to a shape file. My colleague has only arcMap. I gave him the shp and when he opened it in ArcMap, it did not show anything in the attribute table. I installed Qgis in his machine, We tried with a couple of different gpx files and we have the same problem. The resulting shp does not show anything in the attribute table in ArcMap, but we are able to see all the data in Qgis. Any Ideas?


Developing GIS Application on Android

Is there any Open Source GIS Software for Android in which we can perform Various Geoprocessing Operations (like Buffering,union and intersection) and that should be customizable eg: what we do in QGIS which is Desktop Based.


SQL Server Relationships in ArcSDE

I am running ArcSDE 10 with SQL Server 2008 R2 Standard Edition. I am new to SDE and SQL Server, but I understand that SQL Server has the ability to create relationships between tables and maintain certain referential integrity rules. ArcGIS has relationship classes that act similarly, but a relationship class does not have all the features of SQL relationships and does not result in a SQL relationship in the ArcSDE database. Is it possible to create relationship classes in ArcGIS for an ArcSDE database and create relationships for the same tables in SQL Server? By doing so, I will be able to utilize these relationships whether I am working with the data in ArcGIS or in SQL Server Management Studio. Will the two types of relationships conflict with each other or otherwise hinder performance? Thanks for your input.


How to sort data after using uniquevalue from IDataStatistics? The problem is I am using ArcGIS 9.3 vb6. **Edit:** Thanks kenbuja for the code. It will be useful. In details what I am trying to is this.   1. join gdb table and feature table using `IQueryDef`   2. get uniquevalue of a particular field and sort the field   3. Export all information in excel including the uniquevaluefield and other fields also. This can be easily done in Access through SQL/querybuilder but unfortunately I am using 9.3 vb6. Using kenbuja'r code I can go upto task 2. But I lost other field information when use `IDataStatistics`.


Reading multiple grid data with Python and ModelBuilder

How can I read grid data (3 or 5 sources of grids) like slope, soil, cover, etc.? My goal is to build a simulator based on multiple grid data for harvesting decisions.


Geographic locators within Polygons

I have a list of geographic locators and a boundary file. In QGIS, is there any way merging them together to create a lookup saying this boundary contains these locators? Not the number the actual locator i.e. postcode, easting/northing.


arcpy pydev 3rd party toolbox intellisense

I am just newly started to look at arcpy and i see that it has good intellisense for system toolboxes by default and also if you import a custom toolbox - the intellisense gets update also - however this seems to only work in arcgis built-in python. i am trying to setup this in pydev/eclipse - but even though i imported my toolbox stll pydev cannot recognise toolsNameError: name 'Mytool' is not defined but if you run it works fine. - i just want to work in pydev and to be able to see the custom tool references also ? anybody can help thanks MJ


Map in an iFrame - open hyperlink from infoWindow in the calling page

I've got a Google Map being served inside an iFrame on a page (eg xxx.com/PageWithMap.html) The code for the Google map sits on another domain (eg yyy.com/MapCode.html) So it looks like this on xxx.com/PageWithMap.html:               <iframe src="yyy.com/MapCode.html"></iframe>      The markers in the map show an infoWindow which contains a hyperlink to a new page on the first site (eg `<a href="xxx.com/photo1.html">photo link</a>`) How can I force the hyperlink to change the first page? That is, xxx.com/PageWithMap.html should navigate to xxx.com/photo1.html I'm finding that xxx.com/photo1.html opens _inside_ the iFrame on xxx.com/PageWithMap.html if I simply click the hyperlink. Searching on StackOverflow suggests using `window.top.location.href` or `target="_parent"` or `target="_top"` but I can't get it to work. Is there an added complication since the hyperlink is within a Google Map infoWindow? Let me know if the above description isn't clear - unfortunately I can't share the actual site yet but I may be able to make a mockup if necessary. Thanks


Counting Files with a Spatial Reference using Python

I need to display a _list_ of feature classes with an unknown spatial reference, and the _number_ of feature classes with a spatial reference. I think I have the first part right, but having troubles with the second part. I've been playing around with the `len()` and `count()` but those always result in an error. The following is part of my code:               for fC in fCList:          desc = arcpy.Describe(fC)          spatialRef = desc.spatialReference          if spatialRef.Name == 'Unknown': # List of feature classes that are unknown             print "\n" + fC, ("has an 'Unknown' spatial reference\n")          else: # Number of feature classes that have a spatial reference             print ("Total number of feature classes with a spatial reference:"), count(fC)


How to increase performance of tile caches if vendor parameter filters are needed?

My application uses vendor parameters to filter the data. It takes some time to generate all tiles on the server. Therefor I'm trying to increase the performance of the application. I'm using geoserver as my tileserver. I looked up if caching would be a solution, but it does not support vendor parameters. The only solution I could think of when trying to cache tiles is to filter it on the client, by having a separate layer for each possibility. However this does not seem very doable. I welcome any suggestions on how to improve performace.


How to Unlock feature classes in ArcCatalog that don't show user

In ArcCatalog there are some feature classes that are locked and don't show a user. After restarting SQL server, the feature classes remain locked. Any ideas as to what might be causing this and how I can unlock them? Map services should have a user name like gisreader or something attached to them. ![enter image description here](http://i.stack.imgur.com/9YyrS.png) Versions: ArcCatalog version 10.1, SQL Server 2008r2 and SDE 10.0.


OpenLayers displays nothing when I try to add WFS Layer from Geoserver - can't work out where the problem is occurring!

I hope someone can help me with this problem as I'm very confused! I recently downloaded the IHO Sea Areas shape file from http://www.marineregions.org/downloads.php One of my colleagues has uploaded the shape file to PostGIS and served it up using Geoserver. Because I want to display it over a google maps base layer in OpenLayers, we tried to set Geoserver to "Reproject Native to Declared" from **EPSG:4326** (detected by Geoserver) to **EPSG:3857** (Google projection). However, when trying to access the layer through Geoserver, I got a **404 The requested resource () is not available**. The only way that Geoserver would serve the file was if we set it to "Force Declared", at which point the WFS would return the data as requested. So, I don't really understand why that's the case, but I got a WFS that seemed to work. Next step (note: I have set up OpenLayers with a declared projection of EPSG:3857 on the map), I added the layer to OpenLayers using:               IHO = new OpenLayers.Layer.Vector("IHO Areas",{                  style: {                         strokeColor: "green",                         strokeWidth: 1,                         fillColor: "green",                         fillOpacity: "0.2",                         cursor: "pointer"                     },                     projection: "EPSG:3857",                     strategies: [new OpenLayers.Strategy.Fixed()],                     protocol: new OpenLayers.Protocol.HTTP({                         url: "http://*MyWebProxy*/IHO_Areas.php",                         format: new OpenLayers.Format.GeoJSON()                     })                 });               IHO.events.on({"loadend":function(){console.log(this);}});           map.addLayers([IHO]);      Now, the "loadend" event successfully fires, the logged IHO layer shows that it, and all its features, have been fetched successfully and the projection is logged as EPSG:3857 on the layer object, no errors are thrown by javascript/OpenLayers. But, nothing appears on the map. This is especially weird as I copied and pasted the code from one of my earlier projects that worked perfectly using a different WFS vector layer source. So it seems there must be something weird about the IHO shape file or the data extracted from it, but I don't really know what to look for to fix it. Can anyone suggest anything to help?


PostGIS Query: All rows within 1 hour of each other which intersect

I'm using postgres (postgis) and i want to perform a query that returns all rows which geometries intersect and have a timestamp within 1 hour from each other. **What would the SQL statement look like?** table looks like this:               id   { integer }         name { character varying }     bounds { geometry }       timestamp { timestamp with time zone }          // purposely left out bounds in the table example below (not necessary)          id   name       timestamp     ---+----------+--------------------------------     1    one        "2010-09-24 21:10:39.515+00"     2    two        "2010-09-16 09:21:09.362+00"     3    three      "2010-07-08 00:00:46.549+00"     ...      **EDIT #1** Not including the intersect matching here is an example: for every row give me any other rows that are within 1 hour:               select * from myTable order by t           id |               t                    ----+-------------------------------       9 | 2011-07-15 18:20:20.05+02      10 | 2011-07-15 19:05:00.05+02      11 | 2011-07-15 19:40:20.05+02      13 | 2011-07-15 20:31:01.05+02      14 | 2011-07-15 20:35:11.05+02     (5 rows)          result of needed query:           id |  matchid |  origTime                  | matchTime     ----+----------+----------------------------+------------------------------       9 |   10     | 2011-07-15 18:20:20.05+02  | 2011-07-15 19:05:00.05+02      10 |    9     | 2011-07-15 19:05:00.05+02  | 2011-07-15 18:20:20.05+02      10 |   11     | 2011-07-15 19:05:00.05+02  | 2011-07-15 19:40:20.05+02      11 |   10     | 2011-07-15 19:40:20.05+02  | 2011-07-15 19:05:00.05+02      11 |   13     | 2011-07-15 19:40:20.05+02  | 2011-07-15 20:31:01.05+02      11 |   14     | 2011-07-15 19:40:20.05+02  | 2011-07-15 20:35:11.05+02      13 |   11     | 2011-07-15 20:31:01.05+02  | 2011-07-15 19:40:20.05+02      13 |   14     | 2011-07-15 20:31:01.05+02  | 2011-07-15 20:35:11.05+02      14 |   11     | 2011-07-15 20:35:11.05+02  | 2011-07-15 19:40:20.05+02      14 |   13     | 2011-07-15 20:35:11.05+02  | 2011-07-15 20:31:01.05+02     (10 rows)


How to manipulate annotation text outline color in ArcEngine?

I can get the color of my annotation text like this:               IColor TextColor = lpLabelEngine.Symbol.Color;      How can I get / set the outline color? Something like this, I want a black letter with a white outline, and the white outline is 3 pixels wide.


Convert to DXF not displaying correctly in CAD

I am trying to export to DXF in QGIS 2.2.0, when I import in (AllyCAD 3.6) the shape of the polygons do not match my reference shape. I presume it has something to do with projections, but I have tried various projections and cannot seem to get this right. Any help would be appreciated.


Does ArcGIS 10 have a "Match Properties" tool like AutoCAD

My question is short-and-sweet.. I have text, pointers & lines to be added to a series of maps. ** **Creating spatial data via an edit session is not an option** ** This project is HUGE, and there will be hundreds of maps for each facet of the project. Consistency is important. My question .... is there a tool in ArcView with the same functionality as [Match Properties][1]? It would save me SO MUCH TIME!! This "one touch" functionality would be far superior to changing properties via the multi-stage process in ArcView (especially for rotation angles). I appreciate an feedback. Take care all


Calculating volume with Cut Fill tool

This might be a very simple question - but it is quite vital and I want to make sure I am thinking this through right. I have used the cut/fill tool to calculate the difference in volume of a volcano cone. I have an attribute table, is it just a case of adding up all the -ve values to find the overall volume? (negative because the volcano has inflated i.e. I should be gaining volume). * * * So, This is an example of my attribute table. However, I think that I actually need both the negative and the positive values. So, are you saying that I would have to do (2*-110676.30...)+(1*17935.13...)+(1*-55080.16...)+etc? Thanks for your help. ![Volume attribute table](http://i.stack.imgur.com/q5DjA.png)


How to convert an XML to Shapefile using FME?

I am looking to convert XML to shapfiles using FME. The XML files are user generated while they draw points and lines (mainly) of interest on a web map. We generate the XML in the backgroung containing the spatial information of user clicks. I would like to ask whether we need to follow a specific format during XML generation so as to proceed to converting them to shapefiles using FME. Thank you **Here is an XML snippet**               <?xml version="1.0" encoding="UTF-8"?>     <Configuration>      <Note>       <NoteTypes>        <Type Desc="Point:a" Id="0"/>        <Type Desc="39.66195294811828" Id="1"/>        <Type Desc="20.84663271903992" Id="2"/>       </NoteTypes>      </Note>      <Note>       <NoteTypes>        <Type Desc="Point:b" Id="0"/>        <Type Desc="39.6634561263267" Id="1"/>        <Type Desc="20.84773778915405" Id="2"/>       </NoteTypes>      </Note>      <Note>       <NoteTypes>        <Type Desc="Point:c" Id="0"/>        <Type Desc="39.66210161555193" Id="1"/>        <Type Desc="20.8490788936615" Id="2"/>       </NoteTypes>      </Note>      <Note>       <NoteTypes>        <Type Desc="Line:l1" Id="0"/>        <Type Desc="39.66206857837209" Id="1"/>        <Type Desc="20.84651470184326" Id="2"/>        <Type Desc="39.66291928072009" Id="3"/>        <Type Desc="20.84694385528564" Id="4"/>        <Type Desc="39.66319183362618" Id="5"/>        <Type Desc="20.84708333015442" Id="6"/>        <Type Desc="39.66352219934388" Id="7"/>        <Type Desc="20.84763050079346" Id="8"/>       </NoteTypes>      </Note>      <Note>       <NoteTypes>        <Type Desc="Line:l2" Id="0"/>        <Type Desc="39.66354697670904" Id="1"/>        <Type Desc="20.84759831428528" Id="2"/>        <Type Desc="39.66295231749322" Id="3"/>        <Type Desc="20.8476734161377" Id="4"/>        <Type Desc="39.66248980123196" Id="5"/>        <Type Desc="20.84869265556335" Id="6"/>        <Type Desc="39.66220072699667" Id="7"/>        <Type Desc="20.84896087646484" Id="8"/>       </NoteTypes>      </Note>      <Note>       <NoteTypes>        <Type Desc="Line:l3" Id="0"/>        <Type Desc="39.66203554117646" Id="1"/>        <Type Desc="20.84653615951538" Id="2"/>        <Type Desc="39.66141609083402" Id="3"/>        <Type Desc="20.84785580635071" Id="4"/>        <Type Desc="39.66219246771504" Id="5"/>        <Type Desc="20.84893941879272" Id="6"/>       </NoteTypes>      </Note>     </Configuration>


"Upgrade Metadata" prompt in ArcCatalog

A few months we began seeing a pop up in ArcCatalog when hitting the "Description" tab asking if you want to upgrade metadata. Clicking yes or no results in the existing metadata being deleted. Clicking the x to close the pop up is the only way to keep the existing metadata intact. Is this a known bug or am I missing something? Searched around with Google but didn't find much. ![Upgrade Metadata prompt in ArcCatalog](http://i.stack.imgur.com/DpEeI.png)


Why does collapse dualline to centreline only create an outline of the dataset?

I'm trying to collapse all divided roads in one centreline and to integrate any other spurs or errors in the dataset to create one set of centrelines. I have used Merge Divided Roads but it leaves a lot to be desired (most of the roads I wanted collapsed did not merge). Here is the dataset: ![enter image description here](http://i.stack.imgur.com/853RY.jpg) And here is what happens when it is collapsed: ![enter image description here](http://i.stack.imgur.com/h2ACN.jpg) I have also repaired geometry, reprojected and made it into a singlepart feature but nothing seems to work. I have tried it on multiple computers.


how do you convert graphics to features and then associate those features with an existing layer?

Say for example, that you have water ties. These ties connect from a home to the main water line along the street. You want to draw these ties in ArcMap and give them attribute values regarding how long the ties are. However there is already an existing layer and many of the ties have already been drawn and connected to this layer. You are told to finish drawing the remaining lines and input the remaining measurements for those lines into the already established layer's attribute table. After drawing a line from the Polygon (home) to the waterline, how do you relate it to the existing layer so that you can enter its length information?


z-Coordinate and interpolation plugin in QGis

I've a csv file that includes weather stations locations (x,y,z) and precipitation values. I loaded the file by using add delimited text and then converted it into a point shapefile WS84. By using the interpolation plugin I managed to create the different rainfall zones using pseudocolor and later I extracted the contour. However, as I have z values for elevation I'd like to take this into consideration. The interpolation plugin includes the option to select z-Coordinate to load elevation points but I cannot select it. When I open the plugin without any layer loaded the check box works fine, but when the layer is present is not possible to select the check box. The values of elevation column (z) are in mm. Am I missing anything ? Qgis 1.8.0, interpolation plugin loaded from the repository, running Windows Vista. Addition: I believe the answer is below. z data must be within the shapefile not as a feature. Thanks Bernd V! "Also note that you can use the z-coordinate for the interpolation. This is the elevation of your data that is stored within the geometry itself and not in an attribute column. This is only possible if your GIS data is in 3 dimensions." in gistutor.com/quantum-gis/20-intermediate-quantum-gis- tutorials/… . So it seems you need to generate "real" 3D-data first, but this is a blank spot for me, sorry. – Bernd V


Count the number of corners of a polygon

How can I automatically count the number of corners that has a polygon uisng VBA and ArcObjects? Thanks


Measure the angle of each corner of a polygon

How can I automatically measure the angle for each corner of a polygon (in a vector GIS) using VBA and ArcObjets? Thanks


How to get multiple shortest paths with PgRouting in one query?

I want to run shortest path algorithm on multiple source&target pairs at once and get a result as a table and process it then. How do I do this? This query does not work:               SELECT a.source, a.target, paths.*      FROM all_to_all a, shortest_path_astar('...', a.source, a.target, false, false) paths;          ERROR:  function expression in FROM cannot refer to other relations of same query level      (btw, all_to_all does not literally mean all to all, :) it's just a number of random pairs) This does not work either:               SELECT *      FROM all_to_all a, (        SELECT * FROM shortest_path_astar('...', a.source, a.target, false, false) yyy     ) AS t2;


Adding a latitude/longitude graticule in CartoDB (e.g. WMS)

I'd like to add a basemap that has a graticule in latitude/ longitude to the Map View of a CartoDB project. This could be in the WMS format for example, but I haven't been able to find one that works. For my ArcMAP work, I first tried this NOAA WMS link, but got an "unspecified error" message. When I tried it in CartoBD, I get options for 1, 5 and 10 degree, but these end up with a blank background. http://maps.ngdc.noaa.gov/arcgis/services/graticule/MapServer/WMSServer?request=GetCapabilities&service=WMS I can email NOAA about the error, but ideally, I would prefer a satellite or terrain basemap that has lat/longs included in the map. So, I thought I'd ask the forum first. For example, I have an ArcGIS server link from NOAA that works great in ArcMAP: GIS Servers\arcgis on maps.ngdc.noaa.gov\arctic with many layers of interest.


torque cartodb heatmap at higer zoom levels

I am trying to use cartodb torque to display overtime location data using Cartodb Torque. Vizualization works great at zoom level 9, but when i zoom in further to level 13 instead of the intensity i see scattered points (rightly so because i dont have points to group at certain locations for that zoom level). same behavior can be seen in the demo as well: http://blog.cartodb.com/post/66687861735/torque-is-live-try-it-on-your- cartodb-maps-today My question is it possible to have density map displayed even at higher zoom levels when using Torque? Thanks


Creating curves using the Parcel Editor tool in ArcGIS 10.1

We are migrating parcel editing environments from AutoCAD to ArcGIS and I'm having trouble creating curves within a Parcel Fabric that are not tangent to lines. For example, what would be some methods for creating the curve (a=9.618, r=190.000) for this image. ![enter image description here](http://i.stack.imgur.com/CaHYb.png) I have yet to find good documentation for performing this task. Anyone know of good sources?


Cannot import gdal_array

I attempted to use GDAL without installing due to not having rights to install on this computer. I managed to get several gdal modules working, but when I attempted to use ReadAsArray() I received the import error               ImportError: No module named _gdal_array      I looked through the python folder and found that gdal and gdalconst both had pyd files and compiled files, but gdal_array does not. When I ran VersionInfo() I got the value 1910 for gdal if that helps. I also have python 2.6 and numpy Does anyone know a way I could fix this problem without using a gdal installer?


Export my map in various formats

I want to implement a sort of content negotiation so as to export my map in formats like pdf jpg etc. Is there any way to export my current map view (with all the enabled options so far) in various formats? With the term current map view i mean "what the end user sees at a specific moment". My map is generated by combining map Services from different web servers in the Web. As a result an option such as combining my services in arcMap, publish my map as a MapService and use the export capability provided cannot help: Ex. http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/export?bbox=-241.20512466608835,-27.80850864596666,51.688012394341115,67.48206676752923 I want to get the data live directly from the servers. In fact would like to use a function like myMap.export("format") where myMap is the current map object shown by my browser.


Can't add SOC machine

I am trying to add a SOC machine to SOM server (distributed setup). From the server, I can see the service running. I have all the accounts properly setup. I may be still missing a super critical settings somewhere. This is the error that I am getting: > Machine is not a valid server container. Machine is not found. My environment is Windows Server 2008 R2 (both SOM and SOC machines), ArcGIS Server 10. I am curious if some had any idea what else to try. Is there a way to check if SOC is properly configured without using ArcCatalog or ArcGIS Server Manager. Thanks Jay


How to realign misplaced GeoTiffs?

I have bought a few (30) GeoTiff maps from my country's Geo-department - South Africa. They all have a date in the filename and the newest one was created in 2004, I see one is dated 1977 - that old! Anyway, they came with a `.tfw` file each. When I simply copy these into Google Earth, or use MapTiler to create a default-settings WSG84 tile set, the map is unaligned. Meaning that they are really close to their correct positions but a bit off center and the deviation from supposed-position differs everywhere on the image/map. Either the maps are wrongly geo-tagged or I use the wrong formats. Please note: I have no clue or experience with maps and their types (WSG84/UTM etc) I need to convert these maps into tiles for my iPhone app. I have also tried using maps of USA and they worked and were outputted perfectly. All I can tell about these maps which may help pro's is:   * It is a big white block with the map inside and the key/legend on the sides/bottom.   * The map inside has an arced top and bottom and sides/longitude-lines are skew. I would like to think it is the same as this image: (Only a small part thereof of coarse!) ![Random earth image](http://i.stack.imgur.com/D6l53.png) I have tried to realign/resize the map as an image-overlay on Google Earth, but then had no idea of how to output it or get the needed (and corrected) data from it. If anybody know how to use these, convert them to tiles or tips/tutorials that could help me fix this and get the maps straight, please tell! _If possible I would prefer to do it in MapTiler or at least on a Windows OS machine_ Thank you!


How can you find ArcGIS version programatically?

Is there a way using ArcObjects.net to find out what version of ArcGIS is installed on a machine (i.e. 9.3., 10.0, 10.1)?


What means the gdal_translate message: "Too many command options"?

I have a little question, regarding the gdal_translate-utility: I want to extract raster-files from database-stored gridfiles using the gdal_translate: > gdal_translate -ot Float32 -of SAGA PG: "host='localhost' port='5432' > dbname='$dbname' user='$dbowner' schema='grids' table='testrun' mode='2'" > /output/... But instead of delivering output it shows me "Too many command options." Then it lists usage and supported output formats. What does this message mean? I was searching the net already but found nothing which could be helpful. Thanks for an answer in advance, knutella


Python-arcpy : How make feature list from gdb and value list from field and use them in gaLayer function?

I'm not an expert in python, however I have to write a script to do geostatistical analyses with the GACreateLayer function from Arcgis. I have several data (>2000) and I want to use list of features and list of field values to perform cokriging. I have written a script, the first part return list of features in my gdb and the list of values in the field that I have chosen (it works and return field values and feature names) and the second part do cokring (it works for one feature and its field) However when I want to use both lists (inputDSet, end of script) in order to create a GA Layer it doesn't work.               File "C:\Program Files\ArcGIS\Desktop10.0\ArcPy\arcpy\ga.py", line 921, in GACreateGeostatisticalLayer     raise e     ExecuteError: Failed to execute. Parameters are not valid.     ERROR 045001: Input dataset(s) error. Table of inputs is not complete.     Failed to execute (GACreateGeostatisticalLayer)      I don't know how correctly use lists? May I transform them or something else? Here, is my code:               import sys, string, os, arcgisscripting     # Create the Geoprocessor object     gp = arcgisscripting.create()          def listFcsInGDB():         # list all Feature Classes in a geodatabase          gp.workspace = "C:\\INTERP\\PJ_class.gdb"              fcs = []         for fds in gp.ListDatasets('','feature') + ['']:             for fc in gp.ListFeatureClasses('','',fds):                 #yield os.path.join(fds, fc)                 fcs.append(os.path.join(fds, fc))         return fcs          fcs = listFcsInGDB()     for fc in fcs:         print fc          # List of value in fields     input_dataset =  fc        Atts = 'PJ_RacPJ'    #field with rainfall values                 rows = gp.searchcursor(fc)     row = rows.next()          NewList = []     for fc in fcs:         for row in gp.SearchCursor(fc):             fcValue = row.getvalue(Atts)             NewList.append(fcValue)     #print NewList          arcpy.CheckOutExtension("GeoStats")          # Load required toolboxes     arcpy.ImportToolbox("C:/Documents and Settings/ArcGIS/Toolbox.tbx")          # Local variables:     Cokriging_xml = "C:\\INTERP\\COK_.xml"     CK = "CK2"     ids1 = "C:\\INTERP\\data.gdb\\dem1000"               for fc in fcs:         for fcValue in NewList:             inputDset1 = fcValue          #Variables             inputDset2 = ids1            #Covariable             InputDset = "inputDset1;inputDset2"          # Create cokriging layer (code from model builder)              tempEnvironment0 = gp.autoCommit         arcpy.env.autoCommit = "1000"         tempEnvironment1 = gp.spatialGrid1         arcpy.env.spatialGrid1 = "0"              arcpy.GACreateGeostatisticalLayer_ga(Cokriging_xml,InputDset,CK) ##Function              arcpy.env.autoCommit = tempEnvironment0         arcpy.env.spatialGrid1 = tempEnvironment1      I need help. If someone has an idea? It would be great. Thanks


Build Raster Attribute Table with GDAL Utilities

Is there a way to build a raster attribute table using one of the GDAL utilities? I know you can view it using `gdalinfo` and I have successfully created one using Python, but it would be so much easier to just run a command line utility to build a raster attribute table on a raster.


Edit data using arcobjects by SOE Web Services on Arcgis Server 10.0

I trying to develop WebService which main purpose is enable editing data. My Web Service get as param information about records, tables etc. Code looks like below:               IFeatureWorkspace ifw = null;             IWorkspaceEdit iwep = null;             try {                 ifw = new IFeatureWorkspaceProxy(new IVersionProxy(currentUserVersion));                 iwep = new IWorkspaceEditProxy(ifw);                 iwep.startEditing(false);                 iwep.startEditOperation();                 performOperation(mergeData, ifw, iwep);     //this method make store on records             } catch (AutomationException e) {                 e.printStackTrace();             } catch (IOException e) {                 e.printStackTrace();             } catch (Exception e) {                 e.printStackTrace();             } finally {                 try {                     iwep.stopEditOperation();                     iwep.stopEditing(true);      } catch (AutomationException e) {                      } catch (IOException e) {                      }             }      Everything works fine for one single request, but above code is horrible slow for multirequest for different version. Because different people has own version which is used to editing. I think the most time take startEditOperation and startEditing. Everything starts as capability of MXD file. Anyone can give me a solution how to using soe web services give capablities for editing data which will have a quite good performance?


Where can I get aerial images for commercial use?

Related question: Free aerial map images for commercial use - Alternatives to Google maps I'm looking for a service that will allow me to download images at up to 1 meter resolution. Currently our system is based around the Mercator projection (pardon me if my terminology is incorrect) documented here. On this scale, we need imagery up to zoom level 17, which works out to be 1.2 meters per pixel. The only quote online that I could find was from Google Maps API for Business, which is $10,000 at the time of this writing. From what I can tell, the license doesn't allow images to be downloaded. Our system doesn't guarantee connection to the internet, so images will be pre-loaded. Currently I'm using MapQuest Open Aerial Tiles, but I need a little more coverage that that service provides. If it matters, we don't charge for the images, but we do charge for the software that uses the images. Images are only a small part of the overall software, so we consider it to be a free service provided with the product. What services exist that meet these requirements? I am willing to pay a license fee, provided it isn't ridiculous (<20,000 or so per year).


Where can I find the WKT standard or reference?

I had a little confusion about the representation of a geometry as well-known- text (WKT). I was searching for the WKT Specs to search for the exact representation, but I did not find the Standard. Is there a standards document or reference for WKT? where can I find it?


How to export attribute table to Excel using ArcGIS Desktop?

In previous versions I could just export as a .DBF file, open it with Excel and then convert it to an Excel file. However, now in ArcGIS 9.3.1 the .DBF file can no longer be open by Excel. I have also tried saving as a text file but to no avail.


Export table from ArcGis to Excel file

Is there a way to export a table with selected records to an Excel spreadsheet? I was trying to export just to .txt file but ArcGIS gives me an error message. The other problem I have is with coordinates. I want them only with one locus after the comma, I mean like the format: xx xx xx,x not like I have now xx xx xx,xxx. ![alt text](http://i.stack.imgur.com/AnQLd.jpg) Do you know any solutions? The version of my software is 9.3


GDAL minidriver and Tilecache

I'm trying to use GDAL minidriver to read tiles folders generated from Tilecache seeding. I have set this in my GDAL source `<ServerUrl>http://myserver.com/test/${z}/${x}/${y}</ServerUrl>`, and when I try to use gdal_translate with this minidriver file I have 404 error:               0ERROR 1: GDALWMS: Unable to download block 0, 0.     URL: http://myserver.com/test/8/0/0     HTTP status code: 404, error: (null).      The error is right because I have another kind of structure. In example I have `http://myserver.com/test/08/000/000/.` It seems to me that the output of tilecache seeding process does not have a standard TMS structure, and for this reason I have these kind of errors. Am I wrong? My source `SRS is EPSG:3004`. Could it be this the reason of a non standard TMS folders structure?


Existing ArcGIS Rest Services - What platform to use for building mapping application?

I have clients that have an existing ArcGIS Server. Map layers are published as rest services and I am going to build a mapping application that displays their datasets. Functionality should include users' ability to click on layers and retrieve attribute info. I've been using Google's JS API v3 for most of my projects. I am also using leaflet and CartoDB for other projects. I am trying to stay away from ESRI's JS API for server as it seems a little cumbersome. I'd prefer to use something like Google Maps or Leaflet for this project. Any suggestions as to what platform I should use to construct this application?   • Will it make my life easier to just use ESRI's JS API for server? • Any major downfalls to loading the REST services in Leaflet or Google ?