Creating Relationship classes

I am trying to create relationship classes in a Feature Dataset. The Relationship Class created successfully, I want when I update a record in the Origin table the Destination's would be updated. But it didn't.Any solution? OR procedure? Thank U in advance


how to convert qgis generated tiff images into jpg/jpeg using gdal command line utilities?

I want to develop a web portal that will show the images dynamically produced by qgis . but qgis provided tiff images are too big in size and it is not possible to show it on website using image viewers. That's why I have decided to convert those tiff images into jpg/jpeg to reduce in size as well as browser friendly so that I can show those images on my website easily. But I don't know how to convert tiff images into jpg/jpeg using gdal commands. Please help me in this regard. thanks in advance. Enamul


Creating an AttributeInspector via JavaScript API v2.7

I'm trying to display an `AttributeInspector` when I click on an object from a layer. I'm following this sample, but I cannot get it to work. Here is my sample code:               dojo.require("esri.map");     dojo.require("esri.dijit.Scalebar");     dojo.require("dijit.layout.ContentPane");     dojo.require("esri.dijit.AttributeInspector-all");          var map;     var earthquakes, earthquakesFeatureLayer;     var visible;     var updateFeature;          function init() {         esri.config.defaults.io.proxyUrl = "/arcgisserver/apis/javascript/proxy/proxy.ashx";              var initExtent = new esri.geometry.Extent({             "xmin":-1089520.5238523486,             "ymin":4205238.517449941,             "xmax":5392339.474728875,             "ymax":7037689.037584678,             "spatialReference": {                 "wkid":102100             }         });         map = new esri.Map("map", { extent: initExtent });              dojo.connect(map, "onLayersAddResult", initSelectToolbar);              // National Geographic World Map         var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer");         map.addLayer(basemap);             // set the image parameters to toggle layer visibility         var imageParameters = new esri.layers.ImageParameters();         imageParameters.layerIds = [1];         imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW;              // Earthquakes From Last Seven Days         earthquakes = new esri.layers.ArcGISDynamicMapServiceLayer(                 "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/MapServer",                 {"imageParameters": imageParameters});         earthquakes.setDisableClientCaching(true);         map.addLayer(earthquakes);              earthquakesFeatureLayer = new esri.layers.FeatureLayer(                 "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/MapServer/0",                 {                     mode: esri.layers.FeatureLayer.MODE_SELECTION,                                 outFields: ["objectid", "datetime", "depth", "magnitude", "region"]                 });         var selectionSymbol = new esri.symbol.SimpleFillSymbol();          earthquakesFeatureLayer.setSelectionSymbol(selectionSymbol);              dojo.connect(earthquakesFeatureLayer, "onEditsComplete", function() {             earthquakes.refresh();         });              map.addLayer(earthquakesFeatureLayer);              // add a scalebar to the map         dojo.connect(map, 'onLoad', function(map) {             var scalebar = new esri.dijit.Scalebar({                 map: map,                 scalebarUnit: 'english'             });         });     }          function initSelectToolbar(results) {         var earthquakesFL = results[2].layer;         var selectQuery = new esri.tasks.Query();         console.log(results[2].success);              dojo.connect(map, "onClick", function(evt) {             selectQuery.geometry = evt.mapPoint;             earthquakesFL.selectFeatures(selectQuery, esri.layers.FeatureLayer.SELECTION_NEW, function(features) {                 if (features.length > 0) {                     //store the current feature                     updateFeature = features[0];                     map.infoWindow.setTitle(features[0].getLayer().name);                     map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));                 } else {                     map.infoWindow.hide();                 }             });         });              dojo.connect(map.infoWindow, "onHide", function() {             earthquakesFL.clearSelection();         });              var layerInfos = [{'featureLayer': earthquakesFL,             'showAttachments':false,             'isEditable': true,             'fieldInfos': [             {'fieldName': 'datetime', 'isEditable':true, 'label':'Earthquake Date:'},             {'fieldName': 'depth', 'isEditable':true, 'label':'Depth:'},             {'fieldName': 'magnitude', 'isEditable':false,'label':'Magnitude:'},             {'fieldName': 'region', 'isEditable':false, 'label':'Region:'}             ]}];                  var attInspector = new esri.dijit.AttributeInspector({                 layerInfos: layerInfos             },             dojo.create("div")             );                  //add a save button next to the delete button         var saveButton = new dijit.form.Button({label: "Save", "class": "saveButton"});         dojo.place(saveButton.domNode, attInspector.deleteBtn.domNode, "after");              dojo.connect(saveButton, "onClick", function() {             updateFeature.getLayer().applyEdits(null, [updateFeature], null);         });              dojo.connect(attInspector, "onAttributeChange", function(feature, fieldName, newFieldValue) {             //store the updates to apply when the save button is clicked              updateFeature.attributes[fieldName] = newFieldValue;         });                  dojo.connect(attInspector,"onNext", function(feature) {             updateFeature = feature;             console.log("Next " + updateFeature.attributes.objectid);         });              dojo.connect(attInspector, "onDelete", function(feature) {             feature.getLayer().applyEdits(null, null, [feature]);             map.infoWindow.hide();         });              map.infoWindow.setContent(attInspector.domNode);         map.infoWindow.resize(325,210);     }          function updateLayerVisibility() {         var inputs = dojo.query(".layer");         visible = [];         var inputsCount = inputs.length;         for (var i = 0; i < inputsCount; i++) {             if (inputs[i].checked) {                 visible.push(inputs[i].id);             }         }              if (visible.length === 0) {             visible.push(-1);         }              earthquakes.setVisibleLayers(visible);     }          dojo.addOnLoad(init);      The sample says I have to use a proxy to implement the example, but I'm not sure how to do it. Is it just a proxy issue that is getting in my way? Do you see any other problems in my code? **EDIT:** And here is the HTML:                                                 <link href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.8/js/dojo/dijit/themes/claro/claro.css" rel="stylesheet" text="text/css">         <link href="styles.css" rel="stylesheet" text="text/css">                  <title>ArcGIS Project</title>
The following project is a HTML/JavaScript-based application, which uses the ESRI ArcGIS API for JavaScript v2.7
         Layers List:                     <input type="checkbox" class="layer" id="0" value="0" onclick="updateLayerVisibility();"/> Earthquakes

             **EDIT** : It seems that the `onLayersAddResult` event never fires, therefor the `initSelectToolbar` function never gets called. Why is this happening? What am I doing wrong?


Open source software for car navigation on iOS platform

I'm trying to make a car offline navigation app for iOS. Now I analyze OpenStreetMap features what to use. I would like to know if there is open source solution for the following parts of app:   * best storing of geodata - do you know Spatialite? Or use standard file system?   * rendering OSM (whatever format/own?) - vector rendering, not tile's system   * routing OSM, finding shortest/fastest path I did some experiments but if you have any experiences, i will be glad if you help me with start.


Different hierarchical clustering results

I'm running a hierarchical clustering on a sample of data using the steps below:               library(RODBC)          setwd('D:/r/cluster2')     channel <- odbcConnectExcel('cluster.xls')     data <- sqlFetch(channel, 'clust9')          y9 <- data.frame(inf=data$infest, faible=data$faible, moyen=data$moyen, fort=data$fort, lon=data$Lon, lat=data$Lat)          y9 <- na.omit(y9) # listwise deletion of missing     y9.use <- y9     y9 <- scale(y9) # standardize variables          wss <- (nrow(y9)-1)*sum(apply(y9,2,var))     for (i in 2:15) wss[i] <- sum(kmeans(y9, centers=i)$withinss)          plot(1:15, wss, type="b", xlab="Number of Clusters", ylab="Within groups sum of squares")          # K-Means Cluster Analysis     fit <- kmeans(y9, 5) # 5 cluster solution          aggregate(y9,by=list(fit$cluster),FUN=mean)          y9 <- data.frame(y9, fit$cluster)          # Ward Hierarchical Clustering          d <- dist(y9, method = "euclidean") # distance matrix          fit <- hclust(d, method="ward")           plot(fit) # display dendogram          rect.hclust(fit, k=5, border="red")      i got this results: ![enter image description here](http://i.stack.imgur.com/sDW89.png) But when i did the same steps tomorow i got different results: ![enter image description here](http://i.stack.imgur.com/FISWG.png) They are not different in everything, but there are individual that they now belong to another cluster! so i don't know why this behaviour? i'm interested in interpreting and explaning the results, so when i get different results each time, that will make my previous interpretation wrong, what can i do for now ?


Geoserver, Arc 10 or Windows 7 problem?

I wonder if you can help me resolve a problem. I have given access to a WMS served up through Geoserver to various members of staff and it works fine on Arc 10 running on Windows XP. However I get an ArcMap drawing error when the WMS is called through Arc 10 running in a Windows 7 environment. I get an ArcMAp Drawing Errors box appear with the following text within it: **One or more layers failed to draw: Geoserver Web Map Service: WMS service exceptions:Service Error Description: Rendering request would use 1328087KB, whilst the maximum memory allowed is 1000000KB** The dilemma I have is I'm not sure if this is a memory allocation problem with Windows 7, Arc or Geoserver seeing as it runs without problem on XP. If it is Geoserver, I'm presuming I would need to increase the JAI Maximum Memory; how do I do that? The web isn't being very helpful I'm afraid. Any help gratefully received, Many thanks, Red.


Mapnik projection for rectangular coordinates

I am trying to use mapnik to render indoor floorplans and am having a little trouble figuring out the SRS projection. I have geoJSON that represents the floorplan. The coordinates are just cartesian points between 0 and 1000. If I render the map without providing an SRS projection, everything looks fine _except_ the y-axis is flipped (I assume it somehow auto-detects the projection?). Now I would like to provide the parameter +axis=esu in order to flip the y-axis, but that seems to require providing an SRS projection. Any ideas?


ArcGIS API for Javascript - InfoTemplate on a polyline

I have a web map with a few points and a single polyline. I have infoTemplate(s) attached to the points and tried to replicate this to the polyline however, I can't get it to work. I looked on the ArcGIS API for JavaScript site and found an example against a polygon (hover) which is close but I need an example based on a polyline. Does anyone have a code sample that works for this request? Thanks!


Query for Creating a buffer around a particular point

I am working on a project for ambulance management using GIS. using Qgis,Postgresql,Postgis I am finding it difficult querying using St_dwithin as well as St_buffer. My aim is to find any hospitals available to a victim within a particular radius.I have the information of the victims locations in form of geometry.plz kindly help.


Grass 7 / ArcGIS 9.3 - tiff to raster

Again a Grass 7 question. I have the output of a modelling run as matlab file, which I can export as tiff and load as geotiff. OK - now can I extract the data/convert this tiff into a raster proper? I also have ArcGIS 9.3, should this be the better way (I think this would work with the raster calculator - In ArcGIS 9.3, how do I split a 3-band raster (.tiff) file and summarize the band values?, but I do not have ArcGIS at the moment to try this). Still curious if Grass 7 would be able to do this. Additional info: The data contain calculated wind speeds, but the display is as color band 0-255. So the question is how to retrieve the winds speeds? I can only see them in Matlab, but in order to correlate and spacially reference I have to export the result - as tiff... Thanks in advance, Peter


How does snapping in QGIS work?

I have read a number of posts and tutorials, even the QGIS manual on snapping. I set the snapping options under _settings>snapping options_ ; selecting the two layers that I would like snapping on, setting the mode to vertex, the tolerance of 0.00002 map units and checked avoid int. and enable topological editing. I moved the on polygon on layer one, grabbing the approximate vertex to the adjoining approximate vertex on layer two. at a scale of 1:500 it looks as though it snaps correctly, but when I zoom in to a scale of say 1:1 they are not aligned properly. Am I missing something or attempting to be to accurate? Thanks for the input.


Is there a way to prevent a WMX user from adding an embedded attachment?

I would like to allow `Linked` and `URL` attachments but **prevent** embedded attachments. ![enter image description here](http://i.stack.imgur.com/G1jww.png) The `ManageAttachments` ![enter image description here](http://i.stack.imgur.com/UviUG.png) privilege seems to be all or nothing. Does anyone else require this particular configuration? How did you accomplish it?


raster2pgsql: Strange error when creating a table

Hi GIS Stackexchange people, When I try to load a asc file into my psql setup, I get a strange error message. I have created the sql input file via               raster2pgsql -s 4236 -I -C -M gis_data.asc -F public.lightning > lightning.sql      The parameters follow exactly this link here. When I try to load the data into pgsql with               psql -d database_name -f lightning.sql      I get the following error message:               BEGIN     psql:lightning.sql:2: NOTICE:  CREATE TABLE will create implicit sequence "lightning_rid_seq" for serial column "lightning.rid"     psql:lightning.sql:2: ERROR:  type "raster" does not exist     LINE 1: ...lic"."lightning" ("rid" serial PRIMARY KEY,"rast" raster,"fi...                                                                  ^     psql:lightning.sql:3: ERROR:  current transaction is aborted, commands ignored until end of transaction block     psql:lightning.sql:4: ERROR:  current transaction is aborted, commands ignored until end of transaction block     psql:lightning.sql:5: ERROR:  current transaction is aborted, commands ignored until end of transaction block     psql:lightning.sql:6: ERROR:  current transaction is aborted, commands ignored until end of transaction block     ROLLBACK     psql:lightning.sql:8: ERROR:  relation "public.lightning" does not exist      I thought that the sql input file would instruct pgsql to create the required tables, especially since the lightning.sql file starts with               BEGIN;     CREATE TABLE "public"."lightning" ("rid" serial PRIMARY KEY,"rast" raster,"filename"        text);       **Do I need to create the tables manually? What is the required type`raster`? Where is the mistake i do to get the gis data into the pgsql database?** Thank you for your advice! PS: Interestingly, my `lightning.sql` file contains a strange bit sequence. Is that normal? I thought it would be a full ascii file with sql instructions? BEGIN; CREATE TABLE "public"."lightning" ("rid" serial PRIMARY KEY,"rast" raster,"filename"   text);               INSERT INTO "public"."lightning" ("rast","filename") VALUES                                 ('01000001001975ADBD4F55B53F1975ADBD4F55B5BF0000000000003BC0B4CA4C69FDFF514000000000000 ... ')     CREATE INDEX "lightning_rast_gist" ON "public"."lightning" USING gist                       (st_convexhull("rast"));     ANALYZE "public"."lightning";     SELECT AddRasterConstraints('public','lightning','rast',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,,     FALSE,TRUE,TRUE,TRUE,TRUE,TRUE);     END;     VACUUM ANALYZE "public"."lightning";      **Was maybe the conversion not ok?**


How to view or import a pbf file (OSM data,binary format) in Arcgis or Qgis? Are any 3rd party applications needed?I would like to edit this file on any GIS Software.


How to output the ActiveView to a Jpeg image

I have an ArcGIS Desktop extension and I need to extract images from the map. How can I programmatically output the active view to a jpeg image?


Network Dataset -- can't solve route

I've built out numerous network datasets before, so I'm confused as to why I'm getting this error. I've built out a polyline file for the sidewalks in my community. Warning: No route from location "Graphic Pick 1" to location "Graphic Pick 2". Error: No solution found. I can solve a route on a single line, but not on any route that requires taking multiple lines. I checked all the options under 'location snap options', but that didn't solve it. Figuring connectivity might be an issue, I merged the entire file into a single feature, but I still got the same error. Does anyone have an idea of why it won't link up? Did I need to make sure the polygons only crossed each other on nodes so they intersected? I don't remember running across this problem before.


set values in feature class attribute table to null

I've created a point-data featureclass (fc) containing data from a simple .txt file using Arcpy as follows:               arcpy.CreateFeatureclass_management(out_path= outPath, out_name= 'fcTest', geometry_type= "POINT", spatial_reference= spatRef, has_m= m, has_z= z)      I've read the text file to create fields and fill each field with data:               #lstFields= data from the text file     #fNames= list of fieldnames     #fClass= list of datatypes     for i in range(len(fNames)):         arcpy.AddField_management(fcTest, fieldN, fieldT)      Let's say the .txt file contains the xy coordinates and two fields: fA and fB               with arcpy.da.InsertCursor('fcTest', ("SHAPE@XY", "fA", "fB")) as cursor:          for point in lstFields:              vals= point.split(";")             x= float(vals[0])             y= float(vals[1])             a= int(vals[2])             b= float(vals[3])             rowValue= [(x, y), a, b]             cursor.insertRow(rowValue)      So far so good. However, some values of fA and fB have value 9999, which actually means 'no data'. My question is: how do I convert the 9999 values to a 'real' NoData value? I thought               setNull(field_name)      might be it, but I can't get it to work. See ArcGIS help here. I tried something like:               with arcpy.da.UpdateCursor('fcTest', ("fA", "fB")) as cursor:         for row in cursor:             for i in range(len(row)):                 if row[i] == 9999:                     row.setNull(row[i])                     cursor.updateRow(row)     except Exception as e:         print e.message      Which gives:               'list' object has no attribute 'setNull'      I would appreciate any help. I'm new to arcpy and have based most of the above on the Programming ArcGIS10.1 with Python Cookbook by E. Pimpler. Many thanks! UPDATE! This works flawlessly:               with arcpy.da.UpdateCursor('fcTest', ("fA", "fB")) as cursor:         for row in cursor:             for i in range(len(row)):                 if row[i] == 9999:                     row[i] = None                     cursor.updateRow(row)     except Exception as e:         print e.message      Thanks @Artwork21


Variogram Software

I would like to know wich software are suitable to create Variograms and to know sill, nugget and range easily. I would prefer if this software could run in Linux. I've tried SAGA but lacks a lot of documentation, if you know some other software would be aprecciate.


Proximity search: ST_DWithin vs ST_Distance?

I have records stored in a table with latitude/longitude coordinates stored in a geometry field. I want to find all records nearby a user supplied reference point. Note "nearby" probably means less than 100km (possibly even smaller). Most examples I see use `ST_DWithin`. Is there a reason you can't use `ST_Distance`? What is the difference between using `ST_DWithin` and `ST_Distance` to do this? For example:               SELECT name, ST_AsText(coords)     FROM places     WHERE ST_DWithin(coords, ST_GeomFromText('POINT(-12.5842 24.4944)',4326), 1)      vs               SELECT name, ST_AsText(coords)     FROM places     WHERE ST_Distance(coords, ST_GeomFromText('POINT(-12.5842 24.4944)',4326)) < 1


Python Geoserver gsconfig create resource from Postgis store table

I've working Workspace and PostGIS store in GeoServer. I would like to use python and gsconfig to create new resource/new layer from existing PostGIS table, with: computing bbox,   adding abstract,   adding keywords,   setting style,   other attributes. Is it doable with gsconfig? Could you provide any examples?   The same goes with removing resources (layers).


Road number boxes dependent on string length?

I would like to have a coloured box behind each road number on my map, matching the colour of the road it relates to and scaled to the length of the road number. I understand this could be done with custom SVG symbols but it seems like it would be a time consuming process. The road numbers in question are labels attached to points. Could I then work a solution where a box is created _around_ that point as some of kind of data representation, basing the width on the string length of the road number? EDIT: I think I may have found a way to do this with Ellipse Marker symbols. If I work it out I will post an answer.


PostgreSQL Queries, how can I handle logic and complex mathematical functions to update a column

I have a Postgres Table of u and v wind velocity components as follows:               ugrid  vgrid     -2.7   -6     -2     -6.3     -1.7   -6.4      I need to calculate the speed and direction as per the JScript Psuedocode below and store the result in two new new columns in the table:               uu = U Value     vv = V Value          if vv = 0 and uu = 0 then everything is zero     if vv = 0 and uu > 0 dd = 270, ff = uu     if uu < 0 dd = 90, ff = -uu     if vv < 0 dd=Math.atan(uu/vv)*180/Math.PI     else     dd=Math.atan(uu/vv)*180/Math.PI+180;          if dd <0 dd=dd+360     ff = Math.sqrt(uu*uu+vv*vv)     returns dd as wind direction in decimal degrees     returns ff as wind speed in m/s      I have never worked with mathematical functions in Postgres. What is the best approach, can a Query handle this type of logic, or should I process the data in some other system first? If a query is possible, how would I construct it?


Call Identify Click Function on Dropdown Change

I am a web programmer with no GIS experience and I am working with a GIS specialist with no web service experience. I am using the JavaScript API 3.7 but I am not very familiar with the API. I have a select list containing unique identifiers for line segments within a layer. I can currently zoom to the location of the segment on change of the select but I would also like to highlight the selected segment on the map. I have set up a executeIdentifyTask on click of the map. I am not sure if I should call the click method and pass it the coordinates of the segment or if there is a different identify method that I should be using instead. Any help would be appreciated, Thanks


How to calculate correct angles for lat/lon points with the QGIS API?

I am trying to use qgis API to calculate the angle between two points by using function azimuth of class QgsPoint ( http://qgis.osgeo.org/api/classQgsPoint.html ), and my CRS is EPSG:4326 - WGS 84 , but I believe I am getting the angles wrong, as if QGIS were ignoring that the coordinates are Latitude and Longitude. Could it be possibly true? If yes, how can I properly calculate the angle and why would one want to make such a confusing function?   Thanks in advance


Drupal-Geoserver WFS error

> **Possible Duplicate:**   >  Access-Control-Allow-Origin error in web map. I am using Drupal and geoserver for my project. Drupal is running on localhost:80 and geoserver on localhost:8080. I want to send data from drupal to geoserver, and get it back to drupal to display it on a map. When I send the data to geoserver through the GetCapabilities URL I am not able to see the points in Layer->preview and the GML file is empty. When I view the error in firebug its giving: > XMLHttpRequest cannot load http://localhost:8080/geoserver/wfs. Origin > http://localhost is not allowed by Access-Control-Allow-Origin. can anyone tell me what this means and how to fix it, thanks.


Does a national(USA) interstate rest stop/rest area dataset exist?

And I don't care about format--worry about that later! I found some maps in Google maps, usually per state. I also have one map made my someone else, that no longer appears in the Google Maps search for user content. Maybe that user made it private, but I still can see it. The reason I ask is related to my google maps navigation question on android.se. I think the easiest way to get this info on the droid is to create or use a shared map in Google Maps. I can find Florida, but no others show up. Maybe it's a vocabulary issue? What else are are rest stops called?


generate a list of all themes keywords in ArcCatalog?

is it possible to generate a list of all themes keywords in ArcCatalog v9.3.1? similarly, i would like to do the same for place keywords as well? FYI. my office only have about 10 standalone ArcMap licenses, without any databases or fancy servers, other than a NAS server. many thanks!


Is toggle button's state stored in some property in Mapinfo?

Well can we retrieve On or OFF state of toggle button. Do we have any property of toggle button that can be read from toggle button that is ON or OFF?


Formatting Dates in QGIS labels

I would like to display a date field as a label. The data is from a shapefile. The field in question is a date field. When I use the date field for the label, it displays in the yyyy/mm/dd format. I would like to get it to the dd/mm/yyyy format. Is this possible. I know in MapInfo I would use the FormatDate function, I wondered whether something similar existed in QGIS.


How to change the image size (column and row number) into the same size

I’m using IDL program. But I have a question how to convert different row and column number (row/col) to the same size of column and row number of 36 time series NDVI images. These images grouped into three different column and row numbers. When I do the subset I used the same shapefile and Geographic Lat/long (WGS 84) projection for all of them. So I’d like to ask why col/row numbers of these images is different. Second how to correct their size into the same size (col/row number)? Thanks for your help


How to route over waterways?

There is a lot of information about (pg)routing over normal ways. Normal ways are man made and kind of ideal for routing. However i am interested in routing over waterways. In theory this should be the same as routing over normal ways, except that waterways are often not man made and so they consist out of large water bodies like lakes. Lakes are not a neat line that you can use for routing and apart from that you also have to consider water depth, bridges and locks that may or may not allow you to cross. And all this is of course again dependent on the size/depth of your boat. Is there any tooling available that tackles some of the issues i describe above?


Convert geodata from .rdb and .mpr files

I've got an COM-server and activeX client (looks like delphi app), that display some geodata. Data stores in files with .rdb and .mpr extensions. I find out that rdb is oracle database file format. There is no running oracle server on my machine, but application still works. Is there any tools which could help me convert this data to another preferred format (.shp or .tab or something else)?


Using Geodesic Measurements for Circle Radii?

I am currently developing an OpenLayers mapping site. Measurements can be made using a line tool, and an area tool. Both of these are currently set to calculate geodesic measurements as outlined in the OpenLayers API. I use geodesic measurements rather than planar measurements as during user testing people questioned the tool's measurements for distances they already knew (such as driving between towns). A new feature of the site is for a user to be able to draw a circle on the map of a set radius. OpenLayers only allows for drawing circles using planar distances, so when a user measures the circle with the geodesic measurement tool the values do not match. In the image below the circle planar radius is 10km, but the geodesic line measurement for the diameter is 12km. Clearly this will leave a user (and myself) wondering which is correct. ![alt text](http://i.stack.imgur.com/y2EaF.png) Looking at this answer it is seems most desktop GIS systems "ignore" this issue, and return planar measurements and distances. So what is the best practice in terms of user interface and accuracy to deal with planar and geodesic measurements? **Update** I found this Google example which illustrates the issue of radii and the Mercator projection: http://maps.forum.nu/gm_sensitive_circle2.html The JavaScript code to draw the circle is as follows:                   var lat1 = (PI/180)* center.lat(); // radians         var lng1 = (PI/180)* center.lng(); // radians              for (var a = 0 ; a < 361 ; a++ ) {             var tc = (PI/180)*a;             var y = asin(sin(lat1)*cos(d)+cos(lat1)*sin(d)*cos(tc));             var dlng = atan2(sin(tc)*sin(d)*cos(lat1),cos(d)-sin(lat1)*sin(y));             var x = ((lng1-dlng+PI) % (2*PI)) - PI ; // MOD function             var point = new GLatLng(parseFloat(y*(180/PI)),parseFloat(x*(180/PI)));             circlePoints.push(point);             bounds.extend(point);         }      Does this circle take the curvature of the earth into account? **Final Update** Working code posted at http://geographika.co.uk/creating-a-geodesic-circle-in- openlayers


Data Source: Address ranges for every block in NYC

I'm looking for data that defines the address ranges used on NYC blocks. On this screenshoot you can see google has noted the first addresses on each block of West End Avenue and 92nd/93rd/94th st. (658, 680 and 700 respectively). Based on that info I can extrapolate assuming that there's an even/odd side of the street and there's no unrepresented addresses to get something like this (inefficient representation used only as an example):               Street | btwn1 | btwn2 | first | last | side          -------------------------------------------------      W End | w 92  | w 93  |  658  | 678  | west/even      W End | w 92  | w 93  |  659  | 679  | east/odd      W End | w 93  | w 94  |  680  | 698  | west/even      W End | w 93  | w 94  |  681  | 699  | east/odd      Can anyone suggest a source of this type of data? Basically it's a poor mans geocode so I can convert an address (Jeryl Metz Books - 697 West End Ave) into a suggestion of how to get there (West End btwn 93/94) even without an internet connection. I'm sure this data is contained within OpenStreetMap, but I don't have a clue as to how one might extract/generate what I need. ![West End btwn 92nd and 94th st](http://i.stack.imgur.com/3JqNw.png).


Alternating ESRI scale bars in QGIS

I'm a recent convert to QGIS from arc and think it's amazing, so much more efficient and usable. It also doesn't crash constantly which helps me keep some of my sanity. I was having issues finding some features though. Mainly an alternating scale bar like in Arc, where there are smaller grading's at the start of the scale bar moving to larger near the end, (to help emphasize distance) and i think it looks cleaner.


How often are MapQuest tiles updated with new OSM data?

When users make edits to OpenStreetMap, how long does it generally take for those edits to show up in the MapQuest tiles? Is this on the order of hours, days, or months?


Creating catalog of vector layers using ArcGIS Platform?

Is there a way to create a catalog of vector layers in ESRI? We have thousands of tiles of 25cm contour data which we need to individually find and add to maps. It would be so much easier if there was a way to load the best available tiles based on the current map extent. For Raster we use the Mosaic Dataset which works very well but is there a similar format for vectors? Mapinfo has hotlinks so we use the index tiles to open files in the frame without having to find the tiles but the best system is the Global Mapper Catalog (gmc) format which works great for vectors and rasters but a search online shows nothing for ESRI (the last mention of this though was in 2005). Any ideas?


ArcGISDynamicMapServiceLayer change layer hierarchy

I am building an application off an existing map server using the javaScript API. The server has about 10 layers that I am loading into my application as a ArcGISDynamicMapServiceLayer. Once I have loaded the layers into my application, is it possible to re-order their hierarchy? For example move the roads on top of the streams or move the parcels under the roads. I have already found that I cannot change the transparency of just one layer, and can only adjust for all layers at once. My guess is that it is not possible to reorder the layers from the browser. If this is the case how should I suggest my clients reconfigure their map server? Should each layer they want in the application be an individual mapService? Any other suggestions?


Can not import qgis.core in python

I installed OSGeo4W. I have no other Python version on my computer. I can `import osgeo`. But when I try to import `qgis.core` I am getting the error:               >>> import qgis.core     Traceback (most recent call last):       File "<stdin>", line 1, in <module>     ImportError: No module named qgis.core      What could be the reason for that?


Efficiently check for equal adjacent values in raster calculator

I have a raster consisting of integer values in each cell. I want to check every adjacent cell in a 3x3 grid to see if **any** one of the adjacent cells has a value EQUAL to the center cell, and if so, give the output raster a value of 1 (else give it a value of 0). I have already accomplished this like so:               Con("raster" == FocalStatistics("raster", NbrIrregular("C:\filepath\kernel_file.txt"), "MAXIMUM"), 1, 0)      Where the kernel file looks like this:               3 3      1 0 0     0 0 0     0 0 0       Then again for another possible combination:               3 3      0 1 0     0 0 0     0 0 0      And so forth:               3 3      0 0 1     0 0 0     0 0 0       Then I have to combine all of the rasters at the end to get one final raster. Is there a more efficient way to accomplish this? It shouldn't be necessary to loop through the raster this many times to get what I need. Raster calculator solutions will work, but ArcObjects solutions are welcome as well as the end result will likely end up being implemented in ArcObjects.


How can i use arcgis server services in arcgis viewer for silverlight?

I want to create a webgis using arcgis viewer for silverlight. i install arcgi viewer . when i want to connect to arcgis server service , the application show the error" unable to connect to "http://server name/ArcGIS/services/test". I copied clientaccesspolicy.xml into C:\inetpub\wwwroot but the application show same error . i tried "http://server name:8399/arcgis/services/test" but it doesn't solve my problem. i couldn't find any good help for this reason . what's my problem ?


How to handle interpolation of multiple (quality) tiers of irregular data?

I'm going to try to provide a high level overview of the issue - realizing that more details/info will be necessary - but I don't want to write a novel that seems too overwhelming for people to respond to :) **Background** : Let's say I have 3 sets (A, B, C) of irregular point data of varying quality; A is "better" than B and B is "better" than C. One or more data sets might have data for a given point. **Goal** : Create a grid/map that contains the "best" possible data. **Example/Possible Solution** : Use some sort of inverse distance weighted algorithm in combination w/somehow weighting the better datasets more than the lower quality data sets. Please feel free to post follow-up questions as I know my original post is rather vague. Thanks in advance.


Calculate Blue sky albedo from Black sky albedo and White sky albedo

I have got values for Black sky albedo and white sky albedo, from MODIS imagery. What is the simplest way to calculate blue sky albedo? I want to use albedo for snow cover. A website which has listed this formula: `Blue-sky (Actual) Albedo = White-sky Albedo * f(optical depth, solar zenith angle, aerosol type, band) + Black-sky Albedo * (1 - f(optical depth, solar zenith angle, aerosol type, band))` Now the thing is I don't have solar zenith angle, aerosol type etc.. What do I do? Please help


Restricting Tin interpolation in QGIS

I am trying to do a bathymetric map for a lake using QGIS. However, I see no option to impose a mask so interpolation does not extending beyond the boundaries of my lake. I have traced around the lake (polygon) to which I would like to restrict the interpolation. Is there a "set mask" function in QGIS that would restrict all subsequent calaculations? I know how to convert the polgon to raster if needed. I have cliped to the lake boundaries but it still runs over. Do I need to go to GRASS to do this? Using version 1.8 on Windows 7. Thanks Alyre


How can I add the frequency (count) of a point shape file on an animated map?

The problem is this: I have a crime (point) data on a map which is animated via time slider using a 1-week-period. I see all the points I added without a problem, I also added a dynamic text indicating the time period on each frame video shows. I just would like to add in a text (I guess this should also be dynamic) the count of crimes (points) on each time period (week). Thanks


QGIS [500]INTERNAL SERVER ERROR

My Name is Daniel and I'm from Indonesia. Short story recently I was learning how to set up qgis server. So here's the trouble I've encountered so far:   1. I was using OSGEO Live 5 Distribution ISO' Installed in dual boot mode with windows 7   2. I got the GetCapabilities work after fresh install. the response was as indicate in qgis server manual, the XML info about layer etc   3. After I execute update software system, then I tried to do the GetCapabilities returned 500 Internal Server Error. I didn't do any change in the qgis system which was worked fine before software update. What should I do to tackle this error * * * thanks for the tip mr unicoletti and to add that I'm very new to linux or foss, it just my work project have positioned me to like it or not to learn linux and foss. so I followed up advice I open the error.log have information such as following:               [Sat Dec 24 22:33:54 2011] [error] mod_fcgid: process /usr/lib/cgi-bin/qgis_mapserv.fcgi(1862) exit(communication error), get unexpected signal 6      [Sat Dec 24 22:33:59 2011] [warn] [client 127.0.0.1] mod_fcgid: error reading data, FastCGI server closed connection      [Sat Dec 24 22:33:59 2011] [error] [client 127.0.0.1] Premature end of script headers: qgis_mapserv.fcgi      [Sat Dec 24 22:34:05 2011] [error] mod_fcgid: process /usr/lib/cgi-bin/bik/qgis_mapserv.fcgi(1864) exit(communication error), get unexpected signal 6      [Sat Dec 24 22:35:10 2011] [notice] caught SIGTERM, shutting down      what the information state and a follow up action to take to troubleshoot the error. I also attached a link to the error.log file http://www.mediafire.com/?3zeuz48eeu8g8v1 thank you for kind people who help me...


GIS Consulting - How to Get a Foot in the Door?

I currently work for a very large company as a GIS developer, and while I am happy in my position for the most part, I can't help but wonder what life as a GIS consultant (i.e. working for myself) would be like... I know there are many excellent GIS consultants on this site, and I am wondering on how they got their start. Are there any good sites where companies and/or organizations post GIS related requests? Can they offer any strategies on how they market themselves to companies/organizations? Any other tips to test the waters per say? I'd also be interested in hearing about life as a GIS consultant. Any experiences or thoughts welcome.


Spatial+Temporal database request for 4D intersection

Here is the function I need to implement. My application deals with mobile objects with variable position and range (think of radar range). As I can't test each minute if n mobiles detect each other (server would be overloaded), I need to precalculate "future" position and time when they'll detect each other from their planned route and only register the "future" event in a stack. Each time a user changes the planned route, I'll recalculate event related to all intersecting routes from other mobiles. The best way to do that is to make a kind of 4D intersection request and update, and be able to detect when and where mobiles will "collide". Is it possible with a classic geodatabase like PostgresQL+PostGis and another plugin, or do I need to look at specific n-dimensional database ?


how to show information window for the marker cluster

This is my markercluster code : i need information window for the markercluster icon as well as marker icon, i have another cluster.js file, can some one please tell me how can i show the information window for cluster icon when single mouse clik, and same for the marker icon               function initialize(doc) {         var mapDiv = document.getElementById('logitmap');         var latlng = new google.maps.LatLng(37.4419, - 122.1419);         var options = {             center: latlng,             zoom: 2,             mapTypeId: google.maps.MapTypeId.ROADMAP         };         // Creating the map         map = new google.maps.Map(mapDiv, options);         bounds = new google.maps.LatLngBounds();         var jsonData = eval("(" + doc + ")");         var markers = [];         var markerIconURL;         markerIconURL = jsonData[0].markerIconURL;         for (var i = 1; i < jsonData.length; i++) {             var input = jsonData[i];             var gtype = input.Gtype;             if (gtype == "marker") {                 var latLng = new google.maps.LatLng(input.latitude, input.longitude);                 var marker = new google.maps.Marker({                     position: latLng                 });                 markers.push(marker);             }         }         var markerClustererOptions = {             imagePath: markerIconURL,             zoomOnClick: false         };         var markerCluster = new MarkerClusterer(map, markers, markerClustererOptions);     }


Automate “add junction flag-->trace downstream-->update field”

I have two point feature classes in a geometric network, say featureA and featureB. FeatureB is downstream of featureA. And there are about 10 featureB points downstream of 1 single featureA point. I need to update a field in featureB base on a field in featureA after trace downstream by selection. I can do this manually by place “add junction flag” on individual point in featureA, and trace downstream by selection. Then update the field in selected featureB points(fieldB2) based on the value in featureA field(fieldA1). The problem is: I have 2000 points in featureA. I would have to repeat above process 2000 times. Since it’s a repetitive process, is there any way I can automate this.   1. If FieldA1 is not Null: place a junction flag-->trace downstream by selection   2. Update selected fieldB1: FieldB1=FieldA2 Thanks


Count gaps between polygon in spatialite

I have a database (.db) with a table that contains thousands of polygons containing id and geometry. I like a query that can get me the 'number of errors where there are gaps between polygons". How can I prepare such a query ? What GIS function I can use ? let's suppose table structure :: table name : temp1 column name :: id (integer) : POLYGON_ID geometry


Using GeoServer REST API and C# to create Layer Group

Following information at this link in the section on creation of layer groups, I've created the method(C#):               public bool AddToLayerGroup(string layerGroupName, string layerName)             {                 try                 {                     string gUrl = GEOSERVER_HOST + "/rest/layergroups";                     WebRequest request = WebRequest.Create(gUrl);                          request.ContentType = "application/xml";                     request.Method = "POST";                     request.Credentials = new NetworkCredential(GEOSERVER_USER, GEOSERVER_PASSWD);                          byte[] buffer = Encoding.GetEncoding("UTF-8").GetBytes(GetAddToLayerGroupXml(layerGroupName, layerName));                     Stream requestStream = request.GetRequestStream();                     requestStream.Write(buffer, 0, buffer.Length);                     requestStream.Close();                          WebResponse response = request.GetResponse();                          return true;                 }                 catch (Exception)                 {                     return false;                 }             }      When I run a unit test against this method, I get an `Internal Server Error` reported from GeoServer if I use `POST` HTTP method. Now the `layerGroupName` and `layerName` used in the above method are already existing in GeoServer. What I want to achieve is provide a way to create a layer group if it doesn't exist, or just use an existing one. The `layerName` always already exists in GeoServer, as I'm using a separate method to create them. Can anyone spot any problem with my code above. Or, suggest an alternative approach. cURL or Java or C# examples are welcome. Thanks in advance. UPDATE: From Tomcat logs, GeoServer complains that the layer group I've specified already exists. Is there away to add a layer to an existing layer group using the REST API?


ArcGIS iteration naming

I'm trying to use the iteration function in ArcGIS model-builder. To avoid overwriting the output raster, I used %Name% inline variable. But the name of my files are getting bigger and bigger overtime (I use the outputs in another set of iterations). Is there a way to select only part of the file name and not all of it? Thanks


Exporting attribute data from vector data by selecting object in QGIS?

I'm using QGIS (2.4.0), and i need to export the attribute data of the object i select (shapefile) to another file ( Excel, txt,...it is yet to be determined depending on the solution). I know how it is done manually, but this action has to be done over a thousand times, and it can only be done one object at a time... I'm looking for a automated proces where just by selecting a object the attribute data is written on the fly into the other file. Does anyone have a solution, or an easy workaround, for this?


Generate MBTiles from xml

I need to generate hundreds of MBTiles from different shapefiles and same styles, so I created a xml from tilemill with a single shapefile and styling, using python landez library to generate MBTiles from this xml (keep changing datasource for each shapefile). Problem is landez is taking too long to create while tilemill is faster in exporting MBTiles, also through landez, few tiles are missing at different zoom levels (blank tile, so default color). I was just wondering if this can be done using tilemill, (tilemill seems to export only projects). PS: I want to do this process through terminal.


Openlayers heat map not displaying properly in html

I was wondering if you could help me with something I am trying?? Created a heatmap from a sql point table using sld in GeoServer. Displays fine as a preview:- It looks tiled when I publish it to the web mapped:- Here is my HTML Code:-               <meta charset="utf-8">     <script src="http://www.openlayers.org/api/2.11/OpenLayers.js"></script>     <script>                        var map, layer;              function init(){             var epsg900913 = new OpenLayers.Projection("EPSG:900913");             var epsg4326 = new OpenLayers.Projection("EPSG:4326");             var cent=new OpenLayers.LonLat(143.841243,-37.833563).transform(epsg4326,epsg900913);                                                      var osm = new OpenLayers.Layer.OSM("Open Street Map");                                                      awms = new OpenLayers.Layer.WMS("GPS Boundary", "http://172.16.3.68:8080/geoserver/GPS/wms",                 {                     version: "2.5.2" ,                     layers: "GPS:LGA_POLYGON_GPS",                     transparent: true,                     tiled: true                 },                 {                     visibility: true,                     sphericalMercator: true,                     displayOutsideMaxExtent: true // Will not appear with certain zooms without this option                 }             );                                                      bwms = new OpenLayers.Layer.WMS("House Points", "http://172.16.3.68:8080/geoserver/GPS/wms",                 {                     version: "2.5.2" ,                     layers: "GPS:House Points",                     transparent: true,                     tiled: true                 },                 {                     visibility: true,                     sphericalMercator: true,                     displayOutsideMaxExtent: true // Will not appear with certain zooms without this option                 }             );                  cwms = new OpenLayers.Layer.WMS("Animals Heatmap", "http://172.16.3.68:8080/geoserver/GPS/wms",                 {                     version: "2.5.2" ,                     layers: "GPS:Animals",                     format: 'image/png',                     transparent: true,                     singleTile: true,                      ratio: 1                 },                 {                     visibility: false,                     sphericalMercator: true,                     displayOutsideMaxExtent: true // Will not appear with certain zooms without this option                 }             );                            map = new OpenLayers.Map("map",{                 layers:[osm,awms,bwms,cwms],                 center: cent,                 zoom: 10             });                                                      var switcherControl = new OpenLayers.Control.LayerSwitcher();                                                 map.addControl(switcherControl);                                                 switcherControl.maximizeControl();      //Variable Scale Bar var scaleline = new OpenLayers.Control.ScaleLine({ div: document.getElementById("scaleline-id") }); map.addControl(scaleline);                                                           map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));                                                      }                        </script>      ![example of in HTML](http://i.stack.imgur.com/AP1GG.png)


Creating blended colour relief in QGIS?

I am mapping mountainous areas in QGIS 2.4 and would like to recreate the beautiful blended colour relief found, for example, in the map shown at http://maps.kartoza.com/Boosmansbos/. While I am able to copy the RGB values of the colours from the key at the side of the map, and map them into my own elevation bands, I am unable to recreate the 'blended' effect between the elevation bands as QGIS produces a 'hard' line between elevation levels. * * * I'm using the basic mode I suppose which is the menu at the top, Raster - Terrain Analysis - Relief, then mapping the colour bands that way. I thought I might be able to get a 'blend' by overlapping the elevations slightly in each band, but it doesn't seem to let me do that.


QGIS 2.2 - spectral profile for multilayer/time series

I am missing a spectral profile in QGIS which enables me to see the values for all bands of a given pixel. (absolutely necessary for multispectral and multitemporal/time series work) It seems, there has been such a plug in called "earthbeat". http://hub.qgis.org/projects/earthbeat/wiki This is exactly what I need, but the plugin seems to not work for QGIS 2.2 . It should be in the official repository. Am I getting anything wrong? Thanks for help and clarification.


export map state as JSON: Web_Map_as_JSON

Is there a way to export the current map state as a JSON object, mostly named **Web_Map_as_JSON**. The JSON specification should be like this. In other words, it would be convenient to have a function for the Map object, like myMap.Web_Map_as_JSON() that would provide the current state of the MAP.


conversion from .osm to .map with mapwriter plugin fails

I have a problem with Osmosis v 0.43 with mapsforge mapwriter plugin 0.3.0. on Windows. A command               osmosis --read-xml file=C:\geo\testmap.osm --mw file=C:\geo\genmap.map     bbox=0.0,0.0,51.9,19.2      fails with error:               SEVERE: Thread for task 1-rx failed     java.lang.AbstractMethodError:     org.mapsforge.map.writer.osmosis.MapFileWriterTask.initialize(Ljava/util/Map;)V     at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:95)     at java.lang.Thread.run(Unknown Source)      I tried using --rx with --wx and obtained no errors, so something must be wrong with the mapwriter plugin. Using earlier version of Java did not work, as I suspected it could be a java related problem.


How to use Mapserver+Openstreetmap for tracking service effectively?

I have got Asset tracking installations for many clients. The availability of GIS map data for every client location seems to be the tough part. I have got a MapServer WMS installation. Can I use OSM data behind mapserver? Also I need to timely update with latest OSM data.   Is there any mapfile (MapServer map style configuration file) for OSM data?   And is PostgreSQL/PostGIS also a better option to include? Update: I followed exactly the instructions on http://trac.osgeo.org/mapserver/wiki/RenderingOsmDataUbuntu as advised by mapper. Everything worked fine. Got the osm-gooogle.map. But, when I browsed `http://localhost/cgi-bin/mapserv?map=/var/www/osm-demo/mapserver-utils- svn/osm-google.map&mode=browse&template=openlayers&layers=all`   There was few things to change in the generated mapfile. Mainly, the IMAGEPATH & IMAGEURL were inside METADATA tag. Moved them outside to WEB tag and everything worked fine. It started drawing Google styled map from OSM data stored in local PostGres DB.


Creating fishnet from template feature class using ArcPy?

I can’t use the tool arcpy.CreateFishnet_management because define the parameter “templateExtent” with a shapefile it is not filling automatically the parameters “originCoordinate” and “yAxisCoordinate”.               import arcpy     from arcpy import env     env.overwriteOutput = True     env.workspace = r"D:\Users\julia\erste_aufg"          #Process: Create Fishnet     outFeatureClass = r"D:\Users\julia\erste_aufg\at001l_wien\at001l_wien\wien.shp"     cellSizeWidth = '200'     cellSizeHeight = '200'     templateExtent = r"D:\Users\julia\erste_aufg\at001l_wien\at001l_wien\at001l_wien.shp"          arcpy.CreateFishnet_management(outFeatureClass, "", "", cellSizeWidth, cellSizeHeight, '0', '0', "", "NO_LABELS", templateExtent, "POLYGON")      ![enter image description here](http://i.stack.imgur.com/u5vKo.png) It is working in the ModelBulider, so something is running in the background of the ModelBulider that it could create the parameters “originCoordinate” and “yAxisCoordinate” when it has a “templateExtent”. How can I get this tool running in ArcPy by having just the parameter “templateExtent”? I would be really happy if someone has a solution because I need the Fishnet in a scripttool and cannot go one without because in the end there is a loop so the values of the extent are always different. the first part of the whole script


Arcobjects/Arcgis Engine -- geoprocessing within a buffer?

I have a point layer and a polyline layer (each contains more than 100k records), I would like to process the polyline layer within point buffer zones. For example, for each point in the point layer, identify polylines that within a 10m buffer zone and calculate point-to-line distances. It would be something like:               for point in points_layer:         create a 10m buffer;         identify polylines that intersect with the buffer;          do point-to-line distance calculation;      Is there a way in AO/AE to do geoprocessing within buffer zones? Thanks!


How to calculate total number of data cells in raster?

I am using ArcGIS 9.3 and python 2.5. My code is shown at the bottom of this post. I have a raster containing fire intensity information at 200m cell resolution. I run the script and the first count cell part returns the size of the fire. This works fine. I then clip the raster using a polygon representing a forested catchment. The new raster represents the area of the catchment that is burnt. When I try to use the same code to count the number of cells of the new raster, it always gives me an answer of zero, even if there is definitely a raster created by the clip tool. I have tried every combination of every tool I can think of. my code...                   fire = str(ignitionID) + "_" + str(weatherID) + "_Intensity.asc"         print "fire: " + fire              # ---------------------------------------------------------------------------         # this section calculates the size of the fire for model calibration purposes         # ---------------------------------------------------------------------------              # Process: Build Raster Attribute Table...         the_fire = input_fires + fire         shutil.copy(the_fire, "C:\\FIRESTORM\\Workspace") # copy the fire to workspace         the_fire = "C:\\FIRESTORM\\Workspace\\" + fire              try:           gp.BuildRasterAttributeTable_management(the_fire, "NONE")           resultf = gp.GetCount_management(the_fire)  # count num of rows in raster           countf = int(resultf.GetOutput(0))           fire_area = countf * 4  # each cell has an area of 4 ha           print "the fire area = " + str(fire_area) + " ha"              except:  # the attribute table cannot be created coz the fire is too large                fire_area = 300000 # default value for large fires 300000 ha           print "the fire area EXCEEDS 262,140 ha"              # -----------------------------------------------------------------------------         # this section calculates the area of the catchments that are burnt by the fire         # -----------------------------------------------------------------------------              # Local variables...         catch_extent = input_catch + "WS_Catchment_region.shp"  # catchment boundary         fire_raster = "C:\\FIRESTORM\\Workspace\\fire_raster"         fire_ascii = the_fire         Output_raster = "C:\\FIRESTORM\\Workspace\\Extract_ASCI1"         Output_ASCII = "C:\\FIRESTORM\\Workspace\\rastert_extract1.asc"         catch_burn_area = 0  # reset catchment burn area              # Process: ASCII to Raster...         gp.ASCIIToRaster_conversion(fire_ascii, fire_raster, "INTEGER")              # Process: Define Projection... based on projection of catch_extent         desc = gp.Describe(catch_extent)         spatialRef = desc.SpatialReference         gp.DefineProjection_management(fire_raster, spatialRef)              # Process: Extract by Mask...         gp.ExtractByMask_sa(fire_raster, catch_extent, Output_raster)              # Convert raster to ascii         gp.RasterToASCII_conversion(Output_raster, Output_ASCII)              # Process: Build Raster Attribute Table...         gp.BuildRasterAttributeTable_management(Output_ASCII, "OVERWRITE")              # count number of rows in raster         resulti = gp.GetCount_management(Output_ASCII)         counti = int(resulti.GetOutput(0))         catch_burn_area = counti * 4  # each cell has an area of 4 ha              print "catchment area burnt = " + str(catch_burn_area) + " ha"


QGIS 2.0 Table Join creates unwanted prefix in field names

I used to join shapefiles and CSV files via the "joins" tool in the layer properties just fine in QGIS 1.8 . Now i've updated to QGIS 2.0, and when i do the exact same thing, QGIS puts the name of the CSV source as a prefix in the field name: for example instead of just naming the field "area" it's now labelled "sourcefile_area". I googled it, and searched in the qgis settings, but didn't find anything that helped. maybe I just don't know what exactly to search for though. Thanks in advance! Greetings Gunnar


Is it possible for Geoserver to create a WMS that pulls red, blue, green channels from different data layers?

If I have three separate raster datasets available in my GeoServer instance, each with one channel of 8-bit unsigned int values, is it possible for me to somehow create a single WMS service that pulls the red, green, and blue channels from these three separate sources? The way I am doing this now is to use gdal_merge.py to combine the three data sources in advance and then store the rgb output product as its own data layer with its own WMS service. If possible I would prefer to combine the channels on the fly at the time of a WMS request. I know that generally, rgb channels can be defined for a WMS using a colormap, but I've not been able to find any way to pull from multiple datasets within a single colormap. Any ideas? I realize this is an unusual thing to want to do in the first place but you'll just have to trust that I have my reasons.


Multiple script hyperlinks not loading in ArcGIS

I've set up my layer to use hyperlinks based on a script. When I use the Hyperlink tool and click on a link, often times it loads just fine. ![enter image description here](http://i.stack.imgur.com/BoMPG.png) The problem I have is when there are multiple points on top of each other, each with their own hyperlinks. A window opens that allows me to select the hyperlink I'd like to use. The problem is, I can't seem to activate the hyperlink. Note that these links are used by a script hyperlink. That's why they aren't websites or document paths. I've tried selecting the link, and clicking "Jump". I've tried double-clicking the link. I tried pressing "Enter" on the keyboard. I tried the Space Bar. Nothing seems to activate the links. Are multiple script links from multiple points not supported in ArcMap 10? Is there another way to activate these links that I haven't thought of yet?


Why are there blank in the ST_AsGeoJSON results?

I have a vector layer tipor several polylines. I opened this layer in QGIS and exoportar to a spatial table in PostGIS. ST_AsGeoJSON want to use the function to get the GeoJSON to draw on Google Maps. I used the select below:               SELECT ST_AsGeoJSON (geom), Codlin         FROM "lines";       I noticed that in the result column st_asgeojson few lines comes in white and records that return blank geom field of the table space is blank. I think some records of my table are not georeferenced. How can I fix this error?


Easily calculate "roundness/compactness" of a polygon

I am trying to find ways to quantitatively describe the shapes of various polygons. For my project, these polygons represent lakes, rivers, lagoons, and parks. So they can be almost any shape. One easy metric is to calculate perimeter vs. area, which is at best an only slightly useful metric. But I would also very much like to be able to say something about the 'roundness' of a polygon. Or how 'compact' the shape is on a map. The only way I can think of doing this easily is to calculate the area of each polygon in relation to a bounding box for that polygon (which I already have). But this seems like a poor solution. So now I am thinking of something more like this - take the centroid of the polygon, add on a series of buffers of increasing areas (say 50%, 100%, 150%), then compare how much overlap there is between each buffer and the original polygon. A perfect circle will have perfect overlap at 100%, and I can use the 50% and 150% buffers to judge how much and in what way each polygon differs. But even that feels cumbersome, and like a poor workaround for what somebody else has probably already figured out far better. If anyone can point me in the right direction, I'd greatly appreciate it. For reference, at a minimum I will need to be able to look at the resulting indices for the shape of various polygons, and be able to make an educated guess as to their source (River? Reservoir with dendritic shape? Lake/Lagoon? Park?)\


Add Custom Data to OpenLayers Plugin for QGIS

Is there a way to add custom data to the OpenLayers plugin for QGIS? I have tiled data using Map Tiler, which has produced my zoom levels, and an OpenLayers.html. I am hosting it internally on our servers, and I would like to access it from the OpenLayers plugin. Thoughts on where to start? Thanks...


Can you change the processing extent in environment settings using python to a shapefile?

I have managed to do this manually at Geoprocessing>Environments>Processing Extent and setting the shapefile in the drop down bar. I was wonder if this could be automated with a python script? My goal is to create a loop to change the processing extent prior to using spatial analysis tools on a various rasters that represent the areas of the shapefiles. This will keep their extent size minimal. Edit (Current Code): (Not working)               for i in range (31):     ... arcpy.env.extent = (r"C:\Folder\Shapefile"+str(i)+".shp")      Receiving a runtime error stating "Error in accessing environment "


Download mapbox default style as tiles

I need to have the tiles of a small city as PNGs. The style should be the same as in https://www.mapbox.com/editor/? Can I export the map there for a certain bounding box to tiles (or mbtiles)? I have setup a project but export to mbtiles or tiles does not seem to be available. Or is it (as a workaround) possible to export just the mapbox default style in order to use this style with TileMill? I have seen the OSM Bright style, but I am not sure: Is this the same style as the default mapbox style?


Pgrouting, pgr_dijkstra function error

I'm starting to use the Pgrouting function on my database Postgresl. I have the table of links (id, source, target, cost) which contains the set of edges of my graph. I want to calculate the shortest path of a given node to another. The `pgr_dijkstra` function returns an error that I have not understood. Here is the table of edges: ![The table of edges](http://i.stack.imgur.com/Lrzw9.png) When I'm trying to run this request:               SELECT seq, id1 AS node, id2 AS edge, cost     FROM pgr_dijkstra('SELECT id, source,target, cost FROM ubanlinks', 244225135, 598385915, false, false);      It returns this error: > ERREUR: Error computing path: Unknown exception caught! ********** Erreur > ********** ERREUR: Error computing path: Unknown exception caught! État SQL > :38001 Does anyone have an idea as to what is the problem of my request or my table?


GWR and OLS regression models

I'm somewhat confused about regression models. I decided to create a GWR model for a project using 35 polygons of health data. However I find now that my model has flaws and I cannot create a GWR model probably because the dataset is too small. When creating a OLS are we meant to remove all variables that are related? if I'm modelling obesity, I would think that income, exercise are factors that relate to it so what purpose does the OLS model serve? I created a model after removing auto correlated variables but I'm kind of confused as to what its meant to be showing.


How can I define the extent setting of environments programmatically in VBA?

I use the following line of code to define the extent setting of the environments GP.Extent = "144566.589424822 351191.130242809 145772.160224822 353810.742942809". However, I need to define it programmatically via the boundaries of a layer like the procedure is carried out in any relevant window (e.g. in Clip window) :'Environments'-'General Settings'-'Extent'-'Same as layer...'. Thanks Demetris


Difference between network dataset and geometric network

In ArcGIS, what is the difference between a "network dataset" and a "geometric network"? Are there differences with what can be done with each?


Realtime traffic data provider(s)

What services provide realtime (or daily-updated) basic traffic informations for Western Europe ? For example, traffic.com/Navteq provides such data to Bing Maps for US/Canada and Microsoft suggests CENTRICO/OTAP for Europe in its documentation (which is outdated, EasyWay seems to have replaced this service), but its website is slightly confusing. Are there other major actors in this market for Europe ? * * * For example, One Step Ahead seems to provide [free] data for Germany, Netherlands and Belgium, but it's a single file per country (hence not tiled data), and I'm not sure how often it is updated.


Help needed for extended symbol

I am trying to extend Symbol class in ARGIS Flex API. this is my widget named TestWidget http://pastebin.com/04w6RSur and here is the extended symbol class http://pastebin.com/bqhDzdSe named CustomSymbol placed in Test package in flexviewer 2. I had drawn a circle and a line in CustomSymbols sprite like this:               sprite.graphics.beginFill( 0x0000FF,1 );     sprite.graphics.drawCircle(0,0,100);     sprite.graphics.endFill();       sprite.graphics.lineStyle(5,0xFF0000,1);     sprite.graphics.lineTo(mapPoint.x+100,mapPoint.y+100);      when I zoom into map it shrinks its size and when I zoom out it grows accordingly. What I want is make it retain its size whether I am zooming in or zooming out. Thanks


Join attributes of point and line layer by location (closest distance) in QGIS

My problem is the following: i have a line shp (target layer) and a point shp (join layer). the second one (point layer) holds an attribute which i want to join with a line layer based on closest distance to the line. Points and lines are not intersecting I can do this with arcgis and spatial join(match option: closest), but i don't know how can i achieve this in Qgis. I'd really appreciate an answer for this. Miha


mapserver postgis

I have a problem with my connection to my db. I get this message: `msPostGISLayerOpen(): Query error. Database connection failed (fe_sendauth: no password supplied ) with connect string 'host=localhost user=postgres dbname=ejemplo'Is the database running? Is it allowing connections? Does the specified user exist? Is the password valid? Is the database on the standard port? msDrawMap(): Image handling error. Failed to draw layer named 'municipios'.` I have no password set on my db and I don't know why I can't connect with it.


labels showing up behind other labels due to unmatched z-index

I am using leaflet label plugin to show labels on markers by using `layer.bindLabel('name')`. As the number of markers is high the markers come above the label thus labels are not visible clearly. ![enter image description here](http://i.stack.imgur.com/wMy0q.jpg) Seems marker and its label have same z-index. I tried changing the z-index of marker by `.leaflet-marker-icon{ z-index: 1000;}` and also that of the label `.lealet-label{z-index: 1001;}` but still the result is the same and the z-index of marker is not changed either. What would be solution to this problem?


Make feature layer based on date, problem in python

I have a script that runs, that takes the current date and puts into a variable, which is then used to calculate the date field for the Feature class. Further in the script, the updated data is loaded into the live SDE feature class. The old data get deleted with the following task. 1 - Make Feature layer, where the date field is not equal to the date variable. 2 - Delete these features. My problem is that the to create feature layer is empty as i can't get the syntax right. I have tried the following               gp.MakeFeatureLayer(myOutputConnexion + os.sep + "SY_PLN_MON_INFO.LLPG_POINTS","OLD_LLPG_POINTS","GIS_TIMESTAMP <> TO_DATE('" + ExactScriptTime + "00:00:00' ,'YYYY/MM/DD HH24:MI:SS')")      and                   gp.MakeFeatureLayer(myOutputConnexion + os.sep + "SY_PLN_MON_INFO.LLPG_POINTS","OLD_LLPG_POINTS","GIS_TIMESTAMP <> TO_DATE(' + ExactScriptTime ','YYYY/MM/DD HH24:MI:SS')")      The ExactScriptTime variable value is 21/08/2012 13:00:07 (which gets created in at the start of the script). I know that the feature layer is empty because i have exported the feature layer into an FC, and it is empty. Has anyone got any ideas on where I am going wrong. Thanks


Are There Any OpenSource GIS Software Programs With an "Interactive" Rotate Feature Option?

![Rotate feature option][1]Sorry if the question is too simple, but are there any open source GIS software programs available with an interactive "Rotate vector feature" option? Eg : ArcGIS has it in Editor\Rotate. Manifold has it in Transform toolbar (but its only angle based, not interative) . Any help is appreciated.


Correct Use of MBTiles PHP Script

I have installed the OSGeo4W web server tools on a Server 2008 machine, and I would like to serve MBTiles to Leaflet. I have tried these: Zverik's mbtiles-php Infostream's mbtiles-php fork The required php files and .htaccess were placed in a directory under \htdocs and Apache happily serves files from there. However, I am unable to form any URL that retrieves tiles. Firebug shows a '200 OK' on the tile request, but no content. Given that the mbtiles database and the script reside in a directory called 'mbtiles', can anyone inspect the scripts and explain how to properly form the URL? A proper L.tileLayer string for Leaflet would also be accepted. Also, any other minimal configuration solution (that will run on the OSGeo4W install) that will serve my .mbtiles to Leaflet would be accepted. Thanks -tom


I am using PyQGis API to create a custom application. How do I allow users to select features with the mouse? Is there a mapTool for this? Surely with a product as powerful as QGis there must be. Thanks in advance


How to view attribute table in layer within ArcGIS Server map service?

I'm new to ArcGIS Server and am trying to publish layers within an mxd to ArcGIS Server. When I bring the published map service back into Arc there is no Open Attribute Table option although I am able to identify the data. Is there away of displaying the attribute table?


Can't pan around my OpenLayers map .. unless there are no Layers under the mouse

So I've got my map displayed and some `Features` added to a `Layer`. All good, etc. When I try and pan around my map, I can only pan when I left-click the mouse .. hold .. and drag the mouse ... when the mouse cursor is NOT over a feature/shape on the vector layer. Otherwise, the panning works great. What's the trick to say .. can pan the map at any time / anywhere the mouse cursor is?


ArcScene3D layer rendering problem

I'm having problem with ArcScene. I'm doing a project on the visual impact of felling areas of forest in locations regularly visited/used by people. I have viewpoints and have created a TIN model for ArcScene. However when i try to drape my other layers - forests, roads, viewpoints - some become patchy and disappear beneath the surface of the TIN in ArcScene. I have tried converting these features to 3D, adding layer offsets and extruding features but they just seem to make the imagery worse. I have also set the drawing priority to its lowest for the TIN and all others layers' priority to their highest.


QGis : superimpose 2 rasters georeferenced (adjustment)

I am pretty new in QGis and I encounter the following problem. I have 2 rasters, let's say, "cadaster" and "tranchot". The raster "tranchot" was georeferenced from the raster "cadaster" with QGis. After the georeferencing, QGis shows the 2 rasters perfectly superimposed and built on the same projection. Today, I want again to superimpose this 2 rasters but "tranchot" looks like a thumbnail in the corner of "cadaster". From the metadata, the pixel makes 0.1143 meter for "cadaster" and 0.02831 meter for "tranchot". Probably there is an handling to be done in QGIS to superimpose these two rasters, probably simple, yes, but which one ? In the future, I'll need to compare vectors from "cadaster" with the raster "tranchot". Is there a mean to make rasters and vectors superimposable permanently ? Many thanks in advance for your help


osm2po: access values of maxweight tag

What is a best way to access osm's maxweight tag value to be able to use it in edge router? Basically my goal is to overwrite EdgeRouter's calcEdgeCost and check there if given edgeIdx has maxweight tag and if yes then act upon value of that tag.


Add WMS layer in existing map with ArcGISDynamicMapServiceLayer

We have an existing Silverlight application that loads a ArcGIS MapService and display it to the user. We want to add the ability to also add a WMS layer on top of the existing displayed map. I am not too familiar about WMS layers and the samples i found on ArcGIS are only loading ArcGIS WMS layers. We have updated one of our ArcGIS map services and enabled the WMS capability. How do i add the WMS layer to the map? Would i access it the same as a ArcGISDynamicMapServiceLayer? using a url like this? `http://OurArcGISServer/arcgis/services/Map1/MapServer/WMSServer` Any input is greatly appreciated.


Trying to create an app with an editable layer for iOS users, confused on next step!

I've recently started an app mapping project in which the end goal is to allow a user to have an editable layer on top of an already existing map. I'm trying to do this with open source information and also where I will be able to look at all the edits users suggest and moderate them. I'm a little hung up on what direction to head in to have map interactivity. Basically I want someone to be able to TAP the map and draw points/lines which will snap to existing features and be stored elsewhere to be added to the master map if said changes are correct. I have QGIS, Tilemill, and I'm looking at Leaflet (although it appears that the plugins are only good for mobile friendly viewing and not necessarily mobile iOS development). Are there open source things of this nature already out there. Any help or advice is greatly appreciated :)


How to measure the distance of multiple points to a line

I have two shapfile in QGIS to which I am trying to find the distances between. I have a shoreline which is a vector line and then I have hundreds of data points in the ocean. What I am trying to find is measuring the distance of each point to the corresponding place horizontally on the shoreline thus giving me a distance of each point from the shore. I have tried the distance matrix plugin which seems to only deal with point to point distances and have tried the mmqgis hub distance which only measures distances to a central fixed point on the line. Is there a plugin or way to find the distances I am looking for?


How do I create a polygon with an ArcGIS 10.1 python addin

I'm looking for some code samples, or help with code to get me started. I've built a python addin menu which I would like to use to create polygon features in a specific layer in my edit session. ![enter image description here](http://i.stack.imgur.com/4ujcO.jpg) So for example I would click 30x60 and a 30m x 60m rectangular polygon would be placed where I click. I can't seem to find much on creating geometry within a python addin. Thanks in advance for any comments or suggestions. Frank


Export layer with symbology with open-source tool

Similar to ArcGIS's "Layers", and "Layer packages", are there any open-source analogs? If I have a PostGIS table opened in QGIS (or GRASS, etc.), can I export it WITH the data, as well as with a symbology definition, etc. I want to send a layer to someone that they can open in Arc/QGIS/GRASS/etc. which will retain the symbology and labeling that I setup on my end. Can this be stored within a PostGIS table? Thanks.


ArcGIS Metadata validation

I have been importing metadata from an xml file generated with an xslt transform. During the import process, ArcGIS attempts to validate the metadata. It gives a number of cryptic validation warnings such as: **Validation failed: em:maintenanceAndUpdateFrequency($_, $a) --> em:lookupCodeName($a, gmxRes:MD_MaintenanceFrequencyCode)** I can't seem to find out much about what this means - there is a tantalising page on the ESRI help site (see third bullet point of Usage), but that's all it is - tantalising! Is this validated using ESRI's own software or something, because there seems to be little documentation about what it means, which isn't that helpful. Or is it a standard XML validation output?


dojox.geo.openlayers roadmap?

I'm curious as to the future of dojox.geo.openlayers. Presently is seems only to be a solution for positioning widgets on the map but I can imagine developing a suite of map specific dijits such as TOC, filtering, measuring and editing tools and on and on. Is anyone aware of (or willing to share) a roadmap for future dojox.geo.openlayers work or knowledge of other openlayers dijits?


Difference between server and geospatial server

I have been working with Geoserver and ArcGIS Server but I am still not sure what make these geospatial server handle the spatial data transfer compared to the normal server, like apache & jetty, on which these are installed? What is that factor that makes Geoserver and ArcServers to be spatially enabled?


Is ArcGIS 10.1 Desktop compatible with 10.0 Server?

Since upgrading my "ArcGIS for Desktop" (Windows 7) client to 10.1, I'm having the hardest time trying to figure out how to publish a Map Service on my (CentOS) 10.0 Server. Back on 10.0 Desktop, I would just load up my .mxd, use the Map Service Publishing toolbar to make a .msd, and then FTP the .msd with the data (it's contained in a file geodatabase) to the server and start a new map service in Server Manager. Easy! Now the "Map Service Publishing" tool has changed into a completely different "Publishing" tool. If I skip the .msd and try to publish just the .mxd with the FGDB, the ~~map is blank~~ server says the format of the MXD is invalid. I can't be the only one in this situation, but I don't see any Desktop<->Server compatibility information on 10.0 and 10.1. I don't know if I'm just doing something wrong or the two products really aren't compatible.


Problem with panning and zooming in OpenLayers

I'm interested in detecting when a user moves or pans a map so that I can run a new query on a database based on their location. However, the following code causes the panning and zooming controls to go crazy:               map.events.register("moveend", map, function(){                       getValues(map.center);                        });      If I comment out these lines, there appears to be no problem. If they are included, after two pans or zooms, the map suddenly jumps to half-way around the world (it looks similar to 0 lat, 0 long). I'm unsure what I am doing incorrectly. The other problem I have regarding the pan/zooming is that the `movend` does not really seem to wait until the user has finished moving or panning. Queries seem to be fired off even as the map is being moved and panned. Again, I'm not sure if this is a problem with how I am detecting this but it does not seem to behave as I thought it would. EDIT: Including `getValues` function also:               getValues = function(c){              c.transform(map.getProjectionObject(), new OpenLayers.Projection("EPSG:4326") )         console.log(c.lat, c.lon)              $.ajax({                  type: "POST",                 url: "php/query.php" ,                   data:{x: c.lat, y:c.lon},                   async: true,                 success: function(r){                         console.log(r);                 },              dataType:'json'             });               }


Load layers only when zoom level is reached

I'm trying to load different layers based on the user zoom level with OpenLayers. I've seen some similar questions in here, but they load the layer and then hide/show it based on the zoom level. I don't want the layer to be loaded. I've managed to use some answers and came with a solution, but I don't like it that much. There must be an easier way. Can anybody point me in the right direction? Here is the solution I've found so far.               map.events.on({ "zoomend": function (e) {             if (this.getZoom() > 8) {                 // Setup single tiled layer                 var untiled = new OpenLayers.Layer.WMS("cite:ly_parc - Untiled", "http://localhost:8082/geoserver/cite/wms",                      {                         LAYERS: 'cite:ly_parc',                         STYLES: '',                         format: 'image/png',                         transparent: true                     },                      {                         maxExtent: bounds,                         isBaseLayer: false                     }                 );                      this.addLayers([untiled]);             } else {                 //TODO             }         }     });


Does QGIS read NAS data?

I wonder if it is possible to load German NAS-Data into QGis or to convert them to Shapefiles. I'm using QGIS 1.8 on Ubuntu 12.04. Thanks * * * I'm sorry, I thought I did - NAS is the new Geodata-format, based on ALKIS- Data: http://de.wikipedia.org/wiki/Normbasierte_Austauschschnittstelle I installed the current Master on my Ubuntu 12.04 machine today and typed "ogr2org --formats" but NAS didn't appear on the list. If I check my ogr-version it says 1.7.3 - as I understood NAS is supported from 1.8.0 onwards. Did you do anything special to install that version? Thanks again


Unsplit lines seperated by a small gap

I have a set of polylines that represent fire hydrant laterals and many/all of them are in two peices one from the main to a valve on that line and one from the valve to the hydrant. Some have small gaps at where the valve is located which causes them to not unsplit when I run that command. I know functions like intersect have a search radius, is there something similar to this for the unsplit lines tool? Is there another way to do this?


Creating a layer switch Google Maps Api v3

I have generated a basic webpage with Visual Studio 2012 that displays a Google Map. My goal is to add multiple KML layers from my Server onto the Google Map, BUT, i want to be able to have a sort of switch that you can turn each file off and on, So my fist question is how can i add multiple layers from my server (I already know how to load 1) and how do i create this 'Switch'. I am using Visual studio 2012, Google Maps JS Api V3, and this is the current script:![enter image description here](http://i.stack.imgur.com/2nQSA.png)


shp2pgql: how to omit the git column?

I am importing a series of shapefiles with `shp2pqsql` that already have a unique identifier attribute. Since `shp2pqsql` creates a new column called `gid` I am ending up with two unique identifiers per record. Is there any way to tell `shp2pqsql` to omit the creation of the `gid` column? Or better still, to use the existing identifying attribute instead ? **Update** : I have `shp2pqsql` version _2.1.2 (r12389)_ installed. I am using it like: `shp2pgsql Roads.shp roads > load_roads.sql`


Is there a Legend Limiter in QGIS?

Is there in QGIS a function or a plugin that works similar to Legend Limiter in ArcGIS? The attribute I want to show in my legend has many possible values, I want my legend to only show those values that are visible on my view in the print composer.


QGIS 2.0 have a Legend Limiter feature?

I found this old post (concerning QGIS 1.x) Is ther a Legend Limiter in QGIS? and was wondering whether this had been solved in QGIS 2.0. Is there a way of only showing the attributes in the legend that are visible on the map? It seems to me that this is not straightforward in ArcGIS either and I think it would make sense to impement this (in QGIS as I'm trying to use ArcGIS as little as possible). Imagine how useful it would be when you have a geology maps and you don't want to show hundreds of formation but only the few formations you can actually see in the map composer ...


qgis web client tooltip

I need to create a tooltip in qgis web client. I have a postgres-layer and I added a column 'tooltip', but the tooltip does not show. I inserted just plain text in the tooltip column (I also tried with html), but it doesn't work. But I get an error message in the dev-tool: in FeatureInfoDisplay.js (115): cannot call method 'getAttribute' of undefined Seems to me that the server cannot read what's in the column Can anybody tell me what to enter in the tooltip-column to make it work. Thanks Ingrid


Does shapely within function identify inner holes?

I have a series of shapefiles that include both polygons and multipolygons. I am using ogr to extract them in wkb, and them I am using shapely to check if a point fall inside a polygon (or a multipolygon). However, examining some of the polygons in wkb I realized that many of them have inner rings (i.e. I have a set of coordinates describing the first, outer polygon, and a set of coordinates describing the inner polygon/s). Does the shapely `within` function take care of this, I mean, does it return `True` only if a point falls in the area delimited by outer and inner polygons? And are the inner polygons always supposed to be holes? I am sorry, perhaps these are really dumb questions, but I am completely new to this kind of analyses and, despite my efforts, I could not find some clear information about these doubts. Thanks in advance for your help.


Change color and format of scaleline

How can I change the format of the scaleline in OpenLayers? I have a black background and I want to change the lines in the scalebar to white. I use: `<link rel="stylesheet" href="http://www.openlayers.org/dev/theme/default/style.css" type="text/css" /> <style type="text/css"> div.olControlScaleLine{ color: white;   }` But this only change the font. Anybody kmow how?


How to remove sandy dots in an image?

![portion of an image, need to remove pixels inside the ring and get pure brown color](http://i.stack.imgur.com/iS4qN.jpg) I am processing a LandSAT image for geological purposes. After some processing there are so many sandy dots in the image. To get clear geological formation as a polygon I want to remove small sandy pixels. After 'majority' filter, by 3x3, 5x5, 9x9 many of them still remaining. If you have any better idea for how to remove them the sandy, please share!


Exporting SHP files into Autocad readeable files

I have a full water supply network drawn in a shapefile which I created using Qgis 2.2.0. Now I need to export it into a format that enables me to open it in AutoCAD. I am trying to export it as a dxf file, but when I upload it in AutoCAD it shows an empty drawing (although the dxf file is 1.75MB). The shapefile is a line shapefile with several lines with a different main attribute (the diameter). Maybe I have to save different dxf for each diameter? Thank you in advance for your help.


How to load color attribute from shapefile in MapServer 5.0.x?

according to the docs of mapserver 6.0.x it is possible to load the color of a polygon shape from the shapefile. This is a great feature cos otherwise we would have to define a class for each different colored shape. But when I create the following mapfile and read it with mapserver 5.0.4, I get a               [MapServer Error]: getSymbol(): Parsing error near (SHAPE_COLOR):(line 1192)      The class in my mapfile is:               CLASS #default coloring         OUTLINECOLOR 0 255 0         COLOR [SHAPE_COLOR]     END      What is the proper syntax?


Error When Generating INSERT Statements for Geometry Field SQL Server

I am populating a column of linestrings from a list of points in sql with which I use to create insert statements to populate an ID and a geometry field in a table. This creates a temporary dataset using "with as" clauses, resulting in something like this: CLEAN_WKT               ID  WKT_LINE     1   'LINESTRING(56.750011 -168.150044, 56.833377 -168.083310)'     2   'LINESTRING(54.766722 -165.050055, 54.766788 -165.083311)'     3   'LINESTRING(56.683333 -170.066766, 56.866799 -170.300012)'             INSERT INTO TEMP(ID, GEOM)          SELECT ID, geometry::STGeomFromText(WKT_LINE, 0) FROM CLEAN_WKT;      This returns the error: The label 'LINESTRING(56.75000 in the input well-known text (WKT) is not valid. I can confirm that the linestring is created correctly, since I am able to print the resulting statement and execute it successfully. Resulting SQL statement:               geometry::STGeomFromText('LINESTRING(56.750011 -168.150022, 56.833333 -168.083322)',0)      Manually created insert statement from generated SQL (see above).               INSERT INTO TEMP(ID, GEOM)     SELECT '1',geometry::STGeomFromText('LINESTRING(56.750011 -168.150022, 56.833333 -168.083322)', 0);      Anybody know what the problem might be?


Is population density considered continuous data and why?

Population counts are typically referred to as discrete or quantitative data. Why is population density a continuous data type when it is typically measured for aggregate areas such as census tracts or districts/neighbourhoods (ie, it can't be measured at any point on a surface like gradient or temperature).


QGIS GDALtools plugin problem

I am trying to use the GDAL merge tool and receive the following error message: > The process failed to start. Either the invoked program is missing, or you > may have insufficient permissions to invoke the program. On install I checked the "Path to the GDAL Executables" and it already had the /usr/bin added to the install. Here is what I have in this field: > /Library/Frameworks/GDAL.framework/Versions/1.9/Programs/usr/bin Thanks in advance for any help with this issue


What's the centerline of a peninsula?

Given a peninsula stretching north south and the two coast lines connecting in the south, I want to find out which is the place, or rather line, which is furthest away from both coastlines on the peninsula? What I am looking for is the red line in the below image. The black and pink lines are the eastern and western coastlines. ![enter image description here](http://i.stack.imgur.com/0S4jW.png) One way could be to generate a polygon and do a negative buffer. An other one could be to add the longitudinal values, and divide by two. The latter one seems more rational - still it demands some programming and coordinate handling. But perhaps there is a third way? Any suggestions? ArcGIS and QGIS are both relevant tools of the trade here.


Obtaining average value around polygon in raster for different cross sections?

I have elevation data in a raster, river (blue line) and the flooded area (black polygon) as shown in the image below: ![enter image description here](http://i.stack.imgur.com/vuq7I.jpg) I want to find the water depth in the flooded area (inside the black polygon). Outside of the polygon, water depth is obviously zero. Inside the polygon, the land elevation is lower than outside (At least it should be) What I tried to do and did NOT work was this: I assigned nodata value to the points inside the polygon. Then I used Eucilidean Allocation to find the closest points just outside the polygon and assign it to nodata points. Then, I Subtracted the original land elevation raster from this new raster. However, I get big negative values because after all, it was not a good method at all. Now, I am thinking: I need to follow the water stream line. At each point, draw a perpendicular line to the river and let it intersect minimum two times with the polygon. Find the average value of cells inside a circle (with those intersections as center). Find the mean of these averages. apply this value too all points in that cross section (perpendicular line to the river). Now, is there any way on earth I can do this? Hopefully I don't need a for loop for this? Do you guys have any other suggestions, perhaps easier ways? I am using ArcGIS 10.1 with Spatial Analyst and 3D Analyst extensions.


Label changing with time slider using arcGIS

I have a list of lat/long locations with a time associated with them. With those locations I did a spatial join to find the total amount of points in each polygon. I would want to do is gradually increase the join count as the time slider advances. Is this possible in arcGIS? I have tried using the time slider the date directly, but the polygons would all disappear until a certain time is reached where all the points show up. EDIT: There are a set of dots that has a lat/long with a time associated with them on when they were created. Because I wanted to see how many of these dots were in each polygon, I used the spatial join tool and used the join count in that to determine the amount of points I have in each polygon. This join count would be from all the data that I have. What I want to do is to involve the time slider in this. For example, near the beginning of the slider, there would not be many join counts as the time has not happened. As I move the slider forward, each polygon would increase its join count as the points have reached their time.


How can data of columns of the attribute table be refreshed automatically?

I can't find a solution for an auto-refreshment of attribute table data. F. e. does the data of a shapefile-object (f. e. field calculator - $area) not change, if the geometry of the object is changed. Thanks for your help!