title: Change data source path in .LYR files in Arcgis 10

text: How can one change the source data paths for every layer file in folder X using arcpy? I've followed Updating and fixing data sources with arcpy.mapping as best I can, yet all I get is an unhelpful `Runtime error <type 'exceptions.ValueError'>: Layer: Unexpected error` which doesn't tell me enough to troubleshoot what's wrong or missing. Heres the code (simplified to test a single layer file):               import arcpy, os          fname = r'K:\Layers\xxx.lyr'     lyr = arcpy.mapping.Layer(fname)     oldpath = lyr.workspacePath     print 'oldpath: ', oldpath     lyr.findAndReplaceWorkspacePath(oldpath, r'C:\some\other.gdb')     print 'newpath: ', lyr.workspacePath      and the results:               oldpath:  K:\Canvec_Utility\Temp.gdb     Traceback (most recent call last):       File "x10x.py", line 12, in <module>         lyr.findAndReplaceWorkspacePath(oldpath, r'C:\some\other.gdb')       File "C:\ESRI\ArcGIS\Desktop10.0\arcpy\arcpy\utils.py", line 181, in fn_         return fn(*args, **kw)       File "C:\ESRI\ArcGIS\Desktop10.0\arcpy\arcpy\_mapping.py", line 601, in findAndReplaceWorkspacePath         return convertArcObjectToPythonObject(self._arc_object.findAndReplaceWorkspacePath(*gp_fixargs((find_workspace_path, replace_workspace_path, validate), True     )))     ValueError: Layer: Unexpected error      _((moved 'update' section into an answer))_


title: Arcmap and attribute table

text: I am wondering how you can save multiple data for one point feature in ArcMap? For example, I have a shape-file with point features, the data that needs to be included for each point feature consists of different years (2007, 2008, 2009 and 2010). Each year includes data such as total number of students, enrollments, est. How can I save this data in arcMap for each specific point feature? I need to be able to save all data for individual point features, from which I can load into Geoserver, and when a point feature is selected in OpenLayers (Geoserver), all the (yearly) data will be displayed. So far I have tried joining the data in arcmap, but when served up in GeoServer, only the year 2007 is displayed when a point feature is selected, and the rest of the years are not displayed (happens for all point features).


title: row.getValue() doesn't work but row[1] does

text: for some reason I can't get row.getValue to work properly... my script will only work if I use row[0] and get the value manually but I am sure the location/order of my fields will change from dataset to dataset. This works:                   mylist = []         with arcpy.da.UpdateCursor(FC, "*") as cursor:             for row in cursor:                 if row[12] == value:                     mylist.append(row[2])      However this does not...                   fieldname = "Coolfield"         mylist = []         with arcpy.da.UpdateCursor(FC, "*") as cursor:             for row in cursor:                 if row.getValue(fieldname) == value:                     mylist.append(row[2])      Any ideas? Thanks!!!


title: Question on Pictometry ImageNavigator API

text: I am working with Pictometry IMageNavigator API. I have created a simple JavaScript and ASP .NET web application as per instructions given at http://dev.pictometry.com/imageNavigator/doc/GettingStarted.html. However in both applications I am getting an error, "this.HitSetRegion.Y is null or not defined". I am looking for some directions to resolve this. Basically I would be passing Latitude and Longitude values as a URL parameter to this application. But right now I am hard coding the coordinates. Any help is greatly appreciated!! Thanks.


title: Qgis 2.2 error plugin manager/installer error

text: I get this error at startup               Ocurrió un error durante la ejecución del siguiente código:     import pyplugin_installer          Traceback (most recent call last):       File "", line 1, in        File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 217, in startPlugin         msg = QCoreApplication.translate("Python", "%s due an error when calling its initGui() method" ) % errMsg     ValueError: unsupported format character ' ' (0x20) at index 2          Versión de Python:     2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]          Versión de QGIS:     2.2.0-Valmiera 'Valmiera', c3a2817          Ruta de Python:     ['C:/OSGEO4~1/apps/qgis/./python', u'C:/Users/Ing. Juan Bernnales/.qgis2/python', u'C:/Users/Ing. Juan Bernnales/.qgis2/python/plugins', 'C:/OSGEO4~1/apps/qgis/./python/plugins', 'C:\\OSGEO4~1\\bin\\python27.zip', 'C:\\OSGEO4~1\\apps\\Python27\\DLLs', 'C:\\OSGEO4~1\\apps\\Python27\\lib', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\plat-win', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\lib-tk', 'C:\\OSGEO4~1\\bin', 'C:\\OSGEO4~1\\apps\\Python27', 'C:\\OSGEO4~1\\apps\\Python27\\lib\\site-packages', 'C:\\Users\\Ing. Juan Bernnales\\.qgis2\\python\\plugins\\fTools\\tools']


title: How to group numbers based on first digits and then find min/max?

text: I have been struggling all day with this. I wish Python were more like SQL it would be so easy for me, but I am still learning. Basically, I just want to group numbers based on their first four digits, and then find the min and max of those numbers for each group. Consider a dataset of doubles: [VALUES] 11112222 11113333 11114444 55556666 55557777 55558888 and the result I want is like this: for all numbers begining with 1111, the minimum value is 11112222 and the maximum value is 11114444 for all numbers begining with 5555, the minimum value is 55556666 and the maximum value is 55558888 I have considered making a layer in ArcMap from my featureclass and using SQL to select from there, but I just can't figure out the query it never seems to work. I've spent most of my time trying a searchcursor, but that is not working out very well for me either as I can't seem to use where clauses correctly. Is there anyway I can just bring in the data as a list or dictionary or something and perform everything from there? Or anything simpler? I wish dealing with file geodatabase tables was more like working in MySQL...


title: how to make a layertree with multple nested nodes?

text: On a previous question I asked how to get two levels on a layermanager. The response provided there was what I was needing at that moment. Now, I´ll like to create a little more complex structure in the layer tree. The expected structure is something like:               |overlays|     |        |layer1     |        |layer2     |Group1     |      |layer3     |      |layer4     |      |Subroup1     |      |        |layer5     |      |        |layer6     |      |     |      |Subroup2     |              |layer7     |              |layer8     |background     |          |layer9     |          |layer10      I found a post here doing something similar but to be honest I don’t understand the code, and don’t know how to integrate it into my own code to use it with the suite-sdk. Any help would be appreciated * * *


title: Parsing file didnt appear in textBrowser

text: I make QGIS plugin to parsing xml and show parsed file in textBrowser, however when i run the plugin, its still blank ( nothing happend ) and i didn't get error messsage when run it, this is the full code i use :               from PyQt4 import QtCore, QtGui     from ui_testparse import Ui_testparse     import xml.etree.ElementTree as ETree     # create the dialog for zoom to point               class testparseDialog(QtGui.QDialog):         def __init__(self):             QtGui.QDialog.__init__(self)             # Set up the user interface from Designer.             self.ui = Ui_testparse()             self.ui.setupUi(self)                  opendata = self.ui.btnCari             QtCore.QObject.connect(opendata, QtCore.SIGNAL('clicked()'),self.openxml)             bacadata = self.ui.btnBaca             QtCore.QObject.connect(bacadata, QtCore.SIGNAL('clicked()'),self.bacadonk)                   def openxml(self, event=None):                  #open dialog             openfile = QtGui.QFileDialog.getOpenFileName(self, 'Open File', '*.xml')                  self.ui.lineLokasi.setText(openfile)                  #call XML data             self.isiData(openfile)             self.parsenow(openfile)              def isiData(self, nmsatu):             #open teks with read mode             openteks = open(nmsatu, 'r').read()                  self.ui.textXml.setText(openteks)                  #Parse XML from Above             #self.parsenow(openteks)              def parsenow(self, parsexml):                  try:                 register_namespace = ETree.register_namespace             except AttributeError:                 def register_namespace(prefix, uri):                     ETree._namespace_map[uri] = prefix             #register_namespace('gco', 'http://www.isotc211.org/2005/gco')                  tree = ETree.parse(parsexml)             root = tree.getroot()                  #for elem in root.iter(tag='{http://www.isotc211.org/2005/gco}Date'):             for elem in root.iter(tag='{http://www.isotc211.org/2005/gmd}MD_SpatialRepresentationTypeCode'):                 item = elem.text             for elem2 in root.iter(tag='{http://www.isotc211.org/2005/gco}Date'):                 item2 = elem2.text                  self.ui.lineSkala.setText(str(item))             self.ui.lineFitur.setText(str(item2))                   def haiii(self, infok):             fole = open(infok, 'w' )             fole.write( 'Input 1 :' + "%s" % self.ui.lineSkala.text() )             fole.write( 'Input 2 :' + "%s" % self.ui.lineFitur.text() )             fole.close()              def bacadonk(self, kofni):             endi = open(infok, 'r').read()                 self.ui.textRangkum(endi)      I am a really novice in python so i dont know what i must to do can someone here help me?


title: Iterative point feature removal based on Thiessen polygon values

text: The background is: I have point feature class and Thiessen polygons created based on it. I wanted to know for each point Thiessen polygon area value, so I have calculated Thiessen polygon area value and added this information to point class. I have also sorted points based on Thiessen polygon areas in descending order, so the first point in a table has the biggest Thiesssen polygon area. The task is to remove first point with the biggest Thiessen area, then rebuild Thiessen polygons (without deleted point), update Thiessen areas for points, sort them again, check first on the list, remove it and so on until the number of points that left is equal to some fixed number. I am working in ArcGIS 10.1 and I am using ModelBuilder. Do you think I can achieve something like this in ModelBuilder? How for example take the first point on the list?Or the point with max attribute value?And which tools should I use for iteration/loop?


title: Special background layer not coloring in Kartograph map

text: I'm testing out Kartograph according to the documentation and a linked gist. Both my US and non-US layers color correctly, but I can not get the special "sea" layer to fill. I found an example here where similar syntax is filling, so I don't imagine it's a kartograph problem. I also used the second "special" kartograph layer, graticules, to see whether it had anything to do with special layers. These displayed fine, so I think I can rule out specialness, too. ![The sea isn't green](http://i.stack.imgur.com/KxnSm.png) Am I defining the attribute or calling the layer incorrectly? File: world.json               {        "layers": {          "background": {"special": "sea", "fill": "#ff0000"},           "land": { "src": "ne_110m_admin_0_countries_lakes.shp"},           "the_us": { "src": "ne_110m_admin_1_states_provinces_lakes_shp.shp"},           "mygraticule" : { "special": "graticule", "latitudes": 5, "longitudes": 5}              },     "bounds": {         "mode": "bbox",          "data": [-150, 18, -50, 80]               }     }      File: world.css               #background {         fill: lightgreen;         background-color: lightgreen;     }          #land {         fill: #f1f1f1;         opacity: 0.5;     }          #the_us {         fill: #c1c1c1;         opacity: 0.5;     }          #sea {         fill: lightgreen;     }      Run with `kartograph -s world.css world.json -o world.svg`


title: I want to import an Excel spread sheet with desc, northing and easting into Google Earth to make a KMZ

text: I have a spread sheet with three columns containing a Description, a Northing and an Easting in UTM. Instead of entering the points in by hand, I want to find a faster method. Any help is greatly appreciated. Cheers


title: How to rotate (svg) symbols in QGIS map composer to match map rotation?

text: Because of my thesis layout requirements, I have to rotate 270° some of my maps in composer.   There are (many) svg smbols (icons), and they are rotated as well.   I would like to (non-)rotate them in order to keep them upright, so one doesn't have to continuosly rotate the page or the neck ;)   Is there a way to do that? Note that I would like to do it on the composer stage since some of my maps are normally placed north-south. Thanks for the attention!


title: Hillshade for 30m NED at continental scale

text: I'm new to terrain analysis. I have a 30m NED DEM (.tif) for the conterminous US. I would like to generate a nice looking hillshade for the US, but it looks bad - as in pixelated and rough (See image). I have tried different classification schemes and number of classes, which helps some, but not enough. I have tried majority filter, but the output looks exactly the same. Is there some sort of smoothing function that should be applied for this scale? Any suggestions much appreciated. Edit: Using ArcMap 10.1, projected w/ NAD83 Albers Edit 2: The hillshade could use more "depth", but looks good for now (image 2). ![Raw hillshade - looks rough on screen at this scale](http://i.stack.imgur.com/W8xkJ.png) ![The finished map, I'm happy with so far. Looks much better printed out as high res image, like .tiff. I may smooth out the coastal vignette area.](http://i.stack.imgur.com/Ey8bz.jpg)


title: when to choose mapscript over mapfile or vice versa?

text: Are there things that can be done with mapscript and not mapfile or vice versa? what are the scenarios to use each one? thanks allot!


title: GeoDjango Admin: Adding PointField latitude and longitude to other fields

text: I've been redesigning my application to allow users to set markers more easily. One thing I need to include for backwards compatibility purposes is that the new model must have a latitude and longitude field in the database. Is it possible to modify the GeoDjango admin so that the latitude/longitude fields automatically populate after I select a point on the map? Here's a screenshot of how my admin is currently: ![admin image](http://i.stack.imgur.com/BSTCM.png)


title: Multi-Band (RGBA) into single band raster

text: I have the raster which contains 4 bands (RGBA), which ilustrates the pupulation (traffic) density. I want to convert it to the simple gridded ascii, however I'm getting in the trouble when I try the export it to the different formats. I suppose it comes from multi-band property of this map, therefore: ## **Is there any way I can convert from RGBA to single value representing the data I need ?** E.g. when I want to convert using RGB2PCT: > ERROR 1: TIFFOpen:traffic_przyciety2: Permission denied Traceback (most > recent call last): File "C:\PROGRA~2\Quantum GIS Lisboa\bin\rgb2pct.py", > line 136, in tif_ds.GetRasterBand(1).SetRasterColorTable( ct ) > AttributeError: 'NoneType' object has no attribute 'GetRasterBand' BTW: AttributeError: 'NoneType' error is dropped in other functions as well when I want to do something on this map Info about the map: > Band 1 Block=903x1 Type=Byte, ColorInterp=Undefined Min=0.000 Max=255.000 > Minimum=0.000, Maximum=255.000, Mean=254.667, StdDev=9.206 Band 2 > Block=903x1 Type=Byte, ColorInterp=Undefined   >  Min=0.000 Max=124.000 Minimum=0.000, Maximum=124.000, Mean=119.886, > StdDev=7.547 Band 3 Block=903x1 Type=Byte, ColorInterp=Undefined   >  Min=0.000 Max=0.000 Minimum=0.000, Maximum=0.000, Mean=0.000, StdDev=0.000 > Band 4 Block=903x1 Type=Byte, ColorInterp=Undefined   >  Min=0.000 Max=255.000 Minimum=0.000, Maximum=255.000, Mean=217.937, > StdDev=67.026' **Alternatively, do you know if there's any standard interpretation of the geodata maps ?** E.g. if the resulting pixel value may be obtained by specific operation on the bands ? Thanks for the answers BR Krzysztof


title: Is it possible to integrate the mapping capabilities of QGIS with Stata?

text: I was wondering of the possibility of integrating the mapping capabilities of Q-GIS with Stata, by using the programming aspect of Stata as opposed to using R or python. Is this possible?


title: how can use a offline basemap?

text: My app needs to work in offline way because we have problems with signal internet 3G and can't downloading images from our servers. Somebody know how can do it ? Now I'm using API Arcgis JS 3.1 and my basemap is               var basemap = new esri.layers.OpenStreetMapLayer();      I'm trying to install a OpenStreetMap local server in Ubuntu VM. I will check it. if somebody has some ideas, please I appreciate in advance..


title: Optimize ArcServer Service Drawing Speed

text: I am managing an ArcGIS service that is used by Geocortex Essentials as a web map app for some users. The feedback I have got so far is that it doesn't refresh fast enough. I'm looking for some answers to these questions:   1. Do labels with a mask on them draw slower?   2. What point symbol draws faster: Character or Simple?   3. Does having a label only draw in its polygon result in slower labelling?


title: Want a transformation box after a user draws a polygon

text: I have built an application which allows users to draw a polygon inside another polygon. The two polygons are in different layers for some application specific reasons. After the user draws a polygon, layer.events.register function is invoked to check if the polygon lies entirely inside the larger polygon. Now I want to modify the application and I have the following questions: Q1) How can I add a transformation box to the polygon that is drawn by the user? I want the user to be able to rotate or scale the polygon after it is drawn. Q2) How can I check that after the transformation(rotation or scaling) the polygon will still be inside the larger polygon? ** The polygon drawn by the user is in fact a rectangle inside another rectangle. I have pasted some code below. Note that the layer named "BaseLayer" is where the user generated rectangles are added.               var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;     var baseLayer = new OpenLayers.Layer.Vector("BaseLayer", {                 styleMap: new OpenLayers.StyleMap({                     "transform": new OpenLayers.Style({                         display:"${getDisplay}",                         cursor: "${role}",                         pointRadius: 3,                         fillColor: "white",                         fillOpacity: 1,                         strokeColor: "black"                         },{                      context:{                         getDisplay: function(feature){                             return feature.attributes.role === "se-resive" ? "none": "";                             }                         }                     })                 }),                 renderers: renderer     });          var transformControl = new OpenLayers.Control.TransformFeature(baseLayer, {                     renderIntent: "transform",                     rotationHandleSymbolizer: "rotate"     });     var drawPolygonFeature = new OpenLayers.Control.DrawFeature(baseLayer, OpenLayers.Handler.RegularPolygon,                 {'displayClass':'olControlDrawFeaturePolygon',                      handlerOptions:{sides: 4,                       irregular:true,                      style: polygonStyle,                      id: "processingPolygon"                      }                 });     baseLayer.events.register("featureadded", feature, function(evt){         // DOES SOME ERROR CHECKING HERE.        //  transformControl.setFeature(evt.feature);     });      What I've tried so far: I tried adding the transformation box to the feature inside the events.register() function (second last line in the code above) using the control.setFeature function, however this did not work. Adding a transformation box also invokes the events.register function which adds another transformation box and as a result invoking the events.register() again. This results in an infinite loop! Any help is greatly appreciated. Thanks! Edit: Here is an example of the type of transformation box I want: http://openlayers.org/dev/examples/transform-feature.html


title: Polygon from line creation problem

text: I have a problem transforming a linestring into a polygon. The error is: > ERROR: lwpoly_from_lwlines: shell must be closed So I checked but firstpoint and endpoint are the same. I tried to use `ST_makevalid` and `ST_RemoveRepeatedPoints` but the problem was still there. I finally found a workaround: I transform the geometry into text via `st_astext` and then I use `st_geomfromtext` and it works. Does anyone undestand why I have to use this trick to transform my linestring into a polygon ? You can make the test yourself:               select st_makepolygon('0102000020B46B00007D000000D89E591A2DD4284123D92354DF65F44013622E214AD42841E1B4E005AD65F4407A6EA1134AD42841F65E7C11AB65F440075C578C5CD4284157B4390E8B65F440043BFE335CD428412FC1A94F7E65F4405DA450CE5DD42841ED478A887B65F44040BD19E55DD42841C826F9D17E65F44040BD19E55DD42841C826F9D17E65F440C4500A195ED4284122D6BF8D7E65F4403BC8714D5ED42841EDF256667E65F440D14610825ED428410984EE5B7E65F440A3ACA5B65ED428417C38936E7E65F440E5E4F1EA5ED42841FE572E9E7E65F440F733B51E5FD42841A9DE85EA7E65F4401485B0515FD42841ACC33C537F65F4402EB7A5835FD42841AD6AD3D77F65F440A7E857B45FD42841483FA8778065F44082C18BE35FD42841FF79F8318165F440B4BB071160D42841900DE1058265F4404169943C60D42841B1BB5FF28265F440C3B7FC6560D42841BD4F54F68365F4401C310E8D60D42841F2FD81108565F440F43899B160D4284181E5903F8665F440BE4671D360D428419EB30F828765F440F91B6DF260D42841966575D68865F4407DF6660E61D42841C027233B8A65F44075BE3C2761D42841034F66AE8B65F440EE2FD03C61D428418E6A7A2E8D65F440BFFF064F61D42841396B8BB98E65F4408AFBCA5D61D42841E5DDB74D9065F440D1240A6961D428413B3613E99165F440E0C6B67061D42841E926A8899365F4408087C77461D428418A047B2D9565F4406172377561D4284157308CD29665F4401EFF057261D42841A087DA769865F440D76CE53D62D4284147AE9B129965F4403C855CA162D42841EB8B84369565F440BE839F9063D42841A41AF63B9B65F440944F8F2D60D42841A9BF5EE1BC65F4409F724C3E5FD42841F030EDDBB665F440B8B1D9A15FD4284192E7FAFEB265F44010035D635FD42841A0FEB3E6AC65F44010035D635FD428419FFEB3E6AC65F440473EFB305FD42841E25FBE58AD65F4409E88BDFD5ED42841E053DEAEAD65F44022ADE1C95ED4284149FEABE8AD65F4409835A6955ED4284126AAE105AE65F440111F4A615ED42841E81D5C06AE65F440F68D0C2D5ED42841E4C51AEAAD65F440E0812CF95DD4284104B53FB1AD65F440A289E8C55DD42841B07B0F5CAD65F440D6777E935DD4284120D5F0EAAC65F44051182B625DD42841772B6C5EAC65F440D1E629325DD4284143F32AB7AB65F44042C7B4035DD4284121DFF6F5AA65F440ECBF03D75CD4284183ECB81BAA65F440E9B54CAC5CD42841BB4A7829A965F4401F2CC3835CD428418F1D5920A865F4402605985D5CD42841F71C9B01A765F4405648F9395CD42841881398CEA565F4404F4013C14AD4284144F98216C465F440446E86B34AD42841EA961D22C265F440B2F336A62DD42841A0F99C7BF465F440B2F336A62DD42841A0F99C7BF465F440E87F7A942DD428413BE2D89CF565F440DF6451802DD42841B01EBBB3F665F44031ABD3692DD428415E39F7BEF765F440B0221C512DD42841AD9F4EBDF865F440784248362DD42841CD1D92ADF965F440C70578192DD428413048A38EFA65F440E4C5CDFA2CD42841F7D0755FFB65F44024116EDA2CD42841CCC7101FFC65F440617F7FB82CD42841A5C28FCCFC65F440EC832A952CD4284113EE2367FD65F4405E3D99702CD42841C90315EEFD65F4405E43F74A2CD428415126C260FE65F440A77271242CD42841CEA0A2BEFE65F44094B735FD2BD42841F0894607FF65F4405AD772D52BD428416449573AFF65F440493858AD2BD428410AFF9757FF65F4404EA915852BD4284188CBE55EFF65F440EF28DB5C2BD42841DEF93750FF65F44019ACD8342BD42841C609A02BFF65F440F1E43D0D2BD42841D79A49F1FE65F440FD093AE62AD4284186387AA1FE65F440D69DFBBF2AD428413B07913CFE65F440B937B09A2AD42841E95206C3FD65F4402C4D84762AD42841A7FF6A35FD65F44003FDA2532AD42841F0DC6794FC65F440EFDB35322AD428416ADCBCE0FB65F440F8C264122AD42841172D401BFB65F440BE89211129D42841FEEDB25FFC65F4405C76880F29D428414D81CC0EFC65F4401C7C61AA28D428411904568EFC65F440103FFF3528D428411D57237BE565F440C217269B28D42841E3C798FBE465F440F3C98A9928D4284188B9A4AAE465F44032C9C89129D42841E3DD9171E365F44032C9C89129D42841E4DD9171E365F440086EA1A729D4284126998763E265F4406683B9BF29D42841C4650462E165F4402267F4D929D428410D4B3A6EE065F4403EED32F629D4284156014B89DF65F440F48453142AD42841AC9946B4DE65F440996032342AD42841833A2AF0DD65F4402DA0A9552AD42841DCF2DE3DDD65F440577E91782AD4284150A5389EDC65F440AE7FC09C2AD428413E0CF511DC65F44006A40BC22AD4284155D8BA99DB65F440849946E82AD428417BEA1836DB65F44051F1430F2BD4284100AA85E7DA65F4409055D5362BD42841E7775EAEDA65F44077C0CB5E2BD42841F33FE78ADA65F4402AB4F7862BD42841E6274A7DDA65F440317329AF2BD42841725D9785DA65F4402E3931D72BD42841FE02C5A3DA65F440A673DFFE2BD428415B3BAFD7DA65F4408AFA04262CD4284167541821DB65F4403C48734C2CD428415F10A97FDB65F440E0B0FC712CD42841890DF1F2DB65F4409C9874962CD42841C54B677ADC65F440A1A8AFB92CD428415DCF6A15DD65F440A70284DB2CD42841526043C3DD65F440B272C9FB2CD428414C652283DE65F440D89E591A2DD4284121D92354DF65F440');      From binary to text and back:               select st_makepolygon(st_geomfromtext(st_astext('0102000020B46B00007D000000D89E591A2DD4284123D92354DF65F44013622E214AD42841E1B4E005AD65F4407A6EA1134AD42841F65E7C11AB65F440075C578C5CD4284157B4390E8B65F440043BFE335CD428412FC1A94F7E65F4405DA450CE5DD42841ED478A887B65F44040BD19E55DD42841C826F9D17E65F44040BD19E55DD42841C826F9D17E65F440C4500A195ED4284122D6BF8D7E65F4403BC8714D5ED42841EDF256667E65F440D14610825ED428410984EE5B7E65F440A3ACA5B65ED428417C38936E7E65F440E5E4F1EA5ED42841FE572E9E7E65F440F733B51E5FD42841A9DE85EA7E65F4401485B0515FD42841ACC33C537F65F4402EB7A5835FD42841AD6AD3D77F65F440A7E857B45FD42841483FA8778065F44082C18BE35FD42841FF79F8318165F440B4BB071160D42841900DE1058265F4404169943C60D42841B1BB5FF28265F440C3B7FC6560D42841BD4F54F68365F4401C310E8D60D42841F2FD81108565F440F43899B160D4284181E5903F8665F440BE4671D360D428419EB30F828765F440F91B6DF260D42841966575D68865F4407DF6660E61D42841C027233B8A65F44075BE3C2761D42841034F66AE8B65F440EE2FD03C61D428418E6A7A2E8D65F440BFFF064F61D42841396B8BB98E65F4408AFBCA5D61D42841E5DDB74D9065F440D1240A6961D428413B3613E99165F440E0C6B67061D42841E926A8899365F4408087C77461D428418A047B2D9565F4406172377561D4284157308CD29665F4401EFF057261D42841A087DA769865F440D76CE53D62D4284147AE9B129965F4403C855CA162D42841EB8B84369565F440BE839F9063D42841A41AF63B9B65F440944F8F2D60D42841A9BF5EE1BC65F4409F724C3E5FD42841F030EDDBB665F440B8B1D9A15FD4284192E7FAFEB265F44010035D635FD42841A0FEB3E6AC65F44010035D635FD428419FFEB3E6AC65F440473EFB305FD42841E25FBE58AD65F4409E88BDFD5ED42841E053DEAEAD65F44022ADE1C95ED4284149FEABE8AD65F4409835A6955ED4284126AAE105AE65F440111F4A615ED42841E81D5C06AE65F440F68D0C2D5ED42841E4C51AEAAD65F440E0812CF95DD4284104B53FB1AD65F440A289E8C55DD42841B07B0F5CAD65F440D6777E935DD4284120D5F0EAAC65F44051182B625DD42841772B6C5EAC65F440D1E629325DD4284143F32AB7AB65F44042C7B4035DD4284121DFF6F5AA65F440ECBF03D75CD4284183ECB81BAA65F440E9B54CAC5CD42841BB4A7829A965F4401F2CC3835CD428418F1D5920A865F4402605985D5CD42841F71C9B01A765F4405648F9395CD42841881398CEA565F4404F4013C14AD4284144F98216C465F440446E86B34AD42841EA961D22C265F440B2F336A62DD42841A0F99C7BF465F440B2F336A62DD42841A0F99C7BF465F440E87F7A942DD428413BE2D89CF565F440DF6451802DD42841B01EBBB3F665F44031ABD3692DD428415E39F7BEF765F440B0221C512DD42841AD9F4EBDF865F440784248362DD42841CD1D92ADF965F440C70578192DD428413048A38EFA65F440E4C5CDFA2CD42841F7D0755FFB65F44024116EDA2CD42841CCC7101FFC65F440617F7FB82CD42841A5C28FCCFC65F440EC832A952CD4284113EE2367FD65F4405E3D99702CD42841C90315EEFD65F4405E43F74A2CD428415126C260FE65F440A77271242CD42841CEA0A2BEFE65F44094B735FD2BD42841F0894607FF65F4405AD772D52BD428416449573AFF65F440493858AD2BD428410AFF9757FF65F4404EA915852BD4284188CBE55EFF65F440EF28DB5C2BD42841DEF93750FF65F44019ACD8342BD42841C609A02BFF65F440F1E43D0D2BD42841D79A49F1FE65F440FD093AE62AD4284186387AA1FE65F440D69DFBBF2AD428413B07913CFE65F440B937B09A2AD42841E95206C3FD65F4402C4D84762AD42841A7FF6A35FD65F44003FDA2532AD42841F0DC6794FC65F440EFDB35322AD428416ADCBCE0FB65F440F8C264122AD42841172D401BFB65F440BE89211129D42841FEEDB25FFC65F4405C76880F29D428414D81CC0EFC65F4401C7C61AA28D428411904568EFC65F440103FFF3528D428411D57237BE565F440C217269B28D42841E3C798FBE465F440F3C98A9928D4284188B9A4AAE465F44032C9C89129D42841E3DD9171E365F44032C9C89129D42841E4DD9171E365F440086EA1A729D4284126998763E265F4406683B9BF29D42841C4650462E165F4402267F4D929D428410D4B3A6EE065F4403EED32F629D4284156014B89DF65F440F48453142AD42841AC9946B4DE65F440996032342AD42841833A2AF0DD65F4402DA0A9552AD42841DCF2DE3DDD65F440577E91782AD4284150A5389EDC65F440AE7FC09C2AD428413E0CF511DC65F44006A40BC22AD4284155D8BA99DB65F440849946E82AD428417BEA1836DB65F44051F1430F2BD4284100AA85E7DA65F4409055D5362BD42841E7775EAEDA65F44077C0CB5E2BD42841F33FE78ADA65F4402AB4F7862BD42841E6274A7DDA65F440317329AF2BD42841725D9785DA65F4402E3931D72BD42841FE02C5A3DA65F440A673DFFE2BD428415B3BAFD7DA65F4408AFA04262CD4284167541821DB65F4403C48734C2CD428415F10A97FDB65F440E0B0FC712CD42841890DF1F2DB65F4409C9874962CD42841C54B677ADC65F440A1A8AFB92CD428415DCF6A15DD65F440A70284DB2CD42841526043C3DD65F440B272C9FB2CD428414C652283DE65F440D89E591A2DD4284121D92354DF65F440')));      Informations : PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-16ubuntu6) 4.8.2, 64-bit. The geometry come from a dxf file imported into postgis with ogr2ogr.


title: How can I have as an input for a multiple ring buffer not a single distance but a field?

text: I have a feature class with points and I need to create two concentric circle with different distances for each point. Moreover the two surfaces do not have to overlap. Can I use "multiple ring buffer"? And how I am able to add as an input features a field that contains the distance to buffer each feature?


title: What is the OSGeo4W-equivalent for Linux?

text: > OSGeo4W is a windows based stack of GeoFOSS which is based upon cygwin. I know there is a package listing describing what is inside the OSGeo4W binary package and I could fetch and install every package on my own. But it would be nice to install all packages at once: Is there anything similar for Linux available? _By the way_ , I'm using Sabayon/Gentoo Linux based on the portage package manager which is not compatible with ELGIS. * * * **Update concerning the reasons:**   * _Do you really need to install all the packages at once?_ Well: yes. I keep de- and re-installing packages because of certain options, dependencies, etc. I'm currently trying to get file.gdb [this and that] to work with qgis. But I need to de-install GDAL from package manager (which will break certainly a lot of dependencies) and re-compile it with fgdb support. I was looking for some way to install all-at-once. As stated in this question, it took me like one week to get QGIS running with full GRASS- and plugin-support.   * _Well we have to use OSGeo4W because Windows, unlike every other OS, doesn't have its package manager. Our lives would be a hell of lot easier if it did._ Understood. But as I'm not using Ubuntu/Debian I only have some of the important packages in my official repositories, which is quite annoying. That's why I was looking for some meta-package like OSGeo4W. The OSGeo-Live-distribution looks pretty good though.


title: Error on FeatureClass To FeatureClass conversion arcpy

text: I am currently working on a python script where I am trying to copy selected features into a feature dataset. Basically I have an mxd containing some layers, and for each layer I select features by their attributes, this query is based on the featuredataset name. The script I have written get a list of the feature datasets of my geodatabase. With the name of the featuredataset, I can build a query filter (arcpy.SelectLayerByAttribute_management) for each layers of the mxd. If my selection return something, I export the selected feature in the proper dataset (arcpy.FeatureClassToFeatureClass_conversion). The script is processing the first dataset properly, but once it jumps to the next one it fails... I cannot figuring out why I am receiving the following message error(arcgisscripting.ExecuteError: ERROR 999999: Error executing function. Failed to execute (FeatureClassToFeatureClass).)               #-----Work-on-the-Geodatabase-----     ##path of the geodatabase      gdb_hull="D:\\As_Con_Plans\\As_Con_Hull_part1.gdb"     ##set the workspace     arcpy.env.workspace=gdb_hull     ##get the list of the featuredataset     fdlist =arcpy.ListDatasets()     #-----Work-on-the-mxd-----     ##get the mxd path and initialise it     path_mxd="D:\\As_Con_Plans\\As_constructed.mxd"     doc_mxd = arcpy.mapping.MapDocument(path_mxd)     ##list of layers     fclist=arcpy.mapping.ListLayers(doc_mxd)          #-----Loop-on-each-featuredataset----     for fds in fdlist:         print "________","\n ", fds         ##work on the featuredataset name, for suiting the query         get_fds= fds.replace("As_con_","")         fds_name=get_fds.replace("_","-")         ##path of the featuredataset         fds_path=gdb_hull+"\\"+fds         ##prepare the query         SQLexpression= "\"As_Constructed_Plan\"='"+fds_name+"'"                         ##path where we will store the selection         fds_path_test=str(fds_path)              #-----Loop-on-each-layers-of-the-mxd-----         for fc in fclist:             fc_to_copy=fc.dataSource             #fc_to_copy2=arcpy.mapping.Layer(fc_to_copy)             ##Select the featureclasses             arcpy.SelectLayerByAttribute_management (fc,"NEW_SELECTION",SQLexpression)             ##Count the selected features             count = int(arcpy.GetCount_management(fc).getOutput(0))             print fc,count             ##if the query succeed, we will copy the  selection into the proper featuredataset             if count>0:                 ##print some info                 fc_path2=fds_path+"\\"+str(fc)                 fc_path=str(fc_path2)                 fc_name=str(fc)                 fc_copy_from=str(fc_to_copy)                      ##check if the featureclass does not exist                 if not arcpy.Exists(fc_path):                     print "\n copying...",count," entities , on ",fc_path                     print (fc_copy_from,fds_path_test,fc_name,SQLexpression)                          arcpy.FeatureClassToFeatureClass_conversion(fc_to_copy,fds_path_test,fc_name,SQLexpression)                     print "export ok"


title: Why is this field calculator expression evaluated incorrectly when using Python syntax?

text: I have a polygon featureclass containing an integer field 'gridcode'. I've added 2 new float fields VB_calc and Python_calc, both of which should be equal to `gridcode / 1,000,000`. If I calculate the field using the Field Calculator with the VB Script `[fieldname]` syntax, the result is as expected. ![enter image description here](http://i.stack.imgur.com/WqJU2.jpg) If I use the Python `!fieldname!` syntax, the results are all zero. ![enter image description here](http://i.stack.imgur.com/3w0P5.jpg) ![enter image description here](http://i.stack.imgur.com/Mcz7d.jpg) What am I doing wrong here? I entered those expressions by double-clicking the gridcode fieldname in the calculator. (My goal is to use this within a stand- alone Python script but I'm debugging it here since the script isn't working either.) Both fields are definitely of type FLOAT.


title: Select By Attribute in OpenLayers

text: We can select features and display their attributes in OpenLayers. But I', curious can we add a tool similar to arcgis "Select by Attribute" in OpenLayers interface.


title: How to change text legend orientation from right to left reading with arcpy

text: I working on mxd with ArcMap 10.2.2 . The default in legend properties-Layout is left to right reading (Marked with a red ellipse) : ![enter image description here](http://i.stack.imgur.com/VCxsG.jpg) when it unmarked i get this legend: ![enter image description here](http://i.stack.imgur.com/BQNGE.jpg) i want to know if there a way to mark the default box automatic from right to left reading option so the result will be like that: ![enter image description here](http://i.stack.imgur.com/tXcQQ.jpg) Does anyone know of a way to do this with arcpy?


title: QGIS - is it possible to select the columns shown with "Identify features"?

text: In QGIS, I have created a join to an attribute table with some 60 entries. I am only interested in seeing 3 of the columns, specifically address data. I can see no way of excluding the unwanted columns from the “identify features” tool. Can anyone help?


title: Why are these WMS/WFS layers not appearing in QGIS?

text: WFS and WMS layers are not appearing when connecting to servers. I am using QGIS 2.0 and am attempting to connect to: http://www.arcgis.com/home/item.html?id=a0ae91856e3c450996d42d53474a1cad The layers appear in the layer window but no data appears.


title: Is there a special tag to calculate way length in osm2pgsql?

text: There are special tag `'way_area'` in osm2pgsql creating a database column that stores the area of polygon fatures. So is there something like this for calculation of length of line oblects?


title: How to translate ESRI cursor example to pyQgis?

text: For example, how to translate this code into pyqgis?                   rows = gp.UpdateCursor("D:/St_Johns/data.mdb/roads")         row = rows.Next()              while row:            row.buffer_distance = row.road_type * 100            rows.UpdateRow(row)            print row            row = rows.Next()      errata: buffer_distance is a calculate column road_type is a calumn with calculate value Follow your advice I type this code in to python windows:               >>> from qgis.core import QgsVectorLayer, QgsFeature     >>> layer = QgsVectorLayer(r"D:\fold", "boundingBoxes.shp", "ogr")     >>> road_type_index = layer.fieldNameIndex("road_type")     >>> buffer_distance_index = layer.fieldNameIndex("buffer_dis")     >>> layer.select(layer.pendingAllAttributesList())     >>> layer.startEditing()     True     >>> for feature in layer:     ...     newvalue = feature.attributeMap()[road_type_index].toInt()[0] * 100     ...     feature.changeAttribute(buffer_distance_index, newvalue)     ...     layer.updateFeature(feature)     ...      next when I press "enter" the qgis (1.7.4) crash and exit


title: Spatial Query plugin broken in MacOS version?

text: I'm running QGIS 1.7.4-4 on a MacOS 1.6.8. I'm trying to use the "Spatial Query" plugin but it's not loading. The plugin is activated and I can see it in the main menu Plugins > Spatial Query > Spatial Query but when I click on it no window appears, nothing happens. I've tried to deactivate it, restart QGIS, reactivate, but nothing changes. Any help?


title: How can I aggregate points to polygons?

text: I am trying to aggregate my data points to the polygons so that I could find out how many points I actually have in each polygon, and then export the data contained within each polygon to further look at the data properties as they pertain to each polygon. Thanks for your help! ![enter image description here](http://i.stack.imgur.com/BnOLv.png)


title: Medium resolution imagery for the US?

text: For my web map application http://ian01.geog.psu.edu/geoserver/www/pa/pa3.html I have three levels of background imagery as the user zooms in. At small scales I'm using NASA Blue Marble and a large scale I have 1ft USGS orthos which are both great. However at medium scales I'm using Landsat imagery and it looks poor (to say the least), so can anyone suggest a good source of free imagery for the US (this case is PA but I need to do other states too). Preferably WMS servers.


title: How can I work with 3+ Gigabyte TIFF Files?

text: While I don't work in GIS myself I'm trying to support one of our users here who looks after all our mapping and GIS data. We've received a 3.2GB Tiff image containing satellite imagery of our site and I'm wanting to find a way to re-size it down a bit to make it easier to work with. Is there any open source/free software out there that can handle this sort of file size? I've tried Irfanview, Imagemagick, GIMP without success. The servers I'm trying to work on have plenty of memory and disk available but perhaps not enough to fit the whole file. Is there an easy way? Thanks.


title: How to modify 2 raster images to have the same resolution?

text: I have data for 2 rasters images that have different resolutions:   1. `z` downloaded from trmm    2. An MSAVI2 output image. For calculating the correlation between them, the data has to be in the same resolution. I have tried reproject in erdas but the result that I got was not `z` correct. How can I do this? Or how to do this with the resample command in arcgis?


title: GeoServer Callback Function Undefinded

text: Any idea why the function loadThis() comes back as undefined? I've tried adding jsonp: false which doesn't help either. The json object is returned properly, I can view it in FireBug, but I can't get it to the callback function. Hope it's something simple I've missed,               var geojsonLayer = new L.GeoJSON();          function loadThis(data) {         console.log(data);     }          $.ajax({         url : "http://geoserver.capecodgis.com/geoserver/capecodgis/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=capecodgis:tracts_2010_4326&maxFeatures=2&outputFormat=json&format_options=callback:loadThis",         dataType : 'jsonp'     });          map.addLayer(geojsonLayer);


title: Finding closest Intersection between line strings (PostGIS)

text: I want to find the distance between one point (excavation sites) and a line (rivers) for the cardinal directions. What I thought would be the easiest way is to draw lines between the excavation site and a given maximum distance every 45° and find the intersection between the line and the river which isn't working properly yet (and maybe isn't the best idea to solve that?). I have a table excavation_sites and a table dist_ex_sites_river (in which the lines and the distances should be stored). The dist_ex_sites_river table also has a foreign key for the excavation sites. I managed to create the lines already and write them in the db with the according step_nr (see figure - the red circles are the intersection points I want to find for measuring the distance) and the excavation site. Now I'd like to get the intersections to measure the distance which always returns None, maybe you guys can help me? This is the code I'm using right now: `SELECT ST_Intersection(dist_ex_sites_river.line_geometry,env_white_water.geom) FROM public.env_white_water, public.dist_ex_sites_river WHERE dist_ex_sites_river.step_nr_id_pk = 1 AND env_river.river_id_pk = 616;` I'm working with python and the psycopg2 package. I iterate through every id (in both tables) and want to append the distances to a list and choosing the minimum value in the end to insert that into the db in the end. Probably this is absolutely stupid and there is a much better way to do that. Thanks a lot for your help. ![screenshot of what I'm trying to do - the red circles show the intersection point I want to find for measuring the distance between the excavation site and the river](http://i.stack.imgur.com/DHfvH.png)


title: Create buffer in Metres

text: I want to create a buffer in meters around points in Europe. But I cannot find a proper CRS for Europe that is in meters instead of degrees?


title: Error opening Google layer in QGIS

text: I'm using QGIS to open my postgis layers based on Google Maps. But with some I am not having success, an error that generates a dump in the temp folder of my Windows user file occurs. To investigate this problem I tried to open the error log but it is not readable. What can be causing this error? The table at which the error occurs is in EPSG: 4326 in the bank, detected by QGIS time I load the table. QGIS I enabled the projection on the fly in EPSG: 4326 how do the other tables without problems.


title: Manually add lat and lon to ArcGIS Interactive Rematch

text: I have a spreadsheet full of addresses to geocode in ArcMap 10. I've added the spreadsheet to the map, then started to geocode them via the context menu's "Geocode addresses" item. Many were matched automatically, and most of the unmatched I've been able to resolve within the Interactive Rematch dialog. But I have a handful of addresses where I get no result at all. I can, however, locate these points on Google Maps, and I can get the latitude and longitude that way. How can I enter that data into the table to locate the missing points? I have tried editing the data and putting the lat/lon values into the X and Y columns, (via Edit Features -> Start Editing, then Open Attribute Table on the context menu). But when I Flash the point, I don't see it. The lat & lon are consistent with the other data points on the map (i.e., not swapped, and using the correct sign). How can I add the points to the table?


title: In FME Desktop, I have a custom coordinate system, I was confused how to translate it for MyCoordSysDefs.fme

text: I have a custom coordinate system that I was confused how to translate it to the MyCoordSysDefs.fme for use in Safe Desktop. Here's how it is represented in the prj file. PROJCS["Lumos_Projection_Foot", GEOGCS["GCS_North_American_1983", DATUM["D_North_American_1983", SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221008916]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-80], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",4921259.843], PARAMETER["false_northing",0], UNIT["Foot_US",0.30480060960121924]] I read over the help for FME DEsktop, but the I did not know how to translate it because it had two units and so many Parameters. I appricate any help. Thanks


title: "Flattening" two shapefiles together

text: I have this big land use map. I extracted shapes associated with mountains so that I can improve the classification (for example, I corrected clouds in the mountains to be forest, among other things). Now I want to flatten the two layers with the extracted layer over-writing the info on the original map. I tried union, merge and other things, but the info I want overwritten is still there (ex. the clouds are still there). I checked for instance the result of the union and I saw that the all the data columns of both shapefiles were appended together. The effect I want is for the data of the top layer to replace the data of the lower layer. In Photoshop, this is just basic flattening (i.e. pixel value of higher layer replaces all pixel values of underlying layers).


title: Is extrusion of a line (which is curved) into a plane at a certain angle possible in ArcGIS?

text: I have a polyline shape file which is a fault trace on earth's surface. I want to extrude this into a 3-D plane at a certain angle (which is dip angle of the fault). However, the extruded plane should start somewhere below the ground surface but not from the line itself. I want to get it done in ArcGIS. I am coding in VB.NET language I am adding a rough 2-D representation to understand it better ![enter image description here](http://i.stack.imgur.com/jvP0C.png)


title: Creating records in output shapefile using Python

text: I have a list (output from a previous loop) containing attributes from an input shapefile. What I am stuck with is inputting those attributes to a new shapefile. I have plotted the point data using `w.point(x, y)` and also created the relevant fields `w.field()` from the input shapefile fields. Where I am stuck is with the copy of the records, which is giving me an Error related to Deletion Flag. > AttributeError: 'tuple' object has no attribute 'startswith' I am pasting a section of the code with my queries.               from datetime import datetime     import osgeo.ogr, osgeo.ogr     from osgeo import ogr     from osgeo import gdal     import shapefile     import os          sf = shapefile.Reader("-- Input File Location --") # Reading the Shapefile     fields = sf.fields # Reading the attribute fields     records = sf.records() # Reading the records of the features     shapRecs = sf.shapeRecords() # Read Geometry and Records simultaneously           w = shapefile.Writer(shapefile.POINT)     w.autoBalance = 1     result1 = []     result2 = [] # ??? Is the error because we cannot query for list in a list ???          print '** Call function pt(p) where p is node index... **' # Prompting the user to                                                                 # call the function with                                                                 # the required number of nodes     def pt(p):         for i in range(len(shapRecs)):             u = shapRecs[i].shape.points[p-1]   # Gives the XY Coordinates of                                                 # the queried points                  v = shapRecs[i].record[0:]          # Generating the Attributes             result1.append(u)             result2.append(v)                  w.point(u[0], u[1]) # Create points from coordinates each time the loop runs             w.autoBalance = 1              # -- Adding the fields         w.field(fields[0]) # Adding the first field, WITH Deletion Flag (???)         for i in range(1, len(fields)): # Loop begins from the second field (???)             w.field(fields[i])             w.autoBalance = 1              # CODE SHOWS THE ERROR STATED ABOVE FROM THE w.record() statement         # -- Adding the records          for i in range(len(result2)):             w.record(*result2[i])                    w.autoBalance = 1              w.save('-- Output File Location --')


title: ArcGIS 10 exports losing precision with large numbers

text: I wonder if anyone else has run into this problem; and I'm baffled as to its reason and solution. Whenever I do an export of features that have large-number attributes (over 14 digits) to a shapefile, they seem to lose precision. ArcGIS presents them in a default format of e-notation if they are large, but it seems to lose the last few digits of the number, for example: 728400000032249 becomes 728400000032000 Any ideas?


title: Type of event dispatched when the user double-clicks the map

text: I am currently working with a drawing tool for the ESRI Flex API, and every time I double-click the mouse a map service will perform a measurement and display the length of the line that I am drawing. I want to mimic this double-click manually by dispatching a MouseEvent.DOUBLE_CLICK, but the map service is not listening to this default Flex event. I suspect that the API has created a custom MapMouseEvent or something like it that is being dispatched when a user double-clicks the mouse. Does anyone know which event is being dispatched when I double-click the mouse on the map?


title: Merge DEM and Hillshade to create one file?

text: I am wondering if I could merge DEM and Hillshade ? What is the pro and cons for that? Thanks


title: TIN file to a POINT file

text: I have some bathymetry data in TIN format; I am able to open this in arcmap and view the terrain. However I need to use this data within a simulation framework called Delft3D, which needs the bathymetry data in ascii format (.dep). I am very new to both of these software technologies, I wanted to know how I can convert the TIN format data to a .xyz file or even a .dep file using arcgis or even something external.


title: How to import PDF which has vector format into QGIS's vector layer?

text: I know the way to convert an ordinary raster pdf into QGIS. But is it possible to import a pdf which preserved the vector format (e.g. the pdf files exported by AutoCAD) to QGIS's vector layer?


title: Unselect Individual Selected Features using ArcObjects

text: I've been stumbling around with this issue for a bit now and I can't seem to find any relevant answer for it anywhere else. In my Add-In built using .NET ArcObjects/C# with Arc 10.0 I would like to be able to programmatically unselect a subset of all selected features gathered through a reference to `FocusMap.FeatureSelection`. I can pretty easily holistically unselect all of the features using the `Clear()` method, but I need to do this on a more targeted basis. For example, I display a list of all selected features (obtained by casting the `FeatureSelection` `ISelection` to an `IEnumFeature`) to the user and ideally would like to be able to provide some management (read: removal) of the selected features to the user. So, in a nutshell: Is there a way to remove just a certain feature or features from an entire selection in ArcMap using ArcObjects and if so, what is the preferred method?


title: Gdal_Calc.py random pixel error

text: I'm using the gdal_calc.py in python in order to do the same thing as the Con tool in ArcGIS. I'm calling the .py using os.system: `os.system('gdal_calc.py -A%s -B%s --outfile=%s --calc="((A==-9999)*B)+((A>=-9000)*A)" --type="Float32"' % (file1,file2,Output_File))` Basically, I want to look at file1, and if a pixel has a value of -9999, replace it with the value from file2. Overall, the script runs and outputs a file that seems to be correct, however, when I randomly click through pixels to check their validity, I end up getting some pixel values that don't match either file1 or file2. I have no idea how these pixel values are being calculated. Also, these are not just pixels around the very edge of the image, but all over.


title: QGIS Rasterization of points

text: I have a point vector layer and want to make it a raster. Trouble is that many points are very close to each other, so unless I specify a very small resolution of the raster cells, likely several vector points can be overlapped by the same raster cell. I do not understand how the rasterization works in such a case: does it assign a value to the cell which is a mean/median/some other kind of combination of the attribute of the underlying points or does it take the attribute from only one vector point and assign its value to the cell? If this last is the case, how could I perform an interpolation of data along a narrow stripe along a coastline, to be used in further raster computations?


title: Copy dbf data into a shapefile in Arcpy

text: Basically it's to perform a one-to-many join in a python script, from a dbf to a shapefile. I saw (Greg Krakow's method) using QGIS, but I can't use it (I'm working on it, but QGIS is not yet recognize as an "official and usable" option within our organisation). My dbf contains many records with the same ID and my source shapefile contains the geometry for each ID. So, my approach is to create from scratch a shapefile ("outFile" in the script) by copying the structure of my dbf (adding field by field), using arcpy.FieldList()               dbfFieldList = arcpy.ListFields(dbf)          for field in dbfFieldList:         fieldTypeShp = validFieldType(field.type)         arcpy.AddField_management (outFile, field.name, fieldTypeShp, "", "", field.length)      validFieldType(field.type) is a function "converting" the field type of my dbf to a valid field type for arcpy. For example, I have a "smallint" which came back as "SHORT" so I could use AddField_management... So I figured that if I could read my dbf line by line, I could, field by field (since both my dbf and shp have the exact same structure), udpate the value of my shapefile.               #-- Seach cursor for my .dbf     searchCur = arcpy.SearchCursor(dbf)          for sCur in searchCur:              #-- Insert cursor for my shapefile         cur = arcpy.InsertCursor(outFile)         row = cur.newRow()              #-- Reading for the current row, the fields value, one by one.         for field in dbfFieldList:             fieldName = field.name             val = sCur.getValue(fieldName)             row.setValue(fieldName,val)              #-- Inserting the new row into my shapefile         cur.InsertRow(row)       But I have an error executing the function "setValue". If I remove that line and the cur.InsertRow (or put a "print val" it works perfectly. I have created a shapefile with the same number of row as my dbf, but I can't add the field values. After that part, I would use the ID field to retrieve the geometry from my source shapefile with the same ID, recreating my 1-to-many join. If only I could make that part work... Any ideas? Thanks!


title: FIPS code data combination

text: I have two datasets- matching years, different sources. They are matchable by FIPS code, but my problem is 1) that the first data set, from which I am drawing my independent variable data, only has the five-digit FIPS code data, and my other data set has information disaggregated down to the eleven digit level. Any thoughts on combining these more disaggregated data?


title: How to classify/style rasters correctly?

text: I am using a GeoTiff raster data and trying to classify it. I was wondering what are the techniques that I can use in QGIS to do this? The raster I have looks like ![enter image description here](http://i.imgur.com/fdF7S.png) but I tried the reclassify tool in ArcMap and it looks like this ![enter image description here](http://i.imgur.com/7RBN9.png) Now I wish do the similar classification using QGIS and I was able to acheive it by adding 9 entries in the Generate new Color map and clicking classify and applying it to the map. The image looks like this, ![enter image description here](http://i.stack.imgur.com/kGqbs.png) I again tried going to the Transparent tab and found that the No data value is -3.4e+38 and then clicked on Apply. Nothing changed. I then selected the Band1 in the Transparent band and then applied and the entire map disappears. Is it possible if I can display it in the same manner as the ArcMap's output?


title: How to add simple table of text (Excel) into layout and preserve formatting and clarity?

text: I am trying to put a simple table of text (excel) into my layout and preserve cell formatting including alignment, borders and text sharpness. I've tried many approaches but nothing so far is satisfactory. BTW: ArcGIS 10.1


title: Meaning of "feature has null Z values" when using Move tool of Editor in ArcMap?

text: i am trying to move a polygon from a location to another location. when using the move tool (editor) in ArcGIS, I place the x and y values to where i will move the polygon. however, when pressing enter, a message stating that the feature has null z values appear. how do I solve this problem?


title: How to set max map scale for a layer?

text: How can I set the maximum scale for a layer? Sometimes the layer is not visible (it disappear), when the map scale is >= 1:250000. I'd like to set it on max 1:125000. This code does not work:                   Map.Layers["LB"].MaximumResolution = 125000.0;      I'm developing in visual studio with C# (WPF)


title: tables created with "create table ..." in CartDB

text: **Edited** I observed the following: when I create a table with "create table mytable ..." in the SQL tab of the UI, the table is created under the public schema. I can see these tables only using:               SELECT *       FROM information_schema.tables      WHERE table_schema='public'        AND table_type='BASE TABLE'      I also need to create referential integrity between these objects and "cartodbfied" tables. these tables don't count for the quota, not for number of tables nor for space. **my question:** is it safe to use such tables in my application or is there some housekeeping job that is going to trash these objects at some point ? **EDIT**   1. what about user defined functions ? is it safe to create UDF and rely on them staying there **permanently** ?   2. one more issue with these objects is they seem to be cached. **how can I force a cache refresh ?** **2nd EDIT** Thank you @jaorre for your response. **Yes, I would like to know how to create "cartodbfied" tables programmatically.** I would also need to create **referential integrity** on these "cartodbfied" tables. What about the other point from the original question:   * forcing a cache refresh One more observation is when I execute :               SELECT *      FROM information_schema.tables     WHERE table_schema='public'       AND table_type='BASE TABLE'      Couldn't the column table_catalog be used to identify "owner"?


title: Temporary File GDB-based scratch workspace is not deleted after it is released

text: I have created a temporary File GDB-based scratch workspace as follows:               var factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBScratchWorkspaceFactory");     var factory = (IScratchWorkspaceFactory)Activator.CreateInstance(factoryType);     var workspace = factory.CreateNewScratchWorkspace();      Running this code creates a File GDB in my user profile's `.\AppData\Local\Temp` directory. Esri's documentation claims that: > _"Workspaces created by`IScratchWorkspaceFactory.CreateNewScratchWorkspace` > will be automatically deleted when the last reference to them is released."_ However, this does not happen. Even after my application terminates, and even though all ArcGIS application have been closed, the File GDB remains in my temporary folder. I have tried explicitly releasing the workspace:               Marshal.FinalReleaseComObject(workspace);      But that does not delete the temporary File GDB either. Trying to additionally delete the directory will not work either, because some file in the File GDB directory is still in use:               var path = workspace.PathName;     Marshal.FinalReleaseComObject(workspace);     System.IO.Directory.Delete(path, recursive: true);      * * *   1. Am I doing something wrong? And if so, what? How do I best deal with scratch workspaces that are no longer in use?   2. Is the documentation simply incorrect on this point?   3. Or will Windows regularly delete that temporary folder and thus delete the scratch File GDB? (This does not seem to be the case.)


title: Geoserver Realm

text: I am trying a lot of days to create a GIS app with Geoext, openlayers and geoserver through Apache! Well I achieved that but I had created many users with different roles! When I am loading my app Mozilla or Chrome etc asks for Geoserver Realm "Username" and Password"! Actually is this what I need but I want to have a login and logout button somewher to my app to change users! Unfortunately, I am finding a lot of answers about users, security and authentication but I can't understand how actually I can do it works! Can you please help me?


title: hiding some "feature"s in GeoJSON file on map

text: I have geojson file including boundaries of most countries in world. When I clicked on a "feature" (aka country, or polygon) I want to hide it while keep showing the others. because I am planing to showing more detailed geojson (states, cities) for that clicked country. I am planning to use Leaflet JS, but I am open to any other libraries as well. =================== This is the first screen, apply the world countries boundaries. ![enter image description here](http://i.stack.imgur.com/yoP9t.jpg) This is after clicking somewhere on map, I added to US boundaries geoJson to main _map_ variable. ![enter image description here](http://i.stack.imgur.com/bJCb4.jpg) As you can see, I put US geojson upon the world geojson (you can realize that there is still some green area(which comes from world geojson) on the top left part of USA). What i want is to hide only clicked country, USA in this case, and show more detailed geojson belong to that country. PS: I dont use tiles, I need to clarify countries by geojson


title: how to calculate area verses each NDVI value?

text: I created an NDVI map, I want to calculate area of vegetation verses the respective NDVI value of the given map. Which tools are used for this process and what steps are required?


title: Preserve attribute table while using extract by mask in arcgis

text: On using the Extract by mask function on a raster with several columns (beyond value and count) in the attribute table, the resulting raster does not have all the columns (it only has value and count). Is there a way to conduct extract by mask and also preserve the columns. Please note that this is part of a script in python.


title: GeoExt 2 + OpenLayer 2.13.1 - Problem with 'OpenLayers.Control.SelectFeature'

text: I have recently started to work with GeoExt and OpenLayers to generate a web gis application. During the development of this application i have found a problem using the object 'OpenLayers.Control.SelectFeature'. I have various objects 'OpenLayers.Layer.Vector' that shows on the map a geometric points. Each point must show a popup with his features's attributes. To generates this popup i have use this function:                       function createPopup(feature) {             var popupOpt = Ext.apply({                 title: feature.attributes.title,                 location: feature,                 html: feature.attributes.html,                 collapsible: false,                 unpinnable: false,                 maximizable: true,                 icon: feature.attributes.icon,                 border: false,                 style: {                     borderColor: 'white',                     borderStyle: 'solid'                 }             });             popup = Ext.create('GeoExt.window.Popup', popupOpt);             popup.on({                 close: function() {                     selectCtrl.unselectAll();                 }             });             popup.show();         }      Now, when i create a control object 'OpenLayers.Control.SelectFeature' with an array of vector object this don't work, while if i create a control object with only one vector object, this works correctly. This works correctly:               var vectorStyle = new OpenLayers.StyleMap({'pointRadius': 4, 'externalGraphic': 'resources/images/logo.png', 'graphicWidth': 30, 'graphicHeight': 25, 'fillOpacity': 1.0, 'cursor': 'pointer'});     var vector = new OpenLayers.Layer.Vector("StationA",{styleMap: vectorStyle, visibility: false});          var selectCtrl = new OpenLayers.Control.SelectFeature(vector,{onSelect:createPopup});          mapPanel.map.addControls(selectCtrl);          selectCtrl.activate();      If i use an array : **...SelectFeature([vector1,vector2,vector3],...** don't work:               var vectorStyle = ....     var vector1 = ...     var vector2 = ...     var vector3 = ...          var selectCtrl = new OpenLayers.Control.SelectFeature([vector1,vector2,vector3],{onSelect:createPopup});          mapPanel.map.addControls(selectCtrl);          selectCtrl.activate();      Someone can help me?


title: How to create raster map by day that observed maximum NDVI from multiple raster data in R?

text: I have 11 NDVI raster data, representing single summer. I want to create raster by day (Julian day or name of raster) that observed maximum value. In other words, I want to know which day (which raster) has maximum value in each cells of NDVI data and I want to get the result by raster file. Actually, the day of maximum NDVI value should be in each grid instead of maximum value.


title: polytiles error

text: when I run a polytiles.py script for mapnik rendering. It worked just fine until the error:               Process Process-1:     Traceback (most recent call last):       File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap         self.run()       File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run         self._target(*self._args, **self._kwargs)       File "./polytiles.py", line 281, in loop         self.render_tile(x, y, z)       File "./polytiles.py", line 235, in render_tile         l0 = self.tileproj.fromPixelToLL(p0, z);       File "./polytiles.py", line 63, in fromPixelToLL         e = self.zc[zoom]     IndexError: list index out of range      I used '--threads 8' but with 1 thread there is still the error. Question: how can i fix this? this is an error in python? Maybe I have done sth wrong with setting the environment? I can post more details but I do not know what. My full command:               sudo ./polytiles.py -u postgres -b 20 52 21 52 -z 17 18 -t /osm/ --threads 8 -s /openstreetmap-carto/osm.xml


title: Map production checklist for organisation

text: I would like to create a map production workflow list for my GIS colleagues at a local public authority. When someone orders a map, I would like to have a kind of check list where we can just run through the standard questions and write them into an excel table. This would help us keep a record of what maps we have acually made, which datasets were used, who does the mapping, and a production history which is good for time management purposes. I was thinking around the lines of creating a mask in an excel table including "Purpose","target Audience", "Output medium", "size", "Scale/resolution requirements", "Title", "north arrow"..etc... Has anyone created something similar? Does this seem useful? Does anyone have similar documents which I could look at and compare?


title: cs2cs works one way but not the other

text: I am trying to build a short program using cs2cs that will work on any windows pc   I copied `cs2cs.exe` and `proj.dll` to a seperate folder   When i run this to convert israel tranverse mercator to decimal latlon:                 cs2cs -f "%.10f" +init=EPSG:2039 +to +init=epsg:4326      It works   but when i run the opossite:               cs2cs -If "%.10f" +init=EPSG:2039 +to +init=epsg:4326      It does not work   When i run this code from latlon in degreea to israel tranverse mercator :      `cs2cs +init=epsg:4326 +to +init=EPSG:2039` it works   what am i doing wrong?


title: How to iterate and combine bands in model builders

text: Similar question here: How to combine more iterations of a for loop to bands of a single raster? I have downloaded over 100 Landsat MSS and TM images with separate bands, and I want to combine bands as a single file with multi-bands by the composite bands function. However, I got stuck in using the ArcGIS model builder. As an example for TM images, my idea was to use six submodels (iterate raster) to gather 6 TM bands (except thermal), and combine bands, but each iterate raster function only outputs one raster, instead of multiple rasters. The files were organized by years. In other words, each year may have MSS and TM bands together, but MSS and TM bands did have specific file names. Any further suggestion?


title: How to add iteration in model to join fields from several shapefiles into final one?

text: I have one grid (Atl1x1.shp) to which I need to add 9 Fields from 9 different shapefiles which are also grids (that is, 1 column from each shp, all with the same name). These shapefiles have the same number of records and the same Primary ID field as my original shp, so I used the JOIN FIELD tool where that PrimaryID would be both my Input Join field and my Output Join field, the original Atlantic1x1.shp would be the Input Table and the 9 shps would be the Join Tables. Since I was in a hurry, I used the Join Field toolbox 9 different times, using the output of one Join Field as the Input Table of the following one. This way I ended up with a shapefile similar to the original Atlantic1x1.shp, with 9 extra columns in the attribute table coming from the 9 shps I used as Join Tables. Since I will have to do this again in the future, I am working on a model to do it automatically. I do not know much about Model Builder, but I guess there must be a way to do this by adding one of the iterators. In the pic you can see what I did so far. ![enter image description here](http://i.stack.imgur.com/jRQNc.png) Atl1x1.shp is the original grid FishSpp1x1 is the directory where the 9 shps are stored. My problem is that I don´t know how to tell the model to use Atlantic1x1 as the original Input Table for the Join Field, but then use the updated shp with the extra column as the Input Table in the second repetition, then that updated shp (with already 2 extra columns) as Input for the third repetition, etc. I suppose there must be an easy way of doing this, after all it´s just copying columns! Thanks in advance


title: Zonal statistic on recoded raster layer. Information about class value and quantity

text: i have a raster layer, with 15 different classes. In the raster layer are differrent classes, which stand for windspeed. Then i have a shp-file, where polygons represent urban regions or just free areas with information about land surface. My goal is to get information about, which pixel are overlaid by the polygon. Like i select a polygon and information is given that the polygon includes 2 pixel from class 1, 3 pixel from class 3, 2 pixel from class 1 etc. I tried the zonal statistic tool from the QGIS-Gui. That only provides information about sum, mean of the pixel value. But i want to keep the pixel value and dont want to count them. SAGA's Grid statistic for polygons does so as well. Number of Cells: yes Minimum: no Maximum: no Range: yes Sum: no Mean: no Variance: no Standard Deviation: no Quantile: 0 My Question is: Is there any way to get Information about the quantity and class value of the including pixel? Iam amenable to any advice. Thanks Steffen UPDATE: I managed to get what i want. I usesd the SAGA Tool "Vectorising Grid Classes". By applying intersect with my new vectorised raster image and my original vetcor file containing other information, i was able to get the area size where a specific windspeed is located. Instead of providing the information with the zonal statistic where i want to quantify the value, how much pixel from a specific class are covered by input polygons. Wondering if it is possible to do with local/zonal statistic due to better performance on large dataset. Best regards Steffen


title: Importing shapefile to file geodatabase feature dataset using ArcObjects and C#?

text: I'm trying to import a shapefile into a featuredataset under a geodatabase using FeatureDataConverter.ConvertFeatureClass. All the examples that I found are not concerning the import under an existing featuredataset. I checked that the spatial reference it's the same and the domain it's enough big to contain the features. When I try to run stop at featureDataConverter.ConvertFeatureClass and exit with out any information. Thank you in advance.               ...     ISpatialReferenceFactory srFactory = new SpatialReferenceEnvironmentClass();                     Int32 EPGS = 25832;                      ISpatialReference spatialReference = (srFactory as ISpatialReferenceFactory4).CreateSpatialReference((int) EPGS);                     IEnvelope envelope = RvrFtrLyr.AreaOfInterest;                     spatialReference.SetDomain(envelope.XMin-1000, envelope.XMax+1000, envelope.YMin-1000, envelope.YMax+1000);                     IFeatureDataset targetFeatureDataset = coreEngine.CreateFeatureDataset(targetWS, "Rivers", spatialReference);                               coreEngine.FeatureLoader(targetFeatureDataset, "Lines", RvrFtrClsSHP);     ...                         internal void FeatureLoader(IFeatureDataset targetFDS, String name, IFeatureClass sourceFeatureClass)             {                 //Source feature                 IDataset sourceDataset = (IDataset)sourceFeatureClass;                 IWorkspace sourceWS = (IWorkspace)sourceDataset.Workspace;                 IFeatureClassName sourceFtrClsName = (IFeatureClassName)sourceDataset.FullName;                      //Target feature                 ESRI.ArcGIS.esriSystem.UIDClass clsid = new ESRI.ArcGIS.esriSystem.UIDClass();                 clsid.Value= "esriGeoDatabase.Feature";                 IFeatureClass ftrCl = targetFDS.CreateFeatureClass(name, sourceFeatureClass.Fields, clsid, null, esriFeatureType.esriFTSimple, "Shape", null);                      IDataset dataset = (IDataset)ftrCl;                 IFeatureClassName trgFCN = (IFeatureClassName)dataset.FullName;                 IFeatureDatasetName trgFDN = (IFeatureDatasetName)trgFCN.FeatureDatasetName;                      IFieldChecker fieldChecker = new FieldCheckerClass();                 IFields sourceFields = sourceFeatureClass.Fields;                 IFields targetFields = null;                 IEnumFieldError enumFieldError = null;                      fieldChecker.InputWorkspace = sourceWS;                 fieldChecker.ValidateWorkspace = targetFDS.Workspace;                      fieldChecker.Validate(sourceFields, out enumFieldError, out targetFields);                 if (enumFieldError != null)                 {                  Console.WriteLine("Error in fields validation");                 }                      String shapeFieldName = sourceFeatureClass.ShapeFieldName;                 Int32 shapeFieldIndex = sourceFeatureClass.FindField(shapeFieldName);                 IField shapeField = sourceFields.get_Field(shapeFieldIndex);                      IGeometryDef geometryDef = shapeField.GeometryDef;                 IClone geometryDefClone = (IClone)geometryDef;                 IClone targetGeometryDefClone = geometryDefClone.Clone();                 IGeometryDef targetGeometryDef = (IGeometryDef)targetGeometryDefClone;                      IFeatureDataConverter featureDataConverter = new FeatureDataConverterClass();                 IEnumInvalidObject enumInvalidObject = featureDataConverter.ConvertFeatureClass(sourceFtrClsName, null, trgFDN, trgFCN, targetGeometryDef, targetFields, "", 1000, 0);                      IInvalidObjectInfo invalidObjectInfo = null;                 enumInvalidObject.Reset();                 while ((invalidObjectInfo = enumInvalidObject.Next()) != null)                 {                     // Handle the errors in a way appropriate to the application.                     Console.WriteLine("Errors occurred for the following feature: {0}",                         invalidObjectInfo.InvalidObjectID);                 }             }


title: XY to Line tool crashing

text: The problem I'm encountering is simple. I have a shape file of points (about 8 million). They have three XY pairs that I am attempting to create XY lines from for purposes of measuring distance. However, the tool repeatedly has crashed, bringing down whatever program was running it (Catalog or ArcMap). I am assuming this is not related to the issue of XY To Line crashing if it encounters a record that does not have both pairs of XY co-ordinates, as I cleaned those out. Is there a size limit issue, here? Of the 7.9 million records input, it gets to 7.3 before the entire program goes kaput. For the purpose of clarity, let me describe the data setup. For each record in the table there is a point with an XY and two geocoded locations with XYs. So Point A Geocodes to Point B, and Point A geocodes to Point C. I have the XY locations of A, B, and C all on the same record, and am trying to glean the distance between their coordinates (A -> B), (A -> C), (B -> C). Two questions: 1) Is there a better method in ArcMap 10 to measure the distance between two points than snatching the length from an XY to Line feature class? 2) Why would XY to Line be crashing at about 7.3 million records?


title: How to Use Label Expression with Text Formatting Tags

text: I am using a Label Expression to label a parcel layer. The expression is:               "<FNT name=""Arial"" size=""12"">" & [Owners_Nam] & "</FNT>"      This works correctly for some labels, but any [Owners_Name] field that has an "&" in it, such as between two owners names (Smith, John & Sue), does not show up correctly. The parcel is labeled as:               <FNT name="Arial" size="12">Smith, John & Sue</FNT>      Is there any way to solve this without removing the "&" from the [Owner Name] field? I know how to replace the & in Field Calculator; I would just like to preserve the original field text. I've had this same problem in the past using the `<BOL>` tag too.


title: postgis: difference with && operator and st_intersects

text: I found that there is a difference in result between using A && B operator or one of the geo functions like `st_intersects(A,B)` or `st_overlaps(A,B)` While the st_intersects or st_overlaps functions returns query results without errors the operator version SOMETIMES results in errors over the SRID: > ERROR: Operation on two geometries with different SRID's. > > ERROR: Operation on two geometries with different SRIDs SQL state: XX000 All of the records seem to be OKE, having the correct SRID, none missing. The query is generated by MAPSERV WMS server, so what is there to do? Sample query:               Operator &&          select encode(AsBinary(force_collection(force_2d("geometry")),'NDR'),'hex') as geom, "id"      from (select * from soils.vw_zones) as vw     where geometry && GeomFromText('POLYGON((75722.1945223652   437331.342330005,75722.1945223652 503295.946741193,169438.897876772 503295.946741193,169438.897876772 437331.342330005,75722.1945223652 437331.342330005))',find_srid('','soils.vw_zones','geometry'))           ST_INTERSECTS          select encode(AsBinary(force_collection(force_2d("geometry")),'NDR'),'hex') as geom, "id"      from (select * from soils.vw_zones) as vw     where st_intersects(geometry,GeomFromText('POLYGON((75722.1945223652 437331.342330005,75722.1945223652 503295.946741193,169438.897876772 503295.946741193,169438.897876772 437331.342330005,75722.1945223652 437331.342330005))',find_srid('','soils.vw_zones','geometry')))


title: Arcpy Cell Statistics - maximum number of input rasters

text: I am running cell statistics in arcpy. Essentially I am summing together a folder of grd files to create a new grd representing their sum This will eventually take place on a folder of 20,000 raster grds. Is there a maximum number of raster datasets that can be processed by the cellStatistics tool?


title: Rasterizing vectors in SAGA via saga_cmd - how to set the exact cellsize, extent (basicly grid system) based on other grid?

text: I'm doing some batch analysis using SAGA's `saga_cmd`. Basicaly I have a lot of grids and shapes (mainly generated in SAGA by vectorization of raster classifiaction results). _Now I'm trying to make thing's the other way:_ I want to run `saga_cmd grid_gridding 0` to rasterize polygons but I need the resulting grid to be adjacent to every other raster I got right now (each one was used in some analysis and each one is in the same SAGA's grid system). Because spatial extent of vector data isn't allways the same it is quite problematic to set it manually using `[-USER_XMIN <str>] [-USER_XMAX <str>] [-USER_YMIN <str>] [-USER_YMAX <str>] [-USER_SIZE <str>] [-USER_FIT <str>]` options. When using SAGA's GUI there is a wizzard to do such thing (to choose Grid system when any grid is loaded in SAGA) but my question is how to do it using batch mode?


title: How to copy non-spatial data from an Oracle database to a file geodatabase?

text: I have a model (shown below) that runs fine minus one small portion (outlined in red). I have tried various ways to remedy this but to no avail. The issue I'm having is this: The top portion of the model runs smoothly, as it is pulling data from an Oracle dB that has geometry (via the 'Make Query Layer' tool), and therefore I'm able to use the 'Copy Features' tool in order to store it in a File Geodatabase. This, as you may know, is because the 'Copy Features' tool only accepts a Feature Class or a Layer that has spatial attributes as input. Ergo, when it comes time to run the portion below it, I cannot use 'Copy Features', as it will not accept the 'Make Query Layer' of something from oracle that is not spatial, due to it simply being a table. So in its place, I am using 'Make Table View', which successfully accepts my 'Make Query Layer' as input. However, the error message seen below appears when it comes time to run itself. The rest of the model then takes the result of the 'Make Table View', and runs 'Make XY Event Layer' (as the table being pulled has an X/Y column for coordinates). From there, I then run the 'Copy Features' tool to import it into a File Geodatabase. Oddly enough, I also receive an error (listed below) if I try to simply go straight from the 'Make Query Layer' output and use it as the input for the 'Make XY Event Layer'. Trying the tool 'Copy Rows', also receives an error. Is anyone aware of any other way in which you can pull non-spatial data (e.g. a table) and then somehow transfer it to a File Geodatabase Table? I've searched through the other tools that seemed intuitive enough to look for, but had no such luck. I appreciate any help that anyone can offer, thank you! ![Model Builder](http://i.stack.imgur.com/kvDoO.jpg) ![Error Message](http://i.stack.imgur.com/I4m2t.jpg) ![Make Table View](http://i.stack.imgur.com/12B9r.jpg) ![Error #2](http://i.stack.imgur.com/c4qNp.jpg) ![Copy Rows](http://i.stack.imgur.com/Dczxl.jpg)


title: Getting layers from SDE with vba

text: Im running arcmap 9.1. i have the code that lists feature classes in a list box from the SDE. The users select from one list box and adds it to another list box. How do i get it to show the layer name not feature class name?? How can i make sure it keeps the same symbology as it has in the SDE? When i run this code it adds it as new layer with new symbology. I do not have the password for the SDE so it is extracting the feature classes by using the parent workspace of a selected layer in the Layers list.               Public Sub AddSDECoverageLayer()               Dim pFWorkspace As IFeatureWorkspace     Dim pFeatureWorkspace As IFeatureWorkspace          Dim pFLayer As IFeatureLayer          Dim pMxDoc As IMxDocument     Dim pMap As IMap          Dim pDataSet As IDataset     Dim pFeatureLayer As IFeatureLayer     Dim pFeatureClassName As IFeatureClassName     Dim pUnknown As IUnknown     Dim pWorkSpace As IWorkspace     Dim pParentWorkSpaceName As IWorkspaceName                     ' Get the selected layer      Set pMxDoc = ThisDocument           Set pUnknown = pMxDoc.SelectedLayer        If Not TypeOf pUnknown Is IFeatureLayer Then        Exit Sub      End If      Set pFeatureLayer = pUnknown                     ' Make sure the layer is from SDE and get the parent workspace        Set pDataSet = pFeatureLayer.FeatureClass        Set pFeatureClassName = pDataSet.FullName        Set pFWorkspace = pDataSet.Workspace       ' If Not pWorkSpace.Type = esriRemoteDatabaseWorkspace Then       '  MsgBox "Not an SDE feature class"       '  Exit Sub       'End If       'Set pDataSet = pWorkSpace       'Set pParentWorkSpaceName = pDataSet.FullName                 Dim intX As Integer           'Add each FeatureLayer to the map document      'Create New Layer      ‘ How do I keep the symbology the same as whats on the SDE?           For intX = 0 To ListBox2.ListCount - 1               Set pFLayer = New FeatureLayer             Set pFLayer.FeatureClass = pFWorkspace.OpenFeatureClass(ListBox2.List(intX))                  pFLayer.Name = pFLayer.FeatureClass.AliasName             Set pMxDoc = ThisDocument             Set pMap = pMxDoc.FocusMap                  pMap.AddLayer pFLayer     Next               pMxDoc.ActiveView.Refresh                    End Sub      **The code below gets the feature class name and adds them to listbox.**               Private Sub CommandButton4_Click()          Dim pDoc As IMxDocument     Set pDoc = ThisDocument          Dim pUnknown As IUnknown          Dim pFeatureLayer As IFeatureLayer     Dim pMxDoc As IMxDocument     Dim pSdeWorkspaceFactory As IWorkspaceFactory          Dim pWorkSpace As IWorkspace     Dim pParentWorkSpaceName As IWorkspaceName     Dim pDataSet As IDataset     Dim pFeatureClassName As IFeatureClassName               Dim pFWorkspace As IFeatureWorkspace           'Get the selected layer       Set pMxDoc = ThisDocument       Set pUnknown = pMxDoc.SelectedLayer          If Not TypeOf pUnknown Is IFeatureLayer Then         Exit Sub        End If        Set pFeatureLayer = pUnknown                 ' Make sure the layer is from SDE and get the parent workspace       Set pDataSet = pFeatureLayer.FeatureClass       Set pFeatureClassName = pDataSet.FullName      'Set pFWorkspace = pDataSet.Workspace       Set pWorkSpace = pFWorkspace         If Not pWorkSpace.Type = esriRemoteDatabaseWorkspace Then         MsgBox "Not an SDE feature class"       Exit Sub       End If     Set pDataSet = pWorkSpace     Set pParentWorkSpaceName = pDataSet.FullName          Dim pEnumDSName As IEnumDatasetName     Dim pSdeDSName As IDatasetName          Set pEnumDSName = pWorkSpace.DatasetNames(esriDTFeatureClass)     Set pSdeDSName = pEnumDSName.Next     Set pFWorkspace = pWorkSpace      **how do I get it to show layer name and not feature class name?**                  While Not pSdeDSName Is Nothing         ListBox1.AddItem pSdeDSName.Name       Set pSdeDSName = pEnumDSName.Next          Wend                    End Sub


title: Simplification Tolerance value field is missing from Simplify Polygon tool of ArcGIS for Desktop?

text: Trying to run Simplify Polygon (Cartography -> Generalization) tool in ArcGIS 10.2 (ArcInfo License). I ran the tool successfully once, then tried again on a new polygon, but the simplification tolerance value field is missing...so running the tool results in an error that the missing value is required. I tried restarting ArcMap but the field is still missing. Is this a bug in the software or has anyone else had a similar experience?


title: How to programmatically create exports from PostGIS database into different file formats (e.g. shapefile, dxf, dgn,...)?

text: Is there a kind of wrapper/library written in python which would enable me to programatically create exports from postgis database into different file formats (most common being, shapefile, dxf, dgn,...). If not i ll probably build one myself using psycopg2, gdal and ogr, these are probably components to start with, yeah? I need this because i ll be making some kind of web service for data exports. Thanks


title: Rename las files with Python

text: I have a bunch of LAS files that have been delivered with different naming conventions. I want to rename the files to all have the same uniform naming - based on the easting and northing coordinates of each tiles centroid.   I have generated a text file with the old and new names, and am trying to piece together a python script - but am running into this error               Traceback (most recent call last):       File "C:\LASTools\Test\ReName_Files.py", line 64, in <module>         newName = newList[indexOldName]     NameError: name 'indexOldName' is not defined      Here's the script. I am very new to Python and so this could take me hours of research and trial and error (it already has).               import os         folder = "C:\LASTools\Test\\"         lookupTable = open(folder + "LookupTable.txt")     tableList = lookupTable.readlines()     lookupTable.close()          old = "TIFF"     new = "TILE"          newTable = []     for line in tableList:          newLine = line.strip()            newerLine = newLine.strip(",")            newestLine = newerLine.strip("'")             almostFinalLine = newestLine.replace('"',"")            finalLine = almostFinalLine.split(",")          newTable.append(finalLine)          header = newTable[0]     indexOld = header.index(old) - 1     indexNew = header.index(new) - 1          oldList = []     newList = []     for item in newTable:         if item != newTable[0]:             valueOld = item[indexOld]             valueNew = item[indexNew]             oldList.append(valueOld)             newList.append(valueNew)          for file in os.listdir(folder):         nameAndExt = os.path.splitext(file)         oldName = nameAndExt[0]         extension = nameAndExt[1]         print oldName          if oldName in oldList:         indexOldName = oldList.index(oldName)          newName = newList[indexOldName]          os.rename(folder + oldName + extension, folder + newName + extension)


title: Import ASCII (X, Y, Value) to Feature Attribute in ArcGIS

text: The output from my landscaping modeling program is simply way too big to be rendered by Paraview. So I am wondering is there anyway that I can import it into ArcMap. The data is divided into several files, with one .nodeinfo file which contains x-y coordinates and other files contain data but in the same order. I can re-arrange them into a |x|y|value| format from Matlab, but I don't know how can I import this into ArcMap. This is just like the reverse version of "Export Feature Attribute to ASCII" function in ArcMap.


title: Create a filter for an attribute having multiple values

text: I am new to WFS and am trying to create a filter to get all the features that have their basename = "XYZ". The structure of a single record is as:               <gml:featureMember>             <core:AdminPlace gml:id="ADMN_21493454">                 <core:featureNames>                     <core:FeatureName>                         <core:basename>ABC</core:basename>                         <core:languageCode>ENG</core:languageCode>                     </core:FeatureName>                     <core:FeatureName>                         <core:basename>DEF</core:basename>                         <core:languageCode>ENG</core:languageCode>                     </core:FeatureName>                     <core:FeatureName>                         <core:basename>XYZ</core:basename>                         <core:languageCode>ENG</core:languageCode>                     </core:FeatureName>                 </core:featureNames>                 <core:adminLevel>4</core:adminLevel>                 <core:dummyAdmin>N</core:dummyAdmin>              </core:AdminPlace>         </gml:featureMember> I am trying to use the XML iput for POST to WFS as:               <?xml version="1.0" encoding="UTF-8"?>     <wfs:GetFeature service="WFS" version="1.0.0"       xmlns:tns="http://www.abc.com/core"       xmlns:wfs="http://www.opengis.net/wfs"       outputFormat="GML3.1">        <wfs:Query typeName="tns:AdminPlace">         <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">            <ogc:PropertyIsEqualTo>              <ogc:PropertyName>tns:featureNames/tns:FeatureName/tns:basename</ogc:PropertyName>             <ogc:Literal>Ellerth</ogc:Literal>             </ogc:PropertyIsEqualTo>         </ogc:Filter>       </wfs:Query>     </wfs:GetFeature> but I am not able to get the result. The error message thrown is : There was an error processing the event:GetFeatureException: Error while retrieving features: could not resolve property: featureNames.featureName. Thanks in advance.


title: QGIS 2.0 won't open on OSX Mavericks

text: I successfully installed QGIS 2.0 on my macbook running OSX Mavericks, but when I attempt to open the program, I get the following message: "QGIS cannot be opened because of a problem. Check with the developer and make sure QGIS works with this version of OS X. You may need to reinstall the application. Be sure to install any available updates for the application and OS X." As far as I can tell, everything is updated and I reinstalled QGIS twice with no luck. Problem details and system configuration: Process: QGIS [1087] Path: /Applications/QGIS.app/Contents/MacOS/QGIS Identifier: org.qgis.qgis2 Version: ??? Code Type: X86-64 (Native) Parent Process: launchd [132] Responsible: QGIS [1087] User ID: 501 Date/Time: 2014-01-06 17:36:06.120 -0500 OS Version: Mac OS X 10.9.1 (13B42) Report Version: 11 Anonymous UUID: FC49D1E1-1069-09AE-FE37-E5ADF06A6277 Sleep/Wake UUID: 03863BF4-29D6-4A54-A415-DD0D62750EEF Crashed Thread: 0 Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000 Application Specific Information: dyld: launch, loading dependent libraries Dyld Error Message: Library not loaded: /Library/Frameworks/PROJ.framework/Versions/4/PROJ Referenced from: /Applications/QGIS.app/Contents/MacOS/QGIS Reason: Incompatible library version: QGIS requires version 8.0.0 or later, but PROJ provides version 7.0.0 Binary Images: 0x7fff6b7f7000 - 0x7fff6b82a817 dyld (239.3) /usr/lib/dyld 0x7fff87216000 - 0x7fff87280ff7 com.apple.framework.IOKit (2.0.1 - 907.1.13) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff8f37e000 - 0x7fff8f37efff com.apple.ApplicationServices (48 - 48) <3E3F01A8-314D-378F-835E-9CC4F8820031> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x7fff90e77000 - 0x7fff9105cff7 com.apple.CoreFoundation (6.9 - 855.11) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation Model: MacBook5,1, BootROM MB51.007D.B03, 2 processors, Intel Core 2 Duo, 2.4 GHz, 2 GB, SMC 1.32f8 Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB Memory Module: BANK 0/DIMM0, 1 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142323837344448312D4346382020 Memory Module: BANK 0/DIMM1, 1 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142323837344448312D4346382020 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.98.100.22) Bluetooth: Version 4.2.0f6 12982, 3 services, 23 devices, 1 incoming serial ports Network Service: AirPort, AirPort, en1 Serial ATA Device: TOSHIBA MK2553GSX, 250.06 GB Serial ATA Device: MATSHITADVD-R UJ-868 USB Device: Built-in iSight USB Device: BRCM2046 Hub USB Device: Bluetooth USB Host Controller USB Device: Apple Internal Keyboard / Trackpad USB Device: IR Receiver Thunderbolt Bus:


title: Is it possible to save multi ring polygons to the ArcGIS server REST API?

text: I'm trying to insert new polygons that the user has drawn through the addFeatures REST endpoint and I'm getting an error when the user draws a bow- tie and tries to insert it. Is this simply not supported or am I missing some geoprocessing step?


title: Rectangular buffer

text: I am going to collect data in the field within rectangular sample plots 100 x 120m. Anyone knows how to create plot having a shape like I have mentioned. Please help.


title: How to detect if a process in the model has successfully run in Model Builder?

text: I have a model designded in Model Builder to process raster datasets. It embraces a whole bunch of processes such as raster calcualtion, BlockStatistics and Kriging. I am wondering how I can put in success validation for each of the process in the model in Model Builder to detect if the process has successfully run. Is it possible without converting the model to python? p.s. The Model will be eventually published as Geoprocessing Service by ArcGIS Server 10.1 so that the web browse calls the service and then gets a Result as the output in JSON if the Model rans successfully or on which process it failed. The success validation component should be part of the Model and generate result as parameter of the model. Thanks in advance. Cheers, Alex