title: vb.net arcobjects "current no topology available"

text: I am using ArcMap add-in to perform a topology validation. I have defined a topology in the geodatabase and add it in ArcMap TOC. When I try to get the current topology using ArcObjects, I get this message : "current no topology available". My code is shown below:               Public Sub ReturnCurrentTopologyType()         Dim extUid As UID = New UIDClass()         extUid.Value = "esriEditorExt.TopologyExtension"         Dim topologyExt As ITopologyExtension = TryCast(My.ArcMap.Application.FindExtensionByCLSID(extUid), ITopologyExtension)         If topologyExt.CurrentTopology Is Nothing Then             MsgBox("Current no Topology available")             Exit Sub         End If         If TypeOf topologyExt.CurrentTopology Is IMapTopology Then             MsgBox("Current Topology is a map topology")         Else             MsgBox("Current Topology is a geodatabase topology")         End If     End Sub      Now I am not sure what I miss for getting the current topology. I am using ArcObjects 10.2.1 and vb.net(vs 2012). Please advise me, thanks.


title: How to re-slope a given DEM to pre-determined slope in ArcGIS?

text: I have a set of topographic contours of a mine and like to re-slope those areas alongside the river to a pre-determined slope, say 22˚; and 27˚ for water pond wall. The existing slopes along the river and the water pond vary from 5˚ to 32˚. Does anyone know any tools in ArcGIS 10.1 can be used to perform this specific task?


title: Unable to install License manager 10.1

text: I uninstalled the ArcGIS 10 from my computer, the software is uninstalled , I failed to uninstall the License manager. It was giving me an error "you don't have sufficient access to uninstall ArcGIS license manager 10" while I logged in as Admin. After reading here, I downloaded REVO software, and I managed to remove it. Surprisingly when I tried to install License manager version 10.1, I got the error "Another version of this product is already installed, Installation of this version cannot continue". Therefore I cannot install the ArcGIS 10.1.


title: Recommended opensource solution for storing, publishing and querying GIS data

text: Our company has millions of feature classes currently stored through ArcSDE on SQL Server 2008 R2. We are kind of slowly making our way to opensource software. What we want to achieve is to be able to migrate all our spatial data off ESRI to opensource database, and then be able to publish the data to our intranet, and allow end users to search and view the data. I have been thinking of a solution stack of of PostgresSQL/PostGIS, GeoNetwork and GeoServer. How much time/effort would you expect it to be? Any other best- practice recommendations? Thanks!


title: What are the pros and cons of forcing square pixels on reprojection?

text: I am using Erdas Imagine 2014 to reproject 4-band raster data from GRS 1980 NAD83 Lambert Conformal Conic (ft) to UTM GRS 1980 NAD83 North UTM Zone 11 (m). Unlike ArcGIS, Erdas provides the option to reproject irregular cells (where x != y) or force square pixels on reprojection (where x = y). What are the pros and cons of accepting the default irregular shaped cells versus forcing square pixels on the reprojection? I am particularly interested in how these options could effect processing efficiency, accuracy and geoprocessing within ArcGIS. ![enter image description here](http://i.stack.imgur.com/fKVtr.png)


title: Postgres Data insertation

text: I have a table with 4 column. There are thousands of data. The column names are serial || name || X || Y From 500 I made a mistake and put the X data into Y field and Y data into X field. So can I change the data making a range condition where serial no in greater than 500 or serial no equals to 500 to 1000? I think this is possible. I am new to postgres. Thanks


title: Why does FeatureClassToFeatureClass field mapping create shapefile with no attribute values on local machine from ArcSDE?

text: I have inherited taking over and supporting and ArcSDE GIS database. We have a process that we must do every 6 months to export certain features from the ArcSDE database into shape files so that they can be imported into a Smallworld GIS data. Yeah, I know. Why is our company using two different GIS systems? Don't ask. This was already in place before I even got involved with all of this. In any case, we have a set of Python scripts that are being used to join shape files to feature classes in the GIS database. We run the Python scripts via ArcMap via the Geoprocessing->Python console. However, it only works if we log into our GIS server and run ArcMap from there. If we attempt to do this from outside the GIS server, then the resulting output shape file has the right number of records, but all the attributes are either zero (for number attributes) or null (for text attributes). Again, running this in ArcMap 10.0 sp4 on the ArcGIS server works. Running it from ArcMap 10.0 sp4 on say my local machine, which has access to the data and I can bring it up, results in the exported shape file having no attribute values. My other question is, I don't understand all of the parameters passed into the arcpy.FeatureClassToFeatureClass_conversion function. Here is an example from the script:               arcpy.AddJoin_management("AERIALTAP","STATUS","TGIS.AE_STATUS","VALUE","KEEP_ALL")     arcpy.AddJoin_management("AERIALTAP","LOCATION_S","TGIS.AE_LOCATION_SOURCE","VALUE","KEEP_ALL")     arcpy.FeatureClassToFeatureClass_conversion("AERIALTAP","C:\TGIS\Final","AERIALTAP","#","ID ID true false false 9 Long 0 9 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.ID,-1,-1;X X true false false 19 Double 10 18 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.X,-1,-1;Y Y true false false 19 Double 10 18 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.Y,-1,-1;REGION REGION true false false 4 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.REGION,-1,-1;MAINT_RESP MAINT_RESP true false false 4 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.MAINT_RESP,-1,-1;OBJECTID OBJECTID true false false 19 Text 0 18 ,First,#,C:\TGIS\First\AERIALTAP.shp,AERIALTAP.OBJECTID,-1,-1;STATUS STATUS true true false 50 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,TGIS.AE_STATUS.DESCRIPTION,-1,-1;LOCATION_S LOCATION_S true true false 50 Text 0 0 ,First,#,C:\TGIS\First\AERIALTAP.shp,TGIS.AE_LOCATION_SOURCE.DESCRIPTION,-1,-1","#")      I understand what the join calls are doing. I understand the first three parameters into the conversion call (input feature class, output directory, output feature class name). The rest I have some sort of idea, but not completely sure. It definitely looks like it's mapping the input feature column to an output feature column. The "#" seems to be a definition of a delimiter between fields, but the rest confuses me. I've searched the ArcSDE web site and nothing is very clear about it. I have yet to find an example like what I have. Any help would be appreciate. If I do just this it works, but that's without any joins defined:               arcpy.FeatureClassToFeatureClass_conversion("AERIALTAP","C:\TGIS\Final","AERIALTAP")      This works. But once I enter the field mapping and the joins, forget it. It won't work unless I'm on the production ArcSDE GIS server.


title: How to build and pass remap for floating point raster without getting Reclassify ERROR 010255?

text: I am receiving the following message when executing my python script: > ERROR 010255: String remap must be used with a string field. My input raster is floating point and I would like to reclassify it in python using **gp.Reclassify_sa**. I build my remap up as a string, but this doesn't seem to work. How do I build and pass my remap for a floating point raster? The relevant code extract is as follows:               remap1 = "0 1.25 100000"     remap2 = "1.25 10 200000"     full_remap = remap1 + ";" + remap2     gp.Reclassify_sa(in_raster, "VALUE", full_remap, out_raster, "NODATA")


title: Clipping Rasters with a mask layer error

text: I've got a NDVI layer that I'm trying to clip with a vector file but when I try and use GDAL Tools clipper I get an error. That shows up like this: What am I doing wrong? This is before I even pick the mask layer! THANKS! Traceback (most recent call last): File "C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins\GdalTools\tools\widgetPluginBase.py", line 28, in someValueChanged self.emit(SIGNAL("valuesChanged(const QStringList &)"), self.getArguments()) File "C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins\GdalTools\tools\doClipper.py", line 105, in getArguments return self.getArgsModeMask() File "C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins\GdalTools\tools\doClipper.py", line 143, in getArgsModeMask if self.alphaBandCheck.isChecked(): TypeError: 'sip.methoddescriptor' object is not callable Python version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] QGIS version: 1.7.3-Wroclaw Wroclaw, 00624b3 Python path: ['C:\Users\dean.walker\\.qgis\python\plugins\GeoCoding', 'C:\Users\dean.walker\\.qgis\python\plugins\GeoCoding', 'C:/PROGRA~1/QUANTU~1/apps/qgis/./python', 'C:/Users/dean.walker/.qgis/python', 'C:/Users/dean.walker/.qgis/python/plugins', 'C:/PROGRA~1/QUANTU~1/apps/qgis/./python/plugins', 'C:\PROGRA~1\QUANTU~1\bin\python25.zip', 'C:\PROGRA~1\QUANTU~1\apps\Python25\DLLs', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\plat-win', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\lib-tk', 'C:\PROGRA~1\QUANTU~1\apps\qgis\bin', 'C:\PROGRA~1\QUANTU~1\apps\Python25', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\win32', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\win32\lib', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QUANTU~1\apps\Python25\lib\site-packages\wx-2.8-msw-unicode', '/usr/share/qgis/python', 'C:\PROGRA~1\QUANTU~1\apps\qgis\python\plugins\fTools\tools']


title: Load .osm.pbf file in Qgis

text: How can i do that ? On Linux or Windows ? The more simplest variant, if it exists. .osm.pbf it`s the extension for Openstreetmap extract that i get from a site that takes dayly extracts from osm


title: How to manually split a polyline into two parts at a specific vertex?

text: I defined a brand new shapefile as a polyline type in ArcCat. When I opened ArcMap (10.1) and started an editing session, I had no problems adding vertices. I would now like to manually add a point at the start of the line - but I am having unexpected difficulty. Edit: I think I may be taking the wrong approch here: While in editing mode with the shapefile selected, "point - adds point to the edit sketch" is greyed out. If I go to Editor> Construct Points, I get the error: "The map does not contain a point target. Add an editable point layer and / or a point template to the map." I am confused at this message. Is the polyline not a point target? Under my Create Features window, the shapefile shows up with the "Line" construction tools. Is the polyline not the "template to map"?) I have looked at online help related to my question \- but in my case, I can't can the point tool they mention in step 9. EDIT: I think I may have misunderstood the purpose of "add point" - I thought this was how to manually "split" a line into two and have the line acquire a row in its attribute table. So to rephrase my question: how do I define a vertex so that it "splits" a line into two segments? (I'm no longer sure what "add points" is meant for)


title: Coordinate system of a MODIS file to be introduced in GDAL for transformation

text: I am working on MODIS data using GDAL. When I extract coordinate system information of the files I got this: `Coordinate System is: PROJCS["unnamed", GEOGCS["Unknown datum based upon the custom spheroid", DATUM["Not specified (based on custom spheroid)", SPHEROID["Custom spheroid",6371007.181,0]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Sinusoidal"], PARAMETER["longitude_of_center",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["Meter",1]] Origin = (2223901.039533000000000,0.000000000000000) Pixel Size = (926.625433139166600,-926.625433139166720)` I have to transform the coordinate system of my other files into this coordinate system. But the problem is that I don't know how to introduce this coordinate system to my program. I can't find _EPSG_ or _Proj4_ for it. Any solution or alternative?


title: Why the georeferencing in UTM does not work with the QGIS georeferencer?

text: First time here, sorry if this looks simple. I use QGIS on Windows 7. I georeferenced a toposheet with geographic references to UTM. When I superimpose a UTM raster, the toposheet is near the origin and the rater far away but properly imported. I then georeferenced the toposheet with its system and warped it to UTM and it worked, the two rasters are properly superimposed. Can someone explain why the georeferencing in UTM does not work the first time with the georeferencer?


title: Python console vs Toolbox script in ArcGIS

text: My question is similar to this post: Adding Layer in current session using ARCPY . My script works in ArcMap python console but not as a script in toolbox.I am running ArcGIS 10.0 SP4. The script is given below, and the error says it fails at line 3, "CreateObject cannot open map document"               import arcpy     import arcpy.mapping as map     mxd = arcpy.mapping.MapDocument("CURRENT")     df = arcpy.mapping.ListDataFrames(mxd)[0]     updateLayer = arcpy.mapping.ListLayers(mxd, "SectionClip",df)[0]     arcpy.MakeFeatureLayer_management(updateLayer,"SectionInner2")     sourceLayer = arcpy.mapping.ListLayers(mxd,"SectionInner",df)[0]     newupdateLayer = arcpy.mapping.ListLayers(mxd, "SectionInner2",df)[0]     arcpy.ApplySymbologyFromLayer_management(newupdateLayer,sourceLayer)     newupdateLayer.showLabels = True     for lyr in map.ListLayers(mxd):         if lyr.name == "SectionInner2":             lyr.showLabels = True             for lblclass in lyr.labelClasses:                 lblclass.expression = '"%s" & [SECTION] & "%s"' % ("<CLR red='0' green='0' blue='0'>""<FNT size='12'>""<BOL>", "</BOL>""</FNT>""</CLR>")                 lblclass.showClassLabels = True          arcpy.RefreshActiveView()     mxd.save()      Will appreciate any suggestions/fixes, anything other than upgrading to 10.1 world of python add-in wizard. No plans of going there any time soon. Thanks in advance, -Dee


title: Adding colours from .style file to multiple shapefiles via script?

text: I have added 70 fill colours in a .style file. For adding these colours to my shapefile i would have to manually go to properties/symbology/match to symbols in a style/ then browse to the location where my style file is saved, add it, click on Apply for the colours to change. I do not want to do this for each shapefile. Is there a script which when run would call this .style file and add its colours to the shapefiles in my workspace?


title: Problem running geotools quickstart application?

text: package org.geotools.tutorial.quickstart;          import java.io.File;          import org.geotools.data.FileDataStore;     import org.geotools.data.FileDataStoreFinder;     import org.geotools.data.simple.SimpleFeatureSource;     import org.geotools.map.FeatureLayer;     import org.geotools.map.Layer;     import org.geotools.map.MapContent;     import org.geotools.styling.SLD;     import org.geotools.styling.Style;     import org.geotools.swing.JMapFrame;     import org.geotools.swing.data.JFileDataStoreChooser;          /**      * Prompts the user for a shapefile and displays the contents on the screen in a map frame.      * <p>      * This is the GeoTools Quickstart application used in documentationa and tutorials. *      */     public class Quickstart {              /**          * GeoTools Quickstart demo application. Prompts the user for a shapefile and displays its          * contents on the screen in a map frame          */         public static void main(String[] args) throws Exception {             // display a data store file chooser dialog for shapefiles             File file = JFileDataStoreChooser.showOpenFile("shp", null);             if (file == null) {                 return;             }                  FileDataStore store = FileDataStoreFinder.getDataStore(file);             SimpleFeatureSource featureSource = store.getFeatureSource();                  // Create a map content and add our shapefile to it             MapContent map = new MapContent();             map.setTitle("Quickstart");                  Style style = SLD.createSimpleStyle(featureSource.getSchema());             Layer layer = new FeatureLayer(featureSource, style);             map.addLayer(layer);                  // Now display the map             JMapFrame.showMap(map);         }      }      > The last line "JMapFrame.showMap(map)"; required: MapContext found: > MapContent Then I changed               MapContent map = new MapContent();      To                MapContext map = new MapContext();      Then the application starts but when I select shape file > Exception in thread "main" java.lang.NoClassDefFoundError: > javax/media/jai/PropertySource Am I missing any library? I have installed both jai-1_1_3_lib-windows and jai_imageio               Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/jai/PropertySource         at java.lang.ClassLoader.defineClass1(Native Method)         at java.lang.ClassLoader.defineClass(ClassLoader.java:791)         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)         at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)         at java.net.URLClassLoader.access$100(URLClassLoader.java:71)         at java.net.URLClassLoader$1.run(URLClassLoader.java:361)         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)         at java.security.AccessController.doPrivileged(Native Method)         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)


title: Why am I getting an "Error while inserting populated row into Insert cursor" on saveEdits?

text: I've created a new feature layer where I am allowing users to add polygons. It has a few attributes, but I am not setting them on the graphic when I add it to the feature layer's graphics collection. When the Feature layer tries to save, it completes, firing the EndSaveEdits, but the EndEditEventArgs class is returning not successful, and the AddResultscolleciton returns: > ErrorCode: -2147216100 > > ErrorDescription: Error while inserting populated row into Insert Cursor > > GlobalID: null > > ObjectID: -1 > > Success: False I found the link below, saying it could be permissions, but my SDE admin says I have all the neccessary permissions. http://forums.arcgis.com/threads/31302-Insert-(add)-fails What the heck is going on with this feature layer? Thanks for your help!


title: Can a Fusion Tables Heatmap be used in Google Earth?

text: From the Fusion Tables web interface there's an option to view a heatmap, which draws on top of Google Maps. From the Fusion Tables map view there's an option to Export To KML, which allows the Fusion Table **points** to be displayed in Google Earth. Is there a way to add the **heatmap** to Google Earth? Thanks


title: How to distinguish SRTM from DTED using C#?

text: Does anyone know how to easily distinguish between SRTM vs DTED programmatically without opening file metadata header? both are .dt1 or .dt2 extensions.


title: What is geometry datatype?

text: What are the basic that one should know about geometry datatype? How is it computed ? Why do we need geometry data type? Edit: I wanted to know why there is a different datatype called geometry. Is geometry some basic data type plus location information or more! How to understand the data in this column? ![Geometry](http://i.stack.imgur.com/kCokK.png) From MSDN: The planar spatial data type, geometry, is implemented as a common language runtime (CLR) data type in SQL Server. This type represents data in a Euclidean (flat) coordinate system.


title: What Methods are out there for Dynamic Location Referencing?

text: I'm looking for (industry) standards and implementations to solve the problem of dynamic location referencing (communication of location between systems which have dissimilar maps). I would like to communicate information from one system using a map from vendor A to another system using a map from vendor B. It's not possible to exchange the maps. The only thing I've been able to find were:   * OpenLR™ by TomTom which is open source (but doesn't seem to have an active community), and   * AGORA-C a non-free ISO standard Do you know any other standards/methods to approach this problem? What's your experience with them?


title: Where can I find map data for Northern Territory State, Australia?

text: Could you please say where I can find the layers for Australia? I need basic layers like buildings,roads and others in shape format apart from the cloudmade.


title: Extract a record by name in pyshp?

text: I would like to extract a named subset of the text records from a shapefile using Python/pyshp. Is there a clean/efficient way to do this? Ideally I'd like to use dictionary-like access such as:               import shapefile     sf = shapefile.Reader("MyFile.shp")     data = sf.record['desired_record_name']      But of course this doesn't work. So far my solution is the brute force approach of looping over all entries:               import shapefile     sf = shapefile.Reader("MyFile.shp")     for r in sf.iterRecords():         if r[0]=='desired_record_name':             data = r             break      But this leaves a lot to be desired, especially for large/many files. Note: Although I like the simplicity of pyshp, I am not tied to it, so other free & open-source solutions using python are also of interest.


title: Can the Reporting Tool in ArcMap connect to Auxiliary data, like Excel tables?

text: Is it possible in ArcMap 10, using the reporting tool, to connect a report to non-spatial data, like from Excel or Access tables?


title: Identify with Layer Toggling

text: I have spent some time reading the numerous threads about setting the identify task to work with layer toggling and I seem to have it working properly except for one small issue. The identify task will continue to work even though all of the layers are turned off. The Pop-Up dialogue will show "searching" for some time, until the JavaScript times out. The more problematic issue is that the task will lock up a SOC process until it times out as well, which is much longer than the JavaScript time out. This gives the user the ability to use the identify task again, repeating the process above, and locking up another SOC process. Since 2 SOC processes are the default this means that the service is useless until one of them times out. Click below to view an example of this behavior. This is hitting the ArcGIS.com sample server so you will have to take my word on the "hung" SOC processes. http://geoville.org/viewers/identifytoggle/ My question is two fold. 1: Could this be a bug? 2: Any ideas on how to keep the identify task from executing when there are no layers visible? Thanks for your help. I have also posted this question in the Esri forums here. http://forums.arcgis.com/threads/35860-Identify-with-Layer- Toggling?p=120915#post120915


title: Using clip tool in qgis - contours to exact map area

text: I am using QGIS. I am trying to clip contours and water vector layers to the exact size of my map (polygon layer). Sometimes it works; sometimes the program crashes before completion (at the same point each time); and sometimes it runs but doesn't clip the exact area. How can I prevent this from happening? Thanks


title: Problem accessing WFS 1.1.0 with Mapinfo

text: I am new to all kinds of GIS software. Due to my project I need to open WFS site which needs a WFS standard 1.1.0. I tried to do it with MapInfo Professional 11.5, but it wont open it. I found a solution from the internet which told me to put ?request=getCapabilities&version=1.1.0 in the end of my WFS URL, but it gives me an error " Unable to get capabilities from the server " Do I have to download any add-ons to MapInfo 11.5? Or can anybody suggest me some other programs to get this link to work? Best Regards, Jarmo.


title: Are there any NTS index maps showing the most recent update?

text: For the Canadian National Topographic System, are there any index maps available that do not only show map numbers throughout the country, but also the most recently available update for each map? As a bonus, is there any publicly available list showing the plan for updates for the next several years, for NTS maps? I could not find either on the NTS website.


title: Do I need to run regression in each samples separately?

text: I'd like to do smooth NDVI image by regression analysis; response of time series NDVI image to Julian date to represent the seasonal changes in NDVI as a function of Julian day. The time series NDVI image has 26 bands (8-day images during April to October) and 12618/4144 of col/row. I have chosen 30 point samples in each land cover (30 x 5 LC=150) from all band of time series NDVI image using stratified random sampling method. I need to discuss my further steps with you all. My question is: Do I need to run the regression for each sample point (150 samples) and calculate regression equation extracted from step, 1 in each point sample (one by one) again to reproduce predicted NDVI image? Is there any method to simplify these processes to save time? Thank you very much


title: Setting the extent in cartodb to the sublayer bounds

text: How do you set the extent of a sublayer to fit all of the points? I've been trying to use this bounds function, but it doesn't work:               sql.getBounds('select * from table').done(function(bounds) {         map.fitBounds(bounds);     });


title: ArcMap 10.2 crashing when opening .mxd files

text: One of my coworkers emailed me about some issues with opening .mxd files in ArcMap 10.2, and through further questioning she revealed it actually started when she updated to 10.1 and has continued after her update to 10.2. Apparently when certain mxd files are opened (I'm guessing ones that were created before her upgrade to 10.1) in ArcMap it crashes with an error (fig. 1). If MXD doctor is run on the files they then work fine, I have attached the Diagnostic Report(fig.2).I thought maybe if they are just older 9.xx documents this could be the culprit but I read that those mxds should still open but will just be saved as 10.x map docs. Any idea looking at the errors what the problem may be? ![Fig.1](http://i.stack.imgur.com/arC3C.jpg) ![Fig.2](http://i.stack.imgur.com/7ZSQw.jpg)


title: Apply r.neighbours or Neighbourhood analysis (LecoS plugin for QGIS) to 3000 rasters

text: I need to apply r.neighbours or Neighbourhood analysis (QGIS plugin LecoS (or equivalent) to 3000 rasters and define a neighbourhood of 5 x 5 and calculate the mean. I suppose I need to create a script with a loop that goes through the raster files and applies the same analysis settings. Unfortunately I only know how to program in R. So I'm asking if anyone can show me how to create a script that does this. I use QGIS and I would prefer to do this using the QGIS Processing Framework. But GRASS GIS or SAGA GIS are also OK for me. Thanks in advance * * * EDIT: This how I did it on Ubuntu 12.04. Thanks @Curlew. I created GRASS Location/Mapstet and batch imported the 3000 rasters using "Common formats import (r.in.gdal)" to the mapset (I recommend deactivating the option "add to layer tree"). I used one of the rasters for setting the region (g.region). Then I opened R, set the workspace to the folder where the rasters are stored and run this:               library(raster)     library(spgrass6)     initGRASS(gisBase = "/usr/lib/grass64", home = tempdir(), gisDbase = "/path/to/gis/data/directory", location = "Location", mapset = "Mapset", override = TRUE) #Initate the previously created Location/Mapset          ls <- lapply(list.files(".","*.tif"),FUN=raster) # Import all raster to the list "ls"          for(i in seq_along(ls)){     execGRASS("r.neighbors", input=names(ls[[i]]),size=5,output="teste",flags=c("overwrite"))     execGRASS("r.out.gdal", input="teste",output=paste(paste("/path/to/output/folder",sep="",names(ls[[i]])),sep="",".tif"))     }      This solves my problem, but I'm still curious about how the equivalent Python code for QGIS Processing looks like.


title: Evaluating the geocode precision of US addresses

text: I am evaluating various services that take an address in the United States as an input and returns latitude and longitude of the address. Is there a way I can evaluate which service returns the most accurate coordinates? For example: Input: 350 Fifth Avenue New York, NY 10118 Output: Service a: 40.74838, -73.98468 Service b: 40.7483, -73.9853 Is there a way to evaluate which service returned a LAT/LONG closest to the rooftop of the address without manually looking at each set of coordinates on a map?


title: Mapwindow and XTools error: XSI is an undeclared namespace

text: I have tried MapWindow and XTools and have gotten this same error both times when trying to import a KML file into Shapefile format. Does anyone know how I can eliminate this error message? "There was an error opening the KML file 'xsi' is an undeclared namespace. Line 3, position 34."


title: FME - Filter Parameter choices to only projected coordinate systems

text: I have an FME workspace in which the user sets several parameters before running. One of the parameters is a Coordinate System. ![enter image description here](http://i.stack.imgur.com/3lBdD.png) I would like the user to choose only Projected Coordinate Systems as the rest of the workbench is dependent on it. I want this to happen before running the workbench. Kind of like a validation. I was thinking a Python Startup Script to only make the projected coordinate systems available. But I'm unsure how to do that. I'm comfortable with a Python solution if that's the only way.


title: ArcGIS Javascript How to filter TOC

text: ![enter image description here](http://i.stack.imgur.com/KRthF.png)![enter image description here](http://i.stack.imgur.com/mpLPQ.png)I am very new to ArcGIS Javascript and have been reading some samples from the API. So pardon my ignorance and I hope I am asking the right question. I am using ArcGIS JavaScript 3.5 API and agsjs.dijit.TOC control to display several layers in a map. I am trying to do the following: Add a textbox, Type a layer name to filter and the expected result is only the filter layers should show up in TOC and the filtered layers in a map. Does this make sense? Like I said, I am using the TOC widget. After looking around and reading a bit, I have been able to get a filtered array which has the list of filtered layers. But how do I update/filter the TOC contents with this? Or am I on the wrong route? var filteredArray = array.filter(this.map.getLayer(this.map.layerIds1).layerInfos, function (item) {                           return item.name.indexOf("Text entered for filter") != -1;             });      I am trying to learn so any help is greatly appreciated!


title: How to set default style of layer using rest api in Geoserver

text: Hello friend,          I want to change the default style of the layer in Geo server using the REST API.For this i      get this code            curl -v -u admin:geoserver -XPUT -H "Content-type: text/xml"       -d <layer><defaultStyle><name>polygon</name></defaultStyle></layer>"       http://mindcrewgis.com/geoserver/rest/layers/pymble:pymble_water          when  run this command  it is working fine form me.     But when i convert this command in PHP then it is not working for me     My PHP code for above curl command is           My code is          <?php              $url="http://mindcrewgis.com/geoserver/rest/layers/pymble:pymble_water";         $contentType = 'text/xml';         $ch = curl_init();         curl_setopt($ch, CURLOPT_URL, $url);         curl_setopt($ch, CURLOPT_USERPWD, "myusername:mypassword");                $data="<layer>                 <defaultStyle>                 <name>polygon</name>                 </defaultStyle>                 </layer>";          curl_setopt($ch, CURLOPT_PUT, true);          curl_setopt($ch, CURLOPT_HTTPHEADER,                      array("Content-Type: $contentType",                     'Content-Length: '.strlen($data))                 );             curl_setopt($ch, CURLOPT_POSTFIELDS, $data);                 curl_setopt($ch, CURLOPT_HEADER, false);             curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                  $rslt = curl_exec($ch);                 $info = curl_getinfo($ch);          ?>           But this code is not working for me . There is something wrong in execute curl using PHP.     Please help me where i am wrong .


title: What values are needed for a SimpleMarkerSymbol?

text: My graphicGemetry object contains X and Y values (-9212442.86532579,4421916.145327024) but my image isn't appearing. I suspect there are other data values I need in order to plot my point but I do not know what they are. Here is what I have and no errors are being reported:               cppr.App.map.graphics.clear();     var symbol = new esri.symbol.SimpleMarkerSymbol(     esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE,      18, // symbol size     new esri.symbol.SimpleLineSymbol(         esri.symbol.SimpleLineSymbol.STYLE_SOLID,            new dojo.Color([0,0,0]),         1),         new dojo.Color([255,255,0,0.80])     );       cppr.App.map.graphics.add(new esri.Graphic(graphicGeometry, symbol));      I should also add that I've used this code above when I queried the map service. What I'm doing now is querying a MSSQL Database to pull back the name. the database also contains the x & y coordindates so I thought I'd be able to reuse the same code as shown above but apparently there is something missing.


title: Open Source True Ortho Software

text: My work does true ortho rectification. We are looking to transition into a more open source company. One of the processes we are looking to "open source" is true ortho. Does anyone know of a software package (open source) that can perform true orthorectification. Ideally, it would be a complete package, but it could be a series of libraries, tools, plugins, etc. Thanks... Reclarification: A true ortho is similar, but different to a regular ortho. With regular orthos you will have building lean. A true ortho is a process to remove the lean, and "stand-up" the buildings. The following is an explanation: http://www.esri.com/news/arcuser/1001/standup.html Because of this, I do not believe this is a duplicated question.


title: osmconvert gives back complains about disc space

text: experts fairly new to osm - i tried to run the following code               ./osmconvert baden-wuerttemberg-latest.osm.pbf --all-to-nodes -o=baden-wuerttembergrestaurants.o5m     ./osmfilter baden-wuerttembergrestaurants.o5m --keep="amenity=restaurant" -o=baden-wuerttembergrestaurants_2.o5m     ./osmconvert baden-wuerttembergrestaurants_2.o5m --csv="@id @lon @lat restaurant:name addr:street addr:housenumber addr:city website email"      --csv-headline -o=badenwuerttembergrestaurant_2.csv      the terminal gave back the following results - see the complain not enough space               martin@linux-70ce:~> cd osmosis/     martin@linux-70ce:~/osmosis> ./osmconvert baden-wuerttemberg-latest.osm.pbf --all-to-nodes -o=baden-wuerttembergrestaurants.o5m     osmconvert Error: not enough space. Increase --max-objects=     martin@linux-70ce:~/osmosis> ./osmfilter baden-wuerttembergrestaurants.o5m --keep="amenity=restaurant" -o=baden-wuerttembergrestaurants_2.o5m     osmfilter Warning: unexpected end of input file: baden-wuerttembergrestaurants.o5m     martin@linux-70ce:~/osmosis> ./osmconvert baden-wuerttembergrestaurants_2.o5m --csv="@id @lon @lat restaurant:name addr:street addr:housenumber addr:city website email" --csv-headline -o=badenwuerttembergrestaurant_2.csv     martin@linux-70ce:~/osmosis> cd..     martin@linux-70ce:~> mv *.osm.pbf ~/osmosis      well what can i do - how to limit the request to get results....


title: gpx conversion tools in qgis keeps asking for GPSBabel

text: I want to perform a simple task: show the waypoints of a GPX "track" as dots, not as a set of connected lines in QGIS ( _Conversion -> Waypoints from a track_ ). I use files, not any particular USB connected device. Just GPX standard files. QGIS keeps asking for a "GPSBabel" module. Did I miss something? The same data is imported as a "track" without problem. ( I'm using the version 1.8 of qgis )


title: PostGIS integer loop

text: PostGIS is very new to me, and I'm having difficulty performing an operation that probably isn't too difficult. I have vector layers each filled with the outline of a landmass through time. I want to query the distance between these landmasses for every matching timestep. I can do this manually:               select a.gid from_gid, b.gid to_gid, st_shortestline(a.geom,b.geom), st_distance(a.geom,b.geom) as distance     from     (select * from gavdos     where year=3) as a,     (select * from crete     where year=3) as b;      The 'year' value ranges in integers from 0 to 21. It would be convenient to do this query using a FOR loop. I am however highly unsuccessful in doing so, the pgAdmin III SQL thing already presents an error when I say `DECLARE i integer;`, thus before I am even ready to try and create a loop. My question is if someone could give an example how I can (1) set-up the loop and (2) how to get the full output (as I suppose I need to update a table at every step in the loop..). Thanks in advance! :-)


title: unable to insert newline and spaces in textelement in java

text: i am working in arcgis desktop with eclipse in java. i have created a textsymbol and added it to a textelement which i need to add on another layer(the model is a 3Dglobe and not a map). i am able to add the textelement but it is ignoring all the lines and even spaces. the spaces and newline are properly printed in mapbean.as per this link circlecallout but it is not working when i add it to a 3d layer. eg. for `string s="try \n harder"` the output in textelement is `tryharder` below is the code                          TextSymbol textSymbol = new TextSymbol();                customCircleCallout.setColor(color);                textSymbol.setBackgroundByRef(customCircleCallout);                textSymbol.setColor(color);                textSymbol.setFont(font);                textSymbol.setSize(20);                     TextElement textElement = new TextElement();                textElement.setScaleText(true);                textElement.setSymbol(textSymbol);                textElement.setText(s);                               IElement e=new Text3DElement();                e= (IElement)textElement;                         e.setGeometry(point);      i need output in multiple lines and i can't even get the string separated by spaces in textelement.


title: Why does QgsSpatialIndex::nearestNeighbor(point, 1) sometimes return 2 lines?

text: I'm trying to get the closest line to a point using pyQgis in a plugin. The active code file is this: http://pastebin.com/TDzmsKVM When I request the closest line (only 1) > nearestIds = > self.spIndex.nearestNeighbor(self.feat2.geometry().centroid().asPoint(),1) I sometime get a list with two values and the first one is not the closest one but as far as I can see the second one is. Why is this? Do QgsSpatialIndex use only bouningboxes for lines? How do I get the real closest line always not only most of the time?


title: Join non-spatial CSV to spatial data in QGIS

text: I have a csv which has postcode data in a field, but it is non-spatial e.g. no Easting and Northing. I have a shapefile with postcode in a field and some additional data. I want to join the csv with the shapefile based on attributes (postcode fields). I know I can do this in ESRI ArcMap, can I achieve the same thing in Quantum GIS? Thanks in advance for any assistance.


title: ArcReader 10.1 trouble (loading and printing is taking very long ime)

text: We've run into printing problems in ArcReader 10.1. Our trouble is with a particular floodplain feature class located in an SDE database. It simply takes forever to load! Then, when printing, it takes at least 10 minutes. Does anybody else have this issue/know a solution? Thanks


title: How to add custom icon in Arc Map 10.1?

text: I have created cell_tower icon in .emf format and inserted in Arc Map 10.1. I want to apply this icon as symbol to point layer. I am trying but I guess I am doing something wrong. Tried following things: 1.Going though following links/articles : Creating new styles , Adding custom north arrow 2.Created new style (with the help of customize tool) but unable to add icon as EMF file. 3.Searching on Google. Any help will be great !!! Thanks in advance : ) Software : ArcGIS for Desktop 10.1 Screenshot : ![screenshot](http://i.stack.imgur.com/tAwmv.png)


title: Implementation of a tiled map service

text: I have been looking for solutions on the Internet for the last two days without finding answers. Currently, I have a Java web application that displays a map using OpenLayers. The problem is that the map is static, which means that it is entirely build from our images depending on the area we want to display, causing some memory trouble. We would like to do that dynamically (i.e. send a request to load an image correspondinf to the part of the map we want to display). I have read many things about Tile Map Service, Web Map Tiling Service, Web Map Server, TileCache, etc... I just don't understand it exactly works. It seems that WMTS seems to be a good choice because of it simplicity and speed. My questions are, how do I put all this together and what should I use ? What is the architecture I need to set on server side (using OpenLayers on client side if possible) ? Thank you in advance.


title: Dynamic Text in ArcMap 10.0 and arcpy - getting user name in specific format

text: I need to put in a specific text into a text element. The initials of the user who built the map. With arcpy I am trying to set the text element with dynamic text. If I put               <dyn type="user"/>       in the user text element it gives me, correctly, the user's user name. I want to use the user name in a python dictionary to put the users initials instead. dictUserElmt = { "jperez" : "JP" } Using arcpy to read the text of my text element, textElement.text, returns (again correctly)               u'<dyn type="user"/>'.        How do I get the actual output of the dynamic text "jperez" so I can use my dictionary to have the text element set to "JP". I'm sure my wording is confusing because I am confused on how to approach. Thanks.


title: Adding WMS Service for Silverlight Viewer

text: Is there a way to add a WMS image service in basemap gallery?


title: OpenLayers Google v3 and other layers drift apart

text: I'm stuck. My code works with OSM, but I need it to work with Google as well. The problem is simply that Google v3 and my other layers are not playing well together at all. They don't zoom together. My problem is specifically with OL 2.13 and 2.12, and it didn't start happening till about a month ago. In the case of Google satellite, the layer doesn't zoom at all unless I pan the map. In the case of the others (hybrid, terrain, roads), they zoom, but the google layer and the other layers on the map zoom up to half a second apart from each other, and the layer "drifts" between zoom levels somewhat. It shows up markedly off by a few hundred feet and gets worse as I zoom in or out from the initial zoom level. (It appears to be correct at the initial zoom level). The code that reproduces this is simple and derived directly from the WMS and Google v3 examples, but they appear not to work together well. Vector layers have the same behavior:               $(function() {         var in_options = {             internalProjection: new OpenLayers.Projection('EPSG:900913'),             externalProjection: new OpenLayers.Projection("EPSG:4326")         };              var wkt = new OpenLayers.Format.WKT(in_options);         var feature = wkt.read("POLYGON ((-78.9950752916525687 35.5198238058974169, -78.9950752916525687 36.0750238562958074, -78.2565296570171398 36.0750238562958074, -78.2565296570171398 35.5198238058974169, -78.9950752916525687 35.5198238058974169))");         var bounds = feature.geometry.getBounds();              var wms = new OpenLayers.Layer.WMS('Zoning', "/ga_resources/wms/", {                 styles: "styles/new-style",            layers: "catalog/states/nc/counties/wake/zoning",            transparent: true         });              var map = new OpenLayers.Map({ div:'map', projection: new                         OpenLayers.Projection("EPSG:900913")         });              var layers = [           new OpenLayers.Layer.Google("Google Physical", {type: google.maps.MapTypeId.TERRAIN}),           new OpenLayers.Layer.Google("Google Streets",{numZoomLevels: 20}),           new OpenLayers.Layer.Google("Google Hybrid",{type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20}),           new OpenLayers.Layer.Google("Google Satellite",{type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}),           wms        ];             map.addLayers(layers);        map.addControl(new OpenLayers.Control.LayerSwitcher());        map.zoomToExtent(bounds);     });


title: While looping with arcpy: ERROR 010240: Could not save raster dataset

text: Hi I am very new to python coding and have been struggling with this for a while I cannot see the reason for this error! Any help will be greatly appreciated. Here is the code that is causing this error:               import arcpy     import numpy as np     import math     from arcpy.sa import *          # Get the input arguements          # Input DEM     input_raster = arcpy.GetParameterAsText(0)          # Output      output_raster = arcpy.GetParameterAsText(1)          # Input Discharge     mean_discharge = float(arcpy.GetParameterAsText(2))          # Input number of timesteps     input_timestep = int(arcpy.GetParameterAsText(3))          #Other stuff to put outside while loop          # The below text takes the input raster and calculates the bottom left corner     extent_xmin_result = arcpy.GetRasterProperties_management(input_raster, "LEFT")     extent_xmin = float(extent_xmin_result.getOutput(0))     extent_ymin_result = arcpy.GetRasterProperties_management(input_raster, "BOTTOM")     extent_ymin = float(extent_ymin_result.getOutput(0))          # Turns the corner into a point     bottom_left_corner = arcpy.Point(extent_xmin, extent_ymin)          arcpy.overwriteOutput = True          arcpy.env.workspace = r"C:\SedMod\SedMod\Workspace.gdb"     arcpy.env.scratchWorkspace = r"C:\SedMod\SedMod\Workspace.gdb"          actual_timestep = 0      while actual_timestep <= input_timestep: # Slope calculation               # Set local variables     out_measurement = "PERCENT_RISE"           # Check out the ArcGIS Spatial Analyst extension license     arcpy.CheckOutExtension("Spatial")          #Execute Slope     out_slope = Slope(input_raster, out_measurement)          # Convert to gradient     slope_percentage = out_slope / 100          #Save slope     save_location = r"C:/SedMod/SedMod/Workspace.gdb/test" + str(actual_timestep)     slope_percentage.save(save_location)          #Execute Flow Direction          output_flowdirection = FlowDirection(input_raster)          #Execute Drainage Area          # Method for describing the raster and then using the cellsize to determine the Drainage factor for calculating Drainage area     desc_raster = arcpy.Describe(input_raster)     raster_cell_width = desc_raster.MeanCellWidth # Cell width     raster_cell_height = desc_raster.MeanCellHeight # Cell height     spatial_reference = desc_raster.spatialReference # Spatial reference     multi_factor = (raster_cell_height / 1000) * (raster_cell_width / 1000)          # Run the flow direction     output_flowaccumulation = FlowAccumulation(output_flowdirection)     output_drainage_area = output_flowaccumulation * multi_factor          #Execute Discharge Calculation          mean_discharge_float = float(mean_discharge)          #Calculating the discharge based on the average taken from the Avon catchment to bath (1605km2) and a mean flow of 20.762 m3/s giving a discharge per km2 of 0.01294 m3/s     discharge_raster = output_drainage_area * mean_discharge_float          #Execute StreamPower          # Set variables for calculating stream power         density_of_water = 1000     acceleration_gravity = 9.81          # Stream power calculation = stream power, g is the density of water (1000 kg/m3), g is acceleration due to gravity (9.8 m/s2), discharge (m3/s) and channel slope.     unit_width_stream_power = (density_of_water * acceleration_gravity * discharge_raster * slope_percentage) / raster_cell_width          #Execute calculating Sediment Transport                  # Set variables for calculating dimensionless stream power         pw = 1000 # Density of water     ps = 2650 # Density of sediment     g = 9.81 # Acceleration due to gravity      Di = 0.01 # Sediment size          # Dimensionless unit width stream power     dimensionless_stream_power = unit_width_stream_power / ((16186.5) * math.sqrt((1.65 * 9.81 * (Di * Di *Di ))))          # Additional variables to calculating sediment transport     timestep_hour = 3600          # Calculates dimensionless sediment transport            dimensionless_sediment_transport = Con(dimensionless_stream_power < 0.25, ((dimensionless_stream_power ** 6) * 100), (0.2 * (dimensionless_stream_power ** 1.5)))          # Calculates bed transport rate     bed_material_transport = dimensionless_sediment_transport * ((16186.5) * math.sqrt((1.65 * 9.81 * (Di * Di *Di ))))                      # Calculates it for the cell size in kg per second             bed_material_transport_kg = (bed_material_transport * raster_cell_width)  / 9.81          # Converts it into volume m3     bed_material_transport_volume = (bed_material_transport_kg / 2650) * timestep_hour                    # Convert the sediment transport and the flow direction rasters into Numpy arrays     sediment_transport_np = arcpy.RasterToNumPyArray(bed_material_transport_volume, '#', '#', '#', -9999)     flow_direction_np = arcpy.RasterToNumPyArray(output_flowdirection, '#', '#', '#', -9999)          [rows,cols] = flow_direction_np.shape     elevation_gain = np.zeros((rows,cols), np.float)     elevation_gain_32 = np.zeros((rows,cols), np.float)     elevation_gain_64 = np.zeros((rows,cols), np.float)     elevation_gain_128 = np.zeros((rows,cols), np.float)     elevation_gain_16 = np.zeros((rows,cols), np.float)     elevation_gain_1 = np.zeros((rows,cols), np.float)     elevation_gain_2 = np.zeros((rows,cols), np.float)     elevation_gain_4 = np.zeros((rows,cols), np.float)     elevation_gain_8 = np.zeros((rows,cols), np.float)          # Main body for calculating elevation change                  # Attempt 4          # Move the sediment transport in the direction for 32 direction             for [i, j], flow in np.ndenumerate(flow_direction_np):         try:             if flow == 32:                 elevation_gain_32[i - 1, j - 1]  = sediment_transport_np[i, j]         except IndexError:                 elevation_gain_32[i - 1, j - 1] = 0          # Move the sediment transport in the direction for 64 direction     for [i, j], flow in np.ndenumerate(flow_direction_np):         try:             if flow == 64:                 elevation_gain_64[i - 1, j]  = sediment_transport_np[i, j]         except IndexError:             elevation_gain_64[i, j] = 0          # Move the sediment transport in the direction for 128 direction                       for [i, j], flow in np.ndenumerate(flow_direction_np):         try:             if flow == 128:                 elevation_gain_128[i - 1, j + 1]  = sediment_transport_np[i, j]         except IndexError:             elevation_gain_128[i, j] = 0                          # Move the sediment transport in the direction for 16 direction     for [i, j], flow in np.ndenumerate(flow_direction_np):         try:             if flow == 16:                 elevation_gain_16[i, j - 1]  = sediment_transport_np[i, j]         except IndexError:             elevation_gain_16[i, j] = 0          # Move the sediment transport in the direction for 1 direction     for [i, j], flow in np.ndenumerate(flow_direction_np):         try:             if flow == 1:                 elevation_gain_1[i, j + 1]  = sediment_transport_np[i, j]         except IndexError:             elevation_gain_1[i, j] = 0          # Move the sediment transport in the direction for 2 direction     for [i, j], flow in np.ndenumerate(flow_direction_np):         try:             if flow == 2:                 elevation_gain_2[i + 1, j + 1]  = sediment_transport_np[i, j]         except IndexError:             elevation_gain_2[i, j] = 0          # Move the sediment transport in the direction for 4 direction     for [i, j], flow in np.ndenumerate(flow_direction_np):         try:             if flow == 4:                 elevation_gain_4[i + 1, j]  = sediment_transport_np[i, j]         except IndexError:             elevation_gain_4[i, j] = 0          # Move the sediment transport in the direction for 8 direction     for [i, j], flow in np.ndenumerate(flow_direction_np):         try:             if flow == 8:                 elevation_gain_8[i + 1, j - 1]  = sediment_transport_np[i, j]         except IndexError:             elevation_gain_8[i, j - 1] = 0                                             # Covert numpy arrays back into ArcGIS raster format as I do not know how to successfully add together multidimensional numpy arrays                       elevation_gain_32_ras = arcpy.NumPyArrayToRaster(elevation_gain_32, bottom_left_corner, raster_cell_width, raster_cell_height, -9999)     elevation_gain_64_ras = arcpy.NumPyArrayToRaster(elevation_gain_64, bottom_left_corner, raster_cell_width, raster_cell_height, -9999)     elevation_gain_128_ras = arcpy.NumPyArrayToRaster(elevation_gain_128, bottom_left_corner, raster_cell_width, raster_cell_height, -9999)     elevation_gain_16_ras = arcpy.NumPyArrayToRaster(elevation_gain_16, bottom_left_corner, raster_cell_width, raster_cell_height, -9999)     elevation_gain_1_ras = arcpy.NumPyArrayToRaster(elevation_gain_1, bottom_left_corner, raster_cell_width, raster_cell_height, -9999)     elevation_gain_2_ras = arcpy.NumPyArrayToRaster(elevation_gain_2, bottom_left_corner, raster_cell_width, raster_cell_height, -9999)     elevation_gain_4_ras = arcpy.NumPyArrayToRaster(elevation_gain_4, bottom_left_corner, raster_cell_width, raster_cell_height, -9999)     elevation_gain_8_ras = arcpy.NumPyArrayToRaster(elevation_gain_8, bottom_left_corner, raster_cell_width, raster_cell_height, -9999)          # Calculate  volume in raster for whole catchment             volume_in = elevation_gain_32_ras + elevation_gain_64_ras + elevation_gain_128_ras + elevation_gain_16_ras + elevation_gain_1_ras + elevation_gain_2_ras + elevation_gain_4_ras + elevation_gain_8_ras          #State what volume out is and the elevation                     net_volume = volume_in - bed_material_transport_volume          elevation_change = net_volume / (raster_cell_width * raster_cell_height)          new_elevation = input_raster + elevation_change          actual_timestep = actual_timestep + 1          new_elevation.save(output_raster)         The error I am getting is:               Traceback (most recent call last):       File "C:\SedMod\SedMod\Slope1.py", line 47, in <module>         out_slope = Slope(input_raster, out_measurement, )       File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 5523, in Slope         z_factor)       File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Utils.py", line 47, in swapper         result = wrapper(*args, **kwargs)       File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 5518, in wrapper         z_factor)       File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 498, in <lambda>         return lambda *args: val(*gp_fixargs(args, True))     RuntimeError: ERROR 010240: Could not save raster dataset to C:\SedMod\SedMod\Workspace.gdb\numpy_ras6 with output format FGDBR.          Failed to execute (SedModv1).


title: How to calculate the area of the convex hull of a points layer

text: I have a shapefile in QGIS that I have created by importing a CSV of points, using Points2One to convert to a shapefile and then importing the shape. I am now trying to calculate the are of the shape but when trying to use the field calculator I can't figure out how to get the area? Can anyone help? ![Area](http://cl.ly/image/1I2a3x3K2932/Screen%20Shot%202013-06-17%20at%2017.58.07.png)


title: ArcSDE - How to edit mosaic dataset

text: I have a mosaic dataset (Raster) in an SDE database. As expected, when I click start editing, ArcMap says that I have to do "Register as Versioned" before, but I can't have a mosaic dataset in a Feature Dataset. Can I?? Can I register this mosaic dataset as registered in another way? Normally, when a mosaic dataset is in an File geodatabase, you can start an edit session and edits the Boundary and the Footprint. I just want to do the same operation but with my mosaic dataset located in an ArcSDE server. Is this possible? If yes, how? Thanks! Please note: If it can be useful, I use direct connections to my SDE database.


title: How to append a vector layer using Qgis and Python?

text: I am working on scripting some data processing using Qgis and Python, but I'm running across issues that I need to debug. Since my data is really large, and run-times can be lengthy, I would like to be able to write out results periodically and then append to those results so I don't have to re-run my scripts. I'm outputting a polygon shape file, and I am using the following python code currently to work with the shp file:               poly_provider = poly_layer.dataProvider()          fields = { 0 : QgsField("STAT_NO", QVariant.String) }          writer = QgsVectorFileWriter("/localstore/data/shps/contrib_area.shp", "CP1250", fields, poly_provider.geometryType(), poly_layer.crs(), "ESRI Shapefile")          if writer.hasError() != QgsVectorFileWriter.NoError:       print "Error when creating shapefile: ", writer.hasError()          #processing...          def collect_geoms(geometries):       if len(geometries) > 0:         union_geoms = geometries[0]         for geometry in geometries:           union_geoms = union_geoms.combine(geometry)              fet = QgsFeature()         fet.setGeometry(union_geoms)         fet.addAttribute(0, QVariant( point_feat_dict[point] ))         writer.addFeature(fet)      The `collect_geoms()` function is then called in a loop, and when I'm done, I use `del writer` and I get the shape file written to the disk. Is there a way that I can write the shape file out incrementally and append new polygons to it? So for instance I can run 10 iterations of the loop, write the shape file, and then run the next ten without overwriting the first set?


title: OpenGeo SDK modify the getfeatureinfo popup

text: I would like to modify the opengeo sdk gxp.FeatureEditPopup. I want to construct a clickable hyperlink, I would like to add a new field to the popup that would be "http://someurl.com/" followed by a field from my data: "http://someurl.com/someDataField". Any ideas would be appreciated. Ben


title: Wrapdateline support in Openlayers for Bing baselayers

text: I have setup the Bing map as the base layer. I want to have a continuous horizontal panning, so I have added the **wrapDateline** option in Openlayer for **OpenLayers.Layer.Bing** map type. However, afer the wrapdateline parameter is added, the default zoom level of base layer is less than before. And also I can't go to the worldview. Is there a full support of wrapdateline for Bing maps in Openlayers, while there is no info about the dateline in OL documentation: OL Bing layers Doc ? Does anybody have the similar issue? Thanks ![Baselayer with wrapdateline option\(left\) and without wrapdateline option \(right\)](http://i.stack.imgur.com/SmYWf.jpg)


title: How to transfer multi attributes in to features?

text: i have 2 feature classes, i want to transfer all attributes by one click to another attribute feature class, i have used Spatial Adjustment tools, but the challenge with me is to, how to transfer all attributes, the whole once,it is spend many times if did transfer one feature to one feature, also,i tried to copy attribute and paste it but not allows me to copy all attributes, so any one have any big idea how to solve this problem. thank you.


title: Points to paths

text: I have a set of lat/long points which represent positions along a set of paths (the points are generated by satellite collars on several animals that we are tracking), and I want to link the points with lines, by sorting the points by date/time and grouping them by animal ID. The plugin Points to Paths, available at the old repository has the very handy feature of being able to split a big dump file by animal ID and create a path for each animal, which the newer plugin Points2One does not.   Unfortunately I get an error message saying that PointsToPaths is no longer supported and is not compatible with my version (1.9.0) of QGIS. It is sad to see such a good plugin disappear. Can anyone suggest a fix or an alternative? My data are in PostgreSQL with PostGIS. I assume that there is probably a clever but complicated solution using PostGIS, but in the spirit of laziness I am hoping that I am just missing some really simple ready-made solution. Thanks!


title: GIS Related Information Governance

text: I often work on mapping sensitive patient level data. Whilst I feel I have a good grasp of many of the governance issues around this (ie when to use binning and k-anonymity techniques) but I'd like to improve my knowledge on this. Here is a good example of why this is of importance: Spatial confidentiality and GIS: re-engineering mortality locations from published maps about Hurricane Katrina Does anyone have any good rules of thumb they employ when mapping sensitive data? Are there any good resources out there which cover different methods of protecting confidentiality or provide guidance on the matter?


title: Geonode's geoserver failing (generating 404's)

text: I'm working on a Geonode installation, and some days ago, it stopped working correctly. After restarting geoserver, it only would show 404 pages (on myhost.com/geoserver) > HTTP ERROR: 404 > > NOT_FOUND RequestURI=/geoserver/ > > Powered by jetty:// It's geonode's geoserver, which will use maven to download and build geoserver every time (don't ask me why, this is how it functioned for a while). I do want to clean the system with these dirty methods, but since geonode probably changed its geoserver, i don't really have a choice. This is the output when I run `start.sh` http://pastebin.com/YDVNZBBM I hope you guys can help me further, I'll keep an eye on this post and respond when needed. \-- edit:1 Added entire output of start.sh


title: How do you convert from GPS data in WGS84 to a GIS built in NAD27 in ArcGIS?

text: I have GPS data that has been recorded in Datum WGS84. The client has a GIS built in Datum NAD27. Having looked into the conversions online I would like to know how to do this rigorously with minimum loss of accuracy. Ordinarily I would build a GIS in WGS84 that uses GPS data and project it to the desired UTM (16N in this case). I know I can transform in ArcGIS 10 but is this rigorous enough?


title: Decimal places in Style Labels QGIS

text: When I create a style for a map, and use a Graduated set of categories, the associated labels have four decimal places – all zeros. I can change each one individually – but there are 10 categories and this map will be updated on a weekly basis and I’m looking for an easier way. I know that in the Labelling function, I can change the number of decimal places. But that is the labelling for the items on the map. I’m looking for the labels that will be displayed in the legend.


title: How to create many parallel lines in ArcGIS?

text: I need to create many parallel lines. Is there a tool in ArcGIS where you input the distance between the parallels and the number of them? Thank you.


title: Postgis 1.4 - Obtain closest point of point over polylines layer (without st_ClosestPoint)

text: I´ve got a polylines layer (pipes) and a points layer (valves) and In Postgis 1.4 I would like to obtain the closest points but exactly on the closest polyline. In other words, i need to locate each valve over the closest point on a pipe but taking into account that there is not only one polyline but many and that i am using postgis 1.4 and St_ClosestPoint() that could help to solve this problem doesn't still exist on my postgis version. ![ClosestPoint](http://i.stack.imgur.com/QtT5J.png) If theres a way to add the St_ClosestPoint() function to my Postgis 1.4 could also help but i think i need to create a new function for this. Thanks in advance.


title: How to generate a DEM from isolines and spot heights?

text: I have two shape files containing height information of a certain area and I need to create a raster DEM with GRASS using them.   * file 1 consists of height information in contours (isolines)   * file 2 consists of height information with spot heights What would be the best technique to generate raster DEM with these two types of data? Do i need to generate some spot heights from contours and then integerate with existing spot heights for DEM generation or any other method?


title: How to extract coordinates & elevations of boundary cells of a DEM

text: I am using a 50mx50m grid irregular shaped DEM file.I have to work on the boundary conditions. How do i extract the cell locations ( in x,y coordinate ) along the boundary edge and consequently find the elevation of the respective boundary cells. I am using ArcGIS 9.3 for my work. Thanks in advance.


title: How can I multiply each band of multiband image by separate scalars?

text: I have an image with 5 bands.   I need to multiply each band of this image by different scalars one time   (I'm lazy to do it one by one) and then get multiband image as a output. For example (band1*1.1) (band*1.2) (band3*1.25) etc.   Then output return to an image with 5 bands. How can I multiple each band of multiband image by separate scalars at the same time? Thank you all


title: Trilateration Math Check

text: I'm trying to crate an indoor trilateration program working off of N BLE objects. Where I have any number of beacons in a room and my ipad can track its location within them to a sub meter degree of accuracy (I hope). I asked this question before to check over my original Trilateration program. The only comment I got took me to this paper Right now I'm trying to implement their iterative trilateration math in my code. Their formula is a follows (I am really sorry, I don't know how to put up the proper math formula): > Reference points = Xi, Yi > > distance = di > > Trivial initial estimate = Xe, Ye > > Error in estimated distance = |fi | = di − Math.SquareRoot ((xi − xe )^2 + > (yi − ye )^2) Next they apply a delta to the initial estimate of Xe and Ye as follows: > Xe = Xe + 0.05 Delta x > > Ye = Ye + 0.05 Delta y With this new Delta, they then modified the original fi equation to look like this: > |fi | = di − Math.SquareRoot ((xi − xe )^2 + (yi − ye )^2) / di Now, reading all that I've written my code as follows:               public GameObject refPoint1, refPoint2;     public float d = 0.0f;     public float f1 = 0.0f;     public float xe, ye = 0.0f;     public float multiplier = 0.05f;          // Use this for initialization     void Start () {          }          // Update is called once per frame     void Update ()      {         xe = xe + multiplier * Math.Abs(refPoint1.transform.position.x);         ye = ye + multiplier* Math.Abs(refPoint1.transform.position.y);         d = Vector3.Distance(refPoint1.transform.position, refPoint2.transform.position);         f1 = d - (Mathf.Sqrt((refPoint1.transform.position.x - xe) * (refPoint1.transform.position.x - xe)) +                               (refPoint1.transform.position.y - ye) * (refPoint1.transform.position.y - ye)) / d;          }      In my unity scene I have placed the above code onto each of my three spheres twice so that each sphere is able to reference the other two. When I run this, however, my `xe, ye and f1` just continue to grow and grow. I'm just wondering if I've done something wrong, maybe misinterpreted something I shouldn't have? Any insight on this would be gratefully received.


title: Legend not scaling with the map in Mapinfo

text: I have a problem with the legend designer, when I produce an A0 plot the legend does not scale up with the map.


title: Mercator projection: problem with latitude formula

text: I'm trying to get the position of a coordinate on this map (source Wikipedia): ![enter image description here](http://i.stack.imgur.com/EKR10.jpg) If I'm correct than the formula for the position of the latitude would be:                   R * ln(tan(pi/4 + latitude / 2))      But I can't get it to work. The map is 707 px wide so                   R = 707 / pi / 2      right? I tried filling in a latitude of 51° like this:                   707 / pi / 2 * ln(tan(pi / 4 + 51 / 2)) = 91      And if you go to 91 px above the equator then you're somewhere in Spain, which is too low. I was looking for the location of Belgium instead.


title: Predefined Coordinate Systems missing in QGIS 2

text: in QGis 1.8 were lots of predefined coordinate systems (national projections). Where have they all gone in qgis 2.0? I specifically need the Gauß-Krüger- Projections Zone 1 to 5. Is there any plugin to load those coordinate systems?


title: NEAR_3D function without the need for 3D Analyst, Arcpy

text: I am looking for a python script which would do similar as the ArcGIS 3D Analyst NEAR_3D function. Basically I would like to programatically in python find nearest points of one point feature class to another point feature class and calculate their delta X, Y, Z. Any help much appreciated! Thanks meryloo


title: Which GIS (with GUI) produces good-looking maps for a reasonable price?

text: I would like to produce some good looking wall maps. I have an excellent data set, but it seems that most GIS packages are geared towards data analysis etc. as opposed to producing an aesthetically pleasing map, especially when it comes to printing. What is the best solution for producing a good-looking map? I have tried Quantum GIS, but it refuses to print large maps thanks to a bug. I am looking for something A) with a half-decent GUI and B) that doesn't cost the Earth.


title: When using Extract Values to Points : ERROR 010240: could not save raster dataset

text: I'm using ArcGIS for Desktop, version 9.3. When using one of the spatial analyst tools named Extract Values to Points, I met ERROR 010240. The steps that can reproduce this are:   1\. I choose "spatial analyst tools->extraction->Extract Values to Points"   2\. I input files as following   ![enter image description here](http://i.stack.imgur.com/1yaME.jpg)   The error message is as following: > Executing: Model tb_f17_20130101_v4_n19h1.img > G:\ssmi\qixiangzhan\tb_f17_20130101_v4_n19h1.shp Start Time: Tue Mar 25 > 18:07:22 2014 Executing (Extract Values to Points): ExtractValuesToPoints > qxz tb_f17_20130101_v4_n19h1.img > G:\ssmi\qixiangzhan\tb_f17_20130101_v4_n19h1.shp NONE VALUE_ONLY Start Time: > Tue Mar 25 18:07:23 2014 ERROR 010240: Could not save raster dataset to > C:\Users\TC\AppData\Local\Temp\g_g_g142 with output format GRID. Failed to > execute (Extract Values to Points). End Time: Tue Mar 25 18:07:23 2014 > (Elapsed Time: 0.00 seconds) Failed to execute (Model). End Time: Tue Mar 25 > 18:07:23 2014 (Elapsed Time: 1.00 seconds)


title: Geocaching - XY coordinates

text: I was wondering what is the easiest way to get XY geocaching coordinates (by a particular Area of Interest (AOI)) data in a spread sheet format that I could covert to a GIS layer? On the Geocaching.com website you can search by different AOI, but I do not see a way to mass export XY coordinates.


title: Hyperlink tool use in ArcEngine

text: I'm having some difficulties using the hyperlink tool (ControlsMapHyperlinkTool) in ArcEngine. Does anyone have any experience with it? It looks like it behaves correctly except that every time a user clicks a hyperlinked feature it shows a message saying "Unable to launch hyperlink". I'm using a "script" hyperlink and it performs fine in ArcMap. It doesn't seem to be trying to execute the script on click. I checked the IHotlinkExpressionProperties object and the Expression property is set correctly. Any thoughts? Thanks!


title: Difference between a WMTS and a WMS?

text: What is the main difference between a > Web Map Tile Service (WMTS) and a > Web Map Service (WMS) When should you choose one over the other? What are the (dis)advantages by choosing one over the other? I have read the Wikipedia entries, thank you.


title: Advice on purchasing new scanner / plotter?

text: So I have been tasked with finding options to replace my GIS department's recently deceased HP Designjet 815mfp (all-in-one scanner/plotter/touch screen). It was used mostly to scan/print plats, and some older maps from archives too. We would like similar capabilities with a new solution; fast scan/printing, supports up to 42" media, easy to use. Affordable consumables like ink/printheads would be nice(one can dream). I have been doing research, but there is a bewildering amount of companies and products and minimal reviews. Budget under $20,000 US. Are you fellow GIS pros still using HP? They are so expensive, anyone using other companies, Canon, Epson, Contex? Would like to hear you recent purchases and experiences Thanks!


title: References to code IDW algorithm

text: Hi I'm new to interpolations. I'm looking for documentation to understand how inverse distance algorithm works and how to code it. My intention is to code IDW algorithm in JavaScript to see if it is feasible in performance meaning. Thanks !!!


title: How to add more than 200 codes to domain in geodatabase?

text: I want to add a domain in geodatabase as country code and country name (description) (more than 200 codes). What is the best way to do it? How can copy/write manually/python the list of coded domain into my geodatabase?


title: Are there versions for SmartStore warehouses? And how can I tell?

text: I have a SmartStore warehouse that I can't open with GeoMedia-Webmap. It might be that it was generated using a much earlier version of GeoMedia than my version of GeoMedia-Webmap, but I'm also contemplating that it is corrupt. Are there versions for GeoMedia/Intergraph SmartStore warehouses? If so, how can I tell what version one was built with/for?


title: How can I change more than one attibute at the same time?

text: I'm working in QGIS 2.0.1 Dufour. I started by cretaing a shape file form an AutoCad file. The problem is that in the AutoCad, my layers had symbols like: "~; ç; ^". As the QGIS does not support this symbols, my attibute table is really confusing, so I want to rewrite those attributes. What I mean is, in one column, I want to change more than one line. My problem is that I have more than 100 of each I want to rewrite. I thought it could be a way of chaging more than one at the same time. Is it possible? Thank you!


title: Importing openstreetmaps exported OSM to opengeo using osm2pgsql problems

text: i'm having some issues when i go to import osm using osm2pgsql. My layers are showing all the roads coming from a single point. See photo link. I have loaded the same OSM file into Qgis and everything looks fine. I could even import the OSM in qgis then save it again and upload that file i saved into opengeo and the map looks fine. I'm just trying to see if i can avoid pulling the OSM data into qgis. The command i use is `osm2pgsql -H localhost -U <user> -W -d osm sanfrancisco.osm`. any ideas? Thanks


title: How do you change the editing capabilities on a MapInfo .Tab file?

text: When I load a .Tab file into QGIS I am unable to make changes to it. The information on the MetaData Tab reads the following: "Editing Capabilities of this layer: Add Attributes, Fast Access to Features at ID" How can I change the Editing Capabilities so that I can edit the features with this .TAB file. Hope someone can help. Rob


title: How to efficiently (programmatically) determine whether two datasets have / don't have identical content?

text: Given:   * a geodatabase _A_ that contains 100 datasets named _a 1_ .. _a 100_   * a geodatabase _B_ that contains 100 datasets named _b 1_ .. _b 100_ I want to programmatically **(*)** determine for each dataset pair ( _a i_, _b i_) whether they have identical content. Since I am comparing 100 pairs, I need an efficient comparison method. Ideally, the whole comparison would take only a few seconds. > **(*)** **Note:** I mention the term "programmatical", not because I am > looking for code examples (though I'd gladly accept them), but in order to > emphasize that I am looking for a very speedy comparison method, which would > never be possible when comparing 100 dataset pairs manually. > > I am planning to implement this comparison method myself, so what I am > essentially looking for is an _algorithm_ , and not a ready-to-use tool > (unless perhaps when it's open-source). I am aware that I am likely asking the impossible, since this would require comparing the datasets' complete contents (perhaps with the tools in the _Data Management_ -> _Data Comparison_ toolset); or at least comparing dataset hashes / digests, but generating digests would _also_ require going through all of the datasets' data first. Therefore my best approach so far is the following:   1. Determine first which dataset pairs ( _a i_, _b i_) cannot _possibly_ have identical content.   2. Perform a full data comparison only for the remaining dataset pairs. **My questions:**   * Does ArcGIS happen to auto-compute some kind of dataset digest that I could query? If so, how?  (I am not aware of anything of that sort, so I expect the answer to be "no". Please prove me wrong.)   * What are some very efficient, reliable ways of determining whether two datasets cannot possibly have identical content? (I have so far considered comparing modification timestamps, though I don't know how reliable these are, and comparing the datasets' schemas. How reliable are timestamps in an ArcGIS geodatabase? Are there other dataset characteristics that could serve for this purpose?)


title: How to calculate (summarize) atribute values of each point included in certain polygons?

text: in ArcMap 10.0 I have one point shapefile (some adress layer with number of citizens) and one polygon shapefile (geomorphological segmentation). I need to add up citizens who live in certain area. I can do select by location of course, but how can I automatically count all citizens from atribute in selected features (point) and add it to the polygon shapefile atribute to each polygon. Without manualy sumarizing fields from selected feature (there are plenty of polygons). i would appreciate some hint on which tool should I use. Thank you for your time and help.


title: Editing tables using SQL in ArcMap

text: We've recently started working with ArcMap, having used MapInfo previously. I've created a shapefile in ArcCatalog and want to update some columns using SQL. In MapInfo I'd write the following command in the MapBasic window.               UPDATE Clearance SET GTID = "GT" & FID      I can't find where to do this in ArcMap - any pointers?


title: Can't read returned geojson

text: I've got a function that takes an Openlayers mouse click and puts the click location into a SQL statement which then gets passed to a JSP script which runs the SQL statement on the PostGIS database and returns geojson. I've grown bleary eyed googling for possible reasons why the line var features = geojson.read(e.responseText) always returns features as null. I'm interested in getting an attribute/property of one of the features in the returned geojson. What am I not understanding about reading the returned geojson?               function getWatershed(e) {         var geojson = new OpenLayers.Format.GeoJSON();         // Get the mercator coordinates from the viewport         var xy = map.getLonLatFromViewPortPx(e.xy);             // Find the watershed ID.             var sql  = "select st_asgeojson(the_geom), id, area_sqmi ";                 sql += "from medford.subshed2 ";                 sql += "where st_contains(the_geom,st_transform(st_setsrid(";                 sql += "st_makepoint(" + xy.lon + "," + xy.lat + ")";                 sql += ",900913),26918))";             OpenLayers.Request.GET({                 async: false,                 url: "./04-sql-to-json.jsp",                 params: {sql: sql},                 success: function(e){                     var features = geojson.read(e.responseText);                     if(features) {                         if(features.constructor != Array) {                             features = [features];                         }                     for(var i=0; i<features.length; ++i) {                         watid = features[0].attributes.id;                       }                     }                 }             });      The geojson returned from the server looks like this (the coordinates were abbreviated):               {"type":"FeatureCollection",     "features":[{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[251083.32142683025,4381268.9660757259,0],[251139.94862688333,4381204.021947667,0]]]]},     "properties":{"area_sqmi":"344.0191",                          "id":"PU2_3900_3750"     } }     ]}      What am I not understanding about reading the returned geojson? Why is features always null?


title: OpenLayers TMS limit zoom and extent

text: I have a custom map which I get from a mbtiles file with the bounds -13,25,49,60 and zoom from 4 to 10.The display div is dynamic, I mean that it depends on window size and the extent restriction works but still tries to load images around the map if the display div is bigger.   How can I limit the zooming out below 4? Here is my code:               var map;     var fromProjection = new OpenLayers.Projection("EPSG:4326");   // Transform from WGS 1984     var toProjection   = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection     var extent= new OpenLayers.Bounds(-13,25,49,60).transform( fromProjection, toProjection);     var mbTiles = new OpenLayers.Layer.TMS("base", "base.php", {         getURL: mbtilesURL,         type:'png',         transitionEffect: "resize",         isBaseLayer: true,          });     function mbtilesURL (bounds) {         var db = "img/map/base.mbtiles";         var res = this.map.getResolution();         var x = Math.round ((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));         var y = Math.round ((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));         var z = this.map.getZoom();         return this.url+"?db="+db+"&z="+z+"&x="+x+"&y="+((1 << z) - y - 1);     }     map = new OpenLayers.Map('map', {         projection: new OpenLayers.Projection("EPSG:900913"),         displayProjection: new OpenLayers.Projection("EPSG:4326"),         layers: [mbTiles],         restrictedExtent : extent,         numZoomLevels: 11,         controls: [             new OpenLayers.Control.Navigation({                 dragPanOptions: {                     enableKinetic: true                 }             }),         new OpenLayers.Control.PanZoom(),         new OpenLayers.Control.Attribution()         ]     });     var position = new OpenLayers.LonLat(9.4679,37.6831).transform( fromProjection, toProjection);     var zoom = 4;     map.setCenter(position, zoom );     map.zoomToMaxExtent();     var switcherControl = new OpenLayers.Control.LayerSwitcher();     map.addControl(switcherControl);     switcherControl.maximizeControl();      I made it work! Had to add :                  resolutions: [4891.969809,2445.984905,1222.992452,611.4962262,305.7481131,152.8740565]      and to add to z+4 to get to right zoom level. I used this site http://simonmercier.net/blog/?p=88 to get the right resolutions to use.


title: Run a large model by calling it in a python script?

text: I've created a rather large model containing a sub-model that calculates the volume of water basins(playas) in a relatively flat area of Texas. The volume is taken from one foot slices of each each basin up to the point of overflow. I would like to use it to batch-process several sets of the input parameters sequentially. There are 3 input parameters that are as follows: the map extent(XMin YMin XMax YMax) which the user sets around the basin to be processed; the name of a geodatabase to create(String variable); and the name of the basin itself(String) which is referenced within the geoprocessing tasks from an existing feature class. The model works great but I can only run it once. I would like to be able to use the input as follows:   1. Move the map view to the extent for the basin and and fill the grid for extent by using the drop down and selecting the "same as display option".   2. Enter the new name of the geodatabase to be created.    3. Enter the name of the Playa(basin).    4. Repeat for all playas that need to be run(Batch). The problem I run into is that the model will not run sequentially when using it in the batch window. I'm aware that this is a known limitation of the model builder environment and have had many suggestions that what I'm trying to do is better handled by a Python script. So....   * Is it possible to write a script that calls the model in which I could batch process from the script using an iterator or some other method to repeat it? If so, how?   * I would be okay with entering my parameters into an Excel sheet that could be read by the script. Is this possible? If so, how? Or, is this even necessary?   * Would I need to rewrite my model in script form for this to even be possible? Me: I have a small knowledge of python scripting, but am well versed in model builder. I have not done much geoprocessing in python. Mainly small scripts that calculate values and other pretty light tasks. I've included a picture of the model so you can get an idea of what I'm dealing with. I know that it won't really be readable. I can provide more in depth examples if needed. ![Model](http://i.stack.imgur.com/0S0qv.png)


title: ArcMap 10.1 layout view re-draws ever time I move label etc.

text: One of the annoy with ArcMap 10.1 is is the Layout View is whenever I move graphics, or labels within the Layout View ArcMap redraws it !!! how do I turn that off ? is there a solution or a work around to prevent from re-draw all over a million time ? Thanks


title: opengeo Error: Could not create tool plugin with ptype: gxp_queryform

text: I'm trying to develop the tutorial of opengeo-suite sdk, but when I try to add a queryform to my app, firebug throws this exception: > Error: Could not create tool plugin with ptype: gxp_queryform I've tryed to > perform a query form and i used this code   * @require plugins/QueryForm.js { ptype: "gxp_featuremanager", id: "states_manager", maxFeatures: 20 },{ ptype: "gxp_queryform", featureManager: "states_manager", outputConfig: { title: "Query", width: 320 }, actionTarget: ["featuregrid.bbar"], appendActions: false } How do I solve this?


title: SDE Connection raise exception

text: I am supporting a .NET code that is running on ArcGIS Server 10.1, and communicating with ArcSDE Application Server 9.3 There is part of the code that is doing long loop. And when it comes back to communicate to the database (to ArcSDE), it is raising this exception ORA-03113: end-of-file on communication channel It seems a timeout error. Anybody has any idea how to fix this?


title: Calculating angle between two points (according to reference point)?

text: I need to calculate the angles between two points on ArcGIS. I have ArcInfo License, too. I have 5 points on a diagram. One of them is my reference point. The other four creates angles between each other. I need to calculate each angle automatically. Because I have 7500 of these points. I'm also adding a picture of my points. I need to calculate the angles of point number 1-2, 2-3, 3-4, 4-1. ![enter image description here](http://i.stack.imgur.com/EGpkp.png)


title: Can I import a kmz file directly from ArcMap 10 to Garmin GPS?

text: I currently import a kmz file created in ArcMap 9 (via a very convoluted process using Google Earth) to my Garmin Oregon GPS. I do this so that I can view an aerial photo with town tax parcel map info and other specific features on my GPS. Due to a recent upgrade to Google Earth I can no longer use it on my (very old) computer. We plan to upgrade to ArcMap 10 in the not-too-distant future, and I'm wondering if this will solve my problem, or if I need to purchase a new computer. Does anyone know whether I'll be able to do this with ArcMap 10 and the Garmin Oregon GPS? Pointers to instructions would be much appreciated! More about why I do this, and how: I work for a land trust, and often need to find boundaries on individual parcels of land. I sometimes can find either a shape file for the parcels or find the parcel information on Google Earth, but not often, so I go into ArcMap and create a .jpg, then go into Google Earth and add the .jpg as an image overlay. I then find the coordinates of the corners of the .jpg in ArcMap, add these to Google Earth, then click on Save Place As to create a .kmz file which I can move over to my Garmin Oregon device. It's cumbersome but it works (or did, until Google Earth stopped working on my computer!).


title: Is it possible to auto-stretch text to width of rectangle?

text: I am using a rectangular text object to "fit" dynamic text in an area of my layout. (If it is too long for one line, it wraps to more.) Is there a way to have the (changing) text fit the width of the rectangle it is in? I know I can change the symbol properties and adjust the character spacing (for example), but there doesn't seem to be a way to tell it to automatically determine a spacing that fills the box. What I'm looking for is like using Maplex labeling on a polygon and setting the spread characters value to zero.


title: How can I import AutoCAD 3D solids into ArcGIS?

text: I have an AutoCAD drawing that contains contours and 3D solids. I am able to import the contours (which i don't need) but not the 3D solids (which I do need). I understand ArcGIS does not support AutoCAD 3D solids but is there a workaround workflow to do this? EDIT: It was pointed out that this type of file should be supported in version 9.3. I can confirm that ESRI Help for 10.1 states that polygon and multipatch solid and 3D face is supported "on paper" in version 10.1 as well. However in the dxf I have solids are ignored in ArcGIS (ArcScene or imported) but it can be opened in AutoCAD, DWG TrueView 2013, SketchUp 8. DWG TrueView 2013: ![enter image description here](http://i.stack.imgur.com/KyBQX.jpg) ArcScene 10.1: ![enter image description here](http://i.stack.imgur.com/aW6Bm.jpg)


title: Python code : Help with using Search Cursor and Messaging the Total Count of Items from Field in Layer that was Searched

text: My program works but it is not displaying a message of the total sheet count found in attribute table that the search cursor searched through. For Example: It goes through the mxd chosen by user finds the layer with the name Grid in it and then is supposed to count the rows in the field Sheet_ID. End result is to print a message of the count found. My code is below:               import arcpy, os, sys     from os import path as p     from arcpy import mapping as m          mxdList = arcpy.GetParameterAsText(0).split(';')               sheet_count = ()          for mapDoc in mxdList:         arcpy.AddMessage(mapDoc)         mxd = arcpy.mapping.MapDocument(mapDoc)         for lyr in m.ListLayers(mxd, "*, Grid"):             if lyr.description == "*, Grid":             max_list = []             rows = arcpy.SearchCursor(lyr)             for row in rows:                 max_list.append(row.Sheet_ID)             sheet_count = max(max_list)             arcpy.AddMessage('Sheet count: %s'%sheet_count)             print 'Sheet count: %s'%sheet_count         else:             arcpy.AddError('No Layers in %s match data source'%mapDoc)


title: Where can I find topology-related algorithms used in QGIS?

text: I have shapefile with polygons and I test topology - overlaps, duplicates and gaps. I tested it in QGIS and now I have to describe algorithms, which uses QGIS for this rules. I must write research algorithms. I finded just general description: http://docs.qgis.org/2.0/en/docs/gentle_gis_introduction/topology.html and http://qgis.org/en/docs/user_manual/plugins/plugins_topology_checker.html but I can´t find algorithms.


title: Labelling street address ranges

text: I have checked out http://resources.arcgis.com/en/help/main/10.2/index.html#//00s80000005p000000 But I have been getting stuck on step 3> Create a label expression for the left- and right-side addresses. The label expression for the To address range label class will be as follows: [Left_to_address_field] & "/" & [Right_to_address_field] The label expression for the From address range label class will be the following: [Left_from_address_field] & "/" & [Right_from_address_field] Any one can pooint out another way or better resource than the website I provided above?


title: JTS Polygon Coordinates Order *DOES MATTER* For Some Reason

text: I'm trying to create a polygon and calculate it's area using :                  final GeometryFactory gf = new GeometryFactory();          final ArrayList<Coordinate> points = new ArrayList<Coordinate>();         points.add(new Coordinate(0,0));         points.add(new Coordinate(1,1));         points.add(new Coordinate(0,1));         points.add(new Coordinate(1,0));         points.add(new Coordinate(0,0));               final Polygon polygon = gf.createPolygon(new LinearRing(new CoordinateArraySequence(points         .toArray(new Coordinate[points.size()])), gf), null);          System.out.println(polygon.getArea());      and the output is `area = 0` . When I tried to use the coordinates :               points.add(new Coordinate(0,0));     points.add(new Coordinate(0,1));     points.add(new Coordinate(1,1));     points.add(new Coordinate(1,0));     points.add(new Coordinate(0,0));      i.e - exactly the same coordinates, in a different order, the output is `area = 1`. I'd like to know how could I create a polygon such that it's area won't be dependent on the coordinates order.


title: How to access the rules of QgsRuleBasedRendererV2 using python?

text: I can't get access to the rules of rule-based renderer, python says there's no attribute "rootRule", though documentation says it should be (http://www.qgis.org/api/classQgsRuleBasedRendererV2.html)               >>> layer = qgis.utils.iface.activeLayer()     >>> renderer = layer.rendererV2()     >>> type(renderer)     <class 'qgis.core.QgsRuleBasedRendererV2'>     >>> renderer.rootRule()     Traceback (most recent call last):       File "<input>", line 1, in <module>     AttributeError: 'QgsRuleBasedRendererV2' object has no attribute 'rootRule'      Is it because there's no python binding for rootRule() method? Is there other way to access the rules of the renderer? I am using QGIS 1.8.0


title: turn osm2po vertex table restrictions column into turn cost for shooting star pgrouting?

text: i found this thread Does OSM2PO take into consideration turn restrictions? but im kind of new to sql and database so me, making my own query or sp to achieve the above suggestion by myself is kind of far from reality. can somebody help me please? thanks!


title: given sets of vehicle passing on each edge, how to get most used vehicle to avoid transition?

text: I have two tables: one, the resulting table from converting osm.xml via osm2po so I can use pgRouting, and another one that contains information on what edges each public vehicle passes through (|vehicle_code|edge_ids|). **Note:** one edge_id might contain many public vehicle codes. So after executing pgRouting shortest path query, I want to know which vehicles are the best to use to navigate the shortest path to avoid too many transitions. I'm kinda new to SQL; please help. Thanks!


title: How to select points within polygon constrained by field?

text: I've created a polygon from a raster dataset:               arcpy.RasterToPolygon_conversion(RasterInt, "C:/arc/poly_int.shp", "NO_SIMPLIFY", "Value")      The 'value' field has numbers 1-37, which map to the ID field in the output polygon shapefile feature class. Now I would like to select points that lay within certain polygons (e.g. delineated by ID). Using the `SelectLayerByLocation_management` tool only selects points inside all the polygons. How to a define a criteria? Alternative approach: How do I create multiple polygons from the main polygon, using the ID field? I'm looking for solutions in Python -- not necessarily using arcpy but I do have it.


title: Make a Ground Mask raster with the Greater Than tool (DEMs are generated from LiDAR)

text: I'm trying to see if I can replicate the Esri solar suitability site example from this article. I fail on the creation of the binary ground raster. I have made a Bare Earth raster from LiDAR ground points, and a surface raster from LiDAR first return points. The tool I use is **Greater Than** with first return as input raster 1, and ground raster as input raster 2. I expect a raster with value 1 where the input1 raster is greater than the input2 raster, and value 0 where it is not greater. However, this is the result after the two input rasters: ![Input1 - DSM \(first return\)](http://i.stack.imgur.com/8ANQG.jpg) ![Input2 - Raster of Ground points](http://i.stack.imgur.com/u98HT.jpg) ![Result of Greater Than tool](http://i.stack.imgur.com/GrYkv.jpg) The result should be a ground mask raster like this picture: ![enter image description here](http://i.stack.imgur.com/Kj3Ls.jpg) * * * Okay, I have the raster I want after doing raster calc + 5 for the DTM and then using a CON expression concerning the DTM and DSM in raster calc to get the ground points raster. Thanks for the Help!