title: HRESULT - IPersistStream.Save()

text: I have converted a VB6 project to C#, and there is one problem I cannot find documentation on. I am saving an `IPropertySet` to file by using `IMemoryBlobStream` and `IPersistStream`, as seen here:                public void WriteToFile(string fullPath)         {             IMemoryBlobStream pMemStream;             IPersistStream pPersistStream;                  try             {                 // Open Stream, must use memory stream instead of FileStream                 pMemStream = new MemoryBlobStreamClass();                      // Write PropertySet to Stream                 pPersistStream = (IPersistStream)m_pPropertySet;                 pPersistStream.Save(pMemStream, 1);                      // Save Stream to File                 pMemStream.SaveToFile(fullPath);                 pMemStream = null;                  }             catch (Exception ex)             {                 return;             }         }      I get an "HRESULT E_FAIL" with error code "-2147467259" on `pPersistStream.Save(pMemStream, 1);` This doesn't throw an error if the `PropertySet` is empty, only if it has properties within. When the `PropertySet` is populated, it is populated by Long data types (int64). Using `PropertySet.SetProperty(Name, Value)` Any ideas why this would work great in ArcGIS 8/9 and not in 10 with C#?


title: How calculate areas between certain contour lines in qgis?

text: Sorry for asking a question which I found in similar ways already here, but I am trying this for days and just got no result: How do I calculate the area between certain contour lines (e.g. 0-800, 800-1400, 1400-2100...) from a given shape file. What I need is the area of the the certain elevational levels.   * shape file is from vogis-data download (via FTP vogis.cvn.at - Gelaendemodell - Hoehenschichten - Vlbg), vector polylines, altitude is ranging from 200 - 3300 m, but not equidistances   * lines to polygone seems not to work (too complex/large data?)   * fieldcalculator $area did not (only lines?)   * there is no DEM in raster format Thanks a lot


title: How to compare outputs of erosion from ArcSWAT and RUSLE from ArcGIS?

text: I calculated water erosion in ArcSWAT and I also calculated erosion by RUSLE               http://35.8.121.139/rusle/      equation in ArcGIS. Now I need to compare these two (from ArcSWAT I used SYLD- assumed sediment routing in t/ha/y and in rusle erosion also in t/ha/y), I used zonal statistics for rusle, but my results are wrong and I think I am using the wrong instructions on how to do it, does anybody know how can I compare these two?


title: How to calculate the volume of several DEMs to obtain elevation and volume changes?

text: I am trying to calculate the volume of several DEMs in order to obtain elevation and volume changes. I have pixels of 1x1 each one associated to an elevation. I used several methods but non of them gave me the same results and I am starting to despair. First method: I multiply the total sum of the dem elevation, obtained in the statistics of it, by the area of one pixel. I subtract two consecutive DEMs in order to obtain the total volume change. Second method: I use the Volume and Area Calculator of the 3D Analysis Tool. I subtract two consecutive DEMs in order to obtain the total volume change. Third method: I use the Cut/Fill tool in order to obtain the gain/losses of volume between to consecutive DEMs. Total gain minus total losses will give me the total change. Forth method. I subtract to consecutive DEMs in the raster calculator and I obtained the volume of this new raster using the pixel method (first one) and using the Volume Calculator (second one). Non of these methods gave me the same results and I am really worry about it. I will really appreciate if someone knows how to obtain the volume of a DEM. Thanks!


title: Geowebcache REST Truncate

text: I'm using geoserver with geowebcache and I need to use the REST API to truncate tiles in a bounding box so they can be rebuilt. All the examples in the documentation are in curl and I'm using JQuery. I'd like to do the call with $.ajax. Here's what I'm trying:               var formData = new FormData();                      formData.append("threadCount", "01");                 formData.append("type", "truncate");                 formData.append("gridSetID", "EPSG:900913");                 formData.append("format", "image/png");                 formData.append("zoomStart", '00');                 formData.append("zoomStop", '15');                 formData.append("minX", "-12484306.954023438");                 formData.append("minY", '3991847.3646093756');                 formData.append("maxX", "-12445171.195546875");                 formData.append("maxY", '4030983.1230859384');                      var data = {                     "threadCount": "01" ,                     "type": "truncate",                     "gridSetID": "EPSG:900913",                     "format": "image/png",                     "zoomStart": '00',                     "zoomStop": '15',                     "minX": "-12484306.954023438",                     "minY": '3991847.3646093756',                     "maxX": "-12445171.195546875",                     "maxY": '4030983.1230859384'                 };                           var ajaxResponse = $.ajax({                     type: "get",                     url: "http://localhost/geoserver/gwc/rest/seed/MyWorkspace:cityJoin",                     contentType: false,                     data: data,                     processData: true,                     cache: false                 });      I have tried several variations of this code. I've tried sending the formData and the data, get and post, and I've changed the contentType variable between false, multipart-form, and json. I've also had processData set to true and false and not included at all. I've also tried appending all the data to the url and sending it that way. The data I'm using comes from a call the Geowebcache seeding page makes. I get one of three results based on the settings I use: 1. the call goes through but no tiles get truncated. 2. Illegal Invocation error. 3. Internal server error. I can't get it to run the truncate. Does anyone have an example of how to run the truncate with $.ajax or have an idea why my code isn't working?


title: How to calculate specified region area with raster in ArcGIS Engine?

text: By using the "Image classification" tool we can classify the raster image by "supervised classification",but how to calculate their area? I mean, for example, in regard for a produced class '4', how can someone calculate the area that is being defined by that class? Thank you very much. Addition to my issue,I just want to implement this by arcgis engine C#. For example,when using "IMultivariateOp.MLClassify" in ArcObject,we can classify into '4' parts,but I do not know how to calculate each of the area. Please help me,And thank you very much.


title: How to query for a specific point, within a specific polygon?

text: I have a shapefile points layer, with each point representing either Marginal, suboptimal, or optimal conditions. I want to find only the marginal points within a specific polygon from my catchments polygon layer. So far I have been able to select all marginal points, or the wanted polygon, but not the marginal points WITHIN the specified polygon. Is this possible? Thank you.


title: Are there any examples of WCS getcoverage requests done using ajax?

text: I am looking through openlayers to try to figure out a consistent format for generating views of coverages that can satisfy any wcs server, but mainly I'd like to get geoserver coverages. While I've read that openlayers does not support wcs, I see in the API that there is OpenLayers.Format.WCSGetCoverage constructor, but I'm not certain how to go about using it. I'm not sure what to pass in to the function to get the coverage and ultimately I will parse what I retrieve. I know the call below is incorrect, but I'm using it as a mild example. Ultimately based on the configuration of my service I am going to use a describeCoverage type of function to retrieve parameters and then subsequently use the getCoverage upon success of retrieving metadata. Then I need to find a way to parse the xml/gml result, but from what I can tell openlayers may not have any parser for that schema.                $.fn.WcsGetCoverage = function(baseUrl, coverage, onSuccess, onError){         if(baseUrl.endsWith("wps?")){            baseUrl = baseUrl.replace("wps?", "wcs?");            $.ajax({            type: "GET",            url : baseUrl,             data: {                 service : "wcs",                 version : "2.0.0",                  request : "GetCoverage",                 coverage : coverage,                 crs :, //epsg_code,                  bbox :, //minx, miny, maxx, maxy,                 WIDTH : , //output_width: Width in pixels of map picture. One of WIDTH/HEIGHT or RESX/Y is required.                 HEIGHT : , //output_height: Height in pixels of map picture. One of WIDTH/HEIGHT or RESX/Y is required.                 RESXx: , //When requesting a georectified grid coverage, this requests a subset with a specific spatial resolution. One of WIDTH/HEIGHT or RESX/Y is required.                 RESYy: , //When requesting a georectified grid coverage, this requests a subset with a specific spatial resolution. One of WIDTH/HEIGHT or RESX/Y is required.                 FORMAT: , //output_format: Output format of map, as stated in the DescribeCoverage response.             },             success : onSuccess,             error : onError         });


title: Displaying properties from GeoJSON file in choropleth map Leaflet.js

text: I'm using the Leaflet.js library to generate a choropleth map of zip codes colored by some property values stored within an externally loaded GeoJSON file. I'm following a tutorial here but have run into some trouble, since the tutorial shows how to access the data through assigning it to a variable within the code. I'd like to proceed without explicitly assigning a variable (i.e. using the AJAX function I currently have in place to load the data). I've been able to display the raw data (viewable here, source code available upon "View Source" in your browser) on the map, but have been unsuccessful in displaying the properties I'm interested in showing. I suspect I need to add some lines within the function that is loading the data, but can't understand how to do that. Any help debugging would be greatly appreciated. Thanks for reading.


title: Why do CMYK colours in ArcMap not match those in Adobe products?

text: I'm creating a map in ArcMap, based on a style guide which specifies colours in CMYK notation. So I've set the colours in ArcMap's color selector. The layer has no transparency set, and is the only layer drawn. Why does the polygon below not match the colours of the equivalent object when viewed in the PDF style guide? ![enter image description here](http://i.stack.imgur.com/ZoHyD.png) (ArcMap on the left, the PDF on the right. Note the CMYK numbers match, but the colours clearly don't) When I examine the ArcMap colour in PhotoShop's colour picker, it shows as _C:75 M:51 Y:55 K:29_ Is there a setting somewhere which tells ArcMap which colour profile to use? (I'm out of my depth here as I don't fully understand this colour space stuff.....)


title: The request bounding box has zero area?

text: I have published directory of shape files in Geoserver in which one shape file has only one feature(point).While previewing the layer Geoserver wms error says that The request bounding box has Zero area? I had so many shape files with single feature(point). How can avoid this Zero area error in future also?


title: How to create iterative Select by Location, Summary Statistics tool using ModelBuilder?

text: I do a lot of proximity analysis using "select by location" and would like to cut down on the effort spent each time doing this! I have put together a model using ModelBuilder that:   1. Iterates over features in a feature layer (source layer);   2. Selects features in a separate target layer based on the set parameters; and    3. Uses summary statistics to summarize over a certain field.  Where I'm getting caught up is in making this as much like a standard tool as possible. I have two issues I'm running into:   1. I've set the "statistics field" of the Summary Statistics tool as a model parameter. However, when I go to run this tool through ArcToolbox, I set the target layer, but the statistics field isn't populated with the list of potential fields from the target layer. The drop down menu remains blank. Is there a way to make all the target layer fields populate similarly to how they would if you were using the Summary Statistics tool alone and set an input layer?    2. Get Field Value gets the value of the first row of the specified field, but I do not know how to tell it to get the value of the field of what I just summarized on. So, in Summary Statistics, if I told it to get the SUM of a field called POPTOTAL, then I want the Get Field Value tool to grab the value from the new field called "SUM_POPTOT" in the output statistics. There should only be one row of data, so I don't need to worry about getting the correct row. I have "Field" set as a model parameter currently, but I don't think it needs to be. Any help would be much appreciated! I've posted this thread in the ArcGIS forum, but I haven't received any feedback, so if any of this is unclear, please let me know. I'm still new to ModelBuilder...I have some background in programming, so Python script would be fine (or maybe even better). Thanks! ![Iterative Proximity Analysis Model](http://i.stack.imgur.com/P22pN.png) ![Iterative Proximity Analysis Tool Dialog](http://i.stack.imgur.com/NKM8q.png)


title: Polygon to Raster is taking longer in script than in arcmap

text: I have a large dataset that I am working with. Basically I have a table with 900,000 records that I join to a geodatabase feature layer, then convert that to a raster. This process takes a total of about 15 minutes if I do it manually in ArcMap. When I write a python script for it, it takes over 40 minutes. The table join and creating a feature layer part of my script works fairly quickly (about 2 minutes) but it gets hung up on the convert to raster. This is the code I am using to convert to raster arcpy.PolygonToRaster_conversion(polys_fl,"join_table.responses",outputimg,'','',10) Thanks! Edit to add, this script is imported into a toolbox. I'm not running it in an IDE.


title: ISIS to GDAL to QGIS: Georeferencing Mars Images

text: I'm trying to use QGIS to view some images from the Mars Reconnaissance Orbiter Context Camera. I use ISIS3 to download the images and convert them to mapped .cub files, following the instructions here: http://isis.astrogeology.usgs.gov/IsisWorkshop/index.php/Working_with_Mars_Reconnaissance_Orbiter_CTX_Data Now I'm trying to export these ISIS cube files to GTiff files, to view in QGIS, I can do this but the georeferencing doesn't seem to work. I've tried this in 3 different ways:   1. Use the ISIS command isis2std to generate tif (and tfw) files.  When I try to open the tif file in QGIS it asks me to choose a projection type (side question, is there a suitable projection for Mars? I always choose WGS 84, stupid I know but I don't know a more sensible option). Then once the raster is loaded it automatically displays as a grayscale image but my coordinates are not in degrees, they appear to be in pixels and have a range of 100s of thousands. This method produces a tif image of ~100 Mb from an original .cub of close to 1 Gb.   2. Use gdal: gdal_translate -of GTiff input_mapped.cub output.tif. This time I don't get asked to choose a projection type. The projection takes on 'USER:100002'. Hopefully this means that it is managing to read the appropriate Mars projection from the ISIS cub? The image displays as a solid grey box in grey scale this time, but I can see details by switching to a different colour mapping scheme. Again though my coordinates are not in degrees, they range in the hundreds of thousands again. This method produces a GTiff with the same ~1 Gb size as the original .cub image.   3. Open the ISIS .cub file directly in QGIS. Has basically the same effect as for method 2. Because of the file sizes I'd prefer a variation of method 1, but with a suitable projection and georeferencing scheme for Mars. Edit: Here is the georeference, and the output of gdalinfo on the original ISIS .cub file: georeference (in python):               >>>import gdal     >>>from gdalconst import *     >>>fn = 'P01_001356_1747_XN_05S221W.map.cub'     >>>ds = gdal.Open(fn, GA_ReadOnly)     >>>gt = ds.GetGeoTransform()     >>>gt     (-22085.510544416, 5.1698292472885, 0.0, -234679.22885141, 0.0, -5.1698292472885)      gdalinfo (from terminal):               $gdalinfo file.cub     Driver: ISIS3/USGS Astrogeology ISIS cube (Version 3)     Files: P01_001356_1747_XN_05S221W.map.cub            P01_001356_1747_XN_05S221W.map.cub.aux.xml     Size is 8526, 30111     Coordinate System is:     PROJCS["Sinusoidal Mars",         GEOGCS["GCS_Mars",             DATUM["D_Mars",                 SPHEROID["Mars",3396190,0]],             PRIMEM["Reference_Meridian",0],             UNIT["degree",0.0174532925199433]],         PROJECTION["Sinusoidal"],         PARAMETER["longitude_of_center",138.45730511261],         PARAMETER["false_easting",0],         PARAMETER["false_northing",0]]     Origin = (-22085.510544415999902,-234679.228851410007337)     Pixel Size = (5.169829247288500,-5.169829247288500)     Corner Coordinates:     Upper Left  (  -22085.511, -234679.229) (138d 5' 1.74"E,  3d57'33.05"S)     Lower Left  (  -22085.511, -390347.957) (138d 4'56.04"E,  6d35' 7.46"S)     Upper Right (   21992.454, -234679.229) (138d49'45.19"E,  3d57'33.05"S)     Lower Right (   21992.454, -390347.957) (138d49'50.86"E,  6d35' 7.46"S)     Center      (     -46.528, -312513.593) (138d27'23.46"E,  5d16'20.26"S)     Band 1 Block=406x128 Type=Float32, ColorInterp=Undefined       Min=0.033 Max=0.150        Minimum=0.033, Maximum=0.150, Mean=0.080, StdDev=0.020       NoData Value=-3.40282265508890445e+38       Metadata:         STATISTICS_MAXIMUM=0.15037615597248         STATISTICS_MEAN=0.080181184414784         STATISTICS_MINIMUM=0.033307410776615         STATISTICS_STDDEV=0.020299974127104


title: CartoDB map does not react to tap on Chrome Android

text: I Created a map with CartoDB When you click the polygon, an info window should appear. It works fine on desktop browsers, it also works fine on my phone with Firefox. It doesn't seem to work on my phone's Chrome. Any ideas? My phone is Nexus 4, Android version 4.4.4 Chrome version 37.0.2062.117


title: Reverse geocoding Nominatim results

text: I need to obtain street intersections from reverse geocoded lat/long, where there is no house number information.   I have a tile server and Nominatim running in Ubuntu 12.04 virtualbox.   I followed intructions to install Nominatim v2 at http://wiki.openstreetmap.org/wiki/Nominatim/Installation   Is there a way to modify anything to make this work? Any help would be appreciated. Thanks in advance. Regards. LN


title: automated method of Geo-referencing air photos?

text: I am trying to figure out a way to automate a process to geo-reference ~800 air photos, followed by digitalizing several thousand polygons from these air photos. At a minimum, we would like to create a set of polygons where additional spatial analysis could be performed. I can manually take this project on using Arc Map 10x, but I would like to avoid the months of tedious labor. Is there any automated processes or software packages that could increase efficiency or accuracy available to complete this project? Thank you Rob


title: Improving speed on pgRouting on table update with many rows: faster to loop on each row than a table update call?

text: I am updating thousands of rows in a survey table finding shortest path from each place a survey respondent visits. My code below is the query I use to update the blank route column. The function "pgr_fromAtoPO" is the same as the "pgr_fromAtoB" listed on the pgr tutorial, except the name of the tables have been changed. I initially tried to run the querry to update my entire table, with 90,000 rows of start and end points. This ran for 2 days and crashed my 8GB RAM 2.0GHZ quad core macbook pro, so I have since changed my querry to limit the rows to 5,000. This querry took below took 112 minutes on 5000 routes.               update analysis.po_routing     set route = (select st_multi(st_union(geom)) from pgr_fromAtoPO('osm2po_routing',x1,y1,x2,y2))      where uniqueid <    605300515      and uniqueid >=     604479116      and route is null and x1 is not null;       My question is: Are these functions optimized for single calls (i.e. what a website might get), so would I be better off looping through each individual row separately rather than a call to update 5,000 rows, and is there some sort of memory limit, such that I would be better off updating a smaller chunk of rows at a time, say 500 or 1000 to improve the speed? Thanks for your help.


title: Displaying data from related records in a flat table after selecting a feature on the map

text: I have an ESRI feature service with 2 Layers: layer 0: Administrative boundary (0) and layer 1: Tables: MEP_global_data.DBO.mep_catalog (1) Layer 0 has the geometry of the administrative boundaries of the world. Layer 1 is a flat table with no geometry The 2 layers are linked by a country code column in each. I've done lots of searching but can't find any examples or a way to do the following: When I click on a country displayed on a world map (layer 0) via leaflet in my browser, I want a popup that displays data from the flat table (layer 1) for that country. Is there an example that does something similar I can review or can someone suggest a way I can make this happen? Layer: Administrative boundary (0) and Tables: MEP_global_data.DBO.mep_catalog (1)


title: In arcgis how do I filter my geo data in a certain state?

text: I currently have a database of points that contains latitude and longitude. What I want to do is to filter out all the points so that only the ones that are in Texas will show. I have done a spatial join with the target as the points and the join as the state, but it still shows all the points from the original set.


title: C++ Code Examples in Quantum GIS 1.8

text: I am trying to utilize the C++ code examples from blog.qgis.org, specifically Tutorial 4, Adding Rasters to QGIS Map Canvas. I am successfully able to run the example loading a GeoTIFF with QGIS 1.4, however with 1.8 I get "Layer is Not Valid". As a note, the same GeoTIFF file was able to be loaded in the QGIS 1.8 application just fine, but not in the example code. I've tried with several different files, with the same result. Is there additions to the 1.8 API which require additional calls to get this functionality to work? Problem code below. The full example code can be found at http://blog.qgis.org/node/94 Operating System: Fedora 17 64-bit, QGIS 1.8.0               void MainWindow::addLayer()     {       QString myFileName = QFileDialog::getOpenFileName(this, tr("Open File"),                              QCoreApplication::applicationDirPath () + "/data",                              tr("GeoTiff (*.tif)"));       QFileInfo myRasterFileInfo(myFileName);       QgsRasterLayer * mypLayer = new QgsRasterLayer(myRasterFileInfo.filePath(),        myRasterFileInfo.completeBaseName());       if (mypLayer->isValid())       {          qDebug("Layer is valid");       }       else       {          qDebug("Layer is NOT valid");          return;        }


title: Python scripting for ArcPad Checkin

text: I can use ArcGIS Desktop model builder to leverage the ArcPad Check In Tool. When I run the model it executes successfully. When I export the model as python I get this code:               import arcpy          # Local variables:     Test02_axf = "C:\\aWorkspace\\ESA\\ArcPad\\AXFs\\Test02.axf"          # Process: ArcPad Check In     arcpy.ArcPadCheckin_ArcPad(Test02_axf, "", "")      However, when I run this code in the python window I get:               Runtime error      Traceback (most recent call last):     File "<string>", line 8, in <module>     AttributeError: 'module' object has no attribute 'ArcPadCheckin_ArcPad'      And yes indeed arcpy has no function named ArcPadCheckin_ArcPad. So model builder must be exporting erroneous code. Does someone out there know what the issue is here? Is there really anyway to do this operation with python?


title: How to make a minimal distance matrix for polygons using QGIS?

text: I have a set of polygons and I want to find minimal distances between the edge of each pair of them. It's similar task as in this question: How to find the minimum edge to edge distance of polygons? But I'd prefer to make it in QGIS or other free available program. Also I'm very beginner in using geographic information systems software so I'd be really grateful if you make your answer as simple as possible.


title: Extra Column after Using Polyline to Raster

text: Does anyone know why there is an extra column in the resulting raster file (Raster2) after using the tool Polyline to Raster in ArcMap 10.2? I had imported the cell size and set the extent to be the same as another raster file (Raster1). In the end. Raster 2's cell size and number of rows is the same as Raster 1, but Raster2 has one extra column.


title: Replacing raster values in one raster with another raster in QGIS ... how to?

text: I have a raster (DEM) and want to replace a few cell's values with the values from another raster in QGIS. I would have done this with the "over" tool in the raster calculator in ArcGIS. Specifics: To potentially restore a mire, I want to model how the water flows if dams were to be put into place across some ditches. So, I have the original DEM and would like to add the dams to it (to then do an flow accumulation analysis). I cannot just add a few meters to the cell's values, because the dams are supposed to go across the ditches (so 90 degrees to the ditches) ... so, a constant would not result in an even dam, but a v-shaped one. Is somebody able to help?


title: ArcGIS Address range displaying 0s

text: I used the address range VB script               Function FindLabel ( [TOADDL], [TOADDR] )       FindLabel = [TOADDL]  & "/" & [TOADDR]      End Function      **Tried**               Function FindLabel ( [TOADDL], [TOADDR] )     if (([TOADDL] > 0) AND ([TOADDR] > 0)) then:       FindLabel = [TOADDL]  & "/" & [TOADDR]      End Function      But Still did not work To display the address ranges but my map comes up with 0s all over the map. What else can I add to the coding that would suppress and not display the 0s on my map. See attached left side. ![enter image description here](http://i.stack.imgur.com/Zfceu.jpg)


title: Are there any open source packages to help process network links?

text: I'm trying to find an open source package that can process KML-based network links. I am looking for more than a parser -- more along the lines of setting up timers for interval refreshing, handling `<Update>` elements, handling the `<NetworkLinkControl>` element, etc. I'm am aware that Google Earth API does this for you, but I am in need of an alternate mechanism to mirror that.


title: How to compare aerial and satellite images for land use analysis?

text: I am interested to compare the land use-cover dynamics for four periods: 1950s, 1980s, 1990s and current for a certain area having a max size of 5000 ha. For the first three periods detailed aerial photo of scale 1:20 000 are available while for the current no photo is available and the only possible option I can use is the coarser scale images such as LANDSAT images which can be downloaded for free. I have no fund to purchase detailed images. My question is how can the information obtained from the more detailed photos be comparable to the one to be obtained using the LANDSAT images for such small area? I would appreciate very much if anyone can suggest possible outcomes and consequences of this analysis or any suggestion for a way out?


title: OpenLayers - How to create 2 vector layers; 1 draggable and the other is not?

text: Is there a way to make one vector layer (or a certain kind of feature draggable), while the other types of feature or layer is not?


title: Why are my buffers not circular?

text: I would like to select areas under a particular circular radius in QGis. I believe this is accomplished with the buffer tool, but when I specify the radius the area is not circular. How to make it circular?


title: OL 2.10 Text layer

text: I heard that the latest version of openlayers 2.10 text layer provides a new feature of defining user specified attributes and so I want to give radius values under column radius, but even the latest 2.10 documentation doesn't contain anything about this... can anyone provide any information about this


title: Is there a service that does geocoding with advanced language support?

text: I'm building an address disambiguation page and I'm interested in having geocoding results returned in the local language of the country the result's in. For example, if I make a reverse geocoding request for "Bucharest, Romania", I want the location returned to be "București, România" (the local name). If I have an ambiguous query, I want each result to be returned in the language of the country it's in. Say there was a Bucharest in the U.S, I'd want a search for "Bucharest" to return "București, România" and "Bucharest, U.S.A". I've studied the Google Maps API, Yahoo! Maps and Bing Maps. Google is the only one that has _some_ language support (see the `lang` parameter), but only for the entire resultset, as far as I understood. Bing and Yahoo! don't have any language support in their API. Do you know of a way to do this? Is there any other service that supports this type of functionality? Thanks,   Alex


title: Best way to add Attribute data to a shape file

text: Hei GISers!! Thanks for your help with my previous question. My apology if this may be too simple a question for this site, but I am still learning the various aspects of GIS. Now that I can display the shapefile in openlayers, I need to add some attribute data. I can open the dbf file in excel but there is no save as option in excel to the updated file as a dbf. So my question is, what is the best way (or software to use) to add attribute data to my shape file? Thanks Chris


title: Combine DEM raster with vector data. in ArcScene 9.3

text: Ive have a raster layer of earthquake data that includes depth. I also have a DEM file. The problem is that I need to plot earthquake depth relative to the DEM file rather than sealevel in order to realistically place the focal points in Arc Scene. Simply using the depth data for base heights results in earthquakes that occur in the water rather than below the sea floor. I've tried fooling with the Z unit conversion and offset, but any adjust that produces reasonable result for earthquakes beneath the ocean floor leaves earthquakes that occur under mountainous area looking too deep. Thanks Doug


title: Python scaling issues and possible subprocess conflicts?

text: I have always found such great analytical and programming expertise on StackExchange in the past that I hope you can help me. Background: I have a project that involves spatially joining and interpolating traffic volume data across a road network on a continental scale. In order to handle the data processing, I have broken the data down by state and then into 10km processing tiles. States will run on parallel processes, which call a subprocess module to actually do the data processing in a 10km area at a time until the state level script is finished. The interpolation process starts with a road segment that has joined traffic data and searches connecting street segments with matching road name until it finds another segment with data. Then the code interpolates for segments in the middle. The problem: When I run a single 10km tile or even ~20-30 tiles (for the same state), I get interpolation values that are expected given the algorithm I defined. When I start processing the entire state (thousands of tiles) with the very same code, I will get interpolation values for the same road that exceed the endpoint counts by orders of magnitude in either the positive or negative direction (and how could my traffic volume go negative, right?). Considering that the calculations will change for the same road depending on how much data is being processed, I feel that this is somehow more of a scaling or instability issue with Python, and not a bug in the code logic. I was initially doing all the looping by referencing nested ArcGIS searchcursors (agh, experience backs up all the forum recommendations to NOT do that). So, I used an ArcGIS 10.0 searchcursor just once to read the street segment geometry and needed attributes into a Python dictionary for faster "lookups" during looping. The performance over ArcGIS searchcursors (even the new arcpy.da module) is amazing. I can now process the entire continent's worth of street data in two days. But now I'm wondering if Python dictionary tables can become instable if they get too large, or if the subprocess is not properly releasing memory objects before returning to the master script. There isn't any data passed from the subprocess back to the master; it's written to a permanent geodatabase table before closing. I wondered initially if the problem was running parallel processes, but I get the same unstable behavior for a single process on the state-level. I'm really not an expert Python programmer, though I've been effective in adapting other people's solutions to large data processing. This feels like one of those questions that a real developer could answer, as opposed to a code "pirate" like me. I don't know that posting all my scripts will be helpful, as I think I'm looking for someone to point me in the right direction to research possible issues/solutions with python/subprocess instability, dynamic changing of values in dictionaries, etc. I think if I had a good starting place on issues that cause that kind of behavior, I could problem solve from there (hopefully).


title: How to convert crs projection of Map in qgis

text: I am totally new to GIS. I have a qgis project. I am adding the screenshot. ![enter image description here](http://i.stack.imgur.com/AftFv.png) As you can see the map is sort of rectangle in projection. How can i project it like this (without the grids) ![enter image description here](http://i.stack.imgur.com/ukqw1.png) Thanks


title: CartoDB Toggle Map View?

text: I am trying to follow this tutorial that has buttons to toggle (all points are on the same layer) CartoDB Toggle map tutorial I try to follow as close I can for my own purpose but I always get the error under line 71 "uncaught reference Error: layer is not defined" (see attached screen shot) Can anyone tell me what I did wrong? I tried messing around with all the Layers, Sublayers, layer, sublayer...but non worked. Here is the script                              beginning of script tag                                   var layerUrl = 'my cartodb url';         var sublayers = [];            function main() {         cartodb.createVis('map', layerUrl, {             shareable: true,             title: true,             description: true,             search: true,             tiles_loader: true,             center_lat: 22.273904,             center_lon: 114.174510,             zoom: 14         })                   .done(function(vis, layers) {           layers[1].setInteraction(true);           layers[1].on('featureOver', function(e, pos, latlng, data) {             cartodb.log.log(e, pos, latlng, data);                     });                map = vis.getNativeMap();                  var subLayerOptions = {       sql: "SELECT * FROM final_landreclamation_all" }             var sublayer = layer.getSubLayer(1);                 sublayer.set(subLayerOptions);                 sublayers.push(sublayer);                   })         .error(function(err) {           console.log(err);         });              var LayerActions = {     all: function(){       sublayers[1].setSQL("SELECT * FROM final_landreclamation_all");       return true;     },     Saiwan: function(){       sublayers[1].setSQL("SELECT * FROM final_landreclamation_all where district_en = 'Saiwan'");       return true;     },     Sheungwan: function() {       sublayers[1].set({         sql: "SELECT * FROM final_landreclamation_all where district_en = 'Sheungwan'",       });       return true;     }      } $('.button').click(function() { $('.button').removeClass('selected'); $(this).addClass('selected');               LayerActions[$(this).attr('id')]();      });                 }            window.onload = main;          end of script tag      ![Screen Shot](http://i.stack.imgur.com/WSVw4.jpg)


title: Randomly choosing one from multiple fields in Field Calculator of ArcGIS for Desktop?

text: Using the Field Calculator in ArcGIS for Desktop, I want to randomly choose one field from a list of 10 fields (strings). The Excel equivalent, which is working, is: `=INDEX(A2:J2;rnd()*10+1)`. How can I do that in VBScript preferably (or in Python)?


title: How to make pen style show up correct in QGIS map composer legend?

text: As far as I can tell, yes I've updated the legend. See new screenshot. It's like the field width is cutting them, they all begin with one long and then one short line..   ![enter image description here](http://i.stack.imgur.com/E3asz.png) I have a several different line shapes files that represent buss lines. When I set "Pen style" to different styles I see the changes on the map but it doesn't appear correct in the legend in QGIS map composer. Fix or work around needed! Using QGIS 2.0 on Mac.      ![enter image description here](http://i.stack.imgur.com/JQG60.png) ![enter image description here](http://i.stack.imgur.com/oi0hI.png)


title: Problems with zooming and mouse events in Openlayers

text: I'm having trouble with everything mouse related for an Openlayers map when the map is placed inside a DIV with position fixed. The map works fine when you're at the top of the viewport of the browser, but when you're scrolling down the page, you can see that the zooming/click effects are shifted. You can check here http://41.32.148.178:82/#!search=KFC%2F0%2F0%2F0%2F%2F to see exactly what I mean. Thanks.


title: Symbology levels are ignored in ArcGIS 10

text: I have a problem migrating from a ArgGIS 9.3 to a 10 geodatabase (both sde and file gdb). The symbology levels stored in the 9.3 database are not transferred. When migrated to ArcGIS 10.0, symbology levels are ordered by alphanumerical order, and not the order assigned by me. I tried to migrate the data both by copying the featureclass and by upgrading the database -- both with the same dissapointing result: The symbology levels go back to the alphanumerical order of the categories. This is a BIG problem for me, since I have a massive amount of symbology levels in lots of featureclasses each having different representations. Have any of you similar experiences? More importantly: Is there a fix for this?


title: Simplest way to publish WFS from SQL Server under ASP.NET

text: My environment is ASP.NET, with data stored in SQL Server. Is there a way to serve Web Feature Services through C#, or will I need to install a mapping server?


title: Customize the legend elements

text: I want to customize the legend box elements .Please check the screenshot![legend](http://i.stack.imgur.com/L6y8x.png) (I want to remove the highlighted information ...its the map service name and symbol in ArcMap) How its possible? Is there any way or Are there any parameter in the legend constructor ?? I tried to modify following code but it was not successful.. Code: `dojo.connect(map,'onLayersAddResult',function(results){ var layerInfo = dojo.map(results, function(layer,index){ return {***layer: abc,title: 'new legend'***}; }); if(layerInfo.length > 0){ var legendDijit = new esri.dijit.Legend({ map:map, layerInfos:layerInfo },"legendDiv"); legendDijit.startup(); } });` Thanks in advance : )


title: Python Mapscript 6.0.1 layer.getShape API

text: I am attempting to follow the mapscript example described here - http://trac.osgeo.org/mapserver/wiki/RasterQuery but ran into some trouble with               s = layer.getShape(result.shapeindex, result.tileindex)      It appears that this no longer works               In [63]: s = layer.getShape(result.shapeindex, result.tileindex)     ---------------------------------------------------------------------------     TypeError                                 Traceback (most recent call last)     /Users/calvin/work/luc/<ipython-input-63-969295303151> in <module>()     ----> 1 s = layer.getShape(result.shapeindex, result.tileindex)          /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MapScript-6.0.1-py2.7-macosx-10.7-x86_64.egg/mapscript.pyc in getShape(self, *args)        1395     def nextShape(self): return _mapscript.layerObj_nextShape(self)        1396     def close(self): return _mapscript.layerObj_close(self)     -> 1397     def getShape(self, *args): return _mapscript.layerObj_getShape(self, *args)        1398     def getNumResults(self): return _mapscript.layerObj_getNumResults(self)        1399     def getResultsBounds(self): return _mapscript.layerObj_getResultsBounds(self)          TypeError: layerObj_getShape() takes exactly 2 arguments (3 given)      What is the argument I ought to supply to getShape method to get it working again?


title: post gis command prompt problem

text: While I'm working in post gis sql command prompt its mode changing automatically. I mean that the general form of command prompt as follows template_postgis=#(we type query's here) While working some time, when a query given its changed as **template_postgis <#** if any key pressed its unchanged again comes as **template_postgis <#** how can I change this to normal form like **template_postgis=#**? psql (8.4.5) WARNING: Console code page (437) differs from Windows code page (1252) 8-bit characters might not work correctly. See psql reference page "Notes for Windows users" for details. Type "help" for help. template_postgis_20=# create table cities (id int, name text, state_name text); CREATE TABLE template_postgis_20=# select addgeometrycolumn ('', 'cities') template_postgis_20-# select addgeometrycolumn ('', 'cities', 'latlon', 4326, 'M ULTIPOINT', 2); ERROR: syntax error at or near "select" LINE 2: select addgeometrycolumn ('', 'cities', 'latlon', 4326, 'MUL... ^ template_postgis_20=# SELECT addgeometrycolumn ('', 'cities', 'latlon', 4326, 'M ULTIPOINT', 2); ##  addgeometrycolumn public.cities.latlon SRID:4326 TYPE:MULTIPOINT DIMS:2 (1 row) template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# template_postgis_20(# INSERT INTO cities (id, name, state_name, latlon) VALUES ( '1', 'city', 'andhra', GeometryFromText('MULTIPOINT(78.4667 17.3667,82.2200 16.9 300,81.7833 16.9833,79.3515 13.6797,83.0000 17.0000,80.6200 16.5200)', 4326); template_postgis_20(# fgfgfd template_postgis_20(# fgfdgfd template_postgis_20(# gfdg template_postgis_20(# re template_postgis_20(# tre template_postgis_20(# tr template_postgis_20(# gfgretrytojyhftipg ccnb ds template_postgis_20(# fgfdgfd template_postgis_20(# fgfdgfd template_postgis_20(# 222 template_postgis_20(# @@@@@@@@@@@@@@@@ template_postgis_20(# template_postgis_20(# template_postgis_20(#


title: Edit Shapefiles Attribute data in GeoServer Programatically

text: I'm rendering a shapefile using GeoServer and using OpenLayers library to render it in the web browser. Now I have created the option of editing the attribute data in web browser. I want the edited data to get reflected back in the original shapefile. What is the best method to edit shapefile programatically using Python. I'm quite new to GIS concepts. Or do i need to convert it to PostGIS format in- order to edit the attribute data using Python? What are the best practices and way to go? Thanks in advance.


title: How to replace corrupt representations stored in a geodatabase using symbology from layer file?

text: I have a lyr file with symbology that I want to store in the database. Symbolology is already stored in the geodatabase but the symbology levels has been corrupted migrating from 9.3 to 10. Thus, I want to replace it with the symbology from the lyr file. How do I do that??


title: How does cost allocation work?

text: Why, when I use the cost allocation function of Spatial Analyst, is space not allocated in all input source locations (as shown in image below)? In particular, the input raster has 18 spots while the cost function allocates only 14 spaces. Can I force the function to allocate space in all input source locations? and how? ![Map of 14 colored regions \(raster format\)and 18 points](http://i.stack.imgur.com/BTpXj.jpg) Full-sized image here: http://i.stack.imgur.com/5k1Od.jpg ![enter image description here](http://i.stack.imgur.com/pNUMG.jpg)


title: Referencing Feature Dataset in File Geodatabase with ArcPy

text: It's probably an obvious one but since I'm new to arcpy I'd appreciate any help. I'm trying to develop an arcpy script which will eventually loop through number of rasters and feature classes stored in file geodatabase. I'd like to export spatial reference for these attributes along with their name to csv. I managed to do that for raster datasets, however I'm struggling with feature classes. All rasters are stored directly in geodatabase so I have no problem with referencing these. All feature classess are stored within 3 feature datasets. In order to reference these FCs I set env.workspace pointing to relevant Feature Dataset, which works fine. I'd like to find the way to reference all of my Fcs at once, something like:               arcpy.env.workspace="...\Name.gdb"     fcList = arcpy.ListFeatureClasses("*", "polygon", ***InFeatureDatasets***)     outFilePTH = r'...\output.csv'      I'd be grateful for any suggestions! Thanks, Magda


title: Understanding the difference between coordinates projection in OSM and Google Maps

text: I'm looking at the coordinate differences between Google Maps and OSM. I'm a noob in the technicality behind GIS. Having read:   1. EPSG 3857 or 4326 for GoogleMaps, OpenStreetMap and Leaflet   2. How to adjust the difference between the coordinate from OpenStreetMap and Google Maps I'm not sure whether is it because of #1 or #2 that causes the difference for the same coordinate that appear few hundred meters on the projected map. And the differences between the data stored and the projected map when using lat/long. Thanks! **EDIT** This may be more specific to China and the infamous offset issue. Looking at the following coordinates: `31.230548,121.470965` for the Shanghai Art Museum on Google Maps and ditu. Having entered the same set of coordinate in OSM, it gives me the Shanghai Art Museum is about 400M away in the NW direction. I don't understand why a physical point in space is different on the projected maps? Is this specific to China?


title: 'Couldn't load PyQGIS' after upgrade to Raring Ringtail?

text: I upgraded my Ubuntu to Raring Ringtail. After that, when starting QGIS I receive a message:               Couldn't load PyQGIS.     Python support will be disabled.          Traceback (most recent call last):       File "", line 1, in      RuntimeError: the sip module implements API v9.0 to v9.2 but the qgis.core module requires API v8.1            Python version:     2.7.4 (default, Apr 19 2013, 18:30:41)      [GCC 4.7.3]          QGIS version:     1.7.5-Wroclaw 'Wroclaw', exported          Python path:     ['/usr/share/qgis/python', '/home/rdk/.qgis/python', '/home/rdk/.qgis/python/plugins', '/usr/share/qgis/python/plugins', '/usr/local/lib/python2.7/dist-packages/pyspatialite-2.6.1-py2.7-linux-x86_64.egg', '/usr/lib/pymodules/python2.7', '/usr/local/lib/python2.7/dist-packages/networkx-1.5-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/psycopg2-2.4.2-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/twittercollect-0.1.0-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/pip-1.1-py2.7.egg', '/usr/local/lib/python2.7/dist-packages/Shapely-1.2.14-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']      What is causing such problem? How could I fix it?


title: calculate average slope along a line

text: I have a slope layer and I want to calculate the average slope along a line. This line isn't necessarily straight (e.g its a route, I would like to be able to input geographic coordinates along that line and have a script that outputs the average slope). Is this possible?


title: How to display a geotiff-image with OpenLayers at the "right place"?

text: I'm just starting with OpenLayers. I have a georeferenced geotiff and the associated world file. Now I want to display this image as an Overlay and google-maps as baselayer with OpenLayers. Would be nice if anybody has some hints? How to get started in the right way? thanks, southente


title: Convert shapefile in NAD27 from meters to decimal degrees to match xy data?

text: I have a shapefile of a boundary (polygon) that has the following projection: > NAD_1927_UTM_Zone_11N Projection: Transverse_Mercator False_Easting: > 500000.00000000 False_Northing: 0.00000000 Central_Meridian: -117.00000000 > Scale_Factor: 0.99960000 Latitude_Of_Origin: 0.00000000 Linear Unit: Meter > > Geographic Coordinate System: GCS_North_American_1927 Datum: > D_North_American_1927 Prime Meridian: Greenwich Angular Unit: Degree I need to pull climate data (in netcdf files) that is within this boundary. That data is in x y coordinates and has the following information: > XLAT   >  Size: 219x285 Dimensions: londim,latdim Datatype: single Attributes: units > = 'deg' XLONG   >  Size: 219x285 Dimensions: londim,latdim Datatype: single Attributes: units > = 'deg' There's no other metadata, so in order to align these files, I need to convert the shapefile to decimal degrees. I tried using the Project tool, selecting the same coordinate system, but I don't see decimal degrees in the drop-down. Any help would be greatly appreciated! Thanks!


title: Projecting Imported NetCDF file correctly?

text: I have 360 NetCDF files (.nc) that I need to import into ArcGIS. They hold monthly historical climate data in the U.S. When I tried to import one, using the Make NETCDF Raster Layer tool, the projection doesn't seem to register at all, just places the data on the point (0,0). Any ideas? I am new to ArcGIS.


title: OSM personal points of interest

text: I use OpenStreetMap along with OSMand on my mobile device. I have **personal** points of interest on my map that I do not want to upload to the community. Currently I use Favorites in OSMand to save them. Now I want to make a print of that map with my Favorites. How can I bring my Favorites to be displayed in OpenStreetMap on my PC? Related view-waypoints-in-osm


title: convert csv file into grib2 format using wgrib2

text: I have used wgrib2 in terminal.And convert grib2 file into csv file to view content of grib2 file.my command is, > wgrib2 CMC_naefs-geps- > raw_ARAIN_SFC_0_latlon1p0x1p0_2014022012_P012_allmbrs.grb2 -s | grep '' | > wgrib2 -i CMC_naefs-geps- > raw_ARAIN_SFC_0_latlon1p0x1p0_2014022012_P012_allmbrs.grb2 -csv out.txt After editing csv file in my gedit application in centOS, i want to convert csv file into proper grib2 file format.


title: View Waypoints in OSM

text: I have a GPX file with my waypoints.               <?xml version="1.0" encoding="UTF-8"?>     <gpx version="1.0">         <name>My Favorites</name>         <wpt lat="-26.7183013" lon="-54.8139346">             <ele>1</ele>             <name>F1</name>         </wpt>         <wpt lat="-26.7099827" lon="-54.8201895">             <ele>2</ele>             <name>F2</name>         </wpt>         <wpt lat="-26.6907555" lon="-54.8205221">             <ele>3</ele>             <name>F3</name>         </wpt>     </gpx>      Now I want to display them on the OpenStreetMap map. How can I do this? I can only drag the file on thr website when in edit mode and even then I do not see them. Related: osm-personal-points-of-interest


title: ESRI geoprocessing service with Javascript API 3.5

text: I am having issues getting a geoprocessing service to run. The service is a simple Python script that converts a table to CSV file. It runs fine in ArcMap. I can publish the service with the input as a constant and get it to run from Javascript. The problem is when I try to run the service with Feature Set created from a Feature Layer in Javascript. I can not get this to work! My geoprocessing service is here.               function exportAll(){         var query = new esri.tasks.Query();         query.where = "1 = 1";         query.outFields = ["*"];         //parcelsFS is my Feature Service Layer         parcelsFS.queryFeatures(query, function (features) {         var inputFeatures = new esri.tasks.FeatureSet();         inputFeatures = features.features;         var params= { "Table_Name":inputFeatures};           gpTask.submitJob(params, completeCallback , statusCallback,function(error){           //alert(error);           //esri.hide(loading);             });         });     }          function completeCallback(jobInfo){         if(jobInfo.jobStatus !== "esriJobFailed"){           gpTask.getResultData(jobInfo.jobId,"Output_CSV", downloadFile);         }       }       function statusCallback(jobInfo) {         var status = jobInfo.jobStatus;         if(status === "esriJobFailed"){           alert(status);           //esri.hide(loading);         }         else if (status === "esriJobSucceeded"){           //esri.hide(loading);         }       }       function downloadFile(outputFile){         map.graphics.clear();         var theurl = outputFile.value.url;              console.log(theurl);                 window.location = theurl;       }


title: Distorted exported georeferenced tif from far north

text: I'm trying to export a tif file for R, to plot my data on top of. I have geo-referenced this tiff file: "background_changed" from "Background". But when i export it, the file is very compressed in height (because it's from far north) and I do not know how to get around this?


title: Displaying numerical values as symbols on 3D map in ArcMap or ArcScene?

text: I have a point shp theme with fields Lat, Long, Altitude (m), and Number. The Number field – is a numerical parameter of each point (Lat, Long) The Altitude field – is the elevation of each point (Lat, Long) above the surface. Is it possible to put the Number field on a 3d map (with z= Altitude)? (I want to put a numerical value to each point (maybe by size of its symbol) and then - elevate each point on its alititude). Any idea is it possible or not, or how I can try to do it would help. I use ArcGIS10, so try to find this possibility in ArcMap and ArcScene.


title: Extract Values to Points between rasters and point shapefiles of the same name

text: I have a task of extracting raster values to point shapefiles, which is simple enough, but only where the raster filename is identical to the shapefile. For example, I have shapefiles "G1", "G2", "G3", and "G4" and I need to extract the values of rasters "G1", "G2", "G3", and "G4" to their corresponding shapefile. Using Python (or Arc), is there a way I can convey this condition and automate the process?


title: Deploying OpenGeo Suite App on Apache Tomcat

text: I am a beginner trying to develop a web app using Opengeo Suite. I've manage to test it localy on my personnal computer and I would like to deploy it to the web. It seems like Tomcat Apache is what I need to work with but I can't seem to figure how to get started. I know it is a "wide" question but I just need to know where to start, I'm usually good at learning by myself and figuring things out but I've been reading and searching on the web for a couple of days and can't really find how to do this. I have used ngrok (https://ngrok.com/) to share my app quickly but only the layout and base layer would show up (the overlay layers are missing). So if someone could just give me an idea of were to start, or the major steps I should take in order to make my app available on the web, it would be greatly appreciated.


title: How do I sort a geoJSON feature collection alphabetically by a property value?

text: I am trying to sort the objects in a geoJSON FeatureCollection alphabetically by the values of one of their properties. How do I get to the nested object properties with JavaScript? I have tried using .sort to no avail. Sample geoJSON to sort on PARK_NAME property:               "type" : "FeatureCollection",          "features" : [{         "type" : "Feature",         "id" : 1,         "properties" : {             "CRAG_NAME" : "Alberton Road Rock",             "PARK_NAME" : "Patapsco State Park",             "LAT_DD" : 39.3168,             "LONG_DD" : -76.8033,             "GUIDE_URL" : "http://indy-adventures.net/climbing/climb-maryland/guide.html#Alberton",             "OTHER_URL" : "http://www.dnr.state.md.us/publiclands/central/patapsco.asp"         },         "geometry" : {             "type" : "Point",             "coordinates" : [-76.8033, 39.3168]         }     }, {         "type" : "Feature",         "id" : 2,         "properties" : {             "CRAG_NAME" : "Annapolis Rocks",             "PARK_NAME" : "Appalachian Trail",             "LAT_DD" : 39.5583,             "LONG_DD" : -77.5987,             "GUIDE_URL" : "http://indy-adventures.net/climbing/guide.html#AnnapolisRocks",             "OTHER_URL" : "http://www.dnr.state.md.us/publiclands/at.asp"         },         "geometry" : {             "type" : "Point",             "coordinates" : [-77.5987, 39.5583]         }     }]       }      .....


title: How does QGIS reproject data?

text: Projection systems are always troubling and I cam across and issue yesterday. I created a buffer and did a select by location using that buffer, however it was producing the wrong results. It would select points that were outside the buffer and not select ones that were. It turned out there was an issue with the projections on one of the initial datasets, with a scale factor in the projection parameters being rounded up. It got me wondering what is the process of re-projection in QGIS and how accurate is it? I imagine it is based on GDALwarp? But particularly projecting to the British National Grid the proj seems very inaccurate: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs What are the parameters being used and can I impact them?


title: How to make PHP (in MS4W Apache) setting for MSSQL

text: I am new for MSSQL. I wanted to make php setting for MSSQL. What i mean by that is to avoid following error while trying to establish connection using PHP and MSSQL **Fatal error: Call to undefined function mssql_connect()** . I thing i have to establish setting in **php.ini** but i am not able to do that. can any one please help me out how to do this PHP and MSSQL extension activated. I have uncommented the extension=php_pdo_mssql.dll in php.ini but did not worked. Please guide me to do so.


title: cut/fill calculation tool to investigate if there is enough material to achieve a 30 degree slope

text: This is a cut/fill problem. We have pits that have been dug in the ground, usually rectangular. They have a bund wall around them. They are being rehabilitated by pushing the bund back into the pit. Usually the bund is not enough to refill the pit. We need to achieve a maximum 30 degree slope between the original land surface outside the feature and the backfilled material pushed in from the bund. We need to know if we have enough material in the bunds to achieve this angle of slope. We know the bund volume from topographic survey (interpolated the original land surface under the bund from elevation points outside the feature in the topographic data). From this interpolated surface we know the location and height from which the 30 degree slope will start and go down into the pit. Is there a tool in any GIS or CAD program that will take this line (as a polyline or polygon for example), take the angle (in this case 30 degrees) and output a new line or polygon showing where the topographic surface will be intersected, right the way around the pit? With this new line, a TIN could be created of the elevations along it at the bottom of the proposed slope and the elevations of the intersection at the top of the slope between the original land surface and the topographic surface. The topographic surface could then be subtracted from this new TIN to get the volume and see whether it is the same or less than the volume in the bund. If there is a tool to automate this, it would make life much easier. Otherwise we could calculate a few points around the pit manually for a coarser estimate.


title: Georeferencing a Picture having Resolution and a nearly correct BBOX

text: Is it possible to get the Boundingbox of a Picture when I know the Resolution, the Height/width in pixels, the sum of Tiles in each row/column and a Coordinate that is in the cornertile but not the corner ! To make it a bit clearer, take a look at that picture: The green things are given(one coordinate in the cornertiles and the resolution) and the red pointer indicates what I want to derive. Each tile is 256x256 pixels. ![enter image description here](http://i.stack.imgur.com/gl93q.jpg) Does anyone have an idea ? yours, Matthias


title: Can QGIS access cartodb tables via OGR?

text: I see that it is possible to access Google Fusion Tables in QGIS using OGRs Virtual Format layer. Shown here and details about the Google Fusion Table driver here. I was wondering whether something similar was possible with cartodb using the Postgres/PostGIS driver? I had tried a few different combinations with out any luck what so ever, I just keep getting an empty layer in QGIS. Anyone have an idea on how to make this work? or if it is at all possible? Using dev QGIS 1.9. Thanks Ando


title: GeoJSOn or WFS service to view, edit and save geometries

text: To view, edit and save in postgis geometries using OpenLayers + Geoserver what is recomenadado use GeoJSON or serivços WFS? I ask this for performance and additionally want the edition is recorded in the database realtime.


title: QGis 2.0.1 cpp-plugin for Windows

text: my plugin, developed in VS2008 for Windows runs in my testenvironment, the startimage of QGIS shows the developermeeting in Essen with the version number 2.1 alpha. On a other system I have installed a QGIS Version 2.0.1, the plugin dll is in the right directory (c:\osgeo4w\apps\qgis\plugins) but i can't get it, not even in the invalids. I'm searching for a way deploying my plugin by copying in a installed 'official' version of qgis. I'm not able to make an own install-package for qgis with my plugin and also that isn't it what my boss wants :-) Pleas give me some supprort. Thanks a lot. EDIT: I just want to update my plugin to QGis 2.0 (Dufour). But I don't know how to do that. I got the actual sources from git, added my plugin-code, compiled it in Visual Studio 2010, put the plugin-dll in the right directory. But it isn't in the plugin-list. I put the plugin-dll in a QGis 2.1-plugin-directory and it works fine. What do I wrong? I spent a lot of time and it is so frustrating. Everywhere in the forum the people say , developer should update their plugins to the new API. But how to do that?


title: Polygon parcel division in python

text: Is there an open source tool or module in python that does parcel division of polygons like in ArcEditor?


title: How to create an animation from raster data?

text: I have some NDVI and precipitation/temperature images at the monthly time step from Jan, 2005 to Dec, 2008. I need to create animation image to show the temporal change. How can I do this. Is it possible to use ARCGIS, ERDAS, ENVI. If so. please tell me the processes step by step. If not, what software and tool can be used to do this. Hope to help me Thanks


title: Invert gdalwrap cutline

text: I have a big raster image with medium details, but for some regions I do have far more details as a seperate raster image. Now I'd like to display both of them in my map that I render with `Tilemill`. So now I would need to cut a hole out of the bigger raster (exactly the shape of the small one) file so that both layers will be properly displayed on my map. (Note: I don't display it with an opacity of 100%) I found that using the `gdalwarp -cutline shape.shp input.tif output.tif` command I can cut a raster. But I need the inverse of that. Is there a parameter for `gdal` which I am missing? Thanks a lot


title: What GIS applications use Google Glass?

text: ![enter image description here](http://i.stack.imgur.com/orPUa.jpg) From techcrunch. I see a lot of press coverage about Google Glass, yet I haven't seen details of GIS apps that use it. What GIS applications use Google Glass?


title: POSTGIS Raster - Merge polygon onto raster

text: I have two tables, SCHEDULE contains polygon geometries and RASTER contains raster tiles I want to take a polygon from the SCHEDULE table and overlay it on top of a set of RASTER tiles that intersect its bounding box. I have got this far:-               WITH schedule AS (             -- SELECT A SCHEDULE GEOMETRY AND CREATE A buffer around it              SELECT ST_SetSrid(ST_Boundary(ST_Expand(wkb_geometry, 500)),27700) as buffer, wkb_geometry as wkb_geometry, streetward from schedule where schedule_id = 1532952         ),         --MERGE THE SCHEDULE GEOMETRY WITH THE BUFFER         expanded_schedule AS (                  SELECT ST_Union(wkb_geometry, buffer) as wkb_geometry FROM schedule         ),         raster_map as (             --UNION ALL OF THE RASTERS IN RASTER TO COVER BUFFER             SELECT ST_Union(rast) as rast from RASTER,schedule where ST_Boundary(wkb_geometry)::BOX2d  && rast              ),         raster_geom AS (             --MAKE A RASTER FROM THE GEOMETRY              SELECT ST_SetBandNoDAtaVAlue(                          ST_ColorMap(                         ST_AsRaster(wkb_geometry, --SCHEDULE GEOMETRY                                 rast,            --reference raster                                 ARRAY['8BUI','8BUI','8BUI'],         --pixeltype                                 ARRAY[118,118,118],          --data value                                 ARRAY[100,100,100]           --no data value                                 ),                          1, '118 1 1 1 1                             100 254 254 254 254')                 ,100)              --SELECT ST_AsRaster(ST_Buffer(wkb_geometry, 50), rast,ARRAY['8BUI'], ARRAY[118])              as rast FROM  expanded_schedule,raster_map              ) ,          raster_union AS (             SELECT rast FROM raster_geom             UNION             SELECT rast FROM raster_map         )         SELECT ST_AsPng(ST_Union(rast)) FROM raster_union      My problem is that this creates an image that looks like the following:- ![Output image](http://i.stack.imgur.com/c7mat.png) The SCHEDULE geometry area has worked fine, but the bounding box area has masked out the map tiles below. I do not really understand why? I suspect that the buffer geometry is "filled in" as far as postgis is concerned. What am I doing wrong, or should I follow another strategy.


title: cartodb visualization ownership transfer

text: I have a visualization created in my cartodb personal account. Can I transfer this viz to my company's enterprise account without recreating it there?


title: Python add-in user input not working ArcGIS 10.1

text: I made an add-in in python and it works fine on my machine, but on other machines it spits out an error, sometimes for Tkinter widget and when I use Tkfiledialog using a separate file, it spits out error for the first arcpy function it encounters:(arcpy.MakeXYEventLayer_management, the first function I execute) . On the contrary if I use harcoded paths instead of user input, it works fine. Can anyone please let me know whats wrong with it? Can it be related to versioning? but if so why it runs fine with hardcoded paths, I have checked all inputs, they seem to be in order.


title: How to handle display of nested polygons (census, county/state, etc) for a given map extent

text: My question is how best to decide which layer (from a set of nested, aggregated census polygons) to display for any given map extent in an online map. Australia's census boundaries are built from multiple layers, aggregated from highly detailed collection districts through a number of intermediate layers to eventually comprise the whole country. This same principle applies to city/county/state/country boundaries. Switching census layers based on scale dependency is unsatisfactory, since there must be a compromise between the populated cities and the vastly empty interior. Eg, over Sydney the Collection Districts should show at around 1:10k whereas in rural areas they should show above 1:500k 1) Are there any examples available in online maps where this problem has been solved elegantly? All of the examples I've seen use scale dependencies to switch layers on/off 2) I'm contemplating counting the features every time the map extent changes, and using this to decide which is the best layer to display. This "breaks" the traditional GIS paradigm whereby layers can switch on/off based on scale, since in my scenario they may also switch on/off based on different map extents at the same scale. Are there any examples of this in action? Does anyone have any thoughts or advice on whether this will be confusing to the user? Eg, a user might be viewing Collection Districts, then pan the map slightly. This could cause the Collection Districts to switch off, and the next layer to switch on. Has this been done anywhere before? Thanks, Steve * * * I've put a sample map at http://203.14.35.213/atlas-2.0/public/nsw/home/map/australia-population.html showing the direction I'm hoping to go. Note that this is a QA server so it may be slow, and not up 100% of the time. Pan and zoom around the map down to street level, and note that the polygon boundaries change (if you open the Legend panel, you can see which of the 5 layers is currently displayed). The boundary layer is chosen each time the map draws, based on the _count_ of features rather than the _scale_ (eg, a different boundary will draw over Sydney, compared to a rural area at the same scale). This can mean that panning the map results in the layer changing. The idea is for this process to be transparent to the (novice) user, who should just see the "best" information wherever they browse. My original question was whether the experts feel this "breaks" the traditional model of scale-dependent rendering. Does anyone have any feedback on whether this approach has merit or is flawed?


title: QGIS 2.0 text delimited layer importing data as single row

text: I'm trying to import a text delimited layer using lat/lon, but the tool interprets the data as a single line. I've tried saving my csv using several different programs (Stata, python editor, text editor, Excel), but nothing works. Here is a sample of my data:               n,aqs_site_id,site_latitude,site_longitude     1,17-001-0006,39.93301,-91.40424     2,17-001-0007,39.91541,-91.33587     3,17-019-0004,40.12379,-88.22953     4,17-019-0006,40.12389,-88.24055      And my csvt file:               "Real", "String", "Real", "Real"      This is what the dialog box looks like when I try to upload. You can see there is no data because everything is pulled into row 1: ![.](http://i.stack.imgur.com/woUo2.png) Any help would be much appreciated!


title: R -plot 12 images per plot or save 12 images per image file in R

text: Here is R script and my question is How can I plot 12 images per plot or save 12 images per image file because I have total 864 images.               RAD1998 <- raster(paste(getwd(), "/1998bil /1998ASC5min_ppt_spas1214_0001_19980202_0810_UTC.asc.bil", sep = ""))          list.ras <- mixedsort(list.files(paste(getwd(), "/1998bil/", sep = ""), full.names = T, pattern = ".asc.bil"))      list.ras     png('RAD1998.png')     RAD1998.all <- stack(list.ras)     plot(RAD1998.all)     dev.off()


title: qgis delaunay circumcircles

text: Is it possible to show the delaunay circumcircles in QGIS? I know how to make the Voronoi polygons and Delaunay triangles. I found a web page that shows the circumcircles at: http://www.scribd.com/doc/147332295/A-Gentle-Introduction-to-Gis It appears that the author did this with QGIS, but he didn't explain how. Thanks Jim * * * Image from Wikipedia: ![enter image description here](http://i.stack.imgur.com/0JZeW.png)


title: Symbology of point layer using CSS class

text: There is nice feature DivIcon in Leaflet library. Is it possible to get the same function using OpenLayers? I guess I can make some workaround using Markers but not sure is this a right way. Now I'm using vector layer and have to load image for each layer separately, but in CCS case it is possible to use only one sprite for all layers.


title: ESRI File Geodatabase with a field calculator with an incrementing number

text: I've got a python script that runs on the Field Calculator of a ESRI File Database. Right now it runs correctly in that it will increment the last three digits of the value. But this is a script that is run as part of post processing so it will be run everytime there are new entries in the feature class. My question is how can I modify this so that every time it runs it will look at the last four digits of the FacilityID and increment from there below is a screenshot of my attribute table: ![enter image description here](http://i.stack.imgur.com/Y1Flb.png) EDIT: And below is my Python script I need to modify.               cur = arcpy.SearchCursor("Telecommunications Line")     fac_id_values = [int(row.FACILITYID[-4:]) for row in cur]          maximum_value = max(fac_id_values)     if maximum_value:      rec= maximum_value      else:      rec = 0          def autoIncrement():       global rec       pStart = 1        pInterval = 1       if (rec == 0):         rec = pStart        else:         rec += pInterval        return "COMLI" + "11" +  format(rec, '03d')      Ok after running the code above I got this as a result. It overwrote the previous values as shown above. The First item should have a FacilityID of COMLI111001. ![enter image description here](http://i.stack.imgur.com/I85jF.png)


title: TileMill Reference Layer Plugin doesn't work w/ non-MapBox TileJSON

text: Has anyone been able to get TileMill's reference layer plugin to work w/ a TileJSON definition? In its description, it says it can work either with a mapbox map id or a tileJSON url. I've tried it out successfully with map ids, but when I give it a url to my tileJSON here, nothing loads and the console outputs: ` [tilemill] Client Error: Script error. [tilemill] at :0 [tilemill] Client Error: TypeError: 'undefined' is not an object (evaluating 'a.tiles') [tilemill] at http://127.0.0.1:20009/assets/tilemill/js/vendor.js:5164 ` Anyone had any luck with this? **Update** : the tileJSON file must be hosted on a server that supports CORS. That solved one problem, but still doesn't work w/ the plugin (same error output).


title: How can I "reset" SketchUp origin after importing DXF with "Preserve Drawing Origin" option enabled?

text: I can successfully import all of my 3D DXFs into a common location so that they are referenced correctly (in reference to each other). TO do this I simply check the Import DXF "Preserve Drawing Origin" option on. However, when I do this DFX models are placed very far away from the Sketchup "default" origin. It becomes very difficult to zoom to the location of the 3D DXFs and navigate around them. Zoom Extents zooms out all the way showing the default origin and the imported DXFs as a spec in the distance (see screen capture). To even zoom in to the imported model is nearly impossible. **How do I "reset" the origin and correct the extent so that sketchup zooms in onto the model when "Zoom Extent" is clicked?** ![enter image description here](http://i.stack.imgur.com/Eymro.jpg)


title: How to convert raster to polygon that I classify in C# ArcGIS engine?

text: by " IMultivariateOp.MLClassify" method,I just can classify the raster into many classes,but how to convert each of them to polygons,and give them properties like names? I need some code in C# in ArcObject. Thanks very much.


title: Is there a size restriction on KML layer in esri map?

text: My website utilizes ESRI's map and it contains several KML layers. Most of them show up fine except for the ones bigger than ~4MB. Are there any restrictions on KML file size? Thanks,


title: Smoothing raster map

text: I have a raster map of US Midwest which is very sparse, i.e. the pixels of interest are few enough to be almost invisble when viewed at a scale where all states of US Midwest are visible. I would like to follow the approach outlined in this PNAS paper (http://www.pnas.org/content/110/10/4134.full) to create a better map, but not sure how to replicate it in ArcGIS. Any help would be appreciated. The PNAS paper outlines the steps as follows: > Because of the small sizes and scattered distribution of change areas, it > was difficult to visualize regional patterns of LCLUC at the original 56-m > spatial resolution. As a result, we used spatial smoothing techniques to > create a regional change surface that highlighted local hotspots of change. > Related approaches are used in fields such as spatial epidemiology to > generate stable estimate of disease rates (48) but have not been broadly > applied in the field of land change science. In our smoothing approach, > change pixels at 56-m spatial resolution were first aggregated to the > percentage of change at 560-m resolution. This was done by taking 10-by-10 > blocks of 56-m pixels (i.e., 100 pixel blocks) and summing the binary change > within each block (Fig. S4A). Next we used a 2D kernel smoother to compute a > smoothed estimate of percent change for each of the 560-m resolution pixels > (Fig. S4B). A quartic kernel function was used to calculate moving averages > across the study area at a bandwidth of 10 km. The same quartic kernel > function was used to smooth percent change from corn/soy in 2006 to > grassland in 2011. Finally, we generated a smoothed map of grassland cover > in 2006 by aggregating grassland presence at 56-m resolution to percent > grassland cover at 560-m resolution, and then smoothing this aggregated > cover layer by using the same 10-km quartic kernel. This smoothed grassland > cover layer was subsequently used as the denominator in generating a map of > relative rates of grassland conversion. As far as I understand, this is the flowchart:   1. Use block statistics in ArcGIS to sum 10x10 pixels of 56-m raster to 560m raster   2. 2D kernel smoother: not sure how to do this   3. Quartic kernel: not sure how to do this  Not sure how to progress beyond step 1


title: How to populate a dropdownlist with map service field names given only the layer name

text: I'm trying to wrap my head around a task which seems pretty simple, but not sure what the easiest way to go about it. I'm using javascript api and have a populated dropdownlist of sorted layer names from my soe along with other 'non-map service' as search options (below):               // THIS IS FROM THE REST SOE:     // add all map service layers type feature layer and selectable             for (int i = 0; i < layerInfos.Count; i++)             {                 IMapLayerInfo layerInfo = layerInfos.get_Element(i);                              if (layerInfo.Type == "Feature Layer" && layerInfo.CanSelect == true)                     layersList.Add(layerInfo.Name);             }                  // sort list of map layers             layersList.Sort();          // add static 'non-map service' search options             layersList.Insert(0, "City");             layersList.Insert(1, "Water Body");             layersList.Insert(2, "Headquarters");             layersList.Insert ...      Next in my client app I need to populate another dropdownlist with the field names from the result of the selected layerinfo.Name above but without having the layer ID available. I was hoping to use the 'Find' operation however it requires a searchText parameter. Could I somehow use the ...MapServer/layers url? Thanks in advance! Bonus: I'm using KendoUI dataSource and kendoDropDownList controls so any suggestions regarding the configuration integrating the map service request would be awesome.


title: Where can I find documentation on QGIS C++ Plugin Development?

text: Is external C++ plug-in support available for QGIS? I'm having a really hard time getting started here. I followed the doc here: http://download.osgeo.org/qgis/doc/manual/qgis-1.1.0_coding- compilation_guide_en.pdf But that's fairly outdated. I was able to compile and link, but the plugin isn't being brought into QGIS - so I'm wondering if that tutorial is out of date. When I go to the wiki page at QGIS's website - they reference a VERY outdated page that is identified as obsolete: http://hub.qgis.org/wiki/quantum- gis/Writing_C++_Plugins I can't seem to find a current tutorial that describes C++ plugin support for QGIS 1.8 (or any version close to it). I realize Python is more pervasive, but at this point we have specific needs that are supported via C++.


title: Where is Area and Volume statistics tool in ArcMap 10.1?

text: I want to measure surface volume of an area with different Plane Height above reference plane. There should be a tool for statistic calculation but I cannot find it in 3D analyst toolbox. Is it exist in GIS 10.1 ? Or which tool can help me to measure ?


title: Python script for Data Driven Pages to run a series of DDP at once?

text: I have a several different polygon shapefiles that I am using to create individual maps for each polygon within the shapefile. The layout is the same for each map, the only thing that changes is the polygon and scale bar. The size of the polygons vary greatly (i.e. < 1 acre to > 5,000 acres). Because of the size variability, I've had scale bar issues with running all polygons in DDP with the the division value either being too large or small. Currently, I am running a DDP on each shapefile with correct scale bar division value, one shapefile at a time. I have 12 shapefiles in this project. Is there a way to automate this using python to run DDP in a series on the different shapefiles? Any advice would be appreciated, Thanks.


title: OpenLayers transform control box properties

text: I'm using OpenLayers for my GIS application. My problem is that when I add a transform control to a polygon feature, it looks very "messed up". The box for the transform control is completely unaligned with the original polygon. My features aren't very complicated, in fact they are simple rectangles. Unfortunately, I can't show you an example of what it looks like at the moment but I will try later. However, you can get some idea of what it looks like from this example. As you can see, the handles of the transform control box are not aligned with the vertices of the polygon. Is there anyway for me to render the transform control box in such a way that the handles are aligned with the polygon vertices? I realise that the transform control comes with the "handles" and "box" properties, but these are immutable according to the documentation. Thanks in advance for your help in this matter.


title: difference of reference plane/Plane Height / Z factor in Surface volume calculation?

text: I have a TIN surface with Minimum elevation 25 m and Maximum elevation 140 m. I want to calculate surface volume in different elevation between 25 and 140 meter. I wonder for example If I want to measure the area above 25 m ( which is the lowest elevation) how shall I set the Plane Height and Z factor? PS: I am working in Arcmap 10.1 area.


title: Adding kernel density output to map with ArcPy

text: I am trying to emulate the behavior of the Kernel Density tool from the ArcMap 10 GUI in a script; in other words, I want to calculate the density of a dataset, and add the visual result to a map. If possible, I'd also like to be able to adjust the color and transparency of the kernel density layer, as one can in the layer properties dialog in the GUI. I know one can run the kernel density tool in a script, but I am not sure how to add the output to the map like the GUI does. Is it possible to do this in ArcPy?


title: QGIS: opening a shapefile without an exclusive file lock

text: **UPDATE** : I did some analysis of what happens with the locking and it looks like QGIS doesn't use an exclusive lock. It just requires (non-exclusive?) write lock to the file. So this C# code fails:               File.Open (fileName, FileMode.Open, FileAccess.Read, FileShare.Read);      the error being: `System.IO.IOException : The process cannot access the file '...' because it is being used by another process` while this one goes through:               File.Open (fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);      So my question is basically off the mark and I'll move to close it. * * * In QGIS, when you open a shapefile in read-only mode, the shapefile still gets to be exclusively locked by QGIS, preventing other programs from reading it at the same time. This is pretty annoying and basically unnecessary, since you're not really editing the shapes or attributes of the file (and even if you were, the read access should still be allowed). Is there a way to open the shapefile without locking it out for other software?


title: Autodesk Infrastructure Studio - Enable WMS

text: With only a couple hours experience this is very likely user error but I have "Autodesk Infrastucture Studio 2013" installed with a few "Data" nodes and "Layers" nodes. I can right-click a child of the "Data" node and select "Enable WFS..." and it gets added to my WFS service BUT I when I right-click a child of the "Layers" node I do not have the corresponding "Enable WMS" layers. Neither is the _Enable WMS/WFS_ toolbar item enabled. Any thoughts on what might be causing of "Enable WMS" not getting enabled?


title: Different NoData values when processing a GeoTIFF in QGIS and bringing it to ArcGIS

text: I'm trying to process a GeoTIFF in QGIS 1.8 using SEXTANTE and GRASS via the r.neighbors tool. I'd like to process the image, then be able to utlize it in ArcGIS. The problem I'm running into is that the output file has a different nodata value than the input, and Arc isn't recognizing the correct nodata value (which is 3 E-38). Arc reads the output file as having a nodata value of 0, and QGIS reads it of having a nodata value of NaN. This causes Arc to render the file incorrectly, and makes utilizing the output file in Arc difficult. When identifying nodata pixels in ArcGIS, they return the cell value of nodata, however the raster's nodata value is 0, instead of nodata (as in the cell value nodata). This causes them to be rendered as black, instead of nofill, and may impact further processing of the file. Suggestions?


title: Unable to delete .lock files within geodatabase using Python

text: I am having problems with lock files while deleting and copying geodatabases for backup purposes.               print "Now backing up your Geodatabase"     distutils.dir_util.remove_tree (r"\\Msukserver\gis\geodatabase BACKUP\EVERYONE\Mining Features (MATTHEW).gdb", 0, 0) # deletes 'everyone' backup copy     distutils.dir_util.copy_tree(r"\\Msukserver\gis\geodatabase BACKUP\MATT\Mining Features (MATTHEW).gdb", r"\\Msukserver\gis\geodatabase BACKUP\EVERYONE\Mining Features (MATTHEW).gdb") # backup the last backup to 'everyone'     print "old backup copied"     distutils.dir_util.remove_tree(r"\\Msukserver\gis\geodatabase BACKUP\MATT\Mining Features (MATTHEW).gdb", 0, 0) # deletes last backup     print "old backup deleted"     distutils.dir_util.copy_tree(r"C:\GIS Home\Mining Features (MATTHEW).gdb", r"\\Msukserver\gis\geodatabase BACKUP\MATT\Mining Features (MATTHEW).gdb") # copy mining features to create new backup     print "::::::::::::::::::::::Backup Complete::::::::::::::::::::::"     raw_input("Push Return key to close...")      I am getting a 'permission denied' error on the '.lock' files. Is there a way of copying/deleting all the file except those with a .lock extension? or a way to continue/force with errors? I am aware that I am currently copying/deleting the entire directory and may need to change my code to copy/delete files only.


title: Why do glob.glob and gdal_translate not work for me?

text: I have a little problem with my python script. I wrote it to convert MODIS data from .hdf into .tif. It will convert all files in a folder using a loop. I do not know which command I must enter to assume the files from the folder as input file. I tried *.hdf but then I got errors indicating that the file doesn´t exist. The output-name of the new .tif should be the input name of the .hdf. At this point in my script it doesn´t work for me. I have no idea what I have to write now in the "gdal_translate"-command. I tried it with *.tif but this doesn't work. Thanks for reply! Cheers               #!/usr/bin/python          import os     import glob     from osgeo import gdal     from osgeo import ogr      from osgeo import osr      from osgeo import gdal_array      from osgeo import gdalconst      from osgeo.gdalconst import *          path = ''     path = raw_input('Directory? (z.B. C:\Daten\Modis\):')          # change to path     os.chdir( path )          # checks directory     vcheck = os.getcwd()          file = glob.glob('*.hdf')          for file in glob.glob('*.hdf'):          os.system('gdal_translate -of GTiff -a_srs EPSG:4326 "HDF4_EOS:EOS_GRID:"*.hdf":MODIS_Grid_8Day_Fire:FireMask" *.tif')


title: What is the most efficient way to get a list of featureclasses from a large ArcSDE database?

text: I have a SDE DB which consists of 40 feature datasets and around 300 featureclasses. I need to get the full list of all featureclasses whose name does not contain "ARCHIVE". It takes several minutes using the script below. It will be unacceptable if I publish this as a geoprocessing service. How can this be improved?               import arcpy,os     import json     from arcpy import env          env.workspace=r"C:\ysde\lcimrl.sde"     arcpy.AddMessage("--------get resource dataset \n")          resourceFeatureList=[]     lodFeatureList=[]     dsList = arcpy.ListDatasets("*","Feature")     for ds in dsList:         dsDesc = arcpy.Describe(ds)         dsName=dsDesc.name.upper()         arcpy.AddMessage("--------get feature class list from "+dsName+" \n")              fcList = arcpy.ListFeatureClasses("*","",ds)         print fcList         for fc in fcList:             desc = arcpy.Describe(fc)             fcName=desc.name.upper()             #print dsName+"_"+fcName             if   "ARCHIVE" not in fcName:                 if dsName!="SDE.ALTERNATIVES":                     resourceFeatureList.append(fc)                 else:                      lodFeatureList.append(fc)     print resourceFeatureList     print lodFeatureList