Adding values to Fishnet Grid?

I have developed a fishnet grid for my study area. I have various datasets for the area and want to allocate a value (from one of the pre-determined datasets) to each polygon within the Fishnet. How do i display that the data from one source falls into the various polygons? I am using ArcGIS, after completing the Spatial Join the values i wished to display within the Fishnet Polygons all came up as Null? Any solutions to this?


Randomly select a record to update using arcpy.da.UpdateCursor

This question is related to my question here. What I would like to do is use a cursor with a where clause to select a number of records. For each row, the values in two fields, `TYPE_A` and `TYPE_B` should be compared. If those two values are not the same, the field `NUM_ID` should be updated with the current value of the counter. Once that is done, _all but one_ of the rest of the records in the selection should be updated with the value of the incremented counter. Some example data:               FEATURE 1 :NUM_ID = 4   TYPE_A = NEW   TYPE_B = NEW     FEATURE 2 :NUM_ID = 4   TYPE_A = NEW   TYPE_B = EXISTING     FEATURE 3 :NUM_ID = 4   TYPE_A = NEW   TYPE_B= NEW     FEATURE 4 :NUM_ID = 4   TYPE_A = NEW   TYPE_B= NEW     FEATURE 5 :NUM_ID = 11  TYPE_A = NEW   TYPE_B = EXISTING     FEATURE 6 :NUM_ID = 14  TYPE_A = NEW   TYPE_B = NEW     FEATURE 7 :NUM_ID = 11  TYPE_A = NEW   TYPE_B = EXISTING      The 4 features with `NUM_ID = 4`would be selected and Feature 2 will be given the NUM_ID 21, as its values for TYPE_A and TYPE_B are different. The next step would be to update _all but one_ of the other 3 records by incrementing the counter. The next selection would be the 2 features with `NUM_ID = 11`. As both the records have different values for both fields, they would both be updated. The last selection will be for NUM_ID = 4. As both its values for the fields are the same, and it is the only record in its selection set, no update is needed. The result:               FEATURE 1 :NUM_ID = 23   TYPE_A = NEW   TYPE_B = NEW     FEATURE 2 :NUM_ID = 21   TYPE_A = NEW   TYPE_B = EXISTING     FEATURE 3 :NUM_ID = 22   TYPE_A = NEW   TYPE_B= NEW     FEATURE 4 :NUM_ID = 4   TYPE_A = NEW   TYPE_B= NEW     FEATURE 5 :NUM_ID = 11  TYPE_A = NEW   TYPE_B = EXISTING     FEATURE 6 :NUM_ID = 14  TYPE_A = NEW   TYPE_B = NEW     FEATURE 7 :NUM_ID = 25  TYPE_A = NEW   TYPE_B = EXISTING      The code I have:               getNum("%Selected Features%")      * * *               def getNum(ftr):       lst = [4, 11, 14, 15] #values for SQL expression       x = 20       fields = ('TYPE_A', 'TYPE_B', 'NUM_ID')       assert "NUM_ID" in [f.name for f in arcpy.ListFields(ftr)], "NUM_ID field no in feature class"       for l in lst:         y = x + 1        whereclause = "%(sql_name)s = '%(l)s' """ {"sql_name":arcpy.AddFieldDelimiters(ftr, "NUM_ID"), "l":l}         with arcpy.da.UpdateCursor(ftr, fields, whereclause) as cursor:           for row in cursor:             if row[0] ! = row[1]:               row[2] = y             #some condition here             cursor.updateRow(row)         y += 1      `TYPE_A` only has one value in it for all features i.e `NEW`. `TYPE_B` could have any value. It does not matter which feature gets updated amongst those which have the same values for both fields (`NEW`), as long as one of them keeps the original value for NUM_ID. While this code updates the row correctly where the two fields don't match, I do not know how to let one of the records keep the original value, while the rest should be updated.


How to preserve original resolution of scanned 1-bit PDF raster with gdal_translate?

I am using `gdal_translate` to convert non-spatial PDFs to non-spatial TIFFs (intended for subsequent manual georeferencing). This is my `gdal_translate` command:               gdal_translate -of GTiff -sds -co NBITS=1 --config GDAL_PDF_DPI 300 %input_pdf% %output_tif%      Here is what it looks like at ~8x magnification (note the "nibbling" around the edges of text and the complete loss of many "speckles"): Input (rendered by Adobe Reader, disregard the slight blurring of edges): ![Input](http://i.stack.imgur.com/CP7P1.png) Output (rendered by ArcMap): ![Output](http://i.stack.imgur.com/gfqvx.png) If I do not specify the output bit depth (by omitting the `NBITS` option), I can tell that GDAL is re-rasterizing and resampling the input 1-bit image into a blurred grayscale image: ![Resampled](http://i.stack.imgur.com/Io63s.png) Ideally it would just copy each pixel in the input straight to the output. How can I retain the original resolution without information loss in the output? Should I use something else, like ImageMagick, Poppler or GhostScript? All this re-rasterization GDAL is doing is painfully slow, I might add, so I think I will try one of the alternatives for that reason alone.


How to style a point based on Actual Attribute Values?

I have published a point layer in Geoserver, which is the data from a GPS Survey. In addition to the geometry, my layer, also contains an Attribute for Accuracy, which indicates the Accuracy in meters of the reading. I have been trying to style the layer, such that a point is show as a point surrounded by a circle whose radius is equivalent to the Accuracy in map units. (Similar to how most mobile apps show the GPS points) All of the Attribute based symbolization that I have seen is Rule based (i.e. Classification). How do you Symbolize a point, such that its radius is equal to its accuracy?


Can FieldMappings be used to drop all attributes?

We have a script that regularly copies a bunch of feature classes out to shapefiles, keeping only the most important attributes (e.g. customer category) and dropping useless/private information (e.g. customer name). Right now, it repeats the same set of steps without much variation. I am attempting to significantly simplify it by defining a function to do all those steps (the entire purpose of functions, of course.) Also, by introducing the arcpy.FieldMappings objects instead of verbose field mapping strings, it's possible to quickly understand what fields are coming from which data sources. This works great for most of my feature classes.               def generate_field_mapping(inTable, inFieldList):         fm = arcpy.FieldMappings()         for field in inFieldList:             vars()[field] = arcpy.FieldMap()             vars()[field].addInputField(inTable, field)             fm.addFieldMap(vars()[field])         return fm          def subset_attributes(origFC, fieldList, outFC):         fStart = time.time()         name = origFC.split('.')[-1]         # make feature class with only desired fields         stringFieldMappings = generate_field_mapping(origFC, fieldList)         tempfc = os.path.join(scratchWS, "temp_{}".format(name))         arcpy.FeatureClassToFeatureClass_conversion(origFC, scratchWS, outFC, "", stringFieldMappings)         print "  > done with {} ({} seconds)".format(name, round((time.time() - fStart), 2))      But, I have one feature class for which we want _all_ of the fields dropped and I am not sure if I can accomplish this in the existing function workflow.   * If I pass an empty list of fields, it breaks: `FieldMap: Error in adding input field to field map`   * If I pass an empty (`""`) value, and put in a conditional to skip fieldmapping if there's no list, then all the original fields are passed.   * If I pass `OBJECTID` (logic being, that would definitely be in the output), it breaks: `Field mapping error: merge rule not valid for output field OBJECTID` I'm happy to just bypass the fieldmapping part of the function with a conditional, but I am not sure how to drop all the resulting attributes. (I don't want to DeleteField_management each one, that would be clumsy and I switched to FieldMappings to get away from that.) **Any ideas for a workaround?**


Alternate option for a Data Player plugin for GPS in qgis

I found a plugin for QGIS to play a GPS Track. (Data player plugin).The Problem is I can not read .gpx File with this plugin. Is there another option?


How do I maintain a resposive GUI using QThread with PyQGIS

I have been developing some batch processing tools as python plugins for QGIS 1.8. I have found that while my tools are running the GUI becomes non-responsive. The general wisdom is that the work should be done on a worker thread, with the status/completion information passed back to the GUI as signals. I have read through the riverbank docs, and studied the source of doGeometry.py (a working implementation from ftools). Using these sources I have tried to build a simple implementation in order to explore this functionality before making changes to an established code base. The overall structure is an entry in the plugins menu, that lanuches a dialog with start and stop buttons. The buttons control a thread that counts to 100, sending a signal back to the GUI for each number. The GUI receives each signal and sends a string containing the number both the message log, and the window title. The code of this implementation is here:               from PyQt4.QtCore import *     from PyQt4.QtGui import *     from qgis.core import *          class ThreadTest:              def __init__(self, iface):             self.iface = iface              def initGui(self):             self.action = QAction( u"ThreadTest", self.iface.mainWindow())             self.action.triggered.connect(self.run)             self.iface.addPluginToMenu(u"&ThreadTest", self.action)              def unload(self):             self.iface.removePluginMenu(u"&ThreadTest",self.action)              def run(self):             BusyDialog(self.iface.mainWindow())          class BusyDialog(QDialog):         def __init__(self, parent):             QDialog.__init__(self, parent)             self.parent = parent             self.setLayout(QVBoxLayout())             self.startButton = QPushButton("Start", self)             self.startButton.clicked.connect(self.startButtonHandler)             self.layout().addWidget(self.startButton)             self.stopButton=QPushButton("Stop", self)             self.stopButton.clicked.connect(self.stopButtonHandler)             self.layout().addWidget(self.stopButton)             self.show()              def startButtonHandler(self, toggle):             self.workerThread = WorkerThread(self.parent)             QObject.connect( self.workerThread, SIGNAL( "killThread(PyQt_PyObject)" ), \                                                     self.killThread )             QObject.connect( self.workerThread, SIGNAL( "echoText(PyQt_PyObject)" ), \                                                     self.setText)             self.workerThread.start(QThread.LowestPriority)             QgsMessageLog.logMessage("end: startButtonHandler")              def stopButtonHandler(self, toggle):             self.killThread()              def setText(self, text):             QgsMessageLog.logMessage(str(text))             self.setWindowTitle(text)              def killThread(self):             if self.workerThread.isRunning():                 self.workerThread.exit(0)               class WorkerThread(QThread):         def __init__(self, parent):             QThread.__init__(self,parent)              def run(self):             self.emit( SIGNAL( "echoText(PyQt_PyObject)" ), "Emit: starting work" )             self.doLotsOfWork()             self.emit( SIGNAL( "echoText(PyQt_PyObject)" ), "Emit: finshed work" )             self.emit( SIGNAL( "killThread(PyQt_PyObject)"), "OK")              def doLotsOfWork(self):             count=0             while count < 100:                 self.emit( SIGNAL( "echoText(PyQt_PyObject)" ), "Emit: " + str(count) )                 count += 1     #           if self.msleep(10):     #               return     #          QThread.yieldCurrentThread()      Unfortunately it's not quiet working as I hoped:   * The window title is updating "live" with the counter but if I click on the dialog, it is non-responsive.   * The message log is inactive until the counter ends, then presents all of the messages at once. These messages are tagged with a time stamp by QgsMessageLog and these time stamps indicate they were received "live" with the counter i.e. they are not being queued by either the worker thread, or the dialog.   * The order of messages in the log (exerpt follows) indicates that startButtonHandler completes execution before the worker thread comences work i.e. the thread behaves as a thread.              end: startButtonHandler     Emit: starting work     Emit: 0     ...     Emit: 99     Emit: finshed work        * It seems the worker thread just isn't sharing any resources with the GUI thread. There are a couple of commented out lines at the end of the above source where I tried calling msleep() and yieldCurrentThread(), but neither seemed to help. Is anyone with any experience with this able to spot my error? I'm hoping it is a simple but fundamental mistake that is easy to correct once it is identified.


Is PgQuery for QGIS still available?

I was wondering if PgQuery for QGIS is still available. I am trying to install it on some new machines with QGIS 1.8.0 and I can not find it in the Python Plugin Installer. Does anyone know of a place where I can download it directly? Do I need to add a specific repository? I currently only have the Official Repository loaded. Thanks...


GDAL/OGR Determine if dataset is raster or vector

I am writing a script using the GDAL/OGR Python bindings and it is possible that the user may provide a raster dataset or a vector dataset as input. If the user provides a vector dataset, the script will convert it to raster. Is there a way to determine whether the dataset is raster or vector before opening them? I could just try to open the dataset with OGR first and if it returns None I could try to open with GDAL, but I am looking for a more simple way like `gdal.IsRaster(filepath)` if it exists.


GeoServer FeatureID Filter Limits

we've made an application that uses GeoServer WMS tiles on an OpenLayers map. We have a layer of Bus Stops which we filter based on search results from previous search i.e. User searches for 'The Square', we find 20 stops that say 'The Square' and filter them in the WMS requests using FeatureID like so. > > http://wms.geowessex.com/geoserver/wms?LAYERS=dev%3ADFT_BUS_STOPS&CACHE=true&TRANSPARENT=true&FORMAT=image%2Fpng8&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FEATUREID=DFT_BUS_STOPS.2106%2CDFT_BUS_STOPS.239%2CDFT_BUS_STOPS.357%2CDFT_BUS_STOPS.1217%2CDFT_BUS_STOPS.1185%2CDFT_BUS_STOPS.245%2CDFT_BUS_STOPS.1175%2CDFT_BUS_STOPS.2261%2CDFT_BUS_STOPS.1199%2CDFT_BUS_STOPS.1665%2CDFT_BUS_STOPS.1664%2CDFT_BUS_STOPS.1214%2CDFT_BUS_STOPS.1181%2CDFT_BUS_STOPS.1712%2CDFT_BUS_STOPS.1258%2CDFT_BUS_STOPS.2078%2CDFT_BUS_STOPS.1741%2CDFT_BUS_STOPS.1176%2CDFT_BUS_STOPS.1165%2CDFT_BUS_STOPS.1137%2CDFT_BUS_STOPS.1068%2CDFT_BUS_STOPS.2084%2CDFT_BUS_STOPS.353%2CDFT_BUS_STOPS.1139%2CDFT_BUS_STOPS.1248%2CDFT_BUS_STOPS.203%2CDFT_BUS_STOPS.1731%2CDFT_BUS_STOPS.205%2CDFT_BUS_STOPS.1239%2CDFT_BUS_STOPS.2453%2CDFT_BUS_STOPS.1679%2CDFT_BUS_STOPS.1678%2CDFT_BUS_STOPS.356%2CDFT_BUS_STOPS.1701%2CDFT_BUS_STOPS.1715%2CDFT_BUS_STOPS.250%2CDFT_BUS_STOPS.1704%2CDFT_BUS_STOPS.358&SRS=EPSG%3A900913&BBOX=-275784.79880351,6550959.0701793,-275173.30257734,6551570.5664055&WIDTH=256&HEIGHT=256 (this particular example only shows two of the filtered stops, but you get the picture) This works fine, but with some of the search results the amount of stops can be significantly higher, so we end up with a request like this. > > http://wms.geowessex.com/geoserver/wms?LAYERS=dev%3ADFT_BUS_STOPS&CACHE=true&TRANSPARENT=true&FORMAT=image%2Fpng8&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FEATUREID=DFT_BUS_STOPS.2106,DFT_BUS_STOPS.239,DFT_BUS_STOPS.357,DFT_BUS_STOPS.1217,DFT_BUS_STOPS.1185,DFT_BUS_STOPS.245,DFT_BUS_STOPS.1175,DFT_BUS_STOPS.2261,DFT_BUS_STOPS.1199,DFT_BUS_STOPS.1665,DFT_BUS_STOPS.1664,DFT_BUS_STOPS.1214,DFT_BUS_STOPS.1181,DFT_BUS_STOPS.1712,DFT_BUS_STOPS.1258,DFT_BUS_STOPS.2078,DFT_BUS_STOPS.1741,DFT_BUS_STOPS.1176,DFT_BUS_STOPS.1165,DFT_BUS_STOPS.1137,DFT_BUS_STOPS.1068,DFT_BUS_STOPS.2084,DFT_BUS_STOPS.353,DFT_BUS_STOPS.1139,DFT_BUS_STOPS.1248,DFT_BUS_STOPS.203,DFT_BUS_STOPS.1731,DFT_BUS_STOPS.205,DFT_BUS_STOPS.1239,DFT_BUS_STOPS.2453,DFT_BUS_STOPS.1679,DFT_BUS_STOPS.1678,DFT_BUS_STOPS.356,DFT_BUS_STOPS.1701,DFT_BUS_STOPS.1715,DFT_BUS_STOPS.250,DFT_BUS_STOPS.1704,DFT_BUS_STOPS.358,DFT_BUS_STOPS.204,DFT_BUS_STOPS.1198,DFT_BUS_STOPS.2363,DFT_BUS_STOPS.2449,DFT_BUS_STOPS.2450,DFT_BUS_STOPS.1260,DFT_BUS_STOPS.1707,DFT_BUS_STOPS.1699,DFT_BUS_STOPS.1700,DFT_BUS_STOPS.228,DFT_BUS_STOPS.1675,DFT_BUS_STOPS.1711,DFT_BUS_STOPS.1710,DFT_BUS_STOPS.1528,DFT_BUS_STOPS.1706,DFT_BUS_STOPS.1705,DFT_BUS_STOPS.243,DFT_BUS_STOPS.265,DFT_BUS_STOPS.1160,DFT_BUS_STOPS.1261,DFT_BUS_STOPS.227,DFT_BUS_STOPS.1164,DFT_BUS_STOPS.1177,DFT_BUS_STOPS.1736,DFT_BUS_STOPS.985,DFT_BUS_STOPS.263,DFT_BUS_STOPS.1748,DFT_BUS_STOPS.1266,DFT_BUS_STOPS.1178,DFT_BUS_STOPS.1163,DFT_BUS_STOPS.2125,DFT_BUS_STOPS.1061,DFT_BUS_STOPS.1780,DFT_BUS_STOPS.1268,DFT_BUS_STOPS.1747,DFT_BUS_STOPS.1152,DFT_BUS_STOPS.1738,DFT_BUS_STOPS.2531,DFT_BUS_STOPS.251,DFT_BUS_STOPS.1155,DFT_BUS_STOPS.2530,DFT_BUS_STOPS.1151,DFT_BUS_STOPS.1156,DFT_BUS_STOPS.1132,DFT_BUS_STOPS.1073,DFT_BUS_STOPS.1154,DFT_BUS_STOPS.252,DFT_BUS_STOPS.1722,DFT_BUS_STOPS.1723,DFT_BUS_STOPS.1744,DFT_BUS_STOPS.2104,DFT_BUS_STOPS.236,DFT_BUS_STOPS.1721,DFT_BUS_STOPS.1720,DFT_BUS_STOPS.1064,DFT_BUS_STOPS.195,DFT_BUS_STOPS.1745,DFT_BUS_STOPS.369,DFT_BUS_STOPS.1170,DFT_BUS_STOPS.858,DFT_BUS_STOPS.1070,DFT_BUS_STOPS.1193,DFT_BUS_STOPS.1192,DFT_BUS_STOPS.2420,DFT_BUS_STOPS.1670,DFT_BUS_STOPS.1671,DFT_BUS_STOPS.1245,DFT_BUS_STOPS.2412,DFT_BUS_STOPS.2427,DFT_BUS_STOPS.206,DFT_BUS_STOPS.1255,DFT_BUS_STOPS.1256,DFT_BUS_STOPS.1742,DFT_BUS_STOPS.1072,DFT_BUS_STOPS.1133,DFT_BUS_STOPS.1734,DFT_BUS_STOPS.1733,DFT_BUS_STOPS.293,DFT_BUS_STOPS.2447,DFT_BUS_STOPS.2448,DFT_BUS_STOPS.1144,DFT_BUS_STOPS.2347,DFT_BUS_STOPS.249,DFT_BUS_STOPS.1693,DFT_BUS_STOPS.1692,DFT_BUS_STOPS.197,DFT_BUS_STOPS.1142,DFT_BUS_STOPS.1784,DFT_BUS_STOPS.1783,DFT_BUS_STOPS.968,DFT_BUS_STOPS.1785,DFT_BUS_STOPS.1143,DFT_BUS_STOPS.1781,DFT_BUS_STOPS.1782,DFT_BUS_STOPS.202,DFT_BUS_STOPS.986,DFT_BUS_STOPS.862,DFT_BUS_STOPS.2107,DFT_BUS_STOPS.247,DFT_BUS_STOPS.898,DFT_BUS_STOPS.237,DFT_BUS_STOPS.248,DFT_BUS_STOPS.1191,DFT_BUS_STOPS.1265,DFT_BUS_STOPS.927,DFT_BUS_STOPS.1737,DFT_BUS_STOPS.261,DFT_BUS_STOPS.262,DFT_BUS_STOPS.1189&SRS=EPSG%3A900913&BBOX=-275784.79880351,6550959.0701793,-275173.30257734,6551570.5664055&WIDTH=256&HEIGHT=256 Now obviously I have hit some sort of limit here, my main question is, is the limit based on the length of the url, or is it based on the amount of FeatureIDs I am filtering by. I think ultimately I am going to have to put a limit in place on the filter, so that if there are more than 120 results (my request failed at 147 FeatureID filters, this gives some wiggle room) the results do not get filtered, unless anyone has any other ideas? Thanks!


How to join two table based on one unique column in PostGIS

I wonder if there any simple query that perform just like Join features of ArcGIS Desktop.


get valules for all fields from selected features

The following code works for retrieving values within a particular field(Name1), but I want to retrieve mulitple fields. Am I to create multiple variables for each field?               IMxDocument pMxDocument = ArcMap.Application.Document as IMxDocument;             IMap pMap = pMxDocument.FocusMap;             ILayer pLayer = pMap.get_Layer(0);             IFeatureLayer pFeatureLayer = (IFeatureLayer)pLayer;             IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;                  ITable pTable = (ITable)pFeatureClass;             ICursor pCursor = pTable.Search(null, false);             int fldIndex = pFeatureClass.Fields.FindField("Name1");             IRow pRow = pCursor.NextRow();             while (pRow != null)             {                 MessageBox.Show(pRow.get_Value(fldIndex).ToString());                 pRow = pCursor.NextRow();                  }      Edit: What I'm trying to do is get the selected features of a feature class, get the values for fields like Name, address, city, etc and then pass those values onto a document. I thought I would give some background to what I am doing since I may be on the wrong track to start off with.


AddData tool stop working after Interoperability connection has been used?

Bug in ArcGIS Engine? Has anyone seen this behavior? We get an exception from our ArcGIS Engine test projects after we had been testing the Interoperability connection in ArcEditor. We had to enable unmanaged code debuging in VS because the test application crashed without telling what happened, we get a stacktrace that look like this:               'TestMapWFSLayer.exe': Loaded 'C:\Test\TestMapWFSLayer\TestMapWFSLayer\bin\Debug     ...     'TestMapWFSLayer.exe': Loaded 'C:\Windows\SysWOW64\rasadhlp.dll'     First-chance exception at 0x7680b727 in TestMapWFSLayer.exe: Microsoft C++ exception: FNPNS::TSM::CDoesNotExistException at memory location 0x003799c4..     ...          'TestMapWFSLayer.exe': Loaded 'C:\Windows\SysWOW64\wship6.dll'     'TestMapWFSLayer.exe': Loaded 'C:\Windows\SysWOW64\WSHTCPIP.DLL'     The thread 'Win32 Thread' (0xd90) has exited with code 0 (0x0).     The thread 'Win32 Thread' (0xfd8) has exited with code 0 (0x0).     First-chance exception at 0x7680b727 in TestMapWFSLayer.exe: Microsoft C++ exception: FNPNS::TSM::CDoesNotExistException at memory location 0x00379974..     ...     'TestMapWFSLayer.exe': Loaded 'C:\Windows\SysWOW64\icmp.dll'     First-chance exception at 0x7680b727 in TestMapWFSLayer.exe: Microsoft C++ exception: FNPNS::TSM::CDoesNotExistException at memory location 0x00379f20..     First-chance exception at 0x7680b727 in TestMapWFSLayer.exe: Microsoft C++ exception:      ...     First-chance exception at 0x7680b727 in TestMapWFSLayer.exe: 0xE0000001: 0xe0000001.     ...           ...     First-chance exception at 0x7680b727 in TestMapWFSLayer.exe: 0xE0000001: 0xe0000001.     ...     ...     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\DIDatasource.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ArcGIS\Engine10.0\bin\fme.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\fme.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll'     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\xerces-c_2_8_fme.dll'     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\icuuc38_fme.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\icudt38_fme.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\tcl_fme.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\threadlockmgr.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Windows\SysWOW64\shfolder.dll'     'TestMapWFSLayer.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.openmp_1fc8b3b9a1e18e3b_9.0.30729.4974_none_80bb23871e9ab973\vcomp90.dll'     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\xerces-depdom_2_8_fme.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\icuin38_fme.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\fme_stringconverter.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\fme_sqlite3.dll', Binary was not built with debug information.     'TestMapWFSLayer.exe': Loaded 'C:\Program Files (x86)\ESRI\Data Interoperability Extension\res\fmearcgisext_res.dll', Binary was not built with debug information.     Critical error detected c0000374     Windows has triggered a breakpoint in TestMapWFSLayer.exe.          This may be due to a corruption of the heap, which indicates a bug in TestMapWFSLayer.exe or any of the DLLs it has loaded.          This may also be due to the user pressing F12 while TestMapWFSLayer.exe has focus.          The output window may have more diagnostic information.      Update: Tried uninstalling the Data Interoperability Extension (DIE): When I tried using the AddData tool after uninstalling DIE, it was i bit slow but after a while it gor visible and I was able to use it. Installed the DIE again and the AddData dialog workes until I hit the geodatabases tab.![AddData dialog](http://i.stack.imgur.com/QymoA.png)


It seems there is a bug in St_Clip function of PostGIS

The code I am using for clip feature is :               raster ST_Clip(raster rast, geometry geom, double precision[] nodataval=NULL, boolean crop=true);      I tried clip a shape depends on the polygon from the Raster Data. But the PostGIS would clip the raster depend on the Bounding Box of the polygon, and put the Non-data value as 0. Even I tried to modify that with code:               SELECT ST_Clip(rast,geometry, ARRAY[-9999],true) FROM dtm, polygons WHERE polygons.polygonid = 1;      After I dump the data as a ASC-II file from the PostGIS, using gdal_translate with another option -a_nodata -9999, I find out it only changes the Header of the ASC-II file not the exact bounding box value. ![enter image description here](http://i.stack.imgur.com/kCCTE.png) Is there anyway to change the value from 0 to -9999, or someway to clip the raster depending on the polygon rather than the Bounding Box of the polygon. THanks.


DEM data - Central Europe - noise in heights

I have downloaded DEM data from this page: http://www.viewfinderpanoramas.org/dem3.html. I have written simple program in C++ that takes "bricks" and build resulting height map. Hovewer, I have problem with result. I am using Mercator projection and take every "gps pixel" from DEM data and recalculate its position to real pixels (same for border). It works fine (or at least it seams to). As you can see on image, there is something weird. That "mess" in lower part is incorrect and I dont know, if data are incorrect, if I am using them incorrect (wrong bricks ?) or something in my program is wrong. ![Height map of Czech Republic](http://i.stack.imgur.com/R8fkI.png) EDIT: Here is algorithm for reading "bricks" heights:               //iterate all bricks and set its starting coordinates     double startLon = 19;     double startLat = 48;          ///-------------------------     int tileSize = 1201;     double step = 1.0 / tileSize;          for (int y = 0; y < tileSize; y++)     {               for (int x = 0; x < tileSize; x++)        {              short height = brick[x + (tileSize - 1 - y) * tileSize];             //tileSize - 1 - y -> reverse brick coordinates              height = swap_endian<short>(height);              if (height == -32768)         {                            height = 0;         }              lon = (startLon) + x * step;         lat = (startLat - 1) + y * step;              int pixelX = 0;         int pixelY = 0;         this->helper->ConvertCoordinates(lon, lat, &pixelX, &pixelY);              if (pixelX < 0) {  continue;}         if (pixelY < 0) {  continue;}         if (pixelX >= this->width) {  continue;}         if (pixelY >= this->height) {  continue;}                  //write it to map             //if multiple height in same pixel, take only last one         this->heightMap[pixelX + pixelY * this->width] = height;                     }     }


How do I build a custom menu to change preferences for a MapBasic application?

I would like to be able to input a few different tables for an application. I want to be able to set the path before the app runs. How do I create a preference box and what code do I use to call the tables that I set in the box? I want it to resemble this:


Software for analyzing GPS tracklogs to extract human-readable placenames

I have a pile of GPX-formatted tracklogs for many countries where I've travelled over the years (the GPS-device has been continuously on and recording for most of the trips). I would now like to analyse the logs automatically to extract a list human-readable names for the places that I've visited. For example:   * detect and name border crossings   * detect and name inhabited places where I've stayed longer Does there exist ready-made software (preferably free and open source) that can be used to perform such analysis? (By "tracklog" I mean: a sequence of timestamped longitude-latitude pairs.)


How to get a string from a Double with a fixed number of decimals?

I have a featureclass (in a File Geodatabase), with a particular field of type Double. I want to copy it over to a text field, so that only 3 decimal places are shown. For example: `34.78902345 becomes 34.789` I have gone through this question: How to convert a double field to a string?, but that does not solve my issue. I have even tried to format the double field, but even then the text field contains all the decimals. How do I do this in ArcGIS 10.0?


Which flow routing algorithms does ArcGis support?

Other than standard D8 are there support for multiple flow algorithms like FD8, DEMON, Dinfinity etc?


How to easily label point values in ArcScene?

I would like to be able to quickly label point values in my scene. I am aware of the fact that there is no out-of-the-box solution to label features in ArcScene similar to the one in ArcMap. (No doubt the 3D environment is presenting a lot of complexity to the programmers.) I've worked with some (expensive) programs that were able to successfully and cleanly label feature in 3D environment but redrawing/refreshing was required to update the labels. (Gemcom GEMS) I do not need my points to rotate correctly with the scene or anything as fancy as that however I am a little tired of placing text manually in the scene or in post-processing. Does anyone know of a working solution?


What generation of the MrSID format is supported by ArcGIS 9.3?

This is probably old news to some, but I just learned that MrSID (.sid) files have different 'generations' of file formats - so there are MrSID Generation 2, Generation 3, and Generation 4 files. Does anyone know what generation of .sid is supported in ArcGIS 9.3? Thanks!


Polygon gradient fills / tint bands in QGIS

Is it possible to use a gradient fill on a polygon in QGIS? I would like to have my polygons with a colour at the edges, fading to clear/white as it moves away from the edge. The majority of the centre of the polygon will be white or clear. It is something people I know who use Illustrator can do. I wondered if there was a way to emulate it in QGIS. Here is an example. I would like something like the purple shading. ![enter image description here](http://i.stack.imgur.com/b9MRt.jpg) Update: This method suggested below does work, however it produces some annoying extra bits for my polygons. For example, see the image below: ![enter image description here](http://i.stack.imgur.com/kWGqo.jpg) I am unsure how to remove these. I cannot use a mask as I need to be able to see the base mapping and other data outside of this polygon on layers that are below this layer. Using a mask would obscure all of these layers. I have included a link to Underdarks blog post about this, which gives more detail, and contains the code to set this up. http://underdark.wordpress.com/2011/08/08/creating-a-gradient-fill-for- polygons-in-qgis/


Geomajas: How do I add context menu on a map marker

I'm evaluation Geomajas. Apparently, there's very little info on this framework across the Internet. I've managed to create a context menu for the map (the menu that appears when you right click on the map). I want to do the same for a map point marker (I may need to extend this to other geometry types, i.e., Polygons, Multipolygons, Lines, etc). Anyone with an idea on how to do this, please assist. Additionally, when I add context menu, the "About Geomajas" menu item hides my first menu item. Is there a way that I can add menu items from below this menu, or make it the last item in the menu? I'm adding context menu by adding the line:               map.getContextMenu().addChild(MyMenus.getMyContextMenu());


How to delete records from multiple, similar feature classes by attribute values using an SQL statement?

I have several hundred geodatabase feature classes which all have the exact same fields. I need to go through each of those feature classes and delete any records which match an SQL query (the same SQL query can be applied to all the feature classes). Alternatively, I could export them all to new feature classes, keeping the records I want. In ArcCatalog I can export them singly using an SQL query to specify which records get exported, but the SQL statement option isn't available when you want to export multiple layers simultaneously (using "Feature Class to Geodatabase (multiple)").


Performing Geoprocessing SQL Queries in QGIS from a PostGIS Database

This may be a dumb question, but is there way to run a PostGIS geoprocessing SQL query in QGIS? Specifically, I am thinking of running SQLs such as ST_Union, ST_Split etc etc. I have tried the following SQL in the QGIS PostGIS Query Editor without any luck, while the query worked in PostGIS.               SELECT covtype, ST_Multi(ST_Union(f.the_geom)) as sGeom     INTO testLCC     FROM lcc2000_001k AS f     GROUP BY covtype;          SELECT populate_geometry_columns     ('testLCC'::regclass);          ALTER TABLE testLCC ADD CONSTRAINT pkid PRIMARY KEY(covtype);      Thanks in advance...


ArcGIS 10.0/arcpy: How to create a polygon geometry from inner and outer ring point arrays?

I have two arrays, each containing a closed ring of points, one for an outer ring and the other for an inner ring, the latter running counterclockwise, of course. I am using the arcpy.Polygon() factory function to build the polygon. **My question: how do I input the points to Polygon()?** Documentation gives the general syntax as Polygon(inputs, spatial reference, has_Z, has_M). The inputs part is what is sketchy. The inputs supposedly can be point objects or arrays. My problem is that I have a polygon with a doughnut hole. I can build a simple polygon with a single point array as input ... no problem; however, in what way do I add the _two_ sets of points? In the "Reading Geometries" help page it says that parts (in this case rings) are separated by a null point object. For polygons with holes, the outer ring goes first. So, I tried adding the outer array then the inner array to a container array. That didn't work: no hole. I tried the same thing with a null point object between them. No joy: same result. Then, I tried putting both arrays into a Python list as the input. That threw an error. The sample scripts in the help files never deal with _writing_ polygons with holes. So, I really don't know what format to use for the inputs. Does anyone have any insight into this one? I would surely appreciate the help. Thanks, all.


How to grid unevenly sampled categorical data?

I am looking for a method for gridding categorical data. I have extracted from nautical charts and field sheets a collection of points specifying the nature of the surface of the bottom of the ocean. These data are categorical rather than numerical and they are not regularly nor even randomly sampled. Nautical charts are created to aid in navigation and anchoring; they are not created to map habitat. As such, more soundings are made close to shore where relatively shallow depths can pose a hazard to navigation and where ships to tend to anchor. Further from shore, where the depths are more than adequate for navigation and anchoring is impractical, soundings are made much less frequently. **Has anyone else tried to create gridded substrate maps from nautical charts?** I looked at Thiessen (Vornoi) polygons but the concentration of soundings along shores leads to a fine 'honeycomb' along the shore, large polygons offshore and in between long pie-shaped polygons stretching way offshore. Gridding using nearest neighbour yields pretty much the same result. I need a way to limit the influence of the shallow, near shore points -- a way to limit those long pie-shaped polygons. In deeper waters I do not expect that the nature of the bottom will be a continuation of the near shore bottom. I started thinking along two lines -- both using depth. **One** is weighting the choice of the 'nearest' neighbour using the difference in depth between a grid cell and neighbouring points. **Another** is de-selecting neighbouring points which are more than some specified tolerance different in depth. Or, perhaps rather than a pre-specified tolerance, I could bin depth ranges and then limit the choice of neighbouring points to those in the same depth range or bin. **Any thoughts on how to implement either of these two options?** Since talking with colleagues on other forums, I have been looking at a couple of other approaches. The first involves using a barrier -- the 100m depth contour -- to limit the influence of near shore data. The challenge with this approach is that any of the ESRI interpolation routines that can use barriers are designed to work with continuous data rather than discontinuous data. I could use the barriers to break up the points into shallow near shore and deeper points before creating Thiessen polygons. However, I anticipate rampant edge effects since ArcGIS createsThiessen polygons for rectangular areas not for complex areas. The second approach -- suggested by several colleagues -- was kriging. I had initially dismissed kriging out of hand because I have only ever considered it for continuous data. The challenge with kriging is that it too is not designed for categorical data. Now, I am looking at cokriging with depth and nature of surface but, any type of kriging is going to involve using integer numerical codes for nature of surface. Afterward the resulting floating point numerical codes will have to be reduced back to the original integer coding. Not pretty. Can any one suggest other lines to follow? (One could, perhaps, use terrain analysis. For example, slopes steeper than the angle of repose could not be sediments. I am looking for something simpler and, at any rate, I do not have data at sufficient spatial resolution.) Regards,


Problem installing gdal - works in build directory, not in /usr/bin

I've been trying to install gdal with the FileGDB driver. I installed it fine on a linux mint machine. I am having problems installing on a CentOS machine though.   It builds fine, I can run the apps in the build directory but when I run make install, it runs without error.   The machine did have gdal 1.9 installed. After we had tried several times installing I used rpm to uninstall the gdal packages shown as installed. Reran the make install, reran ldconfig just in case. No difference. For now I'm hard coding the path to the build directory, but obviously I'd rather have it run properly.               ./configure LDFLAGS=-L/lib64 --with-fgdb=/data/HOMEDIRS/SAI/dev/src/FileGDB_API      --without-python --with-perl --with-pg=/usr/bin/pg_config --prefix=/usr     /data/HOMEDIRS/SAI/dev/gdal-1.11.0/apps/ogrinfo --formats|grep File      -> "MapInfo File" (read/write)      -> "OpenFileGDB" (readonly)      -> "FileGDB" (read/write)     /usr/bin/ogrinfo --formats|grep File      -> "MapInfo File" (read/write)      -> "OpenFileGDB" (readonly)      Interestingly, if I delete the file in /usr/bin then reinstall, the install does something to the binary (link in libraries?):                ls -l /data/HOMEDIRS/SAI/dev/gdal-1.11.0/apps/ogrinfo /usr/bin/ogrinfo      -rwxr-xr-x 1 nrgadmin root  7671 Sep  4 20:00 /data/HOMEDIRS/SAI/dev/gdal-1.11.0/apps/ogrinfo      -rwxr-xr-x 1 root     root 78727 Sep  4 20:17 /usr/bin/ogrinfo


how to make a join with sql server table

I have a question. I'd like to join .shp to table by using AddJoin_management. But I'd like to make join to sqlserver table (not to *.dbf). Is it possible to do? it should look something like this:               AddJoin_management ("my_layer.shp", "ID", SQL-SERVER-TABLE, "ID")


QGis and developpement version

On various forums, when I asked some question, I have got more and more answer like that: "you can do this with the development version of QGis 1.9... but you can't with the current version..." It is quite frustrating! Why QGis don't do like some other opensource software, propose the both version on their website (the current and the development one with a message which inform that it is not a stable version)? I know that I can found this development version, but I find it quite a shame to have to looking for this version and not to find it on the main website, especially for software that tries to be very friendly user. User of several opensource software's, I find it quite a shame. Just to share my point of view, don't worry, I'm not angry against QGIS, which I find excellent, it's just a reaction to the answers on many forums that refer to this version. Cheers.


How can I convert files from a county government to shapefiles?

I work for a company that creates software for multiple listing services and real estate agents. We're expanding our coverage area into a new market, and I've been given some files for two different counties which they are calling their "shapefiles". One file is an access database, and the other is a fixed width column text file. Is there some way for me to convert these files to actual ESRI shapefiles? Here are some examples - **Here's what I'm given in the fixed width file for the "vector" column (from Palm Beach county, Florida):** A0CL10D10L12D40R24U40L2U10 A4L30D2L2D6R2D14L2D6R2D7D11L7D14L14D20R26R8U6L8D6U6R8D11R17U14R5U6L5D6U6R5D6R8D6R14U38L14D12L8CL5D7R5U7 A1L24D12L5D10R5D28R12U4CR22U20L10D10L12D10 I have no idea what the above could be. If you want to see the file here's a small sample: sample.txt **The Access file (from Broward County, Florida):** The access file just says "Long binary data" for the geometry columns. It has a lot of tables named GDB_xxxx (GDB_SpatialRefs, GDB_GeomColumns, etc). I'm guessing this has something to do with Microsoft's spatial format. Any help you guys can give would be greatly appreciated!


Solution for slow display of postgis-tables ? (qgis 1.8 + postgis 2.x)

I have the problem that my postgres-tables are displayed very slow when I scroll them in QGIS. I have no problem with other tested GIS (e.g. UDig, GVSig, ArcGIS). The number of objects isn't large (5000-10000) and the rendering is no problem. I've observed that every action like scrolling causes queries in the database, looks like there's no cache - Is that true??? 'Can't believe that. The connection to the database server runs through a fast Internet (and it works with other GIS). Does anyone have an idea how to solve the problem? I would love to work with QGIS, but the problem makes it impossible so far. I appreciate your advices, regards Bob


Digital Number (DN) on satellite imagery?

How would I know if any of the satellite imagery (Landsat, ASTER, Quickbird and so on) have DN or Digital Numbers such as integer or uninteger on its pixel. I download from the USGS EarthExplorer and have seen some in 0 -255 or into floating numbers. My question do they at USGS re-calibrated or left untouched them before they put in into their website for the user to download. Does this means that each different imagery has its own different digital numbers from the sensor ? I have ArcGIS 10.1, ENVI 5.0 and ERDAS 2013


Persistent datum conflict error. Datums are the same

I'm clipping a number of features using other feature layers, and was careful to get everything into WGS84 beforehand, using what I thought were the proper datum transformations. Now I keep getting Error 001003, Datum conflict between input and output. I'm not sure if this is referring to my input shapefiles, or if it's a problem with output coordinate environment settings, or none of the above. ![Feature 1 Coordinate System Info](http://i.stack.imgur.com/WAf8O.jpg) ![Feature 2 Coordinate System Info](http://i.stack.imgur.com/b3hFl.jpg) Contents of the .prj file of the input feature: > > GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],VERTCS["Unknown > VCS",VDATUM["Unknown"],PARAMETER["Vertical_Shift",0.0],PARAMETER["Direction",1.0],UNIT["Meter",1.0]] Contents of the .prj file of the clip feature: > > GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] Any ideas?


How do I create an index layer for multiple maps?

I am trying to create an index layer of just the area within the Orange lines. I am having difficulty creating this layer due to it not being a simple box area. The goal is to create a index layer, with grids, so that the Data Driven Pages would be used to generate it as a mapbook for the response area for my firehouse. Attached is an image of what I am speaking about. Any ideas? I am using ArcGIS but should I be QGIS? I am fairly a beginner but pick up quickly thanks in advance. ![enter image description here](http://i.stack.imgur.com/L5XJw.png)


Drawing tools to add circles, arrows, lines for QGIS?

I'm pretty new in QGIS and i'm searching a drawing tool like it is possible to find in microsoft word or excel. I search something very user friendly (for dummies!) to add circles, arrows, lines... with no need to create a new layer!! Can you help me?


Why does polygon.intersection(complex_linestring) split the linestring and mess up Z?

I have a complex (self crossing) line with Z values which I'd like to truncate to the area inside a box. The problem is Shapely splits the line into simple (non-crossing) sections and the Z value at the intersection of the loop is incorrect. My high-level goal is taking a pile of GPS tracks, trimming them to only include the area in a box and calculate speed within the box. I'm using Z to represent seconds. I suspect this problem is deep in geos. Can you suggest a better approach? I made a pretty picture of this example at http://i.stack.imgur.com/pQxtH.png but it may not work since I'm new here.               from shapely.geometry import LineString     import shapely.geometry     box = shapely.geometry.box(1, 1, 4, 5)     line = LineString([(2, 0, 0), (2, 4, 4), (3, 4, 5), (3, 3, 6), (0, 3, 9)])     [[p for p in l.coords] for l in line.intersection(box)]      results in:               [[(2.0, 1.0, 1.0), (2.0, 3.0, 5.0)],      [(2.0, 3.0, 5.0), (2.0, 4.0, 4.0), (3.0, 4.0, 5.0), (3.0, 3.0, 6.0), (2.0, 3.0, 5.0)],      [(2.0, 3.0, 5.0), (1.0, 3.0, 8.0)]]      but I was expecting only this segment:               [(2,1,1), (2,4,4), (3,4,5), (3,3,6), (1,3,8)]               shapely.__version__     '1.2.17'     shapely.geos.geos_version_string     '3.2.2-CAPI-1.6.2'


How can I use Android to add some additional data to geotiff images?

I would like to create an application which will use a geotiff image and add some additional data on it. All these with the Android Platform. I've done some research and found GDAL but I don't know if there is something else which exists? Thanks Martin


Choosing between Dynamic layers and Feature layers

I'm building a client using the ArcGIS WPF libraries, that's displaying my entities on a world map. I'm using an `ArcGISDynamicMapServiceLayer` to display the geographic and topographic base map, and I'm now wondering what's the best way to show my custom entity layer. At first, I used a `FeatureLayer` object, linked to the layer's published URL, to display the entities on the map. This worked great in that it showed the entity symbology and allowed me to interact with it (catch right-clicks, select/deselect), but it doesn't show the labels associated with the entity, just the symbology. So I tried using a second ArcGISDynamicMapServiceLayer to display the entities, which gives me data labels, but without the interactivity. So now, since these are both client requirements, I find myself using BOTH, and synchronizing visibility between the two instances of the layer, once as a FeatureLayer, and once under a dynamic layer. This is not a good practice, and bugs rear their head constantly. So my question is - what's the best way to achieve those two goals? Is there a simple way to add my own data labels on the map for each entity? There could be hundreds of them on 5-6 of these entity layers, and this feels like replicating functionality that ArcGIS already offers. On the other hand, I can simulate the right-click-on-entity behavior using a DynamicMap, catching the MouseClick event, and running a Query action on the map to find the entities clicked, but this, again, is reinventing parts of the wheel, and leaves some unsolved issues. So what would you do? How do I get those two requirements together without ugly hacks?


How to get pgrouting source and target value using openlayers 2/3?

Is there anyone can teach me how to get the pgrouting's source and target parameters in openlayers 2/3? I plan to get those parameters by click the OSM map layer. Currently, I can only get the lonlat x and y values, but my this is not exactly what I need. For those willing to help, thank you in advanced.


How to control line width in legend in QGIS?

I have a map in which I am defining the sizes of various features in map units. When I come to generate a pdf of the map, using the Print Composer, the map itself is fine, but when I include a legend then the symbol elements of the lines are represented at a totally inappropriate size (e.g. a 'Main road' symbol swamps the whole legend). I think it is the use of map units that is the cause of the problem as switching the line width to absolute units (e.g. mm) on the original map produces an appropriately sized line symbol in the legend. It seems like the legend that appears in the Print Composer is directly reflecting the way it appears in the Layer TOC - where, again, using map units produces oversized symbols relative to the map. However this is only true for lines. Point symbols rendered in map units appear exactly as I would expect in the Print Composer legend. I would be very grateful if anyone can enlighten me as to whether this is a known problem, my misunderstanding of something, or there is a solution/setting/trick that I have missed. I'm using QGIS 1.7.4 on Mac OSX 10.6. Thanks for any help. Phil


Go to X,Y dialog box

If someone gave you a x,y coordinate numbers he/she got from. I put the numbers in the X,Y events on my ArcMap and they are in Meters numbers. We entered the number into the x,y dialog box. The Arcmap display in the wrong place. I checked the bottom on the right corner and says they are in meters. I am thinking maybe that person could have gotten the numbers from Garmin GPS, or probably from the internet of that site where they went to. Is it possible that ArcMap gave the wrong events if I entered the UTM numbers ? Is it a bug or what? I would like to know from anyone who have been using it ? Thanks ! Using ArcMap 9.3.1


How to edit an ArcGIS Server WFS-T service in uDig?

Now a straight forward workflow to do this is present in the below link. http://udig.refractions.net/files/docs/uDigWalkthrough2.pdf Point 3 of page 8 states to change to the ‘Edit Geometry’ tool from the tool bar. ![enter image description here](http://i.stack.imgur.com/moJET.png) But I can’t find this anywhere in the uDig interface. ![enter image description here](http://i.stack.imgur.com/rbNBF.png) What could I be missing? Do note that the service added to uDig is a WFS-T service from ArcGIS Server and not GeoServer.


Equally sized countries?

Is there a map projection (or a more appropriate term) which allows you to see every country as an equally sized land area, but positioned approximately in the correct geographic position? Water could still be incorporated as it shows continental separation, etc.


Arcpy raster calculation producing random no data cell in output

I've been trying to get the raster calculation below to work using python:               import arcpy     from arcpy import env     import os     from arcpy.sa import *     arcpy.CheckOutExtension("spatial")          KSat_mm = "C:\\GIS\\Sat_Cond_V_mm.tif"     m = "C:\\GIS\\vG_m.tif"     env.workspace = "C:\\GIS\\WC_Dimensionless"     for raster in arcpy.ListRasters():       WC_unsat_workspace = "C:\\GIS\\WC_Unsat"       dim_m = (1/Raster(m))       WC_unsat_out = (Raster(KSat_mm) * (Raster(raster)**0.5)) * (1 - (1 - Raster(raster)**dim_m)**Raster(m))**2       WC_unsat_out.save(os.path.join(WC_unsat_workspace, raster.replace("WC_dim", "WC_unsat")))      The issue I'm having is that the output is giving me quite a few cells that are NoData when none of the input data has NoData cells in the same location. It might just be something I'm missing in the above code but any input would be helpful thank you. I'm using ArcGIS 10. All of the inputs are .tif files in a double precision format. Let me know if you need any more information. UPDATE: Ok the issue seems to be with negative values in the input datasets not sitting with the equation rather than the code itself.


How to derive Z-score values for a given field

I have a shapefile with an attribute field with a range of numerical values. I would like to derive z-score values for this field within ArcGIS. Any tips?


Exporting .tif from referenced mosaic dataset does not use functions in raster dataset

Very frustrating little issue in ArcGIS 10.1 -- I have a referenced mosaic dataset of terrain data that has a series of functions inserted (slope and several iterations of a statistics function to simplify and smooth the resulting mosaic). When I export the project to a .ai file (OR even the data as a .tif), the resulting .ai or .tif file produces my slope image WITHOUT the functions (i.e. unsmoothed). Anybody think of anything i might not have tried to make it work? Why would it display the mosaic with the functions running on the screen, but not the graphics without it?


How to get shapefile of river from OpenStreetMap?

I dont want to download whole map of an area. I just want rivers and other waterbodies present in an area in shapefiles so that I can use them in Qgis. I tried geofabrik but it is giving whole map and that also of full country while i need data of a city. Right now I am trying JOSM. will update you when it will works. A noob here.


How do I calculate acreage grouped by owner, masked by a poly?

I have statewide land ownership data and have created a mask to project ownership for only one county. I need to calculate the acreage of each owner within that county. Is there a quick way to achieve this? I'm using Arc10. Thanks for any help!


Creating donut holes without losing existing polygons using ArcGIS for Desktop?

Using ArcGIS 10.1 for Desktop is there a way to do a similar operation to creating a donut hole or island in a polygon without losing the existing features? I have mapped small lakes as several different polygons based on vegetation type. However, I want to map the vegetation surrounding the lakes, too - but if I create a circular polygon over the top of the lake and the surrounding area, it includes the area I've already mapped and given attributes to. So I want to 'cut out' a hole in the middle of the new polygon without losing the polygons that are now covered by it.


How show filter image out of feature in other color?

I am using openlayer js to filter the features display. I am trying to show the filtered imaged in other color keeping rest of feature also. Following is the code i am using for filtering:                  var a="73.84";        var b="73.89"        var filter= new OpenLayers.Filter.Logical({          type: OpenLayers.Filter.Logical.AND,        filters: [         new OpenLayers.Filter.Comparison({            type: OpenLayers.Filter.Comparison.BETWEEN,              property: "x",              lowerBoundary:a,      upperBoundary:b                 }),                 new OpenLayers.Filter.Comparison({                     type: OpenLayers.Filter.Comparison.BETWEEN,                     property: "y",                     lowerBoundary:"18.51",                     upperBoundary:"18.56"                 })]         });                   var parser = new OpenLayers.Format.Filter.v1_1_0();         var filterAsXml = parser.write(filter);         var xml = new OpenLayers.Format.XML();         var filterAsString = xml.write(filterAsXml);              allwards.params["FILTER"] = filterAsString;              allwards.redraw();      Using this code my feature is filtered but original feature are removed and only filted feature are show. I want to show original features along with filtered feature in different color. Please help me in this case.


How to use Raster Calculator in ArcGIS 9.3?

Raster Calculator tool is not available in ArcGIS 9.3 , so how to do in 9.3.??? thanks in advance


What is the problem with the polygon? Getting a *"found non-noded intersection"* exception error

I am working on a GIS program in which I needed to find the difference between the two polygons so, I decided to used NetTopologySuite (NTS) to find the difference. It seems to be working on some of the polygons and on some it is not working at all, it gives an _"found non-noded intersection"_. So, I drilled down more and found that it is not the difference function but it was the polygon which was screwing everything up. Here is the polygon which was giving exception _"found non-noded intersection"_ : > POLYGON ((51020.548917151937 215, 51025.909273225909 215, 51011.728078042863 > 215, 51009.760352395453 215, 51000.668102852258 215, 50988.318928099558 215, > 50979.498088990484 215, 50974.5448485677 215, 50969.59160814491 215, > 50963.0777577259 215, 50943.129090817689 215, 50940.482839084973 215, > 50940.482839084973 215, 50885.820734580833 215, 50862.136328915352 215, > 50840.782769521713 215, 50836.271454156857 215, 50829.654858288406 215, > 50821.008170505767 215, 50814.767517584383 215, 50803.113286225176 215, > 50779.203314791455 215, 50763.940031140366 215, 50751.308348118779 215, > 50723.714135803755 215, 50702.886896536016 215, 50677.02202177752 215, > 50659.72864621225 215, 50653.1120503438 215, 50649.954129588405 215, > 50646.495454475349 215, 50620.630579716853 215, 50588.073920500494 215, > 50574.840728763593 215, 50574.840728763593 215, 50554.915752568821 215, > 50548.223968110957 215, 50481.230934942883 215, 50474.614339074433 215, > 50425.365813008117 215, 50420.177800338533 215, 50405.440836813345 215, > 50400.252824143761 215, 50348.523074626777 215, 50333.259790975688 215, > 50317.9965073246 215, 50225.965673881583 215, 50209.424184210453 215, > 50191.228545572209 215, 50174.762244490492 215, 50126.1904157289 215, > 50126.1904157289 -100, 51020.548917151937 -100, 51020.548917151937 215, > 51020.548917151937 215)) and following is the exception which I was getting after creating the polygon in NTS: > found non-noded intersection between LINESTRING(51020.5489171519 215, > 51025.9092732259 215) and LINESTRING(51025.9092732259 215, 51011.7280780429 > 215) [ (51020.5489171519, 215, 53973.4510575744) ] Please help me figure out what is the problem with the polygon? Thank You


Installing knn on PostgreSQL for windows

I am trying to install the extension KNN for clustering as an extension on my PostgreSQL database. I have downloaded the file > http://www.pgxn.org/tag/analysis I found instructions on how to install the package on windows here > http://www.postgresonline.com/journal/archives/216-PostgreSQL-9.1-Exploring- > Extensions.html However the file i downloaded does not contain the file make or make install. Can anyone help. It doesn't need to be for this particular extension as im sure its the same for all extensions and it would be a nice bit of knowledge to have KNN is a clustering algorithm which groups data points based on their attributes into clusters or groups which are similar. My data set is a geographic data set with point information. Classic KNN doesn't treat information like latitude and longitude as spatial elements but as regular attributes (in this case numbers) The extension i am trying to install uses the logic of KNN but opens it up so that it also incorporates the spatial information i.e. where the data points are on a map of Europe to cluster the information. There are methods for doing this using Python and R but it is easiest to implement in PostgreSQL and then visualize in QGIS. An example was outlined in the thread **_Spatial clustering with PostGIS_** in these forums previously but it was for linux/unix systems and i wish to modify it so that i can incorporate it into my windows PC for my particular geographic dataset Thanks for your time


Mapinfo 10.5 and 8.5 compatibility? Unable to open TAB file

I have recently submitted some data to a client as a TAB file. They are using v8.5 and I am using v10.5, the data is just one .TAB (with the associated other files). And all the field types are character, so I thought this wouldn't be an issue. Are there any other things I may have overlooked when saving my file? Regards, Alan


How can I mosaic images in ArcMap without it affecting the colour?

This is 4 images (NE, SE, NW, SW) sections of imagery. They have some overlap between them.   * Working with 1m 3-band orthoimagery.    * Different parts are sometime flown at different times/sources hence the difference in times of the year.    * The images are in .tif format.    * Imagery properties says it's 8 bit pixel Depth and the pixel Type is unsigned integer ![enter image description here](http://i.stack.imgur.com/UrdZ6.jpg) When I mosaic them the colours change. **Looks the same as below** Number of bands = 3 Mosaic Operator = Last Mosaic Colormap Mode = Last **Looks the same as below** Mosaic Operator = Last Mosaic Colormap Mode = Match ![enter image description here](http://i.stack.imgur.com/zyeuX.jpg) Mosaic Operator = Last Mosaic Colormap Mode = First This image looks little better, features are better defined. Less Haze to. ![enter image description here](http://i.stack.imgur.com/KdzG0.jpg) How can I mosaic these images without it affecting the colour? The brightness of the image has increased.. Is there alternative software to Arcmap that merges raster's better for free? **EDIT** Images are 8 Colour bit. Updated better Mosaic image. Still using Raster Mosaic still alters the image colour. I used the Mosaic to New Raster tool. Is there a way to remove the black parts?


Polygons of Land Use Change

I am doing a project where I am digitizing a map of Haiti from the 70s. Through R2V I digitized the lines and then I exported it into ArcGIS 10. I am just interested in the land use change, therefore, I have deleted the other vectors. I want all of the land use change areas to be complete polygons. I performed through data management in the toolbox a feature class to polygon operation. This was somewhat successful. However, it did not identify all polygons. When I have complicated and nested polygons how do I get ArcGIS 10 to identify them as such? Your help would be much appreciated! Meg!


Highlighting Link in OpenLayers Map dynamically

I'm having a map which is rendered through OpenLayers using GeoServer. The map contains various attribute data field like link_no, X_coord, Y_coord etc. I want to highlight the link using link_no. I internally use WMS layer to render the map. I got the following code from this wiki for highlighting purpose:               // define a blank Vector layer and add it to the map     var highlight_style = { fillColor:'#99CCFF', strokeColor:'#3399FF', fillOpacity:0.7 };     hilites = new OpenLayers.Layer.Vector("Highlighted",                 {isBaseLayer:false, features:[], visibility:true, style:highlight_style}             );     map.addLayer(hilites);          // define the WFS server which will fill requests     var wfs_url = '/cgi-bin/mapserv?map=/maps/spraywatch2/wms/mapfile.map&SERVICE=WFS&VERSION=1.0.0';     /* highlightFeatures() makes the WFS request, then highlight_them() callback does the real work     * Args for WFS filter: typename, attribute, value     */     function highlightFeatures(typename,attribute,value) {     var wfsurl = wfs_url + '&REQUEST=getfeature&typename=' + typename +            '&Filter=<Filter><PropertyIsEqualTo><PropertyName>'+attribute+'</PropertyName><Literal>'+value+'</Literal></PropertyIsEqualTo></Filter>';     OpenLayers.loadURL(wfsurl,'',null,highlight_them);     }     function highlight_them(response) {                           // use the GML parser to turn the XML into a list of Feature objects                           var features = new OpenLayers.Format.GML().read(response.responseText);                           // have the Vector layer purge its feature list, replace them with the new ones                           hilites.destroyFeatures();                           hilites.addFeatures(features);                           hilites.setVisibility(true);                        }      Now what exactly is the typename, attribute and value parameters in the function highlightFeatures ? My aim is to highlight a particular link using a function call like this as explained in the wiki:               highlightFeatures('parcels','parcel_id','123456')      The above function call was an example given in the wiki link.


Using ESRI geoprocessing services from a non-ESRI client (Python)?

I'm thinking it should be possible to consume an ESRI Geoprocessing service from a python script without invoking ArcPy or needing an ESRI installation on the client machine. For example I create a geoprocessing service that takes a series of point location and returns a csv file with the values under them as a file. I would like to include this service call in a python client application that will be running on machines that don't have any ESRI installation. Couldn't you create the rest call to kick off the service and consume the result without arcpy? Does anyone have an example of how you might do this? Thanks, Colin


Should I use ISO 3166-1 Numeric codes as Primary Keys for Countries in a database table?

My main concern is, will one country ever adopt a numeric code that has been used for another in the past, such as can happen with alphanumeric 3166-1 codes? If not, then it seems like a perfect identifier for a primary key in a database...


So I am a programmer. What do I do to become a mapper?

I have now been rejected on 5 jobs asking for mappers on the pure basis that I am a programmer. I don't get interviews and when I ask I get response of "You are a programmer and we wanted a mapper with programming experience". I have my basics, I can use ArcMap, configure ArcSDE, understand coordinate systems. I have experience writing ESRI add-in code in ArcMap and direct code accessing the server without ArcMap. I understand how the spatial type is implemented and know how to create a matching UDT in accordance to OGC. I am familiar with the basic spatial operations. I know that I am missing some things (possibly a lot of things), but nobody wants to tell me what they are. So please tell me. Please assume some generality, I want to know what most programmers lack when compared to mappers, just listed my case to prove motive. Note: Open source GIS is coming next.


How to fix 'GEOSDifference: TopologyException'?

Why does Postgis throws an error in this SQL? Error:               ERROR:  GEOSDifference: TopologyException: found non-noded intersection between LINESTRING (-5.67027 43.5374, -5.67085 43.5376) and LINESTRING (-5.67111 43.5377, -5.6706 43.5375) at -5.6708422794605911 43.537631835802237      Query:               select st_astext(         st_difference(             st_geomfromtext('POLYGON((-5.66666 43.53301,-5.66704 43.53335,-5.66931 43.53374,-5.66975299919511 43.533380063154,-5.66979 43.53335,-5.66971 43.53478,-5.66969091189271 43.5348058613067,-5.67026768864541 43.5374211525033,-5.67084666354158 43.5376334432986,-5.67111 43.53773,-5.67059550578171 43.53754135212,-5.66854 43.53971,-5.66854 43.53971,-5.66854 43.53971,-5.66758 43.53976,-5.6665 43.5402,-5.6665 43.5402,-5.66609712188377 43.539781395014,-5.66401 43.54013,-5.66401 43.54013,-5.66351576708437 43.5392869195307,-5.66281 43.53909,-5.6626 43.53851,-5.66159162498075 43.5369268527413,-5.66131 43.53695,-5.66196 43.53617,-5.66272791899155 43.5356642562857,-5.66378432333548 43.5344801289574,-5.66384 43.53414,-5.66452 43.53344,-5.6656 43.53337,-5.66611 43.5331,-5.66666 43.53301))', 4326),             st_geomfromtext('POLYGON((-5.66577 43.53447,-5.66612 43.53455,-5.66675167677363 43.5349178897119,-5.66735 43.53529,-5.66811 43.5355,-5.66786 43.53678,-5.66816 43.53697,-5.66801 43.53717,-5.66729498033211 43.5375449497042,-5.6665 43.53782,-5.66634200990626 43.5386936730934,-5.66634 43.53876,-5.66554366174751 43.5384386684555,-5.66521 43.53856,-5.66457 43.53781,-5.6640744056249 43.5375662650614,-5.66341231504476 43.5372589777288,-5.66324 43.53718,-5.66334987968078 43.536344363177,-5.66304550704754 43.5357063513112,-5.66299 43.53559,-5.66358 43.53544,-5.66413 43.53529,-5.66521 43.535,-5.66577 43.53447,-5.66577 43.53447))', 4326)         )     );      This is a example of shapes with this problem. All share a common pattern. Some parts of edge are near to be parallel. ![example 1](http://i.stack.imgur.com/MIfpo.png) ![example 2](http://i.stack.imgur.com/7BWzU.png) ![example 3](http://i.stack.imgur.com/90XIZ.png) ![example 4](http://i.stack.imgur.com/bFoml.png) The point reported in the error is pointing to this location. In example 4, I marked this point with a circle. Versions:   * PostgreSQL 9.1.6 / x86_64   * POSTGIS 2.0.1 r9979   * GEOS 3.3.5-CAPI-1.7.5   * PROJ Rel. 4.7.1, 23 September 2009   * LIBXML 2.7.8   * Ubuntu Server 12.04.1 LTS x64 Thanks!


Viewshed Analysis With GDAL

I am looking to perform a simple (one observer location) viewshed analysis on a standard DEM using GDAL (either python or .NET bindings). I have searched, but haven't found any readily available implementation. Can anyone point me in the right direction?


What are Definition, Algorithms and Practical Solutions for Concave Hull?

### Convex Hull A convex hull of a shape is defined as: > In mathematics, the convex hull or convex envelope for a set of points X in > a real vector space V is the minimal convex set containing X (Wikipedia) Wikipedia visualizes it nicely using a rubber band analogy (image below), and there are some good algorithms to compute it. ![alt text](http://i.imgur.com/XEelc.png) ### Concave Hull A concave hull is visualized using the red line in the image below (the blue line visualizes the convex hull). Intuitively, it is a polygon which embraces all the points, but has less (minimal?) area compared to the convex hull. As a result, the polygon's boundary length is longer. A concave hull may be the solution for some real-world problems (e.g. finding the reasonable boundary of a city). ![enter image description here](http://i.stack.imgur.com/hwxSW.jpg) I have failed to find a proper definition, algorithm and practical solution for the notion of a Concave Hull. The Grass Wiki has some descriptions and images, and there is a commercial solution in concavehull.com. Any ideas, algorithms and links will be very much appreciated. Adam


How to draw polygons around known clusters

I need to split up an area into non-overlapping, but contiguous territories. I have n points on a map, which are partitioned into k sets. The partition is only partially geographic, meaning that there is no reason to believe that the points are mixed in with one another. No two points overlap each other. The problem is to draw polygons such that each polygon contains all points from one set, and excludes all points from all other sets, such that the polygons have the following properties: No two polygons overlap each other. Polygons must be contiguous. A further "nice to have" would be that the polygons minimise the proportion of the area they cover which is not within r distance units of any of the points in the set, subject to the condition that no two lines of the polygon are closer than d to each other. I can't post an image of what I'm talking about until I have reputation 10. Please let me know if what I'm asking is unclear. My question is this: Has anything like this been done before? Are there any papers I should be reading, or known algorithms I can make use of? I'm new to GIS in general, are there any suggestions on search terms I could be using to find similiar concepts? ![http://i.stack.imgur.com/2kEEG.png](http://i.stack.imgur.com/XD1dN.png)


How to extract breaklines from a given DEM?

Breaklines are very useful for describing a terrain - for example to build an exact TIN. My question is, how to extract these breaklines from a given DEM? I calculated the curvature (vertical) - raster (using arcgis 10), where you can see the breaklines (min/max-curvature), but I did not figure out how to extract them to get polylines in the end. What is the workflow to get these breaklines from a DEM? Does anyone have an idea of a workflow, or a "tool", or skript, which can help? I think I am not the first/last man who wants to perform this task:) ...in the meanwhile i have found **a paper on this topic** that seems to be a good solution, but the big question remains: how to reduce that to practice? Or has anyone a different (easier?) approach with some software?


How to speed up band math in R 'raster' package?

I have some GeoTiff rasters with over 100 bands in total, but they are not huge: resolution is about 1200x600 and total size is less than 7 mb. I'm trying to do a simple NDVI calculation:               raster <- stack('path_to_raster_1', 'path_to_raster_2')     red <- 60 # red band number     NIR <- 75 # NIR band number     f_NDVI <- function(x){       (x[NIR]-x[red])/(x[NIR]+x[red])     }     NDVI <- calc(raster, f_NDVI)      The calculation runs **extremely** slow and takes about 10 minuets. I wonder if there is a way to optimise it? And why calculation is so slow in my case?


Shooting star algorithm in postgres 8.4 and postgis1.4 showing fatal error and remaining are working fine

When I try to run this shooting star algorithm, the postgis suddenly loosing connection to postgres and showing error no connection to server               SELECT * FROM shortest_path_shooting_star('        SELECT gid AS id,            start_id::int4 AS source,            end_id::int4 AS target,            shape_leng::float8 AS cost,           x1, y1, x2, y2,           rule, to_cost        FROM viz_network',        173,        97,        false,        false);      And digkstra algorithm is working fine :               SELECT * FROM shortest_path('       SELECT gid AS id,            start_id::int4 AS source,            end_id::int4 AS target,            shape_leng::float8 AS cost       FROM viz_network',       1,       310,       false,       false);


add features to a featurelayer and save changes in the server

I am developping a web application with arcgis javascript api. I am using arcgis server 10.2. I declared a featureLayer, the URL of this featureLayer is a feature service on my server. Using a geoprocessing service, I am able to create features from the results of the service. I am able to add the features to the featureLayer I declared and show them in the map, but the problem is the changes made are not saved on the server. this is the code sample:                function displayResults(results, messages) {         var flayer = new esri.layers.FeatureLayer("http://hamri-pc:6080/arcgis/rest/services/edt/FeatureServer/0", {           mode: esri.layers.FeatureLayer.MODE_ONDEMAND,           outFields: ['*']         });           var features = results[0].value.features;         var theExtent = null;         for (var f = 0, fl = features.length; f < fl; f++) {             var feature = features[f];             var attribs = feature.attributes;                 feature.setSymbol(normalpictureMarkerSymbol);                 feature.setInfoTemplate(infoTemplate);                                 flayer.add(feature);                           flayer.applyEdits(feature,null,null);                                 map.addLayers([flayer]);             }         }      Does anyone have an idea of what should I do to save the features in the server?


Resample, ArcGIS: How do I avoid resample taking into acount NoData values?

I am trying to **Resample** a raster dataset to match the resolution of another dataset. I have fine resolution data on small islands (surrounded by NoData in the sea). When I re-sample the data to a resolution that is coarser than the island size, I lose this data. I need a way to re-sample to a coarse resolution, that takes into account the data on small islands, and not the NoData which takes up the majority of the new pixel size. Any help? David


Reading zipped ESRI BIL files with Python

I asked the question below on StackOverflow, but haven't received any feedback there yet: I have precipitation data from the PRISM Climate Group which are now offered in .bil format (ESRI BIL, I think) and I'd like to be able to read these datasets with Python. I've installed the spectral package, but the `open_image()` method returns an error:               def ReadBilFile(bil):         import spectral as sp         b = sp.open_image(bil)     ReadBilFile(r'G:\truncated\ppt\1950\PRISM_ppt_stable_4kmM2_1950_bil.bil')      `IOError: Unable to determine file type or type not supported.` The documentation for spectral clearly says that it supports BIL files, can anyone shed any light on what's happening here? I am also open to using GDAL, which supposedly supports the similar/equivalent ESRI EHdr format, but I can't find any good code snipets to get started.


Active Directory Authentication & MS SQL Server in ArcReader

I'm having difficulty with a single user (That I know of) being able to access geodatabase files in our ArcGIS Server using ArcReader. Our setup is as follows: Enterprise Geodatabase within MS SQL Server 2012, Active Directory integration within SQL Server (GIS Edit group & GIS View group), mixed environment of ArcGIS users and viewers. Every other GIS user with either ArcReader or ArcView can access the geodatabase data, but this new user I have added to the ArcView group cannot see the layers. The PMF map shows all of them as unavailable. Her ArcReader has the server connection in the proper folder to allow for OS authentication, and I even tried putting her in the edit group but she still cannot access the layers. We're running 10.2 server and she has 10.2.1 ArcReader.


QGIS Small multiples / animate across columns

I want to turn each column of a shapefile into choropleth. I have over 100 columns, so rather than manually classifying each column and exporting an image, I was wondering if there is a way to automatically produce small multiples (one map for each column) or animate through each column (one frame per column). MMQGIS does not do this, to my understanding. The columns are not time based, so TimeManager wouldn't work either. This question has been asked before (here and here) without answers. It's possible that I'm approaching the problem the wrong way too. How can I easily create many choropleths from the same shapefile with varying values?


pyshp problem with naturalearthdata-shapefile

trying to follow this example: https://code.google.com/p/pyshp/wiki/ShapeRecords entering the following code:               import shapefile     r = shapefile.Reader("ne_110m_admin_0_countries")     sr = r.shapeRecords()      gives this error-message under python 3,3 64 bit on windows 7:               Traceback (most recent call last):       File "D:\stuff\beispiel1.py", line 3, in <module>         sr = r.shapeRecords()       File "C:\Python33\lib\site-packages\shapefile.py", line 553, in shapeRecords         for rec in zip(self.shapes(), self.records())]       File "C:\Python33\lib\site-packages\shapefile.py", line 525, in records         r = self.__record()       File "C:\Python33\lib\site-packages\shapefile.py", line 501, in __record         value = u(value)       File "C:\Python33\lib\site-packages\shapefile.py", line 60, in u         return v.decode('utf-8')     UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 1: invalid continuation byte      Any ideas, what I am doing wrong (just used another shapefile from www.naturalearthdata.com) ??? **UPDATE (May, 8th. 2014)** Today I received an email from the developer of pyshp, Mr. Joel Lawhead. The problem I mentioned was a bug, which only occurs, when you use python vers 3.x . python vers. 2.x was not affected. He kindly send me a patched version, which works fine for me. He also told me, that this **new version will be released soon**.


Is there an escape option for single quotes & apostrophes in QGIS?

I'm trying to use the Data Defined symbology in QGIS ver 2.2. Some of my data has single quotes/apostrophes. Since the string must use single quotes, is there an escape option I can use for the field calculator or for the data defined settings field? So, I'm trying to use something like this:               CASE     WHEN "NAME" = 'WILSON'S' THEN '0,75,224'     END      How do you build an expression around a string that may have a single quote or apostrophe? Thanks. QGIS Valmiera 2.2 Windows 7 - 32 bit


Display one of many rasters in Web Map

I would like to interactively add a georeferenced tif to my webmap. Use case is: I have a raster catalog of georeferenced tax maps. I would like to be able to select those tax maps (there are multiple) that intersect that tax lot, then choose the tax map of my choice of those selected to display in my web application (JavaScript API). Alternatively (and more simply), I would like to be able to have one of many rasters display based on the name field of the raster catalog. Any suggestions would be useful. My raster catalog is in a published service. I am open to using mosaic datasets as well (w/ Image Service).


Point in Polygon operation for 100G of data

I have lat/lon point locations for over a billion points, all based in the US. For each point I would like to generate a dataset that links them to their county and to their MSA according to US Census Shapefiles. My question is how to do this efficiently? I have access to a research computing server, postgis, shapely and statistical software.


Unable to load shapefile as feature class into geodatabase file, with only 3 of the fields

I'm trying to automate importing census boundary shapefiles to feature class in a Geodatabase File, but somehow could not get it to work with this code:               ### ======================== load boundary map ===============================          outLocation = "C:/python/RA506Final/RA506FinalPro.gdb"     outFeatureClass = "RamBoundaryMap"     inputTable = "tl_2010_27123_tract10.shp"          if arcpy.Exists(inputTable):         # List of field headers to convert         inFields = ['FID', 'Shape', 'GEOID10']         fm= arcpy.FieldMappings()         fieldMap= arcpy.FieldMap()         for field in inFields:             fieldMap.addInputField(inputTable, field)             fm.addFieldMap(fieldMap)         #creates a fieldmap with name of input field             vars()[field] = arcpy.FieldMap()             fm.addFieldMap(vars()[field])             #fm.AddFieldMap(vars()[field])              #convert it now         arcpy.FeatureClassToFeatureClass_conversion(inputTable, outLocation, outFeatureClass,field_mapping=fm)              # Confirm Ramsey/Hennepin Boundary map shapefiles imported into Geodatabase file         x = arcpy.ListFeatureClasses("*", "polygon")         for i in x:             print i     else:         print inputTable + " does not exist"          print arcpy.GetMessage      Here is the error message: > FieldMappings: Error in adding a field map to field mappings <function > GetMessage at 0x0C4E8330>


How do I find vector line bearing in QGIS or GRASS?

How can one extract the bearings from a set of lines in a vector file? I'm trying to find the bearings of several straight vector line segments (simplified contour lines, actually) and can't figure out how to do it. The QGIS measure tool can tell me individual line bearing if I use a N/S grid overlay to provide a 0º reference, but my mouse precision is probably questionable, and doing that for every line in our sample is going to take longer than I can devote to this project. Even if there is just a way to automatically pair line end-point nodes, get the XY data, and then let excel calculate the bearings for me, I would love to know. I really like using QGIS, but am also OK with GRASS (though shaky on text interface), SAGA, and ArcGIS (but only if I really have no other choice), so if any of the programs have a clever way to do this, let me know. -Nick


Where can I get good GIS data with height profile of Malaysia?

I want to create a 3-dimensional map of Malaysia with grass, but first I need the required data. Does somebody know a good source? EDIT: s a final result, I want to make a 3-dimensional map, that you can use in a flying plane for example. NASA SRTM has a precision from about 90m (I read that on wiki). I would be very happy with a precision from about 10m. I have a Budget from about 500$ (it's a hobby project of mine), but I would prefer free data. It doens't have to be the latest or most precise data.


How to show only some labels sharpmap

I am new to Sharpmap and GIS. Going through the sample code and building simple programs for better understanding. I have a water bodies layer. I want to display only a particular river. I used CustomTheme. How to show label for only this river. To display a river (named Ganga), I have written following code.               SharpMap.Data.Providers.ShapeFile shapeFileProvider = new SharpMap.Data.Providers.ShapeFile(@"C:\water.shp", false);     SharpMap.Layers.VectorLayer waterLayer = new SharpMap.Layers.VectorLayer("Water", shapeFileProvider);          SharpMap.Rendering.Thematics.CustomTheme waterTheme = new  SharpMap.Rendering.Thematics.CustomTheme(GetWaterStyle);     waterLayer.Theme = waterTheme;     mapBox1.Map.Layers.Add(waterLayer);      The GetWaterStyle method:               private SharpMap.Styles.VectorStyle GetWaterStyle(SharpMap.Data.FeatureDataRow row)     {         SharpMap.Styles.VectorStyle style = new SharpMap.Styles.VectorStyle();         if (row["NAME"].ToString().Equals("Ganga"))         {             style.Fill = Brushes.Aqua;             return style;         }         else             return null;     }      Now I want to show a label "Ganga" (the river name) as well. How to approach? Please help. Thanks and regards, Abhi


When digitizing Lines, vertices are automatically generalized when finished feature

I am creating lines(feature class) and when the feature is finished Arcmap 10 will automatically generalize/smoothens the line. Is there any reason why this is happening? is this a bug of ArcMap 10? Any answer will be much appreciated. Thank you very much.


How to keep polygon from becoming polyline when converting polygon feature class to .dwg

Is it possible to convert a polygon feature class from a geodatabase to a CAD .dwg while keep the features as a polygon in AutoCAD? Currently the polygons appear only as polylines. I am currently using ArcGIS 10.2 and AutoCAD Map 3D 2010. The Conversion Tool - Export to CAD appears to produce the necessary point, polyline and polygon data in the ArcMap Table of Contents after the tool has run, but only the polyline appears when I try to open the .dwg file into AutoCAD Map 3D. I have attempted to convert the polygon to a variety of CAD types including DWG_R2010 and DWG_2007. The DXF and DGN files do not appear to be recognized by AutoCAD when converted. It has been several years since I have touched AutoCAD, and any hints (is it even possible?) would be greatly appreciated. Perhaps I am just not going about it in the correct manner?


Split by attribute automatically on several layers in QGIS

I need to do a 2 stage split by attribute, using QGIS 2.0.1-Dufour. After the first split, I got 30 layers. Is there any way to do the second split automatically? I don't really like the idea to make the split manually :) It would be great to select all the opened layers, and make the split by the - common - attribute with one click. The result would go in a separate directory for each layer. Thank you very much for your help!


Refresh Database automatically

I'm a new user of QGIS. I have a problem trying to update layers from a database. I have a MySQL database in a server that I add as a layer (or more than one, depends on the project) with no problem. That database changes each five minutes, and I want to update the associate/s layer/s. Now, I push the refresh buttom, but I guess that this could be done automatically, without my interference, as a programmed routine or plugin. Any have tried it? Do you know how to achieve it? Thanks in advance! Laura


How to detect burned areas from Landsat or MODIS datasets using ILWIS?

I'm trying to find a simple tutorial on how to detect and map burned areas from/with ILWIS . I use Landsat 5/7 or MODIS for detection. Any idea?


Measure Displacement in ERDAS Imagine

How do I measure the displacement between two images in ERDAS Imagine. What tool do I use? I have looked in the ERDAS field guide.


Large shapefile to raster

I have a large shapefile (1 gb) and need to rasterise it. I have tried the following already. 1.) Import it into GRASS using `v.in.ogr` this failed with the error message: ERROR: G_realloc: unable to allocate 498240036 bytes at break_polygons.c:188 2.) My second idea was to use PostGIS. Import the shapefile, resample it at the x,y location of the grid and then export these points and create a grid from xyz. I successfully imported the shapefiles (polygons and points) but intersecting 1 million polygons with 300k points seems to be very slow. I used the following PostGIS satement, maybe there is room for improvement.               select polygons.land_id,grid.geom from grid,polygons where grid.geom && polygons.geom and within(grid.geom,polygons.geom)      3.) I did also try to use `simplify()` in PostGIS. But I lost to many small polygons (i.e. some areas that were covered only with small polygons became null). Any ideas would be greatly appreciated.


Locating Wlan accesspoints-how?

Having a Netbook I would like to map routers geographically-how? Starting from scratch. Thanks a lot for your suggestions!


Converting GPX track_points layer to CSV with lat/lng with ogr2ogr

What's the correct command to convert a GPX track_points layer to CSV **with** lat/lng coordinates using ogr2ogr?


UnicodeDecodeError: While installing gdal in a new Python Virtual Environment

I was trying to create a Python Virtual Environment for some initial GIS development. I installed `pip` and `virtualenv` and then tried the following commands from the Linux-Terminal to accomplish the task               $ cd Test/virtualenvs_for_test     $ virtualenv --no-site-packages postgis-cb-env     $ source postgis-cb-env/bin/activate     $ pip install gdal      * * * But found the following error message: > error: **command 'gcc' failed with exit status 1** > > Cleaning up... Command /home/gislinux/Test/virtualenvs/postgis-cb- > env/bin/python -c "import setuptools, tokenize; **file** > ='/home/gislinux/Test/virtualenvs/postgis-cb- > env/build/gdal/setup.py';exec(compile(getattr(tokenize, 'open', open)( > **file** ).read().replace('\r\n', '\n'), **file** , 'exec'))" install > --record /tmp/pip-h8eZSu-record/install-record.txt --single-version- > externally-managed --compile --install-headers > /home/gislinux/Test/virtualenvs/postgis-cb-env/include/site/python2.7 failed > with error code 1 in /home/gislinux/Test/virtualenvs/postgis-cb- > env/build/gdal Traceback (most recent call last): File > "/home/gislinux/Test/virtualenvs/postgis-cb-env/bin/pip", line 11, in > sys.exit(main()) File "/home/gislinux/Test/virtualenvs/postgis-cb- > env/local/lib/python2.7/site-packages/pip/ **init**.py", line 185, in main > return command.main(cmd_args) File "/home/gislinux/Test/virtualenvs/postgis- > cb-env/local/lib/python2.7/site-packages/pip/basecommand.py", line 161, in > main text = '\n'.join(complete_log) **UnicodeDecodeError: 'ascii' codec > can't decode byte 0xe2 in position 42: ordinal not in range(128)** I have no sure idea what this error is exactly. Although initial web-hunting suggested a need to change encoding from `ascii` to `utf8`, but how?


Is there a way to save images with none stretching in ArcGIS

I have some satellite images, when I imported these in ArcGIS and went to properties and then symbology tab, I saw stretch type was set to standard deviation. I want to save these images with no stretch as I import these images into ArcMap, to display the images without stretching , how can I do so?


Geoserver layer group problem!

I seem to be having a problem previewing a layer group in geoserver. I have 3 shapefiles that i converted from a dxf and i can preview each successfully however when i try to preview the layer group nothing appears apart from the open layers border and nav controls. Any ideas? Thanks in advance


How to Read a Shapefile using C#?

I am new to ArcGIS and trying a few things..   1. I'm trying to read shape file(which is supply as an input) using c# and   2. I want to generate a .pdf file which contains underlying metadata information (similar to the Identify tool) ? Thanks in advance.


Why don't some layers line up afer converting Mapinfo TAB to Shapefile?

I have 6 MapInfo layers / TAB files which I need to convert to ESRI ShapeFiles, preferably using QGIS. When a colleague opens these in MapInfo 10, they all look fine and line up correctly. When I open them in QGIS, however, some layers are at completely different X / Y coordinates, and are tiny when compared to other layers. When my colleague uses the universal translater in MapInfo 10 it creates all the shape files (it actually creates more, there are polyline, rectangle, region and ellipse files), but again when I open up the resulting shape files in QGIS (I click on "user defined projection" during opening) it has the same result. In MapInfo under Map -> Options -> Projection I can see the projection as "Longitude / Latitude". Any ideas how I can export all my MapInfo layers to ESRI shape files, and retain their shape / size and location? I can get access to MapInfo 10 if changes in the source TAB files are required. Thanks in advance, really stuck on this one! Dominik EDIT: I know the process to convert MapInfo to ShapeFiles, and have tried this both in QGIS and MapInfo 10. The problem remains, no matter which application I use to make the conversion, there are problematic layers which are not in the correct location, and are tiny compared to the source layers. If someone has some insight as to how to see the projection for each TAB file, and how to change it that would be the starting point, I guess. This is NOT a question on how to convert from one format to the other!


Method to find "if map data is available or not"

I am using Arcgis javascript api 3.2. I use the mapservice,                https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer.       I realized that map data is not available when the scale(slider) is zoomed to the fullest at certain places on the map. Is there a method to find out if map data is available or not? Could you please share the steps in doing so.


heat map / density map from dynamic points table in mapserver?

how can i create a heat map (some would call a density map) from a points layer in mapserver? (preferably able to choose interpolation method, NN, IDW, etc and color map with a transparent color) the points are stored in postgis table and the table is dynamic, meaning i need to create the heat map on the fly. thanks allot!


How to draw lines originating from a point for a given angle and length in attribute table of point layer

I have a set of points from which i want to draw lines , the point layer has information about the angle and length of the line to be drawn. This point layer is generated from a polygon layer as a result of Directional distribution ellipse tool of ArcGIS. Now i want to draw lines originating from the point layer which will divide the ellipse into 4 equal parts. any ideas on which tool to use or how do i do it?


problems setting up postgis and importing data

Using Postgres 9.2.3.1 on a new Mac. I installed Postgres from the dmg file that I downloaded from the Postgres site. I then installed PostGIS using stackbuilder. This all worked flawlessly so far as I can tell. I have tweaked the pg_hba.conf file to trust connections from local and localhost and created a database "db". Then I tried::               Mac-mini:pg postgres$ bin/createlang plpgsql db     createlang: language "plpgsql" is already installed in database "db"      so it would appear that postgres knows all about postgis. When I tried:               Mac-mini:pg postgres$ bin/shp2pgsql -c ~rful011/tmp/weed_boundaries weed_plot_boundaries | psql db     Shapefile type: Arc     Postgis type: MULTILINESTRING[2]     SET     SET     BEGIN     NOTICE:  CREATE TABLE will create implicit sequence "weed_plot_boundaries_gid_seq" for serial column "weed_plot_boundaries.gid"     CREATE TABLE     NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create implicit index "weed_plot_boundaries_pkey" for table "weed_plot_boundaries"     ALTER TABLE     ERROR:  function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist     LINE 1: SELECT AddGeometryColumn('','weed_plot_boundaries','geom','0...                    ^      I must have missed something but what? Thanks, Russell


Is it possible pull multiple documents out of a geodatabase?

I am working on a sliverlight application in which a municipality will be able to view multiple assets for a water treatment plant within a GIS. Within this application, the user will be able to pull up linked documents such as operations and maintenance docs, record drawings, photos, vendor info, etc. Is there a way to export multiple documents at once (say into a zip file onto a local drive)? All documents are stored in a geodatabase, and I have researched the "Attachments" geoprocessing tools, but that is more for adding/removing multiple records, not extracting multiple records into a zip file.