title: Updating a Tool Validator Class from a CSV File

text: I have a CSV file which contains a list of clients and different project numbers and project names. This list is generated periodically. The list can contain multiple values for client name but unique values in the project number/name fields. For example, the CSV might look like this:               COMPANY NAME, PROJECT NUMBER, PROJECT NAME          ABC Corp, P123, Mapping Project 1     ABC Corp, P124, Mapping Project 2     Acme, P38, Some Kind of Project 1     BBB Corp, P188, Another Kind of Project     BBB Corp, P189, Another Kind of Project 2     BBB Corp, P190, Mapping Project 1      What I would like to do is create a python tool in ArcGIS 10.2.1 which has two parameters:   1. Company Name   2. Project  The Project parameter would be a concatenation of PROJECT NUMBER, PROJECT NAME in the format: PROJECT NUMBER - PROJECT NAME. I'm trying to program a validation class such that the user is presented with a drop down list of _UNIQUE_ values of the client name. Then, the second parameter would present only the project numbers associated with that client. These values would then populate values in a map layout. So, for example, if the user selects **ABC Corp** from the first drop down, the second drop down would only have two choices:               P123 - Mapping Project 1     P124 - Mapping Project 2      Similarly, if the user selects **BBB Corp** from the first drop down, the second drop down would have three choices:               P188 - Another Kind of Project     P189 - Another Kind of Project 2     P190 - Mapping Project 1      I've successfully got the first drop down to create a unique list of companies. However, I'm having trouble getting the validator class to display properly. I can generate a list in IDLE correctly, I'm just not sure how I can get it to display in ArcGIS. My validator code looks like this:               import arcpy, csv     class ToolValidator(object):       """Class for validating a tool's parameter values and controlling       the behavior of the tool's dialog."""            def __init__(self):         """Setup arcpy and the list of tool parameters."""         self.params = arcpy.GetParameterInfo()              csvpath = "S:\projects\P000000 Pre-Sales and Internal GIS Activities\ArcGIS Toolbox Development\Get XIC Information\CSV\ProjectData.csv"         xicData = []         with open(csvpath,'rb') as csvfile:             reader = csv.reader(csvfile, delimiter = ',', quotechar='|')             for row in reader:                 xicData.append(', '.join(row))              xicData.pop(0)         self.xicData = xicData         pass            def initializeParameters(self):         """Refine the properties of a tool's parameters.  This method is         called when the tool is opened."""              companyset=set()         for i in self.xicData:             companyset.add(i.split(', ')[0])         companylist=list(companyset)         companylist.sort()              self.params[0].filter.list = companylist         return             def updateParameters(self):         """Modify the values and properties of parameters before internal         validation is performed.  This method is called whenever a parameter         has been changed."""              if self.params[0].value:             projectList = self.params[1].filter             companyName = self.params[0]             projectList = []             xicSplit = []             for i in self.xicData:                 xicSplit.append(i.split(', '))             for i in xicSplit:                 if i[0] == companyName:                     projectList.append(i[1] + ' - ' + i[2])                  projectList.sort()                       self.params[1].filter.list = projectList         return            def updateMessages(self):         """Modify the messages created by internal validation for each tool         parameter.  This method is called after internal validation."""         return      The problem seems to be in the updateParameters function. I think my logic is sound, but I don't know where I'm going wrong.


title: How to clip a line layer based on polygons with QGIS?

text: I have a line layer and a polygon layer. Both files have the same SRS. I want in a new shape file only the lines covered by the polygons. I tried in QGIS the `Vector -> Geoprocessing -> Clip` tool but I only get an empty shapefile. How do I do this with QGIS or with OGR? ![enter image description here](http://i.stack.imgur.com/WBxG6.png)


title: Translate Orientation from Sensor data to Geo location

text: I am tracking a device that might loose GPS signal then and there. And when the GPS signal is too low, I should use the accelerometer and Gyroscope sensors data to guess which way they should have gone. I am not doing it in real time. I can store the data and send up for post processing. So all I want to do is from the point (Lat1, Long1) where we had a good GPS, I need to find new location (Lat2, Long2) from the sensors data. I was looking at different algorithms. One of them was inertial Navigational System. I applied Kalman filter and I was able to get to a point to find the Quaternion for each data. Now can some one help me to translate the orientation data to an actual position? What algorithm or formula should I use? Or is there any program available in C# or in any other language? Thanks in advance.


title: Looking for Floodplain Modelling instructions

text: I'm really new to GIS, yet I have a project that I am doing that is GIS entensive. I want to do a flood plain (for a river whose shapefile i have) and publish whatever output (its a map i presume) on a website for guys to access and consume. Can someone help me with an easy to follow floodplain-modelling instructions? I would love to follow the tips and learn more. PS: I am good with software and computers(only GIS is Latin to me at the moment!) Regards Steve


title: Is it possible to add a new line in a non-spatial table using Qgis?

text: While using QGIS, and having loaded a non spatial table (from a dbf or a Spatialite table), is it possible to add a new row to its table attributes? Normally in a spatial layer you have to use "add features button", that obviouslly won't work in this case. My idea was to use Qgis as somekind of frontend to a Spatialite database, with the ability to edit\add features in spatial tables as well in the non-spatial ones.


title: Creating ArcGIS add-ins for both 10.0 and 10.1

text: Has anyone tried to deploy the ArcMap add-in for both ArcGIS 10.0 and ArcGIS 10.1? There is a target version parameter in the add-in config XML file that needs to be specified. After upgrading the code to VB MS VisualStudio 2010 and ArcObjects 10.1 it can no longer be used in ArcGIS 10.0. What are your strategies for upgrading your add-ins from ArcGIS 10.0 to 10.1 while maintaining the compatibility with 10.0?


title: PostGIS feature compare function?

text: I would like to be able to compare features in Layer 1 (source) to features in Layer 2 (updates to source) in order to see if any of the features geometry and/or attributes have changed. I would also then like have a "report" generated stating what has changed. **Edit for Clarification:** Changes in geometry also include finding features that have been added to the new data layer. Deletions might be interesting to have, but additions are more important. I've been looking through the PostGIS functions and can't seem to find any tools that are designed to compare and report differences between 2 layers features, both geometry and attributes. I am looking for something similar to the ArcGIS "Feature Compare" tool. If there is nothing like this in PostGIS, are there other open-source tools that will answer these types of questions? Thanks.


title: qgis.core import error

text: I would want to use the Qgis api for custom desktop application. When I imported the qgis.core module, I get the following error               >>> import qgis.core      Traceback (most recent call last):        File "<stdin>", line 1, in <module>      ImportError: DLL load failed: The     specified module could not be found.      A similar error was reported in the forums,im not sure if the exact solution was reached. Python :ImportError: DLL load failed: The specified module could not be found Forums do suggest that I would have to use the OSGeo Version of python. How would i get to choose the version of python to use? I think this could be a path or a pythonpath.Have given my path and python path information below.Let me know if I had missed any of the directories that should be added for qgis core to get its dependencies met. `PATH=C:\Python26;C:\Python26\Scripts;C:\Python26\ArcGIS10.0;C:\Python26\ArcGIS10.0\Scripts;C:\OSGeo4W\apps\qgis- dev\bin` `PYTHONPATH=C:\Python26;C:\OSGeo4W\apps\qgis\python;C:\OSGeo4W\apps\python27;C:\Python26\ArcGIS10.0;C:\Python26\Lib\site- packages`


title: Trouble Using jQuery UI Range Slider with Cartodb

text: I am trying to use a jQuery UI range slider to create a filter the markers displayed on my map - similar to this post office example. The problem I am having is that on load, sometimes I get the following error: > > GET > http://crainmap.cartodb.com/api/v1/map?lzma=3YCAiICKiYCAgICAgIC9CAjntIUbMky…%2BVRkg&callback=jQuery172041656936635263264_1409006809239&_=1409006810438 > 400 (Bad Request) cartodb.js:6 >> >> send cartodb.js:6 >> >> H.extend.ajax cartodb.js:6 >> >> (anonymous function) cartodb.js:17 >> >> (anonymous function) cartodb.js:17 >> >> l cartodb.js:15 My cartodb layer won't show up on the map. But, if I reload the page again, the error often goes away and my layer loads. I don't understand the error (as it doesn't seem to point to anything relevant) or why upon reloading it the error goes away. My guess is that there is an issue with conflicting libraries or stylesheets that I am loading, since I didn't have this problem until I introduced the jQuery UI library and CSS. That said, the post office example above doesn't have this issue. The following are the libraries and CSS I am loading:                   <link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" />         <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">         <!--[if lte IE 8]>             <link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.ie.css" />         <![endif]-->              <!-- include google maps library *before* load cartodb.js -->         <script type="text/javascript"             src="https://maps.googleapis.com/maps/api/js?key=_____">         </script>              <script src="http://libs.cartocdn.com/cartodb.js/v3/cartodb.js"></script>         <!-- Libraries for the jQuery UI slider (year selector) -->         <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>      My code is similar to that of the post office example I linked to above, but I am using a Google basemap instead of Leaflet. Please let me know if you have any ideas to try or ways to further investigate this error. Thanks


title: Aggregating rasters with GDAL

text: I have a set of files that have been mosaiced into a global VRT in a particular projection and resolution. However, I have a need to report statistics on a (say) one degree grid, where the reported statistics will be e.g. count, mean, mode or some percentile of the input pixels that fall within the grid cell. To make things more fun, there are NODATA instances too. My solution is to create the mosaiced VRT in WGS84 Lat/Long, enforcing an output pixel size so that `1.0 % output_pixel_size == 0` (in other words, I can get an integer number of pixels into a 1 degree cell). Then, you run `gdaladdo` on the VRT and extract what you want. This _should work_ for averages, but percentiles and some other things are a bit more complicated. I could do it in Python, but I was wondering if there's an off-the-shelf solution I could use?


title: Is there a way to get the percentage of different landuse types upstream of a given point?

text: I'm a fairly novice GIS user and know just enough to get in trouble in a lot of cases. I am trying to look at the connection between several measured parameters at a few hundred stations along several rivers and the landuse patterns in the areas drained in ArcGIS 10. I have created basic watershed analysis layers (flow directions, flow accumulation, catchments, etc) for the entire area of interest. Is there a way to easily sum up the land usage for the area drained by each station (i.e. get the number of cells of each type of land use along with the total cells drained) so that I could use that for further analysis? If so, how would be the easiest way to implement that so I don't have to do it individually for each station? I would assume there would be a way to script it, but I don't know anything about scripting in ArcGIS 10. Thanks so much!


title: How to install ArcView3 on 64-bit Windows?

text: How does one install ArcView3 on 64bit Windows? There are numerous threads on the ESRI forums for how to accomplish this, but the solutions are scattered, inconsistent and disjointed. So this is a request to post integrated and "cleaned-up" solutions, don't just copy and paste. Please indicate if the method is specific to x64 XP, Vista, or 7 (and post seperately, e.g. win7 method in one answer, vista in another).


title: Join/append multiple, identical polygon layers into a single layer whilst retaining all attributes?

text: I have run some analysis (zonalstats) on different raster layers using the same analysis polygons. I want to concatenate all these different layers together, i.e. retain a single polygon and have a "wide" table of attributes for each one (needs to be a batch process rather than one layer at a time). The attributes have the same name (e.g. `max`, `min`, `average`) so there would need to be a way to identify which polygon layer they came from when creating the merged table. I could just go into the dbf file and copy and paste into a spreadsheet as the analysis polygons are identical but this doesn't seem very elegant and I am hoping to do this with larger datasets.


title: Trying to install QGIS - missing 1.11 GDAL

text: I just spent the last _n_ hours working on this, and still haven't gotten anywhere, so I'll throw it to the group. I see that other people have asked about this here and here, and I'd be happy to take down this Q if that gets answered. My specs:   * Mac 10.9.4   * Mavericks OS I'm trying to install QGIS. I'm working with the KyngChaos package. It gives me an error on installation, saying, "Failure: The GDAL 1.11 framework is required." I've since tried to `brew install gdal`, which installed the 1.10 framework. QGIS installation still fails. I then did `brew update`, and tried again (which seemed promising). Still fails. I then tried to follow this guy's approach, and `brew install qgis`. This kept my Terminal busy for about 3-4 hours... and still failed. Though I _swear_ I saw a green-fonted gdal library get installed in all that Terminal chatter. FWIW, the `brew install qgis` gave me a slightly different error message:               [ 50%] Built target qgis_gui     make: *** [all] Error 2      No idea what this means. I'm trying to find gdal in my computer via the Terminal: mostly doing `which gdal -a`, though this doesn't return anything. So I'm not sure how to even check that GDAL 1.11 got installed.


title: Grid & Magnetic Bearing in Flex Viewer 2

text: I want to allow users to draw line by using Flex Viewer 2 drawing widget, As a result I want to have magnetic and grid bearing. Any help would be appreciated. Thanks.


title: MrSid layer not showing up using GeoServer 2.5.2

text: I am using GeoServer 2.5.2 on windows. It is running as a service. I followed all the steps to add the MrSID support to geoserver. Now I have the option to select MrSID Raster Data Source. I select MrSid and setup the store (Add Raster Data Source):               Workspace: cite     Data Source Name: test1     Description: test1     Enabled: true     URL: file:data/MrSID/test1.sid      I then click on the SAVE button. Now I get to the "New Layer" screen:               Published   Layer name               Action                  geotools_coverage        Publish        At this point I click on "Publish". Now I get to the "Edit Layer" screen:               name: test1     enabled: true     advertised: true     title: test1     etc      I click on "Save" at the bottom of the page. I then click on "Layer Preview" on the left side menu of GeoServer. The new layer is not there. What step(s) did I miss?


title: How can I copy selected polygon features to a polyline feature class with ArcObjects?

text: I would like to copy selected polygon features to a polyline feature class. (Similar to how polygon features can be copied and pasted inside an edit session in ArcMap) Until recently I've been using the pPolygon2:ExteriorRingCount, pPolygon2:InteriorRingCount method - iterating through the polygon rings and converting them into polylines and so on... As described in **this post** I have a suspicion that the pPolygon2:ExteriorRingCount method might not be working in ArcObjects 10.1 (VS 2010 Express, VB.NET) Although this approach has been working flawlessly until version 10.0 perhaps I am over-complicating things. **What is the best approach for copying polygon features to a polyline feature class with ArcObjects?**


title: How to read the area column in QGIS?

text: I have few problems understanding how units are managed in QGIS. According to the area column I created for a shapefile, the area of a shape is 0.7727... I just checked on Wikipedia and indeed the area of the region is 7,727 km2. So in which unit is the area column expressed? It was my understanding that because my projection was WSG84 all the units are in meters, so why my column doesn't say 7.727×10^9?


title: Converting Esri ASCII raster to Shapefile for CartoDB?

text: I have an ArcGIS grid ascii file (Ramankutty Cropland at 5 minute resolution) that begins as follows:               ncols         4320      nrows         2160      xllcorner     -180      yllcorner       -90      cellsize      0.08332825      NODATA_value  -9999     -9999 -9999 -9999 -9999 -9999 -9999 -9999       ...      Someone gave me this file but did not provide a projection and could not recall what it was. However, I have some reason to believe the projection is WGS1984: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] I would like to be able to convert this to a format that CartoDB could use--an ESRI shapefile. Another person who did manage this, but who also could not recall the procedure, created a polygonal coverage of grid squares (closed oriented loops). The values at the row and column numbers were assigned to the polygonal squares (somehow--I do not know the data structures involved). Is there a way to create some kind of polygonal grid square coverage without using ArcGIS (I'm guessing this was used, but no details were provided to me)? Open source tools would be nice, but if ArcGIS is necessary, so be it. As an alternative, I tried gdal_translate -of GTIFF -a_srs WGS1984.prj ... and uploaded the result to CartoDB, but CartoDB complained that the result was not georeferenced (the_geom lat/lon GeoJSON was empty). (I'm not sure how to apologize for asking such vague and uninformed questions.) Some more info: here's part of a row from the ESRI shapefile of this data that was imported into CartoDB               **id**  1     **the_geom** {"type":"MultiPolygon","coordinates":[[[[-8.7649,37.34027], [-8.87019,37.36377],[-8.79447,37.42393],[-8.7649,37.34027]]]]}     **shape_area** 63274611.152     **shape_leng** 36270.0549322      Another row:               **id**  2     **the_geom** {"type":"MultiPolygon","coordinates":[[[[-8.59219,37.34027],[-8.67854,37.34027],[-8.67854,37.40889],[-8.59219,37.40889],[-8.59219,37.34027]]]]}     **shape_area** 92417860.2     **shape_leng** 38453.683350300001621


title: How to Remove return/newline (\n) character from Field using Python and Field Calculator?

text: I have a geodatabase table with a field that I'm trying to remove return characters (new line). I found this post (How can I remove (chomp) a newline in Python?) of how to do it, however it is not working within field calculator. Here are the code snippets that I tried: * Note return character is not at the end of the string.               !myField!.rstrip()      OR               !myField!.rstrip('\n')      OR               !myField!.rstrip('\r\n')      OR               !myField!.replace('\n', '')      000539 error given for this option: > Description The calculation used by the Calculate Field or Calculate Value > tool is invalid. This error message provided will list the specific Python > error. > > Solution This error code covers a number of Python errors: > > Example error 1: exceptions.TypeError: cannot concatenate 'str' and 'int' > objects. The above is a Python-specific error. The calculation is attempting > to add or concatenate a string and a number. > > Example error 2: Invalid field shape@distance The above is an error using > the geometry object. The distance method is not a valid method of the > geometry object. > > For specific Python issues, consult the external Python help for more > information, or consult the Calculate Field or Calculate Value help for more > information on these tools. OR               import os     def removeReturn(myField):       s = myField.rstrip(os.linesep)       return s      Any ideas of how to remove return characters using field calculator? Thank you!


title: How to make a GIS inventory?

text: My office will be seeing a big change in its GIS section. This section has been operational since the 1980's and has a huge collection of GIS data (i.e., shapefiles, raster files, data, etc) but never been through any inventory. Now it will happen. Is there any automated way to extract all the information about the GIS data (i.e., shapefile, arc-info coverage, layer file, *.mxd, gdb, raster file, and more) from a PC to an Excel file? The information may include date of creation, date last edited, folder or container name, etc.


title: how to create a web app in java(spring framework) with automated service publishing to the ArcGIS server?

text: I am a newbie and my requirement is to create a web application in java. The app depicts the data like success, failures of my orgainsation's ventures at various Geo locations. The geo data is stored as lat/lon in Oracle DB. ArcGIS 10.0 is decided upon to be used. I have to depict the success, failures on a map. Right now all I know is that we need a service published on the ArcGIS for server which will then needed to be used in my web app's map. Also, I have to automate the process of publishing the service on the ArcGIS for server as and when new data becomes available. So far I have been browsing ArcGIS site and I have stumbled upon the ArcGIS for Javascript API and checking out few sample codes. I am quite unsure as how to proceed. Any pointers, tutorials, anything at all towards the right direction would be great!


I'm trying to use the openlayers vector class. And the error occurred:               Acess control allow origin header is present on the request resource. Origin null is therefore not allowed acess      I've put tileOptions and yet the error persists. My GeoJSON file is in the www root of geoserver.               <!DOCTYPE html>     <html lang='en'>     <head>      <meta charset='utf-8' />      <title>My OpenLayers Map</title>      <script type='text/javascript' src='OpenLayers.js'></script>      <script type='text/javascript'>                var map;           function init() {         map = new OpenLayers.Map('map_element', {});              //Create a Format object         var vector_format = new OpenLayers.Format.GeoJSON({});              //Create a Protocol         var vector_protocol = new OpenLayers.Protocol.HTTP({             url:'stops.geojson',             format: vector_format         });              //Create Strategy         var vector_strategies = [new OpenLayers.Strategy.Fixed()];              //Create a vector layer that contains a Format, Protocol, and Strategy class         vector_layer = new OpenLayers.Layer.Vector(             'More Advanced Vector Layer',             {                 protocol: vector_protocol,                 strategies: vector_strategies             },               {"tileOptions": {              "crossOriginKeyword": null          }              });              map.addLayer(vector_layer);                 if(!map.getCenter()){         map.zoomToMaxExtent();      }      }                </script>     </head>          <body onload='init();'> <!-- Chama a função js init() -->           <!--Elemento HTML onde o mapa é exibido -->      <div id='map_element' style='width: 500px; height: 500px;'>      </div>          </body>     </html>


title: Memory and Processing Efficient Approach to Read a Timeseries in Python

text: I am trying to store a timeseries of high resolution raster images containing NDVI values into a dictionary for calculations. I am curious as to which approach may the most efficient when loading multiple large files into memory. I currently have tried two options that are both rather inefficient.   1. I would `loop` through the folder containing all of the images and use GDAL to read the values of the images into a 3D Numpy array.              img_stack = np.empty((image_width, image_length, len(image_files)), np.dtype('f'))          for i, fname in enumerate(image_files):         img = gdal.Open(os.path.join(fn + ("\{0}".format(fname)))).ReadAsArray()                          img_stack[:, :, i] = img                                                                     img = None      After being loaded into the array, a loop would go to every single pixel location and retrieve the value of that location in each image.   2. I would do something similar to the previous approach, but instead of loading all of the images into img_stack first, I would go through the images one at a time to reduce memory usage, but it would result in a longer processing time. Would there be a more efficient way to do this procedure? Possibly using Numpy or GDAL? Thank you. EDIT: The structure of the dictionary is as follows:               z_stack = {x1:               {y1: [z11a, z11b, z11c],                y2: [z12a, z12b, z12c],                y3: [z13a, z13b, z13c]},            x2:               {y1: [z21a, z21b, z21c],                y2: [z22a, z22b, z22c],                y3: [z23a, z23b, z23c]},            x3:               {y1: [z31a, z31b, z31c],                y2: [z32a, z32b, z32c],                y3: [z33a, z33b, z33c]}}      and the iteration to populate the dictionary is:               z_stack = {}     for x in width:         z_stack[x] = {}         for y in length:             z_stack[x][y] = []             for z in height:                 z_stack[x][y].append(z)


title: Where should I start advanced GIS learning

text: I am relatively familiar with most of the GIS stuff. I develop GIS applications as well with open source offerings. Still I find some lapses in my theoretical knowledge in GIS. What resources can you propose which might be good for an advanced GIS learner with a touch of software development? **Edited** One area I think I am weak in is coordinate systems and the theory behind coordinate systems. Update: _"I will mostly appreciate if you could point out one or two books as well"_


title: Vector grid out of range

text: I'm working with QGIS 1.8.0 trying to do some vector grid to a map. This shapefile (the original is a zip and has the following files .dbf, .prj, .sbn, .sbx, .shp, .shx) has some strange CRS and I changed it to WGS84 (I created a copy of the shapefile and changed the CRS form there). Then I tried to do the vector grid but it only appears a huge rectangle (with any divisons) by far bigger than my map. My map has Xmin=-100.1415 Xmax=-97.1442 Ymin=22.207 Ymax=27.6791 and the rectangle Xmin=-100.1415 Xmax=899.805 Ymin=972.231 Ymax=27.6791, so Xmax and Ymin are way out of range. That doesn't happen if I let the original CRS which are defined as USER:100000 - * Generated CRS (+proj=lcc +lat_1=17.5 +lat_2=29.5 +lat_0=12 +lon_0=-102 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs), but I don't have any idea what that CRS mean or how to convert it.. Please help! Thanks Regards! ![enter image description here](http://i.stack.imgur.com/Rg1o9.png) ![enter image description here](http://i.stack.imgur.com/YF8HN.png)


title: Sensitivity analysis for coarse scale GIS epidemiological model?

text: I am working on an epidemiological model with disease incidence rate as dependent variable and environmental factors as independent variable. Disease data is available at county scale whereas environmental data is in raster format that can be re-sampled as needed. Scale plays a major role when we talk about modeling as a model may be good at one scale and not so good at the other. For this reason I think conducting sensitivity analysis may be the right option. My question here is how to approach based on the data available for study. Any ideas, links to articles or journals is much appreciated.


title: How to call a method when self.iface.actionSelectRectangle().trigger() is released?

text: In my QGIS python plugin I use "self.iface.actionSelectRectangle().trigger()" to select features. I also have a button which changes the attributes of the selected features. Is there a way instead of using a button to change the attributes, to call the method automaticaly after a selection was made using "self.iface.actionSelectRectangle().trigger()". Thank you and regards


title: How to find Entropy in land use (Voronoi polygons)?

text: I have a shapefile of land use in Montreal. It is composed of polygons. There are seven land uses: Residential, Commercial, Industrial, Waterbody, Parks, Open Area and Government. I need to find Entropy from this layer. Can anyone suggest how to do that? I am using Arcmap 10.1


title: I have a database in PostGIS, is possible using CartoDB? or I need another map server?

text: I have a data base in PostgreSQL/PostGIS, and I want to offer to my users a way of visualize it, Is it CartoDB the best option? It is possible? Or which is the best option around? (Please provide links to tutorials or something similar)


title: EPSG:4326, EPSG:3857, JOSM and unprojections

text: It is said here that EPSG:4326 is not a projection.   In my mind, a projection is a transformation of the surface of the Earth producing a flat image, notably a bitmap.   We know that WGS84 (World Geodesic System '84) is a model to reference the Earth surface. It's an angular coordinate system and not a projection. When I request an image from a WMS server and I use EPSG:4326, I receive a bitmap image. Hence, in my mind, EPSG:4326 is both a projection and a coordinate system used to locate the image (its dots). The projection is ~~Mercator~~ Equidistant Cylindrical and the coordinates are WSG84. JOSM is said to be unable to reproject a bitmap, that is, to transform a bitmap image from one projection to another. However, if I choose EPSG:3857 as the projection JOSM uses to display the map "at the screen" (in a window), JOSM is quite able to display 4326 from the server (but not other projections). Hence, the image must be "the same", more exactly "not to be reprojected". This seems incoherent with what you have just answered (4326 and 3857 displaying differently). So what's going on there? **Have I got that right and is EPSG:4326 a projection or not?** (in bold on iant's request)   BTW, I read this, seeming to say that an EPSG is both projection and coordinates:   "Les codes EPSG constituent une liste des systèmes de coordonnées géoéréférencées de projection"


title: Enable Archiving failing on sde 9.3.1 and MS SQL Server 2008

text: I am trying to enable archiving and am getting this error: Violation of PRIMARY KEY constraint 'archives_pk'. Cannot insert duplicate key in object 'dbo.SDE_archives'. Is this saying that there is already a primary key in the dbo.SDE_archives table or there is already a primary key which is called archives_pk? I deleted all versions, unregistered as versioned and moved all edits to base, then re- registered as versioned and tryed to enable archiving again with the same error. My overall question is, how do I approach the dba because I don't have access directly to management studio on SQL Server 2008 nor would I know what I am doing?..Thanks.


title: How to enable Map Tip display text in qgis and qgiscloud?

text: I'm using the free version of qgiscloud and qgis 2.4. I noticed that if I'll use the HTML option in "Map Tip display text", the map in qgiscloud will only show the title of the layer when I hover/click but it's working if I used the Field option. I would like to use the HTML option since I want to display/style multiple values based from an expression from different attributes of my layer, instead of using the Field option which will only display the selected field.


title: How can I synchronize Google Maps, Wikipedia, Mapmyindia, and Bing Maps data on one webpage?

text: I want to combine maps from Google maps, Wikimapia, Mapmyindia and Bing maps on one web page with synchronization like in Dual Maps. For example, if I pan on Google maps it should show the same location on all maps. Does anyone know how to do this? Any help is appreciated.


title: Hyperlinking Access db to ArcMap

text: I am trying to hyperlink from MS Access to ArcMap to view specific features. Within MS Access, I have 1400+ lines catalogued. I would like to click a button and view the line in ArcMap. Any ideas on how to do this?


title: What does this python error in terrain profile plugin mean?

text: I get this message when trying to create cross sections from a raster layer. It happens only when I try to plot from a selected polyline. When I choose temporary polyline, the plugin works fine. ![error message ](http://i.stack.imgur.com/oOLXJ.png)


title: Create a ground overlay kml from georeferenced raster

text: I have a world georeferenced raster (5m resolution, ~4000 x 4000 pixels) that I would like to display in google earth. I am looking for a simple and effective way to generate this kml file.   * Using ArcGIS layer to KML outputs a kmz and resample the raster (I went as far as 3000 dpi, but quality is still pretty low)   * Using GDAL raster2tile is slower than ArcGIS, but it also resample the image, yielding low quality output (I do not know how or if it is possible to tweak dpi or quality).   * Using R maptools::GE_SpatialGrid function gave the best results so far, as it simply outputs a xml file specifying the extent of the raster. Though it does not display fully in Google Earth (no error message). To sum it up, my preferred method would be to output a kml file, that would be entirely displayed in google earth. I like the kml idea of simply specifying an extent, it is easy to update the raster without any more processing.


title: Using macports python 2.7 with macports qgis

text: I installed qgis through macports on my mac running OSX 10.8.2 but when I run the application (qgis 1.8) it says that I don't have python-gdal installed. I searched google and it appears that it is because qgis is using the pre- installed version of python that comes with OSX. I have my own version of python 2.7 built through macports, and would like to use it with qgis if possible. Does anybody knows how to tell qgis to use that version instead? Thank you all for your consideration.


title: What is the best way to connect spatial data with attributes in Excel table?

text: I have many attributes which are stored in an Excel table. They refer to USA counties. I need to somehow connect those attributes to polygons in some format (don't know which is the best) and visualize it by Leaflet or similar API. Those attributes need to be in popups. What do you recommend? How can I connect spatial data (polygons of counties) with attributes stored in Excel table? I'm using software like ArcGIS and Quantum GIS. I am opened to MySQL and PostgreSQL regards to databases if you recommend those. Please try to explain with more details and exact steps so I can be sure I understand.


title: Given a lat/long point, determine if it's land or water?

text: I have a PostGIS-enabled PostgreSQL 9.1 installation with the 10M physical dataset from Natural Earth imported. It's been converted to 900913, and in QGIS I can visualize the data. So the plumbing's all set. I have a very simple task: I'd like a SQL query to determine if a given point is land or water. Here's a very simple use case: user mouse-downs on a slippy map, the server takes that point and replies "that's land" or "that's not land." I feel that this is surely accomplished with the ne_10m_land layer (with enough accuracy for my purposes). I'm a newbie to GIS, so while I've tried to do my homework I feel like I must be missing something really obvious to accomplish this...


title: Specifying which ArcSDE feature class Geoprocessing Service is to update?

text: I want to have a geoprocessing service update sde. I am getting an I/O Error saying data doesn't exist. I imagine because the connection file (copied from my ArcCatalog folder) I placed next to the script isn't working through digital osmosis. I found an answer on GIS.se outlining some steps to have a geoprocessing service write to sde. I have successfully hit sde with desktop script tools. Do I need to log on to the server as the arcgissoc user and build database connections? Is there any documentation?


title: Interpolation of 17 data points - temperature data

text: I have 17 location points here in Iceland: weatherstation points. It's a 10-year, month-to-month, composite of temperature values for each station which means 120 values for each station. 2040 values overall. Since I only have 17 station I only have 17 values visible on my map. What I want to do is interpolate these points to create a temperature map for the area and I want to be able to compare them, f.i. compare june for every year and make a map of that - compare june-sep for each year - compare december for 5 of those 10 years etc. I basically want to be able to compare what I want. The distance between each point varies but the area is fairly small so only a few kilometers between stations. When the interpolation is done I hope to be able to do a time animation from the data. This is a school project. I am attending The University of Iceland. So, which method should I use and how? Thanks in advance. Einar Ingi


title: Using Google Map API for Business with Openlayers

text: Has anyone used the paid version of Google Map API (for business) with OpenLayers? I am currently using the free version and wonder what the difference is, from both the end user and developer perspectives? I've read the terms on Google site but couldn't find anything specific enough for working with OpenLayers. For example, does it support higher zoom level with clearer satellite imagery? Thanks!


title: What determines "west" in Antarctica?

text: Hopefully this isn't so far afield as to get banned - apologies in advance to those who think it doesn't belong. This article discusses a region of Antarctica which is described as "West Antarctica". However, Antarctica is a roughly circular mass centered on the South Pole. Hence any boundary region is north of the center of mass. I suspect there's a convention for naming a region with a compass direction, perhaps relating to the prime meridian or some such, but I can't find information on this. It's just a matter of curiosity, but I would like to know how the region in question comes to be "west".


title: How to create a button with QGIS

text: Comment créer un bouton avec QGIS? Bonjour, Je suis nouveau sur le site et je suis francophone, je cherche à crée un bouton avec QGIS mais je n'est pas arrivé à faire ce petit exercice s'il vous plait si y'on a un tutoral ou quelqu'un qui peut m'aide, et merci d'avance. Farhat. * * * Hello, I'm new to the site and I am French-speaking. I would like to create a button with QGIS but I haven't yet succeeded with this little exercise; so please is there a tutorial or someone who can help me? Farhat.


title: Could use a bit of XAML guidance when designing with ESRI Silverlight Viewer

text: I'm trying to implement a version of **this** in my web map: As you can see, part of the XAML is:                   <esri:Map x:Name="MyMap" WrapAround="True" ExtentChanged="MyMap_ExtentChanged" ExtentChanging="MyMap_ExtentChanged">             <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer"                  Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>         </esri:Map>      For me, the problem lies in that I'm trying to create a new widget that will show this information in a little window that pops up when someone opens it. The layers are defined elsewhere in the project (in an AppConfig.xml file), I don't need to create a new map in this widget. I just want something that can get the extents that the user is zoomed into. That's what I don't know how to do... I'm not sure how to get that information if I'm not defining the map layers in that particular XAML file I created for the widget. I apologize if there's some really easy answer. I've been working on this web map stuff for only a couple weeks and I run into this type of issue a lot, where sample code is shown defining layers and going from there... but it's not necessarily transferable to designing with widgets. Or maybe it is, and I'm just a complete newbie to Silverlight, C# and XAML :(. Oh, and I'm working on adding a widget to **this**. It'll just go next to the Print one =).


title: Solar analysis; Are there any issues with splitting large DEM

text: I am trying to run Solar analysis in ArcGIS and it is an enormous DEM of a very mountainous region. I'm obviously going to have to split the DEM, but I was wondering if there are any issues with doing this? e.g. if you analyze a section separately from an adjacent mountain that would have shaded this section. I am also curious if there are any open source solutions? Thank you very much.


title: Calculating the Centroid of polygon in modelbuilder (VBA to Python)

text: Got an easy one, that's got me stuck. I'm moving some models that were created in 9.3.1 to work in 10. Part of the model is calculating the X coordinate of a polygon to a specified field. The code that works (in 9.3.1) is               Dim Output As Double     Dim pArea As IArea     Set pArea = [Shape]     Output = pArea.Centroid.X          Expression = output      It doesnt work in 10 as i get the following error.               General error executing calculator.     ERROR 999999: Error executing function.     Expected end of statement     Failed to execute (Calculate Field X_COORD).      I've tried the following using the python parser               def calc(shape,x):         x = "shape.CENTROID!.split()[0]         return x          calc(!SHAPE!, !X_COORD! )      But that gives an error - invalid syntax on line 2. Any pointers? Thanks


title: How to convert QGIS Field Calculation to ArcGIS?

text: I have a field calculator expression I use in QGIS to generate unique IDs that are sequential, but start with a text string. I now need to perform the same thing in ArcGIS, but I am unsure of how to start. Here is my QGIS expression:                'cos' || ( tostring(  $rownum  + 1000000))      I was thinking that in ArcGIS it would be something like this:                "cos"+InStr( [FID] + 1000000 )      But it returned an error. Any help would be appreciated. Thanks...


title: River drain: r.watershed to vector is not working

text: I want to vertorize the result of r.watershed (accumulation). After using r.to.vect I got the message that I have to use r.thin before. So I did, but the message comes again and again. ![enter image description here](http://i.stack.imgur.com/kd66C.png) What I am doing wrong? Is there a better way to get a map of "potential" rivers of my area? Thanks!


title: How to access the timestamp value from Overpass meta requests with Openlayers.Format.OSM?

text: I am using Overpass-api to request data, then display it in an interactive webpage using Openlayers. When user clicks on some feature, the information is shown in popup. As of now, the page is working nicely and displays all the tags. I want to add the **"last updated time"** of the feature in the popup, which will correspond to the **"timestamp"** value in the **"Overpass-api meta request"** but i cannot access that value.


title: Fortifying re-projected shapefile for ggplot2 in R

text: I have a shapefile of US county boundaries which I got from the NHGIS. I can load the file using the `rgdal` package and see information about it:               library(rgdal)     shp_1860 <- readOGR("shp", "US_county_1860", stringsAsFactors = F)     summary(shp_1860)          # Output:     Object of class SpatialPolygonsDataFrame     Coordinates:            min     max     x -2356112 2258225     y -1337373 1565782     Is projected: TRUE      proj4string :     [+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0     +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0]      You'll notice that the projection is a little unusual. But what I really don't understand is the latitude and longitude: what do those values mean? Why aren't they latitudes and longitudes in the vicinity of the United States? I can fortify this shapefile for use in ggplot2, and plot it without a problem.               library(ggplot2)     shp_1860_df <- fortify(shp_1860, region="GISJOIN")     p <- ggplot() +       geom_map(map = shp_1860_df, data= shp_1860_df,                color = "black", fill = "white", size = 0.1,                aes(map_id = id)) +       expand_limits(x = shp_1860_df$long, y = shp_1860_df$lat) +       coord_equal()     print(p)      I get a map just fine with that code. If I replaced `coord_equal()` with the more logical `coord_map()`, R and my computer always crashes because memory use skyrockets. I presume this is because of the weird coordinates. I thought I would re-project the shapefile in order to plot it.               shp_1860_proj <- spTransform(shp_1860, CRS("+proj=longlat +datum=WGS84"))     summary(shp_1860_proj)          # Output     Object of class SpatialPolygonsDataFrame     Coordinates:             min       max     x -124.7625 -66.94993     y   24.5211  49.38436     Is projected: FALSE      proj4string :     [+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0]      Notice that the latitude and longitude now have values that make sense. I can plot this new shapefile using base R without a problem, e.g., `plot(shp_1860_proj)`. But when I try to fortify it, I get an error:               shp_1860_proj_df <- fortify(shp_1860_proj, region="GISJOIN")     Loading required package: rgeos     rgeos version: 0.3-1, (SVN revision 413M)      GEOS runtime version: 3.3.3-CAPI-1.7.4       Polygon checking: TRUE           Error in createPolygonsComment(p) :        rgeos_PolyCreateComment: orphaned hole, cannot find containing polygon for hole at index 6      What is the right way to go about re-projecting and then fortifying this shapefile? Alternatively, can I re-project it after I've fortified it?


title: How can I convert Horizontal dilution of position to a radius of 68% confidence?

text: I am working at mobile app that uses external GPS module. What I need is to calculate accuracy for the fix from GPGGA command to be able to compare it with my mobile platform's GPS accuracy. Mobile platform uses `the radius of 68% confidence` measured in meters as an accuracy. My question is: what is `Horizontal dilution of position` in `GPGGA` command? How can I convert it to `the radius of 68% confidence`? I used this description for my parser implementation.


title: Editing a stand-alone table in ArcGIS API for JavaScript

text: I am new to scripting and the API, and it would be good to have a clear idea of what to look into for this task. I am trying to let users add information to a table (but not edit that table in any other way). Simply put, each time a user clicks the Submit button a new row will be added to the table (with the information that the user decided to submit – NULL values are fine if the user does not fill out all fields). Can someone help me out with the workflow and let me know what I need to look into? I have been looking into the Attribute Inspector, and I would be fine with using that somewhere on my page (it does not need to pop up when a user clicks something – always having it on the page is fine). I found some code posted by tmichael81 (03-25-2011 02:35 PM), but it is using an older version of the API and I am not sure if that would be usable with my code. Using a proxy page confuses me as well; is that always necessary? Again, I am a beginner, and I am doing this for a master’s project. It does not need to be perfect; I can write a whole chapter about what I would be doing differently in the future. Whatever implementation works best for a beginner is fine with me. Thank you so much.


title: How to select route lines that fall outside ZIP boundaries

text: I have two tables. One of route lines, with associated Zip Codes, and another of Zip Code boundaries. Some of the lines cross over their Zip boundaries. Below is zoomed in picture demonstrating my problem. ![enter image description here](http://i.stack.imgur.com/8p5JM.png) The areas circled in gray are where I would have to go in and change the boundaries to encompass the route. They are color coded by Zip Code. Is there a select by attributes solution to this, that would show me which lines are outside of their respective zones? I am using ArcMap 10.2, Thanks for any possible help!


title: How do you set the TimeZone for a feature layer in ArcGIS JavaScript?

text: The author of this question says: > Esri recommends that databases are in UTC time. And if I’ve got this right, > unless you set a time zone in your layer, you are entering a date in a date > field as UTC. My question is how to do this? I found this in the esri api, but I'm not sure what values are acceptable for the `timeZone` parameter since it takes a string value. Does it accept the Short codes, long named values, time offset, something else? Where is the documentation showing what this parameter accepts?


title: Deleting Large Number of Features

text: I have been having issues deleting large numbers of features (> 1,000,000) from a feature class in ArcMap. I can't seem to get higher than a few thousand before it freezes indefinitely, sometimes overnight, before crashing. Selecting the features I need and exporting is not an option here because I have to work within a specific gdb with a predetermined structure, and I'd prefer to just delete the features and not mess with deleting/replacing entire layers. The layer contains approx. 1.2mil records. It's a file geodatabase. Any ideas?


title: Build a Raster GIS Web Application

text: We need to build a Web based GIS application for Raster data computation (analysis). All the maps are in form of raster images. We are failing from a week to find a proper tool which allows fetching, viewing and computing of raster data easily. Let me mention here, We need to work on open source tools. Can you please guide me to proper direction?


title: erasing overlapping polygons from same layer

text: Hi there I currently have a shapefile with 5 catagories of overlapping polygons ranked 0-4, 1 is the most recent polygon, four is the oldest and 0 is undefined. I am looking to use model builder to seperate this file into each of the five catagories and then merge the entire layer diplaying only the highest ranked polygon (no overlapping older/lower ranked polygons drawn) as the file has over a 1000 polygons and the goal is to speed up drawing and use the final layer as asa reference to quickly visually identify the most current file for an area. New to modelbuilder.. thanks for any suggestions


title: How to transform data points from WGS84 to NAD27?

text: Preface: I have a set of lat and long data points from Google Maps, which I believe are in WGS84. My project data is in NAD27(BLM14). These points are in West Texas, where NAD27 differs from WGS84 by about 50 meters. Using QGIS, I loaded my shapefile into one layer and set the CRS to WGS84, then I loaded the same data again and set its layer to NAD27. I was hoping to see a difference between the two layers, but I saw none. (I zoomed in to 47:1.) Question: Did I actually transform my data points from WGS84 to NAD27? If so, shouldn't I see a discrepancy? I checked the properties of the layers, and one says `+datum=WGS84`, while the other says `+datum=NAD27`. Am I missing something obvious? (I never took any GIS classes in school, and I've only been working at this for a few weeks.) Should I use the NADCON converter at http://www.ngs.noaa.gov/cgi- bin/nadcon.prl to convert my WGS84 coordinate data to NAD27? Or is there a QGIS or (better) an OSGeo solution?


title: Using QGIS Icons in Private Projects

text: I am looking at a software development project where we will make the software open source. The GUI will have icons, and I like the look and feel of some of the icons on QGIS 2.0. Are there any licensing restrictions or issues with using icons from the QGIS project in other software development projects? Thanks...


title: Effectively displaying demographic data on a printed map

text: I would like to plot the following per zone (30 zones total) data on a printable/non interactive map:   * Average age   * Average household income   * Number of households   * Population density   * Number of people   * Number of workers How would you display the above 6 layers effectively on one map?


How to Draw/plot or identify in GoogleMaps with below PointData? Below are the points generated from spatial cadastre software. PointName Xpos Ypos _1 341.0926 527.9615 _10 669.1454 527.9615 _2 426.6714 527.9615 _3 450.4432 527.9615 _4 455.1976 527.9615 _5 474.2152 527.9615 _6 547.9084 527.9615 _7 552.6628 527.9615 _8 583.5662 527.9615 _9 612.0926 527.9615 10 669.1454 1026.984 11 797.514 527.9615 13 450.4432 100.2282 14 341.0924 955.6949 15 669.1236 1026.984 16 612.0926 1212.335 17 583.5662 1240.851 18 204 527.9615 2 426.6712 1155.304 4 455.1978 1126.789 5 474.2152 775.0966 6 547.9084 1031.737 7 552.6628 879.6536 8 583.5662 879.6536 9 612.0926 1026.984


title: register to event in openlayers 3

text: I have a web application in openlayers and I am starting to rewrite it to openlayers 3. In the application i have some features that i need to delete/move/add/edit the features then to save it to the server, so in the previous version i did it like this: added a new control, and an event to the control. this is all the controls in the previous version:                   controls = {         point: new OpenLayers.Control.DrawFeature(editable,                             OpenLayers.Handler.Point, { **featureAdded: onCompletAdd** }),         line: new OpenLayers.Control.DrawFeature(editable,                             OpenLayers.Handler.Path, { **featureAdded: onCompletAdd** }),         polygon: new OpenLayers.Control.DrawFeature(editable,                             OpenLayers.Handler.Polygon, { **featureAdded: onCompletAdd** }),         regular: new OpenLayers.Control.DrawFeature(editable,                             OpenLayers.Handler.RegularPolygon,                             { handlerOptions: { sides: 5} }, { featureAdded: onCompletAdd }),         select: new OpenLayers.Control.SelectFeature(                     editable,                     {                         clickout: true, toggle: false,                         multiple: false, hover: false,                         box: false,                         toggleKey: "ctrlKey", // ctrl key removes from selection                         multipleKey: "shiftKey" // shift key adds to selection                          }                 ),         modify: new OpenLayers.Control.ModifyFeature(editable, { **onModificationEnd: onCompleteMove** }),         deletef: new OpenLayers.Control.SelectFeature(editable, {             clickout: false,             box: false,             toggle: false,             title: "Delete"         })     };      its calling the events featureAdded,onModificationEnd etc... and for delete i register to the event 'featurehighlighted' like this:                   controls.deletef.events.register("featurehighlighted", this, function (e) {         editable.removeFeatures([e.feature]);     });      so how can i do it in openlayers 3?? i didnt find any helpful example or something in the api.


title: bounding box in osm files

text: I have a osm file,i convert it to pbf file by osmosis.but it not convert to .map file.i use this in cmd:               osmosis --rb     file=city.osm.pbf -mw file=map.map bbox=34.3635451292,30.0247495993,57.513131979     3,53.2954765066      get it ERROR:               SEVERE: Execution aborted.     org.openstreetmap.osmosis.core.OsmosisRuntimeException: Argument bbox for task 1     -rb was not recognised.      what is this?! My Osm File Bound Tag:               <bounds minlat="30.0247495993" minlon="53.2954765066" maxlat="34.3635451292" maxlon="57.5131319793"/>


title: How to calculate the head drop along the river automatically in ArcGIS?

text: I am calculating the hydropower potential of a large river basin. I have already had the hydrological modeling of the large (53000 km2) river basin and also I have DEM of the basin and river network. I am trying to calculate the cascade of hydropower potential along the river network. I want to start at any downstream point of a river (for hydropower station) and move upstream along the river in such a way that the head drop between the initially start point and final point would be greater than or equal to 10 m. When the head drop is more than or equal 10 m, I would like to move 1000 m upstream for next hydropower station assuming this as the second point for hydropower station. From this second start point I want to move upstream such that the head drop would be greater than or equal to 10 m. Likewise I would like to repeat along the whole river network till the end of river. I could not work out it. Please help me how can I do it automatically and manually as well. As my river basin is very large (53000 square kilometer) , I want to do it automatically in ArcGIS.


title: Toblers's Hiking Equation and Slope Dilemma

text: I'm trying to use Toblers's Hiking equation to determine economical backgrounds of some hillforts. The equation is anisotropic which means that the speed of movement that it calculates differs whether you are moving up or down the same slope. For exampe, moving downwards on 5° slope is faster than moving upwards the same slope or even moving on the flat terrain. And here is my dilemma: ArcMap's Slope only calculates positive values for the inclination so as I understand using Slope in the equation is useless. I also tried the Path Distance Tool, without using any cost raster, only DEM as Surface Raster and Vertical Raster in the Vertical Factor Parameters, as Vertical Factor I used table downloaded here. This table apparently defines the vertical-factor graph but I really don't know (and would really like to know) how is the table used in this method. Is it possible that this method actually calculates also negative slopes as the tool requires starting point(s) for the calculation and therefore knows the direction of the slopes in relation to the starting point(s)? Or the tool calculates the "ordinary" Slope and then reclassifies it according to the table? I hope someone knows the answer or can at least direct me to correct section of this forum. Here is the image of how the result should look like: ![enter image description here](http://i.stack.imgur.com/kgijN.jpg)


title: Longitude range NETCDF vs ASCII

text: I am trying to preprocess a netcdf dataset with arcgis such that it has the same extent, cellsize and format as an ascii dataset I am using. Both are visualized in the image below: ![netcdf and ascii dataset](http://i.stack.imgur.com/Rm8UZ.png) The big one in grey is the netcdf dataset, it has a longitude range of 0-360. The small dataset in Black is ascii, it has a range of -180-+180 decimal degrees. Problem is, the netcdf dataset is split right at the greenwich meridian, which splits africa, my region of interest. Now, i can change the prime meridian in the dataset to -180°, which makes the image look right, and both layers are congruent. Problem is, I want to clip the large dataset with the extent of the small dataset (rectangular), but since the minimal X is -30, the clipped image is cut exactly at 0 degrees. I tried to shift the whole dataset to the left (X-180°) but then again, it cuts off at 0° Thanks for the help


title: Which GUI system for my apps?

text: Apologies for such basic questions, but google really doesn’t seem to be my friend today. I am a long-time programmer, new to GIS. I am trying to get a feel for various aspects of GIS. In addition to my question about database, I am wondering about a GUI. The sort of applications I am liable to code would things like:   * fleet management (land or ocean based vehicles)   * employee tracking   * inventory control (at a granularity of a physical position accurate to with a metre or so)   * errm, that's about it, really I would normally expect to be tracking no more than 1 few hundred (maximum, possibly a few thousand) items. Sometimes the items will be located in the same (large) building, series of building, city, country or world-wide, depending on the application. I will be visually representing them either on a custom floor plan of a building but, more likely, in Google Earth or something similar.               moderator note [Please make these separate questions you will get better answers from users]      Question: what are the major alternatives, given that I wish to develop a marketable product? (which implies a stable GUI with good support) Question: which of these would be cheapest for me as a developer? (e.g, I believe that Google Earth is free up to a certain number of views, but some more commercial rivals may require me to invest a few $k in their software long before I can develop my app & see return on my money) Question: given the sort of applications which I am liable to develop, which system would best meet the needs of my end users, rather than me as a developer? Question: given that it is a business app, would a Windows desktop program be acceptable or should I be looking only at browser based, given the trend towards slate PCs and smartphones? Question: I have done some reading, but was thinking of taking an online course. This one looks excellent, but alas is not currently available. Can anyone recommend another, preferably free, or a good online source of information and training? Thanks very much in advance, and apologies for asking such a basic question. I _did_ google, but with no conclusive result, so thought that I would ask the experts.


title: how to get a low level road network from openstreetmap data?

text: I've extracted the road network of a city from openstreetmaps (filetype: osm). One part of the road networks look like this: ![enter image description here](http://i.stack.imgur.com/KG9Xd.png) However, there are too many details in this data. I'd like to represent each road with just one linestring, just like this: ![enter image description here](http://i.stack.imgur.com/k052G.jpg) Is there any convenient (or maybe a tricky) way to reach that? I've searched around our site, I found some map skeletonization/genratzation may help, but I'm not quite sure about that. I've also tried the "network toplogy cleaning" function in OpenJUMP, but it didn't work. I would very happy to see a software/library can help me on this. Or, is there any alternative way to extract rough(low level) road network of a city from other map source?? Thanks you guys very much!


title: How to convert GeoDa .GAL or ArcMap .SWM file to Matlab (.dat)?

text: I want to convert a spatial weight matrix from either ArcMap (.SWM file) or GeoDa (.GAL file) to an .dat Matlab file. So far, I only found the STATA package spwmatrix to do this. But the command line . spwmatrix import using C:\data\wcontig.gal, wname(wcontig) xport(wcontig, dat) only results in an error "File wcontig.dat cannot be opened" . Does anybody know how to fix this or another way to do this?


title: Run ftools multiparts to singleparts from PYQGIS

text: Is it possible to run the _multiparts to singleparts_ function from the console with the processing_runalg function? Or is there another way?


title: How can I verify time-invariance for spatial gradients of air pollution?

text: I have data from a network of NO2 passive samplers. Measurement are repeated in the same positions in different years. I need to verify if spatial gradients in air pollution remain constant in time, independently from the absolute NO2 measured concentrations (e.g. in a certain area pollution is always higher than in other areas). Which statistical/geostatistical analysis should I use? PS. I am wandering if a possible solution could be to normalize each sampled NO2 concentration by the average concentration of all samplers in each year, then do some kriging and compare in some way different maps...


title: How to copy attribute values of fields in selected features of one layer to another Qgis programmatically?

text: I am trying to get the values of attributes of the selected features of a layer field by field and copy to another layer that I created in qgis with pyqgis. Is here a example for this. Every example I found leaded me to the dead end.


title: Areas where DGPS with post processing (not RTK) is still required

text: I am wondering in which domains or countries where Differential GPS (DGPS) with post processing (not Real Time Kinematic [RTK]) is still required? It's known that RTK has been rapidly adopted by cadastral services in several countries, but I wonder if DGPS with post processing is still required? And why we still need it when we can accomplish the same task using RTK?


title: Merging different tag filtering with Osmosis

text: I want to extract the different points of interest from OpenStreetMap. Some of them are represented as ways (e.g., a large sport center might be represented as the building, i.e., as a way), others are represented as nodes. I am using Osmosis to export these elements from the Swiss version of OpenStreetMap. I'm trying to filter sport, leisure and amenity keys and then merge them: > osmosis --read-pbf file=switzerland.pbf --tf accept-nodes sport=* --tf > accept-ways sport=* --tf reject-relations outPipe.0="sport" --read-pbf > file=switzerland.pbf --tf accept-nodes amenity=* --tf accept-ways amenity=* > --tf reject-relations outPipe.0="amenity" --read-pbf file=switzerland.pbf > --tf accept-nodes leisure=* --tf accept-ways leisure=* --tf reject-relations > outPipe.0="leisure" --merge inPipe.0="sport" inPipe.1="amenity" > inPipe.2="leisure" --write-pgsql host=128.178.1.1 database=myDB user=myUsn > password=myPwd It is based on the description of tag-filtering on Osmosis detailed usage page. I have this error message that I don't understand: > The following named pipes (leisure) and 0 default pipes have not been > terminated with appropriate output sinks. I'm new with Osmosis. Sorry if this is a stupid question. But I cannot find the error. Thank you in advance.


title: WCS: Raster Size Out of Range Error even if within Capabilities' Lower and Upper Corner

text: I'm fairly new at WCS so bear with me if this is a really stupid question, but I can't really understand the problem. I'm trying to retrieve some DEM data from the Italian Ministry of Environment's freely available datasets, which are structured as a Web Coverage Service. In the capabilities of the dataset I'm interested into (http://wms.pcn.minambiente.it/wcs/dtm_75m?service=wcs&request=getCapabilities) it clearly states that the Bounding Box limits are the following:               <ows:WGS84BoundingBox dimensions="2">     <ows:LowerCorner>6.53911455679 35.2154346311</ows:LowerCorner>     <ows:UpperCorner>19.6147808261 47.1364182243</ows:UpperCorner>     </ows:WGS84BoundingBox>      But if I try to send the following getCoverage request:               http://wms.pcn.minambiente.it/cgi-bin/mapserv.exe?map=/ms_ogc/wcs/dtm_75m.map&service=WCS&version=1.1.2&request=GetCoverage&Identifier=EL.DTM.75M&BoundingBox=10.27,41.80,13.36,43.72,urn:ogc:def:crs:EPSG::4326&format=image/tiff      The server keeps returning me this error:               <ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xmlns:ows="http://www.opengis.net/ows/1.1" version="1.1.2" xml:lang="en-US"  xsi:schemaLocation="http://www.opengis.net/ows/1.1  http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd">     <ows:Exception exceptionCode="width/height" locator="InvalidParameterValue">     <ows:ExceptionText>      msWCSGetCoverage(): WCS server error. Raster size out of range, width and height of resulting coverage must be no more than MAXSIZE=2048.     </ows:ExceptionText>     </ows:Exception>     </ows:ExceptionReport>      Why is that? Where's the error? I tried also to swap Lon and Lat duplets or give them in the cartesian coordinates of the dataset, but to no avail... Thanks for your help!


title: Free/Open-Source Archaeological Geophysics Programm?

text: Does anyone know a free/open source software or a GIS plugin for working with archaeological geophysics data, especially for data from a magnetic survey (magnetic gradiometer map)?


title: How to create a copy of a feature class that is vertically and horizontally offset by a given distance?

text: I want to duplicate a polygon feature class and offset all of the polygons by about 10 feet in both the x and y directions. Is this possible to do using arcpy, or are there any geoprocessing tools that could help me do this?


title: How to set map rotation in ArcGIS Javascript API?

text: I've created a web map using the ArcGIS Javascript API, but I need my map to have a fixed rotation of 1.76. The street grid of the map doesn't totally align with the cardinal directions, so it looks slightly off without the rotation. I've searched through the API reference, but haven't had any luck so far. Does anyone know how to do this?


title: Can't find correct coordinate system: UTM83 Zone 15 forcing input in meters; need it to be read in feet

text: Forgive me, I'm a CAD person, and am very new to GIS. I've searched google and this site extensively for an answer, with no luck. My problem is that I was given a large number of sistered Raster files; a TIFF and an accompanying .tfw file. The XY coordinates in the .tfw file are given in feet. I've got these images to come in perfectly in CAD by setting the coordinates to UTM83-15 and manually declaring the input coordinates to be feet. It lines up perfectly. However, when I try to use ArcMap, if I set the zone to UTM83 Zone 15N, it seems to force (logically so, I suppose) the input to be read as meters, which pushes everything ~3.28x up and to the right of where I want it. I cannot for the life of me find a way to force it to be in feet, nor can I find the same coord system not in metric. Im about to write a script to go through and convert all the X-Y to meteres: an imperfect solution as I don't really want to manipulate my base data. To fix this:   1. Is there a way to force ArcMap to read an input file as feet while using a UTM 15 origin?   2. Is there a foot based surrogate coordinate system with the same origin for UTM83-15N?


title: Is there a way to visually clip a layer in QGIS to prevent information from rendering outside the boundary?

text: In ArcGIS you are able to Clip to Shape, meaning you can use a shapefile to visually clip anything outside if it. This option does not physically clip anything, nor make a new shapefile. For example: You could add the Google satellite imagery and set the clip to prevent having to wait for information outside a certain shape from rendering. Is there a way to visually clip as mentioned above in QGIS?


title: Open a .osm.pbf file with fiona in python

text: I would like to open a .osm.pbf using fiona in Python. I can't find much documentation on this. How can I does one do this? I have done it using ogr2ogr.


title: Adding end nodes to a line

text: I'm hoping someone can help me here. I have a line feature and what I am trying to achieve is to determine is in which direction the line ends. I understand that this could be achieved with 'Feature Vertices to Points' to determine start and end nodes in ArcGIS Info, however I only have ArcEditor. Are there any alternative ways to achieve this? Thanks in advance for your help guys, ps. I'm using ArcEditor 10.1 & I have QGIS.


title: How to create a gradient point on top of a shape file?

text: I am attempting to create a point that scales in relative size to a particular integer (frequency) and is gradiented to a particular integer value, and then overlay that point onto each specific polygon of a shape file (USA) The point should look something like this where darker colored points denote higher numbers and larger circles denote higher frequencies. ![enter image description here](http://i.stack.imgur.com/sG6K7.png) I have frequencies all values (included frequencies) joined to the USA shape file, but am unable to create the points. Are they buffers? I'm sorry for being so new at this (QGIS), but I really do appreciate everyone's help.


title: How to determine bounding box of current qgis 'map canvas extent' from the python console

text: I've asked a similar question here: How to quickly calculate bounding box coordinates of a selected polygon with qgis ...regarding a quick way to determine the bounding box of a given layer. Is there any way to do the same thing for the current qgis view? I imagine it is an iface property but cannot find it in the documentation. Thanks. update: I'm working with the qgis print (map) creator right now, and I've found a button which appears to call a function that I'm alluding to. If you open the print creator, in the right side bar there is a menu button called "Item Properties". Click on this and below there is a submenu called "Extents". Expand that and there is a button called "Set to map canvas extent". This button appears to utilize the function I'm alluding to by extracting the bbox coords of the main qgis map view.


title: How to make a cloud mask from a daily MOD09 image?

text: I'm currently working with MODIS data and i've been having some trouble with several aspects of the steps I need to take. For example, I need to make a cloud mask from a daily MOD09GQK image, and i'm confused on how to do it. I have the QC_250m layer in a tif, but I don't understand the pixel values. I know I should convert, say 4096 to bits and get: 100000010010110, where the 3rd and 4th bits would represent the 00 'clear' flag. ![enter image description here](http://i.stack.imgur.com/1shXR.png) But my main doubt is why do I get the same value where the image is cloudy and where the image is clear? Help, please? Thanks a lot


title: ogr2ogr failed to reproject shapefile error exceeds limits

text: I cannot get correct transformation from WGS84 to the Hungarian EOV EPSG:23700 (Hungarian Datum 72) using ogr2ogr. I am using ogr2ogr from the fwtools shell. I have a shapefile in GCS WGS84 (epsg 4326) and I want to convert it to EOV, a projected coordinate system using the Hungarian Datum 1972. The contents of the prj file are: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] When I run this command: ogr2ogr -t_srs EPSG:23700 EOV_HD72.shp WGS84.shp I get failure and the following error: Error 1:latitude or longitude exceeds limits. Failed to reproject feature 0 (geometry probably out of source or destination SRS). Any suggestions on why this re-projection fails is greatly appreciated. cheers, Rudi


title: What are the strengthes and flaws of using grid-cell analysis in GIS with fishnet?

text: As I mentioned in the title, I'm going to use grid-cell analysis. what are the strengthe and weakness??


title: Using GDAL to link to a TMS

text: I currently have a C++ application that will consume a WFS using gdal. It determines if the WFS layer is points or polygons then adds stores them in an appropriate object that is later used to display the item on screen. Currently i am using a shapefile that contains world countries as polygons, so when i get the layer from WFS im displaying a world map but its actually just polygons placed act as my world map. Clearly this isnt a good solution so instead i have a TMS (tiled map service) running on the same server im already connecting to which i want to pull the map from and have that display on screen instead. As i said im using C++ (Qt specifically) for this application and id like to know if anyone could point me in the right direction to the GDAL functions i will need to use to return (what i assume will be a vector of images??) the tiles for the current view. I know this is a bit general but just looking for a direction to take because the GDAL docs are shockingly bad and i dont even know where to start looking for this functionality although i have read that it is supported Thanks in advance


title: GDB conversion to MongoDB

text: I'm interested in converting a GeoDatabase to a MongoDB database. more specifically, given I have a GeoDatabase (.gdb files), how do I convert these files to fit into a MongoDB Database (.bson files). My tools are the ArcObjects SDK for .NET and MongoDB shell. Thanks :)


title: Is there a way to set the workspace on selected features

text: i´ve built in a tool for arccatalog which transfers GIS Files into shape Files. Everything is working so far, but i want it a bit more customer friendly. Atm it looks like this: You can right click on the file (here MapInfo .tab file) in the catalog tree and choose in the context menu "Konvertierung in WGS 1984" ![enter image description here](http://i.stack.imgur.com/1Dumm.jpg) then the tool interface opens and you can choose your input and output file: ![enter image description here](http://i.stack.imgur.com/Vbbhh.jpg) But its annoying to choose all the time the input in the file system again. I want that my selected file from the catalog tree is already listed as input data. So my question is: Is there any way to set the workspace from the input data in my tool TO the selected file on which i right clicked (here: Blk1403.Tab), i.e. the Filepath which is listed on the top in arccatalog. ![enter image description here](http://i.stack.imgur.com/YV62B.jpg) The Tool is just a simple Model built with ModelBuilder, it contains some Py scripts and some tools from the Toolbox. Then the Model is implemented as a Button with the Add-in Wizard. Then it is draged & dropped into the context menu of the "Text-contextmenu" via Customize Mode. The first py script of the Model calls the ogr2ogr.exe and looks so far right now:               # -*- coding: iso-8859-15 -*-          import sys     import string     import os     import arcgisscripting     import arcpy          gp = arcgisscripting.create()          inPath1 = sys.argv[1]          outformat = sys.argv[2]     outPath1 = sys.argv[3]               ogrstring = ' -f "' + outformat + '" "' + outPath1 + '" "' + inPath1 + '""'      callstring = '"C:\\WINDOWS\\system32\\cmd.exe /C" "R:\\RBS\\Software\\FWTools2.4.7\\bin\\ogr2ogr.exe" ' + ogrstring          gp.addmessage(callstring)          os.system(callstring)


title: Why will QGIS only import the first 20 lines of my delimited text file?

text: I have a file of bird species and counts with Lat Long that I want to put into QGIS (2.0). However, when I add the file it only shows the first 20 entries (excluding the field titles). This is the same whether I type the file out by hand from scratch, save it in different formats, export a working attribute table from ArcMap etc... Its even done the same thing with a separate CSV file... Anyone got any ideas? Thanks in advance! Alex ![Example of imported file](http://i.stack.imgur.com/M4JTk.png) This is a sample of the data:               S_ID,S_NAME,COUNT,DATE,OBSERVER,LOCATION,LATITUDE,LONGITUDE     1,Mallard,6,27-Apr-14,Douglas_Philp,"Ely_Trail,_Pontyclun,_Rhondda,_Cynon,_Taff_County",-3.408753487,51.54959248     2,Grey_Heron,1,27-Apr-14,Douglas_Philp,"Ely_Trail,_Pontyclun,_Rhondda,_Cynon,_Taff_County",-3.408753487,51.54959248     3,White-throated_Dipper,1,27-Apr-14,Douglas_Philp,"Ely_Trail,_Pontyclun,_Rhondda,_Cynon,_Taff_County",-3.408753487,51.54959248     4,Grey_Wagtail,1,27-Apr-14,Douglas_Philp,"Ely_Trail,_Pontyclun,_Rhondda,_Cynon,_Taff_County",-3.408753487,51.54959248     5,Canada_Goose,5,23-Apr-14,Harry_Hops,"Skomer_Island,_Pembrokeshire_County",-5.30310871,51.73776583     6,Ring-necked_Pheasant,2,23-Apr-14,Harry_Hops,"Skomer_Island,_Pembrokeshire_County",-5.30310871,51.73776583     7,Manx_Shearwater,1,23-Apr-14,Harry_Hops,"Skomer_Island,_Pembrokeshire_County",-5.30310871,51.73776583     8,Northern_Gannet,5,23-Apr-14,Harry_Hops,"Skomer_Island,_Pembrokeshire_County",-5.30310871,51.73776583     9,Razorbill,12,23-Apr-14,Harry_Hops,"Skomer_Island,_Pembrokeshire_County",-5.30310871,51.73776583     10,Red-billed_Chough,3,23-Apr-14,Harry_Hops,"Skomer_Island,_Pembrokeshire_County",-5.30310871,51.73776583     11,Willow_Warbler,10,23-Apr-14,Harry_Hops,"Skomer_Island,_Pembrokeshire_County",-5.30310871,51.73776583     12,Northern_Wheatear,12,23-Apr-14,Harry_Hops,"Skomer_Island,_Pembrokeshire_County",-5.30310871,51.73776583     13,Reed_Bunting,2,23-Apr-14,Harry_Hops,"Skomer_Island,_Pembrokeshire_County",-5.30310871,51.73776583     14,Barn_Swallow,2,14-Apr-14,Paul_Owen,"WhiteHill,_Pembrokeshire_County",-4.819516968,51.71073247     15,Common_Chiffchaff,2,14-Apr-14,Paul_Owen,"WhiteHill,_Pembrokeshire_County",-4.819516968,51.71073247     16,European_Goldfinch,4,14-Apr-14,Paul_Owen,"WhiteHill,_Pembrokeshire_County",-4.819516968,51.71073247     17,Common_Merganser,4,12-Apr-14,Howard_Williams,"Bute_Park,_Cardiff,_Cardiff_County",-3.185524062,51.48431536     18,Great_Crested_Grebe,2,12-Apr-14,Howard_Williams,"Cardiff_Bay_Harbour,_Cardiff_County",-3.168233956,51.45798394     19,Barn_Owl,1,07-Apr-14,Toby_Rowland,"Carmel,_Carmarthenshire_County",-4.045078962,51.82685504     20,Carrion_Crow,1,05-Apr-14,Toby_Rowland,"Aberaeron_harbour,_Ceredigion_County",-4.263096052,52.24298592     21,Bar-headed_Goose,1,05-Apr-14,Simon_Priestnall,"Newport_Wetlands_RSPB_Reserve,_Newport_County",-2.963961861,51.5462345     22,Gadwall,1,05-Apr-14,Simon_Priestnall,"Newport_Wetlands_RSPB_Reserve,_Newport_County",-2.963961861,51.5462345     23,Eurasian_Wigeon,1,05-Apr-14,Simon_Priestnall,"Newport_Wetlands_RSPB_Reserve,_Newport_County",-2.963961861,51.5462345     24,Northern_Pintail,2,05-Apr-14,Simon_Priestnall,"Newport_Wetlands_RSPB_Reserve,_Newport_County",-2.963961861,51.5462345     25,Common_Buzzard,1,05-Apr-14,Simon_Priestnall,"Newport_Wetlands_RSPB_Reserve,_Newport_County",-2.963961861,51.5462345     26,Little_Ringed_Plover,1,05-Apr-14,Simon_Priestnall,"Newport_Wetlands_RSPB_Reserve,_Newport_County",-2.963961861,51.5462345     27,Spotted_Redshank,1,05-Apr-14,Simon_Priestnall,"Newport_Wetlands_RSPB_Reserve,_Newport_County",-2.963961861,51.5462345     28,Common_Greenshank,1,05-Apr-14,Simon_Priestnall,"Newport_Wetlands_RSPB_Reserve,_Newport_County",-2.963961861,51.5462345     29,Common_Snipe,1,05-Apr-14,Simon_Priestnall,"Kenfig_NNR,_Bridgend_County",-3.731128585,51.51604494     30,Great_Spotted_Woodpecker,1,05-Apr-14,Simon_Priestnall,"Fendrod_Lake,_Swansea_County",-3.903193858,51.66903139


title: Using UpdateCursor to update a field based on other field values

text: I've been trying to create a python script that will update certain fields in the arcgis attribute table. I have attempted to do this by using the update cursor to update a field based on another field value found in the same row. Here is the code I used:               import arcpy          fc = "C:\Users\maureen\Documents\ArcGIS\EDRN\EDRN_LINK.shp"     fields = ["FID", "RIVERNAME"]          with arcpy.da.UpdateCursor(fc, fields) as cursor:         for row in cursor:             if  row[0] = 4401:                 row[1] = "Aire"                 cursor.updateRow(row)      Unfortunately, when I run this in ArcMap it returns the following syntax error:               Parsing error SyntaxError: invalid syntax (line 9)       Does anyone have any idea where I'm going wrong? I've researched this script a fair bit and can't see any obvious errors.


title: Changing labelling of OpenStreetMap Base Map for ArcGIS Online?

text: I am creating a Story Map and using Open Street Maps as the base map. One issue my superiors see is the labeling of the streets. It's way to frequent! See the attached screenshot: ![enter image description here](http://i.stack.imgur.com/aWEor.jpg) Is there a way I can change the frequency of the labeling for the same road?


title: Broken links after joining an .accdb with a .csv in ArcGIS 10.1

text: I have two sets of data:   * A "master" file of coordinates that has one row for each location, saved as a .csv file   * A table with information for each location but no coordinates, saved in an Access database (.accdb) The Access database table is connected to the .mxd with an OLE DB connection, and is joined to the .csv file to provide coordinate information for each of the pieces of data in the .csv file. The join works fine, and I'm able to display XY data for the joined table. The issue arises when I close and reopen the .mxd. The link to the data source becomes broken, and I have to repair the data source each time. Once repaired, it behaves as it should. If I do not join the tables and simply display XY data directly from the Access database, there are no issues when opening and closing; the issue does not seem to stem from the OLE DB connection itself. Obviously, I can join the data outside of ArcGIS (in Excel, for example), and create a third table, which removes the issue. I would prefer to maintain the two unique tables in their current formats, however, because both tables are generated by automatic processes outside of ArcGIS and the .mxd requires frequent updating as new data are added. Is this a bug in 10.1? If so, is there a viable workaround that still allows me to keep my two tables in their .accdb and .csv formats without repairing the data source each time the .mxd is opened?


title: How can I efficiently use a list comprehension on an ogr.layer inside a loop in Python?

text: ## Problem statement I'm using python 2.7 and ogr 1.11.0 on Windows 7. I have two shapefiles: one for streets and one for junctions. The streets shapefile has fields listing the IDs of the start and end junctions, as well as additional information about the streets. I need to loop over each junction, and collect information about all of the streets that are bounded by it. I started off with a spatial filter, like this:               for junction in junctions:         streets.SetSpatialFilter(junction.GetGeometryRef())         connected_streets = [street for street in streets]      But this was slow (about 1 second per junction, and I've got 191,000 junctions). So I tried to take advantage of the SRT_JUNC and END_JUNC fields in the roads shapefile, to see if this would work faster.               for junction in junctions:         junctionID = junction.GetField("ID")         connected_streets = [street for street in streets if street.GetField("SRT_JUNC") == junctionID or street.GetField("END_JUNC") == junctionID]      The list comprehension works okay in the first iteration of the loop, but for all of the following iterations it returns nothing (or a list with length zero?). The only way I could get it to work is to Open the driver and GetLayer inside the loop. But I've got a large shapefile and the performance of this method is also too slow. I show some simplified examples below. **Can I make multiple list comprehensions work for an ogr layer, without reloading the entire layer each time? If not, why not?** (I would also accept suggestions for an entirely different approach to the main problem, but I still am looking for an explanation regarding list comprehension.) * * * ## Example 1: List comprehension without ogr layer The following basic script               my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]     for x in range(3):         print len([a for a in my_list])      produces the expected result:               10     10     10      * * * ## Example 2: List comprehension with ogr layer The following script is parallel to Example 1, except it uses an ogr layer instead of a simple list.               from osgeo import ogr          driver = ogr.GetDriverByName("ESRI Shapefile")     dataSource = driver.Open(file, 0)     streets = dataSource.GetLayer()     for x in range(3):         print len([street for street in streets])      It produces an _unexpected_ result:               191017     0     0      * * * ## Example 3: move GetLayer inside the loop I moved the GetLayer call into the loop:               from osgeo import ogr          driver = ogr.GetDriverByName("ESRI Shapefile")     dataSource = driver.Open(file, 0)     for x in range(3):         streets = dataSource.GetLayer()         print len([street for street in streets])      But still it produces the unexpected result:               191017     0     0      * * * ## Example 4: move driver.Open inside the loop I also moved the driver Open call into the loop:               from osgeo import ogr          driver = ogr.GetDriverByName("ESRI Shapefile")     for x in range(3):         dataSource = driver.Open(file, 0)         streets = dataSource.GetLayer()         print len([street for street in streets])      And it produces the expected result:               191017     191017     191017


title: Convert Landsat image to polygon

text: I downloaded Landsat image and used composite band toolbox. Now, I produced color map but I need to create boundaries across urban area. Is there any way to create polygons among that area and how?


title: Drawing geometry and attaching it to featureclass with arcobjects and Add-in button

text: I am newbie to ArcObjects and exploring classes. I want to have form created on add-in button click.(Form contains certain text boxes for input) That shall create a new feature class and then allow user to draw geometry on map and attach that to feature class. I'm able to create new feature class.As per my knowledge ESRI gives map control - such as Onmousedown event with Tools and not buttons so if I want to start drawing polygon/polyline on mouse click i can't do it with button add- in. Any other suggestions to get map control and draw geometry that can be attached to feature class created?


title: vb.net arcmap add-in log4net log still follow the configuration before update

text: I met a strange thing in my log4net for vb.net arcmap add-in. **At first** , I follow the link http://www.codeproject.com/Articles/42276/How-to-Use-Log-Net-with-VB-NET-A- Simple-Step-By-St to write logs for my arcmap add-in project. There are 2 files related to the log file: (1) Log4NetAssembly1.exe.log4net, the configuration for log4net is:               <log4net>     <appender name="ExampleAppender" type="log4net.Appender.RollingFileAppender">       <file value="C:\Log4NetExamples\Example.log" />       <appendToFile value="false" />       <rollingStyle value="Size" />       <maxSizeRollBackups value="3" />       <maximumFileSize value="100KB" />       <staticLogFileName value="true" />       <layout type="log4net.Layout.PatternLayout">         <conversionPattern value="%date [%thread] %-5level -                  [%logger] %message%newline" />       </layout>     </appender>     <logger name="dev">       <level value="ALL" />       <appender-ref ref="ExampleAppender" />     </logger>      (2) app.config               <listeners>         <add             name="textWriterTraceListener"             type="System.Diagnostics.TextWriterTraceListener"             initializeData="C:\Log4NetExamples\Example.log" />       </listeners>      It works properly with log file C:\Log4NetExamples\Example.log. **Now** I want to create log file daily and want each log file with the date of creation, so I updated my code as follows: (1) Log4NetAssembly1.exe.log4net               <log4net>     <appender name="RollingLogFileAppenderOutput" type="log4net.Appender.RollingFileAppender">       <file value="C:\Log4NetExamples\" />            <appendToFile value="true" />       <rollingStyle value="Date" />       <datePattern value="yyyyMMdd'.log'" />       <staticLogFileName value="true" />       <layout type="log4net.Layout.PatternLayout">         <conversionPattern value="%date [%thread] %-5level -                  [%logger] %message%newline" />       </layout>     </appender>     <logger name="dev">       <level value="ALL" />       <appender-ref ref="RollingLogFileAppenderOutput" />     </logger>      (2) app.config               <listeners>         <add             name="textWriterTraceListener"             type="System.Diagnostics.TextWriterTraceListener"             initializeData="C:\Log4NetExamples" />       </listeners>      The strange thing is after I changed to the daily logging design, my log file still written to C:\Log4NetExamples\Example.log, which means it still follow the previous configuration of log4net. I really cannot figure out why, is there anywhere remember the old configuration? I search the whole vb.net project and cannot find "Example.log" at all. Anybody knows what happen? Please help me, thanks.


title: Manifold 'Link drawing to query' - can I do this in QGIS?

text: **Manifold GIS** allows the creation of dynamic drawings linked to queries. Unfortunately I do not have access to Manifold as my employer refuses to pay for it, so am currently investigating alternatives. Suppose I would like to buffer an alignment linestring stored in a database (SQL Server 2008), sample points at intervals around the buffer and then assign elevations to those points based on a raster:   * With **Manifold** I would simply formulate this as a single nested _query_ and link a _drawing_ (vector layer) to it to contain the output, then if the alignment changes I just refresh the query and the linked drawing updates accordingly   * With **QGIS** I can achieve the same result via a multiple step manual procedure (generating superfluous shapefiles along the way) each time the alignment changes, but this is nowhere near adequate for my requirements Is there a more elegant way of combining functions in **QGIS**? If not, is this the sort of thing I might be able to achieve server side using PostGIS or similar? (I am completely ignorant of the workings of PostGIS).


title: Where to find Vietnam administrative level 4 shape file?

text: I am new to mapping, and would like to make a custom map using Vietnam's administrative boundaries shape file. I found a great source at gadm.org, but it is licensed for non-commercial use only. I am not currently planning to do anything commercial, but didn't know if there might be another source that is not as restrictive just so that I don't have to worry down the line? I have looked around and it seems really hard to find. I looked at openstreetmaps, but I think they don't get as specific as the gadm.org files, OSM seems to only get down to rural districts and not the commune level. I might be wrong about OSM though, as I haven't really delved into it. I would really appreciate any help!


title: How to programmatically delete all inner rings of a polygon layer?

text: I have many polygon layers, each layer containing many polygons with inner rings. I know that you can delete a ring manually with QGis (Edit -> Delete ring). I need the python equivalent to automatically process all my polygon layers. Any help really appreciated :)


title: Tool for rendering/drawing maps from coordinates

text: What tools can be used to convert a set of coordinates into polygons? For example: this code represents a room by providing information about it's four corners.               <node id='-202' lat='41.015146' lon='6.092984' />      <node id='-200' lat='41.015146' lon='-6.092817' />     <node id='-198' lat='41.015075' lon='-6.092977' />     <node id='-196' lat='41.015090' lon='-6.092806' />          <way id='-266' type='room'>         <nd ref='-202' />         <nd ref='-200 />         <nd ref='-198' />         <nd ref='-196' />      </way>      What I want to do is read that information and draw the respective room. Making possible that way to have an indoor map. ![enter image description here](http://i.stack.imgur.com/ExYbU.png) This screenshot shows the kind of result that I'm trying to achieve. Where the outline of the rooms of a building was converted into a well designed map, unfortunately that app is for android only. In this community the feature "Delimited Text Layer" of QGIS has also been suggested. Is there any other tools to perform this kind of task?


title: If the GPS navigation message takes 12 1/2 minutes to cycle, how can receivers update your position every second?

text: According to Wikipedia's article on GPS, > Each GPS satellite continuously broadcasts a navigation message... Each > complete message takes 750 seconds (12 1/2 minutes) to complete. My understanding of how GPS works is that the receiver receives the broadcast message and calculates location based on that. So how can a GPS system start delivering reasonably accurate locations within a few seconds? Wikipedia mentions that the message is divided into frames and sub-frames: > The message structure has a basic format of a 1500-bit-long frame made up of > five subframes, each subframe being 300 bits (6 seconds) long... [A] > complete data message requires the transmission of 25 full frames.... [T]his > gives 750 seconds to transmit an entire almanac message (GPS). Each > 30-second frame begins precisely on the minute or half-minute as indicated > by the atomic clock on each satellite. But the iPhone's GPS, for example, delivers about a location point a second. Even if a frame or a subframe is enough, that's 6-30 seconds. How can the hardware update its position with reasonable (reported) accuracy every single second? Is the iPhone lying to me?


title: How to extract drainage line network from GRASS GIS and QGIS

text: ## Giving DEM as input is there any way to get drainage network? I am newbie to GRASS and QGIS ,provide any working examples in GRASS GIS and QGIS with procedure.