title: Arcpy FeatureClassToFeatureClass_conversion is causing ArcDesktop to Crash

text: I am new to coding in python and specifically Arcpy. Through trial and error I was able to piece together this code that was working fine yesterday until I installed service pack 5 for ArcGIs Desktop 10.0, on a 64 bit Windows machine. The reason I decided to install this service pack is because the code was incapable of doing more than ~60 iterations of the loop without stopping unless everything on my machine was closed except ArcCatalog. I saw on a discussion board that updating to a new service pack might solve my problem. Now my problems is the machine crashing halfway through one loop. Through trial and error I have determined that using the line of my code which calls on the FeatureClassToFeatureClass_conversion crashes ArcCatalog. The only thing that I can trace the problem back to is upgrading to service pack 5.               import arcpy     arcpy.env.scratchWorkspace=r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\Scratch'     arcpy.env.workspace=r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\2001_LW'          import os          xcelFiles = arcpy.ListFiles('*.xls')     count = 1          arcpy.env.workspace=r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\2001_LW'          for count in range(0, 140):         fileName = xcelFiles[count]         tableName = fileName[:-4] + '_Table_View'         layerName = fileName[:-4] + 'Point_Layer'         xyName = fileName[:-4] + '_pts'         tempName = 'LW' + fileName[11:-4]              shpPath = r'C:\Users\fk128474\Documents\Freds_Bitterroot_Model\wrf_data\2001_LW\Shape'         spRef = r"Coordinate Systems\Geographic Coordinate Systems\World\WGS 1984.prj"'              points = arcpy.MakeTableView_management(fileName + '\\sheet1$', tableName)              b = arcpy.MakeXYEventLayer_management(points,"F2","F3",tempName, spRef, "F4")         arcpy.FeatureClassToFeatureClass_conversion (b, shpPath, tempName)      I have not included the rest of my code as this last line causes the program to crash. Thanks Fred


title: Automating non-trivial workflow in SAGA-GIS

text: My problem: I have two DEMs, one rectangular and containing the other. Both are given in grid formats and the outer one has gridsize 50m, the inner one 10m. I want to 'embed' the smaller one in the larger one, merge them and export the whole merged grid as .xyz files with grid size 50m. All this I can do manually in SAGA-GIS, using the following steps:   1. Import the outer grid using the module "`io_grid`" - "Import Surfer Grid" (ID 3)   2. Import the inner grid using "`io_gdal`" - "GDAL: Import Raster" (ID 0)   3. Use the splendid mosaicking tool "`grid_tools`" - "Mosaicking" (ID 3)   4. Export the resulting grid using "`io_grid`" - "Export Grid to XYZ" (ID 5) Now I want to automate all this using `saga_cmd`. I managed to turn the first two steps into a script quite easily:               io_grid 3 -FILE=G:\path_to_file\foo.grd -NODATA=0 -NODATA_VAL=-99999.000000     io_gdal 0 -FILES=G:\path_to_file\bar.adf      Step 3 is tricky though. The SAGA-generated example for the module `grid_tools 3` suggests to do something like that:               grid_tools "Mosaicking" -GRIDS=memory;memory -TYPE=7 -INTERPOL=0 -OVERLAP=1 -BLEND_DIST=10.000000 -TARGET=1 -USER_XMIN=0.000000 -USER_XMAX=0.000000 -USER_YMIN=0.000000 -USER_YMAX=0.000000 -USER_SIZE=1.000000 -USER_COLS=0 -USER_ROWS=0 -USER_GRID=NULL -GRID_GRID=      In the SAGA GUI, I simply choose the input grids manually in this step (with a drop-down menu - interactively). But it seems to me that I have to name the imported grids, which I did not do in the script. But how do name them. And how can I tell `grid_tools "Mosaicking"` to use the two before-loaded grids?


title: How to clip data when using data driven pages in ArcMap 10?

text: I am working on a map book using data driven pages of the Silvies Valley in Northeastern Oregon. The basemap is a high resolution aerial image (raster) of Oregon with a shapefile overlay of USGS geologic map units. I neglected to clip the dataframe before I set up the data driven pages. Now I would like to add contours to the map. I am using the contour tool in the raster surface toolbox,...the process has been running for about 8 hours now. I understand this is because the raster is so big. My problem is, as far as I understand, if I turn off data driven pages in order to clip the dataframe, I will lose the data driven pages settings. This is not that big of a deal for me, but I would rather not do the work again. My question is, how do I clip the data to the dataframe, while I have data driven pages set up? Thanks in advance for the help, JL


title: How do I take out a comma from combined fields which should be null?

text: I have Drivers License as one field and State as the other and there are to be combined and formatted as Drivers License, State. How do I handle records that do not have either a Drivers License or State so that the field does not have a comma populated in it Example: > Record One: XXXXXX, ST > > Record Two: , > > Record Three: XXXXX, ST > > Record Four: ,


title: How do I determine appropriate Date query syntax for a layer?

text: I'm writing a web mapping query tool to query Esri mapservice layers by date using the REST API. It has been said that the syntax depends on what kind of database is behind the mapservice layer, as described in the help doc. For oracle use this:               Datefield = date 'yyyy-mm-dd'      For SQL Server use this:               Datefield = 'yyyy-mm-dd hh:mm:ss'      **How do I determine which database is being used by a particular mapservice layer so I can compose the query using the appropriate syntax?**


title: How to add multiple nested node in GeoExt

text: I have following codes, but i want to add severel parent>child>chill>child>child (4 level inside) nodes with all check box options (for user choice) in the tree panel, in fact sum of all these (parent + child) will be of around 800 entry (like tree panel of http://map.rostmuseum.ru/) again i want to load childs to be loaded as a part of the grand parent of all subsequent parent and childs (i think i will do it by including cql parameter included url from my geoserevr , is not it will be the best way) as overlay.                   var mapPanel;         Ext.onReady(function() {         // create a map panel with some layers that we will show in our layer tree         // below.         mapPanel = new GeoExt.MapPanel({         border: true,         region: "center",         // we do not want all overlays, to try the OverlayLayerContainer         map: new OpenLayers.Map({allOverlays: false}),         center: [90.04142, 23.77647],         zoom: 7,         layers: [         new OpenLayers.Layer.WMS("Bangladesh",         "http://localhost:8080/geoserver/cite/wms", {         layers: "thana"         }, {         buffer: 0,         visibility: false         }         ),         /* new OpenLayers.Layer.WMS("Tasmania State Boundaries",         "http://demo.opengeo.org/geoserver/wms", {         layers: "topp:tasmania_state_boundaries"         }, {         buffer: 0         }         ),*/         /* new OpenLayers.Layer.WMS("Water",         "http://demo.opengeo.org/geoserver/wms", {         layers: "topp:tasmania_water_bodies",         transparent: true,         format: "image/gif"         }, {         isBaseLayer: false,         buffer: 0         }         ),*/         new OpenLayers.Layer.WMS("Rivers",         "http://localhost:8080/geoserver/cite/wms", {         layers: "cite:river",         transparent: true,         format: "image/gif"         }, {         isBaseLayer:true,         buffer: 0         }         ),         new OpenLayers.Layer.WMS("Roads",         "http://localhost:8080/geoserver/cite/wms", {         layers: "cite:roadnetwork",         transparent: true,         format: "image/gif"         }, {         isBaseLayer: false,         buffer: 0         }         ),         // create a group layer (with several layers in the "layers" param)         // to show how the LayerParamLoader works         new OpenLayers.Layer.WMS("Bangladesh (Boundaries)",         "http://localhost:8080/geoserver/it.geosolutions/wms", {         layers: [         "internationalboundary",         "divisionalboundary",         "districtbounday",         "thanaboundary"         ],         transparent: true,         format: "image/gif"         }, {         isBaseLayer: false,         buffer: 0,         // exclude this layer from layer container nodes         displayInLayerSwitcher: false,         visibility: false         }         )         ]         });              // create our own layer node UI class, using the RadioButtonMixin         var LayerNodeUI = Ext.extend(         GeoExt.tree.LayerNodeUI, new GeoExt.tree.RadioButtonMixin()         );              // using OpenLayers.Format.JSON to create a nice formatted string of the         // configuration for editing it in the UI         var treeConfig = new OpenLayers.Format.JSON().write([{         nodeType: "gx_baselayercontainer"         }, {         nodeType: "gx_overlaylayercontainer",         expanded: true,         // render the nodes inside this container with a radio button,         // and assign them the group "foo".         loader: {         baseAttrs: {         radioGroup: "foo",         uiProvider: "use_radio"         }         }         }, {         nodeType: "gx_layer",         layer: "Bangladesh (Boundaries)",         isLeaf: false,         // create subnodes for the layers in the LAYERS param. If we assign         // a loader to a LayerNode and do not provide a loader class, a         // LayerParamLoader will be assumed.         loader: {         param: "LAYERS"         }         }], true);              // create the tree with the configuration from above         var tree = new Ext.tree.TreePanel({         border: true,         region: "west",         title: "Layers",         width: 200,         split: true,         collapsible: true,         collapseMode: "mini",         autoScroll: true,         loader: new Ext.tree.TreeLoader({         // applyLoader has to be set to false to not interfer with loaders         // of nodes further down the tree hierarchy         applyLoader: false,         uiProviders: {         "use_radio": LayerNodeUI         }         }),         root: {         nodeType: "async",         // the children property of an Ext.tree.AsyncTreeNode is used to         // provide an initial set of layer nodes. We use the treeConfig         // from above, that we created with OpenLayers.Format.JSON.write.                   //work          children: Ext.decode(treeConfig)                   },         listeners: {         "radiochange": function(node){         alert(node.layer.name + " is now the the active layer.");         }         },         rootVisible: false,         lines: false,         bbar: [{         text: "Show/Edit Tree Config",         handler: function() {         treeConfigWin.show();         Ext.getCmp("treeconfig").setValue(treeConfig);         }         }]         });              // dialog for editing the tree configuration         var treeConfigWin = new Ext.Window({         layout: "fit",         hideBorders: true,         closeAction: "hide",         width: 300,         height: 400,         title: "Tree Configuration",         items: [{         xtype: "form",         layout: "fit",         items: [{         id: "treeconfig",         xtype: "textarea"         }],         buttons: [{         text: "Save",         handler: function() {         var value = Ext.getCmp("treeconfig").getValue()         try {         var root = tree.getRootNode();         root.attributes.children = Ext.decode(value);         tree.getLoader().load(root);         } catch(e) {         alert("Invalid JSON");         return;         }         treeConfig = value;         treeConfigWin.hide();         }         }, {         text: "Cancel",         handler: function() {         treeConfigWin.hide();         }         }]         }]         });              new Ext.Viewport({         layout: "fit",         hideBorders: true,         items: {         layout: "border",         deferredRender: false,         items: [mapPanel, tree, {         contentEl: "desc",         region: "east",         bodyStyle: {"padding": "5px"},         collapsible: true,         collapseMode: "mini",         split: true,         width: 200,         title: "Catalog"         }]         }         });         });      Please guide me.


title: getActiveLayers for LeafletJS

text: I'd like to identify the layers that are currently active (which basemap is currently in view and which overlays are currently turned on). Was hoping to find something akin to `getActiveLayers` in the Leaflet API (http://leafletjs.com/reference.html/) but I'm not seeing anything...


title: Export map to geotiff?

text: I try to export my map (layout or data view doesn't really matter) to a georeferenced tiff-file (geotiff). However, this presumably easy task is proving rather difficult to accomplish. I first tried the code from this question:               import arcpy.mapping     mxd = arcpy.mapping.MapDocument("CURRENT")     arcpy.mapping.ListDataFrames(mxd)     arcpy.mapping.ExportToTIFF(mxd,r"D:\out2.tif","PAGE_LAYOUT",640,480,96)      All is good, a tif file is exported. But for some reason doesn't it contain any coordinates. Some further research revealed this ArcGIS help page with a very detailed workflow. But it refers to an option that is not available in my export window: > 4, Choose Layout GeoTIFF (*.tif) from the Save as type drop-down list. ![enter image description here](http://i.stack.imgur.com/ibn4X.png) What am I missing here? Do I need another extension to create geotiffs?


title: Unable to create Dimension Feature Class

text: I am trying to create a Dimension feature class within a new geodatabase. I right-click on the geodatabase and select the New, then Feature Class. The New Feature Class window comes up and I can put in the Name, but when I use the drop down to select Dimension Features, I only get Polygon, Line, Point, Multipoint, Multipatch, and Annotation Features. I am using Arcmap 10.2 standard license. As I understand, I should be able to do this. Is this a bug? Or, am I doing something wrong? How do I make a new Dimension Feature?


title: QGIS browser connect to Oracle DB, while QGIS GUI doesn't ... why?

text: I installed QGIS 2.0.1 on my Windows 7 platform. Using QGIS browser I successfully connect to an Oracle DB specifying into the connection dialog box the following information HOST = the machine IP where Oracle DB is PORT = 1521 (the standard oracle port) SERVICE_NAME = MTRAM (my service name) User Id = MYUSER Password = MYPWD it works perfectly showing to me into the preview tab shapes of one table I looked for. After that I opened QGIS desktop because I want to navigate into this DB and try to export shapes after doing a coordinate transformation, but I stopped immediately because after clicking on the icon of the Oracle connection and selecting the previously connection inserted by QGIS browser, QGIS complained that it was not able to connect to the DB either because I need to install GDAL Georaster (I checked and it was installed) or that the connection parameters where wrong. I tried to open the modify view in order to see if some parameters of the connections were screwed up, but they where right, even if I noticed that there were any specification for the HOST someone have an idea of the problem and how to solve it? thanks a lot


title: Add a field to output feature of a geoprocessing tool?

text: I am running the Watershed tool and RasterToPolygon tool in a loop for a number of points:               flowdir = "flow.tif"     flowacc = "flowacc.tif"      pnts = [arcpy.PointGeometry(arcpy.Point(x=0.0, y=0.0, ID = 12)), arcpy.PointGeometry(arcpy.Point(x=1.0, y=1.0, ID = 15))] #Create some test points     out = []          for i, p in enumerate(pnts):              out.append("C:/temp/wspoly_%i.shp"% i)  #Create the output filename         snap_pt = sa.SnapPourPoint(p, flowacc, tolerance = 100) # snap the point          ws = sa.Watershed(flowdir, snap_pt) # calculate watershed raster         arcpy.RasterToPolygon_conversion(ws, out[i]) # convert watershed raster to polygon      Ideally, I'd like the output to have an ID field taken from the ID attribute of each point. Is there any way to do this?


title: Is it possible to display labels in background files (.imp) on Trimble GPS units?

text: I have been trying to figure out if this is possible for a while now. I know if you load a file in as a data file, you can click on a feature and the label will pop up. However, you cannot view a data file if you are collecting data and creating a new data file. Has anyone had any success making labels show or know that it's not possible?


title: Adding jpeg. files and not displaying in colour

text: When I try to add a jpeg file into my project on Arc it displays only in black and white. I have checked the file and it is definitely in colour. Does anybody know how I can add such files in the project in colour?


title: MapInfo Professional: Can't modify table structure

text: I am new to MapInfo and I need to combine several tables together, by copying and pasting. I need for all the tables to have the same table structure, however when I try to modify these tables (table>maintenance>table structure>view/modify table) it won't allow me to change the order of the fields. When i try to, i get the following error: "cannot perform this operation on table (table name)." Why won't it let me change the data structure? any suggestions? The picture is of the dialogue window i get when i attempt to modify table structure. As you can see, it doesn't look like the regular window. But i don't know why or how to change it.   When i move my fields to the order I need them in, and click OK, is when i get the error message. ![This is the dialogue window i get when i attempt to modify](http://i.stack.imgur.com/795jn.jpg) THanks!


title: How to load OSM data into PostGIS preserving all Tags?

text: I am new to the field of GIS and am trying to view source tags in OSM. I have downloaded the shapefiles from http://downloads.cloudmade.com and have loaded them into Postgres. When I view the data, I am unable to see any tagging data. Should I be following a different process or using shapefiles at all?


title: Is there a way to save manual QGIS changes to Postgis to SQL script?

text: I am manually editing a Postgis layar with QGIS and would like to export these manual changes in the form of an SQL script. This way:   * I can do it automatically next time i need to   * it is easier to work on remote machines where i don't have QGIS Is this possible?


title: T-SQL with SDE and Web Map ArcGIS Server 10 MSSQL 2008

text: I need to build a system whereby the user of a web map (the standard web map that ArcGIS Server Manager builds) can edit a feature class's attributes. The attribute will be a 'Comments' field. The feature class will be replaced quarterly but the 'Comments' field must persist across quarterly updates. I am thinking to build a stand alone table in sde (MSSQL 2008) and let users of the web map update the feature class's 'Comments' field directly then have a db trigger fire which will write to the stand alone table.. the unique id of the record in the feature class and also the comments edit. This would be to retain the 'Comments' field apart from the feature class thus persisting the comments across quarterly updates of the feature classes. I have already built the standard web map from AGS Manager and created the feature service of the feature class and tested the editing of a 'Comments' field. Now I am starting to build the persisted 'Comments' architecture. Also, there may be multiple 'Comments' attributes inserted over time, I am uncertain as to whether I should have multiple 'Comments' fields in a stand alone table OR have multiple records in the stand alone table with each comment and the unique id and do a one-to-many join to return them in the web map. I also think deleting comments will be important. Does anyone have any suggestions or tips or alternative approaches? If the T-SQL approach, are there any tips on T-SQL and SDE? Thanks.


title: MapServer inside WordPress Pages/Posts?

text: I'd like to put maps inside of a wordpress CMS, but I'm running into troubles with the permalink structure ignoring the maps all together... I have a .htaccess file that will force WordPress to ignore a directory, and I can have the page render, but not inside the pages... I've tried embedding an iframe, both from an .htaccess allowed directory, and even from a subdomain that has nothing but a test map on it. I'm fairly new to GIS, so any help in connecting a MapServer / MapScript system into WordPress would be genuinely appreciated. If there's any other data you need, please let me know. Matt


title: How to filter OSM files based on tags using Osmosis?

text: I am working with .osm files and am trying to filter entities based on tags. I need to view only entities containing both source and attribution tags. I used the following to successfully filter all source tags only:               osmosis --read-xml file = "northern_ireland.osm" --way-key-value keyValueList="source"      --used node --write-xml northern_ireland_source.osm      From another tutorial, I've noticed that I would need to use a pipe: http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.38 So I did the following:               osmosis --rx northern_ireland.osm --accept-ways source=* outPipe.0 = SOURCE      However, upon trying such code, I get a syntax error stating: _Argument does not contain a name before the '=' (i.e. name = value)._ Any suggestions?


title: How to generate Tiles with QGIS

text: Is it possible to generate map tiles from QGIS? I guess QGIS Server must have a way to do it, but is there a way to just generate the tiles and save them to disk? With the new symbology renderer and scale-dependent rendering, QGIS is a powerful tool for generating dynamic maps. Since I'm using the new-symbology renderer, qgis-mapnik is not an option, and since I'm using scale-dependent rendering, just generating a large georaster and using gdal2tiles to tile it is also not an option. Thanks!


title: kernel density with Grass-Qgis

text: Hello I am studying the use of GRASS GIS within Qgis and I need a little help with the understanding of the v.kernel module. I didn't find any human help within the manual (very cryptic) This are my questions: I have a point data vector and I need to study the density of the points distribuition in my mapset using a bandwith of 1000 meters. How do I set the parameter , or in other words ... what is this parameter related to ? What is the correct use of this parameter in relation with the settings of the bandwith ? Can I simply set the parameter with a value of 1000 ? Thank you.


title: The general public and their ability to use GIS applications - do we still need paper maps?

text: I am endeavouring to convince others in my organisation that GIS tools, in particular digitising tools, CAN be used by the general public and we should promote their use instead of using paper maps. This would save money (postal fees) and time (the time it takes to post maps) and I suppose it's better for environment (not using paper). The counter argument is that people feel more at home with a pen/pencil and sketch out areas/polygons etc on a paper map, they also tend to be more accurate. My business requires applicants to be fairly accurate with sketching out boundaries against a background map. What do you think I can do to persuade those disbelievers? :) How can we improve sketching tools for non-GIS users so they make accurate sketches on maps. What tips/techniques do you know of, have you faced this problem yourself?? Are we doomed to using paper maps for ever more!? Your thoughts are most welcome. PS - the GIS application is likely to be web based and open to the general public. Probable tech would be ESRI Javascript API - with cached up, optomised map services, sensible scale levels and clear symbology etc.


title: Which Tools do you use for Classification of Remote Sensing Data?

text: **Which** tool do you prefer to use for classification of remote sensing data, e.g. classifying land use, and **why**? Which other tools have you tried, and why did you decide against them?


title: How to use for 'viewport' and 'bounds' coordinates from Google Maps API v3

text: I am looking for ideas as to how I might be able to use some coordinate information that has been pre-geocoded using the Goole Maps API v3, to provide me with a Street View. I have a bunch of addresses that I have already run through the geocoder and I have saved the resulting JSON response into a table. In addition to having the [lng, lat] coordinates so that I can map a point, there is also other information available such as:   * location    * location_type    * viewport    * bounds My question is: What can I do with these additional elements? What does knowing the viewport and bounds allow me to do? Ideally, what I would like to be able to do is load an accurate street view looking directly at the property in question. From what I've read, it seems that what is required in that case is to know the heading and pitch, but I don't believe that viewport and bounds will allow me to know the heading and pitch. I'm lost. How can I implement an accurate street view using the data I already have? Thanks.


title: How to resolve encoding errors in python geoprocessing?

text: I have a simple python script that reads a string from a text file and inserts it into an Oracle database. When I run the script with Eclipse using Pydev plugin I get no error and the message is inserted into database. However, when I run the script using an ArcGIS geoprocessing service (using a toolbox), I get the following error in the logs, and no insertion is performed into database:               [06/09/2013-10:30:39.380] ERROR - APPLICATION <module>(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u"INSERT INTO APPLI.ALERT (ID_ALERT,MESSAGE,TYPE_ALERT) values(1617.0,q'[Les coordonn\xe9es ne sont pas correctes\n]',3)", 94, 95, 'ordinal not in range(128)'))      The code is the following:               try:         msg=open("myFile.log", 'r')         a=msg.read(20)          strInsert = "INSERT INTO  APPLI.ALERT(ID_ALERT,MESSAGE,TYPE_ALERT) values(1625.0,'"+a.replace('\"','').decode('utf-8')+"',3)"         logger_module.debug(str(strInsert))         SdeExecuteSQL(CONNEXION_FILE,strInsert )     except:         python_error_handler()      When I open myFile.log with Notepad++ the encoding is ANSI as UTF-8. Do you have any hint?


title: Invert gdaldem aspect

text: I am trying to identify lakes and other water bodies in a DEM file. The source file is located here. I am using `gdaldem aspect` to identify contiguous pixels with zero slope change.               gdaldem aspect -co compress=lzw infile_dem.tif outfile_aspect.tif      When I plot the output file, it looks like below (please ignore the white border): ![enter image description here](http://i.stack.imgur.com/VwQTr.jpg) Obviously, I am doing the exact opposite of what I need to be doing. Is there any way of inverting the operation of `gdaldem aspect`? The output of `gdalinfo` is give below:               Size is 2928, 2285     Coordinate System is:     GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4326"]]     Origin = (81.381111111111110,22.564444444444447)     Pixel Size = (0.002083333333333,-0.002083333333333)     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=BAND     Corner Coordinates:     Upper Left  (  81.3811111,  22.5644444) ( 81d22'52.00"E, 22d33'52.00"N)     Lower Left  (  81.3811111,  17.8040278) ( 81d22'52.00"E, 17d48'14.50"N)     Upper Right (  87.4811111,  22.5644444) ( 87d28'52.00"E, 22d33'52.00"N)     Lower Right (  87.4811111,  17.8040278) ( 87d28'52.00"E, 17d48'14.50"N)     Center      (  84.4311111,  20.1842361) ( 84d25'52.00"E, 20d11' 3.25"N)     Band 1 Block=2928x1 Type=Int16, ColorInterp=Gray       NoData Value=-32768


title: Logic behind Google querying based on POI

text: I am Currently Working in Geocoding process based on google API service.Today my superior asked a question how does Google exactly query a POI(Place Of Interest) if it is latitude and Longitude is passed.Can anyone help me in answering this?


title: Using Contour plugin, progress bar sticks at zero

text: I am using Quantum GIS 1.8.0. I have a base map sourced from OSGB Opendata VectorMap District (vector format), and that displays fine. I also have created a spreadsheet showing journey times to a chosen destination, with the grid references of 4623 postcodes within 10km of that destination. The first few lines of this spreadsheet are:   from easting northing time   DH1 1AB 430317 543630 527   DH1 1AD 430239 543638 534   DH1 1AE 430220 543685 545   DH1 1AF 430340 544013 555   DH1 1AG 430323 543876 556   I have imported this as a delimited text layer (is that the right terminology) and my map shows the locations of all these postcodes.   What I want to do is to plot contour lines showing the areas that are within 5 / 10 /15 / 20 minutes of the destination and shade them. (Is this called an isochron?) When I try to use the contour plugin to do this, it goes to 99% cpu and the progress bar does not move off zero. I should perhaps add that postcodes are packed quite densely in settlements and quite far apart in open countryside.   There must be a better way to do this, but as a newby to this software I need some advice please.


title: Geocode incredibly quickly but inaccurately

text: I have a Rails 4 app that needs to be able to geocode a large number of places very quickly, but not with any high degree of accuracy. Accurate to a few miles would be fine, I really just need the lat/lon of the nearest city. Some solutions I have thought of would be to download my own database and use some sort of levenshtein distance function to pull the correct record by city/country, but ideally there would be some kind of API that geocodes innacurately, but quickly and cheaply. I need to be able to run possibly hundreds of thousands-millions of queries a day, with sub 2ms type speed. A "place" in my data set is user-inputed. Most likely a city/country or city/state. e.g. "Santa Barbara, CA" or "Ontario, Canada"


title: how to integrate external image processing programs within ModelBuilder

text: I want to use python libraries to do image processing for very large files (over 2GB), but the current python libraries can not read 16 or 32 bit image correctly. At least, I tried Python Image library, GDAL etc. which gave me 8 bit images or 2/3 correct images. I want to try ArcGIS as the platform through ModelBuilder for image input. Does anyone know how to integrate ArcGIS raster input with external image processing programs? My basic idea is to convert ArcGIS raster input as an array for python libraries, but I do not know how to do. Any hint or suggestion to let me continue? The primary works I did are just install python libraries within python 2.6 for ArcGIS and some codes as following.               import arcpy     import os, sys       import numpy as num     from scipy import ndimage     from skimage.morphology import watershed, is_local_maximum          def setupParameters():              #local variables for input and output         input_rater=str(arcpy.GetParameterAsText(0))         output_raster=arcpy.GetParameterAsText(1)         local_array=int(arcpy.GetParameterAsText(2))              #Image segmentation using scikit-image         distance = ndimage.distance_transform_edt(Input_Raster)         local_maxi = is_local_maximum(distance, Input_Raster, num.ones((3, 3)))         markers = ndimage.label(local_maxi)[0]         labels = watershed(-distance, markers, mask=Input_Raster)          if __name__ == '__main__':         setupParameters()


title: Issue installing Qgis 1.8 Openlayers Plugin on Win XP

text: I recently installed Qgis on a Win XP PC. All seems fine. I went to install the Openlayers plugin using http://build.sourcepole.ch/qgis/plugins.xml and I get and error saying the plugins directory doesn't exist. The error reports the location as: C:/Documents and Settings/osc/.qgis//python/plugins The plugins directory does exist but the path displayed in the error seems to have one too many forward slashes - i.e. '.qgis//'. I've successfully used the plugin installer for the Openlayers plugin many times on Linux so is there something special about Win XP to consider?


title: Raster grid for zonal statistics in R

text: I have two raster layer, the first one `r` is my zonal mask as a raster grid, and I created as:               ext <-extent(Yraster)         r <- raster(nrows=32,ncols=32,ext)     r[] <-(1:ncell(r))      and project it as the 'Yraster' one               projection(r)<-"+proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"            > r     class       : RasterLayer      dimensions  : 32, 32, 1024  (nrow, ncol, ncell)     resolution  : 428.465, 430.3401  (x, y)     extent      : 346090.2, 359801.1, 8783943, 8797714  (xmin, xmax, ymin, ymax)     coord. ref. : +proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0      data source : in memory     names       : layer      values      : 1, 1024  (min, max)          > Yraster     class       : RasterLayer      dimensions  : 459, 457, 209763  (nrow, ncol, ncell)     resolution  : 30.00192, 30.00192  (x, y)     extent      : 346090.2, 359801.1, 8783943, 8797714  (xmin, xmax, ymin, ymax)     coord. ref. : +proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0      data source : in memory     names       : acre_2010_non1      values      : 1, 1  (min, max)     Raster Attribute Table          fields : ID Rowid    COUNT             min :  1     0 13821927             max :  1     0 13821927      but when I do the zonal statistics, an error pop out:               > list <- zonal(Yraster,r, na.rm=TRUE)     Error in compare(c(x, z)) : ncols different      How can I make the zonal statistics work?


title: Clipping from a given point

text: I am working with model-builder and I am trying to clip an area around a certain point. Is there a tool that I can use in which I can assign it a certain distance from the point. For instance, if I have a point X and I want to clip an area that is 12.5 miles each direction from the point and then have it as a layer. Any suggestions will help a lot. Thank You


title: If the Earth was flat, what unit of measurement would distances between geographic points be represented as?

text: A whole lot of abstraction- given two longitude/latitude points given from a GPS, I'm using the Pythagorean distance formula to find the distance between them. What unit of length would the distance be? Kilometers? Miles?


title: Can I modify the "value" field of a raster attribute table?

text: Can I modify the values of the "Value" field of a raster attribute table and if yes how? Thanks Demetris


title: Accessing GEOS functions in Python

text: _**The issue:_** I am using Windows 7, 64-bit operating system with Python 3.2. I must continue to use Python 3.2 because of a dependency with another API. I need some functions in GEOS that are not currently supported by GDAL/OGR 1.8 and there is no port of Shapely for Python 3.2 on 64-bit Windows. Spatialite has a beta version for 64-bits Windows but I can't get it to work and nobody in the main Stackoverflow list has a solution ( http://stackoverflow.com/questions/8590599/sqlite-load-extension-fail-for- spatialite-in-python ). I don't want to have to go down the route of using PostGIS to get access occassinoally to one or two functions GDAL/OGR doesn't have.... _**The Question:_** SO: Can anybody explain how to either get Spatialite working or better still, how I can use CTypes to access the functionality in the GEOS dll (I know how to connect to it but I don't understand how to pass data, say wkt, in and get my result back out - http://stackoverflow.com/questions/8240674/using-geos-via-pythons-ctypes ). I am VERY sorry for cross-posting but I really do need a solution. VERY many thanks.


title: Arcpy GetRasterProperties returns odd results

text: I have this simple piece of python code to test whether a raster has integer values or not:                       res = arcpy.GetRasterProperties_management(ws, 'VALUETYPE')             res = res.getOutput(0)             if res > 8:                 print res      I run this in a loop for a number of rasters. Problem is, it prints out a list of 3's. I'm guessing that the 'res' variable is not a single number at all and when you do a logical test on it, it looks at a certain attribute and when you `print` res, it prints a different attribute. Can anyone explain how I should do this test properly?


title: Problem in Exporting Vector shapefile to ROI(Region Of Interest) in ENVI-4.7

text: I working in ENVI image processing software. I want to export shape file to ROI in order to create subset of the image .For This first I loaded shapefile converted that into .evf format .While exporting this .evf file to .roi I am getting a error below. what is the I am doing?kindly help.


title: How to merge shape files with attributes from a python script in QGIS?

text: I have some shape files. They are all the same kind of shape and all have the same attributes. If I wanted to merge them manually the "Vector/Data management tools/merge shape files to one" works fine. However, as per the question title, I'd like to do this using python from a script. I went hunting for the "merge shape files" in the hopes I could cobble it into my script but I couldn't find it. I tried writing one myself iterating over the features and copying them into another layer as per the pyQGIS cookbook but lost the attributes along the way.               feature_list = inputlayer.getFeatures()       for feature in feature_list:         (res, outFeats) = outputlayer.dataProvider().addFeatures( [ feature ] )      I also tried writing a script using the iface copy features function with the same loss of attributes as a result.               qgis.utils.iface.setActiveLayer(importlayer)     importlayer.setSelectedFeatures(range(100))     #(there are exactly 100 features)     qgis.utils.iface.actionCopyFeatures().trigger()     iface.setActiveLayer( outputlayer )     outputlayer.startEditing()     qgis.utils.iface.actionPasteFeatures().trigger()      Can someone help me fix my code to retain the copied attributes or point me to a pyQGIS script to achieve this result?


title: OpenLayers Point was removed after draw Path

text: I want to draw some path by using OpenLayers. Add new Layer                   var mLayer = new OpenLayers.Layer.Vector("New Layer", {             styleMap : new OpenLayers.StyleMap(markerStyle)         });         var editPanel = new DOU.EditingToolbar(mLayer);         map.addLayer(mLayer);         map.addControl(editPanel);      ![enter image description here](http://i.stack.imgur.com/PrPdl.jpg) To draw Path, I use Path Control. But when I change control (Example, I click to Move Control or Point Control, All Markers (which you can see in the picture) will be removed. Do you have any suggestion? Thanks so much. My Code:               DOU.HandlerPath = OpenLayers.Class(DOU.HandlerPoint, {              /**          * Property: line          * {<OpenLayers.Feature.Vector>}          */         line : null,              /**          * APIProperty: maxVertices          * {Number} The maximum number of vertices which can be drawn by this          * handler. When the number of vertices reaches maxVertices, the          * geometry is automatically finalized. Default is null.          */         maxVertices : null,              /**          * Property: doubleTouchTolerance          * {Number} Maximum number of pixels between two touches for          * the gesture to be considered a "finalize feature" action.          * Default is 20.          */         doubleTouchTolerance : 20,              /**          * Property: freehand          * {Boolean} In freehand mode, the handler starts the path on mouse down,          * adds a point for every mouse move, and finishes the path on mouse up.          * Outside of freehand mode, a point is added to the path on every mouse          * click and double-click finishes the path.          */         freehand : false,              /**          * Property: freehandToggle          * {String} If set, freehandToggle is checked on mouse events and will set          * the freehand mode to the opposite of this.freehand. To disallow          * toggling between freehand and non-freehand mode, set freehandToggle to          * null. Acceptable toggle values are 'shiftKey', 'ctrlKey', and 'altKey'.          */         freehandToggle : 'shiftKey',              /**          * Property: timerId          * {Integer} The timer used to test the double touch.          */         timerId : null,              /**          * Property: redoStack          * {Array} Stack containing points removed with <undo>.          */         redoStack : null,              /**          * Constructor: OpenLayers.Handler.Path          * Create a new path hander          *          * Parameters:          * control - {<OpenLayers.Control>} The control that owns this handler          * callbacks - {Object} An object with a properties whose values are          * functions. Various callbacks described below.          * options - {Object} An optional object with properties to be set on the          * handler          *          * Named callbacks:          * create - Called when a sketch is first created. Callback called with          * the creation point geometry and sketch feature.          * modify - Called with each move of a vertex with the vertex (point)          * geometry and the sketch feature.          * point - Called as each point is added. Receives the new point geometry.          * done - Called when the point drawing is finished. The callback will          * recieve a single argument, the linestring geometry.          * cancel - Called when the handler is deactivated while drawing. The          * cancel callback will receive a geometry.          */              /**          * Method: createFeature          * Add temporary geometries          *          * Parameters:          * pixel - {<OpenLayers.Pixel>} The initial pixel location for the new          * feature.          */         createFeature : function(pixel) {             var lonlat = this.layer.getLonLatFromViewPortPx(pixel);             var geometry = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);             // this.point = new OpenLayers.Feature.Vector(geometry);             this.point = new OpenLayers.Feature.Vector(geometry, {}, DOU.PointStyle);             this.line = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString([this.point.geometry]), {}, DOU.LineStyle);                  this.callback("create", [this.point.geometry, this.getSketch(), this.ps]);             this.point.geometry.clearBounds();             this.layer.addFeatures([this.line, this.point], {                 // silent : true             });         },              /**          * Method: destroyFeature          * Destroy temporary geometries          *          * Parameters:          * force - {Boolean} Destroy even if persist is true.          */         destroyFeature : function(force) {             //DOU.HandlerPoint.prototype.destroyFeature.call(this, force);             this.line = null;         },              /**          * Method: destroyPersistedFeature          * Destroy the persisted feature.          */         destroyPersistedFeature : function() {             var layer = this.layer;             if (layer && layer.features.length > 2) {                 // this.layer.features[0].destroy();             }         },              /**          * Method: removePoint          * Destroy the temporary point.          */         /*         removePoint : function() {         if (this.point) {         this.layer.removeFeatures([this.point]);         }         },*/              /**          * Method: addPoint          * Add point to geometry. Send the point index to override          * the behavior of LinearRing that disregards adding duplicate points.          *          * Parameters:          * pixel - {<OpenLayers.Pixel>} The pixel location for the new point.          */         addPoint : function(pixel) {             //this.layer.removeFeatures([this.point]);             var lonlat = this.layer.getLonLatFromViewPortPx(pixel);             this.point = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat));                  this.line.geometry.addComponent(this.point.geometry, this.line.geometry.components.length);                  this.layer.addFeatures([this.point]);                  this.callback("point", [this.point.geometry, this.getGeometry()]);             this.callback("modify", [this.point.geometry, this.getSketch()]);             this.drawFeature();             delete this.redoStack;         },              /**          * Method: insertXY          * Insert a point in the current sketch given x & y coordinates. The new          * point is inserted immediately before the most recently drawn point.          *          * Parameters:          * x - {Number} The x-coordinate of the point.          * y - {Number} The y-coordinate of the point.          */         insertXY : function(x, y) {             this.line.geometry.addComponent(new OpenLayers.Geometry.Point(x, y), this.getCurrentPointIndex());             this.drawFeature();             delete this.redoStack;         },              /**          * Method: insertDeltaXY          * Insert a point given offsets from the previously inserted point.          *          * Parameters:          * dx - {Number} The x-coordinate offset of the point.          * dy - {Number} The y-coordinate offset of the point.          */         insertDeltaXY : function(dx, dy) {             var previousIndex = this.getCurrentPointIndex() - 1;             var p0 = this.line.geometry.components[previousIndex];             if (p0 && !isNaN(p0.x) && !isNaN(p0.y)) {                 this.insertXY(p0.x + dx, p0.y + dy);             }         },              /**          * Method: insertDirectionLength          * Insert a point in the current sketch given a direction and a length.          *          * Parameters:          * direction - {Number} Degrees clockwise from the positive x-axis.          * length - {Number} Distance from the previously drawn point.          */         insertDirectionLength : function(direction, length) {             direction *= Math.PI / 180;             var dx = length * Math.cos(direction);             var dy = length * Math.sin(direction);             this.insertDeltaXY(dx, dy);         },              /**          * Method: insertDeflectionLength          * Insert a point in the current sketch given a deflection and a length.          * The deflection should be degrees clockwise from the previously          * digitized segment.          *          * Parameters:          * deflection - {Number} Degrees clockwise from the previous segment.          * length - {Number} Distance from the previously drawn point.          */         insertDeflectionLength : function(deflection, length) {             var previousIndex = this.getCurrentPointIndex() - 1;             if (previousIndex > 0) {                 var p1 = this.line.geometry.components[previousIndex];                 var p0 = this.line.geometry.components[previousIndex - 1];                 var theta = Math.atan2(p1.y - p0.y, p1.x - p0.x);                 this.insertDirectionLength((theta * 180 / Math.PI) + deflection, length);             }         },              /**          * Method: getCurrentPointIndex          *          * Returns:          * {Number} The index of the most recently drawn point.          */         getCurrentPointIndex : function() {             return this.line.geometry.components.length - 1;         },              /**          * Method: undo          * Remove the most recently added point in the sketch geometry.          *          * Returns:          * {Boolean} A point was removed.          */         undo : function() {             var geometry = this.line.geometry;             var components = geometry.components;             var index = this.getCurrentPointIndex() - 1;             var target = components[index];             var undone = geometry.removeComponent(target);             if (undone) {                 // On touch devices, set the current ("mouse location") point to                 // match the last digitized point.                 if (this.touch && index > 0) {                     components = geometry.components;                     // safety                     var lastpt = components[index - 1];                     var curptidx = this.getCurrentPointIndex();                     var curpt = components[curptidx];                     curpt.x = lastpt.x;                     curpt.y = lastpt.y;                 }                 if (!this.redoStack) {                     this.redoStack = [];                 }                 this.redoStack.push(target);                 this.drawFeature();             }             return undone;         },              /**          * Method: redo          * Reinsert the most recently removed point resulting from an <undo> call.          * The undo stack is deleted whenever a point is added by other means.          *          * Returns:          * {Boolean} A point was added.          */         redo : function() {             var target = this.redoStack && this.redoStack.pop();             if (target) {                 this.line.geometry.addComponent(target, this.getCurrentPointIndex());                 this.drawFeature();             }             return !!target;         },              /**          * Method: freehandMode          * Determine whether to behave in freehand mode or not.          *          * Returns:          * {Boolean}          */         freehandMode : function(evt) {             return (this.freehandToggle && evt[this.freehandToggle]) ? !this.freehand : this.freehand;         },              /**          * Method: modifyFeature          * Modify the existing geometry given the new point          *          * Parameters:          * pixel - {<OpenLayers.Pixel>} The updated pixel location for the latest          * point.          * drawing - {Boolean} Indicate if we're currently drawing.          */         modifyFeature : function(pixel, drawing) {             if (!this.line) {                 this.createFeature(pixel);             }             var lonlat = this.layer.getLonLatFromViewPortPx(pixel);             this.point.geometry.x = lonlat.lon;             this.point.geometry.y = lonlat.lat;                  this.callback("modify", [this.point.geometry, this.getSketch(), drawing]);             this.point.geometry.clearBounds();             this.drawFeature();         },              /**          * Method: drawFeature          * Render geometries on the temporary layer.          */         drawFeature : function() {             this.layer.drawFeature(this.line, this.style);             this.layer.drawFeature(this.point, this.style);         },              /**          * Method: getSketch          * Return the sketch feature.          *          * Returns:          * {<OpenLayers.Feature.Vector>}          */         getSketch : function() {             return this.line;         },              /**          * Method: getGeometry          * Return the sketch geometry. If <multi> is true, this will return          * a multi-part geometry.          *          * Returns:          * {<OpenLayers.Geometry.LineString>}          */         getGeometry : function() {             var geometry = this.line && this.line.geometry;             if (geometry && this.multi) {                 geometry = new OpenLayers.Geometry.MultiLineString([geometry]);             }             return geometry;         },              /**          * method: touchstart          * handle touchstart.          *          * parameters:          * evt - {event} the browser event          *          * returns:          * {boolean} allow event propagation          */         touchstart : function(evt) {             if (this.timerId && this.passesTolerance(this.lastTouchPx, evt.xy, this.doubleTouchTolerance)) {                 // double-tap, finalize the geometry                 this.finishGeometry();                 window.clearTimeout(this.timerId);                 this.timerId = null;                 return false;             } else {                 if (this.timerId) {                     window.clearTimeout(this.timerId);                     this.timerId = null;                 }                 this.timerId = window.setTimeout(OpenLayers.Function.bind(function() {                     this.timerId = null;                 }, this), 300);                 return DOU.HandlerPoint.prototype.touchstart.call(this, evt);             }         },              /**          * Method: down          * Handle mousedown and touchstart. Add a new point to the geometry and          * render it. Return determines whether to propagate the event on the map.          *          * Parameters:          * evt - {Event} The browser event          *          * Returns:          * {Boolean} Allow event propagation          */         down : function(evt) {             var stopDown = this.stopDown;             if (this.freehandMode(evt)) {                 stopDown = true;                 if (this.touch) {                     this.modifyFeature(evt.xy, !!this.lastUp);                     OpenLayers.Event.stop(evt);                 }             }             if (!this.touch && (!this.lastDown || !this.passesTolerance(this.lastDown, evt.xy, this.pixelTolerance))) {                 this.modifyFeature(evt.xy, !!this.lastUp);             }             this.mouseDown = true;             this.lastDown = evt.xy;             this.stoppedDown = stopDown;             return !stopDown;         },              /**          * Method: move          * Handle mousemove and touchmove. Adjust the geometry and redraw.          * Return determines whether to propagate the event on the map.          *          * Parameters:          * evt - {Event} The browser event          *          * Returns:          * {Boolean} Allow event propagation          */         move : function(evt) {             if (this.stoppedDown && this.freehandMode(evt)) {                 if (this.persist) {                     this.destroyPersistedFeature();                 }                 if (this.maxVertices && this.line && this.line.geometry.components.length === this.maxVertices) {                     //this.removePoint();                     this.finalize();                 } else {                     this.addPoint(evt.xy);                 }                 return false;             }             if (!this.touch && (!this.mouseDown || this.stoppedDown)) {                 this.modifyFeature(evt.xy, !!this.lastUp);             }             return true;         },              /**          * Method: up          * Handle mouseup and touchend. Send the latest point in the geometry to          * the control. Return determines whether to propagate the event on the map.          *          * Parameters:          * evt - {Event} The browser event          *          * Returns:          * {Boolean} Allow event propagation          */         up : function(evt) {             if (this.mouseDown && (!this.lastUp || !this.lastUp.equals(evt.xy))) {                 if (this.stoppedDown && this.freehandMode(evt)) {                     if (this.persist) {                         this.destroyPersistedFeature();                     }                     //this.removePoint();                     this.finalize();                 } else {                     if (this.passesTolerance(this.lastDown, evt.xy, this.pixelTolerance)) {                         if (this.touch) {                             this.modifyFeature(evt.xy);                         }                         if (this.lastUp == null && this.persist) {                             this.destroyPersistedFeature();                         }                         this.addPoint(evt.xy);                         this.lastUp = evt.xy;                         if (this.line.geometry.components.length === this.maxVertices + 1) {                             this.finishGeometry();                         }                     }                 }             }             this.stoppedDown = this.stopDown;             this.mouseDown = false;             return !this.stopUp;         },              /**          * APIMethod: finishGeometry          * Finish the geometry and send it back to the control.          */         finishGeometry : function() {             var index = this.line.geometry.components.length - 1;             this.line.geometry.removeComponent(this.line.geometry.components[index]);             //this.removePoint();             this.finalize();         },              /**          * Method: dblclick          * Handle double-clicks.          *          * Parameters:          * evt - {Event} The browser event          *          * Returns:          * {Boolean} Allow event propagation          */         dblclick : function(evt) {             if (!this.freehandMode(evt)) {                 this.finishGeometry();             }             return false;         },              CLASS_NAME : "OpenLayers.Handler.Path"     });          DOU.EditingToolbar = OpenLayers.Class(OpenLayers.Control.Panel, {              /**          * APIProperty: citeCompliant          * {Boolean} If set to true, coordinates of features drawn in a map extent          * crossing the date line won't exceed the world bounds. Default is false.          */         citeCompliant : false,              /**          * Constructor: OpenLayers.Control.EditingToolbar          * Create an editing toolbar for a given layer.          *          * Parameters:          * layer - {<OpenLayers.Layer.Vector>}          * options - {Object}          */         initialize : function(layer, options) {             OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);                  this.addControls([new OpenLayers.Control.Navigation()]);             var controls = [new OpenLayers.Control.DrawFeature(layer, DOU.HandlerPoint, {                 displayClass : 'olControlDrawFeaturePoint',                 handlerOptions : {                     citeCompliant : this.citeCompliant                 }             }), new OpenLayers.Control.DrawFeature(layer, DOU.HandlerPath, {                 displayClass : 'olControlDrawFeaturePath',                 handlerOptions : {                     citeCompliant : this.citeCompliant                 }             })];             this.addControls(controls);         },              /**          * Method: draw          * calls the default draw, and then activates mouse defaults.          *          * Returns:          * {DOMElement}          */         draw : function() {             var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);             if (this.defaultControl === null) {                 this.defaultControl = this.controls[0];             }             return div;         },              CLASS_NAME : "OpenLayers.Control.EditingToolbar"     });


title: Is accessing an mxd from an Msd based SOE safe?

text: I have a server object extension (SOE) that returns a list of legend items based on symbols that fall within a specified extent. This allows the client to update a legend to reflect on the symbols that fall within the map extent. To do this requires access to renderers. This is simple with with mxd based mapservices, however Msd based mapservices don't support access to renderers. As a workaround I'm using IMapDocument to open the mxd and keep a reference to the layout as a member variable. Is this safe? Support for mxd mapservices will be deprecated at 10.1, so I really need to figure this out. **Update** This video from the Dev Summit doesn't explicitly address this question. However, given how the printing gp service uses mxd files, this implies mxd access is safe. If it isn't, I suppose I could re-deploy my SOE as a gp service. **Update2** Here's a related question on CodeReview.Stackexchange.


title: Batch map creation, iterated over attributes of a layer, in QGIS

text: I am using QGIS 2.0.1 under Mac OS-X 10.8.2. I have a layer of counties in New Mexico to which I have joined a csv file that includes presence / absence of plant species by county. I've set up the layer style to show presence (coded "1") as grey and absence (coded "0") as white. So I can go into "Layer Properties", go to "Style", select the appropriate plant from the "Column" pull-down list, and I have a map that is nicely filled to show counties in which the plant is present. The question is--how do I create an output image for each species showing its distribution? At present, what I would have to do is the following: 1) Select a species from the pull-down list in "Layer Properties": ![1a](http://polyploid.net/qgis/Screen%20Shot%202014-02-07%20at%207.17.48%20PM.png) yielding a map that looks like this: ![1b](http://polyploid.net/qgis/Screen%20Shot%202014-02-07%20at%207.17.34%20PM.png) 2) Enter "Print Composer", get all that set up, export as an image: ![2](http://polyploid.net/qgis/Screen%20Shot%202014-02-07%20at%207.20.48%20PM.png) 3) Switch back to the main QGIS window, open up "Layer Properties", and select the next species: ![3a](http://polyploid.net/qgis/Screen%20Shot%202014-02-07%20at%207.17.53%20PM.png) ![3b](http://polyploid.net/qgis/Screen%20Shot%202014-02-07%20at%207.18.00%20PM.png) 4) Switch back to the Print Composer, and export the next image: ![4](http://polyploid.net/qgis/Screen%20Shot%202014-02-07%20at%207.21.13%20PM.png) Now, that all works, but given that I have several thousand species to deal with, this is not a remotely efficient way of approaching the issue. So I am trying to figure out how to automate map creation so that I can create a set of images incremented over all the attributes in this layer. So far, I've come up empty. The "Atlas Generation" plugin that's been integrated into the Print Composer seems to solve essentially the same issue, but so far as I can tell it can only increment across rows (features) and has no ability to increment across columns (attributes). Any suggestions?


title: Modeling a GeoDatabase for whole world

text: My recent assignment is to model a multi-user geodatabase for the whole world using the ESRI platform. This geodatabase contains administrative layers and topographic layers. The schema is to be designed in such a way that users can update different countries simultaneously. My first problem is that every country has different administrative structures. For example, Country A has 2 administrative levels, Country B has 3 administrative levels and Country C has again 2 administrative levels. Now when I merge each set of admin levels into layers (i.e. all level 1 areas in one layer, level 2 in a second layer and level 3 in a third layer) and establish a topology there is a gap between Country C and Countries A and B in admin level 3 because that level is not available in Countries A and B. The goal is for the topology to not have a gap. Am I organizing this data in the wrong way? Any ideas on this will be highly appreciated.


title: What's the ArcGlobe equivalent of BaseDynamicLayer

text: I'm attempting to have a dynamic layer in ArcGlobe but obviously BaseDynamicLayer is only for ArcMap. I'm looking for something that has similar functionality where I can Display data dynamically and update a list of points as I chose. (Basically the abstract override DrawDynamicLayer) I was looking at the GlobeGraphicsLayerClass but I'm not sure if this is what I need.


title: How to generate image tiles from custom geo data for use with Leaflet

text: Migrating a webapp from Google Maps API V3 to OSM + Leaflet, which displays custom data that consists of lots of lines and points, on a background map. When this custom data is drawn by Leaflet on the fly from geoJson files, the map tends to become less responsive on slow machines (zoom and pan take forever). The custom data is pretty static (it doesn't change often), so it would make sense to pre-render it as transparent image tiles that would be displayed on top of the map. This is how KML files are rendered on Google Maps and it works very well. So the question is this: how to generate transparent tiles from geoJson files and reference them in Leaflet (instead of displaying geoJson data on the fly)?


title: Parsing OGC Filters with C++

text: Google Translation I am developing an application in C + + you need to parse OGC filter. Anyone know any way to parse an OGC filter with C + +? * * * Estoy desarrollando una aplicación en C++ que necesita parsear filtros OGC. Alguno conoce alguna manera de parsear un filtro OGC con C++? Slds Martín


title: Set parameter of field from number to string with python

text: since I realised python is a very useful tool in ArcMap I dont want to do any workarounds anymore. I have a field with is numeric, but I want to perform this calculation in the field calculator on it               def change(GRIDCODE):         if GRIDCODE == "1":           return "XZ"         elif GRIDCODE == "3":           return "XY"         elif GRIDCODE == "4":           return "XX"         else:           return "None"      Buut, the field is a numeric one and it wont let me change it to a string. i suppose I have to change the parameter of the field first. Of course I could add a field, set the parameter of that field to string and then run the code above, a little bit modified, on the shapefile. But is there a solution where I change the parameter of the field within the code?


title: Find polygons that contain a specific number of points

text: I want to make a polygon selection based on a specific number of points.   For example, I want to select those polygons that contain more than 30 points. I don't want to select every polygon that contains a point. I tried to do something with ArcGis's data reviewer and I checked spatial join but I didn't find anything.


title: How can I project a power line net in QGIS?

text: I am working with power lines net using the software QGIS. I would like to know which plugins or tools do I need to be able drawing (projecting) them.


title: Does using RAM Disk improve ArcGIS Desktop performance appreciably?

text: I configured a RAM disk on a Virtual PC running ArcGIS Desktop 10 and set my HKCU\Software\ESRI\Output\TempPath to a directory on the RAM disk. It’s hard to perceive any sort improvement with that sort of configuration and I’m curious to know if anyone else has done this on a non-virtual computer and what the results were. Anecdotal answers are fine. Also, putting the cache path on a ram disk is probably not a good idea, but is anyone doing this anyway? (HKCU\Software\ESRI\Desktop10.0\Settings\Cache Path)


title: Why does SQL job choke on stored package?

text: I've written a stored package to pull a text file into a table in the geodatabase. It works perfectly. However, when it is a step in a SQL job, the job fails at that step. I'm looking for ideas on how to troubleshoot this issue.


title: Adjacent Parcel in esri silverlight api

text: I am using the sample identify query task sl api 3.0 - I would like when selecting a parcel to select automatically the adjacent Parcel. with symbol graphic and show their attribute in a data Grid, Could you please put me in the right direction. to explain in more detail, for example when user select Nebraska I need to get the adjacent States with different color and with number and show on Datagrid all selected States with additional column for the number(please attached image). I am using query with buffer so far ![enter image description here](http://i.stack.imgur.com/JFXFZ.jpg)               public partial class MainPage : UserControl     {         GraphicsLayer _pointAndBufferGraphicsLayer;              //         GeometryService _geometryService;         QueryTask _qTask;                        public MainPage()         {             InitializeComponent();             _pointAndBufferGraphicsLayer = map1.Layers["MyGraphicsLayer"] as GraphicsLayer;                  ////             _geometryService = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");             _geometryService.BufferCompleted += GeometryService_BufferCompleted;             _geometryService.Failed += GeometryService_Failed;                  _qTask = new QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5");             _qTask.ExecuteCompleted += qTask_Completed;             _qTask.Failed += qTask_Failed;         }              private void map1_Click(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)         {             Graphic g = new Graphic();             g.Geometry = e.MapPoint;             g.Symbol = LayoutRoot.Resources["BlueMarkerSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol;             _pointAndBufferGraphicsLayer.ClearGraphics();             _pointAndBufferGraphicsLayer.Graphics.Add(g);                  ////             //// If buffer spatial reference is GCS and unit is linear, geometry service will do geodesic buffering             ESRI.ArcGIS.Client.Tasks.BufferParameters bufferParams = new ESRI.ArcGIS.Client.Tasks.BufferParameters()             {                 BufferSpatialReference = new SpatialReference(4326),                 OutSpatialReference = map1.SpatialReference,                 Unit = LinearUnit.StatuteMile,             };                  bufferParams.Distances.Add(200);             bufferParams.Features.Add(g);                  _geometryService.BufferAsync(bufferParams);              }              ////         void GeometryService_BufferCompleted(object sender, GraphicsEventArgs args)         {             Graphic bufferGraphic = new Graphic();             bufferGraphic.Geometry = args.Results[0].Geometry;             bufferGraphic.Symbol = LayoutRoot.Resources["BufferSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol;             bufferGraphic.SetZIndex(1);                  _pointAndBufferGraphicsLayer.Graphics.Add(bufferGraphic);                       //Add code here to build a Query and execute a QueryTask             Query query = new Query();             query.ReturnGeometry = true;             query.OutSpatialReference = map1.SpatialReference;             query.Geometry = bufferGraphic.Geometry;             query.OutFields.Add("*");             _qTask.ExecuteAsync(query);             query.OutFields.Add("*");         }                   void qTask_Completed(object sender, QueryEventArgs args)         {             foreach (Graphic g in args.FeatureSet.Features)             {                      g.Symbol = LayoutRoot.Resources["selectSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol;                 _pointAndBufferGraphicsLayer.Graphics.Add(g);                  }              }              private void qTask_Failed(object sender, TaskFailedEventArgs args)         {             MessageBox.Show("Query task failed: " + args.Error);         }              ////         private void GeometryService_Failed(object sender, TaskFailedEventArgs args)         {             MessageBox.Show("Geometry service failed: " + args.Error);         }


title: How to save new drawing feature to my own WorldImage layer(only base layer)?

text: Recently, I have been learning geoserver and openlayers to construct my own indoor map. As I am going to build a indoor wifi location system so I need to create the map. I use Raster Data Sources -- WorldImage to create the stores in my geoserver, but it needs a .meta and a .prj to save the store. I just changed the default file usa.meta and usa.prj's name to the same name of my .png file.(I don't know whether it is a right or accepted way to do so, just try) Then a base layer finished, it can be viewed at the Layer Preview. My target is to add a feature layer on the base layer in my browser from a html file. Inside, I use javescript to get the base layer from my geoserver and it can be displayed in the Firefox browser. After reading many tutorials, I can draw a OpenLayers.Layer.Vector above my base layer which has some rectangles to represent different stores in the supermark. Their attributes can be displayed after selecting the vector. But how to save the vector layer which is a new layer created by in the javascript. I finally find two possible way. One is to create a layer programmatically bt using REST. But it seems a little difficult for me in few days. Another way is to load the feature layer from the geoserver which can be a real layer in geoserver or using OpenLayers.Protocol.HTTP to load from a XML/JSON file. I have tried the second way. The feature can be loaded from my customed XML but I cannot save changes to the XML file. Stuck here for a few days. Here is a good example on the topic: http://maps.peterrobins.co.uk/files/ol6.html Hope I can get some help or ideas here. Thanks in advance!


title: Standard tile origin coordinates for EPSG:3857

text: Is there a standard tile origin for caching tiles in EPSG:3857? For example OpenLayers as default uses this tile origin for a WMS in mercator projection: lon: -20037508.34, lat: -20037508.34


title: Buffer analysis - use of surface area based on DEM

text: I have one problem and this is that I would like to create a buffer around point. This is simple with ArcMap using the buffer tool. But is it possible to create the buffer considering also the true surface area of the landscape (consider also the slope distance using digital terrain model). In this case the buffer on slope will not be the circle but irregular ellipse. Are there any solution in ESRI or any packages in R?


title: netCDF-java has trouble reading this netCDF file(format) and fetching values from the latlon dimension

text: I'm developing an application where I need to extract variable-values from netCDF files. I'm processing several different formatted netCDF files and now one format seems to be creating some issues. The problem is to correctly fetch data from lat/lon variables. Some lat/lon works, but the mapping does not seem to be complete. ncdump of the netCDF file:               netcdf test2 {     dimensions:             x = 182 ;             y = 149 ;             lev = 31 ;             time = UNLIMITED ; // (72 currently)     variables:             double lev(lev) ;                     lev:long_name = "generic" ;                     lev:units = "level" ;                     lev:axis = "Z" ;             double time(time) ;                     time:standard_name = "time" ;                     time:units = "months since 1991-01-15 12:00:00" ;                     time:calendar = "standard" ;             float variable1(time, lev, y, x) ;                     variable1:long_name = "Variable 1" ;                     variable1:units = "mg" ;                     variable1:_FillValue = 9.96921e+036f ;                     variable1:coordinates = "nav_lon nav_lat time lev" ;             float nav_lon(y, x) ;                     nav_lon:long_name = "longitude" ;                     nav_lon:units = "degrees_east" ;             float nav_lat(y, x) ;                     nav_lat:long_name = "latitude" ;                     nav_lat:units = "degrees_north" ;          // global attributes:                     :CDI = "Climate Data Interface version 1.5.1 (http://code.zmaw.de/projects/cdi)" ;                     :Conventions = "CF-1.0" ;                     :Title = "Test" ;                     :CDO = "Climate Data Operators version 1.5.1 (http://code.zmaw.de/projects/cdo)" ;     data:           lev = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,         21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ;           time = 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,         122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,         136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,         150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,         164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,         178, 179 ;     }      I can also show you subset of the nav_lon data (from opendap) if that could be of help to understand the format:               Dataset {         Float32 nav_lon[y = 4][x = 4];     } test2.nc;     ---------------------------------------------     nav_lon[4][4]     [0], 78.00004, 80.0, 81.99996, 83.99992     [1], 78.00004, 80.0, 81.99996, 83.99992     [2], 78.00004, 80.0, 81.99996, 83.99992     [3], 35.53008, 36.53008, 37.53008, 38.53008      Now to the actual code that is not producing the desired results. I'm using the latest version of NetCDF-Java, 4.3.19:               public class TestReadNetCDF {         public static void main(String[] args) {             String fileURI = "URI_TO_THE_FILE";             readNetCDFFile(fileURI);         }              private static void readNetCDFFile(String filename) {             NetcdfDataset ncfile = null;             try {                 ncfile = NetcdfDataset.openDataset(filename);                 GridDataset grid = new GridDataset(ncfile);                 System.out.println("GRID:" + grid);                 process(grid);             } catch (IOException ioe) {                 log("trying to open " + filename, ioe);             } finally {                 if (null != ncfile)                     try {                         ncfile.close();                     } catch (IOException ioe) {                         log("trying to close " + filename, ioe);                     }             }             NetcdfDataset.shutdown();         }         private static void process(GridDataset gds) throws IOException {             System.out.println("VARS:");             for (VariableSimpleIF v : gds.getDataVariables())                 System.out.println(v.getFullName());             GridDatatype grid = gds.findGridDatatype("variable1");             GridCoordSystem gcs = grid.getCoordinateSystem();             double lat = -63.63;             double lon = -14.83;             //lat = -61.24769;             //lon = 78.00004;             lat = -77.7742;             lon = 78.00004;                  // find the x,y index for a specific lat/lon position             // xy[0] = x, xy[1] = y             int[] xy = gcs.findXYindexFromLatLonBounded(lat, lon, null);                  // read the data at that lat, lon and the first time and z level (if any)             // note order is t, z, y, x             System.out.println("x,y:" + xy[0] + "," + xy[1]);             Array data = grid.readDataSlice(0, 0, xy[1], xy[0]);             // we know its a scalar             double val = data.getDouble(0);                  System.out.printf("Value at %f %f == %f%n", lat, lon, val);         }     }      The problem seems to be that findXYindexFromLatLonBounded gets the wrong x/y indices (on most input values). If I drop "bounded", then it will fetch -1, -1, even though the latlon are within the "range" - though the mapping does not seem to be complete. I could mention that ncWMS can read these files just fine and I can display the files as a WMS (and get point data out from there, but that is really inefficient and I'd like something better). Thredds can also read the files and output them through i.e. OpenDAP or Godiva2. If I use the OpenDAP URL it provides the same result as if I use the nc-file URI. Any thoughts?


title: Handle string or int in server object extension

text: How would you also check to see if the value you are passing into into an SOE is an integer as well? This checks for string, but returns 0 when passing number:               string searchValStr;     int searchValInt;          found = operationInput.TryGetString("searchVal", out searchValStr);             if (!found || string.IsNullOrEmpty(searchValStr))                 // check for int                 Int32.TryParse("searchVal", out searchValInt);            How would I check for int and string using same input?


title: QgsMapCanvas.reresh() does not reload new wfs layer features, but panning does

text: I have a wfs layer loaded in a standalone QGIS app, which I am updating by running a database query on the view it is based on. The feature is added with no problems and I reload the layer with:               # Runs insert query here to add feature to WFS layer source table     wfs_vector_layer.dataProvider().updateExtents()     wfs_vector_layer.dataProvider().reloadData()     main_window.mapCanvas().refresh()      However, the `refresh()` does not visibly update the canvas, and I have to pan or zoom the canvas to get it to redraw the updated wfs layer with the new feature. I can't see anything more than a `refresh()` happening after panning from the qgsmaptoolpan source code. Am I using the method incorrectly?


title: how to identify qgsvectorlayer area?

text: I need to identify the area from Qgis qgsvectorlayer anyone have an idea how to do that in python ?


title: How to avoid pop-up when having multiple hyperlink layers in ArcGIS

text: In ArcMap 10.0, I have a layer of country polygons and a layer of city points. Both layers have a hyperlink setup, and it all works as expected. The only drawback is that when I select a city, it comes up with a pop-up asking whether I want to go the hyperlink of that city or to the hyperlink of the underlying country. Is there any way of avoiding this pop-up, so that it goes to the city hyperlink when I click within x pixels of a city, and goes to the country hyperlink when I click elsewhere within the polygon.


title: Cannot use published zonal stats geoprocessing service (Arcgis Java API)

text: I am primarily following this tutorial. Here is the signature for the service used in the sample. It is slightly different than the one I have had any success with, though if I recall correctly the version described below is the only one I could get to ever function. I have once successfully created my own geoprocessing service that I can utilize no problem. It uses one of my .tif raster layers as input. This image is also published as an Image Service. The signature for this one looks as follows: > Task: CS1 Display Name: CS1 > > Description: (null) > > Category: > > Help URL: ......./arcgisoutput/CS1_GPServer/CS1/CS1.htm > > Execution Type: esriExecutionTypeAsynchronous > > Parameters: > > Parameter: inputPoly Data Type: GPString Display Name inputPoly Description: > Area to analyze Direction: esriGPParameterDirectionInput Default Value: > InputPolygonSample Parameter Type: esriGPParameterTypeRequired Category: > Choice List: [ InputPolygonSample ] Parameter: statsSummary Data Type: > GPRecordSet Display Name statsSummary Description: Carbon Content of > selected polygon Direction: esriGPParameterDirectionOutput Default Value: > Fields: OBJECTID ( type: esriFieldTypeOID , alias: OBJECTID ) ID ( type: > esriFieldTypeInteger , alias: ID ) COUNT ( type: esriFieldTypeInteger , > alias: COUNT ) AREA ( type: esriFieldTypeSingle , alias: AREA ) MIN ( type: > esriFieldTypeSingle , alias: MIN ) MAX ( type: esriFieldTypeSingle , alias: > MAX ) RANGE ( type: esriFieldTypeSingle , alias: RANGE ) MEAN ( type: > esriFieldTypeSingle , alias: MEAN ) STD ( type: esriFieldTypeSingle , alias: > STD ) SUM ( type: esriFieldTypeSingle , alias: SUM ) Features: None. > > Parameter Type: esriGPParameterTypeRequired Category: > > Supported Operations: Submit Job When calling this service, I use the following methods successfully:               function initTools(evtObj) {             gp = new Geoprocessor("..../arcgis /rest/services/CS1/GPServer/CS1");             gp.setOutputSpatialReference({wkid:102100});              gp.on("execute-complete", displayResults);             gp.on("error", displayError);             app.toolbar = toolbar = new Draw(evtObj.map);             toolbar.on("draw-end", computeZonalStats);         }          function computeZonalStats(evtObj) {         var geometry = evtObj.geometry;         /*After user draws shape on map using the draw toolbar compute the zonal*/         map.showZoomSlider();         map.graphics.clear();              var symbol = new SimpleFillSymbol("none", new SimpleLineSymbol("dashdot", new Color([255,0,0]), 2), new Color([255,255,0,0.25]));         var graphic = new Graphic(geometry,symbol);              map.graphics.add(graphic);         toolbar.deactivate();              var features= [];         features.push(graphic);              var featureSet = new FeatureSet();         featureSet.features = features;              var params = { "inputPoly":featureSet };         $("#calcCarbon").button("option", "label", "Calculation in Process...").button("refresh");         gp.execute(params);       }      I can process the results as desired. Now, I am trying to change the image to be a mosaicked image. I create the same tool in ArcGIS, and as far as I remember (which may be fuzzy) use the exact same methods for publishing it. The resulting signature looks as follows: > Task: CalculateB Display Name: CalculateB > > Description: > > Category: > > Help URL: ...../arcgisoutput/CalculateB_GPServer/CalculateB/CalculateB.htm > > Execution Type: esriExecutionTypeAsynchronous > > Parameters: > > Parameter: inputPoly Data Type: GPString Display Name inputPoly Description: > Area to analyze Direction: esriGPParameterDirectionInput Default Value: > SampleInputPoly Parameter Type: esriGPParameterTypeRequired Category: Choice > List: [ SampleInputPoly ] Parameter: statsSummary Data Type: GPRecordSet > Display Name statsSummary Description: Carbon Content of selected polygon > Direction: esriGPParameterDirectionOutput Default Value: Fields: OBJECTID ( > type: esriFieldTypeOID , alias: OBJECTID ) ID ( type: esriFieldTypeInteger , > alias: ID ) COUNT ( type: esriFieldTypeInteger , alias: COUNT ) AREA ( type: > esriFieldTypeSingle , alias: AREA ) MIN ( type: esriFieldTypeSingle , alias: > MIN ) MAX ( type: esriFieldTypeSingle , alias: MAX ) RANGE ( type: > esriFieldTypeSingle , alias: RANGE ) MEAN ( type: esriFieldTypeSingle , > alias: MEAN ) STD ( type: esriFieldTypeSingle , alias: STD ) SUM ( type: > esriFieldTypeSingle , alias: SUM ) Features: None. > > Parameter Type: esriGPParameterTypeRequired Category: > > Supported Operations: Submit Job When I try and run this service, using the exact same code as above simply substituting the URL for the Geoprocessor, I receive the following error almost instantly (it does not even seem to access my server for the error based on the speed of the response).               Error: Error performing execute operation     .cache["esri/request"]/</t/f.load()/3.7/ (line 772)     .cache["dojo/_base/xhr"]/</b._ioSetArgs/<()/3.7/ (line 184)     c()/3.7/ (line 74)     d()/3.7/ (line 74)       ()/3.7/ (line 75)     c()/3.7/ (line 74)     d()/3.7/ (line 74)     ()/3.7/ (line 75)      .cache["dojo/_base/xhr"]/</b.xhr/<()/3.7/ (line 188)      .cache["dojo/Deferred"]/</l()/3.7/ (line 193)     .cache["dojo/Deferred"]/</r()/3.7/ (line 192)     ()/3.7/ (line 195)     .cache["dojo/Deferred"]/</a()/3.7/ (line 193)     .cache["dojo/Deferred"]/</l()/3.7/ (line 193)     .cache["dojo/Deferred"]/</r()/3.7/ (line 192)     ()/3.7/ (line 195)     .cache["dojo/Deferred"]/</a()/3.7/ (line 193)     ...ost,w=e.crossOrigin):v=!!e);f=p.mixin({},f);f._ssl&&(f.url=f.url.replace(/^http:...      Throughout this process I have recreated and deleted the second service several times. I've noticed sometimes, if I didn't change the name of the service, the signature did not update (I was fiddling with the different input types to try and get the two to match perfectly). I am continuing to test to see if possibly somehow an outdated version is being accessed. My second mosaicked image is NOT published as an image service (though I think this shouldn't matter). I also spent a long time working on getting that first service to work, so if the theory about outdated signatures is correct, it may not be exactly what I am being shown. However, previously when I had trouble getting the service to run, I would get a result back from the server stating invalid parameters or something similar, very different from this one which does not even seem to go there. Does anyone know more specifically in what area I may be going wrong? All leads are greatly appreciated!


title: Trying to Create a Global Choropleth Population Density Map then add Biodiversity Level

text: I am trying, quite unsuccessfully, to create a global choropleth population density map for a specific 120 countries, using ggplot2. Once I have created this choropleth map, I want to add number of threatened species (biodiversity) on top. I have gathered the population of all 120 countries and have the area of each country also. I also have the total number of threatened species per country. I am trying to create something like this: ![This is a lot like what I want to create!](http://i.stack.imgur.com/KGdR9.jpg) Here is my code so far: * * * `(Import Data set called "data")` * * *               install.packages("ggplot2")     install.packages("maps")     install.packages("plyr")     library(ggplot2)         library(splines)     library(mgcv)     library(plyr)     library(maps)      Creating data sets               humpopden2010<-(data$X2010.Census)/(data$Area) #2010 Census Population Divided by Country area          specthreat2010<-(data$ThreatMammals2010+data$ThreatBirds2010)/(data$Area/10^6)          specrich<-(data$TotalMammals2004+data$TotalBirds2004)/(data$Area/10^6)      ATTEMPT 1 (Just trying to make pop density map)               world_map <- map_data("world")     names(humpopden2010) <- tolower(names(humpopden2010))     humpopden2010$Country <- tolower(rownames(data$X2010.Census))  #?     choro <- merge(world_map, population, by = "Country")     choro <- choro[order(choro$order), ]     qplot(long, lat, data = choro, group = group, fill = humpopden2010,       geom="polygon")      ATTEMPT 2               world_map <- map_data("world")     names(world_map)[5] <- "country"          p_country <- ddply(data, "country", summarise, total = length(Country))          p_map <- merge(p_country, world_map, by = "country", all = T)     p_map <- p_map[order(p_map$order), ]          ggplot(p_map, aes(long, lat)) +     geom_polygon(aes(group = group, fill = log(total)), colour = "grey60", size = .3) + ylim(-55, 85)      I can't even get the pop density map to create... need to do that before I can try to put on the number of threatened species. Made a map with nothing on it here...               world <- map_data("world")     worldmap <- ggplot(world, aes(x=long, y=lat, group=group)) +     geom_path() +     scale_y_continuous(breaks=(-2:2) * 30) +     scale_x_continuous(breaks=(-4:4) * 45)          print(worldmap)


title: showing symbols in a specific order

text: i'm trying to layout a map in ArcGIS09, showing samplings in a specific region: i have a layer with samplings on different sampling dates and sites. sometimes, there are several samples at one site, done at different dates. the attribute i want to layout is the population structure (very good, good, moderate, poor, bad), which is easy. but now, i would like to sort the points in a way, that the older sampling dates are hidden by the more recent ones. and it would be even nicer, to layout the older sampling dates bigger than the more recent one, in a way that they are still visible below... is this possible in any way? thanks a lot for your help!


title: Find spatially identical records in Mapinfo

text: Is there a tool/mbx similar to the Arc INFO "Find Identical" to find records which have exactly the same shape?


title: Assign Projection to multiple shapefile

text: I have multiple shape files in a folder. I want to assign projection to all the files inside the folder at one go. In batch file i am able to assign projection to all the shapefiles, but i want to select the assign projection to that folder so that all the files get projected.


title: Unable to view GeoTiff in GeoServer layer preview

text: I've loaded a 265 MB world GeoTIFF image (transformed with gdal_translate command) in GeoServer. Everything seems to be ok, but layer preview is blank, although clicking in the map canvas the three band RGB values are correctly shown (as well as mouse coordinates). Other vector layers in my PostgreSQL/Postgis DB have no problem with GeoServer layer preview. Maybe I miss some parameters? What's going wrong? *** EDIT *** I can load the GeoTIFF in QGIS and the image is correctly georeferenced. Log file of GeoServer list the following warnings:               WARN [geoserver.web] - Unable to find property: 'format.wms.openlayers' for component:  [class=org.geoserver.web.demo.MapPreviewPage]     WARN [referencing.factory] - Axis elements found in a wkt definition, the force longitude first axis order hint might not be respected:     PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295]], PROJECTION["Mercator_1SP_Google"], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH], AUTHORITY["EPSG","54004"]]      Another thing. in the Edit Layer section of GeoServer when I try to compute lat/long from native bounds nothing happens, while the Native Bounding Box extent is correctly written (-180, -90, 180, 90) when I click on Compute from Data (and then I manually copy the extent). The GeoTIFF is loaded in GeoServer adding a new Store for GeoTIFF and using the default "Raster" SLD. Thanks in advance


title: What tile/tiling strategy should I use with GeoNode/GeoServer?

text: I've got a wicked GeoNode instance running, loaded with some basic vector data. I want to be able to serve our local-County aerial imagery as a basemap within GeoNode. I am thoroughly overwhelmed with where to begin...so I'm going to lay out some of my details:   * Countywide aerial imagery consists of 7 MrSID files, about 1+GB each, in California State Plane Coordinates. From the basic research I've done, here's the strategy I was roughly thinking:   * gdalbuildvrt to mosaic .sid's   * gdal2tiles - would i only create one layer of tiles here in order for ImageMosaic plugin (GeoServer) to consume?   * gdalwarp - I'll need to warp tiles into Web Mercator sometime, right? Like I said, I'm a little overwhelmed. Should I use the WMS of GeoServer or go with an independent WMS e.g. TileCache/TileStache or MapBox/TileMill? What kind of workaround will I need to do with my aerials and their native projection? Am I missing a step with gdal_retile and creation of a image pyramid? Thanks for reading, I hope this is a good question for the community ~Joe.


title: Coded Value Domain is showing, but not Description?

text: I have a Domain that is working, but the issue is when I query on the feature. I need to be able to search on the Coded Description, not the Code Value. The attribute table is giving me the Coded Description dropdowns, but when I try to query on any of these values, I need to use the code. No subtypes on this feature either. ![Coded Domains and Attribute Query](http://i.stack.imgur.com/UjWuN.jpg) ![enter image description here](http://i.stack.imgur.com/FNXgS.jpg)


title: Easily find centre point of a raster in ArcMap 10 document?

text: If I have, say, a rectangular and georeferenced raster file loaded in an ArcMap 10 document (.tiff w/ associated tfw), how do I easily find its centre point and store that point in a points vector layer? Also, if I have multiple such rasters in my ArcMap document, how do I apply the process to all of them? Unfortunately, I have zero python experience, and have about 48 hours left before I need to deliver results. Therefore a programmatic solution is OK, but I will need specific insctructions on how to load an existing script into ArcGIS 10, and run it on the rasters in questions. (BTW, the rasters are all in their separate layers) Thanks.


How can I programmatically determine if a shapefile contains points, polygons, or lines? ArcEngine 10, VS2010, C#


title: Automate Projection of multiple shp files using ArcPy

text: I have been trying to create a Python script that will convert all shape files within a folder from GCS WGS 84 to Web Mercator. Below is the code I have so far but what I'm struggling with is how to iterate thru each of the files while creating a new name for the output (the new projected file in Web Mercator). Any ideas on how I could change this code to make this work? I know I don't have the output parameter right but I think everything else is right.               import arcpy     import glob     inFCFolder = "C:\Data"     def projectToWebM():         for f in glob.glob(r""+ inFCFolder + "\*.shp"):             try:                 arcpy.Project_management(f, f + r"\Project\*.shp","PROJCS['WGS_1984_Web_Mercator_Auxiliary_Sphere',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mercator_Auxiliary_Sphere'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],PARAMETER['Standard_Parallel_1',0.0],PARAMETER['Auxiliary_Sphere_Type',0.0],UNIT['Meter',1.0]]","#","GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]")             except:                 print 'Error: Unable to project ' + f          if __name__== '__main__':         projectToWebM()