Error in QGIS 2.2 Raster Merge Tool in OS X

I'm having this strange error in QGIS 2.2 for OS X while trying to run the raster merge tool (in the Raster - Miscellaneous - Merge). This happens just by clicking on the "Select" button to choose the files that will be merged. Does anyone has an idea of what can be the problem? Is it due to the Python version I have installed Thanks!               An error has occured while executing Python code:          Traceback (most recent call last):       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/GdalTools/tools/doMerge.py", line 92, in fillInputFilesEdit         files = Utils.FileDialog.getOpenFileNames(self, self.tr( "Select the files to Merge" ), Utils.FileFilter.allRastersFilter(), lastUsedFilter )       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/GdalTools/tools/GdalTools_utils.py", line 394, in getOpenFileNames         return self.getDialog(parent, caption, QFileDialog.AcceptOpen, QFileDialog.ExistingFiles, filter, selectedFilter, useEncoding)       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/GdalTools/tools/GdalTools_utils.py", line 351, in getDialog         dialog.selectNameFilter(selectedFilter[0])     TypeError: QFileDialog.selectNameFilter(QString): argument 1 has unexpected type 'QPyNullVariant'          Python version:     2.7.5 (default, Aug 25 2013, 00:04:04)      [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]               QGIS version:     2.2.0-Valmiera Valmiera,           Python path: ['/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing', '/Users/gds506/.qgis2/python/plugins/LecoS', '/Applications/QGIS.app/Contents/MacOS/../Resources/python', u'/Users/gds506/.qgis2/python', u'/Users/gds506/.qgis2/python/plugins', '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/Library/Frameworks/SQLite3.framework/Versions/B/Python/2.7', '/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7', '/Library/Python/2.7/site-packages/numpy-override', '/Library/Python/2.7/site-packages/matplotlib-override', '/Library/Frameworks/GDAL.framework/Versions/1.10/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/PIL', '/Users/gds506/.qgis2/python/plugins/mmqgis/forms', '/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools']


How to refer to a variable from the conditional statement in the ExtractByAttributes function in ArcGIS 10?

Trying to use the ExtractByAttributes for rasters so that I have multiple attribute values that I want to extract. This works fine: myraster = arcpy.sa.ExtractByAttributes("source_raster", "VALUE IN (1,8,10)") but obviously I can't repeat this procedure for hundreds of layers by manually inserting the desired attribute values for each. Anything I've tried for replacing the numbers with a variable has not worked. It doesn't seem to take a list of strings or integers, nor does it help to strip the brackets[] from around the list, or to have the numbers as a single string. I've even tried with a single number instead of many and I just can't get it to work without inserting the actual number in there. What on earth am I missing? Needless to say I'm a beginner with Python. Many thanks for any ideas


Using two different Python versions for QGIS scripting?

I´m intending to learn scripting with python in QGIS, but I have a couple of questions. I'm using Python 3.4 for learning which is installed in my laptop, but QGIS is using Python2.7 How could I work with both together ? Creating an enter in the PYTHONPATH like C:..........python27 (wherever it is into QGIS directory) and adding a shebang #!.....python27 at the begining of my scripts ? Is there another way to work with both versions ? I´m using PyQT and the same question again. One designer in python3.4 installed and another one into the QGIS directory. How do you work?


OpenLayers polygon fill on IE has black shading

I have an odd problem on with OpenLayers on IE6, IE7 and IE8. A newly drawn polygon has odd black shading. In fact, even the line (stroke) has the same black outline. Works great in Firefox, Chrome, Safari and even IE9. I've tried everything from creating my own stylemap and symbolizers, to removing all styles and using default layer, and it still has a problem. And to add to the puzzle, if you draw a second feature and intersect with the first, the intersected area has _perfect_ colorization/rendering. I've tried changing the basic style to have a different color (say blue) but then the color is again the base blue plus the black shading/fill attached to it. ![enter image description here](http://i.stack.imgur.com/Uk1KH.png) Have run the basic drawing example, http://www.openlayers.org/dev/examples/draw-feature.html and it works just fine on all browsers. ![enter image description here](http://i.stack.imgur.com/w5HLA.png) * * * Edit 1/10 5p PST I'm removing my previous edit with "renderer" because it doesn't apply anymore. however I was finally able to create a stripped-down sample that reproduce the error. I wrote a page that accepts a URL param to enable the bug, and it'll be broken in IE8,7,and 6. All you have to do is draw a polygon, and you'll see that it comes out black http://dl.dropbox.com/u/47684/nc4/debug/RenderTest.html?break=1 And here's the source:                                     <meta  http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

                         As you can see, just setting the layer OPACITY will break it. And this actually breaks on IE6 and 7. It works on 8, but I have compatibility mode set to 7, so yes that makes it break on 8. Can someone from OL dev group comment why setting opacity is breaking? I've traced the code down to `Util.js` and the `modifyDOMElement` function, and it _looks_ to be ok. But... ?


Compound Key to Relationship

If tableField = "Process ID" and layerField = "PID" then this works:               IRelationshipClass relationshipClass =         memoryRelationshipFactory.Open(         "Join",         table as IObjectClass,         tableField,         geoFeatureLayer.DisplayFeatureClass as IObjectClass,         layerField,         "forward",         "backward",         esriRelCardinality.esriRelCardinalityOneToOne );      If tableField = "Process ID, Year Made" and layerField = "PID, YM" then it fails. (Table is SQL Server table.) I have tried brackets and quotes to no effect. Is it possible to pass a compound key?


calculating decimal degrees from coordinates found in an excel table

What is the exact syntax to use when calculating decimal degrees in the field calculator? I know the general formula {i.e. Degree + (minute/60) + (second/3600)} but how do I put this into the gis? I have three separate fields, one for each: LatDegree, LatSecond and LatMinute respectively, and I also have the DecimalDeg field that needs to be populated. It is a dBASE table that I created by exporting an excel table. I then added in the above mentioned fields and populated the first three. I now need to calculate the decimal degrees but each time that I enter the syntax into the field calculator it gives me a geoprocessing error. I am using Arcmap 10.1


What's up with the GeoJSON spec and CRS as a IRM?

I'm writing a web API to our GIS data, currently revamping our geocoding service. I'm creating the option for folks to specify the output type as GeoJSON so I'm trying to follow the spec. Our data is stored in nad83 datum UTM zone 12 north projection. The GeoJSON spec says to add a CRS. The wkid is 26912 but what is the OGC CRS URN? I can understand that the OGC CRS URN is broken down into a few parts. urn:ogc:def:crs:OGC:1.3:CRS84 urn is the identifier, ogc is the organization, def is another static deal, crs is the type (coordinate reference system), OGC is the authority, 1.3 is the version and CRS84 is the projection. Why is the authority of utm 26912 the European Petroleum Survey Group? Do any mapping frameworks even use this CRS name? I want to follow the spec but it seems that more mapping frameworks are using the wkid. http://spatialreference.org/ref/epsg/26912/ seems like the best place to get the info but they don't even list the urn. Is the GeoJSON spec just silly or what?


How to keep (complex) color table when exporting from GRASS

I understand how to work with color tables within GRASS - but is there any way to preserve color tables when opening the raster in a different program? For example, I created a color table in GRASS that is very detailed (certain number ranges get certain colors), but then when I open the file in QGIS, all that work is gone. It does not seem to matter what type of raster file I export as from GRASS (I have tried geotif, ArcGIS Binary, and ArcGIS ASCII). Is there any trick I am missing? Thanks if you can help.


Is there a way to limit the overview map to a certain zoom level?

The OpenLayers overview map control works great when I use standard options. I would like to limit the overview to one resolution, but I can't seem to find the right combination of values for the properties and mapOptions. Is there a way to force the overview map to stay at a single zoom level? The example code below uses the "numZoomLevels : 1" option, but this has no effect.               function init() {     // start with a browser check. If it's IE6, transparent png's are not supported     var ua = $j.browser;     if(ua.msie && ua.version.slice(0, 1) == "6") {         var imgtype = 'image/gif';     } else {         var imgtype = 'image/png';     }          // Define a projection for the map     var proj = new OpenLayers.Projection("EPSG:4326");          // Define the map options and start with an empty control set     var mapOptions = {         controls: [],           projection : new OpenLayers.Projection("EPSG:900913"),         displayProjection : proj,         units : "m",         numZoomLevels : 20     };     // Create the map object     var map = new OpenLayers.Map('map', mapOptions);           // Define the overview map options     var overviewOptions = {         size : new OpenLayers.Size(300, 200),         maximized : true,         minRectSize : 0,         autoPan : true,         mapOptions : {             projection : new OpenLayers.Projection("EPSG:900913"),             displayProjection : proj,             units : "m",             resolutions : [90],             numZoomLevels : 1  // this has no effect, the ov map still zooms in and out with the map         }     };          // Add controls to the map     map.addControl(new OpenLayers.Control.OverviewMap(overviewOptions));     map.addControl(new OpenLayers.Control.Navigation());     map.addControl(new OpenLayers.Control.PanZoomBar({panIcons : false}));     map.addControl(new OpenLayers.Control.ScaleLine());     map.addControl(new OpenLayers.Control.LayerSwitcher());     map.addControl(new OpenLayers.Control.Scale($('scale')));     map.addControl(new OpenLayers.Control.MousePosition({         element : $('location')     }));          // Add layers     var gmap = new OpenLayers.Layer.Google("Google Streets", {         numZoomLevels : 20     });          map.addLayers([gmap]);          // Start the map at a particular point     var point = new OpenLayers.LonLat(-118, 34);     point.transform(proj, map.getProjectionObject());     map.setCenter(point, 16);          }; // Ends the init()


What iOS (iPhone/iPad) app from the App Store can I use to collect data?

What iOS app from the iTunes App Store can I use to collect data (mainly points, perhaps photos) and later import them into my GIS? I am mainly interested in an out-of-the-box solution, not develop one using any API. Bonus if it already connects to either my own WMS, WFS or Tile server. **Update** : Free or paid doesnt matter. I just want the best option.


Gdal_sieve not working?

I'm using the Sieve command within QGIS (Raster > Analysis > Sieve), but when I run the command with any variation of parameters, it completely changes the histogram of my raster data from between -0.140351 to 0.780933, to a binary output of 0 and 1. ![Before Sieve](http://i.stack.imgur.com/zF09x.png) ![After Sieve](http://i.stack.imgur.com/kNi6W.png) This example was run with a threshold of 2 and pixel connections of 4, on a NDVI image calculated from Landsat 7 imagery. Any ideas would be greatly appreciated.


Matlab script - how to access from/run in GRASS GIS?

I am currently working on shell script in GRASS GIS and Ubuntu. At some point, I must run a calculation (based on an ascii grid) that I have available as Matlab script and .exe (created from Matlab I believe). For that I must exit GRASS (and boot into Windows), but it would be neat if I could somehow run this from inside GRASS GIS (or at least stay inside Ubuntu). For the non- Matlab and Python-expert...what would be a sensible approach? From what I have understood, converting to Python might be the only real option.


Most optimal way to create a (spatial) database for big amounts of data?

I am using QGIS, and on my way to set up a huge spatial database (geographical), where most of the data is points without geometry), along with other types of data (like lines in DXF and areas in SHP). Until now I have been using single files for all data, but I begin to believe that this will be rather slow (rendering/querying/calculating) when adding more and more data (?). I have read about a few different methods (like this discussion: Database versus Files for Solo Developer). Unfortunately I haven't found any article that clearly states pros and cons when using "single file data import" compared with using a proper database instead. At the moment, I am the only one going to use this database, but in the future it will probably be more people, and perhaps even we will need to "install" this database on other peoples computers (not sure how, yet). I'm rather new to using PostGIS, but in my understanding, to use (for example) a PostGIS database I need to save all my data as Shape files, instead of point text files (CSV)? So this is also an extra step that will take some time (and I feel more comfortable and used to making calculations and changing data in a CSV-file using Excel).   1. My main question is: what the best way to build a database for this purpose?   2. A sub-question is: what are the pros and cons when comparing "single file data import" and a proper database (I plan to use a PostGIS database)? **Some clarifications:** First of all, I haven't had much education in GIS engineering, so perhaps some of my expressions and technical terms are somewhat wrong... " **Are you just using the csv to view the coordinates as a point?** " - Yes, this is what I wrongfully called "single file import" earlier, the point (coordinates) itself is of course geometry as well. " **Really, what's huge?** " - Good question, it's in the eye of the beholder I guess :) In this case it will be a database with around 150 000 points separated into many different filter layers. As it is now, each filtered layer reads from the CSV file everytime it loads, and I experience that to be a rather slow process compared to reading from only one database (with shapefiles) instead (correct me if I'm wrong). Other than that there is only about 20 000 - 30 000 line/polyline objects (about 200 Mb data).


How to set Merge output as Select Input in ModelBuilder?

I'm using ModelBuilder. I tried to take the Output from the Merge tool as Input to the Select tool. But it doesn't work. I'm trying to Merge 90 Shapefile lines into one. Then "Select" some features (with an expression) from the WHOLE one to do more things. ![enter image description here](http://i.stack.imgur.com/zXx6y.png)


Open Layer Plugin Images Informations

I'd like to know how to find informations about Open Layer Plugin Images. I need to know the date and resolution of the images. Thank you!


Will there be a Python API for ArcGIS Server?

It seems like an obvious next step given the big push towards Python in ArcGIS Desktop at 10.0. Are there any limitations of Python compared to javascript, flex, etc that would prevent ESRI from developing a Python API?


How to filter shapefile using definition query?

I have a point shapefile which I want to interpolate using IDW interpolation. However, I want to interpolate only those points which satisfies a certain condition. I need to do it in python and I think that I have to use definition query where only values that are not -999 should be used in the interpolation. This is my code:               outIDW = Idw(fc, zField, cellSize, power, searchRadius)      I need to modify somehow the `fc` shape to take into account only values that are different from -999. This is my query:               "P"<>-999      Thanks


Adding shapefile causes ArcMap Drawing Errors (General function failure)

I am creating a map that is a hodgepodge of databases, stand alone shapefiles, and a couple image services. Everything seems to go as expected until I add a certain shapefile to the mix. Then all of the other shapefiles disappear. Once that layer is removed from the map, everything else is fine. Only shapefiles are affected. The shapefile in question (as well as all others) display properly in 9.3. And, I'm adding other data that displays from the same folder, so it's not that I'm unable to access it. I've searched for similar incidents, but have came up empty. Thanks! ![enter image description here](http://i.stack.imgur.com/SoKbm.jpg)


Can I download the entire NRCS SSURGO database?

I am interested in downloading and using the entire USGS SSURGO database. The California Soil Resource Lab provides instructions on working with these data in R, but it starts with the assumption that I have downloaded tables as .csv files - but doesn't say how to get these files, other than that the metadata is available as an Access template Can I download the entire SSURGO database? Is it available in formats other than csv + Access?


Speeding up loading raster

I georeference a tif image and then I clipped that image in a mosaic. I did a index of these images but when I load them is very slow(7 seconds or more to display the first tile). How can I do to go faster? I tried many ideas from the mapserver document but I does't work. Any idea?


Does anyone know a function to determine if a Point lies on a polyline?

ArcEngine 10 .Net 4 c# Hi I'm currently allowing user to select a point on a polyline and creating a point on the line. I am using snapping tool. I just want to make sure that when the user clicks on the screen, the point feedback that I get lies on top of the polyline. I was wondering if there is a method that I can check if the IPOINT is ON any of the polylines in the polyline layer. Thanks and Regards


Is there any plugin for QGIS to calibrate contrast and brightness of a raster layer?

I frequently need to deal with the contrast and brightness of raster layers in QGIS and I miss the tools in ArcGIS for this task. Should there be a plugin already developed for QGIS? If there is, where can one find it? Regards.


ArcGIS Python Tool Script Parameter - Binding Objects to a List Parameter

I am working on a python based script/tool. I would like to make use of drop down lists for several of the parameters. This is very easy to do if the lists are just plain old strings. Does anyone know if it is possible to bind objects to this list and display a certain property? Objects will be very simple; just key-value pairs. So, I would like to display the key and be able to access the value somewhere in the ToolValidator, or better yet access the ToolValidator class from the tool script itself?


How Do You Remove No Data From A Raster (.sid)?

I have an Image.sid that has a white border which is No Data. I've tried using Clip Raster Tool with no success. I've also changed the symbology value for No Data to be transparent. I'd like to remove No Data if possible or simply trim / erase the white border. How can I do this? Thank you


How does ISurface.Locate work?

could someone help me with this method of arcobjects? I don't know what the parameter "hint" means. Thanks. ISurface.Locate Method Returns the intersection of the query ray and the displayed feature. [Visual Basic 6.0] Function Locate( ByVal pRay As IRay, _ ByVal hint As Long _ ) As IPoint Parameters pRay [in] pRay is a parameter of type IRay hint [in] hint is a parameter of type long ppLocation [out, retval] ppLocation is a parameter of type IPoint


Amoeba Shape object

I am doing a project for an organization using OL. I was successful in creating buffers around a point for a given radius, but I was just shocked from their response,they just asked me is there a chance to create a amoeba shaped(no definite shape) object(just like circle,polygon) and project it on the map. I was stunned and couldn't even reply them 'NO'; As far as I know its impossible to create a amoeba shape. If at all if there is a chance to create a shape like that then what are the requirements to be known?? like radius for a circle, number of sides with angle for a polygon etc........ Is it possible to create such a shape???


Can anyone see what I did wrong with this Make Feature layer function? (Arcpy)

So I am just testing this function by itself before I put it in my loop. So I run the test (Python 2.7) and I get a result saying that it was create, but I do not see it in folder I assigned it to. I even tried it on the arcpy box in arcgis 10.2 and I still can't find the layer. I double checked the path I directed it too but nothing.                   import arcpy         import os                      arcpy.env.workspace = 'C://Users/my/workspace/'         arcpy.env.overwriteOutput = True              inPut = 'C://Users/my/workspace/'              allStorms = 'allstorms.shp'              acrpy.MakeFeatureLayer_management (allstorms, inPut+'group1')


Calculate the number of points in a freehand polygon ArcGis Javascript API

I'm drawing a free hand polygon on my map. Now I want to calculate the number of points found in that polygon. I have done this code, which my now is giving me the number of points found in the map extent rather than the polygon. Now I'm stuck how I'm going to do it since I am new to JavaScript.               function computeZonalStats(evtObj) {             var geometry = evtObj.geometry;             map.showZoomSlider();             map.graphics.clear();                  var symbol = new SimpleFillSymbol("none", new SimpleLineSymbol("dashdot", new Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.25]));             var graphic = new Graphic(geometry, symbol);                  map.graphics.add(graphic);             toolbar.deactivate();                  var features = [];             features.push(graphic);                  var featureSet = new FeatureSet();             featureSet.features = features;                  var count = 0;             dojo.forEach(featureLayer.graphics, function (feature) {                     count++;             });             alert(count);         }              Any idea how I could do this please?


How to calculate "stop points" from a set of GPS tracklogs?

I have a set of GPS tracks pertaining to a cycling event that happened in the same day. I don't have much geographical information about the event itself, except for the tracklogs I downloaded from a site as GPX. Along the route, there were some predefined stops that can be clearly seen at the map. These stops have some characteristics spatial and temporal properties (points of speed near zero, segments at random directions, large gaps in the time/distance plot), and is very easy to spot those points visually. What I like to devise is a way to "detect" those points algorithmically having only the GPX files as input. Below there is a sample stop point, plotted using Python: ![enter image description here](http://i.stack.imgur.com/8LAK4.png) Also included is a very interesting picture taken from _22.2.5 Mining for Movement Patterns_ in _22.2 Scientiﬁc Fundamentals of Computational Movement Analysis_ in _Springer Handbook of Geographic Information_. What I am looking for is the "meeting place" pattern. The book just mentions the conceptual framework for that, not how to extract it algorithmically. It is important to note, though, that although every cyclist stopped at the meeting places, the didn't do so necessarily at the same time, so the meeting place is spatial mostly, instead of spatio-temporal. ![enter image description here](http://i.stack.imgur.com/nUTDT.png)


How to schedule a model to run at a certain time?

I'm trying to schedule a model to run at a certain time and have found this ESRI Blog post which is providing a good start. What I can't figure out though is where in the importToolbox function I tell it which model/tool within the toolbox to run? I have a toolbox that has about a dozen tools/models within it and I just want to run 1 of those.


Problem with python script to control GRASS GIS from outside - How to import grass.script under Win 8.1?

I am working with GRASS 6.4.3 and python 2.7.6 under WIN 8.1. I am a novice with computer science and coding, and I have seen many posts including those:Is it possible to use GRASS GIS in Python stand alone scripts?,GRASS and Python, in order to control GRASS from outside by using python. Here's my python code, which wants to use the GRASS module **g.list** to list my raster data in GRASS. I type those code in **Python IDLE**.               import os     import sys          gisbase = os.environ['GISBASE'] = 'C:\OSGeo4W64\apps\grass\grass-6.4.3'  #GISBASE needs to point the root of the GRASS installation directory     gisrc = 'C:\Users\Heinz\Documents\grassdata'     gisdbase = 'C:\Users\Heinz\Documents\grassdata'     location = 'newLocation'     mapset = 'TC'     LD_LIBRARY_PATH = 'C:\OSGeo4W64\apps\grass\grass-6.4.3\lib'     PATH = 'C:\OSGeo4W64\apps\grass\grass-6.4.3\etc';'C:\OSGeo4W64\apps\grass\grass-6.4.3\etc\python';'C:\OSGeo4W64\apps\grass\grass-6.4.3\lib';'C:\OSGeo4W64\apps\grass\grass-6.4.3\bin';'C:\Python27';'C:\OSGeo4W64\apps\Python27';'C:\OSGeo4W64\apps\msys'     PYTHONLIB = 'C:\Python27'     PYTHONPATH = 'C:\OSGeo4W64\apps\grass\grass-6.4.3\etc\python'     GRASS_SH = 'C:\OSGeo4W64\apps\msys\bin\sh.exe'               sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python'))          import grass.script as grass      And I have set every path in my code as environment variable in the windows control panel. As I run module, I got the error: ![enter image description here](http://i.stack.imgur.com/q8ySI.png) ![enter image description here](http://i.stack.imgur.com/I7CCQ.png) Which line of my code is wrong or not necessary？ And what code should I add to my python script？ Or can't I use Python IDLE to do this？ Please give me any suggestion, thank you very much! * * * Update#1: @ustroetz I have found no file in my computer named **.grassrc6** , so I create a new file named **.grassrc6** (which is empty), adding a line in my code:               gisrc = 'C:\Users\Heinz\.grassrc6'      But still got the same error. Did I misunderstand the instruction in the post？ * * * **Update#2:** (Thanks Martin) I create a text file named **grass.pth** in this folder `C:\OSGeo4W\apps\python27\lib\site-packages`, and type those two lines in it: ![enter image description here](http://i.stack.imgur.com/WsMYm.png) Here is the list of my environment variables I have set in windows penal:               GISBASE = C:\OSGeo4W64\apps\grass\grass-6.4.3     GISRC = C:\Users\Heinz\Documents\grassdata     Path =      C:\Python27     C:\OSGeo4W64\apps\grass\grass-6.4.3     C:\Users\Heinz\Documents\grassdata     C:\OSGeo4W64\apps\grass\grass-6.4.3\lib     C:\OSGeo4W64\apps\grass\grass-6.4.3\etc\python     C:\OSGeo4W64\apps\grass\grass-6.4.3\etc     C:\OSGeo4W64\apps\grass\grass-6.4.3\bin     C:\OSGeo4W64\apps\Python27     C:\OSGeo4W64\apps\msys     C:\OSGeo4W64\apps\grass\grass-6.4.3\scripts     C:\OSGeo4W64\bin     C:\OSGeo4W64\apps\Python27\Lib\site-packages      then I ran my python script, and got the same error: ![enter image description here](http://i.stack.imgur.com/nTgsc.png) You can see that I have added this line:`sys.path.append('C:\OSGeo4W\bin')` in my script(it's because the script didn't work before I added it), but it still got the same error. * * * **Update#3:** @Martin, I have found that I have three places where python installed:               C:\OSGeo4W64\apps\Python27     C:\Python27     C:\Program Files (x86)\Quantum GIS Lisboa\apps\Python27      and I also found `site-packages` files in those places, so I copied **grass.pth** to those places, but my script still can't work. ps. I also found this python-related file:               C:\Users\Heinz\Downloads\http%3a%2f%2fdownload.osgeo.org%2fosgeo4w%2f\x86_64\release\python      I don't know if this keeps my script useless, should I delete this file, or it doesn't matter? I have tried this in cmd: ![enter image description here](http://i.stack.imgur.com/PU4My.png) I feel grateful that I have got these helps so far, and I will keep trying to make my script work!


Changing Visible Field Properties on Multiple Layers at once

I am pretty new to all of this and I apologize that I don't know all the correct verbiage. I am using ArcGIS 10.0 I have a map with a layer dealing with electrical primary circuits, that I split into multiple layers based on their unique circuit value. What I don't know how to do is: Is there a way of changing which fields I want visible for **all my layers** at once? Since I split the initial Primary Circuit layer, I now have about 120 layers to work with. I tried changing the visibility of the fields in the initial Primary Circuit layer, but when the layer was split into all of the individual circuit layers, all of the fields turned back on. I hope this all made sense. Appreciate any thoughts on if it's possible to change all the layers field properties at once. Thanks


arcpy.AsShape function returning RecordSet not Geometry

I have the following code:               feature_geometry = arcpy.AsShape(json_string, esri_json=True)     print feature_geometry     print type(feature_geometry)     >>><geoprocessing record set object object at 0x0E1D9F20>     >>><class 'arcpy.arcobjects.arcobjects.RecordSet'>      It's returning a record set however the documentation says it should return a geometry object... What I am missing? This is the ESRI_JSON object I'm passing:               {"displayFieldName":"","fieldAliases":{"OBJECTID":"OBJECTID","SHAPE_Length":"SHAPE_Length"},"geometryType":"esriGeometryPolyline","spatialReference":{"wkid":102100,"latestWkid":3857},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID"},{"name":"SHAPE_Length","type":"esriFieldTypeDouble","alias":"SHAPE_Length"}],"features":[{"attributes":{"OBJECTID":2,"SHAPE_Length":27314.085654472176},"geometry":{"paths":[[[-12374196.4669,7608025.6432999969],[-12373633.217700001,7580717.365699999]]]}}]}


Live XML Truck Fleet GPS Data To ArcGIS

Currently I have access to Truck Fleet Data through Telogis Fleet. Telogis provides an XML feed and I would like to know how I can feed that into ArcGIS that is continuously updated? Thank you


Get DE-9IM matrix in spatialite?

Is there a way to get the DE-9IM matrix between two geometries in a Spatialite function, analogous to the st_relate() function in PostGIS? (I find it very helpful to spatially join using intersect() and then do a count(*) group by with the DE-9IM matrix to determine what my interesections are like, whether on the edge or not. Then I often calculate the ratio of areas for geometries that don't line up exactly to tell me about slivers.) For reference: http://en.wikipedia.org/wiki/DE-9IM http://postgis.net/docs/ST_Relate.html


Difference between python window and toolbox

Are there differences in performance or other potentially critical area between running a python script in the python window versus running it from the toolbox in ArcGIS 10.0? I am asking in cases where i need to use arcpy and have ArcGIS running. In my experience recently i can run the same script via toolbox and in the python window and the toolbox seems to be a bit faster.


Does leaflet support KML Ground Overlays?

I found an example showing KML overlays at http://harrywood.co.uk/maps/examples/leaflet/kml.html but it only plots vector layer using polygons. Is there any way to plot Ground overlays of KML (like in http://kml- samples.googlecode.com/svn/trunk/kml/Region/GroundOverlay/usa-ca-sf.kml) in Leaflet?


Python - OGR: Transform coordinates from meter to decimal degrees

I have a point in a shapefile. The shapefile is in a WGS_1984_Web_Mercator Projected Coordinate System. I want to get the coordinates of that point in decimal degrees with GDAL/OGR in Python. I am able to get the coordinates in meters with the code below. I tried to transform the shapefile from a Projected Coordinate System to a Geographic Coordinate System without success. I assume it is not possible to remove a Projected Coordinate System with OGR. Is that right? What other ways are there within OGR/Python to get the coordinates in decimal degrees?               import ogr          driver = ogr.GetDriverByName('ESRI Shapefile')          shp = driver.Open('testpoint.shp', 0)     lyr = shp.GetLayer()          feat = lyr.GetNextFeature()     geom = feat.GetGeometryRef()          x = geom.GetX() #Get X coordinates     y = geom.GetY() #Get Y cooridnates          print x,y


QGIS 2.2.0 Update column with another layer

I've got 2 layers : the first one with points, the second one with polygones (their ID). I created a new column in the first layer, and I want to update it with the ID of the polygone that contains the point. I hope I'm clear ! It seems to be a basic issue, but I spend a large part of the day surching for the answer, in vain... Thanks a lot for the incoming answer!


Select individual lines from feature class, convert to unique rasters: "raise e" error?

I have a feature class with 5 lines in it, and need select each one and turn them into its own raster -- for example, line 1 is raster 1, line 2 is raster 2, etc. This is the python script:               import arcpy          SightLines = "C:\\temp\\SightLines.shp"          index = 0     rows = arcpy.SearchCursor(SightLines)     for row in rows:         RasterFileName = "C:\\temp\\fakeData.gdb\\Raster" + str(index)         arcpy.AddMessage("Raster File " + RasterFileName)         arcpy.FeatureToRaster_conversion(row, "FID", RasterFileName, "1")         arcpy.AddMessage(" >> MADE SUCCESSFULLY")         index = index + 1      Unfortunately, this is throwing the following error at the FeatureToRaster_conversion step:                   raise e     RuntimeError: Object: Error in executing tool      I can't figure out what _raise e_ is trying to tell me. What exactly is going wrong?


pyQGIS 2.0: Sending signal when identify button is pressed via gui

I have a question regarding the qgis identify tool for version 2.0. I would like to know if it's possible to send a signal when the actionIdentify is triggered by the user via the gui. I'm trying to call a python function within a plugin if this action is triggered. I've tried two different ways so far with no success: 1)               def initGui(self):         ...         self.iface.actionIdentify().triggered()         self.idTool = self.canvas.mapTool()          def myFunction(self):         if self.canvas.mapTool() == self.idTool:             QgsMessageBox.information(None, 'Info', 'Tool is IdentifyTool')             self.anotherFunction()          def anotherFunction(self):         QgsMessageBox.information(None, 'Info', 'Successful connection')      This gives no error, but the QgsMessageBoxes don't show up, thus I am not successfully connecting to the function. It's also problematic, because my way of setting the idTool parameter is by first triggering the tool. This means that even if everything runs as I thought it would, the if statement would always be true, as the self.canvas.mapTool() would surely be the idTool. this gives me a PyQt4.QtGui.QAction object:               idTool = qgis.utils.iface.actionIdentify()      this gives me a qgis.gui.QgsMapToolIdentify object:               qgis.utils.iface.actionIdentify().trigger()     anotherIDTool = qgis.utils.iface.mapCanvas().mapTool()      I can't successfully compare the former with my current map tool as returned from mapCanvas().mapTool(). However, I don't want to have to trigger the tool first to get the proper object. 2)               def __init__(self, iface):         ...         self.idTool = QgsMapToolIdentify(self.canvas)         ...          def initGui(self):         ...         self.idTool.mapToolSet.connect(self.myFunction)          def myFunction(self):         currentTool = self.canvas.mapTool()         if currentTool == self.idTool:             self.anotherFunction      My problem here is that the two QgsMapToolIdentify parameters point to different object numbers, so I never get past my if statement. What am I missing about the way these QgsMapToolIdentify objects are named?


How to create a spatial view when allowing multiple selection in qgis’s edit widget “value relation”?

I've a point layer in qgis and serveral non spatial tables in a spatialite database. In qgis the fields were filled using the edit widget "value relation" (multiple selection allowed for some fields). I also created a custom form and conected some fields with a "List widget" in QT-Designer as you can see here, where one can choose more than one entry for a field.   Now in my "master table (baumkataster)" I got the following entries for one point feature (see example below):               baumkataster:         baum_ID, boden_verd           1,{2}        2,{1,3}        3,{1,2,3}       In my query I joined the "master table" with a non spatial table (boden_ver):               boden_verd:        boden_verd_ID,boden_verd        1,value1        2,value2        3,value3      By now I've learned how to create a view to display the values not the key value. For testing I only do the SELECT statement. This works in case of single selection... For example:               baum_ID,voden_verd        1,value2        2,value1        3,value3       ...but it returns a empty table in case of multiple selection. How can I fix this to get the following result?               baum_ID,boden_verd        1,{value2}        2,{value3,value3}        3,{value1,value2,value3}      I found the following code for a similar problem but it returns an error and I don't realy know whrer I'am wrong:               SELECT baumkataster.baum_ID AS baum_ID,        baumkataster.geom AS geom,             stuff((select  DISTINCT  ', ' +  boden_verd.boden_verd                     from boden_verd                  WHERE ','+baumkataster.boden_verd+',' LIKE     '%,'+boden_verd.boden_verd_ID+',%'                     for xml    path(''),type).value('.','nvarchar(max)'), 1, 2, '' )  AS    boden_verd              FROM baumkataster;      Thanks, Patrick


How to show a OpenLayers map on tiki-wiki 13.0

I was wondering how can I show a map via OpenLayers on a tiki-wiki page? I just installed tiki-13.0, and couldn't show any map following the tiki-wiki documentation. I searched the tiki-wiki online documentation here. There was some discussion of history and list of > instructions about OpenLayers with previous versions , which involves `html` and `js` plugins but the example isn't complete. I tried to copy paste the example code into a new tiki page, but wasn't sure where to put the js code. There is a one-sentence mention of the fact that > Native support for OpenLayers (which is related to OpenStreetMap) is new to > Tiki7 . But there is not any code for the native OpenLayers support. I understand that there are some radical changes and the documentation is lagging behind. I was just wondering if there is any minimal working code example for tiki 13, that can actually show any map? e.g. Africa. Thanks in advance


Show a single value related to a whole layer in QGIS

I'm developing a maximum flow plugin for QGIS. I would like to show a calculation result (i.e., the maximum flow) on the map. The result is not a property of a single feature. It is a property of a whole layer. What is the best way to accomplish this?


Issues when using geometry in pgrouting

I am trying to use pgrouting to get the shortest path. I executed the shortest_path function and in return I got the set of edges belonging to that shortest path. When I got the geometry for each edge and converted it human readable text I got the following               MULTILINESTRING((-92.934305 44.929345,-92.934328 44.928139,-92.934308 44.926226,-92.934319 44.92516))     MULTILINESTRING((-92.934238 44.931787,-92.934286 44.930361,-92.934305 44.929345))     MULTILINESTRING((-92.934236 44.931864,-92.934238 44.931787))     MULTILINESTRING((-92.934134 44.935015,-92.934164 44.934074,-92.934236 44.931864))     MULTILINESTRING((-92.937956 44.937121,-92.937841 44.936852,-92.937701 44.936568,-92.937556 44.936322,-92.937467 44.936207,-92.937198 44.935914,-92.936925 44.935716,-92.936455 44.93542,-92.936235 44.935309,-92.936002 44.93522,-92.935764 44.935147,-92.935386 44.935089,-92.935175 44.93507,-92.934134 44.935015))     MULTILINESTRING((-92.9431718 44.9378538,-92.9428863 44.9378357,-92.942582   44.9378192,-92.9422621 44.9377809,-92.9417434 44.9376672,-92.9409703 44.9373986,-92.9400963 44.9371441,-92.9395865 44.937061,-92.9391747 44.937033,-92.9386135 44.9370293,-92.937956 44.937121))     MULTILINESTRING((-92.9488376 44.937303,-92.9483702 44.9375247,-92.9479276 44.937655,-92.9474106 44.9377678,-92.946837 44.9378455,-92.9461359 44.9378605,-92.9431718 44.9378538))     MULTILINESTRING((-92.94894 44.937434,-92.9488376 44.937303))     MULTILINESTRING((-92.94894 44.937434,-92.949013 44.93739,-92.949371 44.937237,-92.949808 44.937075,-92.95064 44.936877,-92.9509356 44.9368451,-92.9512401 44.9368242,-92.951439 44.9368205,-92.952328 44.936802,-92.954138 44.936761))     MULTILINESTRING((-92.954138 44.936761,-92.954364 44.936757))      When I joined the points obtained above in the order given, the paths tend to overlap each other. As you can see above the point -92.934305 44.929345 repeats. Any suggestions? Initially I was using just the start and end vertices of the edges but since that was causing this overlap issue, I opted to use this geometry feature as well but still it is the same. QGis seems to plot it fine and it has the same set of edges that I got.


How to prompt for user input during ArcGIS Python script tool execution?

I want to prompt for user input after all parameters have been specified for the script tool. I've seen many forum posts and stackexchange questions about this, and they all conclude that it's unnecessary, but I think my case is an exception. I want to give the user an opportunity to confirm data, such as how many sets of GPS coordinates there are. They will be yes/no questions ("is this data obviously incorrect?"), and the script tool parameter input form doesn't seem like it'd work well for this. I know Tkinter's event handler causes problems with ArcGIS, and other framworks have similar problems. One workaround I found is to have your script call another script that runs as a separate process, and display the GUI from the second process, but that seems a little too hackish. Edit: Apparently wxPython _does_ work, but it's not included with python. I need to be able to distribute these scripts without any extra requirements other than ArcGIS, so that wouldn't work for me. Edit 2: To clarify, the most important use would be to prompt the user when my software validation checks can't validate the data. For example, I have a list of IDs that I want to validate, but the format isn't consistent. I want to be able to prompt the user with a yes/no dialog if I can't validate in software (eg. the ID doesn't match one of the common patterns). It's possible that new ID formats will be created without my knowledge. Edit 3: Another example: I have a file that contains, among other things, a table of start & stop times. I want to validate each row of the table individually, and cramming all of that data, plus the other checks, into the warning window would get ugly fast.


QGIS Web Client in Windows does not load map

I have installed QGIS (1.8 Lisboa) desktop and server on a Windows XP machine. I am now trying to configure the QGIS Webclient. I downloaded the zip file from GitHUb, and made the changes to the templates, etc. When I open the qgiswebclient.html page the map does not load. The toolbars and other parts of the GUI are all there. From OSgeo4w Shell I checked my mapserver is running: Mapserver v5.6.6 I copied the qgis-web-client folder into the osgeo4w\Apache\htdocs folder. Does anyone know which parameters I should check?


Add UTM labels to grid in qgis

I try to use qgis to create a custom topographic map for outdoor use: UTM, 1:50000. What these maps usually have is a 1km x 1km grid, which at the bottom is labeled with a shorthand for the corresponding UTM grid coordinate: Say the UTM easting of a vertical line is 05532000, then I'd label the line with 32. The 055 is redundant because every line in the map will have that part (provided the map doesn't cover too large an area), and the 000 is redundant as the grid lines are placed at multiples of 1000. Now, I used qgis to create the grid, and I added a column to the corresponding data file containing the labels I'm after, but when I use the "Display labels" functionality in the properties of the shapefile, the labels occur in the center lines of the map, whereas I'd like to have them at the margin. I didn't really find a way in qgis to do that and would appreciate any help. (If other open source software is better suited to create nice topographic maps from a GeoTIFF file, I'd also appreciate that, as long as it runs on Linux or Mac)


Python 3 support in QGIS?

As python3 is getting standard more and more I wonder wether there is or will be support for python 3 in QGIS?


How can i convert a raster from continuous to discrete?

I have a tiff that is 'invalid' for a lot of tools and will not let me view the attribute table. I think this is because it is "continuous" rather than "discrete". Does anybody know how to convert it or make arcgis treat it as a discreet raster?


Can 'Source' and 'Target' in the roads table for routing be duplicate?

I am using pgr_ksp for finding multiple paths for single source and destination. I am wondering if 'source' and 'target' in a roads table are unique or not. because when i am doing routing on my road network table and displaying their geometry on the basis of their 'target' value, it is giving me extra link roads everywhere. This is the query i am using                  SELECT pt.gid, seq AS route, id1 AS node,  id2 AS edge, cost, geom as line        FROM pgr_ksp(        'SELECT gid as id, source::int4, target::int4, length::float8 as cost FROM my_table',         2087, 1428, 2, false         )         as di JOIN my_table pt         ON di.id2 = pt.target      ![enter image description here](http://i.stack.imgur.com/VTEw9.png) The red color is showing the output of the query. I know there is nothing wrong with the routing result but when i am trying to get the geometry, 'target' value is i think the only way to get it for display ![enter image description here](http://i.stack.imgur.com/gDuuN.png) I want the result as i am showing in the 2nd image with Red color, but right now i am getting extra road segments (shown in Green color) because i am choosing to display geometry from target value. Kindly suggest me what to do in order to get better result


Floating point: understanding their inaccuracy

I am trying to understand why a floating point is inaccurate. Please bear in mind that I am not a mathematician. What is exactly the difference between floating point and double integers? and why use one rather than the other? Thanks for any "easy to understand" replies, Robert


Remote sensing: How to define landuse from remote sensing data?

I am trying to research ways into obtaining landuse data for a project which calculates the visual impacts of wind parks. I have a DEM and DOPs for a relatively large region (5000km²), but I have no landuse data. Does anyone know how I could obtain or create such data to create a database of landuse types .i.e residential, agriculture, industry, forest, woodland etc? Is is possible to create such a dataset from satelite imagery or would I have to think about digitizing polygons from aerial photos? I would be very interested in hearing view or reading methodologies for similar projects, yours, Robert


Re-initializing OpenLayers Map with different projection

Is it possible to re-initialize OpenLayers Map with a different projection ? Scenario:   1. OL Map with projection 4326 is created, along with click, measurement, drawing handlers.   2. A button to switch to projection 3857 exists   3. When the button is clicked, we 'ideally' want to re-initialize the map to 3857, without re-init all the handlers (click, measurement, drawing etc), because the tiles are are in 3857. How do I do this?


How to fire .NET code in my ArcGIS application from javascript?

So I'm developing a .NET desktop application for ArcGIS in VB. As a new part of the application I have developed an SVG / Javascript map as a 'loading screen' where you select your dataset to load into ArcMap. This map is currently held in a html doc and displayed in an html viewer in a windows form. My question is this: Is it possible for javascript events/functions in my web map to fire .NET code in my application? Can I pass variables from javascript to .NET? Etc... I imagine this will be quite tricky if possible, as you won't want any old javascript on a website to start messing with your running .NET applications. I'm willing to hack this all together if there's a way. Thanks. EDIT: To be clear, this is **not** an ASP.NET (server side) web application, this is a purely vb.net desktop application. So I think AJAX / Postback solutions won't work in this case.


how to overlay shapefile and raster?

I have a shapefile with polygons. And I have a global raster file. I want to overlay the shapefile's polygons onto the raster grid and calculate the mean raster value for each polygon. How can I do this using GDAL, writing the results to the shapefile?


arcgis server & reverse proxy server

internet -- router -- reverse proxy server -- arcgis server Had this config. working great, after following this proxy server setup tutorial: http://support.esri.com/en/knowledgebase/techarticles/detail/39568 I was able to see all services by visiting my external facing FQDN: hxxp://mydomain.com/arcgis/rest/services I could click on the "view in Javascript" link on the services page and was able to preview the service; all was well. I then installed SSL cert. on proxy server, communication from proxy to gis server is over port 80, not encrypted. I updated the rest.conf file on the gis server and an now can browse: hxxps://mydomain.com/arcgis/rest/services, all the services are listed. however, the view in javascript does not preview the service. the viewer loads, but the service's content does not load. Here's the firebug error: GET MapServer?f=json&dpi=96&transparent=true&format=png8&callback=dojo.io.script.jsonp_dojoIoScript1._jsonpCallback 404 not found the URL for the above GET request is wrong, The issue is http:// If it were https:// it would work In the meantime, I just added a premanent redirect to the proxy server httpd.conf, but this is a work around. anyone have any advice?


Create DEM from cartosat stereo pairs?

I have two carstosat stereo pair images. All i need to do is to extract DEM from those. So, i tried it doing with OSGeo4W. but i didn't succeeded in it. So IS there any other softwares or opensource for extracting DEM from cartosat pair? Thanks in advance


ST_Dump not working with geometry_dump

I am trying to ST_Dump a geometry_dump column comprised of points and paths in PostGIS 2.0 using               SELECT (ST_Dump(geom)).geom FROM pointdump      However, I get the error message 'function st_dump(geometry_dump) does not exist' I thought that ST_Dump would dump a geometry_dump column into its constituent parts? Or is there another method I can use? Eventually, I want to draw lines between these points to create rectangles. This column was created by using this function I discovered online elsewhere and ran on a simple polygon:               CREATE OR REPLACE FUNCTION st_dumppoints_plpgsql(geometry)       RETURNS SETOF geometry_dump AS     $BODY$DECLARE      m integer;      g geometry;      n integer;      p geometry_dump%ROWTYPE;     BEGIN       IF GeometryType($1) LIKE 'MULTI%' THEN         FOR m IN SELECT generate_series(1, ST_NumGeometries($1)) LOOP           p.path[1] := m; -- use to store Multipolygon number           g := ST_Boundary(ST_GeometryN($1, m));           FOR n IN SELECT generate_series(1, ST_NumPoints(g) - 1) LOOP             p.path[2] := n; -- use to store Point number             p.geom := ST_PointN(g, n);             RETURN NEXT p;           END LOOP;         END LOOP;       ELSE -- It is not a MULTI- geometry         g := ST_Boundary($1);         FOR n IN SELECT generate_series(1, ST_NumPoints(g) - 1) LOOP           p.path[1] := n; -- use to store Point number           p.geom := ST_PointN(g, n);           RETURN NEXT p;         END LOOP;       END IF;       RETURN;     END;$BODY$       LANGUAGE 'plpgsql' IMMUTABLE STRICT       COST 100       ROWS 1000;


Shapely Python NameError when using cascaded_union

I am fairly new to Python and therefore my error-solving skills are not much yet developed. I am using Python within a geoprocessing script which is supposed to use ogr (reading/writing shp) and shapely (geometry processing) to dissolve a shapefile with n polygons in it. To accomplish that step I need the function "cascaded_union" in the shapely.ops module. As soon as I have the import in my script from shapely.ops import cascaded_union I am getting an Error even when I don't use the function anywhere in the script yet. That is why I suppose that this is not a usage rather than a installation/configuration error.   * running an Ubuntu 12.04.3 LTS   * Eclipse with PyDev   * installed shapely via Ubuntu repositories   * included path: /usr/lib/python2.7/dist-packages/shapely Error Message:               Original exception was:     Traceback (most recent call last):       File "/home/user/workspace/testproject/dissolve.py", line 3, in <module>         from shapely.ops import cascaded_union       File "/usr/lib/python2.7/dist-packages/shapely/ops.py", line 6, in <module>         from shapely.geos import lgeos       File "/usr/lib/python2.7/dist-packages/shapely/geos.py", line 12, in <module>         from ctypes.util import find_library       File "/usr/lib/python2.7/ctypes/util.py", line 89, in <module>         import re, tempfile, errno       File "/usr/lib/python2.7/tempfile.py", line 34, in <module>         from random import Random as _Random       File "/usr/lib/python2.7/dist-packages/numpy/random/__init__.py", line 90, in <module>         ranf = random = sample = random_sample     NameError: name 'random_sample' is not defined      Content of dissolve.py:               from shapely.ops import cascaded_union      The auto completion of the import works. So the packages are recognized I guess. I am thankful for any help/suggestions.


Geoserver MapFish plugin: absolutely positioning scale bar

I have a map printed full page on A4 paper. I would like to put a scalebar over the map without printing in on the next page. Is it possible? My config.yaml currently looks like this:               #-------------------------------------------------------------------------     mainPage:       pageSize: A4       marginBottom: 0       marginTop: 0       rotation: true       items:         - !map           spacingAfter: 0           width: 595           height: 842         - !scalebar           type: bar           maxSize: 100           barBgColor: white           fontSize: 8           align: right         - !text           font: Helvetica           fontSize: 9           align: right           text: '1:${scale}'


What's a good way store borehole data in SQLite / SpatiaLite?

I have a bunch of bores / wells with downhole data. The 'header' info for each borehole can easily go into a single table, but I'm wondering how best to store the downhole log data. Typically they are stored in spreadsheets as semi-continuous depth-value type data: e.g.: depth,temperature ...values... or there may be more than one value for each depth: depth,temperature,gamma,neutron,... ...values... I want to be able to easily pull them out to plot (e.g. XY scatterplots) in other software. Can I store entire text files in some sort of field?


Calculating distance to median point for a group of points in Model Builder In ArcGIS

I have two shapefiles. First of them, there is about 115 000 points (clients and their field size) All together there is about 16 226 different clients. In the other shapefile I have calculated the median point for all the clients. Now, I want to calculate the distance from each client field to its corresponding median point. How can i do it in Model Builder?? Doing it one by one takes a lot of time. I really hope someone can help me.


Server Object Extension doesn't work

I built a server object extension in C# and Visual Studio 2010, using the ESRI sample for the Spatial Query SOE as a starting point. (see the page on resources.esri.com) The SOE never displays a property page in ArcCatalog or in Server Manager. If I enable it, it won't allow the map service to start, saying that the CLSID for the MapServer is not registered. I think this is a bogus message, but I can't debug this - it doesn't even hit write any of my log messages to the server log. All the libraries I use (interfaces, extension, property page, server manager and register) have all been registered and GAC'd. The property page class shows up in Categories.exe and the assemblies all show up in the assembly folder. It seems like there's some unstated step or steps that I haven't followed, but I can't find much on this. Has anybody actually built a working SOE? Any suggestions?


How to get an ocean shapefile from a very detailed land area shapefile?

I am looking for a possibility to "invert" a shapefile. What I want to do is to convert a shapefile with the continents and islands into a shapefile that has water polygons. The existing ocean shapefile from Natural Earth is too inaccurate. As an active OSM contributor, I thought using the existing shapefiles from OSM would be fine for me. These are much more accurate but very buggy from a GIS perspective. However, mapserver can deal with it so I thought these should be fine. These shapefiles, some of them you can find here http://metro.teczno.com/#coastline are very large. I have created a shapefile with one polygon with world bounds (-180 to 180, -90 to 90). Then I have tried to clip out the areas from my world bounds shapefile where land areas are in the other shapefile. I tried it with QGIS, vector tools -> difference function. After 12 hours with 100% CPU usage, I stopped it. It always displayed a progress of 100%. RAM was not an issue. I am looking for another possibility to clip out the land areas from a "world polygon", preferably Linux command line. Thanks a lot in advance. Regards.


requesting tiles without using xml file (gdal - c++)

i have been able to request a specific tile with my xml through gdal lib. However, is there is another way of requesting the tiles from a web server without using xml ? i wanna do it directly through my c++ code. i will appreciate any directions or examples. thanks in advance;


View data of a particular year in Google Earth

For my region in India, Google Earth tiles belong to different years, 2003 - 2010. I don't mean GE's historical view feature but the imagery updates for different areas my region. I classify Landsat data for particular types of vegetation and check out the effectiveness by overlaying the vectorized layer on Google Earth. Since I use 2010's Landsat data I want to see my layers overlaid on Google Earth's 2010's tiles when available and 2003's tiles not to appear at all. Will it be possible to do this? If yes, how can I do that?


Reference to ArcObjects IUknown interface

Does anyone know what the ArcObjects reference library is for the IUnknown interface? I migrated the code below into Visual Studio and there is an error on the **"Dim pSelItem As IUnknown"** line. ERROR 'IUknown' is not accessible in the context because it is 'Friend'               ' Get the selected layer or table             Dim pTable As ITable             Dim pDispTab As IDisplayTable             Dim pStAloneTab As IStandaloneTable             Dim pSelItem As IUnknown             pSelItem = m_pMxDoc2.SelectedItem       I'm guessing I need to provide the full path reference for the Dim line? Maybe there is a newer interface that I can assign **pSelItem** to for .NET? **UPDATE:** Maybe it should be **"Dim pSelItem as Object"** , since the IMxDocument.SelectedItem Property for .NET accepts Object? IMxDocument.SelectedItem Property link


How to write EXPRESSION for main contours in Mapfile?

I'm working with mapfile. I defined new layer "contours" and I want to render with maxscale = 100000 and minscale = 50000 contours with value distance of 50. That means that I want in that scale render only those countours with values of "height" attribute of 0, 50, 100, 150, 200, 250, 300, 350.. etc.               LAYER      NAME "contours"      TYPE line      STATUS off      DATA "contours.shp"           CLASS      NAME "all_contours"        STYLE          COLOR 176 226 255        END                      #Is this CLASS I started creating correct?              CLASS            NAME "main_contours"            MAXSCALE 99000            MINSCALE 50000            EXPRESSION #this is my question             END     END


Choosing a GIS which imports a list of stage addresses, calculates the route, allows to modify and export it

I'm new to GISs. I'm searching for a **GIS** to meet following requirements. I have a **list of street addresses** [A,B,C,D,E,...], with additional information associated (basically which orders to deliver at each address and to which customer), available in a DB table (DBMS: DB2 for i Series) or .xls file. I need to show these addresses on a **map** and calculate the **route** among them. Not the global best route, but the route that touches each point maintaining the order given for them. Then the user should **modify this order** if necessary (e.g. [A,E,C,B,D,...]) and the route should be recalculated. As **output** I need to write the points in the new order on a **DB table** (also with customer info etc. for each record). I also need to print a PDF with the map and route instructions for the truck driver. I considered MapPoint, but counld't succedd with automatic route calculation for the imported addresses (to calculate a route I have to manually add each point). Google Maps API seems promising, but I don't know how to do many of the operations above. Any hint on which GIS could fit? Both web-based or desktop applications are welcome. Many thanks!


Can Server Object Extensions filter map data and thus modify the returned map image? (ArcGIS Server 10)

I was wondering if I could use a Server object Extension (SOE) to modify the image data that is returned by a Map Service. By that I mean, for each incoming http request (and based on the authenticated user), set a filter on the Server Object's map layer(s) that will be reflected in the map image. Is this possible and would there be performance issues? Also would there be performance issues of doing a database query inside an SOE?


How to export a map (satellite image, 3 bands) to Tiff without losing the resolution in Qgis.

I manually improve the colour contrast of landsat images. The printing in pdf afterwards is OK, as it maintains the resolution due to the high dpi. Now I am interested to obtain a kmz/kml file of the satelite image for visualization in Google Earth. I have downloaded Maptiller which allows to load in tiff, and generate kmz. My problem, however, is that saving the map as tiff results in a maximum image size of 2.3MB, hence the resolution gets lost before the actual conversion to kmz. I used the garmincustommap plugin of Qgis, but same issue...Seems that the only straightforward way would be arcGis or globalmapper, which I do not have access to. Any suggestions?


How to insert data into postgis database with phpPgAdmin?

I have 50 line objects in .shp format in folder on my computer. I need to insert it to postgis database on the distant server.. When I log in in phpPgAdmin, it says it runs on localhost:5433. What is the quick way to insert my .shp data into database?


Customize LabelLayer extent based on density/location using ArcGIS JavaScript API

I'm using a LabelLayer that can be seen only within a certain minScale - maxScale window. I'm trying to display labels of census tract IDs within Illinois, and the difference in label density between the Chicago area and the rest of the state is significant. Would there be a way to customize the minScale and maxScale settings based on the feature? I'm very new to JavaScript, so I'll just demonstrate what I'm looking for in pseudocode:               if ("County_nam" == "Cook") {               minScale: 50000,               maxScale: 0         }     else if ("County_nam" == "Lake" or "County_nam" == "Dupage" or "County_nam" == "Will") {               minScale: 100000,               maxScale: 0         }     else {               minScale: 500000,               maxScale: 0         }


Importing hours and minutes into a date field, next to the date

I'm trying to clean up some data and make sure dates go into the date field. DateShot is my newly created date field and Date_Shot is my text field I want to convert. It will just return the date with out the time. It returns 4/23/2014 (whatever day it is) but not the hours and minutes. In a text field it returns date and hours, minutes.                timestr = time.strftime("%Y/%m/%d/%H:%M")                           for urow in urows:                     urow.DateImport = str(timestr)                     urow.shpname = filename      This is within a file geodatabase using arc 10.1. The editor tracker does time when it is enabled. I'm assuming this would do the same?


How to create WMS service with GeoServer?

I am trying to build first WMS service with GeoServer. I have made layer from shape and layer preview works fine. How can I open this layer with QGIS? How to do map with OpenLayers? I have tried to search GeoServer/OpenLayers guide for Dummies, but not find yet.


ArcGIS10.2 Data Merge error: 000732

I am running python in the ArcGIS python window. ArcGIS shows error message when trying data merge from arcpy. File "", line 1, in File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 3816, in Merge raise e ExecuteError: ERROR 000732:               import os     import arcpy     arcpy.env.workspace = "C:/the shapefile folder/"          path = os.listdir("C:/the shapefile folder/")#unzipped all shapefiles to this folder     shapefile = []     for i in path:         suffix = ".shp";         if i.endswith(suffix):#getting all files end with '.shp' to a new list             shapefile.append(i)     arcpy.Merge_management(shapefile,"C:/output folder")      I don't see where the problem is. Please help diagnose. Thanks!


Automate Add Layer in ESRI ArcMap 10.1

Using ArcGIS Desktop v10.1 with an Advanced level license we have georeferenced our engineering drawings in PNG format. Next we have created a polygon layer for every single drawing to see the Area of Interest depicted in the drawing. Is there an automated way to bring individual PNG layers by clicking on their respective polygon? I want a simpler way to add the georeferenced PNG into the map without having to use the classic "add layer" tool, where a user has to find the respective layer in their location on the network.


SLD style definition from GeoServer to Drupal

I've been experimenting with the SLD style definitions in both GeoServer and Drupal. What I want to achieve is to create a new style in GeoServer (by a curl operation, but I know how that works) and sync that style to Drupal's GeoServer Structure. In the GeoServer itself, the styling applies perfectly when going to the Layer Preview. Also adding a new style in Drupal will sync itself to the GeoServer, BUT not the other way around... So basically my question: Is it possible to sync a GeoServer style to Drupal? Thanks in advance.


How to determine correlation between two databases?

I need to perform some tests and verifications on databases and/or datasets. I need for example to analyze two databases and then determine if there is enough correlation between both.   My main issue is how to deal with correlation...   Do I need to dice/grid the map and analyze precisely each square?   Is it possible to compute statistical techniques (i.e. mean, median...) to achieve this goal or not at all? My datasets are essentially made of GeoTIFF files for elevation terrain information and Shape files for my objects (roads, trees...). I had a look on some APIs to work with those kind of files:   * Shapefile C Library   * PySAL   * GDAL - Geospatial Data Abstraction Library Finally I read in some research papers about softwares determining databases correlation, but couldn't find any of them:   * LightBox SAIC   * ZCAP Thanks for help.


convert ArcMap output map into PDF programaticaly

my question is how to convert ArcMap output map into PDF programitically,and what are the requirements for the same.


Merging of two maps having different data in ecognition

I would like to synchronise two maps having two data (map1 for building and map2 for vegetation) into main map.I used the rule set of "working with maps".But it doesn't merges the data.I am using eCognition 8.7 version.My task is to classify building in one map and vegetation in another map of the same area.After classification I want to synchronise the extracted building and vegetation into the main map.I could do up to this level , but it comes as two levels in main map.I have to get it in a single level in main map.


How to identify to which polygon a point belongs to?

I have 3-4 polygons containing lots of lon/lat points. I want to identify to which polygon a specific point belongs. Any help in this matter is appreciated.


Directory.GetFiles vs. ListDatasets - Which is the tool for the job?

I'm currently writing an arcobjects app that performs an arbitrary set of geoprocessing tasks on a group of shapefiles and/or dbf tables. My current implementation uses Directory.GetFiles to build an array of file paths which I feed to various GP execution functions. I'm wondering if ListDatasets can perform the same task. I need to search an entire directory tree starting at a given root folder for all files which match a given search string. I am not certain if ListDatasets will do this (I have a devil of a time deciphering the SDK documentation). In short, which would prove more efficient and effective and recursively searching a directory tree for .shp and .dbf files, `Directory.GetFiles`, `GP.ListDatasets`, or some heretofore unmentioned method?


Keep nonintersecting polygons during clip

I am using ArcMap 10. I have two datasets, one of which consists of many small contiguous polygons, and one which has many small non-contiguous polygons. The first dataset is census blocks, and the second is a polygon outline of urban areas generated from the raster datasets NLCD provides. What I want to do is clip each census block such that each census block polygon only contains the urban area specified by the NLCD polygon. Running clip with the census blocks as the input features gives me this. However, there are additional constraints: If the area of the intersection between a census block and the NLCD polygon is under a certain threshold (say, 1000 sq ft), then the entire census block should be kept in the output. In this example, the green polygon is the NLCD data, and the red outlines are the census blocks. You can see the resulting clip. ![http://i.imgur.com/ASYrc.png](http://i.stack.imgur.com/cEdPp.png) ![http://i.imgur.com/OBDkr.png](http://i.stack.imgur.com/KR62b.png) The issue comes when there is no intersection between the census block and the NLCD polygon; nothing is kept in the output for that census block. I need to do this for a large amount of data, probably in arcpy. What strategy would you suggest?


How to create a regular polygon grid in PostGIS?

How to create, on the shape of a polygon, a regular grid of polygons/squares of an given size, in postgis? I have thought about a function like Create regular point grid in Postgis only for squares, so that squares can be 5m x 5m or even 10m x 10m. But have no idea to change this in the correct way.


Unable to create temporary GeoDatasets in g_g_g folders

I am converting a VBA macro that was written for ArcGIS 9.3 to a VB.NET project using the ArcGIS 10.0 .NET SDK. I am getting the following error whenever the code tries to create a temporary IGeoDataset in a "g_g_g" folder: "(esriDataSourcesRaster.GdalDriver) Failed to copy raster dataset ERROR 010240: Could not save raster dataset to E:\temp\g_g_g2 with output format GRID." (with the g_g_g2 incrementing by 1 with each failed attempt) It is able to create the "g_g_g" folder as well as create two files: dbldbnd.adf and hdr.adf before it fails. When it creates a "raster" folder, it creates these files as well as 5 other .adf files and a log file. It creates a temporary IGeoDataset in a "raster" folder just fine. I have tried a number of things to get past this error without any luck. Why am I getting this error and how can I fix it? I have never used ArcGIS before, so if there is some important detail I have failed to add, please let me know.


ERROR 000800 when trying to snap points layer to line or buffer layer

I am very new to GIS, so go easy on me. I am using ArcCatalog 10.0 and trying to snap a set of points to another layer that has roads in it. The points represent 10th miles along the road. Here are the general steps for what i am doing: 1) create a new local geodatabase 2) copy my points and road layers into new GDB via copy/paste. 3) double click the snap tool in toolbox -> Editing tools 4) enter points layer as "input features", and line layer as "Snap environment". These steps result in this error: ERROR 000800 The value is not a member of END | VERTEX | EDGE. I have googled all over and read all the docs I could find on the ESRI site, but i can't make sense of what this error is telling me to do. does anyone have any ideas? P.S. I also tried to create a buffer layer from the line layer using toolbox -> Analysis tools -> Proximity -> buffer and using that in the "snap environment" paramater, but i get the exact same error. I suspect my line layer is in the wrong format, but I am stumped on my next steps. Thoughts?


How to recalculate the the length of a geography linestring from nearby geography point in POSTGIS?

I have a geography type linestring *route_geography geography(LineString,4326)*, its a route from point A to point B. Now I have a point C near that line. I want to find the nearest point on that line, lets call it D. And then calculate the distance between D and B. Should I use *ST_Line_Locate_Point()* to find the point D? And if I do find the point D should I then use *ST_Line_Substring()* to split up the AB linestring to make a new DB linestring? These two functions are for geometry type not geography that my data is in, so what should I do?


Getting ExecutionEngineException when using GetCount in loop

I've created a small ArcObjects app that searches for all matching files in a directory tree and returns the matched files with the number of rows in each file. When performing this loop on a small number of files it seems to process fine. However, when running it over a larger number of files (81), it throws a `System.ExecutionEngineException` error that I'm having a hard time tracking down. Here is the (allegedly) relevant code. _FYI: The Execute method is thanks to one of Kirk's excellent answers in another question about debugging, I believe._ Following the stack trace of               Multinet Merging Application.exe!Multinet_Merging_Application.shp2gdb_form.Execute(ESRI.ArcGIS.Geoprocessor.IGPProcess proc = {ESRI.ArcGIS.DataManagementTools.GetCount}) Line 460 + 0x10 bytes  C#     Multinet Merging Application.exe!Multinet_Merging_Application.shp2gdb_form.RunCount(string[] inFile = {string[81]}) Line 448 + 0x8 bytes  C#     Multinet Merging Application.exe!Multinet_Merging_Application.shp2gdb_form.SearchAndReport(int option = 1) Line 106 + 0x3a bytes  C#     Multinet Merging Application.exe!Multinet_Merging_Application.shp2gdb_form.searchBtn_Click(object sender = {Text = "Search and Report"}, System.EventArgs e = {X = 125 Y = 13 Button = Left}) Line 326 + 0xd bytes  C#        Here are the functions--                private void searchBtn_Click(object sender, EventArgs e)             {                 if (infolderselected == true && filetypeselected == true)                 {                     string dir = folderTextBox.Text;                     string[] oDir = Directory.GetDirectories(dir);                     if (oDir.Length > 500)                     {                         if (MessageBox.Show("There are more than 500 directories under this root folder. Are you sure you wish to perform this operation?", "Warning", MessageBoxButtons.YesNo) == DialogResult.No)                         {                             searchrep.Text = searchrep.Text+ "\nSearch canceled!";                             return;                         }                     }             }          private void SearchAndReport(int option)         {             string searchstr = type + shpdbf;             string dir = folderTextBox.Text;             try             {                     searchrep.ForeColor = Color.Black;                     setOutputText(searchrep.Text + "\n" + sb.ToString());                     setOutputText(searchrep.Text + "\n--Performing Count. Please wait...");                     setOutputText(searchrep.Text + "\n--Total rows in listed files: " + RunCount(oFiles).ToString());                     setOutputText(searchrep.Text + "\n---------- Search and Report Complete at: " + DateTime.Now.ToString() + " ----------\n");                     searchBtn.Enabled = true;                  }             catch (UnauthorizedAccessException error)             {                 MessageBox.Show(error.Message + "\nThis process cannot continue.", "Error");                 setOutputText(searchrep.Text + "\nSearch failed due to error.");             }         }     private static int RunCount(string[] inFile)         {             finalcount = 0;             GetCount count = new GetCount();             foreach (string file in inFile)             {                 count.in_rows = file;                 Execute(count);                 finalcount += count.row_count;             }             return finalcount;         }     public static void Execute(IGPProcess proc)         {             Geoprocessor gp = new Geoprocessor();             gp.AddOutputsToMap = true;             gp.OverwriteOutput = true;             gp.RegisterGeoProcessorEvents((IGeoProcessorEvents)new GPEvents());             IGeoProcessorResult2 result = gp.Execute(proc, null) as IGeoProcessorResult2;             IGPMessages msgs = result.GetResultMessages();             for (int i = 0; i < msgs.Count; i++)                 Debug.Print("{0} {1}", msgs.GetMessage(i).Description, msgs.GetMessage(i).Type);         }      Apologies, that seems excessive. The gist of the process is that I am attempting to use the Get Count GP tool to return the number of rows from all the files returned in the search. It runs peachy until the number of files returned gets to a certain point, and then it goes kaput. Any ideas?


Looking for PDF map downloading capability in OpenGeo GXP

I am looking for a plugin to OpenGeo GXP in order to download maps in PDF format. Could you help me? Thanks


creating clusters of point data

I have a map of stores for a retailer. I am trying to form clusters (of these stores) such that each member of a cluster is at most 5km away from any other member and any non-member is at least 10 km from any member. I also would like to create a field in the point dataset indicating to which cluster a specific store beongs to. What would be the easiest way to do this? Thanks


Sextante script for statistic info

I want to generate a script for getting statistic information window from selected feature. For example i have two layer building(polygon) and railway(linestring). By using this tools i got a window dialog that shows me total number of features, total lenght of railways maybe... Exactly i need windows/dialog screens examples for Sextante. But lots of tutorials are about algorithms. Here is an example windows that generated by using " _Basic statistics for numeraic fields_ " tool from _Sextante/QGIS geoalgorithms/Vector table tools_ ![enter image description here](http://i.stack.imgur.com/0IgSp.png)


A library/software to create DEM from a topographic map

In one of my projects I need to digitize video clips showing some natural landscape. Specifically I need to know distances between different areas and elevation levels. I have a topographic map of the area so distances are not a problem. Is there any tool / library that allows to create DEM from a common topographic map? A language of the library doesn't matter, but I prefer open source solutions if possible. I know about QGIS and GRASS, but I cannot found how to use them for this specific purpose. EDIT: My map looks like this: ![enter image description here](http://i.stack.imgur.com/X0ChK.jpg)


Problem with matplotlib when installing QGIS on mac

I have matplotlib installed on a Mac (Mavericks) via `pip`, which means the matplotlib files get installed under /System/Library/... I tried installing the most recent version of QGIS, and the install fails because it can't find matplotlib. I'm thinking this is because I didn't use `easy_install`, which appears to put packages instead under /Library/... Is there an easy way to tell QGIS to look for packages under /System/Library - is it merely a matter of setting some environment variable that QGIS looks at ? thanks ! Update:   * I'm installing QGIS from the .dmg package provided at kyngchaos.com   * the error message started when I double click the .dmg to install it. I get a popup complaining that matplotlib is not installed even though it is installed and command line python can see it. I believe (based on other notes at kyngchaos.com) that the difference is because of my use of python.org python and `pip` instead of system python, and the different place that libraries are placed in.


Change palette of basic colors grid in 'Select color' dialog

I would like to know if there is a way to change the default palette of colors (48 Basic colors) which is displayed on the dialog "Select Color". Specifically, I want that when I add a layer the automatic color would be on the pastel palette. I tried to set the color ramp from the project properties menu, but still when I add a layer it would be displayed par default with a very dark color. Is there a way to change this settings for my QGIS?? Do I have to write some python script for this? Thanks for taking the time to read.he


Feature Layer Attribute table to Datatable and make it editable

Hi Currently i'm using this to turn it into a data table                featureCursor = layer.FeatureClass.Search(que, false);                         row = featureCursor.NextFeature();                              if (row != null)                         {                             for (int i = 0; i < row.Fields.FieldCount; i++)                             {                                 dataTable.Columns.Add(row.Fields.get_Field(i).Name);                             }                             while (row != null)                             {                                 dataRow = dataTable.NewRow();                                      for (int j = 0; j < featureCursor.Fields.FieldCount; j++)                                     dataRow[j] = row.get_Value(j);                                      dataTable.Rows.Add(dataRow);                                 row = featureCursor.NextFeature();                             }                         }      Does anyone know a more efficient way on doing this. Also I'm binding the data table to a datagrid, does anyone know a good way i can do this so that i can make the attribute table editable, and values reflected in the feature layer. I can do this, but not cleanly, has anyone tried this before? Thanks and Regards, Kev84


cannot import deegree workspace

I am working on `deegree 3.0`. I want to import the `deegree-workspace- inspire` workspace on deegree console, but I face this error:               Unable to import workspace: Download of     'http://repo.deegree.org/service/local/artifact/maven/redirect?     r=releases&g=org.deegree&a=deegree-workspace-csw&v=3.3.9&e=deegree-workspace' failed.     Server responded with HTTP status code 404      how can I fix it?


How to use the same ROI for multiple LANDSAT images in ENVI?

Suppose that I have 3 landsat images with the same datum ( WGS-84 ) and projection system ( UTM, Zone 39N ) as follows: TM LANDSAT 5 image for July 1987   ETM+ LANDSAT 7 image for July 2001   OLI_TIRS LANDSAT 8 image for July 2013 I have drawn a ROI in `TM LANDSAT 5 image for July 1987` and saved it in a `.roi` file and now I want to use that ROI to `subset data via roi` for all of the images. But I encounter the following problem: I have opened all of the images in ENVI in multiple displays, restored the roi and then used the option `subset data via roi`   when I do this for `TM LANDSAT 5 image for July 1987`, there's no problem and the action is done completely and I can store subset data to a file but for the remaining two image, I encounter the ENVI error: **There are no available ROIs associated with this input file** What can I do?   Because I'm doing a change detection project, I don't want to draw approximately identical ROI's in multiple images???   And also I think regarding the same coordinate system for all of the images, I should be able to draw a ROI in one image and then use it in other images???   Is that true or maybe I'm thinking in a wrong way???


Help needed with the use of FARSITE

Is there anyone who has worked with FARSITE? I can build some of the files needed, such as slope and aspect, but not sure where to start when it comes to building files for 'canopy', 'fuels', etc. I am currently using QGIS 1.8.0. The tutorial provided with FARSITE is excellent, and I worked through that easily. It's in creating the files for my area of interest that I'm encountering problems. These would have to be created for South African conditions.


TileStache + OpenLayers TMS - Tiles are rendered disorderly

I newly turned to TileStache to render Mapnik tiles because of the caching option. Before, I was using Mapnik python bindings only and it was working perfectly. Now that I use TileStache, the tiles are rendered randomly at wrong position in wrong order, just like pieces of a puzzle. Only at zoom 0 the features are on the right spot on the map. ![enter image description here](http://i.stack.imgur.com/dZ5Wa.png) This make me think that the problem could be with the row (y) and column (x) used to generate the tiles with `coord = ModestMaps.Core.Coordinate(y, x, zoom)` or with the projection wich is EPSG 900913. I use OpenLayers.Layer.TMS for the mapping. Here some codes: **Tiling script:**               def tile(request, version, shapefile, zoom, x, y):             config = {                 "cache": {                 "name": "Disk",                  "path": "/mygeosite/stache",                  "umask": "0000"},               "layers": {                 shapefile.filename: {                     "provider": {"name": "mapnik", "mapfile": "c:\\mygeosite\\geodjango\\test.xml"},                     "projection": "spherical mercator"                 }               }             }                  # like http://tile.openstreetmap.org/1/0/0.png             # x = row , y = column , zoom = zoom level             coord = ModestMaps.Core.Coordinate(y, x, zoom)             config = TileStache.Config.buildConfiguration(config)             bytes = TileStache.getTile(config.layers[shapefile.filename], coord, 'png')             return HttpResponse(bytes[2], mimetype="image/png")      **mapnik.xml**               <?xml version="1.0" encoding="utf-8"?>     <Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over" background-color="rgb(115,145,173)">         <Style name="featureLayerStyle">             <Rule>                 <PolygonSymbolizer fill="rgb(247,237,238)"/>                 <LineSymbolizer stroke-width="0.5"/>             </Rule>         </Style>         <Layer name="featureLayer" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">             <StyleName>featureLayerStyle</StyleName>             <Datasource>                 <Parameter name="dbname">ezmapping</Parameter>                 <Parameter name="geometry_field">geom_multipolygon</Parameter>                 <Parameter name="geometry_table">"shapefile_feature"</Parameter>                 <Parameter name="password">ogrant22</Parameter>                 <Parameter name="simplify_geometries">1</Parameter>                 <Parameter name="srid">900913</Parameter>                 <Parameter name="table">(select geom_multipolygon, id from "shapefile_feature" where shapefile_id=68) as geom</Parameter>                 <Parameter name="type">postgis</Parameter>                 <Parameter name="user">postgres</Parameter>             </Datasource>         </Layer>     </Map>      **OpenLayers.js:**               map = new OpenLayers.Map('map',               {maxResolution: 156543.0399,                 projection: new OpenLayers.Projection("EPSG:3857"),                 units: 'm',                 maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),                 numZoomLevels: 21});     tiledLayer = new OpenLayers.Layer.TMS('TMS',                     "{{ tmsURL }}",                     {serviceVersion: "1.0",                     layername: "{{ shapefile.id }}",                     type: 'png'});     map.addLayer(tiledLayer);


Openlayers which format best for serving lat lon markers from webservice?

I have a webservice which get GPS data (lat/lon) from android phone every 30 sec. The webservice (currently) write the data to local log file (any format I decide). which format/way will be best to read and refresh the layer every X seconds to show the location of the phone on OpenLayers OSM layer ?


Polygon not a valid geography instance

I am trying to create and insert data from ESRI shape files. This is one of the many features in the shape file, you can copy paste it and try it yourself:               DECLARE @g geography;     SET @g = geography::STPolyFromText('POLYGON ((28.397422886819093 70.5432251792964, 28.570915861286892 70.512498993109844, 28.540819573464251 70.4456402666085, 28.486718688957893 70.433538619104056, 28.353077926613448 70.512911092846991, 28.397422886819093 70.5432251792964))', 4326);     SELECT @g.ToString();      If I try to create a geography object from this on SQL Server 2008, it fails with the following error: > Msg 6522, Level 16, State 1, Line 2 A .NET Framework error occurred during > execution of user-defined routine or aggregate "geography": > System.ArgumentException: 24200: The specified input does not represent a > valid geography instance. System.ArgumentException: at > Microsoft.SqlServer.Types.SqlGeography.ConstructGeographyFromUserInput(GeoData > g, Int32 srid) at > Microsoft.SqlServer.Types.SqlGeography.GeographyFromText(OpenGisType type, > SqlChars taggedText, Int32 srid) What is wrong with this shape?


Mysql to nosql. Best solution?

We are working on our new vehicle tracking system. We have been making use of mySQL for the past two years. However we have been discussing moving to a noSQL database. We have a high number of reads and writes. For reads we have been told that mongodb will take up to much of our available ram on our servers. So which noSQL will best suit our needs, without causing us any furthur problems? Or is it better to hang on to mySQL? Thanks in advance!


cartodb: query for the points within a radio from another point - postgis

I've georreferenced a couple of points in a CartoDb table, so now I have a the_geom column of type point I'd like to get all the points that are x meters away from a certain x,y point. So far now, following this article http://unserializableone.blogspot.com.ar/2007/02/using-postgis-to-find-points- of.html, I tried the following:               SELECT * FROM my_contacts     WHERE     distance(       transform(PointFromText('POINT(-34.6043183 -58.380924)', 4269),32661),       the_geom     ) < 1000      (in this case my x,y point would be -34.6043183 -58.380924 and I'm looking for locations within 1000 meters from it) and I get this error: ERROR: Operation on two GEOMETRIES with different SRIDs I tried without the transform, and I get the same error How can I find out the SRIDs of the points in my db? And how can I translate a lat, lon google map point to that desired SRID? update: with this query I found out the SRID of my points               SELECT ST_SRID(the_geom) FROM my_contacts      they are all 4326, so I tried with and this seems to work rather ok:               SELECT *     FROM my_contacts     where      distance(       transform(PointFromText(         'POINT(-34.6675645 -58.3712721)', 4326),4326),       the_geom     ) < 33.62     order by distance      but I just got thiw 33.62 by trial and error, I don't know how to translate it to meters, and the results when trying with a different point don't seem to be very consistent... thanks a lot


Storage hardware options for large datasets

We are about to organize our data in a centralized spatial data system. The system would provide various services (mainly supporting ftp access, geodatabase editing, and several web mapping applications). The data we already have is sized around 15TB, is expected to constantly increase, and consisted of spatial databases, aerial imagery, lidar data, and some non-spatial data. Furthermore, I understand that only a small portion of data would be actively accessed, and the storage is a sort of central repository (traffics and transfer rates are not that big deal in that manner). I don't have any experience in managing such a big storage tier. I am under the impression that I have to purchase some NAS. However, I am not quite sure how should I plan the architecture of the storage tier (distributed or a single device), and what hardware specifications should I look for if the aim is 20TB capacity right now? Suggestions are appreciated.