title: Upload data to GeoServer through REST API using non-admin account

text: I'm running into some problems when trying to upload a shapefile to GeoServer through the REST API using a non-admin account. Uploading geometry succeeds but uploading the corresponding style fails with a 405 error stating that "The specified HTTP method is not allowed for the requested resource ()." I'm interacting with the API through QGIS plugins, namely the OpenGeo Explorer and Processing's GeoServer administration function. The non-admin account has `read`, `write`, `admin` access to the _nonadminw_ workspace. I've set this up through the Data Security page in the web interface as               nonadminw.*.r    nonadmin     nonadminw.*.a    nonadmin,ADMIN     nonadminw.*.w    nonadmin       I've enabled access to the REST API in `security/rest.properties` as follows               /**;GET=ADMIN,nonadmin     /**;POST,DELETE,PUT=ADMIN,nonadmin      Uploading the geom+style through the ADMIN account works flawlessly. This leads me to believe that I haven't configure the non-admin account fully i.e. apparently the ADMIN account has additional rights that allow it to upload the style successfully. Any ideas where these reside and how to configure them? Any ideas what else might be going on?


title: Simple automated way to split all lines in layer at vertices using QGIS?

text: I want to automatically split all lines in a QGIS layer at their vertices (like this). I've done a google search and found this article, which is quite close but the workflow is complicated. Because I'll have to train my co-workers (who are unfamiliar with GIS) to use this tool, I want something as simple as a plugin or something that doesn't require GRASS. Since it's been a long time from 2010 - the time of the previous answer, I wonder if there is any better way to achieve the same result?


title: How to select records in a table based on attributes in related table

text: I am using ArcMap 10.1 and Python I have a list of addresses to geocode, but I want to thin the list because I only need a specific area of the addresses. I have a layer containing the streets in my area, and I have a layer containing the streets outside my area. I have added my CSV table to the mxd and related it to my streets layers, but no selections will push to the CSV table. I want to either select all the address with street names in my area and keep them, or select all the addresses outside my area and delete them. I am trying to create a script that will loop through each record of the address table, check the street name with the street names in my streets layer, and select the records that produce a match. All the help and examples I have found so far are to select based on just the table's attributes, so I am not sure how I can relate it to a completely separate layer/table. If this can be done outside of ArcMap using Excel or something, I am open to that as well. My pseudo code is along these lines: table = "MyTableOfAddresses" streets = "MyStreetsLayer"               for row in table:         if table.StreetName == streets.StreetName:             select row      I need to make sure that when it is looking at row 12 of table, it is not just looking at row 12 of streets. For each row in table, I need it to check every row in streets. I know what I need done, but my Python skills are just not good enough to get it done by myself.


title: QGIS DB manager Import layer/file tool won't allow me to choose "Append data to table"

text: I want to append some data to a layer in my PostGIS DB using a shapefile, but when I use the Import layer/file tool in QGIS, it doesn't allow me to choose the append option. Why is this and how do I get it to allow me to append? ![enter image description here](http://i.stack.imgur.com/qI8tx.png)


title: Adding charts to OpenGeo suite SDK

text: I just wanted to gauge the work flow for adding charts to a map using the SDK that comes with OpenGeo suite. I know it seems a vague question I'm just trying to get my head around it :/ So far the documentation is pretty straight forward with adding plugins using the gxp.plugins such as * @require plugins/FeatureEditor.js However Im not sure about how I would go about adding geoEXT additions such as Link from OpenGeo Suite to GeoEXT charts. What would the basic starting point be, and any pointers would be great. I will eventually be looking to integrate into a popup on my map a graph, that would take values over a time frame and plot them.


title: Undomanager did not remove graphics when undo()

text: My attempted on using the UndoManager has been unsuccessful for a couple days and I'm stuck. I did not setup a proxy. I create a FeatureLayer object in memory with               var drawingPointLayer = new esri.layers.FeatureLayer(featureCollection, {         id: "drawPointLayer",         mode: esri.layers.FeatureLayer.MODE_ONDEMAND     });     mapApp.map.addLayer(drawingPointLayer);      created UndoManager and button to perfom undo redo actions               undoManager = new esri.UndoManager({maxOperations:50});          var undoButton = new dijit.form.ToggleButton({         id: "undoButton",         showLabel: false,         iconClass: "dijitEditorIcon dijitEditorIconUndo",         onClick: function(){              undoManager.undo();              checkUndoRedoState();                   mapApp.map.graphics.graphics.splice(mapApp.map.graphics.graphics.length-1, 1);             mapApp.map.graphics.redraw();             alert(undoManager.length + " | " + mapApp.map.graphics.graphics.length);         }     }, "undoButton");     var redoButton = new dijit.form.Button({         id: "redoButton",         showLabel: false,         iconClass: "dijitEditorIcon dijitEditorIconRedo",         onClick: function(){              undoManager.redo();              checkUndoRedoState();          }     }, "redoButton");      and add operation to UndoManager               function addToUndoManager(graphic, task){         var operation;         var featureLayer = mapApp.map.getLayer("drawPointLayer");         //var featureLayer = mapApp.map.getLayer("landuseLayer");              if(task=="add"){             featureLayer.applyEdits([graphic], null, null, function() {                 operation = new esri.dijit.editing.Add({                     featureLayer: featureLayer,                     addedGraphic: graphic                 });             });              }              if(operation)             undoManager.add(operation);              checkUndoRedoState();              alert(undoManager.canUndo + " | " + undoManager.canRedo + " | " + operation.label + " | " + operation.type + " | " + undoManager.length + " | " + mapApp.map.graphics.graphics.length);     }      New point markers would be added to the map via mouse click. Undomananger would register. But when I press the undo button, the graphics on the map would not disappear. I'm clueless on what to do next to solve this problem. Please Help


title: ArcMap | Perform full outer join

text: **Hey there,** does anybody know how to perform a full outer join with ArcMap? Just to describe the problem a little bit more, lets say I got the following two tables:               Table A     Joinkey     1     2     3          Table B     Joinkey Other_field     1 1     1 2     1 3      The result should be something like:               Joinkey_A Joinkey_B Other_field     1 1 1     1 1 2     1 1 3      But ArcMap does the following (inner join):               Joinkey_A Joinkey_B Other_field     1 1 1     2 2 1     3 3 1      In my opinion this means, I need a full outer join. But I can't find any solution for this. =( Cheers **Chronnie**


title: Can ArcGIS Desktop or ArcPad use the Windows Location Provider?

text: Are there any plans for ArcGIS Desktop or ArcMap to get the GPS Coordinates via the 'Windows Location Provider' in Windows 7/8 instead of reading a virtual com port?


title: Can QGIS get the GPS Coordinates via the 'Windows Location Provider'?

text: Can Quantum GIS get the GPS Coordinates via the 'Windows Location Provider' in Windows 7/8 instead of reading a virtual com port? If not, could this be developed as a Windows-specific plugin? (Is there a precedence for developing Windows-specific plugins?)


title: What projection to use in ArcMap for a map that extends over Wgs84 Utm31 and 32

text: Please i have a Wgs84 Utm map that extends over 2 utm zones(31N and 32N). Using either of them distorts my map and ArcGIs allows you to choose only one projection per map. Please what can i do? Thank you.


title: Can you add more than one contact in FGDC compliant metadata?

text: I am new to following FGDC metadata standards. I have received an SDSFIE compliant geodatabase. My job is to build on this geodatabase. Each feature class already has FGDC compliant metadata. As I am adding to feature classes I would like to update the contact information to include both my name/contact and also maintain the name/contract of the previous person who worked on this geodatabase. When I go into editing mode via ArcCatalog working on stylesheet FGDC ESRI I have found the "identification" and "contact" tab. I don't see where I can add an additional Person as a contact. Is this possible? If so, what am I missing? THANK YOU!


title: Import shapefiles on my postgis table using R

text: Using R, I would like to import shapefiles that are in a directory on a geometric table i have on postgresql / postgis. What is the instruction that allows me to do it? EDIT: here is my code to generate contour lines from the postgresql data, the result is a shapfiles I would save .shp on my table postgis already create before:               library(ggplot2)     library(gstat)     library(sp)     library(maptools)     library(rgdal)     library(zoo)     library(xts)     library(RPostgreSQL)     library(spacetime)     library(raster)     library(foreign)     dbname = "postgis"     user = "postgres"     password = "***"     #password = ""          drv <- dbDriver("PostgreSQL")     con <- dbConnect(drv, dbname="BDDMeteo", user=user, password="***",host='localhost', port='5432')     estonia_air_temperature_2=dbGetQuery(con,"select lat,lon,temperature from observation, station, date where id_s=nom_ville AND id_d=id_date")          estonia_air_temperature_2_test <- estonia_air_temperature_2  # duplicate air temp. data file     estonia_air_temperature_2_test$x <- estonia_air_temperature_2_test$lon  # define x & y as longitude and latitude     estonia_air_temperature_2_test$y <- estonia_air_temperature_2_test$lat     coordinates(estonia_air_temperature_2_test) = ~x + y          plot(estonia_air_temperature_2_test)     x.range <- as.numeric(c(-8.5, 9.5))  # min/max longitude of the interpolation area     y.range <- as.numeric(c(26.97, 37))  # min/max latitude of the interpolation area     grd <- expand.grid(x = seq(from = x.range[1], to = x.range[2], by = 0.1), y = seq(from = y.range[1],                                                                                to = y.range[2], by = 0.1))  # expand points to grid     coordinates(grd) <- ~x + y     gridded(grd) <- TRUE     plot(grd, cex = 1.5, col = "grey")     points(estonia_air_temperature_2_test, pch = 1, col = "red", cex = 0.4)          idw <- idw(formula = temperature ~ 1, locations = estonia_air_temperature_2_test,                 newdata = grd)  # apply idw model for the data     residual_grid = raster(idw, "var1.pred")     plot(residual_grid)     x <- rasterToContour(residual_grid)     class(x)     plot(residual_grid)     plot(x, add=TRUE)     writeSpatialShape(x, "/interpolate/contour/contourline")      Edit:               > ogrDrivers()                  name write     1      AeronavFAA FALSE     2          ARCGEN FALSE     3          AVCBin FALSE     4          AVCE00 FALSE     5             BNA  TRUE     6             CSV  TRUE     7             DGN  TRUE     8             DXF  TRUE     9          EDIGEO FALSE     10 ESRI Shapefile  TRUE     11     Geoconcept  TRUE     12        GeoJSON  TRUE     13       Geomedia FALSE     14         GeoRSS  TRUE     15            GML  TRUE     16            GMT  TRUE     17       GPSBabel  TRUE     18  GPSTrackMaker  TRUE     19            GPX  TRUE     20            HTF FALSE     21         Idrisi FALSE     22            KML  TRUE     23   MapInfo File  TRUE     24         Memory  TRUE     25   MSSQLSpatial  TRUE     26           ODBC  TRUE     27            ODS  TRUE     28        OpenAir FALSE     29    OpenFileGDB FALSE     30         PCIDSK  TRUE     31            PDF  TRUE     32            PDS FALSE     33         PGDump  TRUE     34           PGeo FALSE     35            REC FALSE     36            S57  TRUE     37           SDTS FALSE     38       SEGUKOOA FALSE     39           SEGY FALSE     40            SUA FALSE     41            SVG FALSE     42            SXF FALSE     43          TIGER  TRUE     44        UK .NTF FALSE     45            VRT FALSE     46           Walk FALSE     47           WAsP  TRUE     48           XLSX  TRUE     49         XPlane FALSE


title: I think I have problem with basics about FME and Python

text: I try to learn from Oliver's corner instruction ftp://ftp.safe.com/fme/pyfme/OliversCorner.zip) . So for example I overwrite his #script 4 to StartupPython Script some below and set input data in workflow with name "Fruits":               class MyPythonFactory(object):          def __init__(self):              self.count_features = 0              self.logger = pyfme.FMELogfile()               def input(self,feature):              self.count_features += 1                   # Accessing all attributes of a feature              self.all_attributes = 'Tile'.getAllAttributeNames() # return a list with all attribute names as result              self.all_attributes_count = len(self.all_attributes) # count attributes                   self.logger.log('Feature: '+ str(self.count_features),1)                   for i in range(self.all_attributes_count):                  self.attribute_name  = self.all_attributes[i]                     # get attribute name                  self.attribute_value = 'Tile'.getAttribute(self.attribute_name)  # get attribute value                  self.logger.log('Attribute: ' + str(self.attribute_name) + '\tValue: ' + str(self.attribute_value), 1)                   self.logger.log('\n',1)              self.pyoutput('Tile')               def close(self):              self.logger.log('Total number of features: ' + str(self.count_features),1)      And according to this I should get following results in log file: Feature: 1 Attribute: X_INT Value: 3333317 Attribute: ID Value: 1 Attribute: fme_type Value: fme_point Attribute: LASTNAME Value: von Goethe Attribute: Y_INT Value: 5684892 Attribute: fme_feature_type Value: points Attribute: fme_geometry Value: fme_point Attribute: SHAPE_GEOMETRY Value: shape_point Attribute: X_FLOAT Value: 3333317 Attribute: SURNAME Value: Johann Wolfgang Attribute: Y_FLOAT Value: 5684892 But I do not get any results of this script in logfile! So my questions are:   1. How script recognize which feature I will use If there are more? Is feature name actually name of input data for example, so I should use 'Fruits'?   2. Do I have to replace word 'feature' in code with corresponding feature name in workbench?


title: Consuming an asynchronous Geoprocessing service in ESRI's Flex API

text: I have been trying to consuming my own asyncronous Geoprocessing service using ESRI's FLEX api, but i am either doing something dumb, or there is some trick involved in getting the results out. Since it's an asyncronous service, I am using the submitJob()method. The jobComplete event is firing, but the GeoprocessorEvent that i am getting here has a null executeResult. And if I check using FireBug, I can see that the result is definitely being sent to my browser. Is there any sample which shows how to get the results from an asyncronous service? P.S. I am using ArcGIS server 9.3.1 & Flex API 2.1


title: MMP of geometries

text: MBR is used for extent of geometries.. then what is the use of MMP.. is it for visualization the objects?


title: Shapefile is not a valid or recognised data source.

text: I have some shapefiles that I have been using before, some months back, but now I try to load them into QGIS but I get the message: districts.shp is not a valid or recognised data source. I realise this has affected a number of shapefiles in different folders. I took a look at the shapefiles I realise they do not have the .dbf extension. I cannot confirm I had checked before when I used them. But this looks a bit unusual to me. I am not well versed with shapefiles and GIS, but I cant figure out whats happening here. Somebody help.


title: ESRI Silverlight Template - 'View Designer' of MainPage.xaml Crashes Visual Studio

text: At last, first adventure with the ESRI Silverlight API... So, I have installed ArcGIS API for Silverlight v2.4 and all its dependencies. Then, I downloaded the 'Showcase' Template. Opened the project in Visual Studio Ultimate 2010, and the project built and compiled fine (with some warnings about ScaleBarUnit). Hit F5, and application ran fine out of dev server. Then, went to go look at xaml markup in MainPage.xaml by right clicking and choosing 'View Designer' option. Xaml starts loading, then Visual Studio crashes. I've spent the last hour or so googling the issue, and haven't found the fix. I am hoping someone may know what I need to do to view the xaml markup in Visual Studio designer?


title: "AttributeError: getZ" error when trying to get the elevation of DXF linestrings

text: I'm using Python and OGR to extract the elevation of lines within a DXF file.               import ogr          driver = ogr.GetDriverByName('DXF')     datasource = driver.Open('test1.dxf', 0)          layers=datasource.ExecuteSQL( "SELECT DISTINCT Layer FROM entities" )     layer=datasource.GetLayerByIndex(0)          for i in range(0, layers.GetFeatureCount()):             layerName = layers.GetFeature(i).GetFieldAsString(0)             layer.SetAttributeFilter( "Layer='%s'" % layerName)             print 'Layer=%s|Features=%s' % (layerName, layer.GetFeatureCount())              for j in range(0, layer.GetFeatureCount()):           myFeature = layer.GetNextFeature()           myElevation = myFeature.GetGeometryRef().getZ(0)      But I get an "AttributeError: getZ" error when executing it. What am I doing wrong? Thank you very much.


title: Can you set the PostGIS SRID when creating a Feature class through ArcCatalog?

text: I have ArcSDE installed in a Postgresql database and I am using PostGIS geometry. I'm not a DB minded person so feel free to let me know if my process is not right. I create my feature class in ArcCatalog (no probs) I then go into PgAdminlll to check out the new table. There are two things I notice when I check out my new table. 1) The record for my new table in the public.geometry_columns table has an SRID of -1. Is there any way to set the SRID during the feature class creation? If not how do I do this in PgAdminlll? Is it something like updateGeometry or addGeometry? 2) Also I notice that in PgAdminlll under the newly created tables properties there is no primary key assigned. So what I have been doing is assign the sde created objectid field as the primary key. Is this acceptable or should I be creating a new PK? Thanks Ando


title: arcpy: creating polyline features from the following text file format

text: I am looking into a way of reading the following file format with python, where 0 0, 0 1, 0 2, ect... is the polyline object number and 0(1) 464736.1645 260940. 098377 are x, y coordinates of polyline feature start/end. How I can scan through this text file to read a polyline object and correspsonding start/end coordinates. PS. CreateFeaturesFromTextFile ESRI script tool does not work properly in arcpy (arcgis 10) hence the need to create polylines from text file. Your help is much appreciated. Many thanks, Meryloo ![enter image description here](http://i.stack.imgur.com/CLiGu.jpg)


title: Truncate arbitrary File Geodatabase tables in FME

text: I have one FGDB with over 30 tables. Also have few WB and they write data to output tables in FGDB, but each of WB write data to different tables but still at the same FGDB. Output tables are being truncated first (set option Parameters). But I also need the rest of tables in this database to be truncated every time WB is started, no matter which one. Because the problem is that FGDB is going to be updated only with data accoridng to spesific WB, but there are still data in other tables not used by WB. I hope someone understand my issue. Tnx.


title: error while trying to compile quantum gis: unresolved external symbol class QgsSearchTreeNode

text: i'm trying to compile the quantum gis sources code following the step by step how to compile guide, but i'm facing an error when code is linked. I'm compiling in Windows 7 x64 in Microsoft Visual Studio 2010 Professional and i'm using the environment variables created by OSGeo4W.bat file. The exact message error is this one:               1>     Creating library C:/qgis-1.7.4/build/src/core/RelWithDebInfo/qgis_core.lib and object C:/qgis-1.7.4/build/src/core/RelWithDebInfo/qgis_core.exp     1>qgssearchstring.obj : error LNK2019: unresolved external symbol "class QgsSearchTreeNode * __cdecl parseSearchString(class QString const &,class QString &)" (?parseSearchString@@YAPAVQgsSearchTreeNode@@ABVQString@@AAV2@@Z) referenced in function "public: bool __thiscall QgsSearchString::setString(class QString)" (?setString@QgsSearchString@@QAE_NVQString@@@Z)     1>flex_qgssearchstringlexer.obj : error LNK2001: unresolved external symbol "union YYSTYPE yylval" (?yylval@@3TYYSTYPE@@A)     1>C:\qgis-1.7.4\build\src\core\RelWithDebInfo\qgis_core.dll : fatal error LNK1120: 2 unresolved externals      When i compile the qgssearchstringparser.cpp.rule with diagnostic i have the following messages! The problem is from bison compilation? It as bison conflicts shift reduce. How can i resolve them? 1> C:\Progra~2\GnuWin32\bin\bison.exe -oC:/qgis-1.7.4/build/src/core/qgssearchstringparser.cpp -d -v -t C:/qgis-1.7.4/src/core/qgssearchstringparser.yy 1> if errorlevel 1 goto :VCEnd (TaskId:11) 1> Generating qgssearchstringparser.cpp (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:158: m4: Warning: Excess arguments to built-in `_m4_popdef' ignored (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:1071: m4: Warning: Excess arguments to built-in`_m4_popdef' ignored (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:1740: m4: Warning: Excess arguments to built-in `_m4_popdef' ignored (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:1741: error: m4_divert_pop(0): diversion mismatch: (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:155: m4_divert_push: 0 (TaskId:11) 1> stdin:1: m4_divert_push: KILL (TaskId:11) 1> C:\Progra~2\GnuWin32/share/bison/yacc.c:1741: the top level (TaskId:11) 1> C:/qgis-1.7.4/src/core/qgssearchstringparser.yy: conflitos: 15 de deslocamento/reduþÒo (TaskId:11)


title: Need to hyper link my personal data to a shape file

text: I want to hyper link my personal data like excel file to a shape file. Can I do it in QGIS. Kindly help.


title: How to select features that intersect but don't touch (using ArcObjects)?

text: So how do I do that? ArcMap's _Select By Location_ selects also all features that touch, but I only need the ones that **actually** intersect the area. I currently use `esriSpatialRelEnum.esriSpatialRelIntersects` and there doesn't seem to be an option for what I need. `esriSpatialRelOverlaps` isn't an option because it doesn't cover the case when the geometries are excatly the same size and over each other. `esriSpatialRelCrosses` also doesn't work because it doesn't support Area/Area intersection. So is this possible at all?


title: Why is this spatialite polygon layer not displayed properly?

text: In QGIS, I have a spatialite multipolygon layer that have full objects in attribute table but do not display random ones as I scroll and pan around:   1. Vietnam map at zoom level 1:16000000 - some provinces missing in the northern part creating holes. ![enter image description here](http://i.stack.imgur.com/3mST7.png)   2. Scroll mouse wheel to zoom closer one level (1:8000000). The northern most province in the view is missing. ![enter image description here](http://i.stack.imgur.com/AMhMD.png)   3. Zoom closer to the southern part. ![enter image description here](http://i.stack.imgur.com/ouekn.png)   4. Moving one step closer. The large number of missing polygons make it hard to mark all of them with circles. ![enter image description here](http://i.stack.imgur.com/LVh5f.png) When I pan around, the polygons may re-appear at some places and disappear at some others. If I export this layer as shapefile and add to the map, there is no missing polygon at all. Test data Does anyone know how to fix this?


title: How to perform datum transformation in ArcGIS server REST API exportmap

text: I have a ArcGIS server 10.0 mapcontext in one projection (swedish grid sweref99 TM) which uses its own datum, also named Sweref99 . When I use the REST API's map service export function I want to specify the coordinatesystem of the exported map to another coordinatesystem with another datum (Swedish grid rt90). If add the imageSR argument with SRid for RT90 the returned map is offset by the amount that usually corresponds to the error induced by lack of datum transformation. It does not help to add a transformation to the data frame in arcmap before saving the MSD-file. The MSD-file will contain a definition of the transformation, but it seems like it is not used. It seems to me the transformation is only used to transform layers within the map service. The documentation on the REST-API is very vague on this point, if it is by design or a bug, as it doesn't mention datums at all. Can anyone tell me if it is supposed to work or if there's some way of telling arcgis server which datum transformation to use?


I am having a raster file with runoff depth Q in mm which was obtained from SCS method. I want to calculate hydro power potential at any location on my DEM. In the formula Q is in m3/s but we are getting Q in mm from SCS method. Is there any tool/script/software dealing this? How to find Q in m3/sec from a raster having Q in mm for hydro power calculations? I am using arcgis (9.3 and 10).


title: ESRI javascript API layer order

text: I have the below code which ensures a layer is valid before adding it to the map. mapConfig.Services is an array of service url's and loadMapService is a simple function which returns an ESRI layer. The layer is added once it is "loaded" using an index (defined in mapConfig.Services). This works fine for two layers because no matter what order the event onLoad fires, they come in they will be normalised (0 will end up at position 0 regardless of if 1 was added before it). My problem is that I think that these could be different servers in different locations firing the onLoad event with varying speeds. For example, if I had 5 layers and by chance the onLoad event fired in the order 4,3,2,1,0 they would remain in that order since the index would always be greater than the number of layers and therefore append to the end (the objective is to order them 0,1,2,3,4). I could use map.reorderLayer() to compare back to the original array, however, how will I know once all of the layers have been loaded? map.onLoad fires after the first layer is added so I can't do it here. Also assume that some of the layers could be missing and will not fire onLoad (I have connected to the onError event). I don't really want to check the layer order after a maximum timeout period. Maybe there is something really obvious I'm missing? Many thanks, David               for (var i = 0; i < mapConfig.Services.length; i++) {         layer[i] = this.loadMapService(mapConfig.Services[i], true);         if (layer[i] != null) {         //In Internet Explorer, due to resource caching, the onLoad event is fired as soon as the layer is constructed. Consequently you should check whether the layer's loaded property is true before registering a listener for the onLoad event:         //http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_events.htm                  if (layer[i].loaded) {                      this.map.addLayer(layer[i]);                  }                  else {                     layer[i].index = i;                     dojo.connect(layer[i], "onLoad", dojo.hitch(this, function (addlayer) {                     var self = this;                     self.map.addLayer(addlayer, addlayer.index);                 }));            }         }     };


title: How to calculate the area of raster catchment zones?

text: I have a raster with irregular shape and I need to calculate the area. The "classic" method (Vectorize+field calculator) didn't work, it makes thousands of polygons. Any ideas? Thanks a lot! ![Raster image](http://i.stack.imgur.com/GSrWF.jpg)


title: Identifying inserts, updates, deletes, and conflicts between a parent and child version in ArcSDE with ArcPy

text: I'm looking for a way to identify records that have changed between the present and the last time a version was reconciled. It would also be great to be able to identify conflicting records. Ideally I would be able to read in the attributes of the records that have changed or are conflicting. I suspect that this is possible doing some sort of comparison with the delta tables, though I have very little experience with versioned features and ArcSDE itself. I've looked around and haven't found any information on how to actually read or access those delta tables. Is there a way to achieve this within Arcpy?


title: How to convert a polygon into a set of points within its border using Mapinfo? (or other tool)

text: I need to convert a polygon into a set of points in Mapinfo with a specific inter distance, i cant insert them manually as i need to have a large number of points (up to 10,000) at each run. Thanks


title: Pgrouting functions and geoms type not found. Install failed?

text: I have installed a `postgresql 9.1` and `postgis 2.0` from source. I couldn't launch this :               # Add pgRouting launchpad repository ("stable" or "unstable")     sudo add-apt-repository ppa:georepublic/pgrouting[-unstable]     sudo apt-get update          # Install pgRouting packages     sudo apt-get install postgresql-9.1-pgrouting      So I compiled and installed `pgrouting 2.0` (after some hours searching for dependencies). I created the extension on my database in `postgresql`. I included the function from the `sql` files `pgrouting.sql` but the functions I need are in `pgrouting_legacy.sql` and `pgrouting_dd_legacy.sql` When I try to load them, the error I get is : `psql:/usr/share/postgresql/9.1/contrib/pgrouting-2.0/pgrouting_legacy.sql:299: ERROR: type "geoms" does not exist` Postgresql and Postgis are working fine... What did I wrong ? Maybe I forgot something or the install failed ? I followed this documentation : http://pgrouting.org/docs/1.x/install.html http://www.bostongis.com/PrinterFriendly.aspx?content_name=pgrouting_osm2po_1


title: Embedded python script module import issue

text: I have two ArcGIS python scripts. One is a primary python script that calls a number of functions from a second python script. Everything works well, i.e. primary tool calls and uses functions from a second script, when the two scripts are placed in the same directory and the primary python script is NOT embedded into python toolbox. However when the primary python script gets embedded into ArcGIS toolbox, the second script cannot be access any more by the primary script and therefore cannot be imported into the primary script as a module and functions cannot be used. The work around would be to copy over all functions from the second script to the primary script or to copy second script into the toolbox directory but that is not the proper way to solve this issue. Is it possible within ArcGIS to embed a script into a python toolbox with other scripts that are used by the primary script? Any help will be appreciated. Thank you


title: Drop Markers and MarkerCluster together from database

text:
I've been working on my map which gets it's details from a MySQL database. I use MarkerCluster Plus to cluster my markers but would like to add the drop animation to it. I found this thread, but cannot get it to work with my database. Using Drop Markers and MarkerClusterer together? Would anyone please be able to help me figuring out how to add the drop animation to my code? My test map is here: http://mymap.mooo.com Really appreciate any help or pointers.                var customIcons = {       BOO: {         icon: 'http://labs.google.com/ridefinder/images/mm_20_blue.png'               },       CIE: {         icon: 'http://labs.google.com/ridefinder/images/mm_20_green.png'        }      };          var cluster =[];          var min = .999;     var max = 1.001;               function load() {       var map = new google.maps.Map(document.getElementById("map"), {         center: new google.maps.LatLng(0,28.287167),         zoom: 3,         mapTypeId: 'roadmap'       });            var infoWindow = new google.maps.InfoWindow;           var mcOptions = {gridSize: 20, maxZoom: 19};           // this variable will collect the html which will eventually be placed in the side_bar        var side_bar_html = "";             // Change this depending on the name of your PHP file       downloadUrl("phpsqlajax_genxml2.php", function(data) {         var xml = data.responseXML;         var markers = xml.documentElement.getElementsByTagName("marker");         for (var i = 0; i < markers.length; i++) {           var name = markers[i].getAttribute("assetno");           var address = markers[i].getAttribute("address");           var type = markers[i].getAttribute("type");           var assetdesc = markers[i].getAttribute("assetdesc");           var location = markers[i].getAttribute("location");           var point = new google.maps.LatLng(               parseFloat(markers[i].getAttribute("lat"))* (Math.random() * (max - min) + min) ,               parseFloat(markers[i].getAttribute("lng"))* (Math.random() * (max - min) + min));           var html = "
" + name + "
" + assetdesc + "
" + location + "
";           var icon = customIcons[type] || {};                setTimeout(function() {             var marker = new google.maps.Marker({                 map: map,                 position: point,                 icon: icon.icon,                             animation: google.maps.Animation.DROP                });                      return marker;                  setTimeout(function () {                                 bindInfoWindow(marker, map, infoWindow, html);                        cluster.push(marker);                    // save the info we need to use later for the side_bar                 // add a line to the side_bar html                 side_bar_html += '' + name + ' - ' + assetdesc +'<\/a>
';                }, 1500);           }, i * 50);              }                              var markerCluster = new MarkerClusterer(map, cluster, mcOptions);            // put the assembled side_bar_html contents into the side_bar div         document.getElementById("side_bar").innerHTML = side_bar_html;               });          }          // This function picks up the click and opens the corresponding info window     function myclick(i) {         google.maps.event.trigger(cluster[i], "click");     }             function bindInfoWindow(marker, map, infoWindow, html) {       google.maps.event.addListener(marker, 'click', function() {         infoWindow.setContent(html);         infoWindow.open(map, marker);       });     }          function downloadUrl(url, callback) {       var request = window.ActiveXObject ?           new ActiveXObject('Microsoft.XMLHTTP') :           new XMLHttpRequest;            request.onreadystatechange = function() {         if (request.readyState == 4) {           request.onreadystatechange = doNothing;           callback(request, request.status);         }       };            request.open('GET', url, true);       request.send(null);     }          function doNothing() {}


title: Convert Lat/Long to UTM specifying which zone to use (Java)

text: I have a set of coordinates in decimal degrees spread across two UTM zones in my Java application that I want to export to use in Petrel, so they need to be in the same UTM zone. Is there a java library out there where I can specify what zone I want to use for the outputdata? tried quite a few libraries now and they only have utils for converting to the correct UTM zone.


title: How to print an OpenLayers map with its popups open using Mapfish printing module?

text: I'm using GeoExt and Mapfish printing module for geoserver. There is a functionality, in the application I'm developing, that allows users to create popups on the map. I'd like that printing functionality allows popups to be printed with the map. Is that possible with Mapfish ? Best regards.


title: Can I move points by editing x/y in attribute table?

text: Im new to QGIS and I just cannot figure out how to do this one hopefully simple thing: I have a bunch of points in shapefile and i need to move some of them around by hand / coordinates. I've understood, that if i move points by hand its possible to update their new xy to attributes table by field calculators $x and $y operators (Just select the column and insert that operator i suppose?). However, how about reverse? I thought that the features position on screen could be changed by editing the xy columns on attribute table...but the point remains on the same old location. Am i doing something wrong? thanks!


title: Postgis, get the points that are x meters near another point, in meters

text: I'm trying to find the points within a certain distance, in meters, from another point. I'm using the function ST_Buffer, but I don't get how to express the distance in meters. I'm trying with something like this:               select     1 as cartodb_id,     ST_Buffer(       ST_Transform(         ST_GeomFromText(           POINT(-58.38145 -34.60368)'           , 4326         )         , 3857       )       , 500     ) as the_geom_webmercator      I have the coordinates from google maps (in wgs84, 4326) then I transform them to webmercator (3857) and then I pass 500 as parameter, and I get something that looks like the desired area, but after comparing it with what google maps says it falls short for a non neglectable distance. Is this the right way to achieve it? note: you can try the sql query in cartodb \-- From this question: http://gis.stackexchange.com/a/44481/19461 I came with the following code (I use SRID 31997 to calculate the buffer, and then go back to webmercator)               select     1 as cartodb_id,     ST_Transform(       ST_Buffer(         ST_Transform(           ST_GeomFromText(             'POINT(-58.427185 -34.624592)'             , 4326           )           , 31997         )         , 2000       ), 3857     ) as the_geom_webmercator      Now if falls short for no more than 20 meters. I thought mercator (EPSG 3857) was in metric units.


Bonjour, Peut-on avec Quantum GIS redresser une photo aérienne avec des points caractéristiques connus en 3D (XYZ) ? **\-- Translation:** Hello, Is it possible to rectify an aerial photo with known control points in 3d, in QGIS?


title: How to set opacity for GRASS layers using command line?

text: In the process of learning GRASS, I am finding that I can learn many of the command-line methods that I need for scripting tasks from using the wxGUI, as it conveniently shows most of the underlying commands that it runs. This has not turned out to be the case for setting the opacity of layers. A little Googling turned up a module called g.pnmcomp, which may be responsible for controlling layer opacity. Unfortunately, that module appears not to be intended for end-users and I have not found documentation that is sufficient for me to make use of it; I'd need to know how to generate the PPM/PGM pairs that it stacks, at least. There to not appear to be arguments for opacity in `d.rast` or `d.vect`, and I suspect that it's the png or tif driver that would actually be handling the opacity of layers. That's the background, but my question is quite simple. How can I set the opacity of layers in maps created via the command line?


title: Can ArcGIS Server be called ArcSDE? I'm confused about terminology

text: I'm confused about some ESRI terminology. If I have ArcGIS 10.1 Server installed and we use Enterprise geodatabases with versioning capabilities but we use direction connections does this have anything to do with ArcSDE or SDE? I know that ArcSDE isn't even installed on our server, but I see ArcSDE experience being requested quite a bit but I never know if they truly are using ArcSDE or that's just what they are used to calling it. Can someone clear this up for me?


title: Good Symbology for Interactive Web Mapping

text: When a user clicks on a map what should they expect to see? I would say a symbol for where they clicked. A pushpin seems to be the most accepted icon for generic data. Google has pushed the upside down tear drop. What are other ideas/options and is there a place for finding professional gis oriented icon packs? I ended up creating this, ![pushpin](http://i.stack.imgur.com/FW721.png) This just popped up from the guys at map box. Clean maki icons


title: Error when using pgsql2shp

text: I try to export geographical data from a postgis database to a shapefile with pgsql2shp. Normally this works fine, but now I receive the following error.               Preparing table for user query... Done.      Initializing... ZMflagQuery: ERROR:  function zmflag(geometry) does not exist     LINE 1: SELECT max(zmflag("geometrie"::geometry)) FROM "__pgsql2shp7...      The query I use is:               pgsql2shp.exe -f 'foldername' -h luna -p 5432 -u user-P pw -g geometrie dbname "select * from bag.adressen a where a.wnpcode = '3386'"      I haven't had any earlier problems with pgsql2shp. Hope someone can help.


title: Meridian convergence. True north, magnetic north and grid north

text: I'm having difficulty wrapping my mind around meridian convergence, the horizontal angular distance between true north and grid north. Say I want to determine if a feature lies to the east or west of the central meridian (CM) by using true north and grid north designations on a topo map. I realize grid north is parallel to the CM, while true north points to the poles, and magnetic north is the direction a compass points and constantly changing. Looking at the figure below, I see grid north points to the east of true north. So does this fact alone mean everything on the grid is to the east of the true north, and therefore the CM? Does this simple fact mean that features in this grid lie to the east of the CM, or am I missing something. Also, I realize I can just look at the tick marks and and see that this this grid in particular covers -80°22’ to -80°15, and the CM for zone 17R lies at 81°. But had I not known that and wanted to use the north arrows. Please explain. ![enter image description here](http://i.stack.imgur.com/gnrZb.png)


title: Can I create a virtual mosaic using other virtual mosaics?

text: I am following this example - http://linfiniti.com/2009/09/image-mosaicking- with-gdal/ I have 6TB of aerial imagery in 6 folders 1TB each and each folder has many subdirectories including the geotiffs. I am using gdal_translate to compress the data first. Then I use gdalbuildvrt to create the mosaics, and finally I build the pyramids/overviews for the mosaics using gdaladdo. My target is to use geoserver to serve all the aerial data connected together. My concern is that a subdirectory may be 100GB which takes quite a while to process (either compress or building pyramids). This is why I did not use gdal on all 6TB at once and preferred handling them in different directories. Thus, my question is whether or not I will be able to use something like gdal_merge to connect all the pyramitised mosaics together to a bigger mosaic and serve it using geoserver or similar OS software. Apologies for the huge post! Thanks in advance for any hints or tips.


title: How to insert new line text in popup

text: I'm using Leaflet Marker Cluster and I need to show five different lines in a popup. But when I write this, they are all in the same line. Can someone help me to be one under another?               var a = addressPoints[i];                 var title = a[2];                 var univ = a[3];                 var direct = a[4];                 var city = a[5];                 var state = a[6];                 var marker = new L.Marker(new L.LatLng(a[0], a[1]), { title: title } );                 marker.bindPopup("Student: " + title + "University: " + univ + "Direction: " + direct + "City: " + city + "State: " + state);                 markers.addLayer(marker);             }              map.addLayer(markers);


title: Shapefile output customization via WFS in Geoserver?

text: I'm running Geoserver 2.4 and I've created a layer that I'm using WFS to download as shapefile (or, rather a zipfile with shapefiles). This works fine, and a request like:               http://localhost:8080/geoserver/bw/ows?yservice=WFS&version=1.0.0&request=GetFeature&typeName=ns:layeroutputFormat=SHAPE-ZIP      returns a zip-file containing the shapefile(s) i requested. No problem. The only problem is that this file contains a wfsrequest.txt file that I'm rather sure my users won't need or worse: be confused by. After diggig a bit around in the geoserver docs I've found this page which says that I can use freemarker templates to customize the zip-file. But, for the life of me I cannot figure out _where_ to put the freemarker template file and what it's _filename_ should be! In addition it seems to me that the only thing the template let's me configure is the name of the textfile, not it's content or if it's included or not. Any pointers to where to place this template and what I can do with it?


title: How to generate non-merging buffers in QGIS?

text: I'm using QGIS to construct some fixed width buffers from a coastline shapefile. Is there a way to easily handle overlaps/ median lines? (I'm not sure if there's a particular term or phrase I should be searching for here.) More detail: I have a shapefile for several islands. I need to create a 12nm territorial sea coastal zone. This is straightforward with the buffer function. However, if the distance between two islands is less than 24nm (12 + 12), the boundary should follow the median line. Is there a way to calculate this in QGIS so that, instead of a merged polygon, I can generate two polygons (one around each island) with a boundary along the mid point. For bonus points, I need to generate a second smaller coastal zone. This lies 4nm from the coast, or 1/3 of the distance to the territorial sea boundary described above. Is there a way to construct a buffer with a proportional distance? I hope my explanations make sense. Please let me know if anything is unclear and I'll add more detail.


title: Tiles refreshing with geoserver

text: I use geoserver geowebcache for displaying tiles using google maps API. Data comes from Postgis. My problem is that I have to change geometry of some features (not very frequently). I would like to achieve automation simillar to this from openstreetmap, where after source data change tiles that cover area of changed feature regenerate themselves automaticly. How to do this? Now I have to delete all tiles from geoserver and generate them once again. I do not use pure WMS as service is rather popular and WMS may work slowly...


title: Select record from table attributes in QGIS and Python

text: Can anyone tell how I can access to the attribute table of a shp and select a record from a specific row and column using Python (with console or a script). I've been looking for in the qgis API, but I'm frustrated, I don't find anything. Thank you very much in advance. Lucas


title: cannot get rid of sr.lock files while FOR LOOPING dbfTables

text: I am new to Python and to this community as well, hope someone could help me. I am running script to extract and merge toghether the tables of some Raster. Each Attribute Table presents only one row and the same field names. My script works fine until the very end of it, when I try to merge all the tables. It seems the tables are locked (I can see an "sr.lock" file for each Table I want to merge in my folder) and I cannot access them. Strange thing: I do access them if I simply use a sample (for instance) of two of these so created tables in the Python window within arcMap and type their names instead of using a FOR LOOPING... Guess it might have to do with the Here is my script: #import relevant modules, create geoprocessing dispatch object import win32com.client, sys, string, os, arcpy               gp = win32com.client.Dispatch("esriGeoprocessing.gpDispatch.1")          # Remember to change this to wherever your files are stored     gp.workspace = "G:\\Chile_2012\\MODIS10A2.V005\\provvisoria\\ATTRIBUTE_TABLE"     out_dir = "G:\\Chile_2012\\MODIS10A2.V005\\provvisoria\\ATTRIBUTE_TABLE"          try:         rasters = gp.ListRasters("*", "all")         rasters.reset()         rst = rasters.Next()              while rst:             # Create the new field             gp.AddField_management (rst, "FILENAME", "text", "", "", "50")                  # Apply the filename to all entries                    gp.CalculateField_management (rst, "FILENAME", '"' + rst + '"')             rst = rasters.Next()          except:         print gp.GetMessages ()          listRaster = arcpy.ListRasters ()          for raster in listRaster:         arcpy.TableToTable_conversion (raster, out_dir, raster+ '.dbf')          listTable = arcpy.ListTables ()          for table in listTable:         arcpy.Merge_management (table, 'Cl_Rio_Aconcagua.dbf')      The code is taken from others, I simply adapted it for my needs. Anyway, the error I am receiving so far doesn't have to do explicitly with LOCK topics, but since I have those files in my folder I need help to find out how to get rid of them.               ERROR 000732: Input Datasets: Dataset 'Cl_Rio_Aconcagua_2007121.img.dbf' does not exist or is not supported     Failed to execute (Merge)


title: Interpreting Firebug results on ESRI Javascript feature layers in the NET tab

text: This was cross-posted to the ESRI Javascript API forum yesterday. I need help in interpreting what I am seeing and wondering why I'm seeing duplicate features. I'm using this example: http://help.arcgis.com/en/webapi/jav...efinition.html "Feature layer with layer definition applied" on my own server and viewing the results after opening the page in Firefox. I modified the tooltip code so I can see the OBJECTID. Your results may be different from what I describe here. I used the tooltip to find the OBJECTID on screen and then expanded the URLs to find the same OBJECTID. I'm specifically looking at the shaded area next to the I-35 sign on the map. When I expand the keys under the URLs in the JSON tab on the NET tab I can see where the featurelayer (fields) is being created (the line starts as GET1?). Then there are 3 more lines that when expanded have a key called "features". The first one has 1 feature (0), the second line has 4 features (0,1,2,3) and the third line has 2 features (0,1). In the second line with 4 features, the 4th feature has an OBJECTID of 5095 and in the third line the 2nd feature has an OBJECTID of 5095. Does that mean that this feature is being downloaded twice? I'm not moving the map around at all. There are also URLs that when expanded do not show any features. They appear to show the same keys as the ones I described above but the features key cannot be expanded. These have a size of 2.6kb. I'm not sure what is happening here. In this example the sizes that are being downloaded are not a big deal. In my own data I have some large features and when I run this example against my own internal data and limit the definition expression to one feature I get six URLs returned. I'm assuming the first two are about the creation of the actual feature layer. The next four seem to be pairs of duplicates. The URLs with a size of 865B have a key called features that appears to be empty. The URLs with a size of 4.2KB have a key called features that is listing the feature I defined. So, I asked myself if in fact it was downloading the feature twice. Am I interpreting these results correctly? ![enter image description here](http://i.stack.imgur.com/k2W96.jpg)


title: Integrate ArcGIS 10 extension INTO ArcEngine 10

text: I was wondering if there is a way at all to use some of ArcGIS 10's extension into arc engine. A good example would be if we could put Arc Hydro extension into ArcEngine. Thanks and Regards, Kev


title: Geoprocessing Service to return Multidimensional Raster from a NetCDF file

text: I have tried to make this work for weeks with no results. I am trying to create a model in ArcMap that uses the Multidimension Tool "Make NetCDF Raster Layer" and return a raster to which I can apply a Time Slider with the Silverlight API once its result is published as a Geoprocessing Service (ArcGis 10.1). If I create such model and run it in ArcMap, and then publish the result, then I can successfully call the service as an ArcGISDynamicMapServiceLayer and link a Time Slider to it on my web app. But these type of NetCDF files contain more than one variable and for obvious reasons I want to be able to select any of such variables from my web app and get a different raster (with its time dimension) for each one of them. So it occurred to me that I could publish a model that gets the variable by input parameter and automatically generates the raster I need. But when I run this Geoprocessing Service and assign the resulting raster to an ArcGISDynamicMapServiceLayer within the Silverlight environment I get a Raster that I can display but it doesn't have a time dimension/extent. Any suggestions?


title: Converting Heatmap into Grid of Points to regenerate less accurate Heatmap?

text: **Question:** How do you take a heatmap generated using a GIS software (arcgis, qgis...) and convert it into a uniform grid array of points which can be used to regenerate the heatmap (although with lesser accuracy)? **Initial to final product:** **(Initial)**`Millions of Datapoints in MySQL` -> `(... some processing, maybe GIS software)` -> **(Final)**`Hundreds of Datapoints in a grid array` -> `Render density map in browser` How do I get from `Millions of Datapoints in MySQL` to `Hundreds of Datapoints in a grid array`? ![enter image description here](http://i.stack.imgur.com/uh7G1.png) **Purpose:** Transferring millions of points from database to browser where the heatmap is created will cause heavy database load and network traffic and strain the browser. So instead of transferring millions of points to the browser, it is more optimal to simplify the millions of points to 100s of points in a grid arrangement which will be easier for the browser to handle.


title: About spatialite views and Attribute table

text: I try to use views with spatial column in spatialite. I can connect to spatialite database and load the layer without problems but when I try to view data in Attribute Table I can't get eny data; all rows and field show ERROR. Data render well and information in point show correct data. Has someone get the same error?. Is this a bug? I get this results in different versions of qgis (osg4w in windows, master version in ubuntu 12.04 and qgis version included in osgeolive 6.0)


title: Create .ini file from folder of geotiffs

text: All, I have 800 geotiffs in a folder and I want to create a .ini file for each one which looks something like this: FILENAME, SCALE, CO-ORDS, FILEPATH, FILENAME, NEW.INI Is this possible? I have come across listgeo and other dos commands but I'm very new to them and don't fully understand what I'm doing! Any help would be fantastic!


title: Features on a vector layer to have a scalable stroke?

text: I am trying to make some kind of line-drawing editor over OpenStreet map using OpenLayers. I am able to draw points, connect them into lines, and it all looks good, but if I unzoom, stroke width is the same as on previous zoom (instead of being smaller). And if I unzoom al the way up to 0, line width (stroke) is still the same. Now, I made this work the way I want it using context on Style, but I don't like the way it works... **QUESTIONS:** Is there some kind of setting to make all lines scalable when I am changing zoom (adapt stroke width based on current zoom level)? Can I set stroke width in meters or millimeters?


title: WFS in Openlayers

text: I am new in Openlayers and web services in general, but until now I have managed to create a WMS (published by ArcGis to a server provided by uni) and connect it with Openlayers. Projection etc works properly but I don't know how to reach our WFS (e.g. GetFeatureInfo). I need it for applications like highlighing features from a search function, or mouse sensitive events. Any idea?                  function init() {              var options = {             projection: new OpenLayers.Projection("EPSG:3857"),             units: "m",             maxResolution: "auto",             numZoomLevels: 22,             maxExtent: new OpenLayers.Bounds(-3339584.723798, -30240971.958386,                                                    6679169.447596, 30240971.958386)         };              map = new OpenLayers.Map('map', options);              var wms = new OpenLayers.Layer.WMS(                 "WMS", "http://mikro.bv.tu-berlin.de/arcgis/services/student_grp1/campus_prj/MapServer/WMSServer?",                       {layers: '1,2,3,4,5,6,7', version:'1.3.0', crs: 'EPSG:3857', transparent:true, isBaseLayer: true});              var gsat = new OpenLayers.Layer.Google(                 "Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}             );                   map.addLayer(gsat);         map.addLayer(wms);              map.addControl(new OpenLayers.Control.LayerSwitcher());              map.setCenter(new OpenLayers.LonLat(13.326169, 52.512134).transform(             new OpenLayers.Projection("EPSG:4326"),             map.getProjectionObject()), 16);         }


title: How to automate creation of Network Turn Features from line segments?

text: I have a road network which I will add Turn features in. From the road network, I have created a model that cuts out the line segments where the turn features will be located. My problem is how to make a turn features of these line segments and get them to connect to the road network. I know how to draw in new Turn features, but there are too many turn features to draw here. There are approximately 28000 Turn features which should be included. Does anyone have a model, Python script or a solution on how to do this?


title: How do I draw transparent polygons with ArcObjects?

text: How do I draw transparent polygons in ArcObjects? I mean is it possible to set alpha channel?


title: How do I query two columns in CartoDB?

text: I'm making a simple map with locations of daycare centers plotted. I have two filters, one that shows ages and another that shows different types of centers. I can filter one one or the other, but not both. http://www.datanarratives.org/daycarefinder2014/ For example, how do I filter the map to show only Corporate sites that serve 0-2 years? currently the query for one column is like this: query = "select * from table_04apr2014 where age_range like "+ "'%"+agerange+"%'"; thanks, Russell


title: QGIS - unable to change projections

text: I am relatively new to QGIS (version! 2.0.1) and having trouble changing projections. No matter what I choose the view is the same. For example, in the attached screen shot I have chosen Alaska Albers Equal Area Conic (102006), confirmed by both Project->Properties and Layer->Properties. Obviously this is not conic. I have "on the fly" transformation checked.   ![enter image description here](http://i.stack.imgur.com/4wOkf.jpg)


title: QGIS v2. Convert longitude/latitude to UTM projection-Zone 51J - Southern hemisphere

text: Could somebody please let me know in QGIS version 2.0.1 How do I convert Longitude/latitude default setting to UTM projection. I am bringing in waypoints from a GPS device which is set to the above specifications ie UTM projection/Zone 51J/Southern Hemisphere BUT when I bring the waypoints into QGIS version 2.0.1 it displays files as longitude/latitude. Can I change settings somewhere???


title: Generating Heatmap from PostGIS

text: I have GIS data in a PostGIS data base and would like to generate a density map and display them on a Leaflet/Google Maps. **Question:** What is the recommended/typical method for doing so, without transferring ALL (millions) the data points within the map's viewpoint to the Leaflet/Gmaps map? No user intervention (ie. Import data into ArcGIS to generate the map) should be required unless automation is possible via CLI etc. Currently using Postgresql/PostGIS as the spatial database and Leaflet on the browser. ![enter image description here](http://i.stack.imgur.com/UsAI1.jpg)


title: Searching for LANDSAT for the state of New Mexico

text: I am looking for a website that allows me to download free LANDSAT for all of the State of New Mexico. I need them to perform my work on RUSLE and need LANDSAT for c factor. Does anyone suggest of a good website ? The one I have download is the GLCF: Earth Science Data Interface from the University of Maryland. I have some LANDSAT 2006 that covers the southern new mexico. Anyone have a suggest? Thank you.


title: How to show labels for all polygons in a layer, even with 'NULL' values?

text: I have a polygon layer which contain information on property name, number of trees within the polygon, average height, and min- and max height values. My problem is, I want to label each polygon with property name, number of trees, etc. I got that part to work, the labels looks the way I want them. But, I have a number of properties which doesn't contain any trees. When making labels, the properties without tree doesn't get labelled at all? I would like labels on the properties without trees to show just the names of the properties. Is this possible in QGIS 2.2?


title: Real-world example of Affine Transform?

text: From the Wikipedia article: > In geometry, an affine transformation or affine map or an affinity (from the > Latin, affinis, "connected with") between two vector spaces (strictly > speaking, two affine spaces) consists of a linear transformation followed by > a translation. Can anyone give a real-world example of when and how this is used in GIS?


title: gdal2tiles misalignment

text: I have a map image that I have reprojected from OSGB36 to googleMaps projection (EPSG:900913). When I run gdal2tiles on the reprojected map, the results are not alligned with the google maps images (its not just out by a little bit but by 10's of miles). If I run it through MapTiler (from maptiler.org) it is aligned fine. MapTiler asks for an SRS which I dont specify when using gdal2tiles. So I'm thinking I've missied out a stage? Also when I run gdalinfo on the warped file, the coords of the corners seem wrong. E.g. for the bottom-left corner the latitude is 51.143906, but it should be 50.955887 for google maps. I'm usign gdal16 installed by OSGeo4W on Windows7 64-bit. Warped file here.. https://docs.google.com/leaf?id=0B93lksnTC7_cNzIzZWQ0MDYtMTY5Yy00NjY0LThiMjktZjc2YzA3MmU5NjI4 gdalinfo on warped file...               C:\OSGeo4W\apps\gdal-16\bin>gdalinfo e:buckland_WARPED.tiff     Driver: GTiff/GeoTIFF     Files: e:buckland_WARPED.tiff     Size is 611, 419     Coordinate System is:     PROJCS["Google Maps Global Mercator",         GEOGCS["WGS 84",             DATUM["WGS_1984",                 SPHEROID["WGS 84",6378137,298.2572235630016,                     AUTHORITY["EPSG","7030"]],                 AUTHORITY["EPSG","6326"]],             PRIMEM["Greenwich",0],             UNIT["degree",0.0174532925199433],             AUTHORITY["EPSG","4326"]],         PROJECTION["Mercator_1SP"],         PARAMETER["central_meridian",0],         PARAMETER["scale_factor",1],         PARAMETER["false_easting",0],         PARAMETER["false_northing",0],         UNIT["metre",1,             AUTHORITY["EPSG","9001"]]]     Origin = (-474051.292871501410000,6617009.987366309400000)     Pixel Size = (8.392224865731517,-8.392224865731517)     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  ( -474051.293, 6617009.987) (  4d15'30.51"W, 51d 9'49.57"N)     Lower Left  ( -474051.293, 6613493.645) (  4d15'30.51"W, 51d 8'38.06"N)     Upper Right ( -468923.643, 6617009.987) (  4d12'44.69"W, 51d 9'49.57"N)     Lower Right ( -468923.643, 6613493.645) (  4d12'44.69"W, 51d 8'38.06"N)     Center      ( -471487.468, 6615251.816) (  4d14'7.60"W, 51d 9'13.82"N)     Band 1 Block=611x3 Type=Byte, ColorInterp=Red       Mask Flags: PER_DATASET ALPHA     Band 2 Block=611x3 Type=Byte, ColorInterp=Green       Mask Flags: PER_DATASET ALPHA     Band 3 Block=611x3 Type=Byte, ColorInterp=Blue       Mask Flags: PER_DATASET ALPHA     Band 4 Block=611x3 Type=Byte, ColorInterp=Alpha      The sequence of commands I run are... Georeference the OSGB PNG images...               gdal_translate -a_srs EPSG:27700      -gcp 0 400 241538.5 119812      -gcp 600 0 244713.5 121928.66666667      -gcp 0 0 241538.5 121928.66666667      -gcp 600 400 244713.5 11981     bucklands1.png bucklands1.tiff      Warp into googleMaps projection (EPSG:900913) ...               gdalwarp -s_srs EPSG:27700 -t_srs EPSG:900913 -of GTiff     bucklands1.tiff bucklands1_warped.tiff      Tile (make into googleMap 256x256 tiles) ...               gdal2tiles bucklands1_warped.tiff gmTiles      It works if I by-pass the gdalwarp stage and make google tiles directly from the OSGB36 images. But the image quality is poor as the interpolation is not so good.


title: Annotation class empty after export

text: I need to use one annotation layer for different purposes (change positions, erase, add...) I need the old one as well so I wanted to export it and work on the new one. But every time either I use export or import and the same or a different database it ends with a annotation class with the same amount of rows as the old one but all the attributes are empty - with Null values. Neither copy is working for me because of different spatial reference. Am I doing anything wrong? Thanks for any advice.


title: How to calculate difference in altitude along lines using GRASS?

text: Using SRTM altitude information and OpenStreetmap roads, I want to calculate altitude differences (sum of meters uphill and downhill separated = two values) per road element. What would be the fastest way to achieve this?


title: gdal_grid with CSV file and VRT "No point geometry found on layer"

text: Given the following `.vrt` file which I manually created:               <OGRVRTDataSource>         <OGRVRTLayer name="DGM5_BE">             <SrcDataSource>DGM5_BE.txt</SrcDataSource>             <SrcLayer>DGM5_BE</SrcLayer>             <LayerSRS>EPSG:25833</LayerSRS>             <GeometryType>wkbPoint</GeometryType>             <GeometryField encoding="PointFromColumns" x="x" y="y" z="d"/>         </OGRVRTLayer>     </OGRVRTDataSource>      and the associated `DGM5_BE.txt` \- here are the first lines:               x;y;d     397200;5837250;59,15     397205;5837250;59,04     397200;5837245;59,03     397205;5837245;58,94     397195;5837240;58,93     397200;5837240;58,9     397205;5837240;58,86     397210;5837240;58,9     397190;5837235;58,98      I run the following command to convert the DGM5:               $ gdal_grid -of GTiff -ot Float32 -l DGM5_BE DGM5_BE.vrt DGM5_BE.tif      This fails with the following error message: > ERROR 1: Failed to open datasource `DGM5_BE.txt'.   >  No point geometry found on layer DGM5_BE, skipping.


title: Geoserver and PostGis output

text: I have a peculiar rendering of a small table in PostGis of polygones (imported from a shape file) from Geoserver (layer preview with OpenLayers) ![Default view when clicking on the layer preview from GeoServer admin](http://i.stack.imgur.com/0rMks.png) ![Zoomed in](http://i.stack.imgur.com/Df81H.png) The object are just cloned ... Would you give me a clue on what is going on ? Here is the output of the same table using QGis ![enter image description here](http://i.stack.imgur.com/hm5GZ.png)


title: What expressions for QGIS field-calculator?

text: I do not understand what language I have to use in field-calculator and labels on QGIS: SQL or Python? And where I can find the possible script/expressions to use? in the image you can see the options for expressions in QGIS 1.8 italian version Thanks ![Expressions in Italian version](http://i.stack.imgur.com/0LrmH.png)


title: Hawths tools grid labelling

text: I want to label the grid cells which I create with Hawths Tools in Arcgis 9.3 horizontally instead of vertically. To explain a little more: The program labels the grid cells like this as default:               2 5 8          1 4 7          0 3 6      I want to do this:               6 7 8          3 4 5          0 1 2      Is this possible?


title: ArcPad checkout/in process, only selected features

text: ![enter image description here](http://i.stack.imgur.com/PjbpC.jpg)I am working on developing a python toolbox to automate the steps required for checking data out and back into a file geodatabase. My question is what is the best way to limit the features checked out to only those selected as in the image below, while using the python command line and ArcPad Data Management tools instead of the ArcPad data manager? You can see from the image that only a subset of the feature layers are selected and in the Data Manager the "Only get selected features" checkbox makes it easy. This is important because I want to limit the areas of use and reduce the file size as one of the feature classes is a large parcel map.


title: Finding the best locations for bee hives within a specified area (QGIS)

text: I would like to find fixed positions for bee hives within an orchard to ensure complete pollination of the trees. Is there a way to do this in QGIS? Example: The orchard area is 2 hectares (I have a polygon dataset representing the orchard). 10 bee hives are required to pollinate the area. How would I go about calculating the best positions for the the bee hives to ensure complete bee coverage of the orchards in QGIS?


title: AttributeError: Error in getting tool information when using TableToTable tool

text: I am trying to use the arcpy.TableToTable_conversion tool in my python script, but seem to be getting the following error on the line               arcpy.TableToTable_conversion("FINAL_NLPG", myTempWorkspace,outputTable)      The full traceback is > Traceback (most recent call last): File "", line 1, in File "c:\Program > Files\ArcGIS\Desktop10.0\arcpy\arcpy\conversion.py", line 1463, in > TableToTable raise e AttributeError: Error in getting tool information The variable "FINAL_NLPG" is a table view of a join which contains approximately 999 records (the full table is 4.5 million records). Any ideas on what might be causing the exception? EDIT* _*_ *               for file in list_files:         if file.startswith("Type_15"):             arcpy.CopyRows_management(myDataSource + os.sep + file, r"in_memory\t15") #Row created to get a OID in table             arcpy.MakeTableView_management(r"in_memory\t15","T15_view")         if file.startswith("Type_21"):                 arcpy.CopyRows_management(myDataSource + os.sep + file, r"in_memory\t21")#Row created to get a OID in table                 arcpy.MakeTableView_management(r"in_memory\t21","T21_view")         if file.startswith("Type_24"):             arcpy.CopyRows_management(myDataSource + os.sep + file, r"in_memory\t24")#Row created to get a OID in table             arcpy.MakeTableView_management(r"in_memory\t24","T24_view")              #Join Table 15 with  Table 24 based on USRN     arcpy.AddJoin_management("T24_view", "USRN", "T15_view", "USRN", "KEEP_COMMON")          #Join Table 21 with  Table 24 based on UPRN     arcpy.AddJoin_management("T24_view", "t24.UPRN", "T21_view", "UPRN", "KEEP_COMMON")          arcpy.MakeTableView_management("T24_view","FINAL_NLPG","OBJECTID < 1000","") ## <1000 to see if the code works     arcpy.TableToTable_conversion("FINAL_NLPG", myTempWorkspace,outputTable) # FAILS HERE     arcpy.TableToTable_conversion("FINAL_NLPG", "in_memory",outputTable) #saving to in_memory --- SAME PROBLEM      My source files are CSV's which is the reason i am having to copyrows in_memory to get OID field, as from what i read i cannot do a join on a table that does not have an OID field.


title: Is it possible to rotate the *canvas* in QGIS

text: Can the canvas be rotated so north is pointing in some other direction than defined by the projection? This question answers with respect to the composer, but not the canvas. There is a related 5 year old entry in the bug tracking database that's closed as unnecessary. Is that the current status, or is there a way to rotate the canvas in the newer versions? Creating a new projection is really not the answer


title: Google Maps MarkerClusterer - Remove all clusters

text: So, I have a PostGreSQL DB with 317 datapoints - all spatially enabled through PostGIS. I have queried this using PHP as GeoJSON and overlaid it on Google Maps (using a converting routine). I have also used the MarkerClusterer extension available in google Maps api to cluster all the markers. Now, I want to remove all the clusters from the map, to display other data. How do I do this? My markers are stored in an array called `markers = [];` and the marker clusterer is called like this `markerCluster = new MarkerClusterer(map, markers);`. I'm not able to find the right function to do this. MarkerClusterer link - http://google-maps-utility- library-v3.googlecode.com/svn/trunk/markerclusterer/docs/examples.html


title: SUM Area irregular polygons per grid cell

text: I have a shapefile of irregular polygons and a GRID (both as raster and polygon grid). How can I count the AREA SUM of irregular polygons per grid cell? Can use ArcGIS, QGIS or R. (Application: Nation rasterized into GRID. Question: How much area of what type of protected area in each raster cell?) Thank you, Florian


title: Why does Save as "Rendered Image" change the raster styling?

text: Rasters exported from QGIS (via Save As > Rendered Image) do not retain original styling. See attached. Any thought on how to prevent this error? The top image is exported from QGIS as a .bmp, the bottom is a screen grab from tilemill. Thanks. ![DesiredStyling](http://i.stack.imgur.com/nkqI2.png)![ReturnedStyling](http://i.stack.imgur.com/yi3sN.png)


title: geodjango slowness and debugging

text: I'm using geodjango + postgres to display polygons from tigerline on a map. Pretty simple stuff so far. My issue is that when I use the GPolygon object: django.contrib.gis.maps.google.GPolygon there is a considerable slowdown. (see below for the code I'm using)               locations = Location.objects.filter(mpoly__contains=point)     polygons = []     for location in locations :         for poly in location.mpoly :             gpoly = GPolygon(poly, \                 stroke_color = location.location_type.stroke_color,\                 stroke_weight = location.location_type.stroke_weight,                 stroke_opacity  = location.location_type.stroke_opacity,\                 fill_color = location.location_type.fill_color,\                 fill_opacity = location.location_type.fill_opacity)             gpoly.location = location.id             #raise Exception(gpoly)             polygons.append(gpoly)     # Google Map Abstraction     #raise Exception(len(polygons))     the_map = GoogleMap(polygons=polygons)        * all of my location's mpoly are MultiPolygons   * there are only 84 polygons total when I `raise Exception(len(polygons))`   * this tiny block of code is incurring a 10 sec load time on localhost w/ 4gig ram and an i5 proc... I'm not resource locked Does anybody have any idea what GPolygon is doing? Is GPolygon not ideal for production? is it just for prototyping? # EDIT I'm now setting up my GPolygon like so:               gpoly = GPolygon(poly.simplify(float(get_tolerance(poly.num_points))), \         stroke_color = location.location_type.stroke_color,\         stroke_weight = location.location_type.stroke_weight,         stroke_opacity  = location.location_type.stroke_opacity,\         fill_color = location.location_type.fill_color,\         fill_opacity = location.location_type.fill_opacity)      using the function:               def get_tolerance(num_points) :         """figure out a good tolerance"""         tolerance = 0         if num_points <= 500:             tolerance = 0         elif num_points <= 750:              tolerance = .001         elif num_points <= 1000:              tolerance = .002         elif num_points > 2000:              tolerance = .007              return tolerance      which sets a tolerance for the simplify geos function based on the total number of points (I noticed that for things like florida where the keys(islands) are separate polygons that the ones with fewer points broke with a high tolerance, while the big main landmass polygons are too huge without simplifying to a large degree. This has made my program a magnitude faster BUT I still think there is tons of room for improvement. Which leads me to my newest questions:   * Is there a better way to guess acceptable tolerances?   * What other possible speed gains could I explore? # UPDATE Something i did was pass all of the polygons to the view as geojson objects and use JS to build the polygon objects which is way faster than `django.contrib.gis.maps.google.GPolygon`. Server side python:               @csrf_exempt     def get_location_polygons(request):         """Returns a civic location name from a geodetic point"""         response_data = {'ack':None,'data':None,'messages':[]}         if request.method == 'POST':             #try :             # Get the location             location = Location.objects.get(pk=request.POST['location_id'])                  # Build the polygons             response_data['ack']            = True             response_data['messages'] = _(u'OK')                         response_data['data']           = {                 'stroke_color'      : location.location_type.stroke_color,                 'stroke_weight'     : location.location_type.stroke_weight,                 'stroke_opacity'    : location.location_type.stroke_opacity,                 'fill_color'            : location.location_type.fill_color,                 'fill_opacity'      : location.location_type.fill_opacity,                 'polygons'              : location.mpoly.geojson,                 'title'                     : location.title             }             #except :             #   # Fetch failed             #   response_data['ack']            = False             #   response_data['messages'] = [_(u'Polygon for location could not be fetched.')]         else:             response_data['ack']            = False             response_data['messages'] = [_(u'HTTP Method must be POST')]              return HttpResponse(json.dumps(response_data), mimetype="application/json")      Client side JS:               poly = JSON.parse(data.data['polygons'])     var paths = coord_to_paths(poly.coordinates, bucket, location_id);     polygons[bucket][location_id] = new google.maps.Polygon({          paths                   : paths,          strokeColor     : data.data.stroke_color,          strokeOpacity   : data.data.stroke_opacity,          strokeWeight    : data.data.stroke_weight,          fillColor           : data.data.fill_color,          fillOpacity     : data.data.fill_opacity     });     function coord_to_paths(coords, bucket, location_id)     {         var paths = [];          poly_bounds[bucket][location_id] = new google.maps.LatLngBounds();         for (var i = 0; i < coords.length; i++)         {              for (var j = 0; j < coords[i].length; j++)             {                  var path = [];                  for (var k = 0; k < coords[i][j].length; k++)                 {                      var ll = new google.maps.LatLng(coords[i][j][k][1], coords[i][j][k][0]);                     poly_bounds[bucket][location_id].extend(ll);                     path.push(ll);                  }                  paths.push(path);              }          }              return paths;            }


title: Packing Polygons within polygon

text: I have a Boolean raster. In the grey areas of the raster I would like to fit a given size polygon within a contiguous extent. ![](http://i.stack.imgur.com/bphCe.jpg) ![](http://i.stack.imgur.com/QroD3.jpg) Basically, I have an irregular polygon, and i would like to "fit" a known polygon within the extent of the irregular polygon as many times as possible. Direction of the polygon does not matter, and it could be a square. I would like for it to fit graphically, but if it just attached a number to the polygon (# that fit) that would work as well. Using Arcgis 10.


title: ArcMap: Not scaling and/or rotating when exporting a map

text: I am writing a console application using ArcGIS (engine or desktop). I'm trying to rotate and scale a map based on a polygon, and I'm not having any luck at all. With some tinkering, I can usually do one or the other but not both. Anybody have any suggestions? I feel as though I've tried every variation in terms of rotating the map and adjusting the scale either using the Imap interface, or the IActiveView interface.                   Private Sub Zoom2AndExportJpgs(mapDocument As IMapDocument, imagePath As String)         'Get the relevant strip maps for the route         Dim map As IMap = mapDocument.Map(0) '(assumed that there is only one map in the mxd)         Dim pageLayout As IPageLayout = mapDocument.PageLayout         Dim pageAV As IActiveView = pageLayout         Dim mapAV As IActiveView = map         Try             'get a list of strip map objects... EF object containing a list of the 4 corners of a polygon             Dim stripmaps As List(Of MRLAStripMapExtent) = getStripMaps()             Dim filename As String = ""                  'get all the associated stripmaps for the route  for each scale             If Not stripmaps Is Nothing Then                 For i = 0 To stripmaps.Count - 1                     Dim pgon As IPolygon = geometryHelper.CreatePGON(stripmaps(i).RectLowerLeftX, stripmaps(i).RectLowerLeftY, _                                                                                stripmaps(i).RectLowerRightX, stripmaps(i).RectLowerRightY, _                                                                                stripmaps(i).RectUpperLeftX, stripmaps(i).RectUpperLeftY, _                                                                                stripmaps(i).RectUpperRightX, stripmaps(i).RectUpperRightY)                     filename = imagePath & stripmaps(i).ZoomScale & stripmaps(i).PageNumber & ".jpg"                     CreateJpgFile(filename, mapAV, pageAV, pgon, stripmaps(i).ANGLE, stripmaps(i).ZoomScale)                      Next i             End If              Catch ex As Exception             publishError.PublishError(publishError.ErrorSeverity.majorStopRouteProcessing, ex)         End Try          End Sub          Private Sub CreateJpgFile(ByVal sFilename As String, ByVal pAV As ESRI.ArcGIS.Carto.IActiveView, _                               ByVal pPageActiveView As ESRI.ArcGIS.Carto.IActiveView, _                               ByVal pgon As IPolygon,                               rotationAngle As Double, _                               mapScale As Double)              Dim pExport As ESRI.ArcGIS.Output.IExport         pExport = New ESRI.ArcGIS.Output.ExportJPEG              pAV.Extent = pgon.Envelope         pAV.ScreenDisplay.DisplayTransformation.ScaleRatio = mapScale         pAV.ScreenDisplay.DisplayTransformation.Rotation = rotationAngle '0         pAV.Refresh()              'Export Image....         pExport.ExportFileName = sFilename         pExport.Resolution = 96         Dim exportRECT As ESRI.ArcGIS.esriSystem.tagRECT         exportRECT = pPageActiveView.ExportFrame         Dim pPixelBoundsEnv As ESRI.ArcGIS.Geometry.IEnvelope         pPixelBoundsEnv = New ESRI.ArcGIS.Geometry.Envelope         pPixelBoundsEnv.PutCoords(exportRECT.left, exportRECT.bottom, exportRECT.right, exportRECT.top)         pExport.PixelBounds = pPixelBoundsEnv         Dim hDC As Integer         hDC = pExport.StartExporting         pPageActiveView.Output(hDC, pExport.Resolution, exportRECT, Nothing, Nothing)              'Finish writing the export file and cleanup any intermediate files.         pExport.FinishExporting()         pExport.Cleanup()     End Sub


title: how do I get the "outer mantle" of a polygon shape file? (without joining all the polygons)

text: I am interested in finding all the vertices of all polygons which are not on the inside the most outer polygoin that can be formed in a shape file: Here is how I get all the vertices:               def __init__(self,shapeFilePath):         driver = ogr.GetDriverByName('ESRI Shapefile')         self.LandUses = []         self.Codes = [] #Store Categories         self.NPolygons = 1 # number of polygons in layer         self.dataSource = driver.Open(shapeFilePath, 0)         self.layer = self.dataSource.GetLayer()         self.NPolygons = self.layer.GetFeatureCount()         self.Boundaries = [""]*self.NPolygons   # store vertices of each polygon               for polygon in range(self.NPolygons):             area = self.layer.GetFeature(polygon)             Name = area.GetField(0)             Kategorie = area.GetField(1)             self.LandUses.append(Name)             self.Codes.append(Kategorie)             geometry = area.GetGeometryRef()             boundary_raw = str(geometry.GetBoundary())             #remove tail and head             boundary = boundary_raw[12:-1]             boundary = boundary.split(',')             #print boundary             #lenboundary = len(boundary)             #convert each coordinate from string to float             for x, point in enumerate(boundary):                 boundary[x] = point.split()             boundingvertices=np.asarray(boundary, dtype=np.float64)             self.Boundaries[polygon] = boundingvertices      But now I am stuck with a lot of vertices, and I don't know how to get the "mantle", here is a picture displaying what I need: ![A Sample layer showing multiple polygons](http://i.stack.imgur.com/cn3v3.png) Before I go hacking my own solution, I'd like to know if the GDAL Gods have been kind and made something like this already. Thanks a bunch! Oz UPDATE: Found something call convex hull ... not sure, but testing...   UPDATE #2: Of course one could just join all the polygons ...


title: Python method for finding a substring within a string

text: I converted a KML to a feature class and no longer have access to the symbology set in the original KML. I'm trying to re-create this by creating a new field that stores identifying information useful in creating the layer symbology. There are three different 'keywords' in the original attribute table that would be useful in a control structure that determines the appropriate symbology type. I need to search the string for these keywords, but I'm having trouble. **The sample code below is just to get the control structure working -- I know I need to use an update cursor to change / add field addtributes.** Here is my code:               # Import ESRI Python module     import arcpy          # Declare variables used in this script     #featureClass = r'C:\arbitraryLocationOnDisk'     oldField = 'FolderPath'     newField = 'HabitatType' # Restricted by domain: HabitatType                                 #  1. Critical Habitat                                 #  2. Corridors and Key Habitat Areas                                 #  3. Global IBA's          rows = arcpy.SearchCursor(featureClass)         for row in rows:             fieldValue = row.getValue(oldField)                  if fieldValue.find('Global'):                 print 'Global IBA'             elif fieldValue.find('Corridors'):                 print 'Corridors and Key Habbitat Areas'             elif fieldValue.find('Critical'):                 print 'Critical Habitat'             else:                 print 'Unrecognized habitat type: ' + fieldValue             del fieldValue     except:         arcpy.GetMessages()     finally:         del rows      **The problem I'm experiencing is that after every single row, I'm getting 'Global IBA' despite the fact that not every row contains the substring 'Global'.**


title: ESRI.style file not loading on citrix

text: We have a distributed ArcMap application on a citrix farm. We've come across a strange problem where the ESRI.style doesn't load. If you create a session, you can then go through the style manager and load the ESRI.style file, which is there, and it's fine. However, if you shut down, the next time you start, the same problem exists. There's no real logic to it. Has anyone come across this before? I have edited this for a bit of clarity, and now I am thinking with my mouth, but I am starting to think if the user is setting the style back in the citrix session, that is why it is not being saved, so it actually needs to be done on the instances on the Citrix farm, if that makes any sense?


title: Use Arcgis.com map package as a web map?

text: In Arcmap 10 there is a menu item to create a map package and upload to Arcgis Online ( _File > Create Map Package > upload to..._ ). That works fairly smoothly, if a tad slow sometimes. However once placed in system it seems the only way to access the map is to download the map package. What we really want to do is create the map in Arcmap Desktop, upload to Arcgis Online, and then embed that map in a website. If we take exactly the same data and create the map on the website, upload the feature classes individually, apply styling and symbology using the website tools, share, and so on. The resulting map can be opened in a) Arcgis.com map viewer, b) ArcExplorer, and c) Arcmap Desktop. In the "My Content" page a map created from Arcmap Desktop is listed as a "Map Package", and a map created entirely using the website is a "Web Map" (what we want). Am I missing something or is this really the way it's supposed to work? If so it's a terrific duplication of effort.


title: GIS-based reporting and maintenance tool

text: ## Background Conceptually, I am looking for a tool, or suite of software tools that can be readily integrated to help browse data using a GIS-based map (such as Google Maps). The proposed architecture resembles, but is not limited to, the following: ![](http://i.imgur.com/5uMNf.png) The technologies shown above are not fixed. For example, if OpenGEO can eliminate many of the components while adding others that are not listed (such as authentication and authorization), that would be most helpful. Essentially, the architecture boils down to:               Map -> Filter sites -> Select sites -> CRUD      And:               Map -> Filter sites -> Select sites -> Summary Reports      The following sections describes these two problems in more detail, using a hypothetical (broad-brushstroke) example. ## Problem - CRUD In the first screen, the user is prompted to filter by some arbitrary criteria (team names, regions, skills, equipment, and more) and select some sites: ![](http://i.imgur.com/e6ERc.png) The sites that match the filtered options are shown on the map and the user is then presented with a number of options that can be used to edit data: ![](http://i.imgur.com/UVZ8n.png) If the user chooses Personnel, the system provides a CRUD screen: ![](http://i.imgur.com/c6TIl.png) The CRUD screens can be fairly complex, having simple code tables to drive them, such as: ![](http://i.imgur.com/ZajxE.png) ## Problem - Report The second part of the problem is very similar to the first, but instead of visiting CRUD screens, the user can choose to generate reports: ![](http://i.imgur.com/iWSEn.png) Note that the user has already selected the sites for reporting. If the user selects the equipment option, a report is generated with summary data: ![](http://i.imgur.com/wYjQa.png) ## Question What off-the-shelf software tool(s) can provide most (if not all) of these features? Note: The interaction need not be exactly as shown, but the main use cases must be possible. ### Use Case 1 - Populate Database   1. Define regions on a map.   2. Put sites [building locations] on a map.   3. Insert data (for each site). ### Use Case 2 - Selection   1. System shows a map.   2. User filters by region and other criteria.   3. User selects sites.   4. System provides options (maintenance or reports). ### Use Case 3 - Maintenance   1. User selects maintenance.   2. System presents complex CRUD.   3. User can add, edit, or delete data. ### Use Case 4 - Reports   1. User selects report.   2. User selects type of report to generate.   3. System generates summary report.


title: IFSAR bad stripping in some spotting areas

text: I have a co-worker that was working on do some analysis on IFSAR and he clips them to quads. He said that there are 6 quads that came up bad stripping. Is there a way around to clean it up the bad stripping? I explained to him that there are possibility that are 2 reasons for that is the that airplane it flew may have shift the bad stripping or the area that may have artifacts. Thanks


title: ESRI File Geodatabase - Trying to use CURRENT TIME in Definition Query

text: Is it me, or are the date functions in the file geodatabase a total nightmare. Anyway, I am trying to set up a fairly simple definition query that contains a subquery with a date comparison. My definition query looks like this:               "OBJECTID" IN (SELECT "assetid" from dummydata WHERE "restoretime" < CURRENT_TIME)      According the ESRI SQL Reference, the current time function is defined as CURRENT TIME (no underscore) but that breaks the definition query altogether. With the underscore, I dont get any errors, but the selection set is always null. Every row in dummydata has a restoretime value set which is definitely older than the current time. What am I doing wrong here? FYI - ArcMap 10 SP4 UPDATE: Some sample rows from the dummydata table               OID     assetid     outagetime               restoretime     1            1      5/10/2012 3:06:59 PM     5/10/2012 3:07:04 PM     2            2      5/10/2012 3:06:59 PM     5/10/2012 3:09:14 PM


title: Looking for QGIS Presentation info

text: I'm preparing a presentation of QGIS to release of the brazilian QGIS user guide. Thus, I would like insert some information about QGIS in global scale. Something like Tim's qgis-for-humanity presentation, but with updated information. I'm very pleasure if you have something in this direction to send me.


title: Adding Record to Related Table using JavaScript API

text: I looked and didn't find this question so hopefully it isn't a repeat. I am new to the JavaScript API and just started creating a web application where the user will enter maintenance records for a street light. The street lights are shown as points on the map, and the maintenance table is a related table that in joined to the street light based on the street ID. When the user clicks the street light, a pop up currently appears with information of the street light. I also have a button (that currently does nothing) and that the user will hopefully be able to select to bring up a window to enter a new maintenance record for that street light. However, I am not sure how to precede with this. Doing some looking, I have seen there is a EDITOR widget, but that seems to be for adding features that have geometries. However, my records will not have geometries. Thanks for any help, and please ask any questions if my question was not clear enough.


title: How to write FIDs of points within each polygon to polygon field?

text: I have two feature classes one with points one with polygons (in ArcGis 10.2). Now, I want to write into a String Field of the polygon layer a list of all the Point-FIDs that are within each polygon (often more than one, which is why join doesn't help). I was hoping that there is a possibility using Field Calculator and somehow concatenate the FIDs. But I don't know how to access the other feature class within the calculation code - is that possible? Also a Python code would be appreciated or anything else...


title: Creating noise maps using ArcGIS for Desktop or Open Source Desktop GIS?

text: In a previous role I helped create Noise Maps for Northern England. The predicted noise levels was done using the IMMI package (which I can recommend) and the cartographic output was done in ArcMap. There are also other packages such as LimaArc which have tighter integration with ArcMap. ![enter image description here](http://i.stack.imgur.com/8ldr9.jpg) I want to take on a personal project to try and create noise maps for large urban areas in Australia. I am interested in both mapping noise from traffic (roads, trams, rail), maybe having a stab at aircraft noise and also looking at how the noise from level crossing bells can be heard by surrounding residents. As its for self development purposes, I have no budget for buying dedicated software like LimaArc or IMMI. I was wondering **if anyone in the GIS-SE community has found a way to create noise maps in a similar approach to how IMMI/LimaArc does?** \--EDIT-- I had a play with the noise module for OrbisGIS (user16714 answer and comments below), but had some problems getting it to work - looks like it has a lot of potential but still has to be installed against a beta version and not entirely sure how well it will handle larger datasets. (Will post back if I get further with this). Ideally I really want to do this all in ArcGIS or a more established open source package (QGIS, Grass, SAGA, etc) Have seen some papers that mention tools to do this in ArcGIS, but cant source any scripts/tools as of yet. **Has anyone seen any scripts (python) or free extensions where this can be achieved directly in ArcGIS?**