Database connection failed

I am trying to connect from Arc Cataloge (version 10.1) to postgresql 9.2. But every time I try to make "Database Connection" I am getting this error:               Failed to connect to the specified server.     Underlying DBMS error[could not connect to server: Connection timed out        Is the server running on host"x.y.z.w" and accepting TCP/IP connections on port 5432?      Postgresql is installed on Centos server (PORT 5432) and I can access it using pgadmin. Using `psql --h X.Y.Z.W -U user -d database` on another server I am getting the same error. here is the content of pg_hba.conf:                local   all             all                                md5      # IPv4 local connections:      host    all             all            X.Y.Z.W/32          md5      host    all             all             0.0.0.0/0          md5      host    all             all             127.0.0.1/32       md5      # IPv6 local connections:      host    all             all             ::1/128            md5      Also in postgresql.conf:               Listen_addresses = '*'     port=5432      in etc/sysconfig/iptables:                *filter       4 :INPUT ACCEPT [0:0]       5 :FORWARD ACCEPT [0:0]       6 :OUTPUT ACCEPT [0:0]       7 :RH-Firewall-1-INPUT - [0:0]       8 -A INPUT -j RH-Firewall-1-INPUT       9 -A FORWARD -j RH-Firewall-1-INPUT      10 -A RH-Firewall-1-INPUT -i lo -j ACCEPT      11 -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT      12 -A RH-Firewall-1-INPUT -p 50 -j ACCEPT      13 -A RH-Firewall-1-INPUT -p 51 -j ACCEPT      14 -A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT      15 -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT      16 -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT      17 -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT      18 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT      19 -A INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT      20 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT      21 -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited      22 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT      23 COMMIT      I also put "postgresql-client-libraries" in /bin directory of ArcGIS for Desktop. I appreciate any help.


Display Leaflet Markers with UTM coordinates?

is it possible to display markers with UTM coordinates (zone 32) with leaflet and OSM? How can I do this? If I use UTM Coordinates like latlng, the position is totally wrong:                       L.marker([5698015.694, 312400.093]).addTo(map)             .bindPopup("Hello world!
I am a popup.").openPopup();      Did I have to translate them first, or is it possible to display UTM coordinates directly with leaflet?


Merging more than two shapefiles in QGIS

I want to merge 9 shapefiles (all polygons) into one file. The problem is, when I try to merge more than two files at once, I seem to loose attributes on the way? Is there any other way of merging shapefiles than using the 'Merge shapefiles to one'-tool? In this case it's only nine files, so it's possible to merge whem 2 and 2, but I want to do the same thing with other files as well, and then merge about 20 files to one. I'm using QGIS 2.0.1. Thanks! EDIT: I have data of 4 different kinds of natural reserves (polygons). Each reserve has data seperated into three different shapefiles, where each shapefile is cooected to a powerline. The three powerlines are parallell at first and then turn in different directions. Each kind of natural reserve contains slightly different information, but they all contain the columns 'Powerline' (powerline identity) and 'Type' (type of natural reserve). I want my output to contains all of the polygons and all attribute data. What happened was that information like 'Powerline' was lost when I tried to merge all files at once.


How to convert a bil image into grid in ArcGIS?

GIS beginner here. I've downloaded **RFE data from FEWSNET**. It's a compressed file which includes .bil files. Now i want to convert this ".bil image" into a grid to use the precipitation data in an area. I'm using ArcGIS. How do i do it?


Maximum scale dependent visibility changes from 1:0 to -2147483648:1

QGIS 2.0.1 Dufour. When i open the layer properties and the scale dependent visibility is unchecked and when i check it, the maximum (inclusive) shows 1:0. I click Apply, OK, reopen layer properties and it says -2147483648:1. Everytime i change it to 1:0, apply and reopen the layer properties, the maximum (inclusive) gives me the value -2147483648:1. Any ideas why?


Multiprocessing issues with ArcPy

I am using ArcGIS 'watershed' routine in a script which makes use of multiprocessing. This works fine, but during execution I get the message:               Unable to remove directory.  Possible causes:     1- Not owner of the directory     2- Another person or application is accessing this directory      EDIT 27/02/14: I've incorporated the suggestions of using `arcpy.Exists` (with a very rudimentary way of checking if something didnt exist) and writing all results to disk:               import arcpy     from arcpy import sa     arcpy.CheckOutExtension("Spatial")          def watershed(pnts, flowdir, flowacc):         direc = tempfile.mkdtemp(dir = "C:\\temp")   #Create a separate directory for files to be written to.         arcpy.env.scratchWorkspace = direc         arcpy.env.workspace = direc              res = []         for i, p in enumerate(pnts)             pnt = arcpy.PointGeometry(arcpy.Point(p.x, p.y, ID = i)) # Convert the Shapely point to arcpy point             pourpt = sa.SnapPourPoint(pnt, flowacc, 10000) #Snap point to high flow acc cell             if arcpy.Exists(pourpt):                 ws = sa.Watershed(flowdir, pourpt) # Calculate watershed                 if arcpy.Exists(ws):                    out = os.path.join(direc, "poly_%i"%i)                    poly = arcpy.RasterToPolygon_conversion(ws, out) #Convert to polygon                    res.append(poly[0]) # Put the polygon in the results list for this set of points                 else polylist = "NoWS"             else polylist = "NoPourPt"              return res      The parallel function remains the same:               def watershed_pll(mod, proc=6):         """         Calculate the watershed for each station point using parallel processing          All relevant data is held in the mod object         """         pool = Pool(processes = proc)              # Iterate over each feature of the drainage path and submit the list of pour points to the worker function         jobs = []         for key, val in mod.stations.geometry.iteritems():             jobs.append((key, pool.apply_async(watershed, (val.points, key, mod.flowdir,                                                mod.flowacc, rdict))))              pool.close()         pool.join()         return jobs      Sometimes it runs perfectly, other times I get one of various errors such as the initial one above, or also:               FATAL ERROR (INFADI)     MISSING DIRECTORY      and:               ERROR 010088: Invalid input geodataset (Layer, Tin, etc.).]      and:                ERROR 010050: Cell size is not set.      Which is odd as I explicitly set the cell size within the function... When it works and when it doesnt seems to be hit and miss/random. Such errors lead me to believe that arcpy is still trying to delete stuff behind the scenes. Is there any way to explicitly prevent it from doing so? * * * I wonder if my problem could be related to one of two things:   1. Environments/folders getting mixed up. The input data is passed as complete filepaths to some raster datasets which are outside of the scratchWorkspace (which is set locally for each process) where intermediate/output data is created. However, I have noticed that Arc may make folders (typically and 'info' folder) in the directories of the input data. Why is that? Can it be prevented, or can I prevent Arc from then trying to delete it?   2. Are there any potential problems with accessing the input raster data sets at the same time? I.e each process will be attempting to open and read from the flow direction and flow accumulation rasters which are passed into the function.


"show only visible features" doesn't seem to work

I'm trying (unsuccesfully) to place the attribute table next to a map containing the same in print composer. Let's say for example my map in the primary window contains 6 districts and my map in the print composer only shows 1 district. If I unselect the "show only visible features" box then my table shows all entries (e.g. from 6 districts). However when I select the "show only visible features" it shows **only** the title row of the attribute table: **it does not show any of the data entries**. What am I doing wrong?


PostGIS: incorrect interpretation of a polygon that intersects the 180th meridian

I try to find out all geopoints which intersect the polygon set as a parameter. The problem is when I pass polygon that roughly covers an area of Bering Strait (nearby 180 longitude): ![enter image description here](http://i.stack.imgur.com/hdpk3.jpg) So I use the query:               SELECT ST_AsText(l.geo_point)     FROM "lightnings" "l"     WHERE (ST_Intersects(ST_GeomFromText('Polygon((132.0 40.0, -148.0 40.0, -148.0 -8.0, 132.0 -8.0, 132.0 40.0) )', 4326), geo_point));      As you can see, vertexes are set in a correct order, clockwise, from the North-West. But the result covers outside area and including whole other world. For example, in result:               POINT(75.5637 40.0434)      The problem doesn't touch the 0th meridian. Elementary test:               SELECT ST_Area(ST_GeomFromText('Polygon((0.0 60.0, 10.0 60.0, 10.0 40.0, 0.0 40.0, 0.0 60.0) )', 4326))     UNION ALL     SELECT ST_Area(ST_GeomFromText('Polygon((-5.0 60.0, 5.0 60.0, 5.0 40.0, -5.0 40.0, -5.0 60.0) )', 4326))     UNION ALL     SELECT ST_Area(ST_GeomFromText('Polygon((175.0 60.0, -175.0 60.0, -175.0 40.0, 175.0 40.0, 175.0 60.0) )', 4326))      gives the result:               200     200     7000      Is there any simple trick to force PostGIS understanding me? I don't like an idea to divide the polygon...


ArcGIS Python Error Raster Domain

I´m always getting an Error with my Python-Code. Even though it is almost the same as on the ArcGIS Help Website. The Error occurs in line 19: > Traceback (most recent call last): > > File "C:_geodata\check.py", line 19, in > > arcpy.RasterDomain_3d(rasterList,out_file,geometry) > > File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\ddd.py", line > 998, in RasterDomain > > raise e RuntimeError: Object: Error in executing tool > > Failed to execute (IterateRasterDomain). My Code looks like this:               import arcpy     from arcpy import env          arcpy.CheckOutExtension("3D")          env.workspace = arcpy.GetParameterAsText(0)     rasterList = arcpy.ListRasters()          if rasterList:         for raster in rasterList:             geometry = "POLYGON"             out_file = "domain_" + raster[:-4] + ".shp"             arcpy.RasterDomain_3d(rasterList,out_file,geometry)         print "Finished"     else:         print "No Data available"


Correcting gaps and overlapping polygon (parcels) geometry

I have come across a resource that we rely upon almost daily that is in terrible need of repair. It is not our own product and the supplier is generally not interested in fixing the problem. We are using a polygon shapefile which contains upwards of 2000 parcel boundaries. The parcels themselves are not parcels in the general sense of the term, but nevertheless, it describes the data quite effectively. No 'parcel' shall overlap or produce gaps between parcels. However, the data quality is terribly low and it almost seems like the parcels have been drawn by hand with snapping disabled! See picture below: ![enter image description here](http://i.stack.imgur.com/YvPQv.png) In some cases, it is much worse than in the photo, or the gaps/overlapping is so small that they are unidentifiable until after running spatial procedures (such as intersections). How would one go about fixing these kinds of issues? I have attached the shapefile which represents the 8 polygons in the photo. These 8 polygons show both my gap and overlapping issue. Can the process be automated to fix my 2000+ parcels? http://temp-share.com/show/dPf3mpihW Note: I have explored the "fix geometry" tool in ArcMap, but this only corrects the overlapping polygons. Albeit the overlapping geometry is the worse of the two problems, I'd like to fix both if possible!


How to label only some places instead of all?

How do I turn of some place names, or rather turn on some places names but not the rest.   How do I turn of or hide that?   [s] *  ~~I also get a red cross under the place names which I dont like to see. How do I turn of or hide that?~~ [/s]   The place names is in a line layer (using labeling), and there are also many numbers I dont need to see.   Some of them are Height above mean sea level (AMSL), but not all.   QGIS Lisboa versjon 1.8.0 ![enter image description here](http://i.stack.imgur.com/LTgXC.jpg)


Trying to use a QGIS plugin - getting classFactory error

I've had to create a GIS for the company I work for, choosing QGIS over ArcGIS due to price (company doesn't want to buy another copy of ArcMap). In any case, it's not a HUGE GIS but it would be good to be able to search for features quickly and easily - just by typing in. It seems QGIS doesn't support this as easily as the users want to use it, so I've tried downloading the Quickfinder plugin. In any case, after eventually finding out how to install it (as it will be offline when in use, so had to download the zip and extract to the correct place), QGIS has found it but can't install it, saying it's broken and can't call it's classFactory() method. The full code (with my project name removed due to confidentiality issues) is below:               Couldn't load plugin quickfinder due an error when calling its classFactory() method          Traceback (most recent call last):     File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python\qgis\utils.py", line 204, in startPlugin     plugins[packageName] = package.classFactory(iface)     AttributeError: 'module' object has no attribute 'classFactory'          Python version:     2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]               QGIS version:     2.0.1-Dufour Dufour, ebebdf3          Python path: ['C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\\processing',     'C:/PROGRA~1/QGISDU~1/apps/qgis/./python',     'C:\\Documents and Settings\\my.name/.qgis2/python',     'C:\\Documents and Settings\\my.name/.qgis2/python/plugins',     'C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins',     'C:\\PROGRA~1\\QGISDU~1\\bin\\python27.zip',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\DLLs',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\plat-win',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\lib-tk',     'C:\\PROGRA~1\\QGISDU~1\\bin',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\PIL',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\win32',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\win32\\lib',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\Pythonwin',     'C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode',     'C:\\PROGRA~1\\QGISDU~1\\apps\\qgis\\python\\plugins\\fTools\\tools',     'C:/map stuff/MyProject']      Does anybody have any ideas?


ArcGIS 9.3 Export network dataset from geodatabase

I've got a set of feature classes with network dataset in a geodatabase *.gdb format and would like to export out to *.nds format, may I know how to do that on ArcGIS/ArcCatalog ?


Trace vector map from GeoTiff, Garmin

My goal is to create a vector map for my Garmin GPS by tracing over a topo raster. The vector data would be exported in ESRI SHP format and later converted for Garmin. So far, I can load the geo tiff layer, however am stumped on creating a vector layer. For instance, where do all the shapes come from to trace on the map? Does anyone have advice on this process? Any pointers are appreciated. Thanks, Nick


How to add title to mapbox <iframe> embed

I am embedding a map I made in Tilemill/Mapbox onto a Wix website. Items of the map such as legend, title, and description are not automatically included in the embed. I learned how to add the legend by simply adding ,legend, in the code below. However, I do not know how to add the title and description of the map as you see it here: https://a.tiles.mapbox.com/v3/yolivens.hgck7b4h/page.html?secure=1#4/40.85/-94.48 Here is my current code: ![enter image description here](http://i.stack.imgur.com/1jxu1.png) What would I need to do to add the title and description? I am above all concerned about the title.


Setting the output parameter in a toolbox to be a PDF

I need to allow a user to input a path and name where they would like to save their new map book PDF on their computer/drive. I have created a script where the user can input their mxd with data driven pages, input their title map, append the two PDF documents and save the appended PDF, but it's all hard coded and I'd like to create a script where they can select where to save their new appended PDF when they open it in the toolbox. That might be confusing, sorry. I need the script to be dynamic. I'm stumbling on setting up the parameters. I'm unsure what the Output PDF data type should be set as in the toolbox. None of the selections seem to fit. Aside from "Output" in the "Parameter Properties" should I change anything else? Thanks!


Table record counts change when using python tool

I have a python tool which investigates mxd files and clips/projects and exports all visible datasets. Recently I've found that the record counts (even on non-clipped data) is different. It's ok if I right-click save data. Not sure why this is. ![enter image description here](http://i.stack.imgur.com/ZFZ2y.gif) OutFile should be 716k records and not just 101k records as reported here. I am running a difference process in QGIS to see where the issue is in the file but I don't want to have to do this if the export works correctly.               ### Copies, clips and creates symbology of all visibile layers in mxd's in the current directory. Also creates a text file with metadata for use.     # Author: George Corea, Atherton Tablelands GIS     # georgec@atgis.com.au; info@atgis.com.au          # Licence:Creative Commons          import arcpy, string, datetime, shutil, os, glob     import arcpy.mapping as MAP     from arcpy import env          arcpy.env.workspace = os.getcwd()     arcpy.env.overwriteOutput = True          MXDList=string.split(arcpy.GetParameterAsText(0), ";")     ProjectPath=arcpy.GetParameterAsText(1)     CreateData=arcpy.GetParameterAsText(2)     clip_features=arcpy.GetParameterAsText(3) # polygon to clip data to AOI     AOI=arcpy.GetParameterAsText(4) #appended as suffix to dataset     arcpy.env.outputCoordinateSystem=arcpy.GetParameterAsText(5) #to maintain all datasets in the same projection     createdir=arcpy.GetParameterAsText(6)          rootPath=ProjectPath          #MXDList=glob.glob('*.mxd')     #ProjectPath=r'P:\2012\183_TownPlanning_Symbology\Working' # root output directory     #clip_features=r'L:\Vector_Data\Administrative\Boundaries\Local_Govt\TRC\trc_boundary_Polygon.shp' # polygon to clip data to AOI     #AOI='_trc' #appended as suffix to dataset     #arcpy.env.outputCoordinateSystem=r'L:\Vector_Data\Administrative\Boundaries\Local_Govt\TRC\trc_boundary_Polygon.prj' #to maintain all datasets in the same projection          xy_tolerance=1 #clip tolerance          # No edits should be required below this line.          VisibleLyrList = []     count=1               def layer_details(outPath, outFileN, lyrFile, type): #Generates the metadata              descLayer = arcpy.Describe(lyrFile.dataSource)         ReviewLog=outPath+'\\'+type+'_'+outFileN+'_log.txt'         f = open(ReviewLog, 'a')         try:             f.write(str(lyrFile.name)+': name{'+str(lyrFile.datasetName)+\         '}; query{'+str(lyrFile.definitionQuery)+\         '}; source{'+str(lyrFile.dataSource)+\         '}; description{'+str(lyrFile.description)+\         '}; symbology{'+ str(lyrFile.symbologyType)+\         '}; original projection{'+str(descLayer.spatialReference.name)+\         '}; extent(x,y){'+str(descLayer.extent.XMax)+','+str(descLayer.extent.XMin)+','+str(descLayer.extent.YMax)+','+str(descLayer.extent.YMin)+\         '}; format{'+str(descLayer.shapeType)+\         '}; size(bytes) ~{'+str(os.path.getsize(lyrFile.dataSource))+\         '} @{'+str(datetime.datetime.now())+'}'\         )             f.close()         except:             pass          print 'starting...'+str(MXDList)          for MXDFile in MXDList:              mxd=arcpy.mapping.MapDocument(MXDFile)         if createdir=="false":             outPath = ProjectPath         else:             outPath = ProjectPath+'\\'+mxd.filePath[mxd.filePath.rfind('\\')+1:mxd.filePath.rfind('.')]              arcpy.AddMessage ('Working on file #' + str(count) +' ...'+str(mxd.filePath))         try:             os.mkdir(outPath)         except:             pass         dfList = arcpy.mapping.ListDataFrames(mxd)         #print arcpy.GetMessages()         #print 'working on 2...'+str(dfList)+str(outPath)              for df in dfList:         #msd = outPath+'.msd'         #arcpy.mapping.ConvertToMSD(mxd, msd, df, "NORMAL", "NORMAL")         #print (str(count)+'...' +str(outPath)+'...'+'\n')             arcpy.AddMessage ('Working on dataframe ... ' +str(df.name))             lyrList=arcpy.mapping.ListLayers(mxd, "", df)             outPath = ProjectPath+'\\'+mxd.filePath[mxd.filePath.rfind('\\')+1:mxd.filePath.rfind('.')]+'\\'+str(df.name)             try:                 os.mkdir(outPath)             except:                 pass             print ('working on 3...in: '+str(outPath))             for lyrFile in lyrList:                 #print (str(lyrFile))                 if lyrFile.isFeatureLayer == True:                     if lyrFile.visible == True:                         if lyrFile.name not in VisibleLyrList:                             VisibleLyrList.append(lyrFile.name)                             arcpy.AddMessage (str(lyrFile)+' is visible PROCESSING...')                             outFileN=str(arcpy.ValidateTableName(lyrFile.longName[lyrFile.longName.rfind('\\')+1:]))                             try:                                 rows = arcpy.SearchCursor(lyrFile.dataSource)                                 row = rows.next()                                 if row:                                     if CreateData=="true":                                         arcpy.FeatureClassToFeatureClass_conversion(lyrFile.dataSource, outPath, outFileN)                                         #arcpy.Copy_management(lyrFile.dataSource, outPath+'//'+outFileN, "")                                         arcpy.Clip_analysis(outPath+'\\'+outFileN+'.shp', clip_features, outPath+'\\'+outFileN+AOI+'.shp', xy_tolerance)                                         #updateLayer = outPath+'\\'+outFileN+'.lyr'                                         sourceLayer = arcpy.mapping.Layer(outPath+'\\'+outFileN+'.shp')                                         sourceLayer_AOI = arcpy.mapping.Layer(outPath+'\\'+outFileN+AOI+'.shp')                                         #arcpy.mapping.UpdateLayer(df, updateLayer, sourceLayer, True)                                         arcpy.SaveToLayerFile_management(lyrFile,outPath+'\\'+outFileN+'_sym.lyr', "ABSOLUTE")                                         arcpy.SaveToLayerFile_management(sourceLayer_AOI,outPath+'\\'+outFileN+AOI+'.lyr', "ABSOLUTE")                                         arcpy.ApplySymbologyFromLayer_management (outPath+'\\'+outFileN+AOI+'.lyr', outPath+'\\'+outFileN+'_sym.lyr')                                         descLayer = arcpy.Describe(sourceLayer)                                         #QA Row Count                                         QA_rowCount_InFile = arcpy.GetCount_management(lyrFile)                                         outLyrFile=arcpy.mapping.Layer(outPath+'\\'+outFileN+AOI+'.shp')                                         QA_rowCount_OutFile = arcpy.GetCount_management(outLyrFile)                                         if int(str(QA_rowCount_InFile))==int(str(QA_rowCount_OutFile)):                                             arcpy.AddMessage("Count same - QA should not be Required..."+str(QA_rowCount_InFile)+" Out="+str(QA_rowCount_OutFile))                                         else:                                             arcpy.AddMessage("Count NOT same - QA IS Required...In="+str(QA_rowCount_InFile)+" Out="+str(QA_rowCount_OutFile))                                             layer_details(outPath, outFileN,lyrFile,"Row Count ISSUE --- Count NOT same - QA IS Required...In="+str(QA_rowCount_InFile)+" Out="+str(QA_rowCount_OutFile))                                             IssueLog=rootPath+'\\'+'Issue_log.txt'                                             f = open(IssueLog, 'a')                                             f.write(str(lyrFile.name)+': name{'+str(lyrFile.datasetName)+ '}; source{'+str(lyrFile.dataSource)+'}'+'\n')                                             f.close()                                         #QA Row Count process                                         layer_details(outPath, outFileN, lyrFile,"COMPLETED")                                         arcpy.Delete_management(outPath+'\\'+outFileN+'_sym.lyr')                                         arcpy.Delete_management(outPath+'\\'+outFileN+'.shp')                                     else:                                         layer_details(outPath, outFileN, lyrFile,"SIMULATED")                                     #arcpy.LayerToKML_conversion(outPath+'\\'+outFileN+'.lyr', outPath+'\\'+outFileN+'.kmz')                                 else:                                     arcpy.AddMessage ("!!!Datasource Issue!!!...continuing")                                     layer_details(outPath, outFileN,lyrFile,"ISSUE")                                     IssueLog=rootPath+'\\'+'Issue_log.txt'                                     f = open(IssueLog, 'a')                                     f.write(str(lyrFile.name)+': name{'+str(lyrFile.datasetName)+ '}; source{'+str(lyrFile.dataSource)+'}'+'\n')                                     f.close()                             except:                                 errorm=arcpy.GetMessages()                                 arcpy.AddMessage ('!!! ERROR !!!...'+str(errorm)+' ...continuing')                                 try:                                     layer_details(outPath, outFileN, lyrFile,"ERROR")                                 except:                                     pass                                 #break                                 ErrorLog=rootPath+'\\'+'Error_log.txt'                                 f = open(ErrorLog, 'a')                                 f.write(str(lyrFile.name)+': name{'+str(lyrFile.datasetName)+ '}; source{'+str(lyrFile.dataSource)+'}'+'\n')                                 f.close()                                       else:                                 pass                         else:                             arcpy.AddMessage (str(lyrFile)+' Is NOT Visible. Not Processing')                     else:                         arcpy.AddMessage (str(lyrFile)+' Is NOT Feature Layer. Not Processing')             count=count+1                 #print str(lyrFile)+' is not visible'              #Remove variable reference to file         del mxd, outPath, lyrFile      See code from rows = arcpy.SearchCursor(lyrFile.dataSource) onwards


i am using arcgis 10.1 i want to calculate the shortest distance between a raster and another raster. i have a bathymetric raster and an underlying fault plane raster. for each bathy raster cell, i need to know the shortest distance to the underlying fault plane. the bathymetry and the fault plane rasters are not planar nor horizontally level. i am not trained in python and hope there is an existing tool that i could use (though i could learn python if i need to).


How does the geoprocessing results window store the tasks?

Yesterday I was working in a single mxd all day, performing dozens of calculations and other analysis using multiple tools. A lot of it was trial and error, so when I found the correct combination I would label it as such in the `Results` window before documenting it in OneNote. ![Geoprocessing results](http://i.stack.imgur.com/gNELX.png) I opened and closed that mxd multiple times, and was able to rerun those tools I had labelled, as expected. When I opened that mxd this morning at work, I found that the tools I had renamed had been reset to their default names - as a result, I've had to trawl through each result until I found the ones I wanted. What I would like to know is, seeing as the processed tasks persist between sessions as it stored inside the mxd, so even if I open it on a different computer the results are still there, why does it "forget" that I renamed some of them?


EPSG 3857 or 4326 for GoogleMaps, OpenStreetMap and Leaflet

The discussion at What is the difference between WGS84 and EPSG4326? shows that _4326 is just the EPSG identifier of WGS84._. Wikipedia entries for Google Maps and OpenStreetMap shows that they both use WGS 84. http://wiki.openstreetmap.org/wiki/EPSG:3857 states that _EPSG:3857 is a Spherical Mercator projection coordinate system popularized by web services such as Google and later OpenStreetMap._ Leaflet's help states: _EPSG3857 The most common CRS for online maps, used by almost all free and commercial tile providers. Uses Spherical Mercator projection. Set in by default in Map's crs option.|_ _EPSG4326 A common CRS among GIS enthusiasts. Uses simple Equirectangular projection._ This is confusing - it seems that Google Maps and OpenStreetMap use EPSG3857 but they use WGS84 which 'is' EPSG4326. Something can't be right here, most likely my understanding. Could someone help me understand?


Convert ESRI Shapefile to Raster using R - biggest polygon area to raster cell value?

I want to create a raster from an ESRI shapefile. Multiple polygons may exist in one raster cell. If so, I want to assign the attribute variable which occupies the biggest area of the raster cell. If, for example, _Polygon1_ occupies 10%, _Polygon14_ 25% and _Polygon5_ 65% of the raster cell, the cell should contain the attribute variable of _Polygon5_. ![rasterize by polygon with maximum area](http://i.stack.imgur.com/0ILu4.png) Using the R-pacakge rasterize{raster}, values are transferred if the polygon covers the center of a raster cell. Of course, functions like min, max, mean, or character values like 'first', 'last', 'sum', 'count' are available. Default is 'last'. You can download the sample shapefile here. Up to now my code is this:               setwd("your_wd")          require(sp)     require(raster)     require(rgdal)          sp_df <- readOGR(getwd(), "stok_subs") # reads the shapefile into a large polygon                                            # data frame          extent(sp_df) # shows the extent of sp_df          summary(sp_df) # simple summary          # Object of class SpatialPolygonsDataFrame     # Coordinates:     #        min      max     # x 32539350 32544695     # y  5732607  5735439     # Is projected: TRUE      # proj4string :     # [+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=32500000 +y_0=0 +ellps=GRS80+units=m+no_defs]     # Data attributes:     # X_CENTR           Y_CENTR            ATTRIBUTE      # Min.   :3539714   Min.   :5734725   9.4-.2.3 :21       # 1st Qu.:3540436   1st Qu.:5735323   23.4-.2.3:19     # Median :3541226   Median :5735830   9.4.2.3  :19       # Mean   :3541263   Mean   :5735824   23.4.3.5 :18       # 3rd Qu.:3542031   3rd Qu.:5736358   23.4.2.3 :16       # Max.   :3543461   Max.   :5737024   19.4.3.5 :12       #                                     (Other)  :89            r <- raster(extent(sp_df)) # creates a raster with the extent of sp_df     projection(r) <- proj4string(sp_df) # uses the projection of the shapefile                                         # for the raster         res(r)=10.0 # sets the resolution of the raster to 10 m          r10 <- rasterize(sp_df, field="ATTRIBUTE", r) # converts sp_df to a raster                                                   # assigning the last attribute                                                   # variable in a cell (default)          writeRaster(r10, filename="stok_subs.tif", format="GTiff") # writes the raster                                                                # to a file          plot(r10) # plots raster      ![r10](http://i.stack.imgur.com/FIWv1.png) None of the provided functions seem to cover my needs. However, I'd rather operate with R, as operations with very large raster data (e.g. whole Lower Saxony @ a resolution of 10 m) may be easier to handle than with GIS solutions. Anyone out there who has a (or any) solution for my problem?


Installed PostGIS extension not listed for database

I have a PostgreSQL database with the PostGIS extension enabled. I know that this extension is enabled, since I am using PostGIS functions, and I can actually see the PostGIS functions. However, PostGIS is not listed in the installed extensions section, and thus I can't alter it nor uninstall it. If I try               CREATE EXTENSION postgis;      it tells me that PostGIS is already installed, and that I should uninstall it first. However               DROP EXTENSION postgis CASCADE;      tells me that no PostGIS extension is installed. What can I do? Any ideas? Thanks in advance.


Using qgis.core on redhat/linux

I just need the path to the api so I can import qgis.core, etc. I was able to import on my mac, run a standalone code, and test; however, my team requires it to be put on jenkins. qgis was installed via redhat on the linux-skybox. I found where qgis using "where qgis" and got "/usr/bin/qgis" to find qgis.core inside I tried the following: I believe they've installed version 1.8 of qgis cd the following /user/bin/qgis /user/bin/qgis/share /user/bin/qgis/share/qgis /user/bin/qgis/Contents /user/bin/qgis.app /user/bin/qgis.app/Contents And I got "no such directory exists" edit 1: I can import qgis.core on the main computer of linux-skybox, but I can't on another edit 2: I needed to use virtualenv jenkinsEnv --system-site-package instead of virtualenv jenkinsEnv --system-site-package


Converting LatLng coordinates to point shapefile

I have more than 50,000 LatLng coordinates defined under SWREFF99 1800 projection. I want to know, is it possible to convert these coordinates into a point shapefile ? if yes, then how can I do this ?


Why would programmatically setting the extent of a map on Page_PreRender be really slow?

We are using the ArcGIS 10 web adf with C# in a web application. We just recently upgraded everything from 9.3 to 10 and moved all the hosted stuff over to a new (more powerful) server. Still on the same network. During the Page_PreRender event, we get the full extent envelope of our map, which is fast, and then set our map's extent to it. Code in question...               Envelope fullExtent = AgsHelper.GetExtent(Map1, ExtentType.Map);     Map1.Extent = fullExtent;      The second line there takes a really long time (like 30-40 seconds). I can't claim to be an ArcGIS expert. I'm wondering if anyone has ideas of what I could look at or what it might be. I decompiled the code that does the setting of the extent and took a look at the code, but I can't really tell much without being able to debug into it and I can't do that since I don't have a reflector license and my trial is up. Pretty sure this is some sort of SDE or ArcGIS Server issue, I just don't know what it would be. Thanks!


Complete lookup table for German admin codes in Geonames data? (admin4_code)

I am working with both the postal and Geonames data for Germany. I noticed that while the Postal data may be used as a lookup for ADMIN_CODES 1-3 (ADM1,ADM2,ADM3), it does not mention ADM4 at all. Does anyone know where to find the lookup table for 'admin4_code' values? According to http://forum.geonames.org/gforum/posts/list/538.page, this admin code references a 'Gemeinde', an admin field I would like to include in my work, if possible. * * * The German dataset I'm working with: http://download.geonames.org/export/dump/DE.zip The German dataset I'm using as a lookup table for ADMIN CODES: http://download.geonames.org/export/zip/DE.zip Both zipped folders contain a 'readme.txt' file that outlines the fieldnames in the data. I am also tracking this question on the Geonames forum: http://forum.geonames.org/gforum/posts/list/2623.page


My woes rendering shape files on web-based mapping application

First, I'd like to let it be known that this is my first journey into developing mapping applications with such a large set of data. So, I am in way locked into the techniques or technologies listed below... The Overview What I am trying to accomplish is the ability to load my company's market information for the United States onto some form of web-based mapping software. Currently I am trying to accomplish this with Google Maps JS api and GeoJSON data, but am not against other alternatives. There are roughly 163 files (ranging from 6MB to 200KB) that I have exported from ArcGIS into GeoJSON files, and then loaded into a database (currently as GeoJSON strings). We have developed a UI that loads the data based on the current map bounds and Max/Min calculations in the corresponding records. The problem I'm running into is the render time on the map itself, which is annoying when switching between different regions, states, or zoom levels. The API calls to load the data are acceptable in regards to the size of the data being retrieved. My boss said it is great for a proof of concept, but would like to see it much, much faster. The Questions What suggestions could you offer to increase the render time? Are there better options (3rd party libs, techniques, etc) for what I'm trying to accomplish? It was suggested by a co-worker to export the map shapes and just use the images for overlaying the information based on the coords. Any input on this? **Edit #1** The shapes consist of polygons and multi-polygons. They essentially trace around all of our markets with distinctive opaque fill and border. The interactive ability would be nice, to be able to click on a given area and retrieve property, tract, and other data points, but is not essential to it's success. I could overlay the data if necessary.


Geoserver Datastore Property Update via REST API

I am trying to change the properties of an existing Geoserver data store via the REST API. I have created the data store from an existing folder of shapefiles. However, I need to change the "charset" and "Create spatial index if missing/outdated" properties but I cannot for the life of me figure out how to do it. I have tried sending the following XML as a PUT request to the data store but it doesn't work:               <DataStore>       <parameters>         <Parameter>           <name>create spatial index</name>           <value>true</value>         </Parameter>         <Parameter>           <name>charset</name>           <value>ISO-8859-1</value>         </Parameter>       </parameters>     </DataStore>      REST:               http://localhost/geoserver/rest/workspaces/uk/datastores/roads.xml     PUT /geoserver/rest/workspaces/uk/datastores/roads.xml      Anyone have any ideas? Thanks


Preparing Huff model with data to use in QGIS?

I'm trying to find out about the notion of potential of acessibility using the methods of Huff. I´m using QGIS, with point data (with the variables that I would like to use) and polygons for Europe NUTS and LAU-2. What I am looking for is the ability **to calculate areas of influence of the different points using the method of Huff.** With QGIS, I cannot find tutorials or videos about how to make it work with the python console. **So can there be any examples about to prepare a Huff model with data that we might use on QGIS?** _(I´ve already seen the posts relative to the Huff method on the forum but I do not know how to make it work properly with the python language)_ _PS: I have a correct background with python programming, but I have problems with the way of making it work with GIS methods for this kind of theme._


How to share styles between layers in QGIS

Is it possible to share one style between different layers in QGIS? Now if I apply the same style from *.qml or use the same style from Style Manager for different layers then in *.qgs project file each layer contains full copy of the same symbology description. In this case not possible to discriminate layers which use the same style from others. Maybe possible to set name for used style?


Rendering performance

I am using ArcGis Java SDK for creating a map in my JavaFX application. I have a requirement to plot up to 500,000 graphics on graphics layer. When I do 100,000 graphics its performance is really bad. It takes 10-15 seconds to render the Base map and Graphics layer. I cannot use any online map because this application is running on a machine that has not internet connection.                   jMap = new JMap();           ArcGISLocalTiledLayer tiledLayer = new ArcGISLocalTiledLayer(“Texas_UL3D_Test.tpk");           GraphicsLayer graphicsLayer = new GraphicsLayer();                jMap.getLayers().add(tiledLayer);           jMap.getLayers().add(graphicsLayer);           jMap.addMouseListener(new MouseClickListener());                final HitTestOverlay overlay = new HitTestOverlay(graphicsLayer);                overlay.addHitTestListener(new                     jMap.addMapOverlay(overlay);                        jMap.addMapOverlay(new MouseMoveOverlay());                Map<String,Object> attributes = new HashMap<String, Object>();                jMap.addMapEventListener(new MapEventListenerAdapter() {                   @Override               public void mapReady(MapEvent event) {                  SpatialReference mapSR = event.getMap().getSpatialReference();                  for(Data data : getAllData()){                     attributes.clear();                     Point point = GeometryEngine.project(data.getLongitude (),data.getLatitude (), mapSR);                     attributes.put("number", data.getNum());                     attributes.put("name", data.getName());                     Graphic pointGraphic = new Graphic(point, getSimpleMarkerSymbol(data.getStatus()),attributes);                   graphicsLayer.addGraphic(pointGraphic);                                                }               }           });                                                 chartSwingNode.setContent(jMap);       Please help me to improve its performance. Tell me what I am doing wrong. ![A map with 200k+ graphics](http://i.stack.imgur.com/05HUw.png) A map with 200k+ graphics


Measure Snapping with ArcGIS Javascript API

I would like to know if the ArcGIS Javascript API has built in snapping functionality for the measure tool. I am trying to create a measure tool which only measures distances along the edge of roads. Is there anything built-in or would I need to create this functionality by linking into ArcObjects?


comparing two TINs

i have the following two files: 1) LiDAR las file1 2) Let's give it a name LiDAR las file2, contains the same file1 data, where number of points randomly removed. So if file1 contains X number of points, file2 would contain Y number of points, where Y is less than X. Now, i am using ArcGIS "LAS to Multipoint" to create from both files above their shape counterparts. Next i am creating two empty TIN(triangulated irregular network) files using ArcGIS. Then i edit both TINs, let's say tin1 and tin2, with the appropriate input feature clasess, i.e. file1 to tin1 and file2 to tin2. Is there any tool/package/library or any software that would let me calculate the RMSE(root mean square error) or any difference information that would give me information on the accuracy of the second file, i.e. file2, with respect to file1? I tried to use the TIN difference but it gives system error and cannot obtain the result. I would really appreciate if anyone could show how to obtain accuracy information and interpretation of the results obtained... thanks a lot in advance!!!


Join does not return matching records after 1001 records have been successfully joined

I'm working on a process that joins a feature layer to another feature class. The code is as follows:               arcpy.MakeFeatureLayer_management ("New_FC", "newFC_layer")     arcpy.AddJoin_management("newFC_layer", "ID",Join_FC, "ID", "KEEP_ALL")     env.qualifiedFieldNames = False     arcpy.CopyFeatures_management("newFC_layer", newFC_Output)      The problem I am having is there are over 1000 records and the result of the join only contains 1001. I have tried this manually in Arc by first creating the layer from the original feature class, joining the layer to the desired feature class and using the copy features tools just as the scripting would and I get a desirable outcome. I do not have domains in the ID field. I've checked the values in the field to be certain there is no variation between the 2 ID fields. I'm not sure what else could be causing this. Your suggestions are much appreciated.


Multiply Rasters with Scalar Numbers as Input in QGIS Modeler

I built a little model in the QGIS modelbuilder which uses the raster calculator with the command > gt(a,threshold) I need to run the model with varying thresholds from 2 to 30 so it would be great to create a _Number_ input in the model for this threshold so I'm asked for its value when starting the model, but the raster calculator only accepts rasters as inputs. Maybe someone has an idea how to get around this problem? For example by generating a raster containing only the threshold value in every cell in a previous step if there is an easy way to do this?


How to MOVE and RESIZE Features within a Layer?

I am still new to ArcEngine 10, I currently am able to create a feature layer that is associated with a feature class. Its a polygon layer. So I can create polygon, give it attritbute table and put it on a layer using UNIQUEVALUERENDERER. My question is, is there a tool bar control, or any way I can MOVE or RESIZE my polygon easily. I current use `"esriControls.ControlsSelectFeaturesTool"` to select the tools. Is there an easy way to do this? Thanks and Regards


Source for UTM Zone File

I'm looking for a complete, freely available file showing UTM Grid zones. Preferably _not_ a simplified version, but one that shows the full grid zones and all 'exceptions' (e.g. in Northern Europe) - as per http://whatutmzoneamiin.blogspot.com/ Does anyone know where I can download such a file?


How to tell if an ArcGIS Service is secure?

I am creating a .NET REST SOE for ArcGIS Server 10, and I will need to determine if a map service (or image) is secure or not. Is there a property on a MapService that would tell me this in either ArcObjects or REST?


What server and API to use for displaying complex polygons with dynamic symbology?

**Background** I need to interface a map into an existing website which allows the user to query a database and which currently results in a table listing population statistics per county. For example, display the population under 15, for 2003 - the result is a table listing each county's population values. I need to display a map showing county polygons which are symbolised with those values. If the user modifies the query, the map needs to update (eg, if the year is changed to 2004, or the statistic is changed to population over 65). Performance will be a factor, so the map should update rapidly when the query is run/modified. The map should support mouse-over events on the counties, so that statistics can be displayed in a popup as the user's mouse moves. **My questions** What are the options for the GIS server (to serve the polygons) and the mapping API (to embed the map on the website)? **Options** I like the look of Leaflet, but it seems that the county polygons would need to be supplied as coordinates/rings. Would this be too slow when zoomed to national scale? Can Leaflet handle on-the-fly simplification (as with feature layers in ArcGIS Server)? Using OpenLayers with GeoServer could work too, but the performance is quite slow for hover events, and it appears that the symbology is hard-coded in the WFS service(?) I'd need the ability to update the symbology when the query was modified. ArcGIS Server 10.1 has advanced on-the-fly symbology options, but hasn't been released yet. The client will be wary of deploying beta software on a production site. Thanks for any advice.


Looking for large GML files containing vector polygon data

I have few vector data files with 500 to 700 MB GML files. But I am looking for files larger than these preferably 1 GB, 2 GB. It would be helpful if somebody can provide some pointers regarding the place to find such files. Note: I need to test polygon overlay over large data sets, so the two layers that I need should be intersecting.


How to get the second nearest neighbor between two point patterns in R?

Is there a way to get the distances for the second nearest neighbor between two point patterns in R? The spatstat package has a function called nncross but it only applies to the nearest neighbors between two patterns and I need the distances to the second nearest neighbors.


Does anyone know of a 'best practice' Seabed Survey Data Model (SSDM)?

Many of the offshore oil/gas companies are adopting an initiative from Shell for delivery of spatial data. This is called an SSDM, which is really an ESRI file geodatabase with a standardised structure of datasets, and featureclasses. An empty template (geodatabase) in the SSDM structure is freely available from the OGP website, but it would be really good if anyone knows of a 'best practice' example geodatabase which is fully verified so we can use it as a 'how to' reference guide. Does anyone know if such a thing exists?


PostGIS spacial data type to represent geo-located polygons

I have a PostgreSQL database with circle shaped objects called 'spots'. Each of those objects has latitude, longitude and a variable radius, information that I need to define this circles. Given an specific coordinate, I select all the objects that contain that given point. The thing is that I want to switch to PostGIS this stuff because of performance. I've started documenting about PostGIS but as a complete newbie I still have some doubts about data types. What is the best way to store this kind of information in PostGIS? I don't need precision, because the radius can only have a limited lenght of 100km. I've thought about creating a polygon using `ST_Buffer` and save this into a `geometry` field in the 'spots' table. I also do not need an exact circle, a decagon is enough. The test code I'm using to know if this is meeting my needs is the following               create table spots (name varchar, geom geometry);          -- Insert a 2500m radius polygon with center in given coordenates     insert into spots      values (         'Test',          ST_Buffer(             ST_SetSRID(ST_MakePoint(39.63467934415986, 2.6308822631835938), 4326),             2500,             4         )     );      I have several doubts about this code. Once the geometric figure is created with `ST_Buffer`, is it still preserving it's position? If I provide the SRID code with given lat-lon coordinates, do I need to use `ST_SetSRID` or it's completely unnecessary? The thing is that I've discovered that using `ST_Contains` is always returning **true** , with no matter about the lat-lon values I'm providing to the function.


Which Geodatabase supports SQL and is easily portable?

I want to choose the geodatabase type, which could be:   * permits direct sql queries.   * easily portable, because the app would installed in one computer. I know that the personal geodatabase is a good choice, but I would like to know if there's some limitations in personal geodatabase apart the size (the size won't be a problem). The geodatabase would be used for some geoprocessing operations and some sql queries.


How to get nearby tiles from a location?

I want to get the tile in which a particular location lie and also its nearby tiles. Is there any google map api which could return this information.


What is a shaved polygon?

Just trying to find a definition. I was asked this in an interview and I assumed it was a polygon created by incorrectly modifying a another polygon in a coverage. According to my best googling resulting in this code: http://www.falconview.org/svn/FalconView/trunk/public/fvw_core/Utility/GeometryUtils.cpp and my limited understanding of it. A shaved polygon occurs when you eliminate a polygon and your surface no longer forms a convex hull. I would assume this is important in a situation where keeping area constant (such as city limits).


How can I snap 2 lines in QGIS so the st_distance between them is 0?

Sometimes when I snap the ends of 2 LineStrings together and I check the st_distance between those endpoints I get a value in the order of 1.1E-10 while at the same time when I check for equality of those endpoints I get the value 'true'. How can I snap 2 lines so the st_distance between them is 0? I am using QGIS 1.9.0-Master and a PostgreSQL database 9.1.7 with PostGIS 1.5.3-1.


Join/Relate in ArcGIS 9.3.1 ArcEditor through a python script - is it possible?

I'm working on a ArcGIS 9.3.1 ArcEditor and I want to write a python script that will do a Join or Relate. Problem is, that join table\join field are restricted to ARCINFO (higher license), and relate isn't doable by code (or so it seems from the ARCGIS help). As upgrading the license isn't an option, Does anybody have a way I can do a join between two shapefiles in ArcGIS or Opensource tools?


How to create a shapefile in ArcGIS 10 using arcpy?

How can I create a shapefile using Python in ArcGIS 10? I have lat & long. From this I need Python code which will create a shapefile and display it in ArcGIS 10. Thanks.


ArcGIS online options?

There are lots of comments on different forums about different types on online GIS data/map sharing tools. What i need to know is what ArcGIS online CANT do compared to the functionality of the open source options? I have big geodatabases that contain dynamic data that is constantly being updated and shared across multiple offices. The geodatabases contain raster data with information that needs querying - Lidar/bathymetry data. We also have vector features that could be as many as 2000 features in any one feature layer. I have heard that it is a struggle to get raster layers into AGOL and they will just be an image with no data behind them I have also heard that there is a limit on the number of features AGOL can display at any one time? It seems a total minefield as to which one to use but i would prefer the free option if the functionality is the same or better in opensource.


Migrating to Pgrouting pgr_dijkstra?

I have a system that uses shortest_path function pgrouting 1.x. At the moment, I want to migrate to pgrouting 2. And I assume the equivalent function to shortest_path is pgr_dijkstra. (Correct?) When running this, (Hibernate Query Language)               SELECT SUM(t2.length) as totalLength FROM (         SELECT * FROM pgr_dijkstra(             'SELECT gid AS id, source::int4, target::int4,                      cost::double precision AS cost,                      reverse_cost::double precision as reverse_cost                  FROM openstreetmap',5374,5364, false, true         )) AS t1, openstreetmap AS t2 WHERE t1.edge_id = t2.gid      I get error ERROR: column t1.edge_id does not exist What is the edge_id in the output of pgr_dijkstra ?


What problems do special characters in file names cause?

When defining file names and paths, I have always used a simple rule - No special Characters including foreign letters Ä, Ü, Ö, ß (only _ and -) and no spaces. I used these rules to avoid problems with geoprocessing in older versions of GIS software products which used to complain about such paths and file names. I am now wondering what is the situation now? Are the rules still relevant to todays software products (not just GIS Software) and are there actually any guidelines or ISO standards regarding this?


What is the correct order for compressing, rebuilding indexes and updating statistics in ArcGIS?

I want to script out the compressing, rebuilding of indexes and updating statistics on our SDE databases, but I want to make sure I have the correct order for these to run. What would be the correct order? Should I run certain ones more than others? For the order, I would assume:               1) Compress     2) Rebuild indexes     3) Update statistics      But really I'm not positive. Thanks!


Is there a way to close a geoprocessing operation when the dialog box has been hidden/pushed to the back of the windows? I ran a python process as VB Script and when the error message appeared I misclicked. The error popup was hidden behind the attributes table. I finally terminated ArcMap. Is there an easier solution?


How to choose a GRASS kernel density function?

I'm starting to use the Grass module on QGIS, and I want to do a heatmap, so, I'm creating a new surface using the kernel function. But, GRASS come with 7 types of kernel functions, how do I know which one to choose? Regards


How can I create a multipoint geometry in QGIS?

I've got a Spatialite layer in QGIS with geometry type MULTIPOINT. Now I'd like to add some data in this table in the 'usual' way, so by doing multiple clicks in the map (e.g. left-click, left-click, right-click -> enter attribute values in the popup dialog for creating a record with a 3-points geometry. However, QGIS only allows me to add a single point by popping up the attribute dialog right after the first left-click. How to do this in the GUI? (I don't want to enter coordinates by hand in a query :-) )


How to export from PostGIS to KML

What is the best way to export from PostGIS to KML using open source tools? Can I do it directly, or do I need to first export to shape files?


How to redraw WMS layer on OpenLayers without flickering from geoserver?

I have a WMSlayer that is updated every 10sec with new data from SQL. Whenever I redraw the layer using redraw(true) , the map screen flickers. Is there a way to do it without flickering ?


GRASS GIS SDTS Manipulation

Preface: I'm a total GIS noob. Flame away. I'm learning GIS in my free-time and with free resources. I realize that is likely going to force me on the learn-fast-or-giveup track, but here it goes... My first project: Create a laser cut 9-layer topographic map of the 7.5 minute area where I work. My Plan: 1) Download SDTS DLG Hypsography data from USGS. 2) Unzip using Peazip. 3) Import into GRASS GIS. 4) Remove/edit unnecessary topo lines (I was able to do it with dlgv32 available at USGS website, but I can't export and don't want to pay $500 for a full version of global mapper). 5) Export to DXF or DWG 6) Open in Corel and create layers 7) Laser cut layers, glue them together. I've gotten through steps 1, 2, and 3 with minimal frustration, although peazip throws an error on extract that says "data after archive", which I hope has no effect on the usability of my data. I'm at a loss on step 4. That data set I'm working with is DLG STDS data in large format (7.5 minute quadrangles). Specifically, the data is from: http://dds.cr.usgs.gov/pub/data/DLG/LARGE_SCALE/I/indian_hills_CO/hypsography/1/ I can get the DDF files to import into GRASS and I can view the topomap in the display; however I'm having trouble manipulating what I'd like to see. Basically I want to display only the major topolines (for example, 6000', 6400', etc.). When I open this data set in Global Mapper, this is very easy to do. I imagine I can accomplish this with some kind of SQL select function in GRASS; however, I do not understand how the data is organized enough to do this. When I import the SDTS file, I get 10 database links. Most of the databases look 'empty', so I imagine there is just one file I need to be working with. Do any of you have any experience in working with Hypsographic data? Do you know how I can simply delete the entries that do not correspond to the lines I want?


Is there a 3rd party ArcGIS viewer (builder) for Javascript?

Esri provides an ArcGIS Viewer for Flex as well as an ArcGIS Viewer for Silverlight. Strangely though, there are no plans for a similar viewer for Javascript. **Are there any 3rd parties that have created a "viewer" for javascript?** Though they are referred to as "viewers", they are actually viewer-builders: they allow administrators to create web applications without writing any code. The javascript viewer blogged about here does not allow user to choose tools to include in the app, as can be done with the flex and silverlight versions. * * * **Update** I have developed some capabilities that have been packaged as a combination of an SOE and an Add-in for the silverlight viewer. This works great - when the admin builds a viewer application, he can pick my add-in tool from the list and configure it to use the URL of a server where my SOE is installed. However, from what I can tell there are no add-ins for the javascript viewer. Or am I missing something?


Can I use predefined list of values from Postgis when I draw lines in QGIS?

Lets say that we have 2 tables in Postgis:               Table 1 (PIPE):     -ID     -pipe_type_id     -geometry          Table 2 (PIPE_TYPE):     -ID     -type      foreign key `PIPE.pipe_type_id - PIPE_TYPE.ID` Table PIPE is empty. Table PIPE_TYPE is filled with values. I need to draw a line in QGIS directly to PIPE.geometry column. After the line is drawn I need a popup window to appear with an option to choose PIPE_TYPE.type value for that line. After submitting, correct value of PIPE_TYPE.ID should be stored in PIPE.pipe_type_id column. I did this with Bentley Map using their Map Administrator and Oracle DB, but I want to try this with QGIS + Postgis. Is it possible?


How to solve Microsoft .NET Framework error message.?

The below error message displaying when user leaves the arcmap desktop for more than one hour without any performance on the map, if this error comes then user should close the Arcmap and re-open it again, any suggestions how we can over come this problem. **Arcmap Version 9.3.1** ![enter image description here](http://i.stack.imgur.com/FBInI.png) I got this message in the details box. _**_** _*_ ** _**JIT Debugging **_** _*_ ****** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.


What is the difference between ArcSDE and ArcGIS Server?

I have been working with ArcGIS Desktop where I use ArcMap for doing GIS work. Can anyone please explain to me in simple words What is ArcSDE and ArcGIS server? These can be independent dedicated server machines? Any simple and full explanation on this is most welcome.


Creating getCapabilities document in more languages

I'm providing INSPIRE metadata and services and I want them in more languages than one. I expect that most users are locals, but some users are definitely from other European countries. Therefore I want to support national language and english. In metadata documents, I have used gmd:PT_FreeText_PropertyType, but getCapabilities file follows other XSD schemas (wms or wfs, according to the service). Do you know about some possibilities of adding additional language to getCapabilities document?


PostGIS - Geometry or Geography find points within distance in meters

I have a requirement where I need to store lat/long coordinates for locations all around the world. I then need to query for those locations that are within a specified distance (in meters) from another location. These distances are usually within the 500-1000 meter range so I don't need crazy precision. Following various examples I've found, I've been using SRID 4326 with my geometry column in a PostGIS database. The column simply holds lat/long coordinates. The ST_DWithin method takes a distance in meters for geography types, but I don't know what the unit is for 4326. It doesn't seem to be meters with some queries that I tried. I'm assuming it's degrees. I've read that for performing Spatial queries on small areas, it's best to use geometries since operations are quicker at the price of precision. How can I use these methods to provide meters for either `ST_DWithin` or `ST_Distance`?


Efficient way to store multiple values of an x,y location in Python?

I am trying to read values from a stack of images and store them in a structure that will allow for easy readability. My current idea is to create a loop               for x in width:         for y in length:             for z in height:      and try appending the z value to a list at [x, y]. The issue with this technique is that I do not know how to prevent losing the x and y position through the iteration and it seems rather inefficient. The input data will consist of z values extracted from tiff images. I am reading them by first creating a stack through a loop statement               for i, fname in enumerate(image_files):     img = cv2.imread(fname, cv2.CV_LOAD_IMAGE_UNCHANGED)     img_stack[:,:,i] = img      which I found here: http://stackoverflow.com/a/20056062/1342580 (CV2 is only returning nan for me but that's a different question) After the stack is created I used to loop at the beginning of my question to go through all of the pixels (which at the moment is 3858 x 3742) and append the z value of an x,y location from each image to the x,y value (for example if I had 4 images in the stack the result at position 1, 1 would be [1, 1, Z1, Z2, Z3, Z4]. Then I append that to another list that will contain a list for every x,y position Is there a better technique for doing this?


Cannot access Earth layer in Google Maps V3 API?

The "new" google maps has the awesome feature of accessing the earth globe in the browser (on Mac and Windows), without the need for installing the google earth plugin. I know that you can access the new look and feel of the maps in Version 3 of the API using google.maps.visualRefresh global property set to true. However I have not been able to access the earth globe. I had a look at the available mapTypes and there is no "earth", or "satellite_3d", and nothing really in the documentation which leads me to think it is available. Does anyone know if this is at all possible? And if so how do you go about it? Thanks Ando


ArcGIS Javascript example for geometry services?

I have a client that wishes to show him all the geometry services example in Javascript API http://help.arcgis.com/EN/ARCGISSERVER/10.0/APIS/REST/geometryserver.html ... I'm new to Javascript and ArcGIS, is there a sample with all the examples for geometry services? https://developers.arcgis.com/en/javascript/jssamples/util_buffergraphic.html Yes I have been here https://developers.arcgis.com/en/javascript/ but they don't have all example.


'Example for displaying attributes' Unable to see attribute data

'Example for displaying attributes' available with geoExt package are not working in my system. What could be the possible reason. I can see attribute table in web page windows, but no attribute entry is there. Is there some proxy setup issue? I have not done any proxy setup.


What's the best way to add a projection to GDAL?

I have a number of files in Maryland State-Plane (US foot) that have the following wkt: "PROJCS["NAD_1983_StatePlane_Maryland_FIPS_1900_Feet",   GEOGCS["NAD83",   DATUM["North_American_Datum_1983",   SPHEROID["GRS 1980",6378137,298.2572221010002,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],   PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4269"]],   PROJECTION["Lambert_Conformal_Conic_2SP"],   PARAMETER["standard_parallel_1",38.3],   PARAMETER["standard_parallel_2",39.45],   PARAMETER["latitude_of_origin",37.66666666666666],   PARAMETER["central_meridian",-77],   PARAMETER["false_easting",1312333.333333333],   PARAMETER["false_northing",0],   UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]]]" OGRSpatialReference::autoIdentifyEPSG fails to recognize this. As far as I can tell, the only difference in this wkt and the one for 2248 on spatialreference.org is some trailing significant digits, some omitted Authority codes, and a reversal in the order of the standard parallels. [Edit] I've been looking at the pcs.csv file and while I don't know exactly how to read the columns, it appears that the parameters in the file for 2248 don't match the above wkt or the wkt on spatialreference.org. The standard parallels differ, as does the latitude of origin. This ups the ante on what the right action is. What is the preferred method for adding this to the data files so that it will be recognized? Do I edit my pcs.csv file? The pcs.override.csv? Or something else? Changing the content of the file is impractical in this case.


Ubuntu Newbie I am frustrated trying to install (all things GEOS) WEB-GIS

I am new to ubuntu SAUCY and I must confess the transition from windows has not been really easy for me. on windows everything seems pretty much straight forward but I am getting frustrated because It seems when I try to install either pyproj, gdal, mapnik, proj4, Postgre/postgis and other Web gis packages they probably don't work together and their dependencies aren't the same. my question is isn't there an easy way to get all these packages to work together? when I install QGIS it removes something else same goes to mapnik. I install mapnik the other day it even crash and messed up my system, had to do a clean OS install all over again. here's the error im getting now.               libmapnik-dev: Depends: libmapnik (= 2.2.0-ubuntu1~saucy1) but 2.2.0-ubuntu1~saucy1 is to be installed                    Depends: mapnik-utils (= 2.2.0-ubuntu1~saucy1) but 2.2.0-ubuntu1~saucy1 is to be installed                    Depends: libpng-dev but it is a virtual package                    Depends: libtiff-dev but it is a virtual package                    Depends: libltdl7-dev but it is a virtual package                    Depends: libicu-dev (>= 4.2) but 4.8.1.1-12ubuntu2 is to be installed      here is the last link(help) have have used. https://github.com/mapnik/mapnik/wiki/UbuntuInstallation all the GIS package I have tried installing is throwing this same error message. I really need help on how to go about getting these installed because I cant work without all of them. Thanks Anthony.


Where can I get detailed Bathymetry data for Ontario

I need detailed Bathymetric data covering water bodies (including smaller ones) in the Province of Ontario. Our Provincial Government has it, but the use of the data are restricted due to liability issues. Does anyone know place to download this data, or can anyone suggest a way to interpolate lake depth contours (ie - would it be feasible to get a Google Earth Pro licence for this)? I have access to 3D Analyst and Spatial Analyst. Thanks in advance for your suggestions


Programmable buffers using GDAL and python

Is there a way to programmatically generate buffer layers for vector layers using GDAL and python?


Selection problem in WMS layer using OpenLayers

I added 4 WMS layers (three polygons and one have point geometry) from GeoServer on my webpage My requirement is:   1. I have to select a single polygon of one wms layer using a mouse click. After the selection, the polygon color should be changed. If you select another polygon, the previous selected polygon color is to be changed to original color.   2. If I select a polygon of one wms layer, I want to get the `NAME` of the selected polygon as an alert. Any help is greatly appreciated.. Thank you..               layer = new OpenLayers.Layer.WMS(           "Layer", "http://********:8080/geoserver/POC/wms",                      {                     LAYERS: 'POC:CIRCLE_VIEW',                     STYLES: '',                      wrapDateLine: true,                      format: format,                     transparent:true                      },                 {                    singleTile: true,                     ratio: 1,                     isBaseLayer: false,                    yx : {'EPSG:42106' : false}                      }                  );       ` I added four layers in this way..               var infoControls = {              click: new OpenLayers.Control.WMSGetFeatureInfo({                  url: 'http://********:8080/geoserver/POC/wms',                   title: 'Details',                  layers: [layer,layer2,layer3,layer4],                  queryVisible: true              }),              hover: new OpenLayers.Control.WMSGetFeatureInfo({             url: 'http://********:8080/geoserver/POC/wms',                  title: 'Details',                layers: [layer,layer2,layer3,layer4],                  hover: true,                  queryVisible: true              })          };         for (var i in infoControls)          {                  infoControls[i].events.register("getfeatureinfo", this, showInfo);             map.addControl(infoControls[i]);          }             infoControls.click.activate();     function showInfo(evt) {                 if (evt.features && evt.features.length) {                           highlightLayer.destroyFeatures();                      highlightLayer.addFeatures(evt.features);                      highlightLayer.redraw();                 } else {                     highlightLayer.destroyFeatures();                      highlightLayer.addFeatures(evt.features);                      highlightLayer.redraw();                     document.getElementById('responseText').innerHTML = evt.text;                 }             }      In this I am showing attribute data of selected polygon.


How to find SRID for random polygon?

I'm testing spatial database performance on a dataset. Spatial objects in this dataset (stored as WKT in a flat text file) are random valid polygons which have vertex coordinates (x,y) where 100,000> x >0 and same for y. Currently I'm having problem with inserting these data into PostGIS which has a geometry constraint check and I got an error like "violates check constraint "enforce_srid_polygon ". So, how can I find/create a srid for my dataset ? BTW: the polygons are valid polygons which are extracted from images by segmenting objects.


How to preserve the original direction of NHD segments when creating a route using the gp.CreateRoutes_lr tool?

I am trying to figure out how to preserve the original line direction of NHD High Resolution data that I am selecting out and creating a route with. I'm using ArcGIS 9.3.1 and this is a python script. I am selecting out some of the NHD streams by the ReachCode field into a new feature class (I have also tried this with a feature layer in the context of the issue I'm posting about but creating a separate feature class allowed me to debug further), and then am taking that feature class and dissolving it. I then take that dissolved NHD section and am creating a route with the gp.CreateRoutes_lr tool. I've narrowed down the issue to the step when the script creates the route and it seems that the direction of the line feature gets flipped when I create the route (I have definitively verified this is happening). Is this what is supposed to happen? I've never worked with the linear referencing tools before this so am unsure if this is what should be happening. Each of the line segments have a defined FROM and TO node direction which is important for streams in terms of correct flow direction. The reason the direction matters to me for my script is that I am creating the vertices via the gp.FeatureVerticesToPoints_management tool get the elevations of the FROM and TO node to determine the stream slope for points located along the NHD section. This impacts the slope calculation obviously. I just compared a site that had a negative slope (with assumption that a negative slope implies an instance where the route direction got flipped as I describe) with a site that had a positive slope (with assumption that a positive slope indicates an instance where the route direction did not get flipped). Both assumptions were true, and it seems for the former the direction got flipped, and the latter it did not. So it seems that this tool does not flip the directions consistently... Is there any way to preserve the original direction of the NHD segments when I create a route? Or, what would influence the direction of the output route line feature?? thanks, Tom


How do I add precise border with longitude and latitude for any country using mapinfo?

I have a plain image that I need to add international border with precise longitude and latitude but I have no experience with Mapinfo. How is it possible? Is there any way to import maps from Bing or Google Earth with that information?


Adjust Picture Marker Symbols with Python? (ArcGIS 10 SP1)

I am working toward a map cache, and therefore have about 12 versions of the same datasets to be shown at different scales. Invariably, the symbol sizes I have set on highway shields (for example) need to be fussed with in order to make them look right. In order to change the symbol size (scale to text size doesn't fit my application), you have to click four times from the label manager, and you have to do it over and over and over until all eight label classes are done. And then you want it just a tad larger.... Can python (or anything else) be used to adjust picture marker symbol size across multiple label classes? Thank you!


Find distance from a point to linestring

I have table (shapetable) with my coastline shape file loaded. I have another table (pointtable) with lat long points. Wondering how would i go about writing a sql query to find the distance between the lat long points and the shapefile. The shapetable has a geography type attribute, from my reading it appears that geometry type linestrings and geography are one and the same. Appreciate the help thanks vic **EDIT:** Being relatively a newbie at this, I'm not using PostGIS. I am using sql server 2008. I imported the shape file using a shape2sql utility. The table has a bunch of shapefile attributes and also the geography data type. If i understand this correctly, the geography binary data is nothing but linestring of geometry data type(I'd verify this by running a stgeoemtrytype() on the column) I have another table with a bunch of lat long. I want to implement a solution where by i want to get distance from the shapefile, using stdistance. One confusing part i found in going through a bunch of documents was that, given a geography data type, how could i find out the linestring coordinates. Thanks again


How to stop values from rounding to whole numbers in ArcGIS attribute tables?

I am trying to edit an attribute table in ArcGIS 10.1 and so far have been unable to keep it from rounding to whole numbers. Even when I manage to "pad with zeroes" using the numeric settings, it will round to 6.0. I have tried the Editor > Options > General method as well. My decimal places are currently set to round to 6, but any data I enter rounds to a whole number. My field is set to "Long Integer". What obvious solution am I missing?


QGIS: On the fly projection from WGS84, 19 N, to Web Mercator. Do I need to define a new CRS with transformation parameters?

Workin in QGIS, I have a shapefile called "protected areas" of Dominican Republic, that was digitized from topomaps 50k. Shapefile is projected to WGS84, 19N zone. My problem is that when I load openlayers, the limits of almost all protected areas, don't get aligned with openlayers. In the following image there is an example:![Image 1](http://www.geografiafisica.org/wp-content/uploads/2012/12/screenshot1.jpg) The limit of the protected area (in red) is the coastline; but the real coastline plotted in Openlayers (google satellite) doesn't align with my shapefile (this area has rocky coastline, that haven't changed since topo was made). There is a ca. 45m shift in the X axis, and ca. 50m in the Y axis. In the following image: ![Image showing Shift](http://www.geografiafisica.org/wp- content/uploads/2012/12/screenshot2.jpg) the limit of the protected area is prefectly aligned with topomap (coastline, road, etc.). As I know, OpenLayers is projected using "Web Mercator". So, do I need to define a new CRS with transformation parameters between WGS84 19N and Web Mercator? I believed they use the same ellipsoidal reference, so I shouldn't need to define a transformation. Any help would be appreciated. Thanks. Jose


How to perform a spatio-temporal query in attribute table?

I am not good at programming, so I would ask for your understanding concerning my question. I have an attribute table that contains five columns which are: (Date, ID, Latitude, Longitude, Rainfall). Rainfall for different periods of time (which are defined in column "Date") have been recorded in certain stations. In the column "ID" is the ID of the station on which the recording has been made for a specific period of time. Every station has a unique ID, but at the same location, rainfall has been recorded for different time periods. On the column "Rainfall" appears the amount of rain that was recorded on the specific time and the specific station. My question is, how can I get the total rainfall in a certain station that has been recorded, using all the records in column "Date" that refer to that specific station. Could I somehow use the coordinates of its station to get the total rainfall that has occurred on that specific station? The software I use is QGIS 2.4 on Windows machine.


Why does QGIS crash when merging shapefiles?

This is a repeatable problem. I have created a shapefile using a csv. I am trying to merge it with an existing shapefile, both of which contain only points. (Using the Vector | Data Management | Merge Shapefiles option.) I have double-checked that the shapefile type is correct, and the coordinate reference system matches. As soon as I click OK to accept the result, the message appears "qgis.exe has stopped working" etc., the usual Windows crash message. Things I have done to reslove this: 1. I have a friend who has the same software and the same project files (we are collaborating on this project). I sent him my original csv file with the new data in it, and he was able to successfully merge the files at his end. So I know that the csv file is OK. 2. Uninstalled and re-installed the program. Identical result, program crashes every time as soon as I go to accept the merging of the shapefiles. Using Windows 7. Does anyone know how to resolve this issue? If not, is there another way to bring new data into the project? I don't want to use the "Add Feature" option as it is too difficult to get the co-ordinates correct with just hovering over the map.


Returning string from OpenLayers.Format.WKT write?

How to return a string from OpenLayers.Format.WKT write               this.innerHTML = new OpenLayers.Format.WKT().write(         layer.selectedFeatures[0]     );      my full code is like this please suggest me...               //OpenLayers.ProxyHost = "proxy.cgi?url=";     OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";          var wps = "http:",         capabilities, // the capabilities, read by Format.WPSCapabilities::read         process; // the process description from Format.WPSDescribeProcess::read          // get some capabilities     getCapabilities();          // create the UI     var layer = new OpenLayers.Layer.Vector("Scratchpad");     var toolbar = new OpenLayers.Control.EditingToolbar(layer);     toolbar.addControls([new OpenLayers.Control.ModifyFeature(layer, {         title: "Select feature"     })]);     var map = new OpenLayers.Map('map', {         controls: [             toolbar,             new OpenLayers.Control.ZoomPanel(),             new OpenLayers.Control.PanPanel()         ],         layers: [             new OpenLayers.Layer.WMS(                 "OSM", "",                 {layers: "openstreetmap", format: "image/png"}             ), layer         ]     });     map.zoomToMaxExtent();          // add behavior to html elements     document.getElementById("processes").onchange = describeProcess;          // using OpenLayers.Format.WPSCapabilities to read the capabilities     function getCapabilities() {         OpenLayers.Request.GET({             url: wps,             params: {                 "SERVICE": "WPS",                 "REQUEST": "GetCapabilities"             },             success: function(response){                 capabilities = new OpenLayers.Format.WPSCapabilities().read(                     response.responseText                 );                 var dropdown = document.getElementById("processes");                 var offerings = capabilities.processOfferings, option;                 // populate the dropdown                 for (var p in offerings) {                     option = document.createElement("option");                     option.innerHTML = offerings[p].identifier;                     option.value = p;                     dropdown.appendChild(option);                 }             }         });     }          // using OpenLayers.Format.WPSDescribeProcess to get information about a     // process     function describeProcess() {         var selection = this.options[this.selectedIndex].value;         OpenLayers.Request.GET({             url: wps,             params: {                 "SERVICE": "WPS",                 "REQUEST": "DescribeProcess",                 "VERSION": capabilities.version,                 "IDENTIFIER": selection             },             success: function(response) {                 process = new OpenLayers.Format.WPSDescribeProcess().read(                     response.responseText                 ).processDescriptions[selection];                 buildForm();             }         });     }          // dynamically create a form from the process description     function buildForm() {         document.getElementById("abstract").innerHTML = process["abstract"];         document.getElementById("input").innerHTML = "
Input:
";         document.getElementById("output").innerHTML = "";              var inputs = process.dataInputs, supported = true,             sld = "text/xml; subtype=sld/1.0.0",             input;             //var change=inputs.innerHTML.toFixed(2);         for (var i=0,ii=inputs.length; i<ii; ++i) {         alert("Hello! I am an alert box!!");             input = inputs[i];             if (input.complexData) {             //alert("Hello! I am an alert box in complexdata !!");                 var formats = input.complexData.supported.formats;                 if (formats["application/wkt"]) {                 //alert("Hello! I am an alert box in app/wkt!!");                     addWKTInput(input);                 } else if (formats["text/xml; subtype=     -collection/1.0"]) {                 //alert("Hello! I am an alert box in text/xml!!");                     addCollectionInput(input);                 } else if (formats["image/tiff"]) {                         // addRasterInput(input);                     //alert(truncator(5.1231231, 1));                     //alert("Hello! I am an alert box in image/tiff!!");                     addRasterInput(truncator(input,2));                 } else if (formats[sld]) {                 //alert("Hello! I am an alert box in formatssld!!");                     addXMLInput(input, sld);                 } else {                     supported = false;                 }             } else if (input.boundingBoxData) {             alert("Hello! I am an alert box in bounding box!!");                  // var change=input.innerHTML.toFixed(2);                 addBoundingBoxInput(input);             } else if (input.literalData) {             //alert("Hello! I am an alert box in literal box!!");                 addLiteralInput(input);             } else {                 supported = false;             }             if (input.minOccurs > 0) {             //alert("Hello! I am an alert box in minoccurs box!!");                 document.getElementById("input").appendChild(document.createTextNode("* "));             }         }              if (supported) {             var executeButton = document.createElement("button");             executeButton.innerHTML = "Execute";             document.getElementById("input").appendChild(executeButton);             executeButton.onclick = execute;         } else {             document.getElementById("input").innerHTML = '' +                 "Sorry, the WPS builder does not support the selected process." +                 "";         }     }          // helper function to dynamically create a textarea for geometry (WKT) data     // input     function addWKTInput(input, previousSibling) {     alert("Hello! I am an alert box in dynamically create a textarea for geometry data input!!");         var name = input.identifier;         var container = document.getElementById("input");         var label = document.createElement("label");         label["for"] = name;         label.title = input["abstract"];         label.innerHTML = name + " (select feature, then click field):";         previousSibling && previousSibling.nextSibling ?             container.insertBefore(label, previousSibling.nextSibling) :             container.appendChild(label);         var field = document.createElement("textarea");         field.onclick = function () {         alert("Hello! I am an alert box in onclick!!");             if (layer.selectedFeatures.length) {             alert("Hello! I am an alert box in selected features function for geometry data input writing!!");                 this.innerHTML = new OpenLayers.Format.WKT().write(                          //layer.selectedFeatures[0]                     //layer.selectedFeatures[0]                     //name.length();                     //alert(trun.toFixed(2));                     //layer.selectedFeatures[0]                     layer.selectedFeatures[0].geometry.toString()                      );             }             createCopy(input, this, addWKTInput);         };         field.onblur = function() {             input.data = field.value ? {                 complexData: {                     mimeType: "application/wkt",                     value: this.value                 }             } : undefined;         };         field.title = input["abstract"];         field.id = name;         previousSibling && previousSibling.nextSibling ?             container.insertBefore(field, previousSibling.nextSibling.nextSibling) :             container.appendChild(field);     }          // helper function for xml input     function addXMLInput(input, type) {         var name = input.identifier;         var field = document.createElement("input");         field.title = input["abstract"];         field.value = name + " (" + type + ")";         field.onblur = function() {             input.data = field.value ? {                 complexData: {                     mimeType: type,                     value: this.value                 }             } : undefined;         };         document.getElementById("input").appendChild(field);     }          // helper function to dynamically create a  collection reference input     function addCollectionInput(input) {         var name = input.identifier;         var field = document.createElement("input");         field.title = input["abstract"];         field.value = name + " (layer on demo server)";         addValueHandlers(field, function() {             input.reference = field.value ? {                 mimeType: "text/xml; subtype=-collection/1.0",                 href: "http://",                 method: "POST",                 body: {                     : {                         version: "1.0.0",                         outputFormat: "GML2",                         featureType: field.value                     }                 }             } : undefined;         });         document.getElementById("input").appendChild(field);     }          // helper function to dynamically create a raster (GeoTIFF) url input     function addRasterInput(input) {         var name = input.identifier;         var field = document.createElement("input");         field.title = input["abstract"];         var url = window.location.href.split("?")[0];         field.value = url.substr(0, url.lastIndexOf("/")+1) + "data/tazdem.tiff";         document.getElementById("input").appendChild(field);         (field.onblur = function() {             input.reference = {                 mimeType: "image/tiff",                 href: field.value,                 method: "GET"             };         })();     }          // helper function to dynamically create a bounding box input     function addBoundingBoxInput(input) {         var name = input.identifier;         var field = document.createElement("input");         field.title = input["abstract"];         field.value = "left,bottom,right,top (EPSG:4326)";         document.getElementById("input").appendChild(field);         addValueHandlers(field, function() {             input.boundingBoxData = {                 projection: "EPSG:4326",                 bounds: OpenLayers.Bounds.fromString(field.value)             };         });     }          // helper function to create a literal input textfield or dropdown     function addLiteralInput(input, previousSibling) {         var name = input.identifier;         var container = document.getElementById("input");         var anyValue = input.literalData.anyValue;         // anyValue means textfield, otherwise we create a dropdown         var field = document.createElement(anyValue ? "input" : "select");         field.id = name;         field.title = input["abstract"];         previousSibling && previousSibling.nextSibling ?             container.insertBefore(field, previousSibling.nextSibling) :             container.appendChild(field);         if (anyValue) {             var dataType = input.literalData.dataType;             field.value = name + (dataType ? " (" + dataType + ")" : "");             addValueHandlers(field, function() {                 input.data = field.value ? {                     literalData: {                         value: field.value                     }                 } : undefined;                 createCopy(input, field, addLiteralInput);             });         } else {             var option;             option = document.createElement("option");             option.innerHTML = name;             field.appendChild(option);             for (var v in input.literalData.allowedValues) {                 option = document.createElement("option");                 option.value = v;                 option.innerHTML = v;                 field.appendChild(option);             }             field.onchange = function() {                 createCopy(input, field, addLiteralInput);                 input.data = this.selectedIndex ? {                     literalData: {                         value: this.options[this.selectedIndex].value                     }                 } : undefined;             };         }     }          // if maxOccurs is > 1, this will add a copy of the field     function createCopy(input, field, fn) {         if (input.maxOccurs && input.maxOccurs > 1 && !field.userSelected) {             // add another copy of the field - we don't check maxOccurs             field.userSelected = true;             var newInput = OpenLayers.Util.extend({}, input);             // we recognize copies by the occurrence property             newInput.occurrence = (input.occurrence || 0) + 1;             process.dataInputs.push(newInput);             fn(newInput, field);         }     }          // helper function for adding events to form fields     function addValueHandlers(field, onblur) {         field.onclick = function() {             if (!this.initialValue) {                 this.initialValue = this.value;                 this.value = "";             }         };         field.onblur = function() {             if (!this.value) {                 this.value = this.initialValue;                 delete this.initialValue;             }             onblur.apply(this, arguments);         };     }          // execute the process     function execute() {         var output = process.processOutputs[0];         var input;         // remove occurrences that the user has not filled out         for (var i=process.dataInputs.length-1; i>=0; --i) {             input = process.dataInputs[i];             if ((input.minOccurs === 0 || input.occurrence) && !input.data && !input.reference) {                 OpenLayers.Util.removeItem(process.dataInputs, input);             }         }         process.responseForm = {             rawDataOutput: {                 identifier: output.identifier             }         };         if (output.complexOutput && output.complexOutput.supported.formats["application/wkt"]) {             process.responseForm.rawDataOutput.mimeType = "application/wkt";         }         OpenLayers.Request.POST({             url: wps,             data: new OpenLayers.Format.WPSExecute().write(process),             success: showOutput         });     }          // add the process's output to the page     function showOutput(response) {         var result = document.getElementById("output");         result.innerHTML = "
Output:
";         var features;         var contentType = response.getResponseHeader("Content-Type");         if (contentType == "application/wkt") {             features = new OpenLayers.Format.WKT().read(response.responseText);         } else if (contentType == "text/xml; subtype=-collection/1.0") {             features = new OpenLayers.Format.T.v1_0_0().read(response.responseText);         }         if (features && (features instanceof OpenLayers.Feature.Vector || features.length)) {             layer.addFeatures(features);             result.innerHTML += "The result should also be visible on the map.";         }         result.innerHTML += "<textarea>" + response.responseText + "</textarea>";     }


High Resolution Mineral Maps

Australia has recently published high resolution surface mineral maps using data from ASTER see here. Does anyone know of similar free products available for the entire globe?