How to add data to a newly created folder using arcpy?

I'm writing a script to create a new folder and then copy a feature class to a shapefile and add the shapefile in the new folder. The folder gets created but the script is failing on the feature class to shapefile conversion line with an error of:               ExecuteError: Failed to execute. Parameters are not valid.     ERROR 000732: Output Folder: Dataset Zoning_ does not exist or is not supported     Failed to execute (FeatureClassToShapefile).      My code so far is:               import arcpy, os, datetime     from arcpy import env          # Set Workspace     env.workspace = "C:/GIS_Work"          inputFile = arcpy.GetParameterAsText(0)     outputFile = arcpy.GetParameterAsText(1)          # Create folder with today's date     #dt = str(datetime.datetime.now())          # Set local variables     out_folder_path = "C:/GIS_Work/PropertyAppraiser"     out_name = "Zoning_"          # Execute CreateFolder     arcpy.CreateFolder_management(out_folder_path, out_name)          # Execute Export Feature Class to Shapefile     arcpy.FeatureClassToShapefile_conversion(inputFile, out_name)      Is there something I need to do to the folder to make it able to receive files? I couldn't see anything in the ArcGIS Help that would suggest this, but since the folder is getting created the portion of the error that says "does not exist" wouldn't apply, I would think.


MapInfo Bing Aerial resolution/scale

I am using MapInfo to display some Bing aerial photos. It seems as if it is using the wrong scale of imagery - they look blurred, as if the image has been enlarged. Is there a way to force it to use a larger scale of imagery and therefore get more detail?


Maintain maps current state on server round trip

Hopefully a fairly straightforward question... I have my GeoExt map displayed in a window on my page using a Ext.Window(...) object. The page in the background that the map is displayed on needs to do a server round trip when a form on the page is submitted. Is there a way for the window and map to maintain its state (ie, window size and position & maps current cooridnates, zoom level etc etc). Thanks for reading!


IFeatureIndex2.Index Performance Issues ArcObjects

I have a large number of polygon features in a personal geodatabase featureclass. I would like to find the nearest polygon for several points inside an area of interest(the red area in figure). ![enter image description here](http://i.stack.imgur.com/lqpzl.png) I found IIndexQuery2.NearestFeature is a good option since it `'Finds the nearest feature in index to the input shape'` as per the documentation. At present, I do not see any way of utilizing the existing spatial index in the geodatabase through arcobjects. The only option i found is to create a temporary index using IFeatureIndex2.Index method. My problems are with the IFeatureIndex2.Index method. I only need to index a particular group of features. There is a `IFeatureIndex2.FeatureCursor` option which supposedly reduces the number of features indexed. So i passed a featureCursor of the specified area to IFeatureIndex2.But mysteriously, this option only increases the time taken for index creation. Also the Envelope parameter in the Index method (shown below) does not seem to have an effect on the performance.               public void Index (ITrackCancel pTrackCancel, IEnvelope pQueryingGeometryFullExtent));      It does not matter if null is passed or a valid envelope of Area is passed to this method as parameter. It takes same time to complete. I tested it on a polygon featureclass with around 100000 features. The Index Method took 4 seconds Index Method with FeatureCursor took 12 seconds. Can anyone suggest whether I am using the methods in the proper way? I might have to run this on an SDE with millions of features. So I am looking forward to indexing only the particular area so that the nearest feature queries would execute faster.


Where can I download Southern California Interstate Highway System in a Shapefile?

Does anybody know where I can download the Interstate highway system (as a shapefile) for Southern California (the area around San Diego in particular)? Thanks, in advance!


Qgis mapserver - Can it use plugins you use in qgis desktop?

Im thinking about developing a small python plugin for qgis which would access postgis raster database and return data via ST_AsPNG() for example. But since i need this in my wms, would it be possible for mapserver executable to also use this plugin, because the plugin would be used in the project file to fetch the data?


CSS Spritesheets and picture marker symbols in the AGS Javascript API

I'm working on improving the load performance of a large ArcGIS Javascript application, and one area where we can have trouble is that there is a visible delay between putting a graphic with a PictureMarkerSymbol on the map and seeing the symbol load, particularly when there are a large number of features with various symbols. Is there a way to pull picture marker symbols or something similar from a CSS spritesheet to get all of the images loaded as a group?


How to plot multiple markers on a leaflet map?

If I have a object containing lats and longs how can i plot them in leaflet using the marker constructor I tried looping through them               for(key in obj){                 var val = obj[key];                 var markers = new L.Marker([val.lat, val.long]);                 map.addLayer(markers);             }      but its not showing up in the map               var obj ={      0 : {             lat: 15.606562000000000             long: 32.513681000000000         },     1 : {             lat: -12.09137             long: 34.7182         }     }


find euclidean distance in GPS

i need to find the distance between two gps location, So i think to do this:   * `lat1(seconds)-lat2(seconds)=lat * 30.7151 == distance latitude in meters =Latm`   * `long1(seconds)-long2(seconds)=long *30.9221=== distance longitude in meters=Longm` for overall distance between them = sqr(Latm^2+Longm^2). note: the nodes are in range of 30 meters so i need to deal with seconds cause it is small scale.


How to calculate column average in Arcmap using VBA

I'm really new in gis and programming... So could anyone write VBA code for counting average. For example I have 3 columns which are named as JAN, FEB, MART...Each of them have 50 values in column. How can I make new column for counting average of these three columns, and find unique average value of that new column which will be written in message box... I know how to do it with field calculator, but I have do it with VBA code...


Exporting selected feature to google earth in QGIS?

Does anyone know if there is a plugin for QGIS that will export features to google earth similar to the one for MapInfo? Thanks, Alan


Life cycle of an AxControls - license missing in some point of the execution

DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far… Some knows the lifecycle of an AxControl (AxTOCControl) ? Why this question??? ok , lets put in this way.....I have a complex application, tha uses several technologies (Spring.NET, NHibernate, DevExpress components...) among them ESRI ArcObjects. this application starts normally, it **binds a product** (engine or desktop) then **it gets the licence (ArcEngine)** , it starts!!! it works!!! so it is getting the proper license ....but wait!!! in some moment, **minutes after the aplication has started** , then it throws a dialog box saying that i do not have the license of **ArcView** (in fact i do not have it...but i do not need it....my code only use functionalities related with ArcEngine...not even extensions)..if i click in the button of this dialog box, the the application is closed. I have trying to capture the thread that launch this dialog box, but this attemps has been useless..... also i try use the tool Process Monitor and Process Explorer, but has not been able to get information. So....I need to undertand the life cycle of the AxTOCControl to indetify when it is losing the license. Or if some knows why a control can loss the binding o the existing license....it will be very hepful!


'invalid parameters' on ArcGIS rest API used from Silverlight

I have an Silverlight application from which I'm trying to create new features to ArcGIS server. Every time I get error `{\"error\":{\"code\":400,\"message\":\"Unable to complete operation.\",\"details\":[\"Invalid parameters\"]}}` My request code is like this: ` System.Net.WebClient client = new System.Net.WebClient(); client.Headers["Content-type"] = "application/x-www-form-urlencoded"; client.Encoding = System.Text.Encoding.UTF8; client.UploadStringCompleted += client_UploadStringCompleted; client.UploadStringAsync(new Uri("http://.../FeatureServer/0/addFeatures?f=json&features"), "POST", JSONString);` If I copy the JSONString variable to a text editor, replace every escaped double quote mark (\") with double quote mark (") and use the ArcGIS servers /FeatureServer/0/addFeatures form, I am able to store the same features in that form to a featurelayer. That makes me thinking that the JSON data is well formed and valid for the featurelayer I'm using. What could make the request response an error every time when called ArcGIS server from Silverlight application? **SOLVED:** I followed the instructions below and found a solution. First, the endpoint URL is like `/.../FeatureServer/0/addFeatures`, not like `/.../FeatureServer/0/addFeatures?f=json?features features=[{"geometry":{"x":0,"y":0}, "attributes":{"Id":"018-00","SV":"","Num":"4 A"}}]&f=json` Found the solution from here and by comparing the POST methods made from my application and the web form with Fiddler


Where to start GeoServer Development?

I want to contribute to GeoServer development. I am well experienced in programming and since I am now completely working on GIS projects, I think I will find enough time for these tasks. Where should I start? Are there to do lists or tasks for developers? Are there basic jobs for beginners? What would you suggest?


How to Sextante model builder within QGIS to convert KML to shapefile?

Are there any tutorials on how to use Sextante within QGIS? How I could use Sextante model builder in QGIS to convert KML to shapefile? This is a routine task and Sextante would really help. I am straggling to find standard gdal/ogr converters within the Sextante algorithms, such as shp to kml to shp to tab.


drawing graphic layer on client side with arcgis

hello I'm usign ArcGIS JS api v. 2.8 and.. I've got some problems with drawing graphics point on client side. The problem is, when I draw points by first time by JS api everything is OK. But when points exists and I try to realy fast pan my map window from left to right (for example) my graphic layer can't finish drawing before one pan is ended. After few this kind of operations I can see, that my graphics points aren't in the geographic position as they should be when I started to pan. My question is how can I block again pan untill my graphic is drawn properly. I think it is the only way to prevent described situation. I would like to mention, that I'm using jQuery for this application and I tried many many tricks like setting flag and setting enableMapNaviagtion() after document ready, I have tried to setTimeout, but for now this doesnt works. thanks for advice!


Using a different Python IDE/debugger for ArcGIS

> **Possible Duplicate:**   >  How can I effectively debug arcpy Python scripts? I prefer to use PyScripter over IDLE as my IDE/debugger for writing GP scripts in Python. In ArcGIS, however, when I right-click on a geoprocessing "Tool" that references a Python script, it always opens in IDLE. What is the best way to change the default tool that ArcGIS is calling? **Edit:** I am currently running 9.3, but am transitioning to 10 soon, so suggestions for both versions is appreciated if they are different.


Spatial data? Geodata? Geographic Data? Geospatial data?

Language changes all the time and I see various uses of the words defining the data we use in GIS in our day-to-day lives. But what's right? Is there a right answer out there that we would all agree on or just break out into riots (or simply not care)? We have spatial data, geodata, geospatial data, geographic data - anymore missing? Spatial is quite generic and geospatial a bit more defining geographically spatial - but what about geodata?! If you were writing a scientific paper about data that is spatial within the geographical and geological domains what term would you use?


Contours from DEM with human features

I am rather new at GIS and I would like to have some guidance on what follows. I have some DEMs derived from LiDAR data. These DEMs contain building and other human features (e.g., roads).   I was wondering what the (negative?) consequence would be if contour lines are extracted from these DEMs. In other words, how the presence of human features will affect the calculated z.values (i.e., elevations.). The DEMs I got have the horizontal resolution of 1 meter. The program I am working with is ArcGIS, and I am a bit familiar with QGis as well.


Why is Mosaic or Mosaic To New Image causing a 1-pixel gap between adjacent images?

I have a series of adjacent PNG images, and I'm trying to merge/mosaic them into a single seamless image. The images have clean "cuts" between them, with no overlaps. However, when I use either the Mosaic or Mosaic To New Image tools, a 1-pixel gap has been inserted between some sets of images (but not between all sets of images): ![enter image description here](http://i.stack.imgur.com/U7JiB.png) Identifying within the gap shows Nodata. Here is the line in Python which creates the Mosaic:               arcpy.MosaicToNewRaster_management(list_of_images,outputImage,"#","8_BIT_UNSIGNED","#",1,"LAST","FIRST")      Does anyone have any suggestions as to what I need to check/change to avoid this gap? Thanks


How should "consumer oriented" geographical applications be called?

I se the term GIS being used for professional applications, while there is a growing interest on applications (online or desktop) that use Web Maps and User-Generated GPS Data so that individuals can plan, navigate and analyze their activities, which include sports activities such as cycling, where each trackpoint has one or more measurements (heart rate, power, etc.) There are already some file-format standards for that (GPX, KML with gx:Tracks) and lots of sites about it too. What seems to be lacking is an _explicit conceptual unity_ among these overlapping applications and their respective application schemas, and that is something I am very inspired to research and study (mostly as a hobby). But _what should I look for_ , that is, which terms or words should I google, if I want to find discussions about these _types_ of applications? How are they named or cathegorized? (Edit: I couldn't even find proper, more specific _tags_ for this question... :o) ) Yet another edit: This excerpt from OGC Abstract Specification, Topic 5 - Features translates my thoughts about what I said formerly in the question: > The use requirements of geospatial content for an information community > always reflect the specific discipline or disciplines of their owners. > Examples of geospatial disciplines in which geospatial abstractions are > frequently found include forest management, soil mapping, cadastre > management, base cartography, surface hydrology, wetlands, transportation > modeling, and so forth. Each of these disciplines has many sub-disciplines, > and an information community can involve any combination of these. > > It is exactly the multiplicity of languages at the Project World level that > leads to the most difficult problems in interoperability between geospatial > information stores. This is the source of much of the splintering that > artificially divides the Geospatial World. The situation is manageable, > however, if sufficient care is taken in the formalization of the language > constructs. We will see that each Geospatial Information Community is > intimately related to an equivalence class in the set of all possible > Project Worlds under a special relation. The Information Community are any sort of enthusiasts GPS users who want to plan and analyze their activities using a computer, and Project World would be the sort of features (DEMs, Roads, POIs, Tracks).


Is it possible to get URLs from ArcGIS Server by map service name?

We have a number of map services published to ArcGIS server that we consume in our applications (C#/Silverlight). Whenever a new service is published, it changes the urls of some of the other services. This requires navigating to the services in a browser, copying the new urls, and then setting them in the app source code (which is either set in an XML file or in a resource file that requires recompile). Is there a way to contact the server and obtain the urls of the map services by name (so we can follow a naming convention) rather than having to change the urls in the app code every time?


Looking for WFS component for c# client

I have to retrieve data from FME server for use in a C# project, and thought that WFS would be a good format, since it has native support in FME and returns features and geometry. However, I can't find any ready-made WFS components that I can use in my project to parse the response. I thought I had found the answer in the SharpMap library, but I can't get the WFS class to work, and suspect it isn't meant to be used independently. I eventually found some code that I thought might be useful here, but couldn't get the WFS class to run independently of a map. So is there anything available that I have overlooked? This is the way I was trying to use the WFS class, based on the code examples I found:               GeoAPI.GeometryServiceProvider.Instance = new NetTopologySuite.NtsGeometryServices();          string serviceURI = "http://<server>:8080/geoserver/wfs";          WfsFeatureTypeInfo featureTypeInfo = new WfsFeatureTypeInfo(serviceURI, "<nameSpace>", null, "<layerName>", "geom");          WFS prov2 = new WFS(featureTypeInfo, WFS.WFSVersionEnum.WFS1_1_0);          IFilter filter1 = new PropertyIsEqualToFilter_FE1_1_0("version", "Candidate");          prov2.OGCFilter = filter1;          prov2.QuickGeometries = true;;          SharpMap.Data.FeatureDataSet ds = new SharpMap.Data.FeatureDataSet();          prov2.ExecuteIntersectionQuery(new GeoAPI.Geometries.Envelope(0, 360, 0, 180), ds);


What is the code to execute a function when there is a mouse click on the map?

I am developing an add-in for ArcMap 10.0 where I need to execute code when there is a click on the map open. How do I do this? I am using VB in Visual Studio 2010. I also need to get the coordinates from the click event. Thanks.


How can i draw a perpendicular line in a stream segment in a regular interval of 30m?

I have a stream segment which is polyline feature. Now I want to draw a line which is perpendicular to stream segment at a interval of 30m. How can i do it using python ? Do you have idea on this .


How to get Perpendicular cross section along the river using python and Arc Map 10?

![Sample Output](http://i.stack.imgur.com/3culB.png) I need to draw the perpendicular line segment along the river at a regular interval. How can i obtain like this output using Python and Arc Map 10 ? I would be very grateful if you give some idea..


Creating Selection MapTool in PyQgis Custom Application

I'm developing a custom GIS application using PyQgis API. How can I let the user select features on the map using Maptools? I would like to replicate the select feature there in Qgis to make the selection on click of a button. My understanding is to use layer.selectedFeatures() function , but I am not sure of how to add the Selection Maptool to the mapcanvas and toolbar.


How do I batch export maps for sub regions of a dataset with qgis?

I have a national level dataset consisting of polygons, polylines, points and rasters. I would like to export a map for every sub region (border defined by a polygon shapefile). Is there a simple way of doing this in QGIS? Eventually I would like to be able to offer each sub region as stand alone maps in multiple formats and resolutions. Many thanks for any suggestions!


Is there a Swipe tool for ArcGIS JavaScript API?

I was researching the ESRI JavaScript API, and was wondering if there is a sample which shows layer swiping in the browser. Is there such a Swipe sample?


Projecting point in Leaflet from EPSG 900913 (same as 3857) to EPSG 2232 with proj4js returning unexpected results

I have a leaflet map from which I want to be able to query an api that accepts x y values in EPSG 2232 as inputs. Leaflet doesn't handle point transformations like Open Layers does so I am trying to use proj4js. I created an epsg2232.js file for the 2232 transform and am using the existing epsg900913.js file that shipped with proj4 (see code below for actual epsg strings). The general work flow is:   1. click event returns lat/long in Leaflet default EPSG 3857 (same as 900913)   2. convert lat/long to EPSG 2232 x/y (see code below).  The code below currently does perform a transform but the numbers are off. For example: lat = 39.74043 long = -465.01719 transforms to X = 40674737.46566756 Y = 10890477.404555319. I expect the transformed x/y to be more like this x=3135764.7952012 y=1694936.04430735. I am unsure what the issue is as this seems like a simple task. It is very possible that I am missing something obvious. Does anyone have any idea what is causing the transform to behave this way?               // formatting lat long click event results to pass to proj4     // not the best method but bare with me     var lat_lng = e.latlng;     var lat_lng = lat_lng.toString();     var lat_lng = lat_lng.substr(7,20);     var lat_lng = new String(lat_lng);          var epsg900913 = new Proj4js.Proj('EPSG:900913');     var epsg2232 = new Proj4js.Proj('EPSG:2232');          var xy = new Proj4js.Point(lat_lng);     Proj4js.transform(epsg900913,epsg2232,xy);               // here is the EPSG string that epsg900913 references.      //Proj4js.defs["EPSG:900913"]= "+title=GoogleMercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs";          // here is the EPSG string that epsg2232 references.      // Proj4js.defs["EPSG:2232"] = "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8288036576 +y_0=304800.6096012192 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs";


Converting arcpy based python script to OGR for semi-automated Metadata creation

I have created a script to automatically generate base ANZLIC standard metadata using arcpy based coding. Can anyone help me convert it to OGR/GDAL python? This is so that it can be run in QGIS and work with all types of vector and raster data. ![enter image description here](http://i.stack.imgur.com/jZGkx.jpg) The working code with some comments on important sections is below.               import os, xml, arcpy, shutil, datetime     from xml.etree import ElementTree as et      Add/Replace with following import osgeo, os   from osgeo import ogr               Count=0     DECLARATION = """<?xml version="1.0" encoding="utf-8"?>     <?xml-stylesheet type='text/xsl' href='ANZMeta.xsl'?>\n"""          RootDirectory=arcpy.GetParameterAsText(0)     LogDirectory=arcpy.GetParameterAsText(1)     Metadata_Template=arcpy.GetParameterAsText(2)     ANZMeta=arcpy.GetParameterAsText(3)          #RootDirectory=os.getcwd()     #LogDirectory=os.getcwd()          currentPath=RootDirectory     arcpy.env.workspace = RootDirectory     root = Tk()     InputStrings = StringVar()     Entry(root, textvariable=InputStrings).pack()          Generated_XMLs=LogDirectory+'\GeneratedXML_LOG.txt'     f = open(Generated_XMLs, 'a')     f.write("Log of Metadata Creation Process - Update: "+str(datetime.datetime.now())+"\n")     f.close()          for root, dirs, files in os.walk(RootDirectory, topdown=False):         #print root, dirs         for directory in dirs:             try:                 currentPath=os.path.join(root,directory)             except:                 pass             os.chdir(currentPath)             arcpy.env.workspace = currentPath             print currentPath     #def Create_xml(currentPath):      Here we will need a similar call to list ogr accessible datasets (ogrinfo seems to only list the properties of a file -is there anything similar to arcpy.List...)                       FileList = arcpy.ListFeatureClasses()             zone="_Zone"                  for File in FileList:                 Count+=1                 FileDesc_obj = arcpy.Describe(File)                 FileNm=FileDesc_obj.file      The code above needs to be a call to osgeo.ogr.Open(File) right?                           check_meta=os.listdir(currentPath)                 existingXML=FileNm[:FileNm.find('.')]                 existingExtension=FileNm[FileNm.find('.'):]                 print "XML: "+existingXML                 #print check_meta                 #if  existingXML+'.xml' in check_meta:                 #newMetaFile='new'                 for f in check_meta:                     if f.startswith(existingXML) and f.endswith('.xml'):                         print "exists, file name:", f                         newMetaFile=FileNm+"_2012Metadata.xml"                         try:                             shutil.copy2(f, newMetaFile)                         except:                             pass                         break                     else:                         #print "Does not exist"                         newMetaFile=FileNm+"_BaseMetadata.xml"                      print "New meta file: "+newMetaFile+ " for: "+File                 if newMetaFile.endswith('_BaseMetadata.xml'):                         metafile=Metadata_Template                         shutil.copy2(metafile,newMetaFile)                         print "copied: "+metafile                      else:                         shutil.copy2(Metadata_Template, newMetaFile)                         shutil.copy2(ANZMeta, 'ANZMeta.xsl')                           print "Parsing meta file: "+newMetaFile                 tree=et.parse(newMetaFile)                 print "Processing: "+str(File)                           # Update following info only if no old metadata was found                      # Update all XML files with following data                 for node in tree.findall('.//procstep/srcused'):                     node.text = str(currentPath+"\\"+existingXML+".xml")                      dt=str(datetime.datetime.now())                 for node in tree.findall('.//procstep/date'):                     node.text = str(dt[:10])                 for node in tree.findall('.//procstep/time'):                     node.text = str(dt[11:13]+dt[16:19])                 for node in tree.findall('.//metd/date'):                     node.text = str(dt[:10])      Following needs to be re-written for osgeo...                           for node in tree.findall('.//northbc'):                     node.text = str(FileDesc_obj.extent.YMax)                 for node in tree.findall('.//southbc'):                     node.text = str(FileDesc_obj.extent.YMin)                 for node in tree.findall('.//westbc'):                     node.text = str(FileDesc_obj.extent.XMin)                 for node in tree.findall('.//eastbc'):                     node.text = str(FileDesc_obj.extent.XMax)                      for node in tree.findall('.//nondig/formname'):                     node.text = "File: "+str(os.getcwd()+"\\"+File)                      for node in tree.findall('.//native/digform/formname'):                     node.text = "Type: "+str(FileDesc_obj.featureType)                 for node in tree.findall('.//avlform/nondig/formname'):                     node.text = "Ext: "+str(FileDesc_obj.extension)                 for node in tree.findall('.//avlform/digform/formname'):                     size= str(int(os.path.getsize(currentPath+"\\"+File))/int(1024))+" KB"                     node.text = "Size: "+size                     print size                 for node in tree.findall('.//theme'):                     node.text = str(FileDesc_obj.spatialReference.name +" ; EPSG: "+str(FileDesc_obj.spatialReference.factoryCode))                     print str(FileDesc_obj.spatialReference.name +" ; EPSG: "+str(FileDesc_obj.spatialReference.factoryCode))                 #print node.text                 projection_info=[]                 Zone=FileDesc_obj.spatialReference.name                      if "GCS" in str(FileDesc_obj.spatialReference.name):                     projection_info=[FileDesc_obj.spatialReference.GCSName, FileDesc_obj.spatialReference.angularUnitName, FileDesc_obj.spatialReference.datumName, FileDesc_obj.spatialReference.spheroidName]                     #print "Geographic Coordinate system"                 else:                     projection_info=[FileDesc_obj.spatialReference.datumName, FileDesc_obj.spatialReference.spheroidName, FileDesc_obj.spatialReference.angularUnitName, Zone[Zone.rfind(zone)-3:]]                     #print "Projected Coordinate system"                 x=0                 for node in tree.findall('.//spdom'):                     for node2 in node.findall('.//keyword'):                         #print node2.text                         node2.text = str(projection_info[x])                         #print node2.text                         x=x+1                           tree.write(newMetaFile)                      # CODE to add declaration back into xml (sometimes required)     ##            s = open(currentPath+"\\"+newMetaFile).read()     ##            s = s.replace('<anzmeta>', DECLARATION+'<anzmeta>')     ##            #s = s.replace('P.O. Box 1616', 'P.O. Box 573')     ##            f = open(currentPath+"\\"+newMetaFile, 'w')     ##            f.write(s)     ##            f.close()                      f = open(Generated_XMLs, 'a')                 f.write(str(Count)+": "+File+"; "+newMetaFile+"; "+currentPath+";"+existingXML+"\n")                 f.close()      I see that there is the following that I can use               dataSource=osgeo.ogr.Open(fn)     layer = dataSource.GetLayer(0)     projection = layer.GetSpatialRef() #Get spatial reference     feature = layer.GetFeature(0)     extent=layer.GetExtent()     numFeatures=layer.GetFeatureCount()


Where to find shp2pgsql windows binaries?

Is there anywhere available shp2pgsql binaries for windows without installing the whole PostGIS? I particularity need the command line version of that import tool. I would like to share a batch script that uses the shp2pgsql.exe to my co- workers but don't know how to share the shp2pgsql.exe. Could I just copy that file from my postgres/bin folder? I suppose that then I need at least libpg.dll. How about other files (libgdal-1.dll, libproj.dll)?


Getting MongoDB Working with GeoServer

I'd like to use a MongoDB database from GeoServer. There seems to be a GeoTools plug-in available (http://repo.opengeo.org/org/geotools/gt-mongodb/), and I've dropped the latest version (8.2) into the **webapps\geoserver\WEB- INF\lib** folder and restarted, but it doesn't show up in the new data source list within Geoserver. Any ideas? I'm using GeoServer 2.2 on Windows 7 64-bit.


mosaic raster to file geodatabase yields missing raster sections

Since upgrading to ArcGIS 10.1 (SP 1) from 10.0, I've been encountering an issue when running the `arcpy.MosaicToNewRaster_management()` tool with output to a file geodatabase. I'm principally working with python, but I've duplicated the issue in ArcMap. Consider a sample dataset, available here, which includes two states (MA and CT) of gSSURGO soil rasters. Create a file geodatabase for outputs, then:               outGDB = <your file geodatabase>         arcpy.env.outputCoordinateSystem = arcpy.SpatialReference("North America Albers Equal Area Conic")     arcpy.env.OverwriteOutput = True     arcpy.env.pyramid = "PYRAMIDS -1 NEAREST DEFAULT"     #arcpy.env.snapRaster = <your snap raster> # I snap to an NLCD layer, not sure its pertinent to the example, though     arcpy.env.cellSize = 30          inFolder = <the folder which contains the extracted zip file contents>     inList = []     arcpy.env.workspace= inFolder     for f in arcpy.ListFiles():         inList.append(inFolder+f+"/"+f)          arcpy.MosaicToNewRaster_management(ify(inList,";"),outGDB,"soils",albers,"32_BIT_UNSIGNED","#","1",'FIRST')      The operation successfully produces a new raster, but for me it has some unusual properties. Namely, I find large sections of the file do not display when zoomed out: ![enter image description here](http://i.stack.imgur.com/gVsjy.png) And as I zoom in incrementally, the gaps fill: ![enter image description here](http://i.stack.imgur.com/VlvJL.png) ![enter image description here](http://i.stack.imgur.com/ferlh.png) A few notes:   * The "Identify" tool tip shows that there is data present even when not depicted. The same issue occurs in both ArcMap and ArcCatalog.   * The issue does not occur when I perform `arcpy.MosaicToNewRaster_management()` with output to a regular system folder.    * Scale range is set to "Show layers at all scales".    * As I zoom out, the whole extent disappears eventually.


using the "freehand" construction tool

I am drawing hydro features with the freehand tool. Does anyone know how to delete vertices (i.e. back up) in ArcMap 10 while drawing with freehand in the construction tools? I was just curious if there was a way to do this without having to go ahead and complete the polygon and then go back and edit the vertices post completion. Thanks!


Can I manually set the size of GeoServer's tiles?

I'm using GeoServer to generate a street name overlay that we can use with our various basemaps. It works great, but the names repeat too often to be truly beautiful. I've tried bumping up the repeat option in the SLD, but high values are being ignored, and the label is generated once per tile. The simplest workaround I can think of is to simply bump up the size of the tiles for the layer, but I can't find an option that'll let me set that. Does this option exist in GeoServer? Thanks in advance!


Searching for c# code to convert from UTM to WGS1984 (and back)

I'm looking for code in c# that converts coordinates from UTM to WGS1984 (and preferably backwards as well). I need to convert coordinates from only one zone (36N). I've found this and this, but they throw me 150-200 meters from the real point (The allowed diversion I'm aiming for is 5 meters tops). EDIT: Found this as well, but did not have an opportunity to check this for accuracy. thanks in advance. EDIT: Found this as well, but did not have an opportunity to check this for accuracy.


How to uninstall PostgreSQL Server on localhost and reinstall with new user and password?

On Windows 7, I'd like to install a brand new, fresh installation of PostgreSQL/PostGIS on a laptop, and wipe _ALL_ the localhost servers, users, data and passwords clean, and then reinstall as if it had never been installed before. I have QGIS 1.8.0 running perfectly, but I'd like to create a PostGIS database. However, an idle and unnecessary installation already exists that I'd like to clean off or reset the password on. I've done an 'uninstall' of Postgis, and then PostgreSQL, but that didn't remove the network service and former postgresql user. Reinstalling requires the same password and user as before, and so I'm stuck. If there is an easy solution, without reinstalling Windows 7 or QGIS 1.8 (osgeo4w) then I'd like to go that route. What should I do in this situation?


What language (or languages) are the next 'big thing'?

Having (mostly) learned how to navigate Python programming in GIS, I've gotten to thinking about where GIS programming is going from here. I know VB used to be the go-to language for ArcGIS, but that has been supplanted by Python. I love Python's utility, ease of use, and support in a variety of spatial and non-spatial programs, but I know these are no guarantee of it sticking around. I'm curious about which languages I should keep an eye on and consider dabbling in to be ahead of the curve. I've seen a few options out there. For example Geoscript has libraries for Scala and Groovy in addition to js and Python. What up-and-coming programming languages are trending towards increased use, increasing geospatial functionality, and cross-application scripting?


How do I mashup imagery from Gigapan?

![enter image description here](http://i.stack.imgur.com/skWX6.jpg) NASA recently published this long imagery swath onto Gigapan. Is there some way to mash up imagery from Gigapan so that it displays in a web map, using one of the ArcGIS web mapping API's?


Querying lines that meet in endpoints to show result in clockwise order?

I have some polylines - roads. They meet in an intersection like on the picture: ![enter image description here](http://i.stack.imgur.com/H8ZdE.png) I want to find out which roads meets `Road A` - endpoint to endpoint - and i want to know the clockwise order of the result. Thus, the example in the picture should return in the order:               {ROAD C, ROAD D, ROAD B}      Using `IFeatureClass.Search()` with a `ISpatialFilter` only returns the features ordered by OBJECTID (The road names illustrate the order og OBJECTID). Do I have to do the math myself, or is there some smart esri woodoo that I can do?


Parse attribute table value to export filename using data driven pages and arcpy.mapping

I'm trying to customize a data driven page looping statement workflow and want to set a better filename to the final export. Currently the file name uses the page index (pgIndex), but I would like it to use a specific field in the attribute table. Here is my file naming looping statement:               for pgIndex in range(1, tempDDP.pageCount + 1, 1):            # Create a name for pdf file        temp_filename = r"C:\Desktop\Test\temp_pdfs\MB_" + \                                 str(pgIndex) + ".pdf"       if os.path.exists(temp_filename):         os.remove(temp_filename)      Any idea how I can get the result I want? I know this is possible if you use the built in export tool for arc 10, but I need more functionality, and therefore a customized script.


Get the distance from a point on a polyline to polyline's from point

I have a polyline and a point on the polyline. I need to find the distance from the from point of the polyline to that point. ![enter image description here](http://i.stack.imgur.com/k2bfR.png) `ICurve.QueryPoint` method does the opposite thing. It gives a point based on given distance. In `ICurve.QueryPointAndDistance` method, specified point is a outside point and it gives shortest distance. I could not find any method that gives the distance I require. So I have tried something different. I took the polyline and split at specific point using IPolycurve.SplitAtPoint Method. I wanted to get my desired part's length from splitted part. But I guess it was a wrong procedure. I found a geometry collection and those geometry were not type of esriGeometryPolyline, they were type of esriGeometryPath. And the length of the path is not similar of my desired part's length. Can anybody give me some pointer about how to get the length?


Flex Map component, update extent on resize

I have application with Flex Map component. Application has several states, and map component's size is changed depending on states. When state is changed, I need to change extent. But for some reasons, map component is not recalculated by that time. I tried to change extent on resize event. I see in debug mode, that map width is changed, but when I try to set new extent, it "thinks" that map width is not changed yet. So, every time I set new Extent, it's set for the previous map state width. I tried callLater, but all the same, map component has not calculated something inside itself and sets extent for the previous map width. Thanks in advice


What is best approach to provide a WMS of world coverage of 1 meter CIB?

I have been tasked with creating WMS's of several raster types to include 1 meter CIB. We have an overall ESRI environment to include ArcGIS Server and we have a butt load of original CIB data (world coverage). Not asking for the perfect answer, unless you want to provide it, but could sure use some pointers, general directions and maybe some sage advice of what NOT to do.


How to calculate Solar Radiation falling on vertical surfaces using DEMs and ArcGIS?

I am using ArcGIS10 Area Solar Radiation tool to calculate irradiation on horizontal surfaces (building roofs) but need to do the same for vertical surfaces (building facades). Any ideas on how to do this using ArcGIS and DEMs? I am open to broader suggestions on what tools to use, just needs to run for large portions of a city (neighbourhood scale) at once, instead of building level. Thanks! JJ


ArcGIS 10 HTML popup code for images

I'm diving into using the HTML popup in ArcGIS 10 and I'm trying to figure out how I can get an image to appear. I have a point file that contains the field "Coll" that has a image name with no extension ("100015"). All the images are stored in a directory ("T:\SEFIS2010_GVdata\SEFIS Video"). I can make an image appear in the popup using this XSL code               <xsl:when test="FieldName[starts-with(., 'Coll')]">         <img src="T:\SEFIS2010_GVdata\SEFIS Video\100015.jpg"/>     </xsl:when>      but what is the syntax to append the directory, the FieldName, and the ".jpg" extension?


How to create a constant numeration of ID (indexing) in an attribute table (ArcMap)

Is it possible to create a constant indexing (as a numbers) in an attribute table of the theme with many objects that manner that it will remain (will not change) during update of this theme? I found the instrument “Drop Index (Coverage)”, but it seems that it works only with ArcInfo license. Is it possible to create “constant” numeration of ID in ArcMap?


Is it possible to get field type information from FieldInfo object in ArcPy?

I'm looking at the **FieldInfo object documentation for ArcGIS 10.2** and am **not** seeing access for **field type (e.g. short, string, double)**. Is it possible to get field type information from the FieldInfo object in ArcPy? Thanks for any help or suggestions in advance. I know I can access the information from calling arcpy.ListFields(), but I want it through feature layer FieldInfo.


How can I use GIS in concrete factories?

Ideas for a GIS proposal.   I would like to propose the use of GIS in a concrete factory.   Can anyone help with some basic projects, and ways to make GIS viable to the benefit of the company?   I use arcmap.


Calculating a spherical polygon centroid

I'd like a general way to calculate centroids for polygons on a sphere. So far, the best online reference appears to be: > Tools for Graphics and Shapes by Jeff Jenness. The method described there suggests decomposing the polygon into multiple spherical triangles, and computing the average of spherical triangle centroids, weighted by the spherical triangle area. I know that there are several ways to define a spherical polygon centroid, but I'm looking for something analogous to the following definitions for points and polylines:   * **Points** : arithmetic mean of the Cartesian vectors representing the points.   * **Polylines** : weighted mean of Cartesian vectors representing midpoints of each line segment, weighted by the (spherical) length of each segment. It seems a reasonable continuation to have **polygon** centroids defined as the weighted mean of the triangular decomposition, weighted by area. My question is whether the method in the above reference will work regardless of the triangle decomposition used. In particular, it mentions decomposing into triangles relative to an arbitrary point, even external to the polygon, such that some triangles will have negative areas that contribute a negative weight. Related: How to find the center of geometry of an object?


How to view LiDAR data from a web browser?

I am looking to host lidar data on my own server and give clients the ability to view that data through a web browser as a 3D point cloud (file would be in .las format or equivalent), possibly with the ability to measure features. If anyone knows of an easy to implement piece of software it would be greatly appreciated. I am not nessecarily looking for open source and I would prefer something plug and play, I am not a programmer. Thanks! Edit #1: http://zenit.senecac.on.ca/wiki/index.php/XB_PointStream I am trying to implement software from the website above but am having difficulty with the webgl aspect. Does anyone have any knowledge of how wide spread webgl is? does it work on mobile devices (android ios)? Another example I am trying to implement is the following: https://github.com/mapbox/pointcloud Edit #2: I am specifically interested in getting the demo from map box working on my server. I just keep getting the error screen when I copy it to my server and yes my browser is webgl capable. https://github.com/mapbox/pointcloud Thanks!!!


ArcGIS layer format

am I correct in saying that the ArcGIS layer format for styling maps (*.lyr) is not an OGC approved format? And this is the reason that QGIS cannot read the *.lyr files? Thanks Antonio


Why are ellipse polygones simplified when used in a FeatureService?

I have polygons with ellipse shape in a SDE Oracle ST_GEOMETRY geodatabase. All those polygons are correctly displayed when in a MapService. But when displayed in a FeatureService, some polygons undergo deformation. It's like they were simplified. I'm using Oracle 11g and ArcGIS 10.0 ![enter image description here](http://i.stack.imgur.com/trRYS.png)


Garmin etrex 10 and QGIS

I want to know if anyone has been able to download data from a etrex 10/20/30 directly from Qgis. The usb protocol decsribe in a recent post does not do the trick. GpsBabel documentation states that > "This unit uses GPX format, not Garmin protocol. Therefore one should > communicate with it by reading and writing GPX files instead of using this > format. Members of this class of products do not support realtime > positioning protocol." All I want is to be able to download my data within QGis Thanks before hand Gerardo


Merge polygon based on other line shape file PostGIS

I have a polygon shape file and a line shape file. I would like to merge two polygons which shares the same border along with line shape. Finally the line should be removed in polygon shape file. In Below sample, A&B polygons should be merged and C&D, E&F, G&H so on.. ![Polygon and Line shape files](http://i.stack.imgur.com/Vm4Pa.png) If any easy solution available other than PostGIS, then please provide your views.


What is this ArcSDE 10 for SQL server 2008 Enterprise sp2 64bit setup error?

I setup ArcSDE 10 for SQL Server 2008 Enterprise SP2 64 bit but error. I'm using: ArcSDE 10 for SQL server 64 bit; Sql Server 2008 Enterprise SP2 64 bit; Window Server 2008 Enterprise SP1 64 bit; Server IBM 3500 M4; Attach Error: ![enter image description here](http://i.stack.imgur.com/2JpEw.jpg) ![enter image description here](http://i.stack.imgur.com/F30q4.jpg) ![enter image description here](http://i.stack.imgur.com/zj4QM.jpg)


What GIS-related services have been affected by the U.S. government shutdown?

I noticed data.gov, the US government's open data (including GIS) clearinghouse, was down, reading the following message: > Due to the lapse in federal government funding, this website is not > available. We sincerely regret this inconvenience. > > For information about available government services, visit USA.gov. Similarly, usgs.gov is down, with only critical USGS websites available: >   * Ecosystems >     * Disease Maps >   * Natural Hazards >     * USGS coastal erosion hazards information >     * USGS earthquake information >     * USGS emergency operations portal >     * USGS information on geomagnetic activity >     * USGS landslide information >     * USGS volcano information >   * Water > Presumably this is only a temporary outage. Are there any other services that have been affected, and any permanently? **Update:** Now that the US government has reopened, all of the sites linked so far in this thread appear to be back up.


Convert area from square meters to degrees globally

I have a global raster file with 3600x1800 pixels. I don't have any information about the projection used. The raster contains one band with a quantity with the unit "per square meter". How can I convert this to be "per square degree", prefereably using GDAL or QGis?


How to add an ID based on attributes in ArcMap 10.1

Given are:   * a polygon shapefile/feature class (FC) containing municipal districts   * a point shapefile/FC containing locations of, lets say, trees. My goal is to append an unique value (1, 2, 3, ...) to the point shapefile/FC which is:   1. sorted from north to south (or vice versa)   2. and sorted/grouped by the municipal districts (the priority of sorting lies on the municipal districts) I managed to solve 1. by generating y-coordinates for each point and than running this script which calculates and sorts unique values by means of the the y-coordinate column: ![enter image description here](http://i.stack.imgur.com/55Fdt.jpg) However, I do not know how to solve 2. Finally my map should look like this (the numbers in red are the ones I'd like to calculate instead): ![enter image description here](http://i.stack.imgur.com/1soOD.jpg)


How to crop an image based on a shapefile using GeoTools

I'm writing a web application using GeoTools (it's Java running in a web container). I need to crop a raster file based on a shape file. The core GeoTools documentation and examples I can follow suggest that cropping is limited to Envelope (rectangular) cuts. I came across the ImageWorker class which provides "helper methods for applying JAI operations on an image." It has a promisingly named method "mask" method ... which seems like what I want ... but it's poorly documented and seems really slow. I'm looking for examples and/or suggestions for alternative strategies.


Keep column titles when exporting SQL query in MapInfo

Is there a way to keep column titles when exporting a query in MapInfo as a csv or a new tab. This is my result: ![enter image description here](http://i.stack.imgur.com/3nJ4v.png) And my export looks like this: ![enter image description here](http://i.stack.imgur.com/3IaQu.png) It's not a major issue, I jus like saving myself time wherever I can.


ESRI JS API - Getting a Screenshot with pure Javascript

I have a requirement to be able to produce a pdf of the application's map (Esri JS API 3.7). The map will contain ArcGISDynamicMapServiceLayers, user drawn graphics including text symbols, and possibly a pop-up. The PrintTask made available at ArcGIS Server 10.1 gets be about 80% of the way there. However, it does not handle text symbols or popups as far as I can tell. If it were just the text symbols I had to worry about, I think I would just hack together something with the arcpy mapping module to do the job. But the popup is much more challenging I've explored things like BrowserShots, wkhtmltoimage...etc and like with no luck. I'm wondering if anyone has been able to accomplish something similar.


Display points labels starting at certain zoom level

I use WMS to display my points on the map. I would like to display points labels(name_ID) starting at certain zoom level. From What I have read I understand I can do it with GeoServer rules, but I need a clear example to clarify this.


How to get feature from PostGIS to OpenLayers with ASP.NET?

![enter image description here](http://i.stack.imgur.com/ZwH9U.jpg) I need to show my feature from this table in PostGIS in my ASP.NET web page web. Has anyone done that?


Are the functions in OGRPolygon accessible through the python bindings?

I'm currently trying to use the OGR python bindings to process some shapefiles. I want to obtain the number of interior rings in a polygon feature. Unfortunately I'm unable to use the documented function to get that information. Here is my code:               from osgeo import ogr     field = ogr.Open("testExtract.shp")     lyr = field.GetLayer("testExtract")     feat = lyr.GetNextFeature()          geom = feat.GetGeometryRef()     featName = geom.GetGeometryName()     print featName     geoCount = geom.GetGeometryCount()     print "geoCount: " + str(geoCount)          print geom.getNumInteriorRings()     print geom.GetNumInteriorRings()     print geom.getNumInteriorRing()     print geom.GetNumInteriorRing()      This is what those print commands output:               POLYGON     geoCount: 6          AttributeError: 'Geometry' object has no attribute 'getNumInteriorRings'     AttributeError: 'Geometry' object has no attribute 'GetNumInteriorRings'     AttributeError: 'Geometry' object has no attribute 'getNumInteriorRing'     AttributeError: 'Geometry' object has no attribute 'GetNumInteriorRing'      Now, the only polygon in that shapefile has interior rings. And the python code is telling me that geom is a polygon with 6 interior and exterior rings, which is correct. And the documentation, http://www.gdal.org/ogr/classOGRPolygon.html#a3b996195adcf9fcd4f33570a37753dde, is saying `getNumInteriorRings()` is a valid function for an `OGRPolygon`. So is the problem that `GetNumInteriorRings()` is not accessible through the python API? The python documention doesn't mention `OGRPolygon` as a class, just `Geometry`. http://gdal.org/python/osgeo.ogr.Geometry-class.html Edit: I realize that each polygon only has one exterior polygon, so I can get that information. But I'm also interested in a couple of the other functions in `OGRPolygon` such as `getInteriorRing (int)` and `getExteriorRing ()` so I am curious if those public member functions for `OGRPolygon` are accessible in Python.


Create Random points

I have polygon with an attribute which has numbers populated in it. I would like to create random points for each of the polygon depending on the attribute. How could this be done ??


back up of qgis file

Can we recover a previously saved version of qgis file? For example: I have saved my qgis file about an hour but I need the yesterday's back up of qgis file. The file which does contain today's saved work. Thank you, Regards, G.Muthumari


Batch update attributes based on values obtained in Select by Location

I have a points shapefile with a blank field. I want to populate this field with an attribute obtained from another underlying (polygon) shapefile. I can do this for a single record easily using select by location - in other words point y is located in area x, so the field updates itself with area x. The problem is that my shapefile has nearly half a million records and I need to do this often. I have no scripting experience at all. Is there a simple batch method that will do this job?


QGIS 2.2: GDAL Grid (Interpolation) Error

As much as i understand Raster -> Analysis -> Raster (Interpolation) can provide me with a terrain file out of a shape file with a Z coordinate. I select the input and output file and a Z field. It gives me this error: ERROR 6: GDALDriver::Create() ... no create method implemented for this format. Unable to create target dataset "D:/shp/terrain.dem". GDALDriver::Create() ... no create method implemented for this format. Tried some other formats (I'm aiming for either .dem, .hgt or .xyz) but got the same error everytime. What am I missing here? The Vector layer contains X coord, Y coord, Z coord, number and name fields.


ArcGIS Server REST-Query Layer: only few attribute fileds are returned in response

a newbie question in using ArcGIS Server REST service: from ArcGIS Services Directory, I opened the page of one layer in a MapServer service, this layer has a long list of attributes/fields. however, in the response of **Query_Layer** operation, it only includes **_two attribute fields_** in each feature object. I am wondering is this a configurable setting? if so, where to control this to return all attribute fields. thanks! and let me if further details of this question are needed.


Support for PostgreSQL / PostGIS Inherited Tables in MapInfo/QGIS

Does anyone know if MapInfo and QGIS will support inheritance in a PostgreSQL/PostGIS database? I would like to make use of inheritance but need to make sure the software I use will work with them. From the book PostGIS in Action I have found the following, but am unsure if MapInfo or QGIS will be supported or not: > Inheritance works seamlessly with OpenJump, GeoServer, and MapServer. Any > tool that polls the standard PostgreSQL metadata should end up treating > parent tables like any other. EDIT I have had a look at the Paris example in Chapter 3 of PostGIS in action. I have a parent table called paris, and 3 child tables called paris_linestrings, paris_polygons and paris_points. These show up as follows on the Add PostGIS table dialog (I dont have any lines in the linestrings table yet, so that's why the paris table doesn't show lines yet) : ![alt text](http://i.stack.imgur.com/Iy4b3.jpg) In MapInfo, the tables show up in the list when opening a DBMS table. I cant get them to map as I haven't set up the MapCatalog and added the relevant data to each table to allow MapInfo to show the spatial data. But I can open the tables in a browser view and see the attribute data and it seems to be correct. All I need to do now is set up some triggers to put the correct spatial type into the correct child table when added to the parent.


Z values all equal 0

I have just posted a similar question, but I solved part of it, however it has now lead to a new problem. I have a point layer, and have got the x,y and z coordinates from 'extract values to points'. The x and y values appear fine in the attribute table but the z values are all 0. I have about 150 points, so I do not particularly want to go through each by way of info point! Can anyone provide some advice on how to get the true z values? I have posted a question previous to this one which is similar How to extract Z data from a point layer Slightly different as I can now retrieve and X and Y, but Z is still a mystery.


How do i snap points to crossroads using ArcGIS 10.2?

I have some points (370 points) in a layer . These points must snap to crossroad layer . I could'nt find any tools in arcmap to snap points to crossroad layer. Is there any way to snap these points to the crossroads ?


Background label shows above all annotations and layers

I'm using ArcMap 10, and have a very dense map of Detroit with many point features. To lay out the labels properly, I converted the labels to annotation (stored in the map, not in a geodatabase), and spent hours and hours arranging them. Now I'm trying to place a background label for Detroit. I'm using the Maplex engine, and in the label properties, I've selected "Background label (placed first)". But the label is still on top of everything else -- all other layers and the annotations. I also tried checking "Never remove (allow overlap)". How can I put it in the background? Also, are annotations always drawn above all labels? It seems like that's true.


Is there a library to make custom markers for Google Maps API V3 by setting the marker's icon, labels and opacity?

Is there a library to make custom markers for Google Maps V3 by controling the icon, labels and opacity? This library for Google Maps API V2, Labeled Markers, seems OK, but I was hoping for a V3 version, and was curious about opacity control also?


Gdal doesn't recognise ArcMap 10.1 EPSG:3857

I have projected a geotiff to EPSG:3857 using ArcMap 10.1 (in Arc it is called “WGS_1984_Web_Mercator_Auxiliary_Sphere”). The coordinate parameters look correct, so why does gdal not recognise the coordinate system of this file? E.g. when I open it in QGIS it says "define this layers coord ref system". Can anyone help? What can I do to make gdal recognise this coordinate system straight away? To be more specific: As read from `gdalinfo`, the geotiff projection parameters as produced by ArcMap 10.1:               PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",         GEOGCS["GCS_WGS_1984",             DATUM["D_WGS_1984",                 SPHEROID["WGS_1984",6378137.0,298.257223563]],             PRIMEM["Greenwich",0.0],             UNIT["Degree",0.017453292519943295]],         PROJECTION["Mercator_Auxiliary_Sphere"],         PARAMETER["False_Easting",0.0],         PARAMETER["False_Northing",0.0],         PARAMETER["Central_Meridian",0.0],         PARAMETER["Standard_Parallel_1",0.0],         PARAMETER["Auxiliary_Sphere_Type",0.0],         UNIT["Meter",1.0]]      vs GDAL's projection parameters:               PROJCS["WGS 84 / Pseudo-Mercator",         GEOGCS["WGS 84",             DATUM["WGS_1984",                 SPHEROID["WGS 84",6378137,298.257223563,                     AUTHORITY["EPSG","7030"]],                 AUTHORITY["EPSG","6326"]],             PRIMEM["Greenwich",0],             UNIT["degree",0.0174532925199433],             AUTHORITY["EPSG","4326"]],         PROJECTION["Mercator_1SP"],         PARAMETER["central_meridian",0],         PARAMETER["scale_factor",1],         PARAMETER["false_easting",0],         PARAMETER["false_northing",0],         UNIT["metre",1,             AUTHORITY["EPSG","9001"]],         EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],         AUTHORITY["EPSG","3857"]]      GDAL's parameters have the EPSG authority embedded, while Arc's does not. i.e. Is there something I should do in ArcMap to get EPSG embedded?


Modify MapCruncher sample to make it generate tiles with GCS 1984 spatial reference

I want the MapCooker sample to generate tiles with a projected spatial reference of GCS WGS 1984. I currently initialize it with a path to a layer with the NAD_1983_HARN_Adj_MN_Isanti_Feet coordinate system. The sample is here: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sample_Multithreaded_MapCruncher/000100000mmm000000/ I already modified the sample to produce .pngs, by changing the StorageFormat to               cacheStorageInfo.StorageFormat = esriMapCacheStorageFormat.esriMapCacheStorageModeExploded;       Now I want to control the projected .pngs spatial reference. Any idea how to do this? I've been messing around with it for 2 hours with no luck. I'm using ArcEngine 10 with C# and VS2010


Visual Basic Error while Creating a new UIButtonControl

I am trying to add a new form that a programmer sent me for a specific UIButtonControl. When I import the form into Visual Basic following the steps they sent me, it imports the form as a module instead of a new form. when I try to use the new UIButtonControl button that I created with the module, it gives me this error: Compile Error. Invalid outside procedure. Both the programmer and myself feel it is because visual basic is bringing the form in as a module instead of a form, can anyone help me fix this please?


Reprojecting non 4326 WMS image to spherical mercator

In OpenLayers, I'm trying to display a WMS overlay (EPSG:4269) from a server I don't have control over to a spherical mercator projection. Is there an equivalent to this: http://blog.sumbera.com/2010/02/17/overlay- wms-on-google-in-openlayers/ for projections other than EPSG:4326 to EPSG:3857? Thanks!


Where can I find free building height dataset for major cities around the world?

I am searching for building/property data which include building height, building area, lot size, and building type classifications(preferably as complete as possible). I am working on an Earthquake Model for highly urbanized locations, especially those around fault lines. I would greatly appreciate the help. Thank you!


How to add an offset to a GeoJSON layer in Leaflet?

Using the example GeoJSON tutorial code at leafletjs.com.   Change the `myLines` variable so that the two lines overlap, but run in opposite directions as follows:               var myLines = [{         "type": "LineString",         "coordinates": [[-100, 40], [-105, 45], [-110, 55]]     }, {         "type": "LineString",         "coordinates": [[-110, 55], [-105, 45], [-100, 40]]     }];      This overlapping is a common situation with `lineString` shapes, especially roads. In QGIS/ArcMap, one can apply an Offset = X to the layer such that a positive offset shifts each line feature X (pixels, map units) to the right, in the direction of travel (starting coordinate to ending coordinate), and a negative offset shifts the line to the left, in the direction of travel. There does not appear to be an option in Leaflet which would allow one to apply a similar offset in the `style` to these lines so that they are not shown overlapping. Markers seem to have this option, but not lines. I was hoping the following code would work, but it doesn't since "offset" is not a valid option.               var myStyle = {         "color": "#ff7800",         "weight": 5,         "opacity": 0.65,         "offset": 1.5     };          L.geoJson(myLines, {         style: myStyle     }).addTo(map);      Does this option exist? Is it called something else?


How to add Map Legend, Scale Bar and Select tool to an ArcGIS Server Service?

I have published a service from ArcMap to my Server Account but I can't figure out how to add the legend, scale bar and select tool to the service. According to the published service it was built using ArcGIS JavaScript API. Will I have to write some code in order to display what I want?


Object-ID field in CSV file

I am displaying a CSV file in ArcGIS 10. After adding the data table, I right- click it, and select "Display XY Data". I am able to complete the required information and display the data, however, I receive the following error message. > The table you specified does not have an Object-ID field so you will not be > able to select, query, or edit the features in the resulting layer, or > define relates for them. Because of this, I'm limited in what I can do with the newly visualized data. Is there a specific column that should be added to the CSV file that ArcGIS will interpret as an Object ID? I've tried a few namings, but keep getting the same message.


Model Builder: Enable / Disable parameters based on Conditions / Preconditions

I have been working with Model Builder and am having trouble placing a precondition on an input parameter. However, I may be going about it in the wrong way and may just need a Python script. My example will be based off of the 'Strip Map Index Features' tool (Cartography Tools --> Data Driven Pages --> SMIF) in ArcMap. When running the tool, the GUI shows a checkbox (Use Page Unit and Scale). There is also another parameter/textbox (Map Scale). The 'Map Scale' text box only becomes active or enabled when the checkbox is checked. THis is my dilemma. I am trying to recreate this functionality using model builder and I am not sure how to do so. Any help on this topic would be greatly appreciated. Thanks in advance for any feedback.


Draw postgis geometries in google maps api

Postgis have a base with a table of data lines and other points. I'm doing a java applet to query these tables and space to draw on google maps. My question is: what better way to spend these geometries to google maps? When I give the select the bank which is the best format to return the geomtrias to draw on the map, I had thought of GeoJSON. Does anyone have any example code or article addressing postgis + google maps api?


How to configure OTB in my own application?

I had installed Orfeo Toolbox via Osgeo4w and using the applications through commandline. Now my question is if i want to use Orfeo Toolboxin my application without installing through Osgeo4w, and use the OTB applications through the command line ? How to do it? I mean with out installing through Osgeo4w if i want to use the OTB applications through command line what are the dependencies i need to download? how to configure ? Thanks in advance


Open url viewer with native ArcGIS native app

I would like to know how to open URL viewer with the ArcGIS native app (Android/iOS) of the mobile phone. Giving to the user the option choose if he wants to open with ArcGIS native app or the browser like this. ![How do you want to ope?](http://i.stack.imgur.com/C1soG.png) I have read this http://blogs.esri.com/esri/arcgis/2012/11/28/open-the-arcgis- app-from-the-tap-of-a-map/ but is not working. What I have to do? Thanks!


Access control for SaaS-based GIS, which is the right way to go?

I'm currently researching on some access control models for SaaS-based GIS, and in the future would like to implement one. The common use cases would be like: some of the services, resources, layers, features, areas on map, etc. will be accessible only by authorized users. I have searched for a while and find the OGC GeoXACML implementation specification meet our needs quite well and looks promising. And also there's quite a few paper discussing about Geoxacml that I can refer to. But then I find another article which propose to use oracle VPD (we are using oracle spatial), and it points out that the GeoXACML has some inefficient consequences. There is another tool that might solve the problem is the GeoShield (https://sites.google.com/site/geoshieldproject/), but it seems to be in the early work and don't have to much documentation. So which option would you suggest? Is there other options available? If geoxacml is the right way to go, how long do you estimate it will take to implement it? Any response would be appreciated.


How to control what kind of tags / flags are imported with osm2po?

With the help of osm2po, I have successfully inserted the contents of the italian files (italy.osm.pbf) in a pgrouting-enabled database (postgresql 8.4) It displays fine in Qgis, using rule based labeling (thanks to underdark for the .qml file). Now I wonder: how can I find out what attributes are included in the .pbf and how to control what tags / flags are imported in the database? Any help very much appreciated.


How to show a geoTiff on an iOS application?

I'm developing an iOS application that will use offline maps. These maps are on GeoTiff format but I don't know how to do it. I've found this question: How to display a GeoTIFF on mapView but it uses **ARCGis** and I don't have a license to use it. Is there any other way to show a GeoTiff? And, of course, use GPS to show where user is.


Can't open Dgn file with CadWorkspaceFactory?

I am trying to open Dgn File to get data. But I got the error: **"Error HRESULT E_FAIL has been returned from a call to a COM component ?"** when using OpenFromFile statement, please see my codes:                Type factoryType = Type.GetTypeFromProgID(                  "esriDataSourcesFile.CadWorkspaceFactory");      System.Object obj = Activator.CreateInstance(factoryType);      IWorkspaceFactory factory = obj as IWorkspaceFactory;      IFeatureWorkspace workspace = (IFeatureWorkspace )factory.OpenFromFile("C:\\DC7.dgn", 0); // Throw Exception      May you help me ? Regards, Tai


PostGIS: How to ST_Clip() a raster with a polygon?

I have done:   * Import a SHP file into PostGIS by PostGIS SHP loader GUI.   * Import a raster into PostGIS:  \raster2pgsql -I -s 4326 landsat.TIF -t 500x500 public.landsat > query.sql After importing all into postGIS, I have tried exporting raster to PNG by ST_AsPNG. It run well. Besides, I run the example of ST_Clip() in PostGIS docs. It worked. **Question:** I am trying to clip a raster with a polygon of the SHP file. It returns nothing.   I tried ST_Intersects(rast, geom polygon) like this. It failed. Can anyone help me on clipping a raster with a pylygon of SHP file? Viewing in QGIS, the raster overlaps the polygon. I'm using PostGIS 2.0. **EDIT:** Here's what I do with ST_Intersects()               SELECT      ST_Intersects(polygon.geom, raster.rast)     FROM        public.vnm_adm2 as polygon,       public.landsat as raster;      And it returns false in all rows. **UPDATE:** There're some things to be noted here:   * I used ST_AsPNG(), which remove spatial reference to output file.   * Switch -s [4326] doesn't work yet (PostGIS 2.0), so the rasters ain't be converted to polygon's EPSG, then it returns false in all rows.


Creating a line along an existing polyline from a point

I have a large data set of points, all of which lie on a river network and have x, y co-ordinates. I want to calculate the slope of the river channel at each point from the underlying DEM by taking the elevation at each point and the elevation of a point on the network 1km upstream. The best way I can think of doing this is by creating a line upstream from each point that stops when it reaches 1km away (obviously the line will not be straight in most instances), then create a point at the end of that line. I guess the flow direction or accumulation layer could be used to draw the line in the correct direction (upstream) from each point but I don't know where to start! Any tips or pointers to similar python scripts to adapt would be appreciated. Thanks


Error: Coordinate values are out of range [-180 -90, 180 90] for GEOGRAHY type on Postgis?

when I run a query on Postgis               select st_astext(ST_SetSRID(f.geom,4326) ),st_astext(st_centroid(ST_Transform(b.wkb_geometry,4326))) from a,b where ST_Distance_Sphere( ST_Transform(a.geom,4269),ST_Transform(b.wkb_geometry,4269))<10 limit 1;      I got this message on my screen print in infinite loop                Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY      to give you an idea about what I am getting when I fetch a.geom and wkb_geometry ?               select st_astext(ST_SetSRID(f.geom,4326) ),st_astext(st_centroid(ST_Transform(b.wkb_geometry,4326))) from a,b limit 1;      I got this :               POINT(-73.9798264975362 40.679599746172) | MULTIPOLYGON(((989878.855200246 186914.37490882,989831.404507741 186822.841299236,989812.018719748 186832.772053644,989859.469740331 186924.306319401,989878.855200246 186914.37490882))) |       what does that mean ? Does this affect results I am getting ?


How can I download maps from mapquest?

I need to get a detailed map for my own purposes. I need it detailed as much as I can see the buildings (like google map hybrid mode). I went to http://open.mapquest.com/ but I couldn't find the way to download a map for Dubai city as example! How can I do that? I need the map data to apply a vector layer on it.


I can't seem to use arcpy.mapping print command. It's not displaying the mxds in the loop

Here's the code for the third parameter that list the local printers:               # Third Parameter     printer = arcpy.Parameter(         displayName="Select a Printer",         name="printer",         datatype="String",         parameterType="Required",         direction="Input")     # Set a value list for the available local printers     printer.filter.type = "ValueList"     printer.filter.list = arcpy.mapping.ListPrinterNames()      This works and lists all of my local printers. The problem is it can't print the looped MXDs. It looks like python can't find them in the loop according to my arcpy.AddMessage(). Here's the code:               # Get inputs     InputMXD = parameters[0].valueAsText     PDF_Folder = parameters[1].valueAsText     printer = parameters[2].valueAsText          # Set workspace as defined by user     #env.workspace = PDF_Folder     arcpy.env.workspace = r"c:/temp"          #List Names for Inputs     arcpy.AddMessage("PDF_Output: "+PDF_Folder)     arcpy.AddMessage("Printer Name: "+printer)     arcpy.AddMessage("MXDs before Loop: "+InputMXD)      ![enter image description here](http://i.stack.imgur.com/bvf7E.png) MXDList = arcpy.ListFiles(InputMXD) arcpy.AddMessage("After MXDList") arcpy.AddMessage(MXDList) for MXDPath in MXDList: arcpy.AddMessage("MXD Path: " + MXDPath) MXD = arcpy.mapping.MapDocument(MXDPath) arcpy.AddMessage("MXD: " + MXD) arcpy.mapping.PrintMap(MXD, printer) ArcMessage It's showing the mxds before the loop, but it isn't printing them once the loop hits. Any ideas? It's showing "[]" when it should be showing what's in the "MXDList". * * * Update 2 When I use this:                MXDList = glob.glob(os.path.join(InputMXD, '*.mxd'))      I got the same result as the image above. It's still not running through the loop. Here is my parameter setup for the InputMXD.                   # First parameter         InputMXD = arcpy.Parameter(             displayName="Input MXDs",             name="InputMXD",             datatype="DEMapDocument",             parameterType="Required",             direction="Input",             multiValue=True)      When I use this code with workspace set to my InputMXD:                   MXDList = arcpy.ListFiles("*.mxd")      I get this result. It doesn't want to list my MXDList.   ![enter image description here](http://i.stack.imgur.com/MMHIo.png) * * * Updated 3 When I try the newest code with the AddMessage and put my printing code below it the results say this. ![enter image description here](http://i.stack.imgur.com/YWVne.png) Traceback (most recent call last): File "", line 104, in execute File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\arcobjects\mixins.py", line 609, in **init** assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename") AssertionError: Invalid MXD filename.


How to auto-update WFST store with GeoExt/Openlayers?

I built an WFS-T with a grid panel (Ext.grid.EditorGridPanel) to edit features' attributes. Now, I want the feature store (GeoExt.data.FeatureStore) to reload/update automatically so that other users see changes committed immediately without reloading the whole webmap. I would appreciate hints for:   1. Attaching such an "update store" function either to my "save"-button or to my store's "afteredit"-listener   2. Having the whole store updated continuously in an automatic way


Why doesnt QGIS show the results from a WFS BBOX from a python script

I'm trying to figure out how to do get requests in QGIS using a bbox. I can get a bbox to clip a layer when I paste my uri into a browser but the EXACT same uri returns an empty layer in QGIS. A simple easy to try specific example: The following uri returns 4 features when pasted into my browser.               http://ogi.state.ok.us/geoserver/wfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=ogi:quad100&BBOX=-100,37,-99,38,EPSG:4326&SRSNAME=EPSG:4326      However the following lines create an empty layer (either pasted in to the console or run as a script)               sourceUri = "http://ogi.state.ok.us/geoserver/wfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=ogi:quad100&BBOX=-100,37,-99,38,EPSG:4326&SRSNAME=EPSG:4326"     vlayer = QgsVectorLayer(sourceUri, "QUADS", "WFS")     QgsMapLayerRegistry.instance().addMapLayer(vlayer)      Interesting to note that without the crsurl I need to swap the lat/lon order to correctly clip data in the browser. with or without the crsurl and which ever lat/lon order I use in QGIS I still get an empty layer. As far as I can tell my uris are correct (They certainly generate a correct result in a browser) So why Doesn't QGIS get any data? It would be a shame to have to write my own HTML/XML post/parse script in python just because I'm missing some small aspect of QGIS


Vector to Raster for Smoothing purposes

I have a vector file that represents transit scores by CT of a city. It shows harsh boundaries where one CT has great access to transit and right beside that CT is one that has extremely poor access. I want to smooth these boundaries so as to blur these hard differences. Is this appropriate? If so should I convert vector to raster, and resample to a larger grid size using bilinear method? I want to maintain the score value for future analysis. **EDIT** Would the Smoothing Edge Zones (http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Smoothing%20zone%20edges) be a more appropriate method to use?


Why were Series variables of ModelBuilder removed at ArcGIS 10.0?

I've read a number of posts regarding the sequential batch processing of a model in ArcGIS. In particular this one, because I'm having the exact same issue. Recently, I found an old 9.3 help page that shows that ArcGIS at one time supported a type of value called a series which is missing from the current 10.2 dialogue in model builder. It appears that what I need to achieve my sequential processing of multiple input parameters for my model is what was once called a "series value" in 9.3. I'm just wondering if anyone knows what happened to this and if there is some way to achieve the same thing in 10.2? It's hard to believe that Esri would take functionality out of more recent versions.


how does one reset map.fitbounds (zoomtofeature()) to the original zoom?

I have a lovely map setup using Leaflet with MapBox tiles (only). It is a United States map with polygons for each state with an onclick event to zoomToFeature. The basic zoomToFeature() function from the tutorials does exactly what I want on the way in, but is there a similarly easy way to zoom out to original zoom? I guess I could set a global variable to hold the state on the first event, and do an if inside zoomToFeature to either zoom or pull back, I just wonder if there is already some code that does this more elegantly. Specifically for it to zoom out to exactly where the map was. Not only to the original zoom level, but also the original center.


Definition query that returns based on date in arcgis

I was wondering if anyone knew how to build a definition query in Arcmap 10.0 that returns only features that are f.e. only 7 days old. I have a SDE geodatabase with polygons, each with a "date"-field (format yyy-mm-dd). I would like to select these features based on their age: > Output 1 ; Last 7 days > > Output 2 ; Last 14 days > > Output 3 ; Last 30 days > > Output 4 ; Last year > > .... Thanks in advance


How to (image) capture map and copy it to clipboard using QGIS?

Essentially, I want to copy a map to clipboard (not `Save as Image`).


How to get started with mapping the flow of gas pipe network using GIS?

I'm looking for some specifications, whitepapers and any other related material about urban gas pipe networks in particular about geometric network rules that are special to gas flow.


Find intercept WGS84 coordinates between two segments defined by (Lat1-Long1 and Lat2-Long2) and (Lat3-Long3 and Lat4-Long4)

I need to determine the WGS84 coordinates for a point that is defined by the interception of two segments represented by two sets of WGS84 coordinates each (lat1-long1, lat2-long2) and (lat3-long3, lat4-long4). Is there a free application that I might be able to use or even an excel formula?


Unregistering Addin using ESRIREGADDIN

I am struggling to find right syntax for unregistering addin using a bat file. path=%path%; "%CommonProgramFiles(x86)%"\ArcGIS\bin\ESRIRegAddIn.exe {5980f3b2-f335-47c4-bfd4-bfa181dd9c4d} /u Problem here is that some times (very few times) it seems to work. However, most of times it doesn't. You can say you can simply delete the folder. However, what if the user keeps the addin in non-standard location. However, I could install using bat file successfully. So, I appreciate your response. Alternatively, is there a way to programatically access additional folder locations user specified in add-in manager? It allows me to search for apps in those locations. Is there any best way to tell if your add-in is installed on the user machine programmatically. With classic com extensibility, you can look in registry to retrieve whether an application is installed and where it is located. However, with add-in nothing would be added to the registry. It loads all the applications when arcmap is opened. So, what is the best approach. I opine that above two options are the way to go. Please let me know if you have any better recommendations. Thanks in advance.


How to read pixel values from an image server layer with ArcObjects?

I'm having a problem with reading pixel values from the image server layer. The image server layer class implements IRasterLayer, so when I tried to read pixel values using `IRaster2` obtained through the `IRasterLayer` implementation, I could read pixel values. However, these pixel values are sometimes one pixel shifted because there are two rasters in the layer and their pixels are not lined up perfectly. `IRaster2` only accepts one row & column pair, which means that it doesn't take into account multiple raster sources in the image server layer and, if their pixels are not aligned perfectly, just one row & column counting from the upper left corner of the layer cannot read the original pixel values from the data sources. I tried to access individual rasters stored in the attribute table of the image server layer (Raster column), but it returns null. For example, the following line returns null:               ((IAttributeTable)imageServerLayer).AttributeTable.GetRow(id).Value[rasterFieldIndex]      In ArcMap, I can access each row's raster data in the attribute table. The Identify tool in ArcMap doesn't have this problem and it can read original pixel values from individual raster sources. I'm sure there should be an easy way of accessing source rasters in the image server layer. Or there should be a recommended method for reading pixel values from the image server layer.


How to create a network from nodes and boundaries?

I have a table of nodes (points) and i wish to route between the points. Its my understanding that i first need to build a pgrouting compatible topology (graph ?) that connects all the nodes using "source" and "target" fields. I was just wondering what tools i can use to generate this topology ? assign_vertex_id doesn't seem to work. I'm using postgis on a postgresql database. edit: The nodes are basically points in free space (water), so there aren't any lanes as such. The only constraints are land mass boundaries.


How to test for multiple map items in Composer using python?

I am building a QGIS plugin and I need to check for multiple maps items in Composer that works on all platforms. Currently I am getting the first map in the composition using the code below, but would rather have something which tests for multiple map items:               composerList = self.iface.activeComposers()     composerView = composerList[0]     composition = composerView.composition()     map = composition.getComposerMapById(0)


Can I display cloudmade tiles in arcmap 9 or arcmap 10?

I have created a number of cloudmade maps which I use in my opensource webstack using openlayers. I have been asked if the `cloudmade maps` could also be shown in ArcMap, but have not seen any way to be able to do this? Does anyone know if this is possible with a normal ArcGIS (arcview) licence? thanks, Robert


how to calculate RMS 2D and RMS 1D, using python?

I would like to calculate: RMS 2D: standard deviation for the two coordinates of flat (67% confidence level) and   RMS 1D: standard deviation for height (67% confidence level)   What is the formula and what parameters do I need for dual frquency survey grade receiver?   At the moment I haves something like:                 import math     spaceSegment = 0.4      controlSegment = 3.5      tropo = 0.2      iono = 0.4      multipath = 0.6      receiver_error = 0.3          hdop = float(raw_input("Enter hdop "))          vdop = float(raw_input("Enter vdop "))          ure = math.sqrt(spaceSegment**2 + controlSegment**2)      uee = math.sqrt(tropo**2 + iono**2 + multipath**2 + receiver_error**2)      uere = math.sqrt(ure**2 + uee**2)          horizontal_error = 2. * hdop * uere    #2D horizontal position error     vertical_error = 2. * vdop * uere    ##Vertical Position Error      ...but I cannot find gps error budget for survey grade receivers nor formulas for 67 and 68 percentage calculation.   Is any simple way for my computation?      Above computation is taken from matlab gps toolkit I rewrited in python but it refers to gps budget for single frequency receiver.   I also have two formulas:   ![enter image description here](http://i.stack.imgur.com/K5Avw.gif)   and   ![enter image description here](http://i.stack.imgur.com/Xzgf4.gif)    and their decription:   Compute the rms of the radial errors, i.e. the linear distances between the measure and known (or mean) positions. It can be predicted by using covariance analysis by multiplying the HDOP, a measure of the satellite geometry, by the standard deviation of the observed pseudoranges. This predictability makes it a much more convenient measure in practice.   ...so then I am completely confused and any help will be appreciated.


making a mask with arcmap 10

I have a grid layer and a shapefile representing a closed boundary. I need to make a new grid as big as my current grid but with values equal 1 inside the closed boundary shapefile and -999 for grids outside the closed boundary. Would any body help me with this using arcmap 10? Thanks a lot.


Why is there a black hole in the Heatmap?

After running the Heatmap tool in QGIS I like to color the geoTiff according to my wishes. Using Psuedo color works fine, but it leaves me with no options, as type of color scheme or transparancy on certain values, however chosing color-map instead of psuedo creates a black hole hole right in the middle, where the intensity (heat) should be strongest. Doesn't matter how I classify, 5, 10 or 20 classes... ![enter image description here](http://i.stack.imgur.com/Ii2ko.jpg)


How to make some constraint to be evaluated first in mysql?

SELECT BusinessID     FROM       tableauxiliary     WHERE       MBRContains(             GeomFromText (                 'MULTIPOINT(-6.1928749092968 106.7651250907,-6.1771250907032 106.7808749093)'                 ),                 Latlong)           AND MATCH (FullTextSearch) AGAINST ('res*' IN BOOLEAN MODE)     AND Prominent >15       I want MBRContains restriction to be executed first because it's far more restrictive. But mysql optimizer uses the FullTextSearch first. I ended up using subquery to force MBRContains to be executed first. I want easier way.


How to zoom to object on WMS layer with OpenLayers?

I have a map with WMS layer. And want to zoom to selected object. Now i use `GetCapabilities` from Geoserver and zoom to bbox of whole layer.   So how to do what i want? Or can u tell me how to get feature bbox from Capabilities? Or how to get FeatureInfo without clicking on map? **UPDATE**                                      info_id=myVecLayer.getFeaturesByAttribute("id",'5')                            alert(info_id[0].geometry.getBounds());                            app.mapPanel.map.zoomToExtent(info_id[0].geometry.getBounds());                            //myVecLayer is WFS layer      Its do something strange. If feature shows in map window it will be zoomd to it. But if not shows get a error `TypeError: info_id[0] is undefined`. What is wrong? **UPDATE 2** Ok now this is Request method                                       info_id=OpenLayers.Request.GET({                                         url:'http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=cite:filedata_temp&featureID=filedata_temp.4',                                         success: function(e){                                         alert(e.responseText);                                         }                                     });      its ok. But how to get bbox from there? **UPDATE 3** Now i use a GeoExt.FeatureStore to zoom to feature.   But i have a problem i try `zoom_store.layer.getFeaturesByAttribute("id",'5');` and all work. But if i use variable `zoom_store.layer.getFeaturesByAttribute("id",some_variable);` i get error `TypeError: info_id[0] is undefined`. Why its heppening?


How to simulate moving vehicles?

I have a point layer (stored in SQL Server 2008) that is being served up by a map service in ArcGIS Server 10.1. I am consuming this service in a web client. Lets say the points are boats out at sea.   This is mock data, but I want to simulate these boats moving around in a logical pattern. At the moment, I have an arcpy script that updates the X,Y within a bounding box, and also updates two fields for speed and direction (which the layer is symbolised by) This is all done using the random module from Python. It works fine, but does not look realistic. I have formulated some ideas about having a LUT, with X,Y, Speed, Direction, for each 'boat' that could be referenced to update by. However, this must have been done before, but I have yet to find any examples. I would prefer not to spend development time to try to re-invent the wheel, so was wondering if anyone had a similar script for achieving this that they could share as an answer for all? _//EDIT IN RESPONSE TO COMMENTS_ Reason I choose boats, as its not essential for them to be following a path such as a road. The simulation does not need to be 99% accurate on how the (insert moving something) actually moves around in the real world, but does simulate movement. Perhaps if the answer was using a pre-cooked LUT, then the paths could be defined beforehand?


Assigning unique Asset ID's

I have a layer with street lights on it and they all have unique asset ID numbers assigned to them already. Our data collectors are re-picking up all these street lights again but this time it will have all attribute information we need. So my question is: Is it possible to transfer that unique ID from the old layer to the new layer? There will be 2 point features that are pretty much the same x,y coordinates. Could it be possible to spatially relate them or something? Im not a GIS expert, just do a little data management and cartography stuff. Any help would be great, because at this point all I can think of is manually copying and pasting the ID numbers into the new attribute table. That could take me long long time. There's got to be an easier way. Thanks for looking!


extract lat/long from screen when using British National Grid projection

Using ArcGIS 10, is it possible to click anywhere on the map (projected to British National Grid), but return the coordinates in WGS84 lat long? Alternatively, when will Streetview work with OS Eastings and Northings?


How to programatically add KML Icons to Placemark generated from SimpleFeatures using GeoTools?

I have successfully generated a set of (unstyled) placemarks in a KML file using the GeoTools framework, and the Encoder class. The file renders fine in Google Earth with standard balloon placemarks. I now want to add some iconstyles to my file. Can anyone give me some guidance here? What is the best way to programatically declare the icons/iconstyles and give each placemark a reference to the corresponding icons? I know the KML syntax for this, but how do I declare/generate this with GeoTools, and make the Encoder class do the final job?


Multiply vector categories

I have imported a Vector map into GRASS GIS. There are some problems with the topology and some polygon areas overlap. I used v.clean to break overlapping polygons and now I have multiple polygons mapped to the same category in the attribute table. Is there any way to convert this feature to category mapping so that each feature maps to a separate category? I don`t care I have duplicate information in the attribute table. All I want is that starting from the original vector map, that has 1000 features and 1000 corresponding records in the attribute table, after running v.clean and obtaining 1500 features to have 1500 records in the attribute table. Can this be done? Thank you.


What does it mean to QI and how is it done?

I'm new to Esri's Arc* interfaces, and trying to figure out how to register an existing table using the ArcObjects API. The following question answers this to some extent: Is there any way to write a snipet of code with function of "SDELayer -o register" command > Maybe the IClassSchemaEdit.RegisterAsObjectClass method will help (see the > GeoDatabase OMD). You should be able to QI it from an ITable, opened in the > usual fashion (e.g. IFeatureWorkspace.OpenTable(in Name: String) since > you've already built your GDB). But there is some terminology used that I don't understand. Specifically, what does it mean to QI something, and how is it done? This other question's answer defines QI, somewhat vaguely, as Query Interface (hopping) but goes no further. How do you navigate the ArcObjects OMDS? > It really helps if you know UML. In the class that I had in college the > professor called it QI (Query Interface) hopping. The Getting To Know > ArcObjects book has a nice break down of how to work with the diagrams. I'm using Java - is this a .net thing?


Looking for options to use Mapfish with PHP

I recently installed MapFish on my test server and started to play around with. As I'm not that good in python/pylon I'd prefer to work with that framework with PHP. I read that it is possible with sfMapfish which is a connector to the symphony-framework for PHP. Symphony is quite a strong framework, so I'm open to use it. My questions are:   1. Has anyone used sfMapFish already and can show me a good tutorial to see how to start?   2. Is there another PHP Framework for MapFish (as sfMapfish hasn't been updated for over a year)? Thank you! Martin


Need Projection Help to Buffer Lines in QGIS

I am somewhat new to GIS in general, and very new to QGIS specifically (I took one class and we used Arc, which I don't have access to any more). I need to create buffers (1km, 3km, and 5km) around the rivers of this shapefile from NOAA, something I remember being relatively simple in my GIS class. However no matter what I do the buffers I create cover the entire United States. I've tried a number of different CRSs (for the layer I did Right- Click>Save as and set the CRS I wanted to try, I also set the project CRS not just the layer), but the buffer always covers most, if not all, of the continent. Additionally if I use the distance tool to measure this shapefile from coast to coast, it comes out in meters. I could be wrong, but I'm fairly sure that the country is larger then a couple dozen meters across. I know I must be doing something simple and stupid wrong. So if I could get some help, that'd be great. Thanks so much, -Matthew


How can I change the display name of the "Scale" control?

Here is the thing. I added the Scale control to my web and is displayed in a div at the bottom. I need to translate the "Scale" text to other language but I can't find how to do it. I searched in the openlayers website for examples or code to do it without results. None of the properties of Scale control tell me how to do this (in openlayers website). So I ask to you, people, if you know some method to customize this feature. Here is the code I use in my script:               map.addControl(new OpenLayers.Control.Scale($('scale')));      and this is the div where I displayed:

      I tried with writing the label in the div but the scale control overwrite the label. Hope you can help me with this.