title: Geoprocessing service failure

text: I have a python script tool that I have published to a geoprocessing service. Every time I run the service it fails. Here's what I'm getting for errors: ![enter image description here](http://i.stack.imgur.com/IqE3V.png) The python code in the tool is below:               import arcpy, arcgisscripting, sys, os     MapIndexFC = r'C:\Users\p04729\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog\Testing.sde\MapSets_D04_ALL_HFs_MapIndex_WGS84'     MapIndexLyr = r'\\sv04esri\Records\GIS\MapSheetImages\MapIndexSelected.lyr'     ImageOutput = r'\\sv04esri\Records\GIS\MapSheetImages\Testing.gdb\Image.lyr'     MI_FC_field = 'filename'     out_buffer_FC = r'C:\Users\p04729\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog\Testing.sde\Buffer'     MapIndexSelect = r'C:\Users\p04729\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog\Testing.sde\Selected_Features'               arcpy.env.overwriteOutput = True          Input = arcpy.GetParameterAsText(0)     Fset = arcpy.FeatureSet()     Fset.load(Input)          arcpy.Buffer_analysis(Fset,out_buffer_FC,'5 FEET','FULL','ROUND','ALL')          arcpy.MakeFeatureLayer_management(MapIndexFC,MapIndexLyr)          arcpy.AddMessage('selecting features in Map Index layer...')     arcpy.SelectLayerByLocation_management(MapIndexLyr,'INTERSECT',out_buffer_FC)          matchcount = int(arcpy.GetCount_management(MapIndexLyr).getOutput(0))     if matchcount == 0:         print('no Map Index features were selected...')         arcpy.AddError('You must select a feature from the Map Index layer, exiting script')         sys.exit()     else:         arcpy.CopyFeatures_management(MapIndexLyr, MapIndexSelect)              for row in arcpy.da.SearchCursor(MapIndexSelect,MI_FC_field):             selected_val = row[0]             img_name = selected_val.split('.')[0]             arcpy.AddMessage('iterating over selected Map Index features. ..')             arcpy.AddMessage('looking for image...')             for dirpath, dirnames, filenames in os.walk(r'\\sv04esri\Records\GIS\MapSheetImages'):                 for file in filenames:                     if file.endswith('.tif') or file.endswith('.sid'):                         if img_name in file:                             Out = arcpy.MakeRasterLayer_management(dirpath+'\\'+file)                             arcpy.SetParameter(1,Out)              del row, selected_val, img_name      The error is telling me that my Buffer output does not exist or is not supported. I know it does exist, and I'm unsure why it would not be supported?


title: ArcObjects SDK Server toolbox

text: Seems to be a recurring nightmare here, but it seems ESRI UK gave us a bum steer. You do not need to install ArcObjects .NET SDK (and, of course, the obligatory VS IDE), but you do need to have an installation of one of the desktop products in order to be able to use the dlls. Heres a link to the help page, but it appears you need to have ArcMap/ArcCatalog/etc installed in order to fully be able to deploy any application you've developed using ArcObjects? Is this insanity on my part? I would have thought the easiest way would be to bundle the dlls, but am told you can reference the GAC dlls (Not too sure I understand this so a steer would be appreciated). However, ESRI docs seem to clearly state they cannot be deployed without an appropriate ArcGIS Desktop application installed. Surely this is just for custom Desktop tools and not AGS tools? Any ideas?


title: POST not implemented

text: I'm developing a client wps modifying the example WPSDemo.js from http://suite.opengeo.org/4.1/processing/wpsclient/index.html . I'm using zoo- project as WPS server. I'm trying to invoke the "buffer" process implemented in GRASS GIS gives me the following error:               POST http://localhost:9080/proxy/?url=http%3A%2F%2Flocalhost%2Fcgi-bin%2Fzoo_loader.cgi%3F 501 (Not Implemented)      The query POST is:               <wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0" version="1.0.0" service="WPS" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">     <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">v_buffer</ows:Identifier>     <wps:DataInputs>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">input</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Or data source for direct OGR access</ows:Title>             <wps:Data>                 <wps:ComplexData mimeType="text/xml"><![CDATA[<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"><gml:featureMember xmlns:gml="http://www.opengis.net/gml"><feature:features xmlns:feature="http://mapserver.gis.umn.edu/mapserver" fid="OpenLayers_Feature_Vector_248"><feature:geometry><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates decimal="." cs="," ts=" ">-6383273.5489707,1396657.4552779 -4230806.8327598,26905.908598173 -6246298.3943028,-442723.19312058 -6383273.5489707,1396657.4552779</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></feature:geometry></feature:features></gml:featureMember></wfs:FeatureCollection>]]></wps:ComplexData>             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">layer</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">A single vector map can be connected to multiple database tables. This number determines which table to use. When used with direct OGR access this is the layer name.</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">cats</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Example: 1,3,7-9,13</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">where</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Example: income  1000 and inhab :: 10000</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">type</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Feature type</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">distance</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Buffer distance along major axis in map units</ows:Title>             <wps:Data>                 <wps:LiteralData>195678.7923828125</wps:LiteralData>             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">minordistance</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Buffer distance along minor axis in map units</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">angle</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Angle of major axis in degrees</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">bufcolumn</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Name of column to use for buffer distances</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">scale</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Scaling factor for attribute column values</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">tolerance</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Maximum distance between theoretical arc and polygon segments as multiple of buffer</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">-s</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Make outside corners straight</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">-c</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Dont make caps at the ends of polylines</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>         <wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">-t</ows:Identifier>             <ows:Title xmlns:ows="http://www.opengis.net/ows/1.1">Transfer categories and attributes</ows:Title>             <wps:Data>                 <wps:LiteralData />             </wps:Data>         </wps:Input>     </wps:DataInputs>     <wps:ResponseForm>         <wps:RawDataOutput mimeType="text/xml">             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">output</ows:Identifier>         </wps:RawDataOutput>     </wps:ResponseForm>


title: Editing KML breaks icons

text: Edit: Solved it. When I was creating my new zip/kmz my code was creating various folders within the zip/kmz. Changed: NewZip.write(addedfile) to: NewZip.write(addedfile, newfl) /Edit I have KMZs that need changes to their points. The changes are simply updating their attributes - changing the values in the tables that appear when a point is clicked. My method involves extracting the files from the KMZ to a temp location, making a copy of the "doc.kml", digging through the copied "doc.kml" for instances of text that needs to be changed, and then renaming the old KMZ, creating a new KMZ with the same name as the original, and adding the all the files (including my edited "doc.kml") to the new KMZ. I have automated this process with a pthython script, but when I run it, any KMZs that gets updated have broken point icons. i can't find anything that would cause this - my changes are quite minimal and do not replace and obvious KML. Changes are formatted: "PR_A_1567_20" to "PR_AB_1567_20", so essentially I am adding an extra letter into a few lines of the KML. Anyone know why this might break icons? Everything else still functions perfectly. Thanks. Edit: Simpler question: Why does this KMZ work: https://drive.google.com/file/d/0B9n9YNu8ulsmb1ljQmJMdW5QQXc/edit?usp=sharing But not this one: https://drive.google.com/file/d/0B9n9YNu8ulsmLXYwNkpIQlY2STg/edit?usp=sharing /Edit Code:               import os     import zipfile     import arcpy          folder =r"C:\KMZTest"     table = r"C:\ProjectNumberSwitch_20140729.xlsx\C_Projects_Being_Switched$"     tblcolm = "Old_P6_NBR"     temploc = r"C:\KMZTest\Temp"          oldP6list = []     print "Finding project numbers"     cursor = arcpy.da.SearchCursor(table, tblcolm)     for row in cursor:         oldP6list.append(row[0])     del row     del cursor          updatedlist = []     for root, dirs, files in os.walk(folder):         for fil in files:             if "Projects.kmz" in fil or "Points.kmz" in fil:                 print                 print fil                 print                 flpath = os.path.join (root, fil)                 zipfl = zipfile.ZipFile(flpath)                 foundoldP6 = False                 for content in zipfl.namelist():                     zipfl.extract(content, temploc)                     if content == "doc.kml":                         doc = os.path.join(temploc, content)                         os.rename(doc, doc + ".tmp")                         destination = open(doc, "w")                         source = open(doc + ".tmp", "r")                         for line in source:                             for oldP6 in oldP6list:                                 if oldP6 in line:                                     foundoldP6 = True                                     print "found:", oldP6                                     line = (line.replace(oldP6, oldP6.split("C")[0] + "VC" + oldP6.split("C")[1]))                             destination.write(line)                         source.close()                         destination.close()                 zipfl.close()                 if foundoldP6 == True:                     print "Updating", fil                     updatedlist.append(fil)                     os.rename(flpath, flpath + ".tmp")                     NewZip = zipfile.ZipFile(flpath, "w")                     for newfl in os.listdir(temploc):                         if not newfl.endswith(".tmp"):                             addedfile = os.path.join (temploc, newfl)                             NewZip.write(addedfile)                                        os.remove(flpath + ".tmp")                 for oldfile in os.listdir(temploc):                     os.remove (os.path.join(temploc, oldfile))     print     print     print "Updated:"     for update in updatedlist:         print update          print     print "Done"


title: How can I programatically register a feature class as versioned

text: Is there a way to programatically register a feature class as versioned? I'm able to register a`FeatureDataset`with the IVersionObject3 interface, but not an individual feature class.


title: Selection on Feature layer (geoprocessing)

text: I have a feature layers with states and counties fields. I want to make a selection tool. Tool dialog should have input for feature layer and two drop downboxes for states and counties. When user gives input feature layer, states drop downbox should get updated with unique values fron states column so that user can select state. And when user select state the counties dropdown box should get updated with the counties of the selected state, so user can select county from the selected state only. After that when user click on ok button the respective county should get selected on map. Can anyone please tell me how can I achieve this using model builder or python script in arcgis desktop?


title: Which class should I use to work with vector layers?

text: I'm doing different operations on vector layers. Kindly suggest which class should I use for vector layer i.e QgsVectorLayer or QgsVectorLayerDataProvider.


title: How to load Shapefiles into a remote PostGIS db using command line?

text: Can we import a Shapefile from a system which doesn't have PostgreSQL installed (client machine) into a system having PostGIS installed? I am getting problem with 'shp2pgsql' and 'psql' since both are not recognized on the client machine. I am trying this using console.


title: How to compute mean coordinates?

text: Can anybody explain how to compute mean coordinates? Regards.


title: How to batch export layers to kml in Arcmap?

text: Is there a way to export layers to KML by altering the layer to KML tool to have more than one layer input?


title: How to edit feature attributes with openlayers?

text: I want to edit object's attributes on WFS layer. I see this example http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/styles_unique_with_group_wfs.html but popup is horrible. I want to use ExtJs form to editing.   So how to edit attributes in this case?


title: Execute Spyder within Grass GIS

text: I'm using GRASS Gis with a small Python script. Is there a way (for windows users) to use the sypder ide within grass? I looked at http://grasswiki.osgeo.org/wiki/Tools_for_Python_programming but there is only the command for linux (spyder -w . 2>/dev/null &) It would be great, if someone can post an small how-to to start spyder within grass. Thanks alot! Friedrich


title: How can I get SOESupport to handle Polymorphism?

text: I've got some business objects below that I can serialize and deserialize successfully with Json.NET. I don't see a simple way to do this with Esri's SOESupport however. I'm happy with Json.NET, but I'd like to leverage Esri's IGeometry conversion routines. Is there some way to get SOESupport to work for this? **Update:** Since it doesn't look like Esri can do this, I'm trying to use Json.NET. See my related issue on stackoverflow: How can I deserialize with TypeNameHandling.Objects in Json.NET Silverlight?               public class Animal     {         public string Name { get; set; }     }     public class Dog: Animal      {         public bool LikesBones { get; set; }     }     public class Cat: Animal      {         public bool LikesMice { get; set; }     }     public class Zoo     {         public int ID { get; set; }         private List<Animal> m_Animals = new List<Animal>();         public List<Animal> Animals { get { return m_Animals; } set { m_Animals = value; } }     }      Is there some way to get Esri's JsonObject to support this sort of test?               public static void Test1()     {         // use Json.NET         Zoo z1 = new Zoo() { ID = 1 };         z1.Animals.Add(new Dog() { Name = "Fido", LikesBones = true });         z1.Animals.Add(new Cat() { Name = "Felix", LikesMice = false });         string s1 = Util.Serialize(z1);                              Debug.Print(s1);         var z2 = Util.Deserialize<Zoo>(s1);         string s2 = Util.Serialize(z2);         Debug.Print(s2);         if (s1 != s2)             Debug.Print("failed");         else             Debug.Print("ok");     }      I can apply settings in Json.NET that force the typename to be serialized, allowing polymorphism for the list of Animals. How can I implement these same functions with SOESupport?               public static string Serialize(object o)     {         JsonSerializerSettings settings = new JsonSerializerSettings();         settings.TypeNameHandling = TypeNameHandling.Objects;         return JsonConvert.SerializeObject(o, Formatting.Indented, settings);     }     public static T Deserialize<T>(string s)     {         JsonSerializerSettings settings = new JsonSerializerSettings();         settings.TypeNameHandling = TypeNameHandling.Objects;         return JsonConvert.DeserializeObject<T>(s,settings);     }


title: geoserver wfs insert error

text: I keep getting an insert error from geoserver when trying to save a point, poly etc etc to my postgis table. any ideas, my code is below                   var Projection = new OpenLayers.Projection("EPSG:4326");               var map = new OpenLayers.Map("Map", {             //projection: new OpenLayers.Projection("EPSG:900913"),             displayProjection:Projection,             controls:[]             }         );              //add google map         var GoogleMap = new OpenLayers.Layer.Google(             "GoogleSatellite",{                 type:G_SATELLITE_MAP,                 isBaseLayer:true,                 sphericalMercator:true,                 maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),                 numZoomLevels: 21               }          );                var NYC = new OpenLayers.Layer.WMS(           "nyc_buildings - Tiled", "http://soiisdev:8080/geoserver/wms",             {                 layers: 'cite:nyc_buildings',                 styles: '',                 format: "image/png",                 tiled: 'true',                 transparent: true,                 Projection:Projection              },             {                 buffer: 0,                 displayOutsideMaxExtent: true             }                       );              var saveStrategy = new OpenLayers.Strategy.Save({auto:true})              var vectors = new OpenLayers.Layer.Vector("Vectors", {             strategies: [                 new OpenLayers.Strategy.BBOX(),                  saveStrategy             ],             Projection:Projection,              protocol: new OpenLayers.Protocol.WFS({                 version: "1.1.0",                  url:  "http://soiisdev:8080/geoserver/wfs",                 featureNS : "http://www.opengeospatial.net/cite",                  featureType: "nyc_vectors",                 srsName: "EPSG:4326"             })         });              map.addLayers([GoogleMap, NYC, vectors]);          //map.zoomToMaxExtent();              var LonLat = new OpenLayers.LonLat(-73.988113, 40.750898);         LonLat.transform(Projection, map.getProjectionObject());           map.setCenter(LonLat, 15);       ive checked the header in fiddler and below is the xml sent to geoserver               <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation="http://www.opengis.net/wfs  http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">     <wfs:Insert>      <feature:nyc_vectors xmlns:feature="http://www.opengeospatial.net/cite">        <feature:the_geom>          <gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">            <gml:pos>-73.986374928559 40.742379645006</gml:pos>          </gml:Point>        </feature:the_geom>      </feature:nyc_vectors>


title: GRASS module g.copy returns irrational outputs

text: I took this as reference, Moving raster to different mapset GRASS GIS, and I use **pyscripter** to use GRASS module **g.copy** from outside,               import os     import sys          #set up GRASS environment variables     sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python'))     import grass.script as g     import grass.script.setup as gsetup     gisbase = os.environ['GISBASE']     gisdb = 'C:\Users\Heinz\Documents\grassdata'     location = 'newLocation'     mapset = 'watershed_analysis'     gsetup.init(gisbase, gisdb, location, mapset)          #copy raster data     g.run_command('g.copy', rast = 'hc@TC, hc')          #check result     print g.read_command('g.list', _type = 'rast')      The output is raster files in mapset PERMANENT, thus not what I want. (current mapset is watershed_analysis)               *** Remote Interpreter Reinitialized  ***     >>>      ----------------------------------------------          raster files available in mapset <PERMANENT>:     hc          ----------------------------------------------      Seems I don't successfully copy the raster file to the mapset I want. How to fix this problem？ I am using GRASS 6.4.3, python 2.7.6 under Windows 8.1 x64. * * * **Update#1** @gene, I do the same thing in the python shell of the GRASS layer manager,               Python 2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win32     Type "help", "copyright", "credits" or "license" for more information.     >>>import grass.script as g     >>>g.run_command('g.copy', rast = 'acc@TC, acc@watershed_analysis')     0          >>>g.read_command('g.list', _type = 'rast')     ----------------------------------------------          raster files available in mapset <PERMANENT>:     hc          ----------------------------------------------          g.read_command('g.mlist', _type = 'rast')     hc      In the output above, I want to copy the file **acc** from mapset TC to current mapset watershed_analysis, but the output still tells me about another mapset. (g.list and g.mlist outputs the same except the later one wouldn't tell me the info of mapset.) **And I go to check results in the file of this mapset, there are no new file copied to it.** Maybe there are problems in my script. * * * **Update#2** If I tried the module in GRASS GUI, here's result, ![enter image description here](http://i.stack.imgur.com/SrRkM.png) ![enter image description here](http://i.stack.imgur.com/VoFxb.png) No output but the error message,               Traceback (most recent call last):               File "C:\OSGeo4W\apps\grass\grass-6.4.3\etc\wxpython\gui_c     ore\forms.py", line 655, in OnRun          self.goutput.RunCmd(cmd, onDone = self.OnDone)       File "C:\OSGeo4W\apps\grass\grass-6.4.3\etc\wxpython\gui_c     ore\goutput.py", line 554, in RunCmd          task = GUI(show = None).ParseCommand(command)       File "C:\OSGeo4W\apps\grass\grass-6.4.3\etc\wxpython\gui_c     ore\forms.py", line 1871, in ParseCommand          blackList = _blackList)       File "C:\OSGeo4W\apps\grass\grass-6.4.3\etc\python\grass\s     cript\task.py", line 470, in parse_interface          tree = etree.fromstring(get_interface_description(name))       File     "C:\OSGeo4W\apps\Python27\lib\xml\etree\ElementTree.py",     line 1300, in XML          parser.feed(text)       File     "C:\OSGeo4W\apps\Python27\lib\xml\etree\ElementTree.py",     line 1642, in feed          self._raiseerror(v)       File     "C:\OSGeo4W\apps\Python27\lib\xml\etree\ElementTree.py",     line 1506, in _raiseerror          raise err     xml.etree.ElementTree     .     ParseError     :     unknown encoding: line 1, column 30      I don't know if I did something wrong in inputs.


title: Problem with Command Console (GRASS GIS 7.0,0 beta2 on Windows 8.1)

text: I have a problem with Command Console. When I do for example, `File-> Map display-> Add raster-> elevation`, it works. But when I write into Command Console `d.rast map=elevation@PERMANENT`, it shows this error. Any help would be greatly appreciated. Thank you.               Traceback (most recent call last):       File "C:\Program Files (x86)\GRASS GIS     7.0.0beta2\etc\gui\wxpython\gui_core\prompt.py", line 262,     in OnItemSelected          self.cmdDesc = gtask.parse_interface(GetRealCmd(cmd))       File "C:\Program Files (x86)\GRASS GIS     7.0.0beta2\etc\python\grass\script\task.py", line 505, in     parse_interface          tree = etree.fromstring(get_interface_description(name))       File "C:\Program Files (x86)\GRASS GIS     7.0.0beta2\etc\python\grass\script\task.py", line 465, in     get_interface_description          stderr = PIPE)       File "C:\Program Files (x86)\GRASS GIS     7.0.0beta2\etc\python\grass\script\core.py", line 55, in     __init__          fcmd = get_real_command(args[0])       File "C:\Program Files (x86)\GRASS GIS     7.0.0beta2\etc\python\grass\script\core.py", line 261, in     get_real_command          full_path = shutil_which(cmd + '.py')       File "C:\Program Files (x86)\GRASS GIS     7.0.0beta2\etc\python\grass\script\core.py", line 223, in     shutil_which          name = os.path.join(dir, thefile)       File "C:\Program Files (x86)\GRASS GIS     7.0.0beta2\Python27\lib\ntpath.py", line 108, in join          path += "\\" + b     UnicodeDecodeError     :     'ascii' codec can't decode byte 0xbc in position 9: ordinal     not in range(128)


title: Python for loop doesn't work for Spatial ETL Tool

text: I've created a Spatial ETL tool from ArcGIS 10.1 and would like to run this tool to all 200 featureclasses in a geodatabase. Therefore, I've written a python script to do this automation. (btw, i'm new to arcpy) However, I get an error message stating that my featureclasses do not exist in the geodabase. It does exist though. "Failed to execute. Parameters are not valid. 'Export1' does not exist. Failed to execute (SpatialETLTool152)" I couldn't find any solution on the internet.               `import arcpy, os     from arcpy import env          arcpy.ImportToolbox("M:/GIS-Data/Poin2Line.tbx")          env.workspace = r"L:\\ExportLines\\Test.gdb"     FakeTide_All1_tif = r"L:\\ExportLines\\FakeTide.tif"     Test_gdb = r"L:\\ExportLines\\Test.gdb"     Destination_Comma_Separated_Value__CSV__Directory_ = r"L:\\ExportLines\\Output"     fClass = arcpy.ListFeatureClasses()          for fc in fClass:         arcpy.gp.toolbox = "M:/00-GIS-Data-4-All/Poin2Line.tbx";     #arguments (Tiff, output, input)         arcpy.gp.SpatialETLTool152("'L:\\ExportLines\\FakeTide.tif'", Destination_Comma_Separated_Value__CSV__Directory_, fc )`


title: esri map popup problem

text: My map works fine. Popup works fine. For some reason, the bottom of the popup window has some layout issues. I have all the resources included. script:               dojo.require("esri.map");     dojo.require("esri.dijit.Popup");      And css:               <link rel="stylesheet" href="css/esri.css" type="text/css">     <link rel="stylesheet" href="css/Popup.css" type="text/css">      ![Bottom is incorrectly displayed](http://i.stack.imgur.com/ZgWH7.png) Do you have any suggestions on how I could debug this issue? Thanks.


title: How to get 2010 Census Block Data on Race and Age?

text: I'm interested in observing racial segregation in public & charter elementary schools in San Diego city (not county). I believe the best way to analyze this would be at the block level and have the following questions: 1) I played around with Fact Finder to get San Diego county by race at the block level, but I only want city. How do I get the city level only? 2) What do I do with the data to get forward in my project? Join it through Access? 3) What's the difference in analyzing at the block level versus block group level? 4) Can I get this same data (race and age) from ACS versus AFF?


title: GDAL polygonize lines

text: I have a raster file containing roads (left image). I polygonize the raster file with GDAL (see the script below). In the end I like to have vector lines. However GDAL only gives me something like this back (right image). Obviously this is correct, since polygonize creates polygons. Is there a way to "linize" a raster? ![enter image description here](http://i.stack.imgur.com/IWDYO.png) Here is my code:               import gdal,ogr,os          # open raster file     raster = gdal.Open('test.tif')     band = raster.GetRasterBand(1)          #create new shp file     newSHPfn = 'test.shp'     shpDriver = ogr.GetDriverByName("ESRI Shapefile")     if os.path.exists(newSHPfn):         shpDriver.DeleteDataSource(newSHPfn)     outDataSource = shpDriver.CreateDataSource(newSHPfn)     outLayer = outDataSource.CreateLayer(newSHPfn, geom_type=ogr.wkbLineString )          # polygonize     gdal.Polygonize(band, None, outLayer, 1)


title: Automate database conversion from NAD83 to Web Mercator

text: A NAD83 database is updated daily while a Web Mercator clone is only update when time is available. Looking to automate this process of   * Copying Layers   * Projecting them to Web Mercator   * Placing in correct .SDE What would be the best way to do this? FME, model builder, python? Thanks


title: QGIS 2.0.1-3 not opening

text: I've excitedly just downloaded the latest version of QGIS 2.0.1-3 (QGIS Dufour) and now it won't open. I performed the exact same process last night (without problem) on my home laptop (64-bit OS & windows 7) using the correct installer package. Why wont this open now! Lisboa, (1.8.1 I think) worked fine. My computer is 64-bit OS and Windows 7. Edits:   1. Have now tried the 32-bit version. Completely unresponsive. It went through an extra step during the install procedure loading a C++ package (from 2005). Other than that I'm still having the same problem.


title: How are EGM96 and WGS84 related to each other?

text: As far as I understand the EGM96 defines the Geoid, where as the WGS84 Standard defines the Ellipsoid. Is the ellipsoid defined in the WGS84 standard defined in a way to maximize the congruency with the the geoid defined in the EGM96 standard?


title: 3D Polygon Layer Stack with QGIS

text: I was curious if there is a way, or plugin to visualize a 3D polygon layer stack in QGIS (or another open source package). I have looked at NViz, but it only seems to work for rasters. I have a building floor plan with Z info for each floor. In ArcScene you can import the data and it will "stack" the layers in the Z axis. I am hoping to be able to complete this in something other than ESRI. Any help is appreciated... Thanks.... ![3D Polygon Layer Stack](http://i.stack.imgur.com/FIa1t.jpg)


title: Is it possible to have self intersecting polygons in GML or shapefile?

text: GIS vector data for example GML or shapefile contains polygonal data. Lets assume, we have polygon A which has self-intersection which means that the edges in this polygon intersect with each other. Lets say if we want to intersect A with polygon B, then the steps of computing the overlaid polygon differs whether A is a polygon with self-intersections or not. My question is do the polygons in one map layer have self-intersections or not? I searched for this question on internet and I found couple of instances where people complain about error caused while importing data due to the presence of self- intersecting polygons. Also I got the impression that self intersecting polygons are not possible in certain file formats.


title: Unable to removeLayers from Map

text: I was trying to create a FeatureLayer from the features returned from the ViewShed GP and I was successful at doing it. So when I click on the map, that featureSet is sent to the GP Tool and the return has all the features and I add it to the map as a FeatureLayer. Now I want to remove the layer when the user clicks again on the map, but strangely, the `map.layerIds` returns, `["layer0"]`, indicating only the basemap. I am not sure how to remove the featureLayer? This is my code,               function init() {         dojo.connect(map, "onClick", computeViewShed);     }          function computeViewShed(evt) {         map.graphics.clear();         map.removeLayer("finalLayer"); //finalLayer is the id that I assigned to the featureLayer that I am adding              var pointSymbol = new esri.symbol.SimpleMarkerSymbol();         pointSymbol.setSize(20);         pointSymbol.setOutline(new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 1));         pointSymbol.setColor(new dojo.Color([0, 0, 255, 0.25]));              var graphic = new esri.Graphic(evt.mapPoint, pointSymbol);         map.graphics.add(graphic);              var features = [];         features.push(graphic);         var featureSet = new esri.tasks.FeatureSet();         featureSet.features = features;         var vsDistance = new esri.tasks.LinearUnit();         vsDistance.distance = 5;         vsDistance.units = "esriMiles";         var params = {             "Input_Observation_Point": featureSet,             "Viewshed_Distance": vsDistance         };         gp.execute(params, drawViewshed);     }          function drawViewshed(results, messages) {         var polySymbol = new esri.symbol.SimpleFillSymbol();         polySymbol.setOutline(new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0, 0.5]), 1));         polySymbol.setColor(new dojo.Color([255, 127, 0, 0.7]));         var features = results[0].value.features;         var layerDefinition = {             "geometryType": "esriGeometryPolygon",             "fields": [{                 "name": "OBJECTID",                 "alias": "ID",                 "type": "esriFieldTypeOID"             }, {                 "name": "grid_code",                 "alias": "Grid Number",                 "type": "esriFieldTypeString"             }, {                 "name": "Shape_Area",                 "alias": "Area",                 "type": "esriFieldTypeNumber"             }]              }         var featureCollection = {             "layerDefinition": layerDefinition,             "featureSet": {                 "features": features,                 "geometryType": "esriGeometryPolygon"             }         };         //create a feature layer based on the feature collection         featureLayer = new esri.layers.FeatureLayer(featureCollection, {             id: 'finalLayer',             mode: esri.layers.FeatureLayer.MODE_SNAPSHOT         });         map.addLayers([featureLayer]);     }


title: Distance between Paris and San Francisco with PostGis (out of range coordinates?)

text: SELECT ST_Distance(gg1, gg2) As spheroid_dist, ST_Distance(gg1, gg2, false) As sphere_dist     FROM (SELECT         ST_GeographyFromText('SRID=4326;POINT(37 -122)') As gg1,         ST_GeographyFromText('SRID=4326;POINT(48 2)') As gg2         ) As foo  ;      \--> `ERROR: Coordinate values are out of range [-180 -90, 180 90] for GEOGRAPHY type` I understand those points are pretty distant (San Franciso vs Paris, France), but how can I get the distance calculated between those two?


title: Sources for long-term NDVI datasets with coverage to west Asia?

text: I'm in need for long-term NDVI dataset for my research in bio-climatology, looks like GLCF GIMMS are no longer available online, any suggestions/workarounds to get the data. Thanks in advance.


title: Problem using SLD to style a layer in OpenLayers

text: I am using and SLD file to add style to my layers but I am hitting a snag and get a "... not defined error". Below is the code which loads my SLD. I get an error on line 10, "styles = sld.namedLayers[pipe_anno].userStyles[0];"               var format = new OpenLayers.Format.SLD();             OpenLayers.Request.GET({                 url: "label.sld",                 success: sldparser             });                  function sldparser(req) {                 sld = format.read(req.responseXML || req.responseText);                 console.log (sld);                 styles = sld.namedLayers[pipe_anno].userStyles[0];                 //console.log (styles);                 pipe_label_stylemap.styleMap.styles.default = styles;             }      Below is the part which add the style:               pipe_layer.styleMap = pipe_label_stylemap;      Below is the relevant SLD snippet:               <?xml version="1.0" encoding="UTF-8"?>     <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld"      xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">     <sld:UserLayer>         <sld:LayerFeatureConstraints>             <sld:FeatureTypeConstraint/>         </sld:LayerFeatureConstraints>         <sld:UserStyle>             <sld:Name>pipe_anno</sld:Name>             <sld:Title/>             <sld:FeatureTypeStyle>      Thanks for the help.


title: JOSM plugin not working

text: I have been trying to use a PicLayer plugin in the JOSM editor, however after installing the plugin it would never appear in the top menu next to Windows, Audio, Help dropdowns (at least that's where I think it should be). I must say I am a total newbie to JOSM, and I do have no idea on how to even uninstall that plugin, so i could give it another try installing it back (so it hopefully shows now). I'd appreciate any hints on how to uninstall that plugin, thanks. P.S. the reason I came here as opposed to JOSM forums was because they, for some reason have shut down the registration.


title: QgsRasterLayer::identify() is missing after QGis upgrade to 2.0.1

text: My Ubuntu has just downloaded the latest version of QGis (1.8 -> 2.01), and my plugin failed with a plenty of bugs due to implemented changes in QGis API. I still can not figure out how do I replace the function `QgsRasterLayer::identify()` returning the values of the raster layer bands:               rlayer = QgsRasterLayer(rlayer_path, rlayer_basebame)       val = rlayer.identify(QgsPoint(current_point.x, current_point.y))[1]      What should I use instead of the one? Thank you


title: ArcGIS runtime SDK 10.1.1 for java does not display anything

text: I am currently trying to display a map (using OpenStreetMapLayer) and nothing shows up but the esri logo and the OpenStreetMap copyright. I am not getting any error message even if the event mapReady never occurs. I am running the application on a distant server (via Remote Desktop) on Windows Server 2008 R2 Enterprise (SP1) and using the jre 1.7.0_25 x86. Although the SDK version is 10.1.1, an ArcGIS 10.2 application is installed on the server (ArcMap and others). Another strange thing is that even the SDK samples seem to encounter the same issue when run in the same conditions (I cannot try on another PC). See the screenshot below: ![SDK sample displaying nothing](http://i.stack.imgur.com/ZS4rA.png) I have been searching the web for two days but found nothing and, as there are no error messages, I ran out of ideas to google.


title: Issues with Selection and Viewing of Attribute Table using QGIS and SQL Server Express 2008 R2

text: I am having issues with Selection using QGIS 2.0.1. Dufour. When I select one point, all of the points get highlighted. Attribute Table dialog shows Errors for all of the attributes. It indicates that Features total:12691, filtered:12691, selected: 1. Has anyone else experienced this issue?


title: Importation of .csv on grass gis converts numeric data to string data

text: When importing a csv file on grass7, the numeric data is converted into a data of type string. My csv looks like this :                   id_core value     1   F1  83.0611472396      2   F2  98.8584345936     3   F3  102.0621496367     4   F4  95.4304750175     ...      The command I use is : `db.in.ogr dsn=my_file.csv output=my_table` which displays the following message :               WARNING: Width for column field_1 set to 255 (was not specified by OGR),              some strings may be truncated!     WARNING: Width for column id_core set to 255 (was not specified by OGR), some              strings may be truncated!     WARNING: Width for column value set to 255 (was not specified by OGR), some              strings may be truncated!     WARNING: 50 features without geometry     Imported table <my_table> with 50 rows      And `db.describe -c table=my_table` returns :               ncols: 3     nrows: 50     Column 1: field_1:TEXT:1000     Column 2: core:TEXT:1000     Column 3: stock:TEXT:1000      I tried to import the .csv without the header, or with only 2 decimal places on the values. I also tried to import an sqlite file (that I created with with libreoffice base) but the output is identical. Does anyone has a suggestion for specifying that some fields are numeric? Thanks Léo


title: Rendering temperature on google maps

text: I have a number of data points in the form of (latitude,longitude,temperature). I am required to render the temperature on a map. The final result should be similar to the the map **here** I used google heat maps for this, and was able to render the data points successfully. The problem however is that the readings are far apart, so each reading appear as a disconnected circle. I could increase the radius of the rendered data points to solve this. My question is: Is google heat map used to render the temperature correctly? or should I use another api? Any advice is highly appreciated.


title: gdal_translate- why jpg compressed tif is 2 times greater than jpg file?

text: Using the following two commands yields completely different size files: `gdal_translate test.tif -of GTiff -co "COMPRESS=JPEG" -co "JPEG_QUALITY=100" output.tif` and `gdal_translate test.tif -of JPEG -co "QUALITY=100" -co "WORLDFILE=YES" output.jpg`. (I Wrote the commands from my memory, not sure that the syntax is correct) The jpg file (second command) is 2 times smaller than the compressed tif file. Why? Thanks a lot.


title: ArcGIS for Server 10.1 (including ArcSDE) and SQL Server 2012 problem with Create Enterprise-Geodatabase

text: i have the following server system: -Windows Server 2008R2 -SQL Server 2008 (SDE10 Enterprise Geodatabaees) and SQL Server 2012 on the the same machine -ArcSDE Application Server 10  First - Is that right, that i do not need to install the ArcSDE 10.1 for Microsoft SQL Server because we use direct connect on the client ? Now i want to create with ArcGIS 10.1 a new ArcSDE 10.1 Enterprise Geodatabase on SQL Server 2012 with the "create enterprise geodatabase" tool. But i get an error messagge: Unknown errorNo extended error. I look at the sdedc_SQL Server.log: DB_instance_open() db_connect error: -1 CAN'T OPEN INSTANCE: sde:sqlserver. Spatial Engine Connection Failed (-51). Cannot Get Access to Instance sde:sqlserver


title: Syntax of conditional statements in QGIS Field Calculator(s)

text: I have a shapefile which I need to modify. There is one column "CLASS" with the attributes: "A", "B" and "C". I need to change "A" into "1!, "B" into "2" and "C" into "3". I tried it with case when function. With one case its not a problem but how does it work with 3 in row? Is it also possible do build a model with the field calculator function? Thank you! * * * I gues I figured it out! Is this right:               CASE       WHEN "VSt_K" IS 'E' THEN '5'       WHEN "VSt_K" IS 'A' THEN '1'       WHEN "VSt_K" IS 'B' THEN '2'       WHEN "VSt_K" IS 'C' THEN '3'     END      But I cant use this in the modeler field calculator function...


title: What is the right syntax to the decision tree using the Con statement or any other method to classify?

text: ![enter image description here](http://i.stack.imgur.com/cUpY5.jpg) Can you please show me how to construct the decision tree for the attached land cover classification.   I assume it is nested Con statement, but I am confused on how to write the statement.


title: How to make two raster correlation coefficient map？

text: ![enter image description here](http://i.stack.imgur.com/Y5dgW.jpg) The pictures showed correlation analysis of NDVI and precipitation or temperature. How can I made these pictures in ArcGIS？Or use other ways？The different colors represent different correlation coefficients,from positive,negative…to significant correlation,Highly significant correlation.


title: Calculate Coordinates with tolerance

text: I am trying to find the XY coordinates that can be allowed with the tolerance of 2 meters. ![enter image description here](http://i.stack.imgur.com/Qp3an.png) In the above image, When the user(smiley) with GPS reach the ----- border line, the system should understand that user is in the coordinates (with tolerance of 2 meters). How to validate this? Could anyone help me on this?


title: How to run custom queries on vector layers and display results?

text: Is there a way to display the result of a query in QGIS? For instance :   * To get the total number of inhabitants : `SELECT SUM( inhabitants ) FROM countries`   * To get the total density : `SELECT SUM(inhabitants)/SUM($area) FROM countries`   * To get the maximal human density : `SELECT MAX( inhabitants/$area) FROM countries` And so on... It looks it is not possible natively, but is there a plugin ? Or a way to do it in python (using the console) ? If so, is there a way to restrict the query to the current selection ? I've found out about the plugin "Statist", which almost does the job, but which does not allow custom queries... * * * Related questions:   * A SQL console in QGIS


title: How to use Field Calculator to calculate area as percentage?

text: I am searching for python code to use in Field Calculator to calculate area as a percentage in relation to another field? ![enter image description here](http://i.stack.imgur.com/90YvA.jpg) The area percentage needs be calculated based on the total area for each "Basin_ID" separately.


title: Large buffers in PostGIS (5000 km radius)

text: I have a number of points stored as geographies in PostGIS (version 2.0.1), and I'd like to create rather large buffers around them (with a radius of 5000+ km). However, ST_Buffer doesn't handle this case. As the documentation warns, it doesn't work well when you cross the poles or the international dateline, which happens with this very large radius. What can I do instead? I only have 170 points, and this is being done offline, so it doesn't have to be super fast. I'm envisioning creating smaller buffers (which work correctly), and then programmatically extending each of the corners of the resulting polygon outward to approximately the right distance from the point (probably by creating a function in pl/python or something). But it seems like there ought to be a better way. (In case it matters, after creating these buffers I'm unioning them; my use case is to visualize parts of the earth that are not within 5000 km of these points, by filling in the areas that are within that range.)


title: Fixed Scale / Fixed Zoom in eCognition

text: i`m wondering if there is any option in eCognition Developer / Architect were I can control Zoom or Scale Factors. It`s neccessary for my work that i use the same scale for all processing steps. Maybe someone can help. Greetz, Stefan


title: Changing displayed elements of a KML file based on current system time in Google Earth

text: Is there any way to have Google Earth turn features in a KML file on and off automatically based on the current system time? I have created the simple example below of a rectangle with a `<TimeStamp>` set to end before now, but it displays anyway when I load the file. If I set it for a minute or so in the future then load it and wait, the rectangle doesn't disappear when the system clock rolls past the specified end time.               <?xml version="1.0" encoding="UTF-8" standalone="no"?>     <kml xmlns="http://earth.google.com/kml/2.2">     <Document>       <Placemark>         <TimeSpan>           <end>2013-07-30T22:38:00Z</end>         </TimeSpan>         <Polygon>           <extrude>0</extrude>           <tessellate>1</tessellate>           <altitudeMode>clampToGround</altitudeMode>           <outerBoundaryIs>             <LinearRing>               <coordinates>                 -10,10                 -10,-10                 10,-10                 10,10                 -10,10               </coordinates>             </LinearRing>           </outerBoundaryIs>         </Polygon>       </Placemark>     </Document>     </kml>


title: How to handle postgresql/postgis geometry type errors in a function?

text: I have created the following function in PL/SQL to make a polygon from a set of linestrings:               CREATE OR REPLACE FUNCTION _myfunction(         _fid    integer,         _rid    integer          )     RETURNS VOID AS $$      BEGIN             BEGIN             INSERT INTO _data (fid, rid, cost, geom) (             SELECT              _fid,                _rid,             500,              ST_ConcaveHull(ST_Collect(geom), 0.85) As geom             FROM table_distance as d             WHERE _fid = fid);         END;       END;     $$ LANGUAGE plpgsql;      I defined the table that this function inserts data into as:               CREATE TABLE _data (fid integer, rid integer, cost double precision);     SELECT AddGeometryColumn('_data','geom',900913,'POLYGON',2);      This function works most of the time, except when the result of making a concave hull around `ST_Collect(geom)` is a linestring, instead of a polygon. When a linestring is returned, I get the following error message:               ********** Error **********          ERROR: Geometry type (LineString) does not match column type (Polygon)     SQL state: 22023     Context: SQL statement "INSERT INTO _data (fid, rid, cost, geom) (         SELECT            _fid,            _rid,           500,            ST_ConcaveHull(ST_Collect(geom), 0.85) As geom         FROM table_distance as d             WHERE _fid = fid)"     PL/pgSQL function "_ncg_isodist" line 4 at SQL statement      I would like to disregard the result if a line is returned, but I'm not sure how to do this. I started off by nesting the block in a `BEGIN END;` statement, hoping that the function would not crash, but this does not solve the problem. I then wondered if there was some way of checking either the geometry type that is returned, or some other feature of `ST_Collect(geom)` so that I know when a polygon has been created. I noticed the `ST_Dump()` function, but I can't figure out how to count the number of values in `ST_Dump()` in this query as I get the error message that `aggregate function calls cannot be nested`. Any thoughts on how I can solve this? EDIT: @simplexio suggested using `GeometryType(ST_ConcaveHull(ST_Collect(geom), 0.85)) != 'LINESTRING'` in the `WHERE` clause. I tried this, but got a similar error to earlier:               ERROR: aggregates not allowed in WHERE clause LINE 7: AND      GeometryType(ST_ConcaveHull(ST_Collect(geom), 0.85)) != 'LINESTRING'


title: Layers change position when saving to another data format

text: When I save my map after using the composer, the layers move a little bit on the images of the OpenLayers plugin. It is like they ignore the CRS option. Do you have an idea?


title: How to search for layers in the layers panel?

text: I have QGIS projects with a lot of layers. Sometime it's difficult to find a layer into Layers Panel. How to search it?


In what form should make requests to geoserver gml file from javascript?. I have made this question, but neither on nor XMLRequest jquery and have downloaded some of geoserver, geoserver values always returns null. someone will have examples, or know that library is useful for this case. Thanks for your answers


title: Using a web map to identify and access data

text: I am trying to making a webpage where the user pans and zooms on a map, and based on the location and zoom level, some data is displayed on the webpage (drawn from another source). The data that will be displayed is not spatial data, and it will not be shown on the map. I thought I could have a database for each zoom level, and then when a call to the database is made, it returns the data associated with that location and zoom level. I saw an approach on the google earth documentation regarding regions and this related SE question. However, I was hoping to use Google maps for this. The data being returned for each area is just one number. For example, say I wanted to see the number of people in a certain area, it would show that value on the webpage. The first iteration of this I was hoping to do for a city (London), and then see if there were any performance issues. Is this a reasonable approach? Are there any better ways of doing this, or things that I should be aware of?


title: OSM Data Missing Name Field in ArcGIS

text: I downloaded and loaded osm data into ArcGis Catalog using OpenStreetMap plugin. But there's no field named "NAME" in the attribute table. And therefore I cannot display the name on the map. Did I do something wrong? Following are the steps and results in screenshots. ![I download the data from openstreetmap.org](http://i.stack.imgur.com/wrhqq.png) ![Loaded into arcgis catalog, sde backed by oracle](http://i.stack.imgur.com/lmtvx.png) ![The data is loaded and shown as graph](http://i.stack.imgur.com/c6BDS.png) ![But when open the table, no "NAME"](http://i.stack.imgur.com/iD9Is.png)


title: Error: Could not create and deploy an application with boundless sdk opengeo suite

text: I work on a web application with Boundless SDK opengeo 4.1, I used the tutorial and followed the exchange and advice on this forum but I have some problems about adding plugins and deploying the apps. I need help if someone here can help me. 1- I’ve already added all plugins I need for my project but I can’t add some plugins like gxp.Mesure, gxp.GoogleEarth 3D, gxp.FeatureGrid or Query Form which aren't enabled on the application. You can see below the application: ![enter image description here](http://i.stack.imgur.com/DPhD7.png) 2- I can’t make the package app for creating file.war to deploy with this application, I have a message error that you can see below: ![enter image description here](http://i.stack.imgur.com/prDjx.png) 3- Is there a plugin that allows to export data like an excel format for the application with SDK clients? Thanks !


title: ogr2ogr - Looping through files in a folder on a Mac

text: I am attempting to use OGR2ORG on Mac OS X to loop through 30 shapefiles, change their projection and save the files into a new directory. I am new to using Macs and the OGR2OGR command line environment. The original files are in /data/ChicagoBaseLayers/clipped. I would like the reprojected layers to go to /data/ChicagoBaseLayers/Projected. After navigating to the 'clipped' directory on the command line, I tried for %f in (*.shp) do ogr2ogr -t_srs EPSG:3857 -s_srs EPSG:4326 /Users/stevenchong/data/ChicagoBaseLayers/Projected/%f Users/stevenchong/data/ChicagoBaseLayers/clipped/%f but I get the error message: syntax error near unexpected token `(' What am I doing wrong?


I'm trying to create a table with spatial column in oracle and insert data into it. I'm using ArcSDE and Oracle. The version of Oracle is 11.2.0, the version of ArcSDE is 10.0. My create statement is:               CREATE TABLE sensitive_areas (area_id integer, name varchar(128),      area_size float, type varchar(10), zone sde.st_geometry);      And insert statement is:               INSERT INTO SENSITIVE_AREAS (area_id, name, area_size, type, zone)     VALUES (1, 'Summerhill Elementary School', 67920.64, 'school', sde.ST_PolyFromText('polygon ((52 28,58 28,58 23,52 23,52 28))', 0));      I've already added st_shaplib.dll and libst_raster_ora.dll to the environment variable EXTPROC_DLLS. My tnsname.ora:                   LISTENER_ORCL =       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))               ORACLR_CONNECTION_DATA =       (DESCRIPTION =         (ADDRESS_LIST =           (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))         )         (CONNECT_DATA =           (SID = CLRExtProc)           (PRESENTATION = RO)         )       )          ORCL =       (DESCRIPTION =         (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))         (CONNECT_DATA =           (SERVER = DEDICATED)           (SERVICE_NAME = orcl)         )       )      My listener.ora:               SID_LIST_LISTENER =       (SID_LIST =         (SID_DESC =           (SID_NAME = CLRExtProc)           (ORACLE_HOME = D:\app\rainman\product\11.2.0\dbhome_3)           (PROGRAM = extproc)           (ENVS = "EXTPROC_DLLS=ONLY:D:\app\rainman\product\11.2.0\dbhome_3\bin\oraclr11.dll;D:\Program Files\ArcGIS\ArcSDE\ora11gexe\bin\st_shapelib.dll;D:\Program Files\ArcGIS\ArcSDE\ora11gexe\bin\libst_raster_ora.dll")         )       )          LISTENER =       (DESCRIPTION_LIST =         (DESCRIPTION =           (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))           (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))         )       )          ADR_BASE_LISTENER = D:\app\rainman      However, I got this error: ORA-28595: Extproc agent : Invalid DLL Path. What should I do? Thanks USER_LIBRARIES entry for ST_SHAPELIB is also correct: ST_SHAPELIB D:\Program Files\ArcGIS\ArcSDE\ora11gexe\bin\st_shapelib.dll Y VALID


title: Calculating Centroids with Zonal Geometry in ArcGIS

text: I have a shapefile containing polygons. Each polygon is defined by its postal code. I want to calculate the centroid of each polygon using Zonal Geometry. Sadly, for some polygons there are no centroids being calculated. It is the same when I use Zonal Statistics as Table. Some polygons seem to be ignored. There are no error messages. It would help if someone could point me in the right direction because right now I do not even know what to fix. I have ArcGIS 10.1. Thanks for any help!


title: Cloud points metrics with Terrascan

text: I need to extract from a las file statistics like percentile 95 height and others. Do you know how to do it with Terrascan? I can do it with FUSION, but I would like to do it with Terrascan.


title: image rectification with Mercator projection

text: I have written an image rectification function which allows a user to select 2 points on an image and 2 points on a map. The function will then rectify the image so it is translated, scaled and rotated to fit the two points on the map. The code I have written works perfectly along the equator. However this function 'breaks' when moving further north or south. The rotation and the scale are both wrong. I believe this is because of the Mercator projection I use which stretches along the latitude axis. I am unsure how to proceed. Is there a bit of math I am unaware of which will compensate for the stretching along the latitude? Or am I wrong in my assumption this is because of the Mercator projection? Below you will find the code I use:               // transformFromPoints is an array with the two coordinates on the image     // They are in lat long     var fromPointA = this.transformFromPoints[0];     var fromPointB = this.transformFromPoints[1];          // transformToPoints is an array with the two coordinates on the map     // They are in lat long     var toPointA = this.transformToPoints[0];     var toPointB = this.transformToPoints[1];          // This is the img we want to transform     var img = this.activeBaseMapImg;          // First update the anchor so the anchor is exactly at fromPointA     // The anchor defines the point around which the image will be drawn     // This is also the point around which the image is rotated.     var cornerPoints = img.getCornerPoints();     var xAnchorPos = M.Math.projectPointOnLine(fromPointA, cornerPoints[0], cornerPoints[1]);     var yAnchorPos = M.Math.projectPointOnLine(fromPointA, cornerPoints[0], cornerPoints[3]);          var xAnchorDir = M.Math.subVector2(xAnchorPos, cornerPoints[0]);     var xLineDir = M.Math.subVector2(cornerPoints[1], cornerPoints[0]);     var yAnchorDir = M.Math.subVector2(yAnchorPos, cornerPoints[0]);     var yLineDir = M.Math.subVector2(cornerPoints[3], cornerPoints[0]);          var xAnchor = xAnchorDir.x / xLineDir.x;     var yAnchor = yAnchorDir.y / yLineDir.y;          // Set the anchor at the fromPointA location     img.setAnchor({x: xAnchor, y: yAnchor});          // Move the image to the toPointA location     img.setPosition(toPointA);          var fromDirection = M.Math.subVector2(fromPointB, fromPointA);     var toDirection = M.Math.subVector2(toPointB, toPointA);          // Determine scale     var scale = toDirection.length() / fromDirection.length();          // Determine rotation     var fromAngle = Math.atan2(fromDirection.y, fromDirection.x);     var toAngle = Math.atan2(toDirection.y, toDirection.x);          var angle = fromAngle - toAngle;          // Perform rotation and scale     img.setRotation(img.rotation + angle);     img.setSize({width: img.size.width * scale, height: img.size.height * scale});      If you need any more information to help in answering this question, please let me know.


title: Can you create a CRS of superseded NSW Datum

text: I want to use a superseded projection (NSW integrated survey datum - referred to as ISG) because my main client utilises it. The projection is based on AGD66. We regularly receive survey files in this projection and need to prepare designs in this projection. Unfortunately no one I know, including surveyors, seems to know much about the ISG projection, let alone set up a CRS for it. When I import ISG data into an existing QGIS file, the files reproject fine and appear in the right location. However the coordinates are obviously incorrect, making it difficult to work with. Is there a way to extract and set a new datum based on data I know is already in ISG format? Thanks


title: Display Dolfin XML in Web Browser?

text: I got a mesh as Dolfin XML and would like to know if there is anybody that had some experiences with the web visualisation of it. Is it possible to convert in X3D?


title: How can I make a reference plane to measure surface volume?

text: I am looking to make a reference plane like the links below. I want to measure surface volume of an area in different elevation layer. I just need to know how to make the reference plane in ArcGIS 10.1 ! http://resources.arcgis.com/en/help/main/10.1/index.html#//00q900000037000000 Best, Mahnoush


title: Starting with OpenStreetMap for Android

text: My goal is to write an Android application where I could select a couple of points in the map and calculate shortest path between them based on my algorithms. I'm absolutely new to OSM and since googling doesn't give that much info as with Google Maps API for Android (which I can't use in this case due to lack of data that I can get), I have few questions:   1. What would be the best way for beginner to start with OSM - is there some all-uniting Android API that (everyone) starts with?   2. Is there some kind of official API documentation that I should follow?   3. How are routes' coordinates stored and how can I retrieve them?   4. Are there any really good tutorials that I should follow to start with developing my Android app?  \-- I know how stackexchange pages work but, seriously, googling didn't give me that much information, so here could be something like a links-how-to-start- with-OSM-for-Android list page with short explanation.


title: MapInfo - writing text using polylines

text: I am looking for a way to create text on a MapInfo layer using Polylines. So on a MapInfo layer, I need to create a line dataset, but I am after forming words - labelling items is not going to work for me. Are there any tools that can help do this? I have tried doing it freehand using a polyline, and a polyline with autonode mode selected, but frankly it looks rubbish


title: Make table views in ModelBuilder with Iterator

text: I'm trying to use the model as shown in the image to get 300 tables for the 300 points in the input feature class. I can get 300 viewshed rasters but can only get the table of the last point. It seems the model did create 300 tables, however, each table was named the same (vshed_0_View) even though I had put the "_%n%" in the output name, so the created tables were always overwritten by the next one. I had uncheck "Intermediate" for vshed_%n% so the obtained viewshed rasters were not deleted. I don't know what caused the problem. Does "Make table view" not work with Iterator? Are there any other ways to avoid being overwritten? Many Thanks!![enter image description here](http://i.stack.imgur.com/iRuvs.jpg)


title: Accessing File Geodatabase to convert to shapefiles using ArcObjects?

text: The end result of what I'm trying to do is convert a FGDB into a folder of shapefiles. To do this, I need access to all the data I'd expect to see in a shapefile. Once I get all the information I need from the file geodatabase, it should be really easy. I am stuck on trying to _read the file geodatabase spatial data (Xs and Ys)_ UPDATE: Using the snippet of code posted by Rich Wawrzonek below, I can read the names of the datasets. Now I need to know how to read the Xs and Ys of each dataset!                   IEnumDataset enumDataset = iwrk.Datasets[esriDatasetType.esriDTFeatureClass];         IDataset dataset;         while ((dataset = enumDataset.Next()) != null)         {              //Do something with the feature class here              Console.WriteLine(dataset.Name);         }


title: How do I fill gaps in a raster to zero value cells?

text: I am trying to add some forest elevations to a DEM using ArcView. I have converted a polygon feature class of a forest into a raster with the same resolution as my DEM. Then I reclassed the forest raster to 15 (the height of the forest). This has resulted in a patchy raster with gaps of nothing between. To get a raster that covers the entire study area I created a constant raster with the extent of the forest polygon and containing the value of 0. when I add the two rasters together I end up with a replica of my forest raster rather than a raster with forest cells of value 15 and 0 values everywhere else. Any Ideas of how to fill in the gaps between my forest cells?


title: QGIS2.4.0: Cannot import qgis module in python "from qgis._core import * \n DLL Load Error"

text: Having some trouble importing qgis into python. I'm very new to python so it could be a simple mistake. The path seems to be correct. It gets this far:                   File "<stdin>", line 1, in <module>         File "qgis\__init__.py", line 36, in <module>         from qgis.core import QgsFeature, QgsGeometry         File "qgis\core\__init__.py", line 1, in <module>         from qgis._core import *         ImportError: DLL load failed: The specified module could not be found.


title: Detecting esri markers within certain distance using ArcGIS JavaScript API?

text:
I have a set of coordinates that is loaded from database. I would like to detect all the loaded markers that are close to each others which is within a certain distance. so the code is something like               function locatePOI() { // Places of Interest             var Grid_Table = document.getElementById('PrimarySchoolDGV');                       var xmlhttp=new XMLHttpRequest();             xmlhttp.open("GET", "/Foreigners@SG/WebService.asmx/getPlacesOfInterests", false);             xmlhttp.send();             var xmlDoc = xmlhttp.responseXML;             var xmlalbums = xmlDoc.documentElement.getElementsByTagName("PlacesOfInterest");                  $.each(xmlalbums, function () {                 testindex = 0;                 var school = $(this).find("Name").text();                 var address = $(this).find("Address").text();                 var postalcode = $(this).find("PostalCode").text();                 var cat = $(this).find("Category").text();                 var incidentI = "";                      coordX = $(this).find("X").text();                 coordY = $(this).find("Y").text();                      var point = new esri.geometry.Point({ "x": coordX, "y": coordY, "spatialReference": { "wkid": 3414} });                     **if(pointsbetweeneachother < 3km)         {         // do something here         }**                                var symbol = new esri.symbol.PictureMarkerSymbol('images/icons/Interest-icon1.png', 25, 25);                           //symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, safetyLevelRadiusSize * 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([r, g, b, 0.5]), 10), new dojo.Color([r, g, b, 0.9]));                 var infoTemplate = new esri.InfoTemplate();                      infoTemplate.setTitle("   " + school);                 infoTemplate.setContent("Food Establishments : " + school + "
"                             + "Address: " + address + "
"                             + "PostalCode: " + postalcode + "
"                            + "Category: " + cat + "
"                                 );                      var graphic = new esri.Graphic(point, symbol);                 map.graphics.add(graphic);                 graphic.setSymbol(symbol);                 graphic.setInfoTemplate(infoTemplate);                  }             );         }      can anyone help me out?


title: Python: Ray-trace a WGS84 point with heading and distance

text: One of my services defines geofences for a mobile app. The geofences consists of a lat/lon pair and radius in meters, in `JSON`, e.g.:               {         "geofenceId":"geofence_b39da38cff7be4b4693cbc31b2394bbb",         "latitude":32.083611,         "longitude":34.806111,         "radius":15000.0     }      I would like to display these geofences in KML. Alas, KML files don't feature circles, so I have to approximate using a polygon with `n` vertices. Each vertex location is the head of a vector originating at the centre of the circle, whose length is the circle radius and has a given heading: ![enter image description here](http://i.stack.imgur.com/XUr6z.png) What's the Pythonic way to calculate `P2` from `P1`, `θ` and `radius`? **Update:** I've found some obvious solutions (like this), which assume that the earth is a perfect sphere. I calculated a circle with a radius of 15 Kilometers and 72 points. For each point, I've calculated the exact vincenty distance from the center. The minimum and maximum are:               14941.7356806     15014.5884245      The error is significant - a few dozen meters. I would like to find a solution that uses a better approximation. **Second Update:** I am trying to calculate ray tracing, which is `(P1_lat, P1_lon, radius, heading) -> (P2_lat, P2_lon)`. This is different from the distance between two given points, which can be easily done with geopy's vincenty formula.


title: How to use consistent symbology between multiple stretched rasters in ArcMap?

text: I have a series of continuous rasters representing the same phenomenon over time, so I need to use the same symbology across them all. So I set the stretched symbology of the first raster, with a color ramp from the min/max values: ![enter image description here](http://i.stack.imgur.com/cW4J8.png) Now in the second raster, I import the symbology from the first raster. Unfortunately, although the **labels** match, the actual **min/max values** are not the same as the first layer: ![enter image description here](http://i.stack.imgur.com/d6p5a.png) So the red in the second raster corresponds to a value of 0.47, rather than 0.66. How can I ensure that both rasters are using a consistent symbology?


title: QGIS copy and paste error: "no features could be successfully pasted"

text: What does this error message mean, and how can you get more info on what might be the cause? "no features could be successfully pasted" (or more generally, not all of the selected items could be successfully pasted) (I'm using QGIS 2.3 (build 422148c) on Vista Home Basic 32bit) Seems like it's probably a problem with the source data; what's a good way to track that down? If just modifying some of the source metadata would let the paste operation work, it would beat trying to reproduce the source data by hand in the target layer. Thanks UDPATE: looking at the metadata for successfully copied objects vs the object that dies, the one that won't copy has no firstX, firstY, lastX, lastY keys in the (Derived) section where the ones that paste successfully do have those keys with appropriate values.


title: Reference Coordinates System bounds

text: I have a catalog that contains different coordinates system definitions. I have a web interface where one should be able to see a given coordinate system extent in a google maps view. **My question is:** Given a CRS well known text, for example:               PROJCS["NAD_1983_CORS96_StatePlane_Missouri_East_FIPS_2401",GEOGCS["GCS_NAD_1983_CORS96",DATUM["D_NAD_1983_CORS96",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",250000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-90.5],PARAMETER["Scale_Factor",0.9999333333333333],PARAMETER["Latitude_Of_Origin",35.83333333333334],UNIT["Meter",1.0],AUTHORITY["ESRI",103397]]       How do I find out this CRS bounds in Lat long for example?


title: How to upload a csv file into esri map with coordinates and plot in an esri map

text: I have got a sample code to plot the points on an esri map using a csv file. But the csv file is maintained in a server, i'm unable to upload it from my local system.Please let me know how i can refer the csv file in my local system and plot the coordinates? Simple Map html, body, #map { height: 100%; width: 100%; margin: 0; padding: 0; } body { background-color: #FFF; overflow: hidden; font-family: "Trebuchet MS"; } var map, csv;                 require([         "esri/map",          "esri/layers/CSVLayer",         "esri/Color",         "esri/symbols/SimpleMarkerSymbol",         "esri/renderers/SimpleRenderer",         "esri/InfoTemplate",         "esri/urlUtils",         "dojo/domReady!"       ], function(         Map, CSVLayer, Color, SimpleMarkerSymbol, SimpleRenderer, InfoTemplate, urlUtils       ) {        urlUtils.addProxyRule({           proxyUrl: "/proxy",           urlPrefix: "earthquake.usgs.gov"         });         map = new Map("map", {           basemap: "gray",           center: [ -60, -10 ],           zoom: 4          });         csv = new CSVLayer("http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_week.csv", {           copyright: "USGS.gov"         });         var orangeRed = new Color([238, 69, 0, 0.5]); // hex is #ff4500         var marker = new SimpleMarkerSymbol("solid", 15, null, orangeRed);         var renderer = new SimpleRenderer(marker);         csv.setRenderer(renderer);         var template = new InfoTemplate("${type}", "${place}");         csv.setInfoTemplate(template);         map.addLayer(csv);       });     </script>


title: ArcGIS spatial join - WITHIN A DISTANCE including distance

text: I am applying a spatial join in ArcGIS between points (target features) and lines (join features). I want to have a 1-to-many join, so I use the match option 'within a distance'. So far so good. The annoying thing is that I need to have the distance between the point and the matched lines within the search radius. I do not find any solution for this. Is there someone who has a good tip for me that will do the trick? The final goal is that I need to join the points to the line that is nearby, but also has some other characteristics (equal value on some attributes, but also a timestamp that needs to be higher in 1 class than the other which I don't succeed in working with in arcGIS anyway). These kind of data preparation I do afterwards in other tooling. That's why I can't just take the one that is closest...


title: Print maps with a specific scale

text: I need to print a map (with Arcgis 10.0) that has an extension of 1200 kmq that formally has a scale of 1:25000. **Simply I need to print it with that specified scale (1:25000)** but do not know how. I've tried to looking on online guides, arcgis guides etc, and tried many options on print setup without success. Some suggestions? Thanks!


title: GetMap - WMS 1.1.0 vs 1.3.0

text: This works: http://mrdata.usgs.gov/services/sc?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=256&HEIGHT=256&FORMAT=image/png&BBOX=-83.4,32,-78.4,35.3&LAYERS=South_Carolina_Lithology&SRS=EPSG:4326&STYLES= This does not (blank image): http://mrdata.usgs.gov/services/sc?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&WIDTH=256&HEIGHT=256&FORMAT=image/png&BBOX=-83.4,32,-78.4,35.3&LAYERS=South_Carolina_Lithology&CRS=EPSG:4326&STYLES= Notice the 1.1.1 -> 1.3.0 and SRS->CRS are the only changes. Is this a problem with the service or is my second URL incorrect? I've observed the same issue with other Map Server services: Works: http://mesonet.agron.iastate.edu/cgi- bin/mapserv/mapserv?map=/mesonet/www/apps/iemwebsite/data/wms/goes/conus_ir.map&SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=256&HEIGHT=256&FORMAT=image/png&TRANSPARENT=TRUE&BBOX=-126,24,-66,50&LAYERS=conus_ir_4km_900913,conus_ir_4km&SRS=EPSG:4326&STYLES= Does not work (blank image): http://mesonet.agron.iastate.edu/cgi- bin/mapserv/mapserv?map=/mesonet/www/apps/iemwebsite/data/wms/goes/conus_ir.map&SERVICE=WMS&REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&WIDTH=256&HEIGHT=256&FORMAT=image/png&TRANSPARENT=TRUE&BBOX=-126,24,-66,50&LAYERS=conus_ir_4km_900913,conus_ir_4km&CRS=EPSG:4326&STYLES= So I'm assuming it's an issue with my 1.3.0 URLs.


title: How to calculate a population weighted centroid using a raster and shape file in QGIS?

text: I am very new to QGIS so please help me with a step by step answer. I have a raster file with population count and a shape file based on a large population and shape file. I have successfully created the smaller raster and shape files for the region of interest. Now I just would like to find the population weighted centroid for this smaller region, and I don't know how (I know there is a related discussion, but it just provides the intuition and I don't know how to implement it in QGIS). I have used the vector--> analysis tool --> mean coordinate(s), but no matter what I choose in the weight field, I always end up with the same point, so something should be wrong. Also, do you know how I can find out to which map/variables the weight field values that are provided belong too?


title: Streaming polyline while adding records to related tables in ArcPad

text: I'm designing an ArcPad solution for our field staff; we collect point data and use lines to identify the amount of 'effort' (and to maintain accountability). While collecting a 'streaming polyline' (Add verticies continuously from GPS) as our field staff's "track" (daily effort) we need to also collect point data along the way. Every time you collect add a record to a point feature class in a related table in the poly-line streaming stops. This forces our staff to manually turn the polyline streaming back on for every record they collect. Human error is just about guaranteed over the course of editing 50 points in a day. I know that event handling is built into ArcPad through ArcPad Studio, but I haven't had any luck triggering the polyline streaming with the onOK event of related table's form. Any help putting together an event handler would be appreciated. The help files aren't nearly as useful as the Python sample code associated with ArcMap on the desktop. Here's a quick look at the direction I've been leaning. I'm not fully sure how to even compose a full even handling script for ArcPad. > From help files: 'gpsstream' => Add Vertices continuously from GPS > > **Form (onOk event):** > > **Application.ExecuteCommand("gpsstream")**


title: Disable button on User Form upon opening MXD?

text: I have a toolbar with two buttons that allow users to display an edit attribute window of a selected feature. I would like the buttons to be disabled until the user selects one feature. Current, I somewhat have this feature working. The button is enable whened opening the document and then it is disabled after the first time opening the window (I have it in the OnUpdate Event). How can I change this so that the button is disabled when the user opens the MXD and then is enable when only one feature is selected? I think my problem is just that i have it in the OnUpdate event?? _Using Visual Basic 2008 Express, ArcGIS 10_               Protected Overrides Sub OnUpdate()          Dim pFeatLyr As IFeatureLayer     pFeatLyr = GetLayerByTOC("AJ_RecommendedImprovementsLines")          'Enable Button     If GetFeatSelCount(pFeatLyr) = 1 Then         Me.Enabled = True     Else         Me.Enabled = False     End If     End Sub


title: Add feature layer to display with in a script tool for desktop mapping 'App'

text: **The point of this question is to find a way to programatically change the map extent based on user input. My method involves creating a Feature Layer & Selection, but if you have another (different) solution that gives the desired result, I'd love to hear it!** Now that I'm comfortable with arcpy and I've become aquainted with the mapping module I saw a niche. I can write start-to-finish desktop mapping applications to accomplish a specific task. This enables anyone in our office to run the 'app' without needing several years of using ArcMap to accomplish a repeatable task for a different area of interest (ie. zip-code, tax-parcel, county, etc.) I've written a few of these scripts and associated each of them with their own MXD to give the user a GUI. When they input some sort of attribute value (watershed number, land-parcel number, county, etc.) the script makes a feature layer of that polygon and uses the **zoom to selected feature** method to change the extent. The problem I'm having once I've finished debugging the 'app' through ArcMap's Python Window I create a **script tool** that gives the user an input box to enter in the required arguments for the program to run. For whatever reason, ArcMap defaults to **NOT** adding the feature layer to the map when it reaches the line of code where it is created. Therefore, my script cannot use the zoom to selected feature method to change the extent. The rest of the script runs along just fine, but the zoom extent is still at the state level as opposed to a sub-watershed level. **Code excerpt:**               try: # Clip wetlands layer to extent of user dictated parcel, calculate staticstics         newWetland = outWetlands + "HUC_" + userHucID # variable that stores clipped wetland output location & name         arcpy.MakeFeatureLayer_management(sheds, "currentShed", clipClause) # Create feature layer of HUC (from user input)         arcpy.SelectLayerByAttribute_management("currentShed", "NEW_SELECTION", clipClause) # Select current HUC         df.zoomToSelectedFeatures() # Zoom to extent of selected HUC         arcpy.RefreshActiveView()   # Refresh view of mxd before exporting to PNG              arcpy.Clip_analysis(wetlands, "currentShed", newWetland) # Clip dissolved wetlands layer to current HUC         arcpy.ApplySymbologyFromLayer_management(newWetland, layers + "WetlandSymbology.lyr") # Apply wetlands symbology         print "Finished creating wetland file for HUC #: " + userHucID + "."     except:         print arcpy.GetMessages()     finally: # delete the feature layer if it exists if an error is present or not         if arcpy.Exists("currentShed"):             arcpy.Delete_management("currentShed")      **Script run in the Python Window of ArcMap:** ![Script run correctly in Python window](http://i.stack.imgur.com/Cmw4I.png) **SAME script run as Script-tool in custom toolbox:** ![Same script run through Script tool in ArcMap](http://i.stack.imgur.com/kroxm.jpg) **Script tool Properties window:** This was suggested to me by an ESRI rep -- add a feature layer as a derived, output parameter, then use the SetParameter(index, featureLayer) to get the desired layer added to display. The parameter is derived (it isn't given by the user, but is derived by one of the user inputs), and set to output in an attempt to add it to the map. ![enter image description here](http://i.stack.imgur.com/fqOyL.png) **Attempted Fixes:**   * ArcMap Toolbar -> Geoprocessing -> Geoprocessing Options -> 'Add results of geoprocessing operations to the display'   * Add Feature Layer output parameter in script tool properties paired with arcpy.SetParameterAsText method   * `arcpy.mapping.AddLayer(df, layerPath)`   * `df.extent = layer.getExtent()`


title: Getting polygons of all countries and ISO-3166-2 subdivisons

text: In order to do reverse geocoding lookups to find a country (as ISO-3166-1) and the subdivision (as ISO-3166-2) for given coordinates I am looking for a way to get all polygons of all countries and their subdivisions. Reverse geocoding lookups with Google Maps or other services either do not always return the country and subdivision (Google Maps), or sometimes they are incorrect (geonames.org). As I understand it all countries and subdivisons are available in the openstreetmap data, but I do not know how to only retrieve the polygons - no map data, no points of interest or cities are necessary, only the outlines of all subdivisions with the given country and subdivision codes. Then I can check myself if a given point is within any given polygon, or near it. Does anyone know how to retrieve this data from the openstreetmap data, or is there any other source for this data?


title: Creating a graduated buffer in QGIS

text: I'm attempting to map cell phone towers and their range in QGIS. I'm wondering if it's possible to create buffers which change color intensity according to their distance from a central point. The buffer color is most intense at the center and gradually becomes lighter as one moves away from the center. I speculate that I must copy the range of each tower to the buffer layer attribute table and then select "Graduated" in the style menu of the buffer. Unfortunately, the buffer layer has only 1 row in its attribute table. Are there other solutions? Thank you.


title: create node ids with a multilinestring

text: I've got to make a route with my multilinestring table "routebus", but I can't create the node ids... maybe the fact that it's a multilinestring is the problem, but I really don't know how to solve it. I created "source" and "target" fields and tried with this query:               SELECT assign_vertex_id('routebus', 0.00001, 'the_geom', 'gid');      But it returns me an error:               ERROR: query string argument of EXECUTE is null     État SQL :22004     Contexte : PL/pgSQL function "assign_vertex_id" line 36 at EXECUTE statement      I'm not really used to PostGIS and pgrouting, maybe un must convert multilinestring to linestring? I have PostGreSQL 9.1.9 with PostGIS 2.0.1 installed Thanks in advance for your help


title: RFE raster images datum conflict

text: Im using ArcGIS 9.3. I've downloaded RFE images from FEWSNET. And im trying to load them on ArcMap, to clip them using Mozambique's shape. But as the RFE images related to Southern Africa come with unknown coordinate system, im having problems projecting RFE and Moz shape on the same map. I also tried to put them both at the same GCS which WGS_1984, and then use the same projection for both. It didnt work. Im a GIS begginer. Which is my mistake in this projecting and reprojecting issue???


title: access attribute values in openlayers rule

text: I have a webgis where i use openlayers and i'm trying to make a FOR loop to generate a series of rules for my POI layer. I have tried just like that: http://pastebin.com/CTuiWd4V My problem is that i cannot access attribute values of my layer in 3 params tahta i need: 'title', externalGraphic, and value. Anybody can help me do that? Thanks


title: Formula/ calculation for ESRI map coordinate conversion (meter to decimal degrees)

text: I'm new to ESRI mapping. I have a set of points in ESRI, with x, y, z coordinates, which I believe is in meters. I am now writing an Android program, and I do not want to depend on ESRI, thus I would like to get the coordinates and pin them on Google map. I have tried to use ESRI and export the coordinates to decimal degrees and pin them on Google map. But the position is not very accurate (varies from original position about 500m). So I was thinking if there any hard coding calculations that I could do to convert meters to decimal degrees? I'm looking for accuracy at around 1m.


title: How to construct geographies from WKTs

text: I am using a SQL Server 2012 database. I have noticed that geometries and geographies interpret WKTs differently. For instance, if I construct a _square_ polygon, clockwise:               DECLARE @geom Geometry=geometry::STGeomFromText('POLYGON((-30 -45, -30 45, 30 45, 30 -45, -30 -45))', 4326)     DECLARE @geog Geography=geography::STGeomFromText('POLYGON((-30 -45, -30 45, 30 45, 30 -45, -30 -45))', 4326)      The geometry will be interpreted (as intended) as the original square ( _inwards_ ): ![geometry](http://i.stack.imgur.com/sCtSX.png) But the geography will be interpreted as the complement of the square ( _outwards_ ): ![enter image description here](http://i.stack.imgur.com/TBS6r.png) Is this standard (and can you find a reference to why this is so)? And if so, how is it possible to construct a geography from a WKT?


title: Convert native box to geometry

text: I have an old table that contains bounding boxes of lat long coordinates in a "box" type. How do I convert them to PostGIS geometry ? I tried using `ST_Transform(ST_SetSRID(se.bound_box::box2d::geometry, 4326), 4326)` but it says I can't cast box to box2d or to geometry. Any help much appreciated


title: Weather interpolations QGIS

text: does any one know how good are the weather interpolations that QGIS carries out? Do you have any other suggestions or better methods to do them? Please let me know. Thanks in advance!


title: Domains can only be delete or modified by the owner?

text: Arcmap States that "When a new domain is created, the owner of that domain—that is, the user who created it—is recorded. Only the owner of an attribute domain can delete or modify it." So say for example a usercreates a domain, then this user leaves the organization. Would it be impossible to then edit or delete that domain?


title: How to export a vector layer to a new layer and take extent from canvas?

text: I want to create a new vector layer based on an existing one and the extent should be based on the current extent of the canvas. How do I do that? Edit: I am looking for a quick way to do that (a couple of clicks). I don't want to create any additional layers.


title: Cannot publish service with editable layer

text: We have several services published, up and running for our on-line viewers. However, we are trying to publish a service containing our bus stops, that can be brought up on a mobile device for editing in the field. We have a user set- up called "webedit" and the layer in the mxd is pointing to this datasource. When publishing, we check "Feature Access" and "Mobile Data" under the Capablilities. Start Service automatically is checked. Upon analyzing, only minor errros are reported - data extent, tags, summary, draws at all scales, things that shouldn't be deal breakers. It shows as published, but then gives the message that the service did not start and that it must be started thru server manager. When this is attempted, we get a rather non-descript "failure to start service". The last time we tried, we discovered we needed a GlobalID, and this has been added to the table. The error logs are no help either. All our other services publish fine. Any ideas?


title: Open/Free Area Code Shape Files for the US/Canada

text: I would like to map magicJack's areacodes and exchanges against known area codes and exchanges to create a coverage map, just to see what it would look like as compared with, say, a mobile phone coverage map. Having read this previous post: Shapefiles for U.S. Area Codes (NANP) I see the only available databases seem to cost more than I'm willing to pay. And the maxmind information is point data rather than polygon data. I'm curious if any new free/open resources have become available since the previous posting.


title: How to programmatically click on Feature or particular region without coordinates?

text: How I can programmatically click on feature using javascript library, lets say in world countries map how can I programmatically click on a particular country ( i don't want to use co-ordinate as my does not deal with them). Country Name comes form rest services. I will highlight the country through querytask i pass countryname in the country i get the feature object then i add symbol object to it and highlight it.               var queryTask = new esri.tasks.QueryTask("http://10.32.9.106:6080/arcgis/rest/services/KX_Mapping/World_countries_less_Antartica/MapServer/0");     var query = new esri.tasks.Query();     query.where="CNTRY_NAME IN ('Some')";         queryTask.execute(query);     dojo.connect(queryTask, "onComplete", function(featureSet) {                      try{                             console.log(" query complete");                             var symbol0 = new esri.symbol.SimpleFillSymbol().setColor(new dojo.Color([255, 0, 0, 0.9]));                             dojo.forEach(featureSet.features,function(feature){                                     //alert('feature'+feature);                                     var graphic = feature;                                     graphic.setSymbol(symbol0);                                     //alert("infoTemplate"+infoTemplate);                                     var infoTemplate = new esri.InfoTemplate("Alert", "ds");                                     graphic.setInfoTemplate(infoTemplate);                                     //alert("graphic"+graphic);                                     //alert("map.graphics"+map.graphics);                                     map.graphics.add(graphic);                             });                         }catch(e){                             alert("e"+e);                         }                     });      I have associated infotemplate object to graphic object , template will be shown when user click on that country , how can i programitically make it clickable.


title: How to enable OSM map in Garmin?

text: I've installed two OSM maps, but I cannot use them in Garmin. See the window of Utilities / Manage Map Products: ![enter image description here](http://i.stack.imgur.com/bmyUJ.png) The maps are not lockable, but I cannot use them in Garmin... What shall I do to be able to upload them to my GPS? Thanks a lot!


title: How to get the Reconcile Versions geoprocessing tool published as an arcgis server 10.1 service to work with a new version

text: After publishing the Reconcile Versions GP tool to ArcGis server 10.1, it can be successfully invoked via REST but only on versions existing at the time the service was published. If a new version is created the service fails. The error is: > ERROR 000622: Failed to execute (ReconcileVersions). Parameters are not > valid.\nERROR 000800: The value is not a member of...(list of version names) Is there some way to publish this tool so it can reconcile versions that are created dynamically?


title: shapefiles for global border crossings

text: I am trying to find a shapefile or set of shapefiles that contain global border crossings. Basically, what are the points of transit between one country and another. Does anyone know if this data is available? I am particularly interested in crossings in Sub Saharan Africa, like Zambia, Zimbabwe, Malawi, etc., and around Syria. Any help would be appreciated. I have already checked the usual sources of shapefiles and no luck.