title: I can't seem to use arcpy.mapping print command. It's not displaying the mxds in the loop

text: Here's the code for the third parameter that list the local printers:               # Third Parameter     printer = arcpy.Parameter(         displayName="Select a Printer",         name="printer",         datatype="String",         parameterType="Required",         direction="Input")     # Set a value list for the available local printers     printer.filter.type = "ValueList"     printer.filter.list = arcpy.mapping.ListPrinterNames()      This works and lists all of my local printers. The problem is it can't print the looped MXDs. It looks like python can't find them in the loop according to my arcpy.AddMessage(). Here's the code:               # Get inputs     InputMXD = parameters[0].valueAsText     PDF_Folder = parameters[1].valueAsText     printer = parameters[2].valueAsText          # Set workspace as defined by user     #env.workspace = PDF_Folder     arcpy.env.workspace = r"c:/temp"          #List Names for Inputs     arcpy.AddMessage("PDF_Output: "+PDF_Folder)     arcpy.AddMessage("Printer Name: "+printer)     arcpy.AddMessage("MXDs before Loop: "+InputMXD)      ![enter image description here](http://i.stack.imgur.com/bvf7E.png) MXDList = arcpy.ListFiles(InputMXD) arcpy.AddMessage("After MXDList") arcpy.AddMessage(MXDList) for MXDPath in MXDList: arcpy.AddMessage("MXD Path: " + MXDPath) MXD = arcpy.mapping.MapDocument(MXDPath) arcpy.AddMessage("MXD: " + MXD) arcpy.mapping.PrintMap(MXD, printer) ArcMessage It's showing the mxds before the loop, but it isn't printing them once the loop hits. Any ideas? It's showing "[]" when it should be showing what's in the "MXDList". * * * Update 2 When I use this:                MXDList = glob.glob(os.path.join(InputMXD, '*.mxd'))      I got the same result as the image above. It's still not running through the loop. Here is my parameter setup for the InputMXD.                   # First parameter         InputMXD = arcpy.Parameter(             displayName="Input MXDs",             name="InputMXD",             datatype="DEMapDocument",             parameterType="Required",             direction="Input",             multiValue=True)      When I use this code with workspace set to my InputMXD:                   MXDList = arcpy.ListFiles("*.mxd")      I get this result. It doesn't want to list my MXDList.   ![enter image description here](http://i.stack.imgur.com/MMHIo.png) * * * Updated 3 When I try the newest code with the AddMessage and put my printing code below it the results say this. ![enter image description here](http://i.stack.imgur.com/YWVne.png) Traceback (most recent call last): File "", line 104, in execute File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\arcobjects\mixins.py", line 609, in **init** assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename") AssertionError: Invalid MXD filename.


title: How to auto-update WFST store with GeoExt/Openlayers?

text: I built an WFS-T with a grid panel (Ext.grid.EditorGridPanel) to edit features' attributes. Now, I want the feature store (GeoExt.data.FeatureStore) to reload/update automatically so that other users see changes committed immediately without reloading the whole webmap. I would appreciate hints for:   1. Attaching such an "update store" function either to my "save"-button or to my store's "afteredit"-listener   2. Having the whole store updated continuously in an automatic way


title: Why doesnt QGIS show the results from a WFS BBOX from a python script

text: I'm trying to figure out how to do get requests in QGIS using a bbox. I can get a bbox to clip a layer when I paste my uri into a browser but the EXACT same uri returns an empty layer in QGIS. A simple easy to try specific example: The following uri returns 4 features when pasted into my browser.               http://ogi.state.ok.us/geoserver/wfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=ogi:quad100&BBOX=-100,37,-99,38,EPSG:4326&SRSNAME=EPSG:4326      However the following lines create an empty layer (either pasted in to the console or run as a script)               sourceUri = "http://ogi.state.ok.us/geoserver/wfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=ogi:quad100&BBOX=-100,37,-99,38,EPSG:4326&SRSNAME=EPSG:4326"     vlayer = QgsVectorLayer(sourceUri, "QUADS", "WFS")     QgsMapLayerRegistry.instance().addMapLayer(vlayer)      Interesting to note that without the crsurl I need to swap the lat/lon order to correctly clip data in the browser. with or without the crsurl and which ever lat/lon order I use in QGIS I still get an empty layer. As far as I can tell my uris are correct (They certainly generate a correct result in a browser) So why Doesn't QGIS get any data? It would be a shame to have to write my own HTML/XML post/parse script in python just because I'm missing some small aspect of QGIS


title: Vector to Raster for Smoothing purposes

text: I have a vector file that represents transit scores by CT of a city. It shows harsh boundaries where one CT has great access to transit and right beside that CT is one that has extremely poor access. I want to smooth these boundaries so as to blur these hard differences. Is this appropriate? If so should I convert vector to raster, and resample to a larger grid size using bilinear method? I want to maintain the score value for future analysis. **EDIT** Would the Smoothing Edge Zones (http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Smoothing%20zone%20edges) be a more appropriate method to use?


title: Why were Series variables of ModelBuilder removed at ArcGIS 10.0?

text: I've read a number of posts regarding the sequential batch processing of a model in ArcGIS. In particular this one, because I'm having the exact same issue. Recently, I found an old 9.3 help page that shows that ArcGIS at one time supported a type of value called a series which is missing from the current 10.2 dialogue in model builder. It appears that what I need to achieve my sequential processing of multiple input parameters for my model is what was once called a "series value" in 9.3. I'm just wondering if anyone knows what happened to this and if there is some way to achieve the same thing in 10.2? It's hard to believe that Esri would take functionality out of more recent versions.


title: how does one reset map.fitbounds (zoomtofeature()) to the original zoom?

text: I have a lovely map setup using Leaflet with MapBox tiles (only). It is a United States map with polygons for each state with an onclick event to zoomToFeature. The basic zoomToFeature() function from the tutorials does exactly what I want on the way in, but is there a similarly easy way to zoom out to original zoom? I guess I could set a global variable to hold the state on the first event, and do an if inside zoomToFeature to either zoom or pull back, I just wonder if there is already some code that does this more elegantly. Specifically for it to zoom out to exactly where the map was. Not only to the original zoom level, but also the original center.


title: Definition query that returns based on date in arcgis

text: I was wondering if anyone knew how to build a definition query in Arcmap 10.0 that returns only features that are f.e. only 7 days old. I have a SDE geodatabase with polygons, each with a "date"-field (format yyy-mm-dd). I would like to select these features based on their age: > Output 1 ; Last 7 days > > Output 2 ; Last 14 days > > Output 3 ; Last 30 days > > Output 4 ; Last year > > .... Thanks in advance


title: How to (image) capture map and copy it to clipboard using QGIS?

text: Essentially, I want to copy a map to clipboard (not `Save as Image`).


title: How to get started with mapping the flow of gas pipe network using GIS?

text: I'm looking for some specifications, whitepapers and any other related material about urban gas pipe networks in particular about geometric network rules that are special to gas flow.


title: Find intercept WGS84 coordinates between two segments defined by (Lat1-Long1 and Lat2-Long2) and (Lat3-Long3 and Lat4-Long4)

text: I need to determine the WGS84 coordinates for a point that is defined by the interception of two segments represented by two sets of WGS84 coordinates each (lat1-long1, lat2-long2) and (lat3-long3, lat4-long4). Is there a free application that I might be able to use or even an excel formula?


title: Unregistering Addin using ESRIREGADDIN

text: I am struggling to find right syntax for unregistering addin using a bat file. path=%path%; "%CommonProgramFiles(x86)%"\ArcGIS\bin\ESRIRegAddIn.exe {5980f3b2-f335-47c4-bfd4-bfa181dd9c4d} /u Problem here is that some times (very few times) it seems to work. However, most of times it doesn't. You can say you can simply delete the folder. However, what if the user keeps the addin in non-standard location. However, I could install using bat file successfully. So, I appreciate your response. Alternatively, is there a way to programatically access additional folder locations user specified in add-in manager? It allows me to search for apps in those locations. Is there any best way to tell if your add-in is installed on the user machine programmatically. With classic com extensibility, you can look in registry to retrieve whether an application is installed and where it is located. However, with add-in nothing would be added to the registry. It loads all the applications when arcmap is opened. So, what is the best approach. I opine that above two options are the way to go. Please let me know if you have any better recommendations. Thanks in advance.


title: How to read pixel values from an image server layer with ArcObjects?

text: I'm having a problem with reading pixel values from the image server layer. The image server layer class implements IRasterLayer, so when I tried to read pixel values using `IRaster2` obtained through the `IRasterLayer` implementation, I could read pixel values. However, these pixel values are sometimes one pixel shifted because there are two rasters in the layer and their pixels are not lined up perfectly. `IRaster2` only accepts one row & column pair, which means that it doesn't take into account multiple raster sources in the image server layer and, if their pixels are not aligned perfectly, just one row & column counting from the upper left corner of the layer cannot read the original pixel values from the data sources. I tried to access individual rasters stored in the attribute table of the image server layer (Raster column), but it returns null. For example, the following line returns null:               ((IAttributeTable)imageServerLayer).AttributeTable.GetRow(id).Value[rasterFieldIndex]      In ArcMap, I can access each row's raster data in the attribute table. The Identify tool in ArcMap doesn't have this problem and it can read original pixel values from individual raster sources. I'm sure there should be an easy way of accessing source rasters in the image server layer. Or there should be a recommended method for reading pixel values from the image server layer.


title: How to create a network from nodes and boundaries?

text: I have a table of nodes (points) and i wish to route between the points. Its my understanding that i first need to build a pgrouting compatible topology (graph ?) that connects all the nodes using "source" and "target" fields. I was just wondering what tools i can use to generate this topology ? assign_vertex_id doesn't seem to work. I'm using postgis on a postgresql database. edit: The nodes are basically points in free space (water), so there aren't any lanes as such. The only constraints are land mass boundaries.


title: How to test for multiple map items in Composer using python?

text: I am building a QGIS plugin and I need to check for multiple maps items in Composer that works on all platforms. Currently I am getting the first map in the composition using the code below, but would rather have something which tests for multiple map items:               composerList = self.iface.activeComposers()     composerView = composerList[0]     composition = composerView.composition()     map = composition.getComposerMapById(0)


title: Can I display cloudmade tiles in arcmap 9 or arcmap 10?

text: I have created a number of cloudmade maps which I use in my opensource webstack using openlayers. I have been asked if the `cloudmade maps` could also be shown in ArcMap, but have not seen any way to be able to do this? Does anyone know if this is possible with a normal ArcGIS (arcview) licence? thanks, Robert


title: how to calculate RMS 2D and RMS 1D, using python?

text: I would like to calculate: RMS 2D: standard deviation for the two coordinates of flat (67% confidence level) and   RMS 1D: standard deviation for height (67% confidence level)   What is the formula and what parameters do I need for dual frquency survey grade receiver?   At the moment I haves something like:                 import math     spaceSegment = 0.4      controlSegment = 3.5      tropo = 0.2      iono = 0.4      multipath = 0.6      receiver_error = 0.3          hdop = float(raw_input("Enter hdop "))          vdop = float(raw_input("Enter vdop "))          ure = math.sqrt(spaceSegment**2 + controlSegment**2)      uee = math.sqrt(tropo**2 + iono**2 + multipath**2 + receiver_error**2)      uere = math.sqrt(ure**2 + uee**2)          horizontal_error = 2. * hdop * uere    #2D horizontal position error     vertical_error = 2. * vdop * uere    ##Vertical Position Error      ...but I cannot find gps error budget for survey grade receivers nor formulas for 67 and 68 percentage calculation.   Is any simple way for my computation?      Above computation is taken from matlab gps toolkit I rewrited in python but it refers to gps budget for single frequency receiver.   I also have two formulas:   ![enter image description here](http://i.stack.imgur.com/K5Avw.gif)   and   ![enter image description here](http://i.stack.imgur.com/Xzgf4.gif)    and their decription:   Compute the rms of the radial errors, i.e. the linear distances between the measure and known (or mean) positions. It can be predicted by using covariance analysis by multiplying the HDOP, a measure of the satellite geometry, by the standard deviation of the observed pseudoranges. This predictability makes it a much more convenient measure in practice.   ...so then I am completely confused and any help will be appreciated.


title: making a mask with arcmap 10

text: I have a grid layer and a shapefile representing a closed boundary. I need to make a new grid as big as my current grid but with values equal 1 inside the closed boundary shapefile and -999 for grids outside the closed boundary. Would any body help me with this using arcmap 10? Thanks a lot.


title: Why is there a black hole in the Heatmap?

text: After running the Heatmap tool in QGIS I like to color the geoTiff according to my wishes. Using Psuedo color works fine, but it leaves me with no options, as type of color scheme or transparancy on certain values, however chosing color-map instead of psuedo creates a black hole hole right in the middle, where the intensity (heat) should be strongest. Doesn't matter how I classify, 5, 10 or 20 classes... ![enter image description here](http://i.stack.imgur.com/Ii2ko.jpg)


title: How to make some constraint to be evaluated first in mysql?

text: SELECT BusinessID     FROM       tableauxiliary     WHERE       MBRContains(             GeomFromText (                 'MULTIPOINT(-6.1928749092968 106.7651250907,-6.1771250907032 106.7808749093)'                 ),                 Latlong)           AND MATCH (FullTextSearch) AGAINST ('res*' IN BOOLEAN MODE)     AND Prominent >15       I want MBRContains restriction to be executed first because it's far more restrictive. But mysql optimizer uses the FullTextSearch first. I ended up using subquery to force MBRContains to be executed first. I want easier way.


title: How to zoom to object on WMS layer with OpenLayers?

text: I have a map with WMS layer. And want to zoom to selected object. Now i use `GetCapabilities` from Geoserver and zoom to bbox of whole layer.   So how to do what i want? Or can u tell me how to get feature bbox from Capabilities? Or how to get FeatureInfo without clicking on map? **UPDATE**                                      info_id=myVecLayer.getFeaturesByAttribute("id",'5')                            alert(info_id[0].geometry.getBounds());                            app.mapPanel.map.zoomToExtent(info_id[0].geometry.getBounds());                            //myVecLayer is WFS layer      Its do something strange. If feature shows in map window it will be zoomd to it. But if not shows get a error `TypeError: info_id[0] is undefined`. What is wrong? **UPDATE 2** Ok now this is Request method                                       info_id=OpenLayers.Request.GET({                                         url:'http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=cite:filedata_temp&featureID=filedata_temp.4',                                         success: function(e){                                         alert(e.responseText);                                         }                                     });      its ok. But how to get bbox from there? **UPDATE 3** Now i use a GeoExt.FeatureStore to zoom to feature.   But i have a problem i try `zoom_store.layer.getFeaturesByAttribute("id",'5');` and all work. But if i use variable `zoom_store.layer.getFeaturesByAttribute("id",some_variable);` i get error `TypeError: info_id[0] is undefined`. Why its heppening?


title: How to simulate moving vehicles?

text: I have a point layer (stored in SQL Server 2008) that is being served up by a map service in ArcGIS Server 10.1. I am consuming this service in a web client. Lets say the points are boats out at sea.   This is mock data, but I want to simulate these boats moving around in a logical pattern. At the moment, I have an arcpy script that updates the X,Y within a bounding box, and also updates two fields for speed and direction (which the layer is symbolised by) This is all done using the random module from Python. It works fine, but does not look realistic. I have formulated some ideas about having a LUT, with X,Y, Speed, Direction, for each 'boat' that could be referenced to update by. However, this must have been done before, but I have yet to find any examples. I would prefer not to spend development time to try to re-invent the wheel, so was wondering if anyone had a similar script for achieving this that they could share as an answer for all? _//EDIT IN RESPONSE TO COMMENTS_ Reason I choose boats, as its not essential for them to be following a path such as a road. The simulation does not need to be 99% accurate on how the (insert moving something) actually moves around in the real world, but does simulate movement. Perhaps if the answer was using a pre-cooked LUT, then the paths could be defined beforehand?


title: Assigning unique Asset ID's

text: I have a layer with street lights on it and they all have unique asset ID numbers assigned to them already. Our data collectors are re-picking up all these street lights again but this time it will have all attribute information we need. So my question is: Is it possible to transfer that unique ID from the old layer to the new layer? There will be 2 point features that are pretty much the same x,y coordinates. Could it be possible to spatially relate them or something? Im not a GIS expert, just do a little data management and cartography stuff. Any help would be great, because at this point all I can think of is manually copying and pasting the ID numbers into the new attribute table. That could take me long long time. There's got to be an easier way. Thanks for looking!


title: extract lat/long from screen when using British National Grid projection

text: Using ArcGIS 10, is it possible to click anywhere on the map (projected to British National Grid), but return the coordinates in WGS84 lat long? Alternatively, when will Streetview work with OS Eastings and Northings?


title: How to programatically add KML Icons to Placemark generated from SimpleFeatures using GeoTools?

text: I have successfully generated a set of (unstyled) placemarks in a KML file using the GeoTools framework, and the Encoder class. The file renders fine in Google Earth with standard balloon placemarks. I now want to add some iconstyles to my file. Can anyone give me some guidance here? What is the best way to programatically declare the icons/iconstyles and give each placemark a reference to the corresponding icons? I know the KML syntax for this, but how do I declare/generate this with GeoTools, and make the Encoder class do the final job?


title: Multiply vector categories

text: I have imported a Vector map into GRASS GIS. There are some problems with the topology and some polygon areas overlap. I used v.clean to break overlapping polygons and now I have multiple polygons mapped to the same category in the attribute table. Is there any way to convert this feature to category mapping so that each feature maps to a separate category? I don`t care I have duplicate information in the attribute table. All I want is that starting from the original vector map, that has 1000 features and 1000 corresponding records in the attribute table, after running v.clean and obtaining 1500 features to have 1500 records in the attribute table. Can this be done? Thank you.


title: What does it mean to QI and how is it done?

text: I'm new to Esri's Arc* interfaces, and trying to figure out how to register an existing table using the ArcObjects API. The following question answers this to some extent: Is there any way to write a snipet of code with function of "SDELayer -o register" command > Maybe the IClassSchemaEdit.RegisterAsObjectClass method will help (see the > GeoDatabase OMD). You should be able to QI it from an ITable, opened in the > usual fashion (e.g. IFeatureWorkspace.OpenTable(in Name: String) since > you've already built your GDB). But there is some terminology used that I don't understand. Specifically, what does it mean to QI something, and how is it done? This other question's answer defines QI, somewhat vaguely, as Query Interface (hopping) but goes no further. How do you navigate the ArcObjects OMDS? > It really helps if you know UML. In the class that I had in college the > professor called it QI (Query Interface) hopping. The Getting To Know > ArcObjects book has a nice break down of how to work with the diagrams. I'm using Java - is this a .net thing?


title: Looking for options to use Mapfish with PHP

text: I recently installed MapFish on my test server and started to play around with. As I'm not that good in python/pylon I'd prefer to work with that framework with PHP. I read that it is possible with sfMapfish which is a connector to the symphony-framework for PHP. Symphony is quite a strong framework, so I'm open to use it. My questions are:   1. Has anyone used sfMapFish already and can show me a good tutorial to see how to start?   2. Is there another PHP Framework for MapFish (as sfMapfish hasn't been updated for over a year)? Thank you! Martin


title: Need Projection Help to Buffer Lines in QGIS

text: I am somewhat new to GIS in general, and very new to QGIS specifically (I took one class and we used Arc, which I don't have access to any more). I need to create buffers (1km, 3km, and 5km) around the rivers of this shapefile from NOAA, something I remember being relatively simple in my GIS class. However no matter what I do the buffers I create cover the entire United States. I've tried a number of different CRSs (for the layer I did Right- Click>Save as and set the CRS I wanted to try, I also set the project CRS not just the layer), but the buffer always covers most, if not all, of the continent. Additionally if I use the distance tool to measure this shapefile from coast to coast, it comes out in meters. I could be wrong, but I'm fairly sure that the country is larger then a couple dozen meters across. I know I must be doing something simple and stupid wrong. So if I could get some help, that'd be great. Thanks so much, -Matthew


title: How can I change the display name of the "Scale" control?

text:
Here is the thing. I added the Scale control to my web and is displayed in a div at the bottom. I need to translate the "Scale" text to other language but I can't find how to do it. I searched in the openlayers website for examples or code to do it without results. None of the properties of Scale control tell me how to do this (in openlayers website). So I ask to you, people, if you know some method to customize this feature. Here is the code I use in my script:               map.addControl(new OpenLayers.Control.Scale($('scale')));      and this is the div where I displayed:

      I tried with writing the label in the div but the scale control overwrite the label. Hope you can help me with this.


title: Display points when there's great distance between them (GWT-Openlayers)

text: The case is the following: I have a layer and there are two points on it. The first is in Australia, the second is in the USA. The continent or the exact position of the points doesn't count. The essential part is the great distance between the points. When the application starts, the first point appears (zoomlevel is 18). The second point isn't displayed because it is far away from here and the zoomlevel is high. Then i call the panTo function with the location of the second point and the zoomTo function with the same (18) zoomlevel. The map jumps to the right location but the second point doesn't appear. The point appears only if i zoom in/out or resize the browser window. I assume Openlayers doesn't load the points which aren't on the screen actually. And those points are loaded only when i jump to their location (panTo) and then change the zoomlevel (or resize the browser window). Has anybody experienced such behaviour? Or has anybody got a solution to this problem? Thanks in advance!


title: How to send someone a file of a custom python script with all parameters for the popup interface already defined?

text: I have a python script in ArcGIS 10 that when clicked, has a popup for a user to choose parameters. I would like to send this file to someone else. While I could send them the python code and have them setup the parameters - this method repeats work I have already done. I would like to send someone one file that contains all of this information so they can just recieve my file, add it to a toolbox, and then have it all work. I am wondering where the file resides that has both the python code and parameters / what is the export process/ file type I should be looking at? (All the searches I do for "export script" seem to refer to exporting a model to python code...) Thanks!


title: Subsetting a curvilinear netCDF file (ROMS model output) using a lon/lat bounding box.

text: I am attempting to get salinity data from one of the ocean models in our region and have run into a roadblock. This is ROMS model output in NetCDF form, but the grid is curvilinear (lon and lat arrays are 2D). I want to get a subset of the data for the bounding box for the area I am interested in, however I am unsure how to go about doing this. Given a lat/lon/depth for a bounding box of interest, what are the grid cells and vice versa. I didn't know if using PyDap would make it any easier to get the data of interest, or if there was another toolset I should look at. I saw Rob Hetland's Octant, but it looks like it works on NetCDF files and I want to avoid pulling the files down if possible since they are fairly substantial. Thanks Dan


title: Geoserver basic authentification problem

text: I have Geoserver 2.1.3 set up for WFS transaction. I am using basic authentification and I have set up the following:   * A role(ROLE_RMP_WFS)    * A user(user_rmp) which belongs to the role above   * Data security where rmp. _.w is set to the role above and rmp._.r is set to *   * No service security   * Catalog mode config set to mixed I can query the layer with WFS just fine. However, doing a insert post transaction through OpenLayers with the URL _http://user_rmp:rmppassword@kart10utv.ad.skogoglandskap.no/geoserver_ekstern/wfs/ fails with the following message:               <?xml version="1.0" encoding="UTF-8"?>     <ows:ExceptionReport version="1.0.0"     xsi:schemaLocation="http://www.opengis.net/ows    http://kart10utv:80/geoserver_ekstern/schemas/ows/1.0.0/owsExceptionReport.xsd"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:ows="http://www.opengis.net/ows">     <ows:Exception exceptionCode="InvalidParameterValue">     <ows:ExceptionText>Error performing insert: Cannot access rmp_kartobjekt_flate_v with the current privileges</ows:ExceptionText>      </ows:Exception>     </ows:ExceptionReport>      However, the object is inserted just fine running the same query in CURL: curl -vv --header "Content-Type:text/xml" -X POST -d @feature.xml _http://user_rmp:rmppassword@kart10utv.ad.skogoglandskap.no/geoserver_ekstern/wfs The feature.xml is the same as the POST content: http://pastebin.com/yPwFb9g7 I do not understand why it works using CURL, but not working using a regular browser?


title: Get all vertices of a polygon using OGR and Python

text: I'm having a little trouble with the Python OGR API. What I am trying to do is get all the coordinates of each vertex of the outer ring of a polygon. This is what I have so far:               import osgeo.ogr     import glob          path = "/home/woo/maps/"     out = path + 'output.txt'          file = open(out,'w')     for filename in glob.glob(path + "*.shp"):         ds = osgeo.ogr.Open(filename)         layer1 = ds.GetLayer(0)         print layer1.GetExtent()             for feat in layer1:             geom = feat.GetGeometryRef()             ring = geom.GetGeometryRef(0)             points = ring.GetPointCount()             #Not sure what to do here               file.close()      I have heard that you can just `for` over the region but that only returns the rings in the polygon, not the nodes. Anyone able to help.


title: ArcGIS 10.2/10.2.1 for Desktop with Data Interoperablilty not seeing GPX files?

text: I have ArcGIS 10.2 and 10.2.1 both with Data Interoperablilty extension. But there is a problem with GPX files. ArcGIS simply doesn't see it. In 10.1 there was no problem to drag n drop them but now it's impossible. In quick import tool, when I open FME reader gallery I can't find gpx on the list. What's going on? Have you the same problem?


title: How to connect to the ArcGIS Server through a firewall?

text: I know there were a lot of similar questions, but still can't find a correct description about that. What should be inbound and outbound rules on the server side? Which ports should I use? Will that be a local or a remote port in the rule's options? Is that important (or can I) rewrite the service.txt to not to be INCREMENT and to be FEATURE? Please write me a correct answer step- by-step. I don't understand, because you can see some of the drawings, for example:               http://gis.stackexchange.com/questions/15385/hardcoding-port-number-in-arcgis-license-manager      says the License Server Manager is with the ArcGIS Server, not with the ArcGIS Desktop. But I can't install the License Manager to be with the ArcGIS Server. So what am I doing wrong? On my PC there's the ArcGIS Desktop and the License Server Manager. The ArcGIS Server is on an other computer. I can connect to that without the server's firewall, but that should be active...


title: Why OpenScales show tiles in cache in zoom in/out WMS layer?

text: I use OpenScales to show a WMS layer and it is strange that when zoom in/out sometimes OpenScales show tiles in cache, so Multi-resolution tiles showed in the layer. When paning the layer, incorrect tiles will disappear. How can I fix this? Thanks!!!


title: Calculate field based on a set value if optional parameter is not specified

text: In my model, I have a `Calculate Field` which will populate the field with a certain integer (in this case, 0). I've added an optional integer model parameter `Start ID`, where the user can specify the integer if they want. ![Model](http://i.stack.imgur.com/33Uyd.png) If `Start ID` is given a value by the user, this value must be used as the expression for `Calculate Field`, else `Expression` must be used. Since the tool can only take one expression as an input, would I have to create a copy of the `Calculate Field` with `Start ID` as the expression, and use `Merge Branch` with an `if` statement to test which branch must run i.e. the `Start ID` branch only runs if it has a value, else run the `Expression` branch?


title: How to set ArcMap 10 attribute dialog split orientation to horizontal by default

text: When you open ArcMap 10, and open the attribute window (editor toolbar), the attribute dialog is split vertically. You can press the toggle button to split the dialog horizontally. I always use it split horizontally, so if any of you know how to set it to default, i would be very thankful.


title: Problem HTTP request for KML

text: i have a problem with HTTP request for KML to add to map. This is my HTTP request:               var x = new OpenLayers.Layer.Vector("X", {         projection: new OpenLayers.Projection("EPSG:4326"),         strategies: [new OpenLayers.Strategy.Fixed()],              protocol: new OpenLayers.Protocol.HTTP({                                                         url : "../../MyJSP.jsp",                                         async : false,                         format: new OpenLayers.Format.KML({                            extractStyles: true,                            extractAttributes: true                          }),                          params : {                      'request' : 'typeRequest',                      'param1' : 'a',              'param2' :'b'                                       }                      })                  });                                    map.addLayer([x]);      The request is send to MyJSP, which make some controls to decide the remote method to invoke:               String req = request.getParameter("request")==null ? "" : request.getParameter("request");          if (req.equals("typeRequest")) {            String param1= request.getParameter("param1");        String param2 =   request.getParameter("param2");                        myClass.myMethod(param1,param2);           The request don't arrive here. I think that the problem is the URL `../../MyJSP.jsp`.               -forder      -- folder      --- folder            class to make request HTTP      -MyJsp.jsp      Can anybody help me? Thanks.


title: How are r.horizon results aligned?

text: I used r.horizon to calculate horizon on a raster every 10° without any offset. I have got 36 files now. Is the first file from 0° to 10° (then centered on azimuth=5°) or is it centered on 0°, in this case the first file is from 355° to 5° (knowing that GRASS start 0 in the East counterclockwise)?


title: where do I download POIs from Wikipedia? placeopedia used to have them but is now gone

text: I am trying to improve OpenStreetMap in Siem Reap, Cambodia. A way I am doing this is to add temple locations. I hear that there is a dataset of temple locations available from Wikipedia (presumably amongst a broader dataset of POIs on Wikipedia). How to extract these POIs from Wikipedia? Placeopedia used to have them, apparently, but now it's down. One way I tried to do this was to download Wikipedia POIs in the Android app called OSMAND+. This, however, is in .OBF format. Does anyone know how to convert from .OBF format to another one like .KML so I can view the file in JOSM and add missing temples?


title: What is Centroid of all lands of Earth?

text: May be my question is somehow ridiculous but I want to find the center point of all lands of the earth. What I have tried up to now is downloading shape file of all countries and polar parts of the earth. Then I imported that shape file into a SQL Server 2008 database and then tried to run some queries to find that point but all of them were in vain. Can someone calculate the **Centroid** of all lands of the earth with whatever software that may have.


Labels and features cut along tile borders and labels repeated on many adjacent tiles for same feature in "mapserver" wms using openlayers. ![See the image, red circles show repeated labels in adjacent tiles and cut features/labels along tile borders. ](http://i.stack.imgur.com/n4T5E.png) My label portion in mapfile: LABEL FONT arial TYPE truetype SIZE 10 COLOR 67 67 67 ANGLE 0 POSITION ur FORCE true #ANTIALIAS TRUE PARTIALS FALSE END In LAYER: LABELCACHE ON In MAP, PROCESSING "LABEL_NO_CLIP=True" did not work as some said. I am using mapserver-wms tiles-openlayers combination for map publishing. Some online helps says using tilecache will be a solution. But I am yet to succeed in configuring tilecache. My phpinfo shows: MapServer Version MapServer version 6.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Please advise.


title: Creating quintiles in QGIS when the number of observations per row is variable

text: I have a list of 100s of schools (1 per row), and a variable column with the total students in each school. The number of total students in each school varies widely. I want to split the list of schools into five categories such that each category contains roughly the same number of STUDENTS; the number of schools in each group doesn't matter. Can I do this in QGIS?


title: GetFeature Request with Polygon Intersecting Polygons

text: My task is very straightforward: a user draws a polygon and query all parcel polygons. The query string extends the URL limit. So I am posting XML to WFS. However, GeoServer always returned 0 feature, but I knew the query polygon overlapped several tax parcels. If I passed a single point, it worked fine. Did I miss anything for sending a polygon? I used the OpenLayers buildGeometry to create the polygon GML. I can't figure out what's wrong. Please Help. THANK YOU IN ADVANCE. Here is my code:               var gml = new OpenLayers.Format.GML();      var polygonGML = gml.buildGeometry.polygon.apply(gml,[taArray[0].geometry])     console.log(polygonGML);      var plgGMLString = (new XMLSerializer()).serializeToString(polygonGML);          var geo_req_url = proxyHost + "http://localhost:8080/geoserver/wfs";           var query_xml = '<?xml version='          + '<wfs:GetFeature service="WFS" version="1.1.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">'          + '<wfs:Query typeName="topp:tax_parcel"><Filter><Intersects><PropertyName>geom</PropertyName>'         + plgGMLString          + '</Intersects></Filter></wfs:Query></wfs:GetFeature>';           $.post(         geo_req_url,         query_xml,         function(data) {             geoResults = data.features;             remove_selected_features();              draw_sel_features();          },         "application/json"     );      Here is the printout of plgGMLString. `<gml:Polygon> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates decimal="." cs="," ts=" ">-74.00567761405651,40.546826958183715 ...</gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> </gml:Polygon>`


title: Calculate dynamic radius based on population and map resolution

text: # Background Create a radius around the centre of a city that corresponds to the city's population, taking into consideration the map's current resolution. The populations range from 39 to 1090936, with an average population of 2127. (Most of the populations are an estimated 150 people: hamlets.) Google Fu returns people looking to calculate the population within a given radius -- this question is the exact opposite: calculate a radius for a given population. ## City Data The following code calculates a radius for a city based on the city's population:               function logn( base, n ) {       return Math.log( n ) / Math.log( base );     }          function addCity( cities, lon, lat, population ) {       cities.push(         new OpenLayers.Feature.Vector(           getPoint( lon, lat ),           {             tooltip: population,             radius: Math.round( logn( 2, population ) ) * 2           }         )       );     }          function getCities() {       var cities = [];            addCity( cities, -116.383062683871, 56.4680558322581, 39 );       addCity( cities, -111.07205136129, 55.6315222967742, 208 );       addCity( cities, -116.019763045161, 58.3878539741935, 739 );       addCity( cities, -113.330203110508, 53.823233143442, 2848 );       addCity( cities, -113.400259352921, 49.7204543294903, 3072 );       addCity( cities, -114.088890487523, 52.3022833957834, 11115 );       addCity( cities, -113.538803745389, 53.2670385040641, 24139 );       addCity( cities, -113.797128210771, 52.281512598323, 65733 );       addCity( cities, -114.052214116579, 51.0350223014551, 1090936 );            return cities;     }      ## Radius Style The radius is styled as follows:               var cityStyle = new OpenLayers.Style(       {         fillColor: '#0065BD',         fillOpacity: 0.1,         strokeColor: '#0065BD',         strokeOpacity: 0.25,         strokeWidth: 1.5,         pointRadius: '${radius}'       }     );          var cityStyleMap = new OpenLayers.StyleMap( cityStyle );           cityLayer = new OpenLayers.Layer.Vector( 'Cities', {       styleMap: cityStyleMap     });      # Problem The radius is fixed, regardless of zoom level. This leads to incorrectly sized circles, depending on the zoom (i.e., `map.getResolution()`). ## Zoomed In ![](http://i.imgur.com/WItOu.png) ## Zoomed Out ![](http://i.imgur.com/J01tC.png) # Questions   1. Is log2(n) a good idea to calculate the relative radii (as opposed to a linear calculation, such as simple division)? (This is not overly important.)   2. How would you adjust the radius based on the map's resolution? Note that the circumscription need not align with the city's centroid; a simple circle with a radius that is relative to the population and zoom level, centred on the city's location is sufficient. ## Example - Zoomed Out ![](http://i.imgur.com/dokIR.png) ## Example - Zoomed In ![](http://i.imgur.com/sicI5.png) Thank you! # Related Links   * http://stackoverflow.com/questions/10080358/how-can-i-calculate-dynamic-default-radius-for-map-search-based-on-population-de   * Resizing and Reshaping features in Openlayers   * http://users8.jabry.com/captdragon/ol/modify1.html


title: How to make popups on polygon using openlayers?

text: I want to make popups that contain information of a polygon when in hover using OpenLayers. information displayed in popups obtained from the database. Can you give reference code to make it. thanks for answering


title: Getting OpenLayers Vector features vs clusters

text: I am using OpenLayers Vector with a cluster strategy. When I use Vector.features to get the features returned as a list, it returns an array of clusters and not the array of features. This makes the features unable to be addressed individually. Does anyone know how can I get the features list while using the clustering strategy? Any help is appreciated. (Eg. If there are 5 features in my KML which are clustered as 1, then I get vector.features.length=1. I need the original features list which will have a length of 5) Below is the implementation of my Vector:               var maps_layer = new OpenLayers.Layer.Vector("KML", {                          strategies: [new OpenLayers.Strategy.Cluster()],                          protocol: new OpenLayers.Protocol.HTTP({                             url: "kml/maps.kml",                             format: new OpenLayers.Format.KML({                                extractStyles: true,                                 extractAttributes: true,                             })                         })                      })          thesis.events.register("loadend", this, function(){           var my_array = maps_layer.features; //Size of this is = no.of Clusters and not features     });      Here is the documentation: http://dev.openlayers.org/docs/files/OpenLayers/Layer/Vector-js.html


title: Looking for an explanation of QGIS Edit Widgets

text: I have noticed "Edit Widgets" under the Quantum GIS and would like to know in detail the use case and usage of this widget. For any opened vector file, under the Properties -> Fields Tab, for every attribute feature there is a Edit Widget shown. Can someone explain in detail, the the use of these widgets? If the answer is in form of Tutorial, I'm sure it will help a lot of users like me.


title: Cannot add layer to map in arcpy

text: This is related to my question ArcPy replaceDataSource, but can anyone explain to me why the following code fails to add a valid layer from a .lyr file, and I get the same problems as in that question (broken data source):               import time     import arcpy          fullpath = r'\\mxdPath'     mxd = arcpy.mapping.MapDocument(fullpath)      for df in arcpy.mapping.ListDataFrames(mxd):         if df.name == 'Overview' or df.name == 'Keyplan':             temp = r'C:\TMP\xxx.lyr'             lyrNew = arcpy.mapping.Layer(temp)             arcpy.mapping.AddLayer(data_frame,lyrNew,"TOP")          time.sleep(15)                 mxd.save()     del mxd      I added in the delay because I wondered whether the layer wasn't fully added before the MXD was saved, but this doesn't seem to work consistently. My geodatabases do seem to take a long time to open, but it's crazy not to be able to undertake such a simple scripting operation. I guess the same problem is affecting both operations, but any ideas why?


title: How to add vertices to existing linestrings?

text: If I have               Linestring(1 2, 1 5, 1 9)      and a               Point(1 3)      Is there any function that can merge linestring and point preserving the order so output would be:               Linestring(1 2, 1 3, 1 5, 1 9)


title: OGR to read from oracle, and then write a CSV

text: I need to read an Oracle (not spatial) table with OGR. I have no problem with ogrinfo. I use this command: > ogrinfo -ro OCI:user/password -sql "select * from HR.EMPLOYEES" I have this kind of output:               OGRFeature(select * from HR.EMPLOYEES):106       EMPLOYEE_ID (Integer) = 206       FIRST_NAME (String) = William       LAST_NAME (String) = Gietz       EMAIL (String) = WGIETZ       PHONE_NUMBER (String) = 515.123.8181       JOB_ID (String) = AC_ACCOUNT       SALARY (Real) =  8300.00       COMMISSION_PCT (Real) = (null)       MANAGER_ID (Integer) = 205       DEPARTMENT_ID (Integer) = 110      Now I would like to export (in example) in CSV format, using OGR. This is the command: > ogr2ogr -f "CSV" test.csv OCI:"user/password" -sql "select * from > HR.EMPLOYEES" I have this errors:               ERROR 4: Failed to create test.csv\select * from HR.EMPLOYEES.csv:     Invalid argument     ERROR 1: Terminating translation prematurely after failed     translation from sql statement.      I'm not able to find the syntax error. What's wrong? I'm using gdal/ogr 1.9 and Oracle 11g for windows. Thank you, Andrea


title: How to reopen hidden panels in print composer?

text: I unfortunately deleted the menu (Qgis 1.8.0) in print composer (settings for labels etc) . Now I am wondering how to display it again? The menu is gone in all my projects and I could not find a solution for this. Any suggestions? Thank You!!


title: How to access the different panels in QGIS Composer?

text: I accidentally closed the tabs in composer: Composition and Properties, I think it is called. The question: How can I open them again?


title: For a ESRI Geodatabase Feature Class, which table holds the spatial reference?

text: For a shapefile, the spatial reference / coordinate system information is held in the .prj file. I would like to know which file or table in a geodatabase holds the equivalent information for a feature class. For example, if I have a geodatabase called "TownOfCoventry.gdb" and I use the Windows OS to drill down into the gdb folder, there are many many files for a single feature class. a0000001.gdbindexes a0000001.gdbtable a0000001.gdbtablx etc. etc. etc. I would just like to be able to tell students that while a .prj file contains the spatial reference for a shapefile, a ?????? table file contains the spatial reference for a feature class within a geodatabase.


title: Convert CSV files into OSM with FME

text: I have a database which i've exported as individual csv files for each table. Below are some of the attributes which exist from two of the csv files:               wayPointID  linkID  order   x   y   z   length  radius      and               nodeID  x   y   z   name    description type      I'm in need of a method to convert this data into osm. When I attempt just csv -> osm in fme, of course the output is only the osm xml headers.               <?xml version="1.0" encoding="UTF-8"?>      I have been able to use 2DPointReplacer to take the x and y attributes and it successfully outputs nodes. However, he data I have does require the tables be joined in order to build attributes. Because of this I have to create a new id to each position and be ordered/continued across several tables. I have written a python script which will do what I need but would like this done in FME. Can anyone offer suggestions? Thanks in advance.


title: What are the advantages and disadvantages importing vs linking data in GRASS?

text: I'm fairly new to GRASS, and only recently discovered the r.external and v.external functions. I'm used to working with R and QGIS where all the data is "external". Typically I keep vector data in PostGIS and rasters in the filesystem. But it seems the GRASS paradigm is to import this data into mapsets (with r.in.* and v.in.*). So, what are the advantages of switching to that paradigm, vs. using r.external/v.external? Is one or the other faster, or easier to keep organized, or more bug-prone or error prone? Are there formats that can't be handled by linking?


title: Convert ESRI Integer ASCII Grid to something useful

text: How could I convert a file(s) which is _"DIGITAL Map data stored in ESRI ARCInfo Integer ASCII Grid format"_ into something the rest of us can use? i.e import into QGIS. The main file has no extension and is 70 MB, the accompanying files are a `*.dbf` and a `*.prj`. It does appear to be of the format described here; http://en.wikipedia.org/wiki/Esri_grid but how do I convert it?


title: Mysterious MapInfo query syntax errors

text: I'm struggling to get what seems like a perfectly normal query to execute in MapInfo v10. In SQLite Manager (an excellent firefox plugin), this works as expected:               SELECT area_name, street_name, address, disp_lon, disp_lat     FROM mtdArea, pointAddress, streets     WHERE (streets.link_ID = pointAddress.link_ID) AND ((l_area_ID = area_ID) OR (r_area_ID = area_ID))      The equivalent in MapInfo               SELECT RationalisedMtdArea.Area_Name, RationalisedStreets.Street_Name, RationalisedPointAddress.address, RationalisedPointAddress.Disp_Lon, RationalisedPointAddress.Disp_Lat     FROM RationalisedMtdArea, RationalisedPointAddress, RationalisedStreets     WHERE RationalisedStreets.Link_ID = RationalisedPointAddress.Link_ID And ((RationalisedMtdArea.Area_ID = RationalisedStreets.L_Area_ID) Or (RationalisedMtdArea.Area_ID = RationalisedStreets.R_Area_ID))      ..gives me a > No Join specified between tables RationalisedMtdArea and > RationalisedPointAddress.   >  Invalid join condition in WHERE clause. Does MapInfo not like logical `Or`s?   What am I missing?   Thanks.


title: PgRouting: What index should have the restriction table

text: I have this tables to feed my routing engine using pgr_trsp:   vzla_rto have the links and nodes (650k)   vzla_restriction have the turn restrictions (10k)               CREATE TABLE map.vzla_restrictions     (       rid integer NOT NULL,       to_cost numeric,       to_edge integer,       from_edge integer,       via text     );     CREATE INDEX vzla_restrictions_from_edge_idx ON map.vzla_restrictions USING btree (from_edge);     CREATE INDEX vzla_restrictions_to_edge_idx ON map.vzla_restrictions USING btree (to_edge);      I was checking table statistics and realize i put an effort to create index for vzla_rto, but looks like i didn't enough for vzla_restrictions.                                   | seq_scan      | seq_tu_read     | idx_scan        | idx_tup_fetch | n_tup_ins     vzla_restrictions   | 1,672,959     | 16,848,370,089  |      -          | -             | 10071     vzla_rto            | 1,549         | 977,994,776     |  862,610,399    | 3,866,967,927 | 648968      **So which index should i add to vzla_restrictions to help pgr_trsp()?**


title: How to create a model which executes a SQL stored procedure with user-provided parameters?

text: How can I create an ArcToolbox that executes a SQL stored procedure and asks the user for two inputs? As it stands now, I have to log in to my SQL server and run an execute statement for the stored procedure that requires two inputs from the user. I'm trying to streamline my process to give people with no SQL experience the ability to generate these data through an ArcToolbox.


title: Error Save Layer on WFS Geoserver

text:
I just want to create editable layer with control editor on openlayers like on http://hazardmapping.com/basic_wfst.php I following step by step from http://www.gistutor.com/openlayers/22-advanced- openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis- layer.html I use postgresql 8.4 with postgis 1.5 When i try to click save button to save my edited layer, i got error message like bellow :               Request: getServiceInfo     08 Nov 15:12:50 INFO [geoserver.wfs] -      Request: describeFeatureType         service = WFS         version = 1.1.0         baseUrl = http://localhost:80/geoserver/         typeName[0] = {webgis}wfst_test         outputFormat = text/xml; subtype=gml/3.1.1     08 Nov 15:12:50 ERROR [geoserver.ows] -      org.geoserver.wfs.WFSException: Could not locate {http://localhost/webgis}wfst_test in catalog.         at org.geoserver.wfs.GetFeature.featureTypeInfo(GetFeature.java:1052)         at org.geoserver.wfs.GetFeature.run(GetFeature.java:347)          ...     08 Nov 15:13:50 WARN [geotools.xml] - Error parsing: http://localhost/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=webgis:wfst_test     08 Nov 15:13:50 ERROR [geoserver.ows] -      org.geoserver.wfs.WFSTransactionException: Feature type 'wfst_test' is not available:          at org.geoserver.wfs.Transaction.execute(Transaction.java:218)         at org.geoserver.wfs.Transaction.transaction(Transaction.java:104)         at org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureService.java:170)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)      Bellow my full html code

                    On geoserver, my workspace="webgis" and layer="wfst_test" What this error ? How i can solve this Thanks


title: Toggling feature visibility in Openlayers + GeoExt

text: I'm setting up a small web mapping application using PostGIS + mod_tile + FeatureServer + OpenLayers + GeoExt, each of which I'm learning as I go. In addition to the base layer, I've pulled in a few vector layers from FeatureServer, each with many features. For example, a request to my "states" layers returns a GeoJSON feature for each state, and "Congressional districts" returns a feature for each Congressional District. I can render these layers to the map and toggle them in their entirety in a GeoEXT layer tree. What I'd like to do (seems) straightforward: **For each layer, display a grouped list of all features in a layer tree with checkboxes to toggle the visibility/rendering of each feature, individually.** I'm struggling to find a straightforward way to do this. There was a question on the GeoEXT mailing list that included code to set the renderIntent to 'delete' on uncheck:               var layerList = new GeoExt.tree.LayerNode({         text: 'The United States',         expanded: true,         layer: usa, // refers to a vector layer using HTTP protocol to get GeoJSON.          leaf: false,         children : [{             text: "Alabama",             leaf: true,             fid:1,             checked: false         },{             text: "Alaska",             leaf: true,             fid:2,             checked: false         }, {         //...  load other fifty states         }]     });          var layerTree = new Ext.tree.TreePanel({         title: 'Map Layers',         root: layerList,         autoScroll:true,         listeners: {             'checkchange': function(node, checked){                 var tempfid = node.attributes.fid;                 if(checked){                     node.parentNode.attributes.layer.getFeatureByFid(tempfid).renderIntent = 'default';                      // I am setting visibility with renderIntent because styles are reset when layer is redrawn form panning or zooming.                     node.parentNode.attributes.layer.redraw();                 }else{                     node.parentNode.attributes.layer.getFeatureByFid(tempfid).renderIntent = 'delete';                     node.parentNode.attributes.layer.redraw();                 }             }         }     });      I'm thinking there's a better way to do this (perhaps with Strategy.Filter?), but can't seem to wrap my head around it. Could someone point me in the right direction and/or to some examples that include this functionality? Thanks in advance for your help!


title: What is the fastest (performance-wise) way to serve PostGIS features?

text: I'm interested in the fastest way to serve PostGIS features. I can find several WMS improvements and alternatives (MapProxy, TileCache, Mapnik...) but not so many WFS Open Source improvements and alternatives. I'm not interested in tiles, but in polygons over my base layer. Served fast. Could you please me point in the right direction? Many thanks in advance, and best regards * * * Update: I forgot to mention that my app shows cadastral information. And cadastral polygons must be selectable (not editable, they are only highlighted when you click on them). I'm using right now a mix of WMS + Django generating GeoJSON objects when the user clicks on a part of the map, to avoid situations like thousands of polygons at same time in the client (OpenLayers). I don't know if I'm in the right way (should I avoid potentially hard situations like thousands of pols in the client by rendering them via WMS or any other solution? Should I improve the way the polygons are served?)


title: What's wrong with OpenLayers code?

text: I've just tried some simple code from example:               $(document).ready(function() {             var map = OpenLayers.Map('map-content', {});        var wms_serever_map = OpenLayers.Layer.WMS('Base l', 'http://vmap0.tiles.osgeo.org/wms/vmap0', {layer:basic},            {});        map.addLayer(wms_serever_map);        if(!map.getCenter()){           map.zoomToMaxExtent();        }     });      but chrome and firefox don't show me the map and throws error: `uncaught type error: Cannot call method 'apply' of undefined Openlayers.js:127` Its rather interesting, because some time ago this code worked


title: ArcGIS 10 attribute table sort issue

text: what is the solution for this funky sorting Esri does in attribute tables with decimal places values... screen shot: http://i.imgur.com/0fqvF.png attribute table funky sort


title: ESRI JS API 3.3- setExtent, when called twice, same code, different behavior, jumps

text:
Our map has a toolbar 'home' button with code that grabs extent values from a config file, creates an Extent object from those values, and passes the Extent object to the map's setExtent function. We also call this same code when the map is initialized, by calling the click function for the button. So if we load the map, then click the home button, the map image shifts about 30 or 40 pixels upward. Makes no sense, we are calling the exact same code twice in a row, with the exact same input.               Toolbar.prototype.OnFullExtentClick = function () {         var viewModel = registry.get('viewmodel');                   var initial = config.Map.InitialExtent;         var extent = new esri.geometry.Extent(initial);         viewModel.Map.setExtent(extent);      };      We call it once via code in the Init function:               ViewModel.Toolbar.OnFullExtentClick();      And we execute it again when home button is clicked, via Knockout.js as below

+

-

      It doesn't seem to matter what values we set for the extent, the "jump" is always the same distance and direction (30 to 40 pixels upwards). My question(s): What are we doing wrong? How can we get it to stop doing this? -- EDIT -- This problem is specific to IE, does not do this in Chrome. Also, still does it when the setExtent code is replaced by centerAndZoom.               Toolbar.prototype.OnFullExtentClick = function () {         var viewModel = registry.get('viewmodel');         var center = new esri.geometry.Point(717714, 972786, new esri.SpatialReference({ wkid: 2223 }));         viewModel.Map.centerAndZoom(center, 1);      };


title: Threejs "Failed to generate a dem file using gdalwarp. gdalwarp is not installed."

text: I am trying to test out the new threejs plugin for QGis and have come across this error. > Failed to generate a dem file using gdalwarp. gdalwarp is not installed. I have installed the latest version of QGis as well as GDAL framework and matplotlib for Mac from KyngChaos. They have all been installed without error and am stuck as to where my trouble arises as it would appear that I have installed GDAL framework (assuming this includes GDALWARP). Any pointers as to what I need to tweak so I can play with this seemingly great addition to QGIS plugins :-) Thanks in advance.


title: Create markers and Buffers

text: > **Possible Duplicate:**   >  Drawing circles on map using openlayers Hi everyone, I am using openlayers to create an application in which input values of lat,long,radius are given and I have to point the markers (of lat-long values) and create buffers(of corresponding radius) around them. However I am able to create markers on the map by giving lat long values in text file, but I am really stuck when I want to create buffers around them, and I dont know how to give radius values in text file. Please help me out in this issue, If text file is not correct then which file file format I have to use(like KML,json etc) and how to carry on this work


title: ArcGIS Visual Studio IDE Integration Framework

text: i need to integrate arcgis 9.3 with visual studio c# 2008 express edition. i found the integration framework for 9.1 but no chance for 9.3 and i've seen a lot of questions on web about it. What should i do to integrate? edit: the version of .net is 3.5


title: How to add a table from ArcGIS Online to ArcMap

text: When you're signed into ArcGIS Online within an ArcMap session, there is an option Add Data From ArcGIS Online: ![enter image description here](http://i.stack.imgur.com/oScZf.png) I have a service in ArcGIS Online which consists of 2 feature layers and 1 table: ![enter image description here](http://i.stack.imgur.com/PCR7w.png) When I add this to ArcMap using the above option, the table isn't included. Is this a bug, or is there a workaround? ![enter image description here](http://i.stack.imgur.com/5i7wa.png) Thanks


title: Definitions and limitations of MapInfo TAB file objects

text: I am working on a MapInfo plugin to convert MapInfo files to GeoJSON files. I am having trouble matching up the object types of the two formats. Each GeoJSON object type is described in the documentation. The MapInfo object types are a bit more ambiguous. The best I can find is in the MapBasic reference file which says, for example:   * OBJ_INFO_TYPE value: OBJ_TYPE_REGION   * ID: 7   * Object type: Region Object This is obvious enough but what exactly is a region? Is it analogous to a Polygon? Or is it any closed object? **Can anyone point me towards a decent definition of each object type?** **Update 2010-02-03:** I sent a message to the MapInfo support people who pointed me towards a section in the MapInfo User Guide headed "Map Objects as Part of Layers" which spells things out perfectly. I still can't find this page in the guide that I have (version 10.5) so I'll paste the relevant section below for anyone else in my position. Quote starts here: _MapInfo Professional are made up of layers of map objects. There are five basic types of objects:_   * **Regions:** closed objects that cover a given area. These include polygons, ellipses, and rectangles. For example, country boundaries, postal code boundaries, sales territories.   * **Point objects:** represent single locations of data. For example, customer locations, restaurants, parking meters. Points can also be combined into multipoint objects.   * **Line objects:** open objects that cover a given distance. These include lines, polylines, and arcs. Examples are streets, rivers, power lines.   * **Text objects:** text that describes a map or another object, such as labels and titles.   * **Collection objects:** combination of region, line, and multipoint objects. _You can have each type of object in a separate layer (most common), or you can combine objects in the same layer._


title: Different result featureCount() on QgsVectorLayer QGIS 1.8 vs QGIS 2.0?

text: I use the following code in a layer action:               <uri definition etc>         sql = 'id = "[% "id" %]"';     uri.setSql(sql);     layername = 'TableName [% "id" %]';     vlayer = QgsVectorLayer(uri.uri(),layername,'spatialite');     <some code> if (vlayer.isValid() and vlayer.featureCount() > 0) else <some code>      The SQL-query gives as result 0 or more features. vlayer.featureCount() returns 0 or more as expected in QGIS 1.8, but always 359 in QGIS 2.0 (total features in Spatialite table with name TableName), so my code breaks in QGIS 2.0. When the SQL-query has no result and I add vlayer to the interface and turn Show Feature Count on the layers panel shows two counts (?!) [359] and [0]. When the query returns 1 feature, these counts are [359] and 1. Open Attribute Table shows 0 and 1 record which is all fine. So the SQL-query seems to run fine, but featureCount holds the wrong number in my opinion. ![Show Feature Xount](http://i.stack.imgur.com/Ex6FP.png) Any clue?


title: Geoserver Full head error

text: I've started getting errors from geoserver when trying to request WMS layers. I'm running it on windows server (the OpenGeo suite version) The errors are :               WARN [mortbay.log] - handle failed     java.io.IOException: FULL head         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:276)         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)      And I'm getting pink tiles on FF or empty tiles on Chrome/IE. The weird thing is that on geoserver itlsef I can preview the layer. any ideas?


title: How to geocode addresses from MySQL and add them like markers to the Google map?

text: I'm using Google Maps API and Google Geocoding for geocoding addresses. I have table named 'users' and column named 'location' in MySQL database. Column 'location' contains addresses. I need to connect to the database, then geocode those addresses and add them like markers to the map. First I connected to the database with PHP:                 <?php              // connection to mysql              $username="someusername";         $password="*****";         $database="GISwork";         $hostname = "somehostname.com";         $table = "users";                   $conn = mysql_connect($hostname,$username,$password) or die("Connecting to MySQL failed");              mysql_select_db($database, $conn)         or die("Selecting MySQL database failed");              if (!mysql_select_db($database))         die("Can't select database");              // sending query         $result = mysql_query("SELECT location FROM {$table}");         if (!$result) {             die("Query to show fields from table failed");         }         ?>      Then I defined geocoding and markers:               var userLocation = //it should be that $result from database                   var geocoder = new google.maps.Geocoder();                 geocoder.geocode( { 'address': userLocation}, function(results, status){                    if (status == google.maps.GeocoderStatus.OK) {                       map.setCenter(results[0].geometry.location);                       var marker = new google.maps.Marker({map: map, position: results[0].geometry.location });                    } else {                       alert("Geocode was not successful for the following reason: " + status);                    }                 });                   }         google.maps.event.addDomListener(window, 'load', initialize);      **My question is:** a) How to pass php variable $result to the javascript variable userLocation to be readable for Google Geocoding? b) Is that function for geocoding and adding markers enough for all markers or should it be different regards to I need to import all addresses from the database (multiple markers)? c) How to add info windows to all markers? Thank you.


title: Loading PostGIS raster layer into QGIS

text: I am unable to load a PostGIS raster layer into QGIS. I have looked through previous posts Loading raster from PostGIS DB into QGIS and Cannot add the PostGIS raster layer with QGIS but was not able to solve the problem. I tried both on QGIS Lisboa 1.8.0 and QGIS Dufour 2.0.1. In the Lisboa version I installed the plugin "Load PostGIS Raster to QGIS" 0.5.4 but I get the following error               An error has occurred while executing Python code:          Traceback (most recent call last):       File "C:/Users/Esteban/.qgis//python/plugins\wktraster\wktRasterPlugin.py", line 90, in callAddLayer         dlg = DlgAddRasterLayer()       File "C:/Users/Esteban/.qgis//python/plugins\wktraster\DlgAddRasterLayer.py", line 40, in __init__         self.updateUIMode()       File "C:/Users/Esteban/.qgis//python/plugins\wktraster\DlgAddRasterLayer.py", line 109, in updateUIMode         self.listTables()       File "C:/Users/Esteban/.qgis//python/plugins\wktraster\DlgAddRasterLayer.py", line 57, in listTables         tables=conn.listTables(self,connstring) #returns a list of pairs (index, value)       File "C:/Users/Esteban/.qgis//python/plugins\wktraster\conn.py", line 76, in listTables         db = GeoDB(host=parmlist[2].split("=")[1],dbname=parmlist[1].split("=")[1],user=parmlist[3].split("=")[1],passwd=parmlist[4].split("=")[1],port=int(parmlist[5].split("=")[1]))       File "C:/Users/Esteban/.qgis//python/plugins\wktraster\postgis_utils.py", line 134, in __init__         raise DbError(e)       File "C:/Users/Esteban/.qgis//python/plugins\wktraster\postgis_utils.py", line 83, in __init__         self.msg = unicode( error.args[0], 'utf-8')     UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 23: invalid continuation byte          Python version:     2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]               QGIS version:     1.8.0-Lisboa Lisboa, 6416f38          Python path: ['C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python', 'C:/Users/Esteban/.qgis//python', 'C:/Users/Esteban/.qgis//python/plugins', 'C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python/plugins', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\bin\\python27.zip', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\DLLs', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\plat-win', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\lib-tk', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\qgis\\bin', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\qgis\\python\\plugins\\fTools\\tools']      How to solve the above problem in Lisboa version ? Is it possible to load a PostGIS raster layer into the Dufour version ?


title: How to fix Raster Dataset with numbers in Extent that look like latitude/longuitude but say metres?

text: In ArcGIS for Desktop 10.1, the Spatial Reference of my Raster Dataset reports that its units are metres (well meters) but the values look like decimal degrees e.g. -33 degrees is highly plausible but not -33 metres. How can ArcGIS for Desktop be "told" that these numbers are degrees of latitude and longitude, rather than values in metres?


title: How do I construct (or select) an appropriate local Cartesian coordinate system, for an arbitrary small area?

text: I'm relatively inexperienced with coordinate reference systems, so please bear with me if I'm not putting this clearly. I have existing software which works with an abstract (un-referenced) 3D coordinate system. That is, everything has X,Y,Z coordinates in meters, but those coordinates are not defined relative to any absolute location. I want users to be able to "attach" this coordinate system to the real world by saying "the (local) origin corresponds to point FOO in the real world." Here FOO is specified in any well-known coordinate reference system (probably EPSG:3785, but I'll allow anything Geotools can recognize), and the orientation is fixed. I then want to have well-defined translations between a relative coordinate (X,Y,Z) and the corresponding absolute location (e.g. Y meters North of FOO, X meters East of FOO, Z meters above FOO). What I think I want, in order to make this happen, is to (a) pick or create an appropriate Cartesian coordinate system for the area around FOO, and then (b) do the simple affine transformation between my internal coordinate system and the geo-referenced one. All the advice I've seen so far says "use a local projection for small areas, or something like WGS for large areas," but I don't know what the right local projection is in advance, because FOO could be anywhere. Can I either reasonably (1) look-up a standard, accepted projection for that location, or (2) define a good new projection for that point? I'm working in Geotools, but I'm perfectly happy with a general conceptual answer. Thanks!


title: How to "page" through a set of features and display an infoWindow for each feature?

text: In the ArcGIS Server JS API the Popup object may be defined against an array of features. In that case the Popup contains Next/Previous buttons to allow the user to "page" through each feature in turn, as in this example where there are multiple coincident features at the chosen location: ![enter image description here](http://i.stack.imgur.com/9GHBD.png) Is this possible using OpenLayers? That is, given an array of features can I easily navigate the infoWindow forward/backward to display the relevant information for each feature? Thanks


title: How to put zipcodes data onto a web map?

text: This is to create a cellphone coverage map. I'm being given a list of zipcodes and need to create a detailed static cellphone map (plus, ideally, an interactive zoomable map) of cellphone coverage areas. I'm totally new to GIS systems, or any mapping API other than Google Maps. Can you suggest how I would get started? Thank you!


title: MMQGIS converts very large text numbers to a numerical missing value

text: I used MMQGIS plugin to change a table of numbers in text format (UN world economic data) which had large values of items like GDP 132000000000 (132 billion) were all converted to -2147483648 which I suppose is the numerical value for missing value or similar. 132 million converts OK but not 132 billion. ![enter image description here](http://i.stack.imgur.com/9Ub1b.gif) The image above illustrates the problem. I started with the table on the right; table on the left is the reslt. I am using QGIS 1.8. How can I fix this?


title: OpenLayers "Text" layer always visible on load

text: I'm trying to load a layer as an overlay and make it initially not visible                   airBoss = new OpenLayers.Layer.Text( "AirBoss Locations", { location:"./airboss.txt"} , {         visibility: false, isBaseLayer: false, displayInLayerSwitcher: true});         map.addLayer(airBoss);         airBoss.setZIndex(210);         airBoss.setVisibility = false;      Using this code with or without the additional "setVisibility" line the layer always is visible. Is this a bug in the javascript of open layers or am I doing something wrong. Thanks..


title: Different output from running algorithm in toolbox and from script

text: I am unable to get the same results when running the `qgis:reproject` tool from QGIS processing toolbox (QGIS version 2.0.1) as when running it from a Python script (console). In this example I am projecting from WGS 84 to Europe Albers Equal Area Conic. In the toolbox, I run `Geoalgorithms->Vector->General tools->Reproject layer`. I choose my target projection and input/output files. I uncheck the box to load the layer after finishing. After the tool has ran, I find a _.shp_ , _.shx_ , _.dbf_ , _.prj_ and _.qpj_ file on disk. If I in console do the following:               layer = QgsVectorLayer("C:/path/to/input.shp", "layername", "ogr")     processing.runalg("qgis:reprojectlayer", layer, "ESPG:102013", "C:/path/to/output.shp")      the result is a _.shp_ , _.shx_ and _.dbf_ file on disk, as well as an **empty _.prj_ and _.qpj_ file**. Well, the _.qpj_ file is 1 byte, seemingly a newline. Why are these not written properly? Using a `diff` tool on the output files, the .shp and .shx files are **not the same** as the output from the toolbox algorithm. What is the toolbox version doing that I am not? ~~According to`processing_qgis.log` the same processing algorithm is ran.~~ (Note: Turns out I overlooked a critical point here, see my answer) This question evolved from the following question: No prj file output from qgis:reproject. Basically I am trying to reproject a layer from one CRS to another, and import that layer into QGIS, retaining distortions (no on-the-fly projection). This works fine if I run the toolbox algorithm, but if I run it from script I get some sort of on-the-fly projection, even though it is disabled in settings. Note that **copying the _.prj_ and/or _.qpj_ files does not help**. This is how it should look after importing the layer (and indeed how it looks if I run from toolbox): ![From toolbox](http://i.stack.imgur.com/ebPkj.jpg) This is how it looks when I project using script: ![From console](http://i.stack.imgur.com/ungEF.jpg) The way I import the layers is through the `Layer->Add Vector Layer` menu item. Would really appreciate any help on this.


title: How to create GeoTiff file from .h5 file?

text: I have .h5 file containing Latitude, Longitude and Dataset(I m working multiple type of dataset).And I want GeoTiff file of it contains all Information related to GeoTiff. So is there any way to create GeoTiff from .h5 file? Or is that ok to create Tiff image from .h5 and create GeoTiff image from it?


title: How to Zoom in QGIS Print Composer Without a Scroll Wheel

text: I am attempting to print a simple map from QGIS in portrait orientation. When I use the "Add New Map" tool it brings the map in at an extent which matches my original data frame if I were to use landscape orientation. See below: ![](https://lh5.googleusercontent.com/-X4evhQJy528/TfwQrWxDROI/AAAAAAAAAjo/ZZD7RTmGeNI/s1024/Landscape.jpg) However, when I set it to portrait, even if I do so before I add the map, it zooms out drastically and places my area of interest at the bottom end of the map. ![](https://lh4.googleusercontent.com/-k4V1YqjtN6Q/TfwQrRcO1zI/AAAAAAAAAjk/P-Ub_g4vP50/s720/Portrait.jpg) Now, a bit of researching has revealed that I could zoom into the area I am interested in with my mouse's scroll wheel. However, my mouse does not have a scroll wheel. In addition, the Ctrl++ shortcut that works in the rest of QGIS does not work in Print Composer. Any help would be appreciated.


title: ArcGIS - IExtension.Startup() not launching

text: I have an ArcGIS 10 extension that will not launch .Startup() when ArcMap loads. I can get it to hit when I go to Customize->Extensions and un-check/re- check the extension name. Is there a setting that I need to configure in order to have this fire when Arc is launched?


title: Custom panning using ArcGIS Engine

text: Due to some constraints, that I will not go into, I have found myself needing to implement custom panning in my application. The ArcGIS API reference suggests using the following methods:               IScreenDisplay2.PanStart(IPoint start)    // Starts a pan     IScreenDisplay2.PanMoveTo(IPoint moveTo)  // Moves to a point     IScreenDisplay2.PanEnd()                  // Ends the pan      Each of these methods is called in the following event handlers (respectively):               IMapControl4.OnMouseDown     // Call PanStart()     IMapControl4.OnMouseMove     // Call PanMoveTo()     IMapControl4.OnMouseUp       // Call PanEnd()      So all of that works fine, the events are handled, the panning starts, everyone is happy. -but- Where the screen actually pans is not where I have dragged my cursor. The map slides around in a somewhat deterministic pattern, but I can't seem to figure out how to compensate for what the API is doing. I have been unable to find any enlightening documentation. Does anyone have experience with this part of the API? Sample code or documentation would be great!


title: Using QGIS plugins from Python

text: Is there a simple way to automate calls to QGIS plugins from a QGIS Python script? Either from console or a plugin? I am ideally looking for a way to specify input/output parameters and bypass GUI. Specifically, I'm trying to use the SimpleSVG plugin in a script that generates a whole bunch of maps.


title: Openlayers Add features performance for 3000 lines

text: We would like to implement the function of Addfeature in openlayers to draw lines and push them onto a vector layer, and overlay this layer onto open street map or google map. Those lines are draw dynamically based on the query results from the database.   The only concern so far is the performance issue since we are anticipating about 3000 lines per operation. Has anyone worked on this kind of project before? Do you think it is too heavy on the client side? Thanks!


title: SDE Performance issue with SQL Spatial labelled lines on one server

text: Here is an issue that has stumped ESRI and SQL Server experts alike. I ask it here just to get more people thinking about it. Exhibit A is this screencast. I have two servers: ROGIS: A dedicated SDE server 10.2. It has all layers in binary, but I created a SQL spatial roads layer on this box for the demo. CAMA1: This is our production server (not a dedicated SDE box) that I created a 10.2 database on to use with SQL spatial. All layers are in SQL Spatial, but I created a binary roads layer for this demo. Irrelevant note: I can't use binary layers on this box because #1 I am not allowed to install the SDE program code (or any programs) on it and #2 I need spatial views. I can't create spatial views against an SDE binary layer without the SDE code installed on the box. Creating a view requires a service and the service is not available if the program has not been installed. I should be able to deal with that limitation, but the line layers have been my nemesis. Watch the video as I show equal performance with labeled points, actually better performance with polygons, and then unacceptable performance with lines - only spatial and only on the CAMA1 server. ESRI says it is my server - but if it is my server, why does it only happen to line layers? There is no performance drop for any other type of layer - ever. My server people say it is ESRI - but if it is ESRI, then why can't I duplicate this performance issue on any other server? I have backed up the database and restored it to more than one other server and the same server. I'm not expecting a solution any more, but if anyone wants to stew on this one with me, I'd appreciate it.


title: How to convert .adf files to shapefiles in ArcGIS

text: how do you convert a .adf file to a shapefile in ArcGIS?


title: How to merge multiple ADF files to a single shape file?

text: I have a set of adf file which use the same structure. How can I merge all ADF to shp file? Does the ogr2ogr command can help in this case?


title: r.viewshed - Can't find with Grass toolbox

text: I'm trying to use r.viewshed and have got Grass installed but can't find it anywhere! under toolbox, I click 'Grass commands (152 geoalgorithms) and have a choice of imagery, raster, vector, etc, etc. under raster I have a long list of tools, but no r.viewshed... anyone know where I'm going wrong? David.


title: OpenLayers ZoomBox control kills SelectFeature event firing

text: I have a navigation toolbar with some common OL controls such as Navigation and ZoomBox on it. I also have a SelectFeature control that isn't part of the navigation toolbar b/c it should be active all the time for vector features. Each layer that is added to the SelectFeature control using setLayers() has a handler registered to the 'featureselected' event. However, in cases where I choose the ZoomBox control my ability to select vector features disappears. I have to refresh the layer to get it back. I can work with the Navigation control (in fact many other controls too) and still have my vectors responding to the select event. Has anyone else experienced this or know a work around? Even if you have a cool Firebug way to troubleshoot this issue I'd like to hear about it. thx mazery


title: How to convert raster data into regularly sampled points?

text: I am wondering if there's another way to convert raster data (ex: DEM) into regularly sampled points. I've used `Raster to Point` under ArcToolbox previously, but if the raster data is huge, that's a lot of points! Is there a way to specify the number of points or to specify the cell width and height so they're nicely spread out? I am aware of the `Create a Fishnet` tool, but that doesn't seem to be working for me at the moment. Not sure what I'm doing wrong.


title: ArcGIS Dissolve leaving feature snippets in dissolved polyons. Repair doesn't fix

text: I'm trying to dissolve some low-level polygons, but the result I'm getting has lots of little pieces of lines left floating around in the output polygons. I've tried doing "repair geometry" on both the input featureclass (before dissolving) and on the output featureclass (after dissolve) and neither fixes the problem. Any thoughts? [Edit: Also: dissolve running without errors, oddly.] ![Dissolve issue image](http://i.stack.imgur.com/X2uSu.jpg)


title: Arcpy: List to point feature class

text: I have a list of lists that contains:               [vala, valb, valc, vald, (pntx, pnty)]     [vala, valb, valc, vald, (pntx, pnty)]     [vala, valb, valc, vald, (pntx, pnty)]      I also have a list of the field names that correspond to vala, valb, etc. I am trying to use arcpy to create a feature class with all the information from the list, with the proper field names from the list of field names. As I want the FC to be a point layer, I thought about using add XY event layer, however there seems to be no option for adding a field list and my x,y coordinates are in a tuple instead of individual list positions for indexing. I could probably create an empty feature class and use an insert cursor, but then how do I deal with the geometry? I am using ArcMap 10.0.


title: How to use CartoDB for citizen comment collection?

text: I'm wondering what would considerations I should make for using CartoDB as a tool for collecting geo-located citizen comments. Currently we're using a javascript / bootstrap application that uses a google map to get a users X,Y location. It requires the manual entry of an address or the movement of the pin on the map to get that X,Y. There are then other form inputs where the user can enter their name, and other comments about the location, their contact info, etc. The form inputs, as well as the XY, are then fed to a google spreadsheet where they are manually extracted to a CartoDB map on our main site. Can CartoDB be used to replace this google doc method, and what do I need to think about in terms of using the SQL API... is it a good practice to expose the necessary information to use that SQL API? How could I use the 'get my location' feature on most browsers to automatically get a users location and feed it into the geometry of row in a CartoDB table? Any other thoughts are appreciated.


title: Recommended ArcGIS Server and RDBMS layout on these two machines?

text: We're looking at setting up ArcGIS Server with Postgres for the RDBMS. We have two machines, one aging and a new hotness. What is the best implementation strategy with these resources? Should we put both Server and Postgres on the new machine, put both on both machines, Server on new and Postgres on old, Postgres on new Server on old? ...or something else entirely? Old and not yet busted:               Year: 2008       CPU: 2x Dual-core Opteron 2.8GHz       RAM: 64GB        Network: 2x 1Gbps       Storage: 1.3TB in RAID 5 (6x 280GB 15K rpm serial SCSI)       OS: Windows Server 2003 x64 (upgrade to Server 2012 planned)      New hotness:               Year: 2014     CPU: 1x 8-core @2Ghz (Xeon E5-2640 v2)     RAM: 16GB (2x 8GB 1600Mhz DDR3L)     Network: 2x 1Gbps     Storage: 3.6TB in RAID 5+0 (6x 900GB 10k rpm serial scsi)*     OS: Windows Server 2012 x64      Storage: this is projected and open to change, we haven't purchased the drives yet. File resources which will be put into the RDBMS. Expected data growth rate: 15%/yr (but really, we have no idea):               File-gdb:   15gb     Rasters:  1000gb (includes overviews)      Internal users, same subnet, mostly gigabit:   * 6 to 10 active daily use ArcGIS Desktop users drawing from the data, mostly read operations, pulling from the central repository for base maps and shared data, adding their own stuff from elsewhere.   * 2 to 3 data editors, but this happens rarely, once a week perhaps.   * 25-50 readers, currently using ArcReader but looking to migrate to web maps (a major reason we're implementing ArcGIS Server to begin with). Projected purpose of ArcGIS Server + RDBMS:   * primary daily use warehouse for the users mentioned above   * Master server for geodatabase replication to district offices   * development and learning area for web maps and services which will eventually be migrated to outside firewall for public consumption (which is ArcGIS Server + Oracle)   * (ArcGIS Portal?) We have whatever licenses for ArcGIS Server needed (from Basic to Enterprise Advanced), but not for Oracle or SQL Server, hence the Postgres for RDBMS specification. There is no Sys Admin IT or DBA staff to dedicate to setting up and maintaining these machines and services, that will be handled by a GIS person who still needs to allocate most of his/her time to regular ol' GIS. (guess who?) This is a preface to saying the solution that makes best use of the hard and software is not necessarily the optimal solution, please keep administrative overhead in mind.


title: OpenStreetmap Multipolygon with Members without role

text: HI i found this relation in Open-Streetmap http://www.openstreetmap.org/relation/1561932 http://www.openstreetmap.org/api/0.6/relation/1561932/full it has only one outer member but it needs the other members to be a valid multipolygon. Is it common that Members without role are treated as outer?


title: How to find the coordinate system of an existing Map in arcGIS using VB.NET

text: I already have a georeferenced base map loaded in ArcMap. I want to find the spatial reference of this map and assign the same coordinate system to a polygon that I created. I can not get a start with the code as I am a beginner.


title: Can you identify attributes of a shapefile on the gps?

text: My company uses Trimble GeoExplorer 6000 GPS units and pathfinder office software. Is there a way once a shapefile is created to bring up the attribute table on the gps unit? We have been loading previously recorded data to the gps as a background file. When I return to a site this allows me to see where the data was collected but I can't see any information to identify the attributes. Any help would be greatly appreciated!


title: USGS FLT Hdr file interpretation

text: I have a legacy program that attempts to read USGS 1/3 arcsec data. When I compare results to GDAL, I find that the lat/lon to pixel conversion is off by 1 line. The reason (I think) is because the legacy code calculates the latitude of line 0 as lat0 = yllcorner + (nrows - 1) * cellsize where yllcorner, nrows and cellsize come from the .HDR file. I see in the GDAL code in frmts/raw/ehdrdataset.cpp that there is no "subtract 1" term: dfULYMap = dfYLLCorner + nRows * dfYDim; I'm assuming that GDAL is right. Can anyone explain why so that a noob can understand? Thanks for the help. -reilly.


title: OSM linestring shown as point

text: I have loaded the following file http://openstreetmapdata.com/data/coastlines to postgreSQL. In visual studio with gdal/ogr and geos enabled: SELECT geom FROM waterpoly WHERE geom IS NOT NULL LIMIT 10; Stored the result in std::vector* multigeom; In a for loop               OGRGeometry* geo  =  multigeom->at(i);     printf("geo type: %ld \n",geo->getGeometryType());      I expected it to be 'wkbMultiLineString' (because it says line strings in the above osm website) but the answer was 'wkbPoint'. Regardless, I have done the following:               OGRMultiLineString* mult = (OGRMultiLineString*) multigeom->at(i);     for( int j = 0; j < mult->getNumGeometries() ; j++ )      {     OGRGeometry* geogeom =  (OGRGeometry*) mult->getGeometryRef(j);     printf("geo type: %ld \n",geogeom->getGeometryType());      } Answer was 'wkbunknown' Can anybody give me the reason behind this? or am I doing anything wrong?


title: Route through water polygons

text: I have a water-polygon grid shape file as shown (Each grid is 1latx1long): ![Water polygon grid shape file in QGIS](http://i.stack.imgur.com/Euw3N.png) I have created this in QGIS and files (coastal lines and land polygons) selected from http://openstreetmapdata.com/data Now if I have given a source grid and a destination grid, I have to come up with different routing ways (shortest path, dijkstra or at-least one of them). pgrouting is the way to go, if I am interested in all the different algorithms. These are my questions: 1. Is there any other simpler way than pgrouting 2. How can I create the road topology for this grid structure.


title: google maps tiling scheme index grid

text: I have a need to cut tiles from a raster with bounds that result in no partially filled tiles at a particular zoom level (no transparency or black/white areas). First thought was to overlay an index grid so I could see how to cut the raster. Is it possible to find shapefile or other description of the tiling grid for google maps or other tiling schemes. Also interested in other idea for achieving this goal. One is to simply programmatically discard tiles with empty areas after the fact. Interested in other suggestions as well.


title: "The Fields collection did not contain an expected geometry field" (ArcGIS 10)

text: I am writing a fairly simple application to build simple polylines. I got most of the application working for the most part, but this part is just baffling me to no end and there is nothing I can find about this problem, so maybe I am alone on this. This is the code:                       IFeatureClassDescription fcDescrip = new FeatureClassDescription() as IFeatureClassDescription;             IObjectClassDescription objDescrip = (IObjectClassDescription)fcDescrip;                  IFieldsEdit fields = (IFieldsEdit)objDescrip.RequiredFields;                  IFieldEdit geoField = (IFieldEdit)fields.get_Field(fields.FindField(fcDescrip.ShapeFieldName));                  IGeometryDefEdit geoDefField = (IGeometryDefEdit)geoField.GeometryDef;                  geoDefField.GeometryType_2 = esriGeometryType.esriGeometryPolyline;             geoDefField.SpatialReference_2 = spatialReference;             geoDefField.HasM_2 = true;             geoDefField.GridCount_2 = 1;             geoDefField.set_GridSize(0, 0);                  for (int i = 0; i < fields.FieldCount; i++)             {                 Console.WriteLine(fields.get_Field(i).Name);                 if (fields.get_Field(i).Name == "SHAPE")                 {                     Console.WriteLine(fields.get_Field(i).GeometryDef.GeometryType);                 }             }                  UID uidCL = new UID();             uidCL.Generate();             UID uidEXT = new UID();             uidEXT.Generate();                  IFeatureClass featureClass = featureWorkspace.CreateFeatureClass(m_name, (IFields)fields, uidCL, uidEXT, esriFeatureType.esriFTSimple, string.Empty, string.Empty);             IFeature feature = featureClass.CreateFeature();      It tells me that it doesn't contain a geometry field... even though it clearly does because it tells me what shape it has in there. I tried using add_Field, but it does the same thing (oddly) if I do. It clearly updates 'fields' since I had it output the type before and after and it changes from polygon to polyline. I looked at this thread and I tried defining everything, but it still gives the error. Any ideas?