GeoDjango Admin: Adding PointField latitude and longitude to other fields

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)


Multi-Band (RGBA) into single band raster

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


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

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?


how can use a offline basemap?

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..


Optimize ArcServer Service Drawing Speed

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?


Want a transformation box after a user draws a polygon

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


Polygon from line creation problem

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.


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

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?


What is the OSGeo4W-equivalent for Linux?

> 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.


Error on FeatureClass To FeatureClass conversion arcpy

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"


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

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.


Select By Attribute in OpenLayers

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.


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

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?


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

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?


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

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.


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

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?


How to translate ESRI cursor example to pyQgis?

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


Spatial Query plugin broken in MacOS version?

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?


How can I aggregate points to polygons?

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)


Medium resolution imagery for the US?

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.


How can I work with 3+ Gigabyte TIFF Files?

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.


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

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?


GeoServer Callback Function Undefinded

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);


Finding closest Intersection between line strings (PostGIS)

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)


Create buffer in Metres

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?


Error opening Google layer in QGIS

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.


Manually add lat and lon to ArcGIS Interactive Rematch

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?


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

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


"Flattening" two shapefiles together

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).


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

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)


Creating records in output shapefile using Python

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 --')


ArcGIS 10 exports losing precision with large numbers

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?


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

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?


Merge DEM and Hillshade to create one file?

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


TIN file to a POINT file

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.


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

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?


Unselect Individual Selected Features using ArcObjects

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?


Gdal_Calc.py random pixel error

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.


QGIS Rasterization of points

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?


Copy dbf data into a shapefile in Arcpy

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!


FIPS code data combination

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?


How to classify/style rasters correctly?

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?


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

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


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

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?


How to set max map scale for a layer?

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)


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

**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"?


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

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.)


Geoserver Realm

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?


hiding some "feature"s in GeoJSON file on map

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


how to calculate area verses each NDVI value?

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?


Preserve attribute table while using extract by mask in arcgis

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.


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

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?


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

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.


polytiles error

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


Map production checklist for organisation

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?


cs2cs works one way but not the other

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?


How to iterate and combine bands in model builders

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?


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

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


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

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


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

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);                 }             }


XY to Line tool crashing

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?


How to Use Label Expression with Text Formatting Tags

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.


postgis: difference with && operator and st_intersects

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')))


Arcpy Cell Statistics - maximum number of input rasters

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?


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

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?


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

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)


Getting layers from SDE with vba

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


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

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?


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

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


Rename las files with Python

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)


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

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.


Create a filter for an attribute having multiple values

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.


QGIS 2.0 won't open on OSX Mavericks

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:


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

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?


Rectangular buffer

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.


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

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


Why can't I open postgis layers in QGIS?

I've set up a table in PostGIS using OSM data (converted using osm2pgsql). I know this database is good, because I'm able to import it and work with it in TileMill, but whenever I try to interact with any of the layers in QGIS (1.8.0, OSX), the Add button is greyed out (even if I put in a query). I've tested the connection and when I test my queries it shows that lots of rows were returned, so (again), the data's clearly there—I just can't open it up. CLARIFICATION: It's also worth noting that QGIS is able to see the database just fine. I can build queries and read out data in the Add PostGIS layer interface and everything comes back correctly. The only thing I can't do in the Add PostGIS Layer interface is add the layer. CLARIFICATION 2 (from the comments): `postgis_version` returns 2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1. The extensions active on the database are plpgsql (1.0), postgis (2.0.3), and postgis_topology (2.0.3). Postgres and postgis were installed using Homebrew. The table does (now) have a primary key, but QGIS doesn't appear to find it. Screenshots: ![](http://ge.tt/api/1/files/4chLoGn/0/blob/x675?noinc=1) ![](http://ge.tt/api/1/files/4chLoGn/1/blob/x675?noinc=1)


Using pgr_drivingDistance with large ids

I have little experience with postgres and none with pgrouting. I'm trying to use the `pgr_drivingDistance` function with Open Street Map data (generated through `osm2po`), but whenever I run my query:               SELECT pgr_drivingDistance('SELECT id, osm_source_id::int4 AS source, osm_target_id::int4 AS target, cost::float8 AS cost FROM nyc_2po_4pgr', 85, 2, false, false);      I get `ERROR: integer out of range`—I assume because some of the osm_source_ids I'm getting in don't fit in an `int4`. Is that what's going on? I'm using a small subsection of the OSM data, so I assume I could squash the source_ids/target_ids into an `int4` range. How would I do that? Alternatively, is there a way to make the `pgr_drivingDistance` work with the larger source/target ids?


Setting coordinate system in PostGIS

The geographical information data that INEGI (part of the Mexico's goverment) provides are in the following coordinate system (or is projection?)               Lambert Conformal Conic, double standard parallel     Units: Meter     Coordinate System Type:     Datum: World Geodetic System of 1984.     False Origin     Northing: 0.0000     Easting: 2500000.000     Projection Parameters     Origin latitude: 12° 0’ 0.0’’     Origin longitude: -102° 0’ 0.0’’     Northern standard parallel: 29° 30’ 0.0’’     Southern standard parallel: 17° 30’ 0.0’’      I already put the information in the PostGIS/PostgreSQL database, now, How I can change the projection/coordinate system to that projection? Could you provide the code for doing it? And How I can change it to the coordinate system that Google use?


How to use ArcObjects to limit classes visible in legend?

Is there a method use ArcObjects for .NET to manipulate the "Only show classes that are visible in the current map extent" option for legend items? The GUI for this functionality is accessible via the legend properties: ![enter image description here](http://i.stack.imgur.com/pXX9Y.png) I have read through the ESRI documentation for the interfaces supported by Legend, and ILegendItem3 but have not found anything relevant.


Installing the development files libqgis-dev in Ubuntu 12.04

I am trying to install development files which include the headers and the libraries for qgis in Ubuntu 12.04. I used Ubuntu software center, synaptic and the terminal and am still getting the same result. The following packages have unmet dependencies: libqgis-dev: -Depends: libgeos-dev (>= 3.0.0) but 3.3.3-2~precise2 is to be installed -Depends: libgsl0-dev but it is not going to be installed -Depends: libqgis1.9.0 (= 1.9.0+git20120902+5a0d2f5~precise-ubuntugis1) but 1.9.0+git20120902+5a0d2f5~precise-ubuntugis1 is to be installed -Depends: libqt4-dev (>= 4.4.0) but 4:4.8.1-0ubuntu4.2 is to be installed -Depends: python-qt4 (>= 4.1.0) but 4.9.1-2ubuntu1 is to be installed -Depends: python-qt4-dev (>= 4.1.0) but it is not going to be installed -Depends: qt4-designer (>= 4.4.0) but 4:4.8.1-0ubuntu4.2 is to be installed Can anyone help me with this installation? Thank You.


How to create a customizabe table in QGIS Print Composer?

I would like to add a custom table to a map layout created in QGIS. I would like a fair bit of control over the look of the table (borders, background colours of the cells, etc.), and it appears that the "Add Attribute Table" tool doesn't let you control those things. I tried created what I wanted in Excel, and saving as an image, but of course it's pixelated. I would like a vector-based solution if at all possible. Any thoughts? I considered creating an .html table, and inserting that; is this the best method?


Arcpy Error 999999: Error executing points to line. Coordinates or Measures are out of bounds

I am selecting two points from a table and then doing a points to line function. I was originally getting this error because they were multipoints with multiple locations. I ran Multipart to Single Part on that layer and now am getting the same error on only a select few points but there are no multiples. What else can cause this error? Thanks! temporarytodraw holds 2 points and that's the result I get. I'm sorry I don't have much more to post than this. It selects points that match certain criteria and places them in the temporarytodraw but there is an if statement check to kick out any records that match less than 2 or more than 2.               arcpy.PointsToLine_management("temporarytodraw", "offset_line_thing", "", "", "NO_CLOSE")


gdal_translate KMLSUPEROVERLAY creates blank black image

I am trying to convert a geotiff to kmz file to view in GE. The geotiff is 878,720 KB. Using a 'regular kml' - the resolution is very low in GE. Having read around - it seems as conversion to a superoverlay is the best method? I have chosen to use gdal_translate above other methods (e.g. MapTiler or Arc's tool that costs) because I have been using the GDAL python library already and I am trying to automate the entire process. To test, I type into UNIX:               gdal_translate -of KMLSUPEROVERLAY filepath/2010_full_mosaic.tif filepath/2010_full_mosaic.kmz      A kml file is created....but on loading it into GE it is blank (black) - although extent/projection appear correct. Would anyone be able to advise what I may have done wrong? When using the gdalinfo command, I am provided the following details:               Driver: GTiff/GeoTIFF     Files: Filepath/2010_full_mosaic.tif            Filepath/2010_full_mosaic.tif.ovr            Filepath/2010_full_mosaic.tif.aux.xml     Size is 10572, 22630     Coordinate System is:     PROJCS["WGS 84 / UTM zone 36S",         GEOGCS["WGS 84",              DATUM["WGS_1984",                 SPHEROID["WGS 84",6378137,298.257223563,                     AUTHORITY["EPSG","7030"]],                 AUTHORITY["EPSG","6326"]],             PRIMEM["Greenwich",0],             UNIT["degree",0.0174532925199433],             AUTHORITY["EPSG","4326"]],         PROJECTION["Transverse_Mercator"],         PARAMETER["latitude_of_origin",0],         PARAMETER["central_meridian",33],         PARAMETER["scale_factor",0.9996],         PARAMETER["false_easting",500000],         PARAMETER["false_northing",10000000],         UNIT["metre",1,             AUTHORITY["EPSG","9001"]],         AUTHORITY["EPSG","32736"]]     Origin = (390313.896406000014395,8164584.107470000162721)     Pixel Size = (25.000000000000000,-25.000624509551976)     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=BAND     Corner Coordinates:     Upper Left  (  390313.896, 8164584.107) ( 31d58'18.28"E, 16d35'54.43"S)     Lower Left  (  390313.896, 7598819.975) ( 31d56'22.37"E, 21d42'38.47"S)     Upper Right (  654613.896, 8164584.107) ( 34d26'57.65"E, 16d35'45.40"S)     Lower Right (  654613.896, 7598819.975) ( 34d29'41.00"E, 21d42'26.42"S)     Center      (  522463.896, 7881702.041) ( 33d12'49.09"E, 19d 9'27.96"S)     Band 1 Block=10572x1 Type=Float32, ColorInterp=Gray      Overviews: 5286x11315, 2643x5658, 1322x2829, 661x1415, 331x708, 166x354      Becky


Is there a no point symbology option in ArcGIS?

I'm sure it exists, but is there a way to set a point layer to have no symbology. This works best for cities as you just want to display the name, and not necesserily show the location. The way I do it now, is by picking a symbol and making the fill and outline to have "no color"


What is the smallest contour interval possible when derived from a DTM?

I am converting a 2m DTM to contours, and would like to have the smallest interval possible. Is there a theoretical limit, or even a rule of thumb for defining contour intervals based on the resolution of the source data?


buildings shadow areas calculation

is it possible to calculate shadow areas of buildings or simulate shadows of buildings in a city using e-cognition software, with the DSM of the buildings and the sun angle and azimuth known?....if not, could you please tell me the software that can do this work. thanks in advance...


Copy a polygon geometry in Arcpy

This to me sounded very simple so I am probably missing something basic here. What I need to do is to create a copy of a polygon shapefile to a new shapefile with slightly different attributes. Where I got stuck is in copying the geometry - Geometry doesn't have to change at all in the new shapefile. The actual 'copying' of the polygon geometry is not the problem. I loop through the input shapefile:               > for row in rows:     >     partnum = 0     >     feat=row.getValue("SHAPE")      And then I enter this shape in the output feature class:               outFeat.Shape=feat      Problem is, I also want to calculate the Area, Perimeter and centroid of the polygon and I can't seem to 'cast' the **_feat_** variable to a polygon so I can then get the polygon properties (area, centroid, etc). Can you do that somehow? One of the things I tried was to create the polygon from scratch, i.e. loop though the vertices of the input polygon and create a new polygon/array to use for the new polygon. This method apart from being IMO over the top, it also had the problems with the multi-part polygons. My polygons ended up corrupted - although I followed the steps outlined here I didn't dwell too much with it since what I did instead is create a dummy Polygon which I then passed to it the current geometry value in the cursor.               # Create a dummy polygon                 dummyArray=arcpy.Array()                 dummyPoint = arcpy.Point()                 coordList = [[[1,2], [2,4], [3,7]],[[6,8], [5,7], [7,2], [9,5]]]                 for feature in coordList:                     for coordPair in feature:                         dummyPoint.X = coordPair[0]                         dummyPoint.Y = coordPair[1]                         dummyArray.add(dummyPoint)                     dummyArray.add(dummyArray.getObject(0))                      parcel=arcpy.Polygon(dummyArray)                 parcel=feat ### --> This is where I replace the dummy geometry value with the current value in the loop                 parcel_c=arcpy.Point()                 parcel_c=parcel.centroid # I can now get to the polygon properties                 c_x=parcel_c.X                 c_y=parcel_c.Y      Although this works fine, I am not really happy with it as its a bit of a hacking and -as mentioned in the beginning- I think I am missing something vital! Any insights?


ArcGIS JS API Pop-Up w/TabContainer

I am attemtping to call a dojo tab container within an ESRI pop-up. The code that I have (see below) is able to create a pop-up with a tab container and the contents, but also creates three 'dead' dropdown menus. Is there a way to create the pop-up without the dropdown menus?                 var map;       var resizeTimer;       var identifyTask,identifyParams;            function init() {                 //setup the popup window          var popup = new esri.dijit.Popup({           fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]))         }, dojo.create("div"));              map = new esri.Map("map",{           infoWindow:popup,         });                   dojo.connect(map,"onLoad",mapReady);              //Add the imagery layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service             var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer");         map.addLayer(basemap);              var landBaseLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://<someServer>/ArcGIS/rest/services/test/MapServer");         map.addLayer(landBaseLayer)       }                function mapReady(map){                 dojo.connect(map,"onClick",executeIdentifyTask);                 //create identify tasks and setup parameters             identifyTask = new esri.tasks.IdentifyTask("http://<someServer>/ArcGIS/rest/services/test/MapServer");                 identifyParams = new esri.tasks.IdentifyParameters();            identifyParams.tolerance = 3;            identifyParams.returnGeometry = true;            identifyParams.layerIds = [0];            identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;            identifyParams.width  = map.width;            identifyParams.height = map.height;                      //resize the map when the browser resizes            dojo.connect(dijit.byId('map'), 'resize', map,map.resize);                }                 function executeIdentifyTask(evt) {                 identifyParams.geometry = evt.mapPoint;                 identifyParams.mapExtent = map.extent;         var deferred = identifyTask.execute(identifyParams);              deferred.addCallback(function(response) {                // response is an array of identify result objects               // Let's return an array of features.           return dojo.map(response, function(result) {             var feature = result.feature;             feature.attributes.layerName = result.layerName;             console.log(feature.attributes.OBJECTID);             var template = new esri.InfoTemplate();             template.setTitle("Hello World");             template.setContent(getWindowContent);             feature.setInfoTemplate(template);             return feature;           });         });                   // InfoWindow expects an array of features from each deferred         // object that you pass. If the response from the task execution          // above is not an array of features, then you need to add a callback         // like the one above to post-process the response and return an         // array of features.         map.infoWindow.setFeatures([ deferred ]);         map.infoWindow.show(evt.mapPoint);       }            function getWindowContent(graphic) {         //make a tab container          var tc = new dijit.layout.TabContainer({         });              return tc.domNode;       }            dojo.addOnLoad(init);