title: qgis python plugin enabling other plugins

text: maybe it is a stupid question but i am new in qgis. I developed some python plugins and they work correctly, now what i would like to do is to install a "door" plugin that after asked username/password it install and enables (makeing appear on plugin toolbar) the other plugins. Some suggestions? thanks in advance


title: 3D visualisation with open source GIS software

text: I'm searching for QGIS (or other open source GIS software) tools that can analyse XYZ data. Also I'm interested to hear about if anyone have migrated to non commercial software regarding geological 3D analysis and thereby what is your experience - do's and don'ts? Thank you for sharing.


title: QGIS and SQL Server Spatial Tables Performance

text: I'm trying to get a SQL Server 2008 R2 spatial database up and running to streamline the production of maps using QGIS. Currently I just have a handful of spatial tables (a postcode level point table and a few polygon tables for various boundary levels). My initial plan was to use these to create views (primarily point in polygon counts based on UK postcodes) which I could then pull into QGIS to make the data processing side of map production a lot faster and less fiddly. Unfortunately my plan has been scuppered somewhat by the amount of time it takes just to connect to my SQL Server using the MSSQL layer tool. QGIS seems to process each table/view prior to allowing me to select any of them. Not only is this extremely slow, it also means that each time I add a new view or table to my database, the whole process is going to get slower and slower until it becomes unusable. Does anyone have any pointers on how I might be able to speed the QGIS-SQL Server connection process up? I am beginning to think that saving views is a bad idea and that I should maybe use 'select ... into...' scripts to generate tables and minimise the processing required. I'd be interested in peoples' views on this.


title: How can I decrease size of geodatabase "Nominatim"?

text: I downloaded Nominatim http://wiki.openstreetmap.org/wiki/Nominatim/Installation. The database size is more than 400 GB. The speed of geocoding is very slow. I want to increase it. For example, I need to geocode only to the level of the village or town. Can I remove some not usefull data from planet.osm.pbf or from geodatabase "Nominatim"? I do not need streets, suburbs, buildings, etc. The structure of geodatabase "Nominatim" is quite difficult, so I think that the best way is to change osm.pbf file. How can I remove data from geodatabase "Nominatim" or from osm.pbf file? Is this the right way?


title: ArcGIS macros question

text: How to call a UserForm appearance from a macros? (A click on a button on a panel calls a UserForm and then I work with commands that are in a userform) Solved: a stupid reason - macro and userform were saved in different projects


title: What format comes out when you export from OSM

text: I am trying to export this osm output (and then convert it into geojson). I click export and get a file called "map." What format is this file in?


title: Can *.ssf files from Trimble GPS be imported as features to display in ArcMap?

text: I have not come across *.ssf files before but I believe they are a Trimble GPS binary format. Someone has asked me if these files which he thinks have line/poly features can be imported for display in ArcMap 10.0. I am keen to know whether this is possible because my research so far seems to indicate that they are for correcting feature accuracy rather than containing features. Any advice on how to use these with ArcMap will be greatly appreciated.


title: How to determine if trees within forest gaps are clustered?

text: The attached dataset shows approximately 6000 saplings in approximately 50 variable sized forest gaps. I am interested in learning how these saplings are growing within their respective gaps (i.e. clustered, random, dispersed). As you know, a traditional approach would be to run Global Moran's I. However, aggregations of trees within aggregations of gaps seems to be an inappropriate use of Moran's I. I ran some test statistics with Moran's I using a threshold distance of 50 meters, which produced nonsensical results (i.e. p-value = 0.0000000...). The interaction among the gap aggregations are likely producing these results. I have considered creating a script to loop through individual canopy gaps and determine the clustering within each gap, although displaying these results to the public would be problematic. **What is the best approach to quantify clustering within clusters?** ![enter image description here](http://i.stack.imgur.com/I0p4C.jpg)


title: DXF to georeferenced SHP

text: I know how to set projection and georeference bounds of scanned TIFF file, by using `gdal`, but I don't know how to do the same for vector file. For example I georeferenced TIFF file by using this command: `gdal_translate -of GTiff -a_ullr x1 y1 x2 y2 -a_srs "7041.prj" input.tif output.tif` where 7041.prj is Gauss Kruger projection file. I used CorelDraw to do the tracing, and both raster and DXF output share same bounds - vector file has boundbox same as raster image used for tracing. I wanted they overlay automatically when loaded in GIS. For vector file, with `ogr2ogr` I can convert DXF to SHP and set projection, but I can't figure how to set georeference bounds as `ogr2ogr` doesn't accept `-a_ullr` argument, probably for some reason. So my question is can I somehow set bounds for resulting SHP file?


title: Is it possible to add a field to ArcGIS Map Service without feature access?

text: I have published a mapservice without feature access on a remote machine only with a file geodatabase (shapefile on the disk). Because of limits of authority to create a spatial database(don't have permission to create sqlserver express 2008 for build arcsde to enable feature access for this map service). However, I have to add a new field into the attribute table of this mapservice via the ArcServer Javascript API .Just like the operation on ArcGIS desktop ,as shown below: ![enter image description here](http://i.stack.imgur.com/rIvxo.png) Is this possible? Any hints to implement it? Thank you for your help.


title: Postgis shapfile and DBF loader 2.0 problem windows

text: I am trying to import a shapefile with polygons into Postgis (Windows 2008 server). If I import 100 polygons it works fine. If I try to import the full map of 8,100 polygons, about halfway I get an error window "Shape to PostGIS Converter has stopped working". Problem details (as shown in that window) are: > Problem signature: Problem Event Name: APPCRASH Application Name: shp2pgsql- > gui.exe Application Version: 1.0.0.0 Application Timestamp: 505c6e19 Fault > Module Name: libglib-2.0-0.dll Fault Module Version: 2.28.8.0 Fault Module > Timestamp: 4e253544   >  Exception Code: 40000015 Exception Offset: 0004c2d8 OS Version: > 6.1.7600.2.0.0.272.7 Locale ID: 1033 Additional Information 1: 4a99 > Additional Information 2: 4a99e4ac53bd5e60be05464c3d1a217e Additional > Information 3: 794a   >  Additional Information 4: 794abc993e1c90d5202dd7b66fde9bb9 Any suggestions as to what might be going wrong?


title: GIS for Local Police Department

text: I'm trying to recruit local police departments into a new GIS certificate that I am teaching in Florence South Carolina. None of the Police departments have any experience with GIS, but they are all interested in the technology. I'm making an image to advertise to them what they could learn. Question: what are the hot topics in GIS for Police? What should I include that would really catch their attention.


title: Extract the area of a DEM above where 60% of the region lies?

text: I have a DEM of a mountainous region. I'd like to extract the areas of the DEM above which 60% of the total DEM area lies. So, essentially I'd like to extract the areas representing upper portions of the mountains. I've heard of this referred to as the hypsometric line (H60 line), but haven't been able to locate any documentation on how to achieve it. My instinct is to somehow calculate the statistics of the DEM to tell me where the 60%-level is and then contour the DEM at this elevation. I can then clip the DEM by this contour and perform my calculations on the output DEM subsets. So, my question is, how do I determine this 60% level? Cheers.


title: Google Maps Decodepath change variable name

text: I have this code:                   var directionsService = new google.maps.DirectionsService();              var request = {           origin : start,                 destination : end,                 travelMode : google.maps.DirectionsTravelMode.DRIVING         };          directionsService.route(request, function(response, status) {         var coords;         if (status == google.maps.DirectionsStatus.OK) {             coords = google.maps.geometry.encoding.decodePath(response.routes[0].overview_polyline.points);             callback(coords);         }     });      Yesterday the decodePath brought coordinates whose name of variables was Ya and Za, today became hb and ib. Why?


title: Custom implementation of ArcGIS function

text: I would like to find out what it takes to create a custom implementation of an ArcGIS function. In particular, I would like to implement GeoAnalyst.ISurfaceOp2.Visibility() in order to get it to run faster. Right now, it is taking ~3 seconds per call to Visibility(). From my limited understanding, the bottleneck is the writing of temporary rasters to the file system. If this could be done in-memory, I suspect the processing time would decrease significantly. I am doing this in a .NET project, but solutions in any language are welcome.


title: Geokettle transformation for FileGDB to SHP

text: I want to transform FileGDB layer to Shapefile on Geokettle. Firstly i added OGR Input and than i added a Shapefile Output. And i entered parameters shown on the screenshot but i got errors for reading from FileGDB. What must i do for this transformation. ![enter image description here](http://i.stack.imgur.com/OnTE2.png)


title: gdal_retile: to tile or pyramid only

text: I'm having trouble understanding when to use the -pyramidOnly option in gdal_retile. If I am trying to tile 10 GeoTiffs, am I right in assuming that if the images contain overlays and or inner tiles that I only need to use the -pyramidOnly option? If so, how do the inner tiles relate to the images in the output directories if each directory represents a zoom level? If the images do not contain overlays or inner tiles, I assume I must leave the -pyramidOnly option out and retile all 10 images. If so, what does the output directory structure represent? More specifically, the images at the root level; I understand that the images in the directories labelled 1...n contain images of the specified tile size in increasing resolutions, but what about the images at the top level. I ask this because I am trying to understand how geoserver reads the resulting pyramid. When I create an ImagePyramid layer in geoserver, geoserver moves these images into a directory named "0".


title: Is there a layout view in Quantum GIS?

text: Is there a layout view in Quantum GIS (something similar to ArcGis layout view) ? Anyway I am looking for tutorial or some good practices how i can prepare a nice map to print in Quantum GIS.


title: How to identify and highlight invalid geometries?

text: I'm am trying to clean/edit shape files that were created by algorithm in Qgis. My problem is when I try to split some polygons,they have invalid geometry. Is a way to identify these error maybe in a different colour for me to fix them?


title: Geoserver WFS POST and format_options=PRJFILEFORMAT

text: I'm using geoserver (2.4.4) to provide users with shapefile downloads. Some of the software the shapefiles are going to be used in requires .prj-files that follows the "ESRI-standard". A bit of searching lead me to a Geoserver ticket (GEOS-4503), and by downloading esri.properties from there and placing it in my %GEOSERVER_DATA_DIR%/user_projections folder I can issue a GET request to:               http://localhost:8080/geoserver/bw/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=ns:layername&outputFormat=SHAPE-ZIP&format_options=PRJFILEFORMAT:ESRI      and i get back a zipfile with (amongst the other files) a .prj-file with the following:               GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]      This is fine, as my data is in EPSG:4326 and the string above is indeed the "ESRI-type" I want. However, i also need the user to filter their data, so I've figured that I need to use a filter, and thus POST an XML-file like this:               <wfs:GetFeature service="WFS" version="1.0.0"                       xmlns:wfs="http://www.opengis.net/wfs"                     xmlns:ogc="http://www.opengis.net/ogc"                     xmlns:gml="http://www.opengis.net/gml"                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"                     xsi:schemaLocation="http://www.opengis.net/wfs                     http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">                     <wfs:Query typeName="ns:layername" srsName="EPSG:4326">                                  <ogc:Filter>                      <PropertyIsEqualTo>                         <PropertyName>version</PropertyName>                         <Literal>56</Literal>                     </PropertyIsEqualTo>                 </ogc:Filter>                          </wfs:Query>                 </wfs:GetFeature>      to an url like:               http://localhost:8080/geoserver/bw/ows?outputFormat=SHAPE-ZIP&format_options=PRJFILEFORMAT:ESRI      I also get a zip-file with the data back, but this time the .prj file has this content:               GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["E     PSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST]     , AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4326"]]      And this is indeed the OGC-prj-format. Why? (In addition to setting format_options=PRJFILEFORMAT:ESRI I've also tried to check the "Use ESRI WKT format for SHAPE-ZIP generated .prj files" box in the WFS-page in the geoserver GUI). So, the question is thus: Why does the override of prj-file-format work on a GET but not on a POST? Is this a known bug, have I discovered a bug or am I doing something wrong? Any pointers, ideas or tricks for debugging this is appreciated!


title: query syntax to select every multiple of nn record (shapefile)

text: I have data like multiples of 40.   40   80   120   160   200   and so on. I would like to label every record that is a multiple of 100.   I have tried a couple of methods and cant get them to work either as a query in the label or as a select statement.   "STATION" = %00   RIGHT ("STATION", 2) = 00 ![enter image description here](http://i.stack.imgur.com/LFlMU.png) I get invalid sql statement.   Does anyone see what I am doing wrong? respectfully I did search and did not see any of the example questions you presented.   However it still does not answer my question.   Re-stated,   What am I doing wrong.


title: How to select all tenth in a field?

text: I want to select all tenth in a field! :( I know this way; "Km" = 10 or "Km" = 20 ... and so, but I am pretty sure theres other way. I am not SQL literate, but with your help in this forums I have managed to do some things, however the most basic are missing in different posts and I would like to find a place with basic (and medium) SQL expressions with practical examples to look for. I don´t usually post, but this could be of interest for some people outside. * * * Para los que hablan español, esto es una pregunta muy básica y hasta tonta como dice el titulo, pero quisiera un sitio para encontrar expresiones SQL que son básicas, y que quizás para los que no somos letrados en esas "ciencias" podriamos usar de referencia, recuerdo la ayuda de ESRI tenía unos ejemplos de expresiones muy útiles y ultimamente con el Xtools resolvía. Mi problema es sencillo: Seleccionar todas las decimas de un campo de Numero de Kilometros. Se hacerlo seleccionando uno por uno ("Km" = 10 or "Km" = 20, y asi) pero debe haber una forma más sencilla.... que pena preguntar algo tan básico pero tanta búsqueda en foros y demás, todos piensan que ya uno maneja estas cosas básicas. saludos!


title: getting the correct location data with user input

text: I have some code others have provided, which I modified in order to run a Python script in a toolbox in ArcMap which accepts user input for a starting point, distance, and angle to create a shapefile for a line. The script works OK except the starting point (origin_x, origin_y), which I am entering in decimal degrees, is always wrong when I place the shapefile in a map dataframe. How can I correct this code so that the math can work correctly to produce the right starting point location? It seems converting origin_x and origin_y into radians is the wrong way to go about it, but I'm not sure...               import arcpy     from arcpy import env     from math import radians, sin, cos, pi          #Set workspace     env.workspace = "G:\\Delapaix\\Geog_586_FinalProject\\line_connect"          origin_x   = arcpy.GetParameterAsText(0)     origin_y  = arcpy.GetParameterAsText(1)     distance  = arcpy.GetParameterAsText(2)     angle  = arcpy.GetParameterAsText(3)          # convert latitude and longitude to radians      origin_x = float(origin_x)/(180/pi)     origin_y = float(origin_y)/(180/pi)          # calculate offsets with light trig     (disp_x, disp_y) = (float(distance) * sin(radians(float(angle))), float(distance) *  cos(radians(float(angle))))     (end_x, end_y) = (float(origin_x) + disp_x, float(origin_y) + disp_y)          output = "offsetLine.shp"     arcpy.CreateFeatureclass_management("G:\\Delapaix\\Geog_586_FinalProject\\line_connect",output, "Polyline")     cur = arcpy.InsertCursor(output)     lineArray = arcpy.Array()          # start point     start = arcpy.Point()     (start.ID, start.X, start.Y) = (1, origin_x, origin_y)     lineArray.add(start)          # end point     end = arcpy.Point()     (end.ID, end.X, end.Y) = (2, end_x, end_y)     lineArray.add(end)          # write feature to the shapefile     feat = cur.newRow()     feat.shape = lineArray     cur.insertRow(feat)          # code for buffering the line and including features in buffer zone would go here          # yes, this shouldn't really be necessary     lineArray.removeAll()


title: How can I export a list of an mxd's content (layers names) into a table or a pdf?

text: I am using Arcgis 10.2. I have created a set of mxd from which I need a list of the layers and their characteristics (Name, sources, symbologie - maybe as in legend, if there is an Definiton Query, and other representational aspects). I would like this list to be in a table or a Report or something simple to read/understand. I need this in order to inform the colleagues what data they have to work, how and why in order to simplify the integration in the mxd templates. This seems like a Report Job but I couldn't figure out why it was not doing what I needed. This sounds such a Basic Task that there must be a tool somewhere? Have any of you seen some tools doing that type of export? I hope that made sense. Will definitely clarify as much as needed. Many thanks EDIT: See Alex' reply


title: Only show city district names in Google Maps Api

text: I only want to show city district names in my google maps api. I now have the visibility off of all the label names in the map, but I want to show city district names, which usually show up at a higher zoom level in the normal Google Maps. Maybe you can put the visibility off of label names to a certain zoom level and put them on after zoom level 11 for instance? Is something like this possible? If so, how? Thanks in advance!               var mapProp = {         center: new google.maps.LatLng(52.368465, 4.903921),         zoom: 11,         styles: [{             'featureType': 'all',             'elementType': 'labels',             'stylers': [{                 'visibility': 'off'             }]         }, {             'featureType': 'transit',             'elementType': 'labels',             'stylers': [{                 'visibility': 'off'             }]         }, {             'featureType': 'poi',             'elementType': 'labels',             'stylers': [{                 'visibility': 'off'             }]         }, {             'featureType': 'water',             'elementType': 'labels',             'stylers': [{                 'visibility': 'off'             }]         }, {             'featureType': 'road',             'elementType': 'labels.icon',             'stylers': [{                 'visibility': 'off'             }]         }, {             'stylers': [{                 'hue': '#00aaff'             }, {                 'saturation': -50             }, {                 'gamma': 1.15             }, {                 'lightness': 12             }]         }, {             'featureType': 'road',             'elementType': 'labels.text.fill',             'stylers': [{                 'visibility': 'on'             }, {                 'lightness': 24             }]         }, {             'featureType': 'road',             'elementType': 'geometry',             'stylers': [{                 'lightness': 85             }]         }],         streetViewControl: false,         panControl: false,         mapTypeControl: false,         mapTypeId: google.maps.MapTypeId.ROAD     };


title: Error Loading spatialite extension in .NET Project using System.Data.SQLite

text: I am trying to use Spatialite in a .NET application using the System.Data.SQLite provider. I have tried to load 'libspatialite-4.dll' but an error happens when I call function "conn.EnableExtensions(true);conn.LoadExtension("libspatialite-4.dll");" The specific error is "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." I am using sqlite-netFx40-setup-x64-2010-1.0.92.0,libspatialite-4.1.1, VS2010 SP1, .net Framework 4.0, Windows7 64bit,


title: zoom over vector in leaflet

text: I have created a map from geojson file of administrative boundaries (polygons layer). Similar to this example. When the mouse is over the polygon feature, the cursor changes from hand to finger. In the finger mode, map does not zoom on double click. In my case, at higher zoom, whole map is made of adjacent polygon features so the mouse is always in the finger mode. I need to be able to zoom in on double click.


title: Geoserver - generating tiles - bbox is incorrect

text: I am beginner in geoserver. I would like to generate tiles in geoserver. I have added the layer to geoserver. When i choose the option to 'Preview layer' i can see the layer with the correct bbox: ![enter image description here](http://i.stack.imgur.com/5eNcF.jpg) Then, i go to gwc, i choose the option 'seed this layer', and feel in this part as follows: Number of tasks to use: 01 Type of operation: Seed - Generate missing tiles Grid Set: EPSG:4326 Format: image / png Zoom start: 00 Zoom stop: 02   Bounding box: -4.601615515076983 39.8769407866263 -3.0527184873294764 41.16710732525929 And as a result i can see almost all of the tiles completely white and one tile with black point... ![enter image description here](http://i.stack.imgur.com/sj9XP.jpg) Why does it happens?


title: Grass v.rast.stats returning null values

text: I have a vector layer (polygon) and a raster layer. The raster layer holds values for height above bald earth in a field called "value". I'd like the vector layer to inherit either the mean or the mode values from raster cells falling within the boundaries of each polygon. I run this command in grass:               v.rast.stats nameofpolygon raster=nameofraster colprefix=height      The result is a polygon populated with all the fields you'd expect but containing all null values within these fields.   * I did receive a warning that some polygons are missing centroids at the beginning of the output.   * The raster and vector layers are within the same Grass Mapset and do occupy the same geographic space.   * I did set the region to contain both features prior to running v.rast.stats Thanks in advance for you help! (2011/05/10)UPDATED DETAILS: I created an entirely new GRASS Location & Mapset; Loaded both my raster and polygon features to the same Mapset; Ran v.centroids on the polygons; Ran g.region.raster; Calculated univariate statistics (v.rast.stats) from the raster based on the vector; Double checked that the raster does actually contain values, and it does in a field titled "value". The statistics are still returning NULL values. I've tried this through GRASS, GRASS-gui, and QGIS gui.


title: Is there a shortcut in GRASS for importing vector files?

text: Is there a keyboard or command shortcut in GRASS for importing vector files? If you know link where I can find maybe whole list of shortcuts for GRASS, that would be awesome. Thank you.


title: What is a pseudonode?

text: I have been asked to check for pseudonodes - none are allowed for streams but they are for roads. I can't figure out why so I assume I am not understanding what a pseudonode is. I thought it was a node with no reason to be there. I am using ArcGIS 10.0.


title: How to deactive Vector Selection In OpenLayers wms features

text: This is my sample code and work fine :), But I have a little problem, I'm using multiple layer (WMS), when I zooming the layer will be shown or hidden. In my example bellow when OpenLayers level zoom greater than 3 I'm showing layer2 and hidding layer1. And also I create a controll to active hightlight ability. this example code for                       control = new OpenLayers.Control.GetFeature({             protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer2),              box: true,              multipleKey: "shiftKey",              toggleKey: "ctrlKey"             });                  control.events.register("featureselected", this, function(e) {                   select.addFeatures([e.feature]);             });             control.events.register("featureunselected", this, function(e) {                   select.removeFeatures([e.feature]);              });                  map.addControl(control);             control.activate();      when OpenLayers level zoom less than 3 I'm showing back layer1 and hidding layer2. and I will deactive highlighting controll. and clearing all features selected. I have trouble to do it, and bellow example code :                   // Layer 1         layer1 = new OpenLayers.Layer.WMS(             "Map A", serverUrl,             {                 LAYERS: 'basic:layerA',                 STYLES: '',                 format: format             },             {                 isBaseLayer: true,                 visibility: true             }         );              // Layer2         layer2 = new OpenLayers.Layer.WMS(             "Map B", serverUrl,             {                 LAYERS: 'basic:layerB',                 STYLES: '',                 format: format,                 transparent: true,                 tiled: true,             },             {                 isBaseLayer: false,                 visibility: false,                 unsupportedBrowsers:[]             }         );              select = new OpenLayers.Layer.Vector("Selection", {styleMap:             new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])         });              map.addLayers([layer1,layer2,select]);          //Zoomend event          map.events.on({"zoomend": function (e) {                  console.log(this.getZoom());                   //I have trouble in here             if (this.getZoom() > 3) {                 layer2.setVisibility(true);                 layer1.setVisibility(false);                      control = new OpenLayers.Control.GetFeature({                 protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer2),                  box: true,                  multipleKey: "shiftKey",                  toggleKey: "ctrlKey"                 });                      control.events.register("featureselected", this, function(e) {                     select.addFeatures([e.feature]);                 });                 control.events.register("featureunselected", this, function(e) {                     select.removeFeatures([e.feature]);                 });                      map.addControl(control);                 control.activate();                  }             else{                 // In here, I will deactive controll above (hightligthing controll)                       layer2.setVisibility(false);                 layer1.setVisibility(true);             }         }         });      And should must I do ?


title: What is a good resource for CA crop production data?

text: To construct maps depicting crop yield throughout California, are there statewide datasets, or would I need to add data by county?


title: Calculating the time taken to complete the overlay display in map?

text: Currently, I am able to calculate the server response time by logging the difference of current date to initialize the map with the time when layers is added. But this gives me server response time. My POI is to calculate time taken when all WMS layers are loaded successfully(lets say render time) for certain bounding box.Is there any way I can find the render time using javascript after the addlayer event is successfully executed for all layers? Thanks


title: How to keep the same style of a OSM map converted to SHP file

text: I saved a OSM file as a Shapefile, this is fixing my previous question how to handle bad layers. My question is how to retain the original style from OSM plugin to SHP files, when I copy the style and try to paste it it says "Unknown renderer". I mean, is it possible keep the same look I have from OpenStreetMap in the new SHP file?


title: Auto-increment id when adding a feature to a PostGIS layer in QGIS

text: when I enter edit mode of a PostGIS layer in QGIS 1.8 and add a feature, is it possible to auto-increment the ID? I always have to look what last used ID was and manually enter a new one. I can't believe I'm the first one facing this problem. Thanks in advance. Conrad


title: Splitting a shapefile into many shapefiles with open source

text: I want to create a shapefile for each of the 72,000 census tracts in the United States that includes the census blocks in that tract using open source software. I will probably start with a state shapefile that includes all of the blocks for that state and merge it with a GDB file. This will give me a list of blocks that are in the census tract. But then I'm not sure how to split the state shapefile into smaller ones. How can I do this? Is there a way to automate this using open source software? If so, what tools should I use? I'm learning Quantum GIS.


title: Creating new feature type with Geoserver REST API work but return error code 500

text: I'm using Geoserver REST API to create a new PostGIS feature type in Geoserver doing a POST to an url following this pattern `http://localhost:8080/geoserver/rest/workspaces/my_ws/datastores/my_ds/featuretypes.json` and passing it data like this: `{'featureType': {'name':'my_featuretype_name'}}`. The post effectively create the feature type but is returning a 500 code error which mean: > Internal server error. According to the official doc the returned code is supposed to be 201. Looking in Geoserver log show me the following error: > INFO [org.geoserver] - Loaded feature type 'my_featuretype_name', enabled > > ERROR [geoserver.rest] - :Resource named 'my_featuretype_name' already > exists in store: 'my_ds' The table already exist in my database but is not published as a layer in Geoserver. What I want to do is to reproduce, with the REST API, the exact same action of clicking publish for an existing table in my database in the add new layer page of the Geoserver Web admin. Am I doing something wrong? Thanks a lot Etienne


title: Calculating Flow Direction and Delineating Basins from Projected vs. Unprojected DEM Data

text: This is somewhat of a theoretical question stemming from some discussions with colleagues on the topic of implications with delineating basins with projected (e.g., Albers Equal Area) vs. unprojected (NAD 83) data derived from a 10m DEM that's in NAD 83. Some have stated that it's not an issue as the values calculated from unprojected data simply get adjusted if you do decide to project. I'm not sure this is the case though, as there are inherent differences between data in a geographic coordinate system and projected data. I tried one example going through the routine starting with unprojected DEM data, then tested the same site with projected DEM data. Steps taken for both were done (all work done in ArcGIS 9.3.1) using 10m DEM data. One run was done using a DEM in NAD 83, and the second run was done by projecting the same DEM into USA_Contiguous_Albers_Equal_Area_Conic_USGS_version.   * derive flow direction using the geoprocessing FlowDirection_sa tool   * derive flow accumulation using the FlowDirection_sa tool   * snap the pour point using a 50 meter distance   * delineate the watershed using the Watershed_sa tool In comparing the two I could notice a visual difference between the display of the Flow Direction grids. NOTE: After more subsequent research I believe the striping effect is due to not using a CUBIC resampling but by mistakenly going with the default of NEAREST in the ArcGIS Project Raster tool. I don't believe this provides any sort of resolution to this debate though... ### Flow directions using unprojected DEM ![enter image description here](http://i.stack.imgur.com/2fIVC.png) ### Flow directions using projected DEM ![enter image description here](http://i.stack.imgur.com/jSnHI.png) I understand that visual comparison is not 100% scientific but can be a good starting point. Accordingly, there was a difference between the pour point with how it snapped for each run. And, there was a definite difference in the derived watersheds given how the snap pour point tool decided to snap based on the respective projected/unprojected datasets. The watershed shown in green is the watershed derived using the projected DEM and subsequent projected-derived elevation derivative data. The watershed shown in the purple outline is the watershed derived using the unprojected DEM data. ### The watershed ![enter image description here](http://i.stack.imgur.com/lYC0f.png) I've come across these two other GIS forum threads (links below) that discuss this issue in the old ESRI forums, but I'm still not clear as to how the Flow Direction tool works relative to projected vs. unprojected data (I understand the concept of hydrologic flow and flow direction though). If each cell still has the same elevation value in a projected DEM vs. an unprojected DEM (is this correct?), why is there a difference in a flow direction raster derived from projected data versus one derived from DEM data in NAD83? http://forums.esri.com/Thread.asp?c=93&f=995&t=292503 http://forums.esri.com/Thread.asp?c=93&f=995&t=290652 Also, would any differences theoretically be less of an issue if doing delineations in a higher Latitude such as, Shenandoah National Park in Virginia versus doing delineations in the state of Texas? I spoke with one cartography expert that thought that the east-west distortion you get as you move away from the equator could likely be an issue (like how in some maps Canada is extremely bloated and distorted), in that if you're more than 10 degrees of latitude away from the equator they thought projected data is the way to go if you're concerned with accuracy. One major unknown is the level of uncertainty with basins delineated using unprojected data that we're trying to get a handle on. There is a difference, but what is the magnitude? Thanks to anyone that can provide a straight-forward answer to this discussion, or just some helpful insight into this. ## Edit The main issue we're interested/concerned with is if there will be accuracy issues with the delineated watersheds as a result of starting the process using an unprojected DEM. So, if I'm understanding the reply, the delineated basins should be fine in terms of representing the drainage area for a pour point? It seems though if the flow directions are wrong that will result in some error in the final delineated watershed. This is a very interesting and really an important topic - I have yet to see a report or documentation stating it's OK to use UN-projected data for delineating watersheds. I have set through ESRI User Conference technical talks led by the lead developer engineer of the Spatial Analyst extension (which houses the Hydrology tools) where they said you should use an equal area projection (such as Albers equal area) as well. As well, there doesn't seem to be any authoritative "bible" standard for how to go about this - just seems that it's an almost acknowledged _de facto_ approach to project the data before calculating your elevation derivatives. Nowhere have I been able to find a concise and straightforward answer as to how this impacts flow direction calculation and subsequently the delineation of a watershed. And, if you end up working with watersheds delineated using unprojected DEM data and then you project those watersheds, isn't the inaccuracy still there (e.g., in terms of determining a watershed area or any other characteristics such as land cover proportions etc)? Furthermore, I'm assuming that projecting a flow direction raster that was derived from an unprojected DEM does not correct the errors either since the source data were unprojected.... thanks - appreciate any additional insight you can provide ## EDIT - 20110331 @whuber: thanks for this extensive discussion. We've been researching this issue more and actually have come across some references that suggest that it's actually better to _not_ project the DEM before getting flow dir., flow accum., and delineating. One email response from an anonymous source (but who is a pretty reputable person), when posed the question of 1.) project DEM 2.) produce derivatives OR 1.) produce derivatives 2.) project DEM said: > In a nutshell, it depends on the derivative. For continuous derivatives that > will be visualized, you should derive and then project—this reduces the risk > of tile boundary artifacts being enhanced or introduced (by the projection > algorithm) and then passed along to the derivative if you were to project > the DEM first. The exception to this is when you are also using distance or > area as the basis for your derivative calculation. This is of course > relative to how large the distances/areas are and how far you can acceptably > get away from the equator. So imagine that for derivatives like slope or > hillshade, which depend on the cellsize, there are consequences. These > derivatives will be most accurate at the equator, and the accuracy will > degrade significantly past 60 degrees north or south. In both cases, I am > assuming the DEM covers a very large area (wider than 1.5 UTM Zones) and a > traditional tile-based approach where the tiles are either arbitrary or > conform to existing standards like USGS Quad sheet boundaries. So saying the > implication is that much of this thinking predates mosaic datasets, which I > am less able to comment on. The main concern for me would be wanting to know > how well matched the DEM tiles are. If they are well matched (like NED) then > I expect things to work well, with derivatives being derived from tiles (as > functions applied to the mosaic dataset) and then these are displayed on the > fly. If they are not well matched, then garbage in, garbage out. Back to > your original question, I think if it is just watershed boundaries, it would > be possible to derive these without projecting because it’s not how much > curvature or slope that matters, just where it is and that it exists. They went on to say: > The reason I would stick to the un-projected methodology is that we are > using rasters which are in and of themselves a derivative of DEM (which we > typically don’t have, but think LiDAR point cloud). For rasters that cover > very large areas, like continents at relatively fine levels of resolution, > projecting to something like Albers will result in loss or introduction of > information, when the raster uses regular sized cells (like Esri’s rasters > do). That means tools like Flow Accumulation will produce results based on > partial or interpolated information. Basically all projection algorithms > applied to rasters will cause problems as soon as there is a expansion or > shrinkage of more than the distance of a pixel width (projections like > Albers can introduce error by introducing new pixels between two old ones). > Deriving from these means the potential for cumulative error is high. This seems to suggest the opposite - that projecting introduces more noise, unless you get above 60 degrees latitude. We've also come across some published sources that have suggested similar that unprojected is an acceptable approach for smaller watersheds (last 2 paragraphs of section 1.6) from Distributed Hydrologic Modeling for GIS (Vieux, 2004): http://www.springerlink.com/content/x877238532533g20/fulltext.pdf So, in the end, does it just boil down to a matter of 1.) where you're doing work on the earth's surface 2.) the scale you're working at, and 3.) whether the noise introduced by a projection that will better preserve attributes that affect the flow direction algorithm is less than the distortion introduced by unprojected data (the benefit increasing as you move towards the poles) to determine whether you should project to something like conformal, or if it doesn't matter? When you start digging into this topic it seems like the larger consensus is to project, but there are some that seem to say that's not a hard and fast rule.


title: PostGIS + pgRouting: Adding dummy links to a road network and performing routing analysis

text: I'm a beginner when it comes to postgis and pgrouting development. For a project I'm working on and a bit of the algorithm:   * I have a polygon layer that represents zones   * I have a line layer that represents roads based on classifications: Freeway, Arterial, and Collector, and Local   * I created a point layer of all the zone centroids   * I would like to create a table of n x "dummy link(s)". These links connect the centroid to the road layer based on the road classfication (above), the link is within the polygon, and based on nearest neighbour (nearest proper road classification segment to centroid).   * A dummy link has infinite capacity and has a cost of zero.   * These links should be added to their own table   * I would like to start the routing from the centroid layer.   * At each of the centroids, I would like to do a minimum spanning tree or Dijkstra to all other centroids of the network.   * The end goal would be a matrix of some sort.   * I'd like this operation to be somewhat fast, as I would have about 200 zones (400 once you consider two way traffic), with a road network of roughly 1,000,000 links. Road weights/costs will change as they are time of day dependent; therefore, there will be at least 24 iterations per zone.   * If possible, I'd like to limit most of my development to python as I'm comfortable with python and libgdal. **Question:**   1. Is this feasible using postgis + pgrouting, especially considering that I am not proficient at SQL?   2. Can you critique my model, suggest improvements, "gotchas", anything that would make my life a little bit easier?


title: Use Field Calculator to change "Status" field in Annotations

text: I am trying to turn off a lot of annotations at once by using Field Calculator to set status to _Unplaced_. Just typing `"Unplaced"` into the expression, I get this error: > The calculated value is invalid for the row with ObjectID = 408. For example > the calculated value may be too large for the field or you may be trying to > add a string to a number field. This row will not be updated. I understand that I'm trying to drop a string value into the field and it won't accept that. What data type/value should I be using instead?


title: Finding shortest path while avoiding polygon features

text: I'm developing an extension to ArcMap where I have a set of static, concave polygon features and I'm trying to find the shortest path between 2 points without crossing any of the polygons. Is there an algorithm to do this?


title: How to host ArcGIS 9.3, 10.0 & 10.1 licenses on same server?

text: We have 3 license servers for ESRI products.   1. **Server 1** : 10.1 License Server   2. **Server 2** : 10.0 License Server   3. **Server 3** : 9.3 License Server We are in the middle of a massive server migration/merge and would like to combine our license servers into one and store it on a single centrally- located machine. But we have some specific applications that require 9.3, a few that require 10.0, and our more common use-cases are migrating to 10.1 so we can't just upgrade the licenses. But keeping them on different servers won't work because we are losing some of our servers due to a reshuffle. So, with 9.3 Concurrent use licenses being utilized, can we store those alongside 10.0 and 10.1 licenses on the same server without losing them?


title: Generate a random 100x100 m bounding box in any projection in pure Python?

text: I'm given:   * Extend of WMS Layer   * SRS Now I want to, in standard 2.6 Python (no OGR or C lib dependencies), to generate a 100x100m random bounding box within that extent (assuming it is more than 100x100 itself). I'm allowed to make the following HTTP requests of the following type (caching the results for reuse):   * http://spatialreference.org/ref/epsg/$SRS/proj4 But since I basically don't understand the contents of such files (e.g. proj4 etc), I have no idea whether it's even helpful in my computation. To repeat what I want:   * A random 100x100m bounding box within the layer extend, with coordinates in the SRS The code could look like this, when calling:               random_bbox = random_bbox(extent=[minx,miny,maxx,maxy], srs='epsg:25832', width_meters=100, height_meters=100)      So, how to do this, given this information, in "pure" python? I'm of course willing to write a heap of code, so just need some fairly precise hints. Sorry if I missed some details, I'm making pancakes for my kids while writing this :-)


title: Why is GRASS not thinning a terraflow raster properly?

text: I want to convert a raster map encoding directional flows (the output of `r.terraflow`) to a vector map. I'm using `r.thin` to process the output. It terminates successfully with 0 pixels removed during the last iteration. Yet when I try to vectorise the result with `r.to.vect` and `feature=line`, I get the following error message:               Extracting lines...     ERROR: Raster map is not thinned properly.        Please run r.thin.      I have tried rerunning `r.thin` on the already thinned output, with the same result. I did not find anything in the documentation of either `r.thin` or `r.to.vect` to suggest what might be the problem here or how to fix it.


title: How to plot points on maps using ggplot2 and R?

text: Thanks for help me in GIS 101 Problem #1, now I have geocoded a few hospital in Connecticut using google map, I have able to visualize them in QGIS, now I am trying to do it in R.               ct <- readShapeSpatial("housect_37800_0000_2010_s100_census_1_shp/wgs84/housect_37800_0000_2010_s100_census_1_shp_wgs84.shp")          ct_mod <- fortify(ct,region="SLDLST10")     chart <- ggplot(data=ct_mod,aes(long,lat,group=group))     chart <- chart + scale_x_continuous(limits=c(-73.8,-71.7),breaks=seq(-74,-71,0.1))     chart <- chart + scale_y_continuous(limits=c(40.9,42.1),breaks=seq(40,43,0.1))     chart <- chart + geom_polygon(fill="grey80")     chart <- chart + geom_path(color="white")       chart1 <- chart + geom_point(data=hosp.list,aes(x=coord_x,y=coord_y))       chart2 <- chart + geom_point(aes(x=-72,y=41))      My `hosp.list` is a dataframe with hospital name, address, lat, long. Now I can show `chart` and `chart2`, but not `chart1`, because of the error `Error in eval(expr, envir, enclos) : object 'group' not found`, can anyone help? ### update 01 Thanks for celenius's comment, I tried the following instead:               chart1 <- chart + geom_point(aes(x=hosp.list[,"coord_x"],y=hosp.list[,"coord_y"]))        And this gives me an error below:               Error in data.frame(x = c(-72.4509975, -72.4509975, -92.059305, -73.16584,  :        arguments imply differing number of rows: 58, 133341      What I am trying to do is as below:   1. I plot the Connecticut 2010 Census State Legislative District as a layer   2. I created a dataframe containing several hospitals in Connecticut, geocoded their addresses into long and lat, and put the long/lat into the data frame also (i.e. the dataframe has 3 column)   3. I want to create a new layer on top of the "district layer", showing the hospitals by dots   4. the next step I will do somethings like: display name of each dot, highlight the region with hospitals, etc... which should by me future question poster here. Thanks again.


title: Looking for Mid-Holocene (~6000 BP) bioclim dataset

text: I am trying to obtain climate data for the Mid-Holocene (~6000 BP), preferably in the bioclim (19 bioclimatic variables) raster format. The worldclim.org website lists this dataset based on the CCSM and MIROC models, but does not provide any links to download the datasets. I have contacted the authors of the website and received no response. However, this dataset has been used in Chan et al. (2011) and the lead author on the paper only responds the they obtained the data from MVZ-GIS (UC Berkeley Museum of Vertebrate Zoology GIS). I cannot find the dataset there either. Can anybody direct me to a web source for this dataset or does anybody have these data and is willing to share it? I realize that the raw data is available on the PMIPII website, but I currently do not have the skills to programmatically process this dataset into the bioclim format. Chan et al. 2011. Integrating statistical genetic and geospatial methods brings new power to phylogeography. MPE 59 (2): 523-537 (http://www.sciencedirect.com/science/article/pii/S1055790311000480).


title: List counties in current extent - Data Driven Pages

text: Maybe I'm just not thinking clearly, but I can't figure this one out. I need to have a spot on my mapbook pages that says "Counties: " and is automatically filled with the counties in the extent of the current page. This was SIMPLE with DSMapBook, but I can't seem to replicate it in DataDrivenPages. Should I just do an intersect and append the new data in a column on my Townships table (Grid layer)?


title: Splitting hexagonal grid into segments, dissolve by location

text: I am a little bit frustrated because I want to do something I did 5 years ago and I can't figure out how to do it again. I am creating a turnover map of species communities using R and ArcGIS 9.3. As a summary, here are my main questions:   * How can I split hexagonal polylines into six lines?   * How can I dissolve identical lines into one line keeping the attributes from both? Here is the long story: I have an hexagonal grid as a polyline shapefile, in R I have calculated the Jaccard distance between each hexagon. The table looks like this:               hexid1 hexid2 jaccard     A      A      0     A      B      ab     A      C      ac     B      A      ba     B      B      0     B      C      bc     C      A      ca     C      B      cb     C      C      0      Each of the features in my shapefile has hexid as a field. I think what I want to achieve is in several parts:   1. Split my polylines into lines that keep the hexid, this should give me for each polyline two lines that are in top of each other but with different hexid   2. Somehow "dissolve" the lines that are geographically the same and obtain an attribute table similar to:              hexid1 hexid2           A      B           A      C           B      A                 B      C          C      A           C      B              3. Then for both the shapefile and my table I can create a field that concatenates both hexagones (hexid1_hexid2), that I can do it using R for the table and the "add field" function, plus the field calculator.   4. That field/column that I have just created would be used as the index to join the table to the shapefile For the task 1 I have tried ET GeoWizard but it is limited to 100 and each hexagon is not divided in 6 lines, but in 24, plus I have a limit of doing 100 hexagons each time, which I would be glad to avoid, if possible. I also don't know how to "dissolve" the split lines by distance, I guess the distance is 0, or I could use something like "falls entirely in" as they will be identical. Maybe I am asking for too much, but I am really frustrated because I cannot access my notebooks from 5 years ago (they are in another country...). Any help would be very much appreciated. I hope my request is valid... Thank you very much, Greta


title: Get DISTINCT nearest neighbors with indexed search

text: I'm using the indexed nearest neighbor search to return the closest points to a given starting location. My points also have attributes like color and shape, stored as strings. I want each query to only return the closest point for each type of point. So if my points were, in order of distance to my starting location:   * red square    * red square    * red circle   * orange square    * blue circle  The query for the four closest points would return:   * the closest red square   * red circle   * orange square   * blue circle I tried using `DISTINCT` but it's asking to give the `DISTINCT` column in the `ORDER BY` and I haven't had success in doing that.


title: avg distance within 2 geometry tables

text: I have 2 geometry tables: "f" with only one data and "s" with 100 data I want to find the avg distance of s to f these are the commands:               CREATE TABLE f     id int4 primary key not null ,     name varchar(10)     );          SELECT AddGeometryColumn('','f','the_geom',27700,'POINT',2);          INSERT INTO f(ID, NAME, the_GEOM) VALUES (1, 'f',     GeometryFromText('POINT(415000 418000)',27700));          select f.name AS centre, round(CAST(AVG(distance     (s.the_geom,f.the_geom))/1000      AS NUMERIC),2)AS DISTANCE     group by f.name      but I got this ERROR: missing FROM-clause entry for table "f" Could you please advise what might be wrong?


title: ArcMap 10 Layout View: search for elements and delete

text: I've to regenerate a single layout with data from each point feature. So, I wrote a VB.NET routine to clean the layout, searching for text element, selecting it and deleting it. Well, the routine works just for some element and not for others.... Why?               Private Sub CleanLayout()              Dim graphC As IGraphicsContainer = mxDocument.PageLayout         Dim graphCSel As IGraphicsContainerSelect = graphC         graphCSel.UnselectAllElements()         graphC.Reset()         Dim elem As IElement = graphC.Next         While elem IsNot Nothing             If TypeOf elem Is ESRI.ArcGIS.Carto.ITextElement Then                 Dim elemProps As IElementProperties = DirectCast(elem, IElementProperties)                 If String.Compare(elemProps.Name, "ELEM_VAR", True) = 0 Then                     graphCSel = graphC                     graphCSel.SelectElement(elem)                     graphC.DeleteElement(elem)                 End If             End If             elem = graphC.Next         End While              mxDocument.ActiveView.Refresh()         graphC = Nothing         graphCSel = Nothing          End Sub      The result is that there is still some text element named "ELEM_VAR" on the layout.... Thanks in advance for any help. Software: ArcGIS 10 SP1 + VS2010


title: windows function with points in a mixed (multipoint/point) table

text: I have a table comprising multipoints (tracks) and points (stops between tracks). there can be several consecutive multipoints.   now, i want to merge any points lying very closely to each other (spatially and temporally) and delete all multipoints lying between them.   if there would be only one multpoint and one point in turn, i could delete the correct multipoints with comparing the respective lead point with the respective lag point (window function), but in case of group_id's 434 - 437 there are three multipoints in a row. so, how to compare the next point with the previous point in each case, even if there are more than one multipoint between those points? ![enter image description here](http://i.stack.imgur.com/i3cMu.jpg)


title: Composite NDVI data downloads post-2006

text: Does anyone know of sources for downloadable global composite NDVI datasets (2-week to 1 month composites) that include more recent data than 2006? The GLCF (http://glcf.umiacs.umd.edu/data/gimms/) and USGS (http://eros.usgs.gov/#/Find_Data/Products_and_Data_Available/NDVI) composite AVHRR data is available through 2006, but in a cruel twist of fate, I need data for 2007. My area of interest is NW Siberia, so I don't necessarily need global coverage if anyone is aware of more geographically specific data. Thanks in advance.


title: ArcPad10 and domains and subtypes

text: I have ArcPad10 installed on a Trimble Juno. I tried to use a geodatabase with a feature class set up with domains and subtypes for field data collection, but, I learned quickly that ArcPad10 doesn't recognize a geodatabase... only shapefiles. I understand that an *.apl file (part of a shapefile package) is used in arcpad10 to constrain data editing, or create forms. Do you need ArcStudio to create an apl file? What is the structure of an apl file? Can you write your own? Cheers


title: ArcGIS Data Interoperability Quick Import - problem with copying original attributes from DGN file

text: I am new to DI extension and I wanted to ask you why "Qucik Import" tool doesn't allow me to copy the original attributes from my DGN file. When I check the results in geodatabase I is some new columns named: IDGS Color, IDGS Class etc. Why I can't copy those originals? Do I need to check some options in the setting?


title: Why is an FMEException thrown when creating a feature using FMEObjects?

text: When I try to run the code below               try     {         fmeSession = FMEObjects.createSession();                     feature = fmeSession.createFeature();         return true;     }     catch (FMEException fe)      {         System.out.println("Error Create Feature: " + fe.getFMEStackTrace());         return false;     }      I get this message: > Error Create Feature: (....\foundation\security\stfsecurity.h:578) What might be the reason for this? Please help me.


title: How to get "Pinching" in Openlayers working on Android?

text: If you go to THIS OpenLayers Mobile example on android you'll notice that " _pinching_ " for zooming does not work. But it works for iPhone and iPad. Anyone know how i can get " _pinching_ " to work on Android?


title: Flex API: is it possible to fit the legend into a fixed frame using print widget and custom templates

text: does anyone have experience with trying to fit the legend of the WebAPI into a fixed frame when exporting the map to a pdf? I am using a custom template to export my map and I just cannot get the legend being dynamically resized to a fixed frame that is set in my template for the legend. Anyone any suggestions or has done this before? ANy help would be appreciated. Cheers Bart


title: How to create a Custom editor application using ArcGIS API for Flex?

text: I have seen demo of esri editor and then run in my flash builder as well.It is working well.   Now I have a question that Is it possible to create my own editor?   OR   If I want to place my own/desired icons/symbols instead of given by API editor? If yes then Please Guid a bit about this


title: Does NASA DEM contain objects?

text: Following an answer to my previous question I am planning to work with NASA ASTER GDEM global dataset. I am trying to download it according to instructions given here for a couple of days now. Meanwhile can somebody answer: does this datum contain objects like trees and buildings?


title: ArcGIS 10.1 make Form onTop with C#

text: I have a windows form which opens with my ICommand, referenses IApplication and does some staff with it( it is not relevent ). The problem is that I want it to be onTop within ArcMap, and minimized if ArcMap is minimized. Two obvious solutions doesn't satisfy my requirements.   1. Set form's _Topmost = true_. (Stays on top even if ArcMap is minimized.)    2. Use DockedWindow. I have actually around dozen of such forms, I don't want to change all the projects structure due to such minor requirement.  Is there a way to make windows form be "adopted" by ArcMap window?


title: How to correctly merge layers with overlapping polygons in QGIS/GRASS?

text: I have 4 vector shapefile that I would like to join/merge, without worrying about attributes.   Here are the shapefiles.   I would like to do an union and a spatial dissolve, but everytime I do a dissolve after "PUP" and "PRG" layers union, I got an error about wrong geometries and the output layer is empty.   I validated layers geometry with no errors (at least is what QGIS tells me). Am I missing out something?


title: USA geocoding that's anonymous, good, and free - does it exist?

text: For a one-time project, I need to geocode a few thousand addresses. In the past I've used various online resources for this kind of thing (e.g., Google Maps API), but the addresses I'm working with have to be kept confidential - which means no sending it over the Internet, unless there's some iron-clad guarantee of privacy. What other options do I have?


title: "Please ensure that the GDAL_DATA environment variable is set and try again" on Kubuntu 12.10

text: I'm having a problem loading the 'convert os gml to ogr' plugin in QGIS 1.8 running on (k)ubuntu 12.10. Basically, clicking the plugin prompts the error:               "Please ensure that the GDAL_DATA environment variable is set and try again"      I've tried setting the environment variable via instructions here: (http://trac.osgeo.org/gdal/wiki/FAQInstallationAndBuilding#WhatisGDAL_DATAenvironmentvariable) with the terminal command "export GDAL_DATA=/usr/share/gdal/1.9" but to no avail (i'm not even sure this is the right course of action...) Any suggestions?


title: How to correctly display trees in ArcScene?

text: The first image is a screenshot of the view in ArcScene. I am trying to export this scene to a tif or jpg. The scene is composed of the following layers:   * A raster   * Three polygon layers displayed as outlines only   * One transparent polygon layer   * A point layer displayed as trees based on height values within the point attribute table. When I export the scene to a jpg or tif, the resulting error image is shown below with the gray overlay. I was able to isolate the problem though--it appears the export works for everything except the points (displayed as trees). If I export the scene with the points not displayed as tree, this also works. Where am I going wrong? How can I resolve the issue so that the trees are displayed correctly? ![enter image description here](http://i.stack.imgur.com/n54F9.jpg) ![enter image description here](http://i.stack.imgur.com/cCfGR.jpg)


title: How to extract slope from topographic raster map?

text: I am working on a project for a machine learning class wherein I extract features from a topographic raster map and then classify the traversability of the terrain. One of the features I need to extract is slope. My initial thought was that an approximation of slope at any given point could be extracted from a map by calculating the distance between contour lines. However it seems I took for granted the complexity of extracting the contour lines. In attempting to solve this problem I found myself trying to learn a number of GIS tools. However I still have not been successful which is why I am here. I have installed gdal and used gdal_contour to generate what I believe to be a DEM. From there I loaded it into qgis along with the original raster map. From this I see that when gdal created the DEM it used only one of the two colors that designate contour lines. Worse yet it used the less frequent color so the resulting contour lines are highly segmented. This leaves me with a couple of questions. The first is whether it is possible to designate the colors gdal uses to extract contour lines and generate the DEM. The second is whether there is a simpler method for extracting the desired data. I hope all this makes sense given that this is no where near my field of expertise. Thanks in advance for any help you can provide.


title: Start-up error message QGIS 1.8 Couldn't load PyQt4

text: After successfully building QGIS 1.8 "Lisboa" on Windows 7 in 32 bit mode by following the instructions mentioned here I am able to start QGIS, however I get the following startup error message: > Couldn't load PyQt4. Python support will be disabled. > > Traceback (most recent call last): File "", line 1, in ImportError: DLL load > failed: The specified procedure could not be found. > > Python version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit > (Intel)] > > QGIS version: 1.8.0-Lisboa 'Lisboa', exported After this message the Python console and other python related plugins are not loaded. I have installed the latest PyQt installer of PyQt4.9.5 from riverbanks My system details OS: windows 7 64 bit Build tools:   1. MS Visual Studio 2010   2. C-Make 2.8.8   3. Python2.7   4. PyQt4.9.5 with SIP   5. OSGeo4W with GRASS and all dependency libs  further investigation lead me to believe that there might be a mismatch of PyQt 4.9.5 that I installed and the one downloaded by OSGeo4W (PyQt4.8). However, I do not know how to make the cmake look for pyQt4.9.5 instead of PyQt4.8 I would highly appreciate any pointers and detailed help in solving this issue. With regards Sukesh


title: ArcGIS REST server projection with OpenLayers

text: I'm adding an ArcGIS tile server to my openlayers tile server options via this javascript API. I have it displaying the map correctly, but it seems stretched out horizontally (I have a feeling the default projection may be causing this). The URL I'm pointing it to is:               http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/export      And declaring the layer like so:               var layer = new OpenLayers.Layer.ArcGIS93Rest(null,              'http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map              /MapServer/export',             { layers:"0,1,2" } );      Does anyone know the projection I should be using? The API says I can specify a projection by adding an `srs` Projection ID property alongside my `layers` option, but I'm not sure even what the possible values are.


title: Cannot join feature layer with SQL Server table with query built in it in ArcMap

text: I need to join a feature layer with a SQL Server View with a common field in ArcMap. The View was successfully added to ArcMap as data table with some query built on it from Query Builder. When I tried to make join on those two layers it returned nothing in the attribute table. However, if I modified the view definition with exactly the same query in SQL Server, the View added to ArcMap and joined with the feature layer returned records in the attribute table. I would like to enable the user to build their query on the added View as table in ArcMap rather than currently having to do it in View definition on the SQL Server side. Just wonder if anybody came across the problem before. Is there any workaround for it? Thanks Alex


title: How to write values from arcpy statistical output to table?

text: The attached script is my stalled attempt to perform the following workflow:   1. Create a table and create fields   2. Loop through a folder of point shapefiles and perform average nearest neighbor analysis   3. Create a row and write "nn_values[]" to the corresponding fields   4. move to the next shapefile and repeat The script successfully produces a table, runs the aNN analysis for a shapefile and adds an empty row to the table. As an end-product, I would like a table with all of the values from the statistical analysis. **How can I write the associated aNN statistical output (i.e. "nn_values[]") to the corresponding fields for each iteration in the`for` loop?** Many thanks for the guidance.               # Import system modules     import arcpy, os     from arcpy import env          # Set over write     env.overwriteOutput = 1          # Local variables...     env.workspace = r"C:\temp"     Dir = env.workspace     out_name = "NNtable.dbf"          ### Execute CreateTable     arcpy.CreateTable_management(Dir, out_name)          ### Add fields     arcpy.AddField_management(Dir + "\\" + out_name, "index", "FLOAT")     arcpy.AddField_management(Dir + "\\" + out_name, "z_score", "FLOAT")     arcpy.AddField_management(Dir + "\\" + out_name, "p_value", "FLOAT")     arcpy.AddField_management(Dir + "\\" + out_name, "expected", "FLOAT")     arcpy.AddField_management(Dir + "\\" + out_name, "observed", "FLOAT")     arcpy.AddField_management(Dir + "\\" + out_name, "pathway", "TEXT")          # List FCs          fclist = arcpy.ListFeatureClasses()          for fc in fclist:         try:                  # Obtain Nearest Neighbor Ratio and z-score             # Process: Average Nearest Neighbor...             nn_output = arcpy.AverageNearestNeighbor_stats(fc, "EUCLIDEAN_DISTANCE", "NO_REPORT", "#")                  # Create list of Average Nearest Neighbor output values by splitting the result object             nn_values = nn_output.split(";")             print "The nearest neighbor index is: " + nn_values[0]             print "The z-score of the nearest neighbor index is: " + nn_values[1]             print "The p-value of the nearest neighbor index is: " + nn_values[2]             print "The expected mean distance is: " + nn_values[3]             print "The observed mean distance is: " + nn_values[4]             print "The path of the HTML report: " + nn_values[5]              except:             # If an error occurred when running the tool, print out the error message.             print arcpy.GetMessages()              # Create insert cursor for table          #          rows = arcpy.InsertCursor(Dir + "\\" + out_name)          row = rows.newRow()          rows.insertRow(row)               # Delete cursor and row objects to remove locks on the data           del row          del rows


title: Openlayers feature popup gets in the way of clicking, zooming and panning

text: I have a kml layer, and have a popup open when the user selects on a feature. I use OpenLayers.Control.SelectFeature and OpenLayers.Popup.FramedCloud. The selection happens when the user clicks. If the popup is open, I cannot click, pan or zoom the map whilst within the popup div. This is particularly noticeable with the FramedCloud popup, because a large chunk of the div is transparent. I guess the events are no longer happening as far as the map is concerned, because the div is in the way. I am not saying it is wrong, it is just confusing when it looks like you click on the map and nothing is happening. Also, regardless of whether or not the popup is open, drag no longer works if you are over a feature (guess the event is doing something else now). I think I would like the events to continue to happen on the map. Is that possible? Thanks


title: caching part of a postgis layer in mapserver

text: I'm creating a layer in mapserver using postgis. The layer consists of many polygons. Sometimes some of those polygons will change. Is it possible to cache the layer tiles using something like tilecache and only regenerate tiles containing the changed polygons? Or do I need to regenerate the whole layer?


title: Authentication in geoserver with openlayers

text: Is there a way to authenticate in geoserver with a external webpage (made with asp.net and openlayers)? I have restricted the access data only by certain users, and I don't want to authenticate this way:               username:password@geoserverurl      for security reasons (the username and password are visible in the webpage code) Thanks in advance


title: ST_ZMax() does not exist in PostGIS

text: I'm trying to follow this example on Mapbox blog, about using 3D shapes in PostGIS. The database-query is this:               DROP TABLE tilemill_buildings;     CREATE TABLE tilemill_buildings     AS SELECT     ogc_fid,     CAST(size_sqm AS INT) as size_sqm,     CAST(ROUND(CAST(ST_ZMax(wkb_geometry)/2 AS NUMERIC),0) AS INT) AS z_xlarge,     CAST(ROUND(CAST(ST_ZMax(wkb_geometry)/2.5 AS NUMERIC),0) AS INT) AS z_large,     CAST(ROUND(CAST(ST_ZMax(wkb_geometry)/3 AS NUMERIC),0) AS INT) AS z_med,     CAST(ROUND(CAST(ST_ZMax(wkb_geometry)/4 AS NUMERIC),0) AS INT) AS z_small,     wkb_geometry AS wkb_geometry     FROM building_3d     ORDER BY     ST_YMax(Box3D(wkb_geometry)) DESC;      ...but I get this error:               ERROR:  function st_zmax(bytea) does not exist     LINE 5: CAST(ROUND(CAST(ST_ZMax(wkb_geometry)/2 AS NUMERIC),0) AS IN...                             ^     HINT:  No function matches the given name and argument types. You might need to add explicit type casts.      I have tried to re-install PostGIS twice. I have run the `CREATE EXTENSION postgis;` command. Why am I getting this error, and how to fix it?


title: Calling GRASS functions from external Python

text: I have GRASS 6.4.3svn installed in my machine running Windows 7. Also in my machine i installed Python 2.7.3 for Windows.Now i need to call GRASS libraries from Python and not within the Python shell in GRASS GUI itself. I set the environment variables in the env.bat for this. But connection fails. This is the env.bat i have:               set GISBASE=C:\Program Files\GRASS GIS 6.4.3svn          set HOME=%USERPROFILE%          set LD_LIBRARY_PATH = %GISBASE%\lib          set PATH= %GISBASE%\etc;%PATH%     set PATH=%GISBASE%\Python27;%PATH%     set PATH=%GISBASE%\lib;%GISBASE%\bin;%GISBASE%\extralib;%GISBASE%\msys\bin;%PATH%     set PATH=C:\Python27;%PATH%          set PYTHONLIB= C:\Python27;%PYTHONLIB%     set PYTHONPATH= %GISBASE%\etc\python;%PYTHONPATH%               rem Environmental variables for GRASS stand-alone installer          set GRASS_WISH=%GISBASE%\extrabin\wish.exe     set GRASS_PYTHON=python               set GRASS_PROJSHARE=%GISBASE%\proj     set GRASS_HTML_BROWSER=explorer     set GRASS_SH=%GISBASE%\msys\bin\sh.exe          set PYTHONHOME=%GISBASE%\Python27     set GDAL_DATA=%GISBASE%\share\gdal     set PROJ_LIB=%GISBASE%\proj     set GEOTIFF_CSV=%GISBASE%\share\epsg_csv          set PATH=%GISBASE%\msys\bin;%PATH%     set PATH=%GISBASE%\extrabin;%GISBASE%\extralib;%PATH%     set PATH=%GISBASE%\tcl-tk\bin;%GISBASE%\sqlite\bin;%GISBASE%\gpsbabel;%PATH%     set PATH=%GISBASE%\bin;%PATH%          rem Path to the python directory --     rem set PYTHONHOME=%GISBASE%\Python27      rem if "x%GRASS_PYTHON%" == "x" set GRASS_PYTHON=python       Can somebody help me in rectifying the problem. Cheers, Brian.


title: How to set QGIS action to open and search for features on Google Maps?

text: At the moment, I have an action that takes each term in an address field and conducts a search on EACH term in Google (ie. multiple tabs are opened for each term). The action code I have is the following:               "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" https://www.google.co.uk/?gws_rd=ssl#q=[% "ADDRESS1" %]      I would like to ask: what is the correct code to include ALL terms in the address field and, if possible, conduct a search on Google Maps instead of a simple Google search?


title: Bounding Box approximation when calculating in euclidic space?

text: Although I will illustrate my problem using a database, I think this is a quite general GIS question. I hope I came to the right place to ask. I am working with a system that runs on a normal relational database (without any SQL/MM functionality) and there is sadly no hope I can upgrade it anytime soon. But I need to maintain some basic geographic relationships regarding intersections of lines (Set A) and polygons (Set B). Users may change individual lines and polygons and expect to get a list afterwards, regarding those that will somehow intersect. Now the exact intersection test isn't a problem and is dealt with in a Java backend. My current problem is that I have to check the cross product of A and B anytime someone edits anything because the change _could_ introduce a new intersection. No matter how small the change is, I can't tell in advance which exact relations could be affected. So I would like to introduce some bounding boxes in the database, which hopefully will speed up the whole application because many obviously not related entities can be filtered out early. I came up with the following structure and query to demonstrate the general idea:               CREATE TABLE bound_rect     (       id serial NOT NULL,       x1 double precision,       y1 double precision,       x2 double precision,       y2 double precision,       CONSTRAINT bound_rect_pkey PRIMARY KEY (id)     )          SELECT *     FROM bound_rect lhs, bound_rect rhs     WHERE lhs.x1 < rhs.x2     AND   lhs.x2 < rhs.x1     AND   lhs.y1 < rhs.y2     AND   lhs.y2 < rhs.y1      So this query is able to do some very general bounding box intersection tests (I am aware that things like the dateline are not taken into account, I can live with that). For me this seems like a similar calculation as it would be done in PostGIS' `geometry` mode. Performance is much improved, I am happy so far. Now my actual question: **Would I need to possibly "inflate" my bounding box if I want to make sure I don't get any "false negatives" when dealing with lat/lng coordinates on a sphere?** I can live with "false positives", e.g. cases where the bounding boxes overlap but not the "real" entities. But if my query would filter out entities that do overlap because of too small bounding boxes, that would be a real problem.


title: ogr2ogr - function getsrid(geometry) missing error {PG to File}

text: I am issuing the following statement               ogr2ogr -a_srs EPSG:27700 -f "MapInfo file" "test.tab" PG:"host=xxx user=xxx dbname=xxx password=xxx active_schema=xxx" -sql "Select * from sale_region"      and I am getting the following message on completion: > ERROR 1: ERROR: function getsrid(geometry) does not exist > > LINE 1: SELECT getsrid("wkb_geometry") FROM (Select * from sale_regi... > > HINT: No function matches the given name and argument types. You might need > to add explicit type casts." All of the data appears to be in the generated file (I have also tried with exporting to SHP and Geojson with the same message appearing). I think the error message has somethign to do with the SQL and/or that my geometry column is called wkb_geometry in the table. So I'm obviously doing something wrong somewhere and am worried that some data may have been lost in translation. If anyone can put my mind at rest or tell me whats wrong with the code, it'd be very much appreciated. I did try:               ogr2ogr -a_srs EPSG:27700 -f "MapInfo file" "test.tab" PG:"host=xxx user=xxx dbname=xxx password=xxx active_schema=xxx" "sale_region"      and although it completed with no errors at the command line, it produced an empty MapInfo table.


title: Import raster data from postgis and publish in geoserver

text: I am using geoserver 2.3.3, PostGIS 2.1 and PostgreSQl 9.1. The Image Mosaic JDBC extension is also installed correctly. I am trying to import raster data from PostGIS and publish in Geoserver but facing an error I followed the following tutorial I have imported the raster to postgis using raster2pgsql, the command i used is **raster2pgsql -M -I -C -e -Y -F -s 4326 -t 128x128 -l 2,4 geo_liss.tif public.raster_table | psql -U postgres -d postgis_test -h localhost -p 5433** I have even verified whether the image is imported into database correctly or not, by downloading it using gdal_translate. http://docs.geotools.org/latest/userguide/library/coverage/pgraster.html These are my XML configuration files... **rasterdata.pgraster.xml**               <?xml version="1.0" encoding="UTF-8" standalone="no"?>     <!DOCTYPE ImageMosaicJDBCConfig [       <!ENTITY mapping PUBLIC "mapping"  "mapping.pgraster.xml.inc">       <!ENTITY connect PUBLIC "connect"  "connect.pgraster.xml.inc">      ]>           <config version="1.0">       <coverageName name="oek"/>       <coordsys name="EPSG:4326"/>       <!-- interpolation 1 = nearest neighbour, 2 = bipolar, 3 = bicubic -->       <scaleop  interpolation="1"/>     <axisOrder ignore="false"/>       &mapping;       &connect;     </config>      **connect.pgraster.xml.inc**                <connect>      <dstype value="DBCP"/>      <username value="postgres"/>      <password value="postgres"/>      <jdbcUrl value="jdbc:postgresql://localhost:5432/geo"/>      <driverClassName value="org.postgresql.Driver"/>      <maxActive value="10"/>      <maxIdle value="0"/>      </connect>      **mapping.pgraster.xml.inc**                 <spatialExtension name="pgraster"/>       <mapping>       <masterTable name="mosaic" >               <coverageNameAttribute name="name"/>               <maxXAttribute name="maxx"/>               <maxYAttribute name="maxy"/>               <minXAttribute name="minx"/>               <minYAttribute name="miny"/>               <resXAttribute name="resx"/>               <resYAttribute name="resy"/>               <tileTableNameAtribute  name="tiletable" />       </masterTable>       <tileTable>               <blobAttributeName name="rast" />       </tileTable>       </mapping>      I have stored these xml configuration files in geoserver data directory under coverages folder. When I try to use the image mosaic jdbc plugin to import the raster data through jdbc database, it gives an error, i.e. **"Could not list layers for this store, an error occurred retrieving them: Argument "value" should not be null."** I have imported the raster data by giving the path of oek.pgrasterlxml in the url required As it doesn't work, i tried to import data in postgis database using import data in geoserver. I have provided the SRS also. The data is imported correctly. But, when i view it using open layers, am unable to view. Instead the wms is downloading. The WMS downloaded has the following content.                 <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" >   <ServiceException>       illegal bbox, minX: 0.0 is greater than maxX: -1.0     </ServiceException></ServiceExceptionReport>      Thanks


title: OpenGeo Suite Create map application GXP or GeoEXT

text: I have seen a similar question but it never got answered. I am looking to develop a GIS system using the OpenGeo Suite, luckly im going to a conference on it in a few weeks, however thats weeks away. I need to work on my front end, and I am really confused over GXP and GeoEXT, what should I be using to create my map application? the opengeo website has tutorials for both... The system will enable panning/zoom, layer tree, maybe graphs, edit/features (click and change fields), grideditor, legend. Do I go down the openlayer route with GEoEXT or use SDK GXP. I am confused because some of the opengeo videos by themself, seem to make out GXP is the way forward but then many examples and documentation they have, uses openlayers/GEoEXT. This was the question, he basically wanted the same as me link


title: gdal2tiles.py problem - creating mini tiles

text: I have a similar problem to the issue posted here (gdal2tiles problem). I have 80 GeoTIFFs (4000x4000) with EPSG:27700 projection embedded and TFW and PRJ files. These I have built into a virtual raster using gdalbuildvrt which creates a 10x10 tile image that is 40000x40000 pixels. Using gdal2tiles I can create a set of tiles for specific zoom levels. In this case I am using the Ordnance Survey VectorMap District and 25K raster tiles and I want zoom levels 7, 8 and 9. The problem is that zoom levels 8 and 9 work perfectly creating 97969 tiles at zoom level 9 and 24649 tiles at zoom level 8. Zoom level 7 creates the correct number of tiles but the output images consist of a "mini" thumbnail in the top left corner and the rest of the image is transparent/white. Why does it work for 8 and 9 and not 7? Should I resize the image to fit nicely into 256x256 squares? See the images attached below: ![Zoom level 7](http://i.stack.imgur.com/7Fk57.jpg) ![Zoom level 8](http://i.stack.imgur.com/IrPDc.jpg)


title: Projecting PostGIS in Openlayers

text: I have a layer(base layer) with MultiLineString Geometries and now I need to project the layers(overlays) in the base layer from PostGIS using OpenLayers. However, I got an idea how to project table data source into openlayers. I am trying it on topology schema and I am having my layer data in edge_data,node,faces,relations tables. Can anyone guide me how to project my topogeometry into openlayer. And moreover, I am not using any servers except PostgreSQL. Thanks.


title: How to export multiple MXDs to PNG without using VBA?

text: Okay, so I can feel that I am so close to solving this issue with the help of Jason (below) but I have modified to use as a script. The GetParameterAsText returns the following error when trying to execute: > : [Error 3] The system cannot find the path specified: > u"'C:\Users\bob\Documents\folder\file.mxd';'C:\Users\folder\Documents\Folder\file.mxd';'C:\Users\folder\Documents\folder\file.mxd'\*.*" Anyone know what is wrong with my code to keep getting this error?                   import arcpy, os, string              #Read input/output folder path from script tool         folderPath = arcpy.GetParameterAsText(0)         outPNGfolder = arcpy.GetParameterAsText(1)              for filename in os.listdir(folderPath):             fullpath = os.path.join(folderPath, filename)             if os.path.isfile(fullpath):                 basename, extension = os.path.splitext(fullpath)                 if extension.lower() == ".mxd":                     mxd = arcpy.mapping.MapDocument(fullpath)                     arcpy.mapping.ExportToPNG(mxd, basename + '.png')


title: How to create a buffer on a linestring with varying or increasing/decreasing width

text: I want to buffer rivers/streams for a topographic map. I'm using a PostgreSQL/PostGIS database. Usually, I create buffer with ST_Buffer with a constant width. For example, the width of a river buffer should be increasing from the spring to the estuary with a distinct value. ![enter image description here](http://i.stack.imgur.com/6v9IZ.png) Is there a way to create buffer with an increasing or decreasing width starting from a distinct point and ending at a distinct point? **UPDATE** With the help of simplexico I tried to create some geometries that could help to create a thinning buffer around a linestring: First I create the buffer lines parallel to the river geom and insert them into a table called `offsetcurve`:               WITH geometries AS (         SELECT             gid,             (ST_Dump(geom)).geom AS geom         FROM waterways             WHERE name='river_name')              SELECT             gid,             ST_OffsetCurve(geom, 10, 'quad_segs=4 join=mitre') AS pos_curve,              ST_Reverse(ST_OffsetCurve(geom,-10, 'quad_segs=4 join=mitre')) AS neg_curve         FROM geometries;      I have to use the reverse function for a further step. The next step is to dump the points from the buffer lines and the river geom and insert them into a table called `offsetpoints`:               SELECT         offsetcurve.gid,         (ST_DumpPoints(offsetcurve.pos_curve)).geom AS pos_curve_dump,         (ST_DumpPoints(offsetcurve.neg_curve)).geom AS neg_curve_dump,         ST_SetSRID((ST_DumpPoints(geometries.geom)).geom, 31468) AS river_dump     FROM offsetcurve, geometries      After that I create lines between the buffer line points and the river geom points and store them in a table called `offsetazimuth`:               SELECT         offsetpoints.gid,         ST_Azimuth(offsetpoints.pos_curve_dump, river_dump) AS pos_curve_azimuth,         ST_MakeLine(offsetpoints.pos_curve_dump, river_dump) AS pos_azimuth_line,         ST_Azimuth(offsetpoints.neg_curve_dump, river_dump) AS neg_curve_azimuth,         ST_MakeLine(offsetpoints.neg_curve_dump, river_dump) AS neg_azimuth_line     FROM offsetpoints      Visualizing all new geometries, I have the following picture: ![enter image description here](http://i.stack.imgur.com/JnYYu.png) The red and blue points are dumps from the buffer line. The green points are the river geom dumps. The blue and red points are connected to the green points with the offsetazimuth line. I can change the position of the buffer points (e.g. for one buffer line) along the azimuth line with:               SELECT          ST_MakePoint(             ST_X(st_endpoint(pos_azimuth_line)) - (ST_X(st_endpoint(pos_azimuth_line))-st_x(st_startpoint(pos_azimuth_line)))/6,              st_y(st_endpoint(pos_azimuth_line)) - (st_y(st_endpoint(pos_azimuth_line))-st_y(st_startpoint(pos_azimuth_line)))/6                     ) as geom      FROM offsetazimuth      The results are new points with a constant distance from the river geom: ![enter image description here](http://i.stack.imgur.com/G3qcu.png) The first step of a final solution has to be that the first point has the distance like `(buffer_width(B)-buffer_width(A))/count(river_dump_points)` (see first picture) from the river geom on the offsetazimuth line (see the last but one query). For example: The first new point has a distance of `(200m-100m)/100=1m` from the river geom, the second one `((200m-100m)/100)*2=2m` and so on. `200m` is the maximum width,`100m` is the minimum width of the wanted buffer. `100` is the number of dumped points from the river geom. It's the question if this (increasing or decreasing distance value for every buffer line point) is possible with PostGIS!? The next idea could be a function: setting parameters like the gradient or the length where the buffer has to take place.


title: Mac QGIS 2.2 error executing Python code

text: Newbie Using QGIS version 2.2 with Python 2.7.5 on OSx 10.9.2 Getting the following error. Any idea on how to resolve? I'm not sure if it has ramifications on the display of the Google data. An error has occured while executing Python code:               Traceback (most recent call last):       File "/Users/dave/.qgis2/python/plugins/GoogleMapsEngineConnector/googlemapsengineconnector.py", line 274, in handleSelectionChange       File "/Users/dave/.qgis2/python/plugins/GoogleMapsEngineConnector/googlemapsengineconnector.py", line 335, in getAssetsFromLayer       File "/Users/dave/.qgis2/python/plugins/GoogleMapsEngineConnector/googlemapsengineconnector.py", line 302, in isGmeConnectorLayer     AttributeError: 'OpenlayersLayer' object has no attribute 'dataProvider'      Python version:               2.7.5 (default, Aug 25 2013, 00:04:04)      [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]      QGIS version: 2.2.0-Valmiera Valmiera,               Python path: ['/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing', '/Applications/QGIS.app/Contents/MacOS/../Resources/python', u'/Users/dave/.qgis2/python', u'/Users/dave/.qgis2/python/plugins', '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/Library/Frameworks/SQLite3.framework/Versions/B/Python/2.7', '/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7', '/Library/Python/2.7/site-packages/numpy-override', '/Library/Python/2.7/site-packages/matplotlib-override', '/Library/Frameworks/GDAL.framework/Versions/1.10/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/pyparsing-2.0.1-py2.7.egg', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/PIL', '/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools', '/Users/dave/UNIVERSE/COMMON GROUND/1. PROJECTS/2013/1304 SWMP/MAPPING/Pages']


title: How to toggle a control in OpenLayers

text: I have a added Graticule control in my OpenLayers map. Now I want to toggle this using a control button. This what I have written:               function init() {            graticuleCtl = new OpenLayers.Control.Graticule({                         numPoints: 2,                          labelled: true,                         displayInLayerSwitcher: true           });              map = new OpenLayers.Map('map', {controls: []});         map.addControl(graticuleCtl);     .     .     .           var GraticuleCtl = new OpenLayers.Control.Button({                 displayClass: "olGraticule",                 title: "Show Graticule",                 trigger: showGraticule});                  // Panel (toolbar)             Panel = new OpenLayers.Control.Panel({                 defaultControl: DragPanCtrl             });             Panel.addControls([                 .                 .                 .                 .                 GraticuleCtl             ]);             map.addControl(Panel);     }          function showGraticule() {        if (graticuleCtl.visible==true){              graticuleCtl.deactivate();            return true;            }           else if (graticuleCtl.visible==false){            graticuleCtl.activate();            return true;            }        else{}     }      But this works for once only, since the 'visible' property checks only for initial map load.


title: IE8 Openlayers load thousands objects problem

text: My client works only with IE8. He has openlayers map that he want to load 3000 polygons on it. Chrome and IE9 can do this easily, but IE8 freeze. Objects come from web service as json xml , being parsed and added to vector layer. IE8 throws an exception while add the objects: "Stop running this script? A script on this page is causing Internet Explorer to run slowly ..." I've tried to load features as multithreading, but this is too slow. Any Ideas?


title: How to SELECT one day's scene (Landsat 8 scenes)

text: I have a huge dataset of raster in PostGIS. Each scene is divided into tiles (tile-size 500x500). I was trying to `SELECT rast FROM landsat8 WHERE ST_Intersects(rast, polygon)`. It runs very slow, because it returns longitudinal scenes of raster. Where I just want one day's scene.   But the problem is if I query with fixed date, adjacent scene with different date won't be selected. That's not true.   So I think about some solutions:   * Because Landsat 8 re-visiting every 16 days, so I will insert every 16 days into different table. So I can query from raster that cover all the earth without duplicate.   * I'm not sure about ST_Within(), ST_DWithin() then SELECT rast that doesn't overlap other >50%  What would you do in this situation?


title: Geographically Weighted Regression and categorical values leaving blank values after analysis

text: I am using **Geographically Weighted Regression (GWR)** in ArcMap 10.2 to look at the effect of environmental and human factors on lion occurrence in Namibia. I created a vector grid over the study area, calculated the frequency of occurrence of lion GPS points, calculated the distance to each nearest feature using the near tool from the analysis toolbox and "coded" each grid cell with the categorical values. When I run a GWR to look at the effect of say distance to river it works fine and I have found the suitable bandwidth for the analysis. When I run a GWR to understand the effect of land use (i.e. national park or not national park) it calculates the values along the edges of the parks boundaries but the grid cells in the park come out blank after the GWR run and in the attribute tables it says null. I coded each vector grid cell with "1" if it is inside the national park and "0" when it was outside. When I input the data into GWR, the dependent variable was the lion frequency of occurrence and the explanatory variable is landuse (which is the the 1 and 0's for park and non park). I also used the near tool to calculate the distance to the park boundary but this gave similar results when using GWR and gives everything inside the park a value of 0. The lions do spend most of their time in the park and that is why I wanted to show that the fact that the park there is a contributing factor that lions still occur in that area. Why would the values come out blank? If it helps to explain the situation better I can also upload an image of the results.


title: How to number points along a line consecutively

text: I have a line and along this line I have different points which are max. 20m away from that line. Now I would like to number the points along the line, like shown in the grafic. Any suggestions how to achieve with QGIS or GRASS. ![enter image description here](http://i.stack.imgur.com/F4nHL.png)