title: Zoom to Results on Map

text:
I made a web app that displays delivery routes associated with a user-input zip code. My question is, how can I get the map to zoom to the results? Here is my code. Im thinking of some sort of zoom-to-extent, is that along the correct path?               function init() {     myMap = new esri.Map("mapDiv", {         basemap: "streets",         center: [-89.9, 35.1],         zoom: 10     });          dojo.connect(myMap, 'onLoad', function () {         var scalebar = new esri.dijit.Scalebar({             map: myMap,             scalebarUnit: "english"         });     });          require(['dojo/on', 'dojo/query'],         function (on, query) {             on(query('#myList'), 'change', function (e) {                 gpURL = e.target.value;                 console.log('Environment changed: ' + '"' + gpURL + '"');             });         });          if (!Array.prototype.indexOf) {         Array.prototype.indexOf = function (obj, start) {             for (var i = (start || 0), j = this.length; i < j; i++) {                 if (this[i] === obj) {                     return i;                 }             }             return -1;         };     }          resultsLayer = new esri.layers.GraphicsLayer();     myMap.addLayer(resultsLayer)     }          dojo.addOnLoad(init);          function selectZIP(Zip_code) {          gp = new esri.tasks.Geoprocessor(gpURL);     gp.setOutputSpatialReference(myMap.spatialReference);          var params = {         "ZIP": Zip_code,         "Rte_Box": "C",     };          gp.execute(params, displayResults);          function displayResults(results, messages) {         var featureset = results[0].value;                   var simplePolySymbol = new esri.symbol.SimpleFillSymbol();         simplePolySymbol.setOutline(new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 96, 170, .75]), 1));              dojo.forEach(featureset.features, function (feature) {             feature.setSymbol(simplePolySymbol);                  resultsLayer.add(feature);              });              myMap.addLayer(resultsLayer)         myMap.Search.handleStats(results, messages)     }          myMap.Search = {         gpGetStats: new esri.tasks.Geoprocessor(gpURL),         getRouteStats: function () {             console.log(dojo.byId('resultsLayer').value)             var params = {                 "ZIP_CRID": dojo.byId('resultsLayer').value             };             resultsLayer.Search.gpGetStats.execute(params, resultsLayer.Search.handleStats);         },              handleStats: function (results, messages) {             console.log(results);                  var content = '';                  content += '
';             content += '
 ZIP CRID 	 Bus 	 Res 	 Tot 	 <200 	 DS Key
';                  dojo.forEach(results[0].value.features, function (crid, i) {                 console.log(crid.attributes.ZIP_CRID + ', ');                 content += '
' + crid.attributes.ZIP_CRID;                 content += '	 ' + crid.attributes.BUS_CNT;                 content += '	 ' + crid.attributes.RES_CNT;                 content += '	 ' + crid.attributes.TOT_CNT;                 content += '	 ' + crid.attributes.LT_200_IND;                 content += '	 ' + crid.attributes.DS_KEY + '
';             });             content += '
';             dojo.byId('details').innerHTML = content;         },     }     }          dojo.ready(function () {     var clearMe = new dijit.form.Button({         label: "Clear Map",         onclick: function (init) {             dojo.byId('details').innerHTML = '';             resultsLayer.clear();         }     }, "clearMe");     });


title: generate spatial geom from lat lon points for map in PostGIS

text: I am interested in a PostGIS implementation of the R-based soulution from a previous question, How can I convert data in the form of lat, lon, value into a raster file using R? Currently, I am hoping to generate tiles for a map in CartoDB from a table with columns "lat, lon, value". I have found some hints on the CartoDB google group, which boil down to "insert polygonized raster/values into a valid empty polygon table in CartoDB" But the examples include a deprecated function (`ST_MapAlgebraExpr`) and a suite of nested `ST_*` functions, including `st_transform(st_setsrid(st_multi(st_makevalid((...`. Being new to PostGIS, this is fairly difficult to understand and apply, and the help of the individual functions requires some basic understanding. I am new to PostGIS so please pardon that I haven't gotten very far, and the scope of new data types and transformations are daunting. If I can get my toe in here, I promise to show improvement before my next post :)


title: Automatically build branches of a river network?

text: A small non-profit, specializing in fish habitat restoration, has asked me to link a spreadsheet of field notes to their gis. What we have is: 1) A spreadsheet of field notes for small fish streams. 2) A shapefile of unnamed rivers. Each branch of a river is often comprised of several individual lines. What we need is: 1) Merge together lines that form a single branch of river. 2) Give a name to every branch of river coresponding to the spreadsheet notes. Ideally, I will pan across the shapefile, clicking each branch and entering data for the "Name" attribute. I do not want to have to mess about, zooming in and merging multiple lines into a single branch, before I name it. Using Qgis or Arcgis extension or script. Thanks very much from Central Westcoast Forest Society, -bd200


title: How to force deletion of corrupt ArcSDE Raster?

text: ArcSDE 9.3 / ArcGIS Server 10.0 / ArcCatalog Advanced 10.0 After an unsuccessful attempt at creating a mosiac, ArcCatalog refuses to allow deletion of the corrupt Raster file. The Mosiac creation was corrupted because of lack of file space on the MS SQL Server. Now I cannot open the file or delete it. Is there any way I can force delete the Raster?


title: saga & grass configuration in sextante (ubuntu)

text: I have some trouble in running saga and grass algorithms in sextante. When I double click it appears a pop-up saying: Missing dependency.This algorithm cannot be run :-( This algorithm requires SAGA to be run.Unfortunately, it seems that SAGA is not installed in your system, or it is not correctly configured to be used from QGIS Click here to know more about how to install and configure SAGA to be used with SEXTANTE I read the documentation, but i didn't understand what I have to do.


title: Show map using esri leaflet, with 4326 spatial reference

text: I have this MapServer http://geoservices.big.go.id/arcgis/rest/services/RBI/Rupabumi/MapServer It turns out it uses 4326 spatial reference. I want to present it using leaflet, my code so far:                   var map = new L.Map('map', {         crs: L.CRS.EPSG4326       }).setView([-6.1333, 106.75], 0);            L.esri.tiledMapLayer('http://geoservices.big.go.id/arcgis/rest/services/RBI/Rupabumi/MapServer', {         maxZoom: 14,         minZoom: 0,         continuousWorld: false,         noWrap : false       }).addTo(map);      But the map is not showing up. I found that http://geoservices.big.go.id/arcgis/rest/services/RBI/Rupabumi/MapServer/tile/0/20/25 will give me a tile, but the request from leaflet stops at /0/0/0. Can anybody help me?


title: How to use non-native spatial data from MS SQL Server with ogr2ogr?

text: I have some tables in MS SQL Server (2012) with WKT string columns. I want to export these data to a MapInfo tab file. Currently I am using the following command:               ogr2ogr -f "MapInfo File" testsql.tab "MSSQL:Server=etc." -sql "select geography::STGeomFromText(FACE,4326),NAME from TABLE" -a_srs "EPSG:4326"      Where FACE is a string column containing WKT geometries. This gives some problems, because the coordinates are switched. This is supposedly due to a change between SQL Server 2008 and 2012. Outputting it to WKB works better. I was wondering if it is possible that ogr2ogr uses the WKT column directly without converting it to the MS SQL Spatial type first?


title: Snapping start- and end nodes of lines to other lines in PostGIS

text: There are plenty examples that show how to snap lines to points, but I haven't been able to find any (fast!) way of snapping the start- and end nodes of line strings to nodes of other lines. Essentially I want to "clean" my layer in postgis (2.0), moving nearly-similar points together, and sewing up tiny openings between line strings. It wouldn't matter so much whether I add another node, move the first/last node of either line, or move both points to the center. I have found two options, but I'm not sure how to start with either of them:   * Use topology: http://lists.osgeo.org/pipermail/postgis-users/2012-May/034024.html   * Explode lines, snap nodes, merge nodes. http://www.mail-archive.com/postgis-users@lists.osgeo.org/msg00174.html The second option sounds feasible, but any help on how to follow this method would be greatly appreciated. Thanks for any help, Jelmer


title: Updating leaflet variable using dajax?

text: Really, I think this a somewhat easy question for someone with some more experience in javascript programming. I have a Django app to map some locations using leaflet. I'm using dajax for some on mouseover event already I want to integrate some filters using the same library. Problem is, I can't manage to update the map with the filtered data. The template tag `{{ geo_json|safe }};` holds the data the map is initialised with. To clarify, here is my js code from my template               var map = L.map('leaflet_map').setView({{zoom|safe}}, 13);     L.tileLayer('http://{s}.tile.cloudmade.com/439299294ed945808af82774cd1b55a0/997/256/{z}/{x}/{y}.png',      {        attribution: 'Map data © OpenStreetMap, Imagery © CloudMade',        maxZoom: 18        }).addTo(map);          var geojsonFeature = {{ geo_json|safe }};               function onEachFeature(feature, layer) {           layer.on('click', function (e) {                    var id = feature.properties.id               win_str = '/vsoilmap/popup?id=' + id               window.open(win_str,'mywindow')           });                layer.on('mouseover', function (e) {                    var id = feature.properties.id               win_str = '/vsoilmap/popup?id=' + id               Dajaxice.VsoilMap.show_vsoil(Dajax.process,{'pk':id})               });                layer.on('mouseout', function (e) {               Dajaxice.VsoilMap.hide_vsoil(Dajax.process)           });          }          var geojsonMarkerOptions = {         radius: 8,                 fillColor: "green",         color: "darkgreen",         weight: 0.5,         opacity: 0.8,         fillOpacity: 0.8     };                    var gj = L.geoJson(geojsonFeature, {         onEachFeature: onEachFeature,                 pointToLayer: function (feature, latlng) {                    return L.circleMarker(latlng, geojsonMarkerOptions);         }}).addTo(map);       What I'm basically trying to do is to update the variable `geojsonFeature`. If I use the dajax add_data method I get the error `Map container is already initialized`. Of course the whole point of using ajax is to NOT load the map again so my question really is: how can I change the content of a variable in `js` without running the whole function again?


title: Scale keeps changing in QGIS composer?

text: Every time I pan the map content in the QGIS composer window the scale changes. Is there a way to make it stick at specific scale?


title: CartoDB or Leaflet.js get coordinates of point clicked?

text: Using CartoDB or Leaflet.js is it possible to retrieve the coordinates of the point on the map clicked when opening an infowindow?


title: Openlayers redraw layers: consecutive redraw calls not working

text: **SETUP** OpenLayers / GeoServer + PostGIS **REQUIREMENT** I have a map with multiple WMS layers and of these I need to refresh a few after inserting a polygon in one of the layers. **PROBLEM** Given below are three options of the AJAX success callback function on successful insert of polygon geometry in the PostGIS backend and the corresponding errors/observations. Option 1:               if(data == "SUCCESS")     {        map.getLayersByName('dummy_nodes')[0].redraw(true);        map.getLayersByName('bldg_logical')[0].redraw(true);       }          // Throws error: Uncaught TypeError: Cannot call method 'redraw' of undefined      Option 2:               var tempLayer;     if(data == "SUCCESS")     {        map.getLayersByName('dummy_nodes')[0].redraw(true);        console.log("Prev cmd is successful");        tempLayer = map.getLayersByName('bldg_logical')[0]        tempLayer.redraw(true);       }          // Outputs: 'Prev cmd is successful'     // tempLayer gives proper layer object: OpenLayers.Layer.WMS.OpenLayers.Class.initialize {metadata: Object, options: Object, singleTile: true, ratio: 1, isBaseLayer: false…}     // But still throws error: Uncaught TypeError: Cannot call method 'redraw' of undefined      Option 3:               if(data == "SUCCESS")     {        map.getLayersByName('dummy_nodes')[0].redraw(true);     }          // Works fine (but I need both layers to be refreshed)      **QUESTIONS** Could anyone let me know why the error occurs?   Is my usage wrong?   Does it have to do anything with the order in which the layers have been added to the map? Thanks.


title: Not enough memory in the file group "Primary": SDE Database error with MSSQL

text: I got this error message whilst trying to load data into a raster in ArcMap 10.0. Underlying DBMS error [Microsoft SQL Server Native Client 10.0: Eine neue Seite für die sde-Datenbank konnte nicht belegt werden, weil in der Dateigruppe 'PRIMARY' nicht genügend Speicherplatz verfügbar ist. Speicherplatz kann durch Löschen von Objekten in der Dateigruppe, Hinzufügen von Dateien zur Dateigruppe oder Festlegen der automatischen Vergrößerung für vorhandene Dateien in der Dateigruppe gewonnen werden.] Es ist kein Raumbezug vorhanden. Fehler beim Ausführen von (CreateRasterDataset). A rough translation: " A new page for the sde database couldn´t be allocated, because in the filegroup "PRIMARY" there is not enough disk space. Memory can be gained by deleting objects, adding files to the filegroup oder determining the automatic enlargement for existing Files." The Database is an sde 9.3 File-Geodatabase which is on my harddrive and not in the MSSQL database.


title: how to use rectangles ovals digitizing in qgis

text: i added the new vector layer in QGIS and I want to draw a cicle of 500M or 1000M from center. I also added the pluginn **Rectangles ovals digitizing in QGIS**. But the options of this pluginn is not active. Then please suggest me how to use these pluginn. ![u can see that the pluginn options are not active under red highlighted box](http://i.stack.imgur.com/O6OKu.png)


title: Select features of layer which is not on top in OpenLayers

text: I have posted this question before on the general StackOverflow forum: http://stackoverflow.com/questions/16278569/select-features-of-layer-which-is- not-on-top In short my problem is that I have a baselayer, an overlay layer and a WFS layer in OL. The base and overlay layers are WMS using GWC in GeoServer. I want to select a feature of the WFS layer but KEEP the overlay layer on top. By binding a selectFeature control to the WFS layer moves the layer on top. Using               map.setLayerZIndex(overlayLayer, map.Z_INDEX_BASE["Feature"]+10);      I move the overlay layer back. But now I can no longer select a feature of the WFS layer. Adding the overlayLayer to the SelectFeature control doesn't work because it is a WMS layer. How can I select a feature on the WFS layer which is not on top? I've tried the GetFeature control, but that requires a roundtrip to the server and I don't want. I've made an sample of my problem at http://www.smartdakscan.nl/webapps/assen/selectFeature.html Any help is much appreciated.


title: Is it possible to reproject spatial data using SQL Server?

text: SQL Server takes an SRID when creating spatial data, but is it possible to retrieve an object as a different spheroid? For example, let's say I have a bunch of spatial polygons using SRID 4258, but I'd like to use alongside some pre-existing data that has an SRID of 4326 -- are there built in conversions, or do I have to handle this conversion myself?


title: Best practices for visualizing speed

text: Imagine you're tracking, for example, vehicle or animal movement and receive regular GPS position updates. How would you visualize speed of movement on a static (= printable) map? I've been coloring the points in red-yellow-green where red would be "slow", but I think there has to be a better/more intuitive way to visualize speed measurements. Edit: Another requirement would be that it should be possible to track multiple moving objects at once. Their paths can cross or run alongside each other (on the same roads).


title: Alternatives to Network Analyst

text: I'm not sure how reasonable this question even is, but it leaves me no less curious after a bit of searching. If I am looking to build a network based on road features and attributes, is Network Analyst my _best_ bet? Is it my **only** bet? The world of FOSS (Free and Open Source) is new and exciting to me, but I find it difficult to navigate as a newbie. Any suggestions would be greatly appreciated. My intended uses would include tracing the network, finding intersecting features at given locations along the network, and creating network decision rules for route creation. **Edit** : Answers so far have been great, but could anyone share their personal experiences and preferences as far as routing interfaces are concerned?


title: Keep leading zeros when converting .txt into dbf using CopyRows management

text: I am writing a python code in order to bring my.txt file into a dbf file in arcgis. I am using CopyRows_management which seemed to be working just fine until I realized that one of the 40 fields from the txt file loses the leading zeros of number(it is the only field with leading zeros with sometimes just one "0", somtimes two "0", sometimes none). Is there a way to keep these zeros? Any help will be welcome. Thanks so much.


title: ArcGIS10.2 crash opening python window

text: I was trying to test the data management commends in python, yet arcgis crash every time I I try to open to python window. According this post, it is the python version issue. I do have other versions of python installed, yet due to other needs. I use Anaconda for all my python programming. So, in summary, I have python2.7 under c drive, python under ArcGIS and anaconda python. I am just wondering what should I do to make python in ArcGIS up and running? Thanks.


title: How to load multiple types (formats) of dynamic readers into one FME workspace?

text: This is a follow up to this question: I am trying to find the a workflow that will define dynamic schema readers from a blank workspace - that is to say, without using the "Generate work space" option. The "Generate Workspace" option seems to only allow for the definition of one type of type (i.e. format) of reader (such as raster). I am trying to figure out how to load many sorts of dynamic readers (raster, shape file, point cloud) into one workspace. As far as I can tell the "add reader" button on the toolbar will only add a static reader.


title: GP clip and ship crash. Any idea?

text: I have been trying to implement this code for a few weeks but always run into new issues. It seems like everything is working fine now except my clip and ship GP. It always returns the GPerrorFailed message. I dont really understand why. It seems like the issue is with the AOI feature set reffered in the tool as: "Area of Interest:(GPFeatureRecordSetLayer)" I would be very greatful if someone could help me. Thank you, Alex Here is my code:


In CartoBD, how can i get add a hyperlink to a field in a pop up box?


title: How to do a POST instead of GET when calling sql.execute()?

text: I am calling the CartoDB sql.execute() function with a rather large WKT geometry in the SQL query and this is causing a "414 Request-URI Too Large" error on the server b/c it is making a GET request. My question is how to I make the sql.execute() function make a POST instead of a GET so I can perform a large SQL query?


title: How to EASILY add a map legend to a map in Geoserver?

text: I'm new to Geoserver and Neatline and somewhat to HTML coding! But, I am clueless as how to 'EASILY & Cheaply " include a simple legend on a map using a WMS statement. I have been able to use singularly the WMS "get legend request to get a simple legend, Is it possible to combined the "get legend" request with the "get map" WMS request into one WMS statement which I could imbed into a Neatline exhibit and publish the map with a legend! Is this possible? Or if not what is the easiest way? Thanks Robert Jackson


title: Enhance the color associated with a band od an aerial photo?

text: I am using QGIS 2 on Windows 7 and have 4-band aerial photos loaded in to a project. I have switched the bands in order to make the photos display as color infrared. Does anyone know if you can enhance the color of the 4th band to make the red show better? I have a slight color blindness issue that hinders me seeing some of the red. FYI... I am attempting to do a desktop analysis for a habitat assessment.


title: Create indicator for inclusion/exclusion from polygon based on coordinates, and reverse

text: I've got a database with 570,000 or so addresses, and what is purported to be their associated Lon/Lat coordinates. However, when I compare a simple scatter plot of these to the shape of a polygon with which they are associated, it's all out of whack. To find the culprits & hopefully correct these mismatched coordinates, I am hoping to use the .shp file I've got which demarcates some polygons to create an indicator for inclusion in the polygon. Say the polygon was contained in the unit square. Then the following should be the output:               x   y   indicator     .3   1     1     -.1 .5     0     1.3  1     0     .2  .8     1     .2  1.3    0      et cetera. Is there an easy way to do this in QGIS (I'm on Linux) or in R (I'm working back and forth between R and QGIS to analyze the data). I'd also like to be able to reverse the process to assign polygons to coordinates for which that field is missing in the original database. If polygon A is the unit square, polygon B is {(x,y) | 1<=x<=2 and 0<=y<=1}, I want to go from:               x   y   polygon     0   .2     NA     1.2 .5     NA     0.1 0.1    A     1.5  .7    B      to               x   y   polygon     0   .2     A     1.2 .5     B     0.1 0.1    A     1.5  .7    B


title: Can I edit coordinates within an edit session and reproject without reloading the data

text: I have one lat/long to correct. I edited within my table, saved edits, and now when I project using the Project tool the point stays on my map in the same position. Do I need to reload my data from an edited Excel file or can I do it from within Arc?


title: Change layer styles based on ComboBox search?

text: I'm using a combination of OpenGeo Server components and hand written GeoExt code to create a map interface. I would like to have a ComboBox that queries the OpenGeo PostGIS database in order to create a list of counties in a state. As the user begins typing the ComboBox searches the store of counties to narrow down to the one they are looking for. Upon selecting the county I would like to change the style of the layer in order to show the selected county. Using the GeoExplorer I am able to create various styles in a single layer that relate to certain rules. For example: I have a layer that references 100 counties in a state. The layer is made up of 100 different shape geometries, each of which defines a single county. I have one layer style that outlines the counties like this:               <sld:NamedLayer>     <sld:Name>opengeo_CountiesNC_OSM</sld:Name>     <sld:UserStyle>       <sld:Name>opengeo_CountiesNC_OSM</sld:Name>       <sld:Title>A transparent stroked polygon style</sld:Title>       <sld:IsDefault>1</sld:IsDefault>      I have another layer style that refers to only a specific county and outlines it. This style uses a rule "Match: Name = Durham" in order to determine which county to outline.               <sld:NamedLayer>     <sld:Name>County Lines_5f024dcb</sld:Name>     <sld:UserStyle>       <sld:Name>County Lines_5f024dcb</sld:Name>       <sld:Title>Durham</sld:Title>       <sld:Abstract>County lines for only Durham County</sld:Abstract>       <sld:FeatureTypeStyle>         <sld:Name>name</sld:Name>      I would like to have a style that represents each of the counties in the layer so that they could be individually selected and shown on the map. Rather than have 100 different layers I believe it is easier to have 100 styles. Is there some way to change which style of a layer is being displayed via GeoExt or OpenGeo JavaScript code? Having a listener on the ComboBox to read the selected record and display the corresponding layer seems ideal. I'm not sure what access I have to the layer styles that are kept in the GeoServer from the web application side of things. What calls can I make in JS to appropriately retrieve and display data? **Edit** When creating a WMS Layer there is an optional param "styles" that allows for an array of String style names:               new OpenLayers.Layer.WMS("County Lines",                     "geoserver/wms",                     {layers: "opengeo:County Lines",                         transparent: true,                         styles:[                             "opengeo_CountiesNC_OSM",                             "County Lines_Durham"                         ]},                     {                         visibility: true,                         displayInLayerSwitcher: false,                         opacity: .7                     }                 )      With multiple styles imported it should be possible to switch between them? **EDIT 2** Ended up doing something similar to the WMS Store. Because I already have a Google Geocoder I discovered that I could hook into the results of that ComboBox to determine when a county had been search for. Once a search had been performed the results can be trimmed and inserted into a merge request.               if(str.match(/(\D\s)+County, NC, USA/))                         {                             console.log("Match! It's a county");                             console.log("County Lines_" + str.substring(0, str.indexOf('C')));                             mapPanel.map.layers[2].mergeNewParams({styles: "County Lines_" + str.substring(0, str.indexOf('C'))});}


title: Specify geoprocessing service connection at publish

text: I have a geoprocessing service published from a tool written in Python and contained inside a Python toolbox. I need to be able to publish this service in multiple environments (production, staging, testing, development) i.e. using different database backends. I do not want to recreate the service definition package every time I need to move to a different environment. In particular, I do not have direct access to production and do not want the people deploying the app to need to fire up ArcMap or ArcCatalog and risk some parameter not being set correctly. Instead, I want to hand them a package and say "Publish this using the connection you created". How can I accomplish that? Edit: Thanks to another question, I've run across this piece of documentation here: > If you are currently disconnected from the server or do not have access to a > server connection, you can configure your service definition with no > available connection to ArcGIS Server. Selecting this option creates a > service definition file that will have to be configured to work with a > server connection at the time of publishing. So it seems to me that ESRI says this is possible, unless I've misinterpreted something.


title: How to create a photo-documentation in QGIS?

text: I would like to create a photo-documentation in QGIS for some real world objects. The photos aren't geotagged but I now their position on the map. If possible I would like to link them to a point shape. How can I manage this? Would it be possible by means of a database connection using a BLOB datatype or are there other methods?


title: How to travers fields of records without introducing them all in the function?

text: In my previous question I wanted to reach a field in the field calculation; however, it was pretty easy to introduce a few more inputs for that function. Now, I am facing a problem which needs around a hundred inputs. It might be a very naive question but I am wondering if there is a way to introduce an input to the function which is an object of the record type and then by a for loop I can traverse through the fields and sum them up. My data includes the number of people for each age from 0 to 100 year-old and I want to calculate the number of people less than 30, above 30, less than 50 and above 50. So, having 50 inputs for the function and changing them for each new field is time-consuming. I think there is supposed to be a more efficient way.


title: Openlayers 2.12 - add selectFeature to button results in "Geometry Undefined"

text: I have modified the Openlayers mobile Vienna WMS example, and am trying to change the labelButton to allow selecting of features to open a popup. I think it is necessary to do this as on a touch screen, it is hard to differentiate between touch to move and touch to select. However I get an error "Cannot read property 'geometry' of undefined" when I change the labelButton code (Pasted below). I have tried moving the code block to after the layer is added to the map, but still get the same message. Can anyone help resolve the problem?                  var labelButton = new OpenLayers.Control({             type: OpenLayers.Control.TYPE_TOGGLE,             displayClass: "labelButton",             hover: "true",             autoActivate: 'false',             eventListeners: {                       deactivate:            function onFeatureUnselect(event) {                 var feature = event.feature;                 if(feature.popup) {                     map.removePopup(feature.popup);                     feature.popup.destroy();                     delete feature.popup;                 }             },             activate: function onFeatureSelect(event) {                 var feature = event.feature;                 var selectedFeature = feature;                 var popup = new OpenLayers.Popup.FramedCloud("chicken",                      feature.geometry.getBounds().getCenterLonLat(),                     new OpenLayers.Size(150,200),                     "<h2>"+feature.attributes.name + "</h2>" + feature.attributes.description,                     null, true, onPopupClose                 );                 feature.popup = popup;                 map.addPopup(popup);             }                  }});


title: Can we use ArcGIS (sampleserver1.arcgisonline.com) API to get House-holds for area without any license ? Is it free or not?

text: In my website I am using "sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer" API for get house-holds for area on google map. Is this API is free ? or Did I use this without license ? Thanks in advance for answers.


title: Thiessen Polygon delineation within a Feature

text: I am trying to create Thiessen (Voronoi) polygons, based on points within a defined shapefile extent.   The output should be inclusive to the feature. The output I receive now is the rectangular area around the selected points. Steps I am using:   1. select points of interest (inside and outside spatial extent)   2. set primary display field to FID (aka:ObjectID)   3. Environment… > Set 'Analysis Mask' to shapefile with feature (in this case, a watershed) Now here is where the problem starts.   I have a set of instructions for arc 9.3, but I am now operating on ArcGIS 10 (Spatial Analyst installed & activated).   Also, just to clarify, I did scour the _inter-webs_ for some number of hours- Esri support, gis.SE, _Professor_ Google... ######## 9.3.1 version:   Spatial Analyst >> Distance >> Allocation   - set 'Assign To' as point shapefile of selected data   - set cell size 10.0 methods tried:   Analysis >> Create Thiessen Polygons -- Many variations of selected features   -- File locations, both inside and out of file geodatabase I am open to any solution, using Arc 10.0 and/or python would be ideal. The first image is an example. The output does not need to be _exact_. wiki: http://en.wikipedia.org/wiki/Voronoi_diagram


title: Spatial joins in OGR SQL

text: I have seen that OGR supports it's own form of SQL, I was wondering if it's possible to do spatial joins. Something like select all objects where one intersects the other. I did have a look around but couldn't really see anything.


title: Is there a standardized or "most used" dummy Z value?

text: Creating and importing both 2D and 3D data, I have many times encountered the situation where I have no Z value for a coordinate set, that the value of a Z coordinate seems _out of range_ (like -99, -9999, _-inf_ or similar) or that I need to create a _dummy_ Z coordinate. I know that the answer to my question is: > "Just use a value which is definitely out of range in your case." But that answer set aside I wonder if the GIS community has a _standardized_ or _most frequently used_ value for a _dummy_ Z coordinate?


title: Spatial Filter in Qgis Using Python

text: Is it possible to create buffer and get intersected features in Qgis using Python? I did in ArcObjects.but i need the same in QGIS also.               Dim topo As ITopologicalOperator     topo = chkPoint     Dim sFc As ISpatialFilter = New SpatialFilter     With sFc       .Geometry = topo.Buffer(1000)       .GeometryField = "Shape"       .SpatialRel = esriSpatialRelIntersects       .WhereClause = "NAME = 'ROYAL'"     End With     pFcursor = pLayer.Search(sFc, False)     pFeature = pFcursor.NextFeature


title: OpenLayers shows empty tiles if I toggle my layer

text: I display my custom tiles with OpenLayers and I have set `.olImageLoadError{display: none !important;}` in my CSS to avoid displaying pink empty tiles (as described here). In this way empty tiles are not displayed at first, but if I switch off and on my layer, empty tiles are visualized, as depicted in the upper right corner of the following image: ![enter image description here](http://i.stack.imgur.com/oRIEk.png) I'm not the only one having this problem (see here), but I did not find a solution so far. Have you got any idea on how to solve this? Thank you.


title: best browser framework

text: Dear all, I am building a GIS system. All my data is stuffed into geoserver. I need to have a front end able to do the following:   1. Select one or several layers from geoserver and show it to the end user on a map. It is important to say that there are many layers (speaking 1000s or so) so I want to make a search and pile up some layers the user has choosen and then generate a map with those layers, being able the check boxes for display   2. Create some group of layers to simplify the work as in point 1.   3. To be nice, ie a bit like extjs (but extjs is out for licensing issues) having the possibilities to overlay windows on top of the map abd collapse them if needed.   4. Preferably based on java, javascript, but not mandatory So far i have checked out different things but it is always one piece of the stack. Openlayers, extjs, mapfish.... Anything out there? If there is noting, how many people would be ready to team up to come up with opensource stuff. I was thinking about a grails plugin.


title: Programmatically adding custom GP tool to a toolbox

text: I'm having issues add a custom GP tool to my toolbox programmatically using c#. The tool gets added to my toolbox OK but then when I try to open it it fails adding a red cross to the tool and specifiying a message "Invalid Tool" - "Unable to execute selected tool". Can anyone help? See code below: Factory class               #region Imports          using ESRI.ArcGIS.Geodatabase;     using ESRI.ArcGIS.Geoprocessing;     using ESRI.ArcGIS.esriSystem;     using System;     using System.Collections.Generic;     using System.Text;     using System.Runtime.InteropServices;          #endregion          namespace GPTools     {         [Guid("1a590719-bf03-4de6-ad17-ef1f70e676bb")]         [ClassInterface(ClassInterfaceType.None)]         [ProgId("GPTools.gpToolboxFactory")]         public class gpMonsToolboxFactory : ESRI.ArcGIS.Geoprocessing.IGPFunctionFactory         {                  #region "IGPFunctionFactory Implementations"                  public string Alias             {                 get                 {                     return "Imports";                 }             }                  public ESRI.ArcGIS.esriSystem.UID CLSID             {                 get                 {                     return default(ESRI.ArcGIS.esriSystem.UID);                 }             }                  public ESRI.ArcGIS.Geoprocessing.IGPFunction GetFunction(string Name)             {                 IGPFunction gpFunction = null;                 switch (Name)                 {                     case "gpImportFile":                         gpFunction = new gpImportFile();                         break;                 }                 return gpFunction;             }                  public ESRI.ArcGIS.Geoprocessing.IEnumGPEnvironment GetFunctionEnvironments()             {                 return null;             }                  public ESRI.ArcGIS.Geodatabase.IGPName GetFunctionName(string Name)             {                 IGPFunctionName gpFuncName = new GPFunctionNameClass();                 gpFuncName.MinimumProduct = esriProductCode.esriProductCodeViewer;                 IGPName gpName = gpFuncName as IGPName;                      switch (Name)                 {                     case "gpImportFile":                         gpName.Category = "Data\\Import\\Raster";                         gpName.Description = "Import File";                         gpName.DisplayName = "Raster ZXY";                         gpName.Name = "gpImportFile";                         break;                 }                 gpName.Factory = this as IGPFunctionFactory;                 return gpName;             }                  public ESRI.ArcGIS.Geodatabase.IEnumGPName GetFunctionNames()             {                 IArray nameArr = new EnumGPNameClass();                 nameArr.Add(GetFunctionName("gpImportFile"));                 return (IEnumGPName)nameArr;             }                  public string Name             {                 get                 {                     return "Imports";                 }             }                  #endregion              }               }      IGPFunction:               using ESRI.ArcGIS.Geodatabase;     using ESRI.ArcGIS.Geoprocessing;     using ESRI.ArcGIS.esriSystem;     using System;     using System.Collections.Generic;     using System.Text;     using System.Runtime.InteropServices;          namespace GPTools     {         [Guid("5f28c9a8-0998-4dc4-959c-5d32bb442910")]         [ClassInterface(ClassInterfaceType.None)]         [ProgId("GPTools.gpImportFile")]         public class gpMonsImportZMapGrid : ESRI.ArcGIS.Geoprocessing.IGPFunction2         {                  #region Variables                  private IGPUtilities2 _utils;                  #endregion                  #region Constructor                  public gpImportFile()             {                 _utils = new GPUtilitiesClass();             }                  #endregion                  #region "IGPFunction2 Implementations"             public ESRI.ArcGIS.esriSystem.UID DialogCLSID             {                 get                 {                     return null;                 }             }                  public string DisplayName             {                 get                 {                     return "Raster ZXY";                 }             }                  public void Execute(ESRI.ArcGIS.esriSystem.IArray paramvalues, ESRI.ArcGIS.esriSystem.ITrackCancel TrackCancel, ESRI.ArcGIS.Geoprocessing.IGPEnvironmentManager envMgr, ESRI.ArcGIS.Geodatabase.IGPMessages message)             {                 // Input File Path                 IGPParameter3 gpParam = (IGPParameter3)paramvalues.get_Element(0);                 string inputFile = gpParam.Value.GetAsText();                      // spatial reference                 gpParam = (IGPParameter3)paramvalues.get_Element(1);                 string spatRefPath = gpParam.Value.GetAsText();                 ESRI.ArcGIS.Geometry.ISpatialReference3 spatRef = Maersk.Functions.SpatialReference.LoadSpatRefFromPrj(spatRefPath);                      // output Grid                 gpParam = (IGPParameter3)paramvalues.get_Element(2);                 string outputGridFullPath = gpParam.Value.GetAsText();                 string outputDir = System.IO.Path.GetDirectoryName(outputGridFullPath);                 string outputGridName = System.IO.Path.GetFileName(outputGridFullPath);                      // Rest of process code...             }                  public ESRI.ArcGIS.esriSystem.IName FullName             {                 get                 {                     IGPFunctionFactory funcFact = new gpToolboxFactory();                     return (IName)funcFact.GetFunctionName(Name);                 }             }                  public object GetRenderer(ESRI.ArcGIS.Geoprocessing.IGPParameter pParam)             {                 //TODO: specify renderer                 return null;             }                  public int HelpContext             {                 get                 {                     return 0;                 }             }                  public string HelpFile             {                 get                 {                     return "";                 }             }                  public bool IsLicensed()             {                 // requires any version of ArcGIS                 return true;             }                  public string MetadataFile             {                 get                 {                     return "";                 }             }                  public string Name             {                 get                 {                     return "gpImportFile";                 }             }                  public ESRI.ArcGIS.esriSystem.IArray ParameterInfo             {                 get                 {                          IArray paramsArr = new ArrayClass();                          // input grid file                     IGPParameterEdit3 param = new GPParameterClass();                     param.Direction = esriGPParameterDirection.esriGPParameterDirectionInput;                     param.ParameterType = esriGPParameterType.esriGPParameterTypeRequired;                     param.DataType = new GPDataFileTypeClass();                     param.DisplayName = "Input file";                     param.Name = "inp_File";                     paramsArr.Add(param);                          // spatial reference                     param = new GPParameterClass();                     param.Direction = esriGPParameterDirection.esriGPParameterDirectionInput;                     param.ParameterType = esriGPParameterType.esriGPParameterTypeRequired;                     param.DisplayName = "Spatial Reference";                     param.DataType = new GPSpatialReferenceTypeClass();                     param.Name = "out_sr";                     paramsArr.Add(param);                          // etc...                          return paramsArr;                 }             }                  string _inputFile = "";             string _outputGrid = "";             public void UpdateMessages(ESRI.ArcGIS.esriSystem.IArray paramvalues, ESRI.ArcGIS.Geoprocessing.IGPEnvironmentManager pEnvMgr, ESRI.ArcGIS.Geodatabase.IGPMessages Messages)             {                            }                  public void UpdateParameters(ESRI.ArcGIS.esriSystem.IArray paramvalues, ESRI.ArcGIS.Geoprocessing.IGPEnvironmentManager pEnvMgr)             {                  }             #endregion                            public IGPMessages Validate(IArray paramvalues, bool updateValues, IGPEnvironmentManager envMgr)             {                 return null;             }         }                    }      Arctoolbox code:                  // Load toolbox into ArcToolbox         IArcToolboxExtension arcTbxExt;         try         {             arcTbxExt = (IArcToolboxExtension)ArcMap.Application.FindExtensionByName("ESRI ArcToolbox");             if (arcTbxExt == null) { throw new Exception("ArcToolbox extension could not be found."); }         }         catch (Exception ex)         {             System.Windows.Forms.MessageBox.Show("Error finding ArcToolbox extension." + Environment.NewLine + " - " + ex.Message);             return;         }              // open main toolbox         IGPToolbox2 toolbox;         try         {             if (System.IO.File.Exists(_settings.MainClass.MainToolBoxPath) == false) { throw new Exception("Toolbox does not exist." + Environment.NewLine + _settings.MainClass.MainToolBoxPath); }             toolbox = Functions.Toolbox.OpenToolbox(_settings.MainClass.MainToolBoxPath);         }         catch (Exception ex)         {             System.Windows.Forms.MessageBox.Show("Error launching toolbox." + Environment.NewLine + " - " + ex.Message);             return;         }              // Add toolbox         try         {             arcTbxExt.ArcToolbox.AddToolbox((IGPToolbox)toolbox);         }         catch (Exception ex)         {             System.Windows.Forms.MessageBox.Show("Error adding toolbox." + Environment.NewLine + " - " + ex.Message);             return;         }              #region Add .NET tools to tool              //         try         {             IGPFunctionFactory gpFuncFact = new GPTools.gpMonsToolboxFactory();             IGPFunction gpFunction = gpFuncFact.GetFunction("gpImportFile");             IGPTool gpTool = toolbox.CreateTool(esriGPToolType.esriGPFunctionTool, "gpImportFile", "Raster ZXY", "Imports a Raster file", "Import", null);             IGPFunctionTool gpFuncTool = (IGPFunctionTool)gpTool;             gpFuncTool.Function = gpFunction;             gpTool.Store();         }         catch (Exception ex)         {                  throw;         }      **EDIT:** Thanks again too Petr Krebs who spotted the issue. For those who need it here's the answer in the factory class (alter the CLSID method):               public ESRI.ArcGIS.esriSystem.UID CLSID     {         get         {             ESRI.ArcGIS.esriSystem.UID uid = new ESRI.ArcGIS.esriSystem.UID();             // change uid here from the GUID specified at the class header             uid.Value =  "{1a590719-bf03-4de6-ad17-ef1f70e676bb}";             return uid;         }     }


title: Clicking Details in Result Window in Geoportal Modifies Address to Local IP

text: I'm using ESRI's Geoportal Extension 10.0. The issue I'm having is when the preview or details is selected in the results window after a search the outside web address is reverted back to the local IP address. The metadata and open options don't change the outside web address to the local IP. Any ideas? I'm sure I'm missing something simple here. Three photos are attached. The first screenshot is the options to click on after a search result. The second is the outside web address after a search. The third is what happens when clicking on details or preview. ![search result window](http://i.stack.imgur.com/p90P7.jpg) ![outside web address](http://i.stack.imgur.com/gJgw8.jpg) ![Inside IP Address after clicking Details](http://i.stack.imgur.com/0bwx2.jpg)


title: How to install QGIS on Linux NAS using IPKG

text: I have a Linux -Based NAS that I want to install QGIS onto. Since I am administering through a web interface from a Windows based PC, how can I install qgis? Is there a way maybe through IPKG? Or any other solutions? I am almost ignorant of native Linux use. Thanks in advance


title: How do ESRI and QGIS calculate scale values of geographic projections?

text: Does anyone know how (from which location) scale values are calculated in ESRI products and QGIS for geographic projections? The only thing I've noticed is that QGIS is changing scales when you pan for instance in WGS84 while ESRI scale is fixed and independent from the viewport. I am guessing that ESRI takes the length of a degree on the equator and treats it as linear unit for scale calculation and QGIS is taking a point from the viewport (centre?) - but these are just my factless assumptions as I wasn't able to find anything on the net. Any info much appreciated.


title: Problem getting the arcpy mapping module to export a layout view map

text: I'm using the arcpy mapping module to create a series of images and am having trouble exporting a map document to PNG in layout view; I can only get the script to export the data frame view. I've seen this post on setting the activeView attribute of the MapDocument object, but it hasn't worked for me. It wouldn't matter to me which view was exported except that I'd like to have a legend to identify each unique image. Even more maddening is that I've added different text elements to both the data frame view and the layout view so that I can verify which is being exported. Even with the `map.activeView = 'PAGE_LAYOUT'`, the exported image has the data frame view text element (see below). However, when I print the text of the element using `print text_elm.text`, it properly prints the layout view text. Can anyone see anything wrong with my code? Thanks!               import os,arcpy     imagesDir = r'--\images'     gridsDir = r'--\grids'     mxd = r'--\map\template.mxd'     img_height_px = 800     img_width_px = 600     img_res_dpi = 300          arcpy.env.workspace = gridsDir          # add difference raster to mxd and export as png     map = arcpy.mapping.MapDocument( mxd )     map.activeView = 'PAGE_LAYOUT'     #arcpy.RefreshActiveView()          df = arcpy.mapping.ListDataFrames(map)[0]     for r in arcpy.ListRasters():         year = r.split('_')[1]         mo = r.split('_')[2]              # automatically add new layers to legend         legend = arcpy.mapping.ListLayoutElements(map, 'LEGEND_ELEMENT')[0]         legend.autoAdd = True  # newly added layers will be automatically added to the legend         legend.elementHeight = 4         legend.elementWidth = 4              # add layer         print 'Exporting layer:', os.path.join( imagesDir,'dif-%s-%s.png' % (year,mo) )         new_lyr = arcpy.mapping.Layer( os.path.join(gridsDir,r) )         arcpy.mapping.AddLayer(df, new_lyr, 'BOTTOM')              # update symbology of new layer using source layer in the map         temp_lyr = arcpy.mapping.ListLayers(map,'temp_lyr',df)[0]       # find template layer         temp_lyr.visible = False                                        # hide template layer         arcpy.mapping.UpdateLayer(df,new_lyr,temp_lyr,True)             # update symbology of new layer using template layer              # export map layout view         arcpy.mapping.ExportToPNG(map, os.path.join( imagesDir,'dif-%s-%s.png' % (year,mo) ),df )          del map     print 'operation complete.'      Expected output: ![enter image description here](http://i.stack.imgur.com/uwYAP.png) Actual output: ![exported .png](http://i.stack.imgur.com/Rh9Il.png) Text element printed: ![printed text element](http://i.stack.imgur.com/Rk765.png)


title: What's the difference between Processing GRASS and the GRASS toolbar?

text: Preparing a QGIS-course for my colleagues I stumbled over the following question: What is the difference between the GRASS commands in the processing toolbar and the GRASS Tools, that you access via the GRASS toolbar?


title: Convert geojson labels MBR to MapInfo text object

text: Im using Dymo (https://github.com/migurski/Dymo/) to generate automatic point labels placement. The output of Dymo is a geojson containing MBRs of the positioned labels with the names of the labels in the attributes table. I would like to convert the geojson table to a MapInfo text object table to finish the placement manually in MapInfo. I cant find any info about that question. Thank you for your help! Edit: Sample of Dymo output in JSON:               {       "type": "FeatureCollection",        "features": [     {       "geometry": {         "type": "Polygon",          "coordinates": [           [             [               -74.033500000000004,                45.677299999999995             ],              [               -74.028294368743914,                45.677299999999995             ],              [               -74.028294368743914,                45.677506895418496             ],              [               -74.033500000000004,                45.677506895418496             ],              [               -74.033500000000004,                45.677299999999995             ]           ]         ]       },        "type": "Feature",        "properties": {         "preferred_placement": "",          "overlaps": 0,          "font_size": 6,          "name": "Label Name",          "font_file": "Fonts/arialbd.ttf",          "point_size": 0,          "justified": "left"       }     },      {       "geometry": {         "type": "Polygon",          "coordinates": [           [             [               -74.030500000000004,                45.768493442022979             ],              [               -74.025878017425526,                45.768493442022979             ],              [               -74.025878017425526,                45.768700000000003             ],              [               -74.030500000000004,                45.768700000000003             ],              [               -74.030500000000004,                45.768493442022979             ]           ]         ]       },


title: How to change 2 rasters to have the same dimension?

text: I am new in Quantum Gis 1.8 and have the following problem. I have extracted two raster files(land_cover.asc and soil.asc) using a polygon of my study area (area.shp) Apparently the raster dimensions are slightly different (1261:1264 vs 1259:1261) even though they are both supposed to be the same (since were extracted based on the same shape file); What would be the better way to do these two rasters with the exact same dimension in Quantum Gis. Thanks for any help! Fernanda


title: How to combine lines from different sources reperesenting the same road network but with slightly different geometry?

text: Here is my problem: I have got two layers of polylines which represent the same road network but they are from different sources and have different geometry. The two layers are mostly the same tracks with larger or smaller offsets and a segmentation that is very different. But each layer contains objects that do not appear in the other. Concerning the attributes, they are different and both contain interesting information that would be desirable to retain the maximum. I'd like to combine these two layers to have a complete network, which includes the maximum of information contained in the source layers attributes. I have not been able to get satisfactory results in ArcGIS10 nor in Safe's FME. A big thank you in advance for the one who can help me and sorry for the bad english!


title: ARCGIS 10 definition query to select the max value from a group

text: In ARCGIS 10 I am trying to do a Definition Query that will select the records that are the max values from a specific group. Here is what I have tried in the Query Builder but I am getting an "the SQL statement is invalid." error. "TL" IN (SELECT max( "TL" ) FROM "Instrument_Locations2_20120227" GROUP BY "Site_ID" ) Any ideas would be appreciated! ![enter image description here](http://i.stack.imgur.com/rfvnb.jpg)


title: Download from GPS / changing SCR / still not working

text: I use a GARMIN GPS; I download my points from the GPS by using GPS tool; I "try to" change projection (SCR) by changing layer property/specify SCR Still, it not working and I cannot view my layer on my project... Any help? Thank... Sorry... I'm french ;-)


title: Creating ArcGIS color ramp to show from -X to 0 to X as Red to White to Green?

text: How do I get a color ramp in ArcGIS to show from -X to 0 to X, as Red to White to Green? Whenever I try, ArcGIS scales the colors from min to max, without regard to 0. White ends up representing a positive or negative value. I want the full red to represent the negative of the full green even if I don't have symmetric values in my data! This is important if I do not wish to lie about the data. If I show full green for -5000 but full red for +25000 the scales are misleading and intermediate values cannot be accurately interpreted.


title: Buying location data of Restaurants with Cuisine information?

text: I'm looking to buy restaurants data + get weekly updates of it so I keep updated. I've looked at several questions, (mysql database of bars, pubs and restaurants in the united states and maybe canada; GIS data for fast food industry; and POI Datasets for North America) but I'm not satisfied. My interest is to buy data and keep it in house so I can run some algorithms on it. For the algorithms I need to have the restaurant cuisine type/categories strongly defined. I've looked at the data schema of the following   1. Factual   2. OpenStreetMap   3. restaurants-database.com They do not have what I'm looking for. These following may have limit + I cannot own the data in house(I believe). so does not solve the purpose.   1. Facebook   2. Yelp   3. Google   4. Foursquare My requirements:   1. Well defined restaurant cuisine type   2. Location (latitude longitude) Which provider has this information? Could anyone point me to the right vendor?


title: GeoServer SLD - size by scale and color by attribute

text: I would like to write an SLD that defines point size by zoom level using zoom denominators and color by a comparison operator. I am having trouble combining the two into rules because I cannot find evidence in the SLD cookbook that logical (And) operators are supported for anything other than combinations of spatial and comparison operators. Here is what I have for my first zoom level (denominator based off Bing maps scales, this part works fine), can anyone suggest a work-around or a missing step? [Note: the only thing that is changing in the rule filter is the color based off of whether the point belongs to Company A or Company B.] Thanks for any insight!               <NamedLayer>     <Name>default_point</Name>     <UserStyle>       <Title>Default Point</Title>       <Abstract>A sample style that draws a point</Abstract>       <FeatureTypeStyle>         <Rule>           <Name>Local company A</Name>           <Title>Local Company A</Title>           <ogc:Filter>             <ogc:And>               <ogc:PropertyIsEqualTo>                 <ogc:PropertyName>company</ogc:PropertyName>                 <ogc:Literal>A</ogc:Literal>               </ogc:PropertyIsEqualTo>               <MaxScaleDenominator>144447.93</MaxScaleDenominator>             </ogc:And>           </ogc:Filter>           <PointSymbolizer>             <Graphic>               <Mark>                 <WellKnownName>circle</WellKnownName>                 <Fill>                   <CssParameter name="fill">#000080</CssParameter>                 </Fill>               </Mark>               <Size>8</Size>             </Graphic>           </PointSymbolizer>           </Rule>         <Rule>           <Name>Local Company B</Name>           <Title>Local Company B</Title>           <ogc:Filter>             <ogc:And>               <MaxScaleDenominator>144447.93</MaxScaleDenominator>               <ogc:PropertyIsEqualTo>                 <ogc:PropertyName>company</ogc:PropertyName>                 <ogc:Literal>B</ogc:Literal>               </ogc:PropertyIsEqualTo>             </ogc:And>           </ogc:Filter>           <PointSymbolizer>             <Graphic>               <Mark>                 <WellKnownName>circle</WellKnownName>                 <Fill>                   <CssParameter name="fill">#696969</CssParameter>                 </Fill>               </Mark>               <Size>8</Size>             </Graphic>           </PointSymbolizer>           </Rule>       </FeatureTypeStyle>     </UserStyle>


title: ArcFM Electrical - Transformer Annotations Location Removed on Field Calculate

text: I am working with ArcFM and I have done a mass update to a textfield that was being used for the kVA field in the Transformers Table. The annotation script itself was looking for a text string that contained the letters kva and if it did contain those letters it would draw the annotation. We used the field calculator like so: KVA = Replace([KVA],"kVA","") This replaced each and every record in the table and it worked flawlessly. When we inspected the map some time later however the annotation for KVA was missing from every single transformer. I believe it is because we did not first modify the annotation script before executing the field calculation... Ideally we wanted to revert back to the backup that took place the day before this kva field update occurred. Unfortunately this is how we discovered there is a problem with our backups and the latest one we have is about ~week old. We have a test server set up which has one of the backups loaded onto it. I am able to export the layer file and when I import it and make it visible in the layers all of the KVA's are there. So I thought I could easily join/relate the table and then swap the Shape field in the TransformerAnno table. But it does not seem possible to use import a complex data type like geometry from a different table. The alternative to not being able to programmatically backup the Shape field from the layer/TransformerAnno table to the table in question is to replace every single annotation and move it by hand. Hopefully I provided enough information and any help is extremely appreciated.


title: How do I make a picture marker symbol at a given latitude and longitude in ArcGIS for Javascript?

text: I have no idea how to use ArcGIS, so I spent about six hours trying to figure it out and got nothing. The only thing I have working is showing the map.               arcgisUtils.createMap("39526eb31f1d42359ab82894999ae6a3","map").then(function(response){           //update the app            //dom.byId("title").innerHTML = response.itemInfo.item.title;           //dom.byId("subtitle").innerHTML = response.itemInfo.item.snippet;                var map = response.map;                var graphicsLayer = new esri.layers.GraphicsLayer();             map.addLayer(graphicsLayer);                //test json           json_object = {                    "displayFieldName" : "STATE_FIPS",                    "fieldAliases" : {                      "STATE_FIPS" : "STATE_FIPS"                    },                    "geometryType" : "esriGeometryPoint",                    "spatialReference" : {                      "wkid" : 102100                    },                    "fields" : [                      {                        "name" : "STATE_FIPS",                        "type" : "esriFieldTypeString",                        "alias" : "STATE_FIPS",                        "length" : 2                      }                    ],                    "features" : [                      {                        "attributes" : {                   "STATE_FIPS" : "01"                        },                        "geometry" : {                   "x" : -113.5781,                   "y" : 37.0953                        }                      }]};                //end test json                var point;             var symbol = new PictureMarkerSymbol('img/Land/Lnd_icon_0.png', 200, 200);                var graphic;                for(var i=0; i<json_object.features.length; i++)                {                 point = new esri.geometry.Point(json_object.features[i].geometry.x, json_object.features[i].geometry.y);                 graphic = new esri.Graphic(point, symbol);                 graphicsLayer.add(graphic);                     }                   //add the scalebar            var scalebar = new Scalebar({             map: map,             scalebarUnit: "english"           });                //add the legend. Note that we use the utility method getLegendLayers to get            //the layers to display in the legend from the createMap response.           var legendLayers = arcgisUtils.getLegendLayers(response);            var legendDijit = new Legend({             map: map,             layerInfos: legendLayers           },"legend");           legendDijit.startup();               dojo.connect(map, 'onLoad', function(theMap) {                  //resize the map when the browser resizes                 dojo.connect(dijit.byId('map'), 'resize', map,map.resize);               });                   dojo.addOnLoad(init);                          });


title: How to install LAS tools in Processing for QGIS 2.4?

text: Does anyone know were the processing menu moved in QGIS 2.4? Specifically I am trying to install the Lastools box for QGIS following these instructions. http://rapidlasso.com/2013/09/29/how-to-install-lastools-toolbox-in-qgis/ Thanks


title: How to add an IFeature to the Map and zoom to it ?

text: I have an `ITable` i cast it to an `IFeatureLayerDefinition` after casting it to an `ILayer` then to an `IFeatureLayer`, then i used my `IFeatureLayerDefinition` to get only one `IFeature` using the `IFeatureLayerDefinition.DefinitionExpression` so when i add my `ILayer` to the Map and refresh it works but i couldn't zoom to it programmatically this is my code :               private void list_commune_SelectedIndexChanged(object sender, EventArgs e)     {         if(table_commune==null) return;              ILayer layer = (ILayer)table_commune;         IFeatureLayer fl = (IFeatureLayer)layer;              object selectedCommune = ((ComboBox)sender).SelectedItem ;         object code_commune = null;              if (!this.commune_dic.ContainsKey(selectedCommune))              return;         else              code_commune = this.commune_dic[selectedCommune];              IFeatureLayerDefinition featureLayerDef = (IFeatureLayerDefinition)fl;         featureLayerDef.DefinitionExpression = "NUM_COMMUNE = " + (code_commune);              Map.AddLayer(layer);         Map.Extent = Map.get_Layer(0).AreaOfInterest;         Map.Refresh();     }      And this how my IFeature looks like when i added it to the Map : ![And this how my IFeature looks like when i added it to the Map](http://i.stack.imgur.com/YFTDS.jpg)


title: Script to buffer 2 shapefiles within each folder of a root folder

text: I need some help with ArcGIS python script My folder tree is like this: /Testing location               C1              POIS.shp         STREETS.shp     C2      etc, etc I'm trying to make a script to run from arcgis that would go into each folder from the main directory and buffer the two shapefiles, output a specific file (Surrounding_Streets.shp for example) for each layer in each respective folder. So within each folder I'd now have POIS.shp, POIS_SURROUNDING.shp, STREETS.shp, and STREETS_SURROUNDING.shp Thanks for any help!


title: OpenLayers Mobile add marker

text: I want to display some markers on Openlayers map mobile version. I know that standard way of adding markers on Openlayers does not work with Openlayers mobile library. The example of Openlayers site didn't help me add a marker dynamically. Can somebody show me the correct way of implementation? Thanks in advance.


title: Extracting data with osmosis

text: I downloaded planet-latest.osm.bz2 file. Then tried to extract data using the following command.               osmosis --read-xml enableDateParsing=no file=J:\planet-latest.osm\planet-latest.osm.bz2      --bounding-box top=9.882275 bottom=5.965754 left=79.506340 right=82.02209 --write-xml      file=J:\planet-latest.osm\new.osm      But this command gives errors as in following               Aug 10, 2013 3:43:07 PM org.openstreetmap.osmosis.core.Osmosis run     INFO: Osmosis Version 0.43.1     Aug 10, 2013 3:43:07 PM org.java.plugin.registry.xml.ManifestParser <init>     INFO: got SAX parser factory - org.apache.xerces.jaxp.SAXParserFactoryImpl@15e60     1     Aug 10, 2013 3:43:07 PM org.java.plugin.registry.xml.PluginRegistryImpl configur     e     INFO: configured, stopOnError=false, isValidating=true     Aug 10, 2013 3:43:07 PM org.java.plugin.registry.xml.PluginRegistryImpl register          INFO: plug-in and fragment descriptors registered - 1     Aug 10, 2013 3:43:07 PM org.java.plugin.standard.StandardPluginManager activateP     lugin     INFO: plug-in started - org.openstreetmap.osmosis.core.plugin.Core@0.0.0.42-6-gf     39a160-dirty     Aug 10, 2013 3:43:07 PM org.openstreetmap.osmosis.core.Osmosis run     INFO: Preparing pipeline.     Aug 10, 2013 3:43:07 PM org.openstreetmap.osmosis.core.Osmosis run     INFO: Launching pipeline execution.     Aug 10, 2013 3:43:07 PM org.openstreetmap.osmosis.core.Osmosis run     INFO: Pipeline executing, waiting for completion.     Aug 10, 2013 3:43:18 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTas     kManager waitForCompletion     SEVERE: Thread for task 1-read-xml failed     org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to parse xml file      J:\planet-latest.osm\planet-latest.osm.bz2.  publicId=(null), systemId=(null),     lineNumber=3959, columnNumber=127.             at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:116)             at java.lang.Thread.run(Thread.java:722)     Caused by: org.xml.sax.SAXParseException; lineNumber: 3959; columnNumber: 127; X     ML document structures must start and end within the same entity.             at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un     known Source)             at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)                  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)             at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)             at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)             at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)             at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.endEntity(Unkno     wn Source)             at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Sourc     e)             at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)             at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)             at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)             at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(U     nknown Source)             at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen     t(Unknown Source)             at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent     Dispatcher.dispatch(Unknown Source)             at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un     known Source)             at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)             at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)             at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)             at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)             at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour     ce)             at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)             at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)             at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:111)             ... 1 more          Aug 10, 2013 3:43:18 PM org.openstreetmap.osmosis.core.Osmosis main     SEVERE: Execution aborted.     org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed     .             at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForComple     tion(Pipeline.java:146)             at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)             at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.     java:57)             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces     sorImpl.java:43)             at java.lang.reflect.Method.invoke(Method.java:601)             at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun     cher.java:329)             at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav     a:239)             at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La     uncher.java:409)             at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:     352)             at org.codehaus.classworlds.Launcher.main(Launcher.java:47)      Please help me to understand this problem and how to solve it.


title: QGIS vs. SVG export w area names

text: Salve a tutti, esiste la possibilità di esportare un file SVG (a partire dallo shapefile) che conservi però i nomi delle aree? In sostanza ogni tracciato chiuso dovrebbe avere il nome originale attribuito allo shapefile. Ma non solo. Mi servirebbe avere anche i singoli punti geoide nominati allo stesso modo dell'area. Anche in modo univoco, stile "punto_NOMEAREA", mentre l'area dovrebbe chiamarsi semplicemente "NOMEAREA". È fattibile? - GRAZIE A CHIUNQUE RISPONDERÀ! Hi all, there is the possibility of exporting a SVG files (from shapefile) which retains the area names? Basically any closed path should have the original name attributed to shapefiles. But not only. I would also have individual geoid points appointed in the same way. Even so unique, "point_AREANAME", while the area should be called simply "AREANAME". Is feasible? - THANKYOU!


title: How to generate Non-smooth/crude Contour Lines in QGIS?

text: I have an SRTM DEM and I want contour lines generated for specific elevations. This can easily be done using r.contour.level/step etc. but the contours generated are smooth and cover the cells only partially (red lines in image). Are there any methods by which I could generate a contour line that encloses the cell boundaries above a desired elevation. Image description: Red line is the 3950m contour generated by QGIS. The yellow line is one I need: a contour enclosing all cells >= 3950m). ![.](http://i.stack.imgur.com/2a7xz.jpg) EDIT: The goal is to extract the surface area of elevation ranges (50-100,100-150 etc.) in my raster. I have a surface area raster, and the next step is to calculate zonal statistics of the raster based on a defined polygon area of interest as my contours are occur every 50m, they seemed ideal for the mask. BUT Using a smooth contour vector gives me incomplete zonal statistics for every elevation polygon. This is could be because the 3950 contour polygon does not "completely" enclose pixels >= 3950. In the example below, the the zonal stats only gave me data for 5 pixels. The correct data should include 12 pixels (which I manually checked to be >= 3950m) as enclosed by the yellow line.


title: How to draw line pointing in compass bearing direction from point shapefile?

text: I captured waypoint data in the field including the compass azimuth when looking at some summits. I want to use these waypoints, that I have now in Shapefile format, to draw line shapefiles that point in the compass azimuth that I defined for each waypoint. Do you know an elegant solution for this problem?


title: PostGIS package problem on Ubuntu 12.04.2 LTS

text: I've started getting an error on Ubuntu when trying to upgrade packages: "Not all updates can be installed Run a partial upgrade, to install as many upgrades as possible" When I run a partial upgrade, I get this: "Could not calculate the upgrade An unresolvable problem occurred while calculating the upgrade: The package 'postgresql-9.1-postgis' is marked for removal but it is in the removal blacklist. This can be caused by: * Upgrading to a pre-release version of Ubuntu * Running the current pre-release version of Ubuntu * Unofficial software packages not provided by Ubuntu This is most likely a transient problem, please try again later." I have PostGres 9.1.9 and PostGIS 1.5.3. Sounds similar to this problem: Postgresql 9.1, Postgis 2.0 Ubuntu 12.04 Installation Problem Thanks Mini


title: Fail to export shapefile created from X,Y table

text: I have a dbf file with X,Y coordinates. I chose to display X, Y data in ArcGIS and got a temporary shapefile. However, when I try to export the temporary shapefile, I got an empty one. There is nothing wrong with the titles of the variables in the table. And I tried to re-save the table in the other format and re-create the shapefile. It does not work. Did anyone have this issue before? Thanks for your help!


title: How to select the longest vector in a couple of parallel polylines?

text: I work with ArcGis 10.2. I need to find the longest vector in a couple of parallel vectors. They are extracted from an Intersect of Streets buffer and a flooding limit. So I have sometimes only one side of the road being flooded (which is ok) and sometimes both sides, from which I need to know the longest "flooded" polyline in order the calculate an estimation of the cost of reparation for the whole portion of the road, based on this maximal length. The distance between the parallel lines is fixed. I hope this makes sense , I can explain more if needed Many thanks


title: why preview image is blank for ImageMosaicJDBC (postgis raster) layer?

text: I follow http://docs.geotools.org/latest/userguide/library/coverage/pgraster.html to publish a ImageMosaicJDBC layer in geoserver. the layer seems published ok and saved, but the preview of this layer does not give me a meaningful overview image, only a blank image with the correct lat lon extent. Also I don’t know why I got two bands when I get feature info, the geotiff that goes into postgis raster table only has one band. In the contrast, using Quantum GIS Lisboa I can see greyscale image after adding layer for the Postgis raster table in postgres. below is what I have done: step 1: Translate netCDF into GeoTiff: `$ gdal_translate.exe -of GTiff -scale -32766 32766 -32766 32766 -ot INT16 gebco_08_-12_-51_11_54.nc gebco08part2.tif` step 2: Load GeoTiff into Postgres as PostGIS raster table: `C:\temp>"C:\Program Files\PostgreSQL\9.2\bin\raster2pgsql.exe" -s 4326 -I -C -M gebco08part2.tif | "C:\Program Files\PostgreSQL\9.2\bin\psql.exe" -d postgis20 -U postgres` step 3: Create master table and tile table in Postgres: `create table gebco_master2 (NAME varchar(254) not null, TileTable varchar(254)not null, minX FLOAT8,minY FLOAT8, maxX FLOAT8, maxY FLOAT8,resX FLOAT8, resY FLOAT8, primary key (NAME,TileTable))` `insert into gebco_master2(NAME,TileTable) values ('gebco_cover','gebco08part2')` step 4: Configure mosaic JDBC plugin in geoserver: gebco.pgraster.xml: `<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE ImageMosaicJDBCConfig [ <!ENTITY mapping PUBLIC "mapping" "mapping.pgraster.xml.inc"> <!ENTITY connect PUBLIC "connect" "connect.pgraster.xml.inc"> ]> <config version="1.0"> <coverageName name="gebco_cover"/> <coordsys name="EPSG:4326"/> <scaleop interpolation="1"/> &mapping; &connect; </config>` connect.pgraster.xml.inc: `<connect> <!-- value DBCP or JNDI --> <dstype value="DBCP"/> <!-- <jndiReferenceName value=""/> \--> <username value="postgres" /> <password value="password" /> <jdbcUrl value="jdbc:postgresql://localhost:5432/postgis20" /> <driverClassName value="org.postgresql.Driver"/> <maxActive value="10"/> <maxIdle value="0"/> </connect>` mapping.pgraster.xml.inc: `<spatialExtension name="pgraster"/> <mapping> <masterTable name="gebco_master2" > <coverageNameAttribute name="name"/> <maxXAttribute name="maxx"/> <maxYAttribute name="maxy"/> <minXAttribute name="minx"/> <minYAttribute name="miny"/> <resXAttribute name="resx"/> <resYAttribute name="resy"/> <tileTableNameAtribute name="tiletable" /> </masterTable> <tileTable> <blobAttributeName name="rast" /> <keyAttributeName name="rid" /> </tileTable> </mapping>` step 5: Then add ImageMosaicJDBC store and layer in geoserver: URL Connection Parameters: file:coverages/gebco.pgraster.xml I believe the postgis raster table in postgres database should be correct otherwise quantum gis won't be able to view it, the question is have I configured geoserver correctly, why the preview image is blank?


title: How to create a dock widget correctly in QGIS plugin?

text: I am building a QGIS plugin and would like to use a dock widget. I have used QT creator to design the UI, with the object type being a QDockWidget. When the plugin is enabled in QGIS the dockwidget appears to be inside of a normal dialog box. I am therefore unable to dock the plugin to the toolbar space etc. I have looked at other plugins using dock widgets but am unable to spot where I am going wrong. I used the plugin builder to generate my template code. ![Result of running my plugin](http://i.stack.imgur.com/L2FiJ.png) myplugindialog.py               from PyQt4 import QtCore, QtGui     from ui_Myplugin import Ui_MyPlugin          class MyPluginDialog(QtGui.QDockWidget, Ui_MyPlugin):         def __init__(self):             QtGui.QDockWidget.__init__(self)             self.ui = Ui_MyPlugin()             self.ui.setupUi(self)      part of myplugin.py               class myplugin:          def __init__(self, iface):         # Save reference to the QGIS interface and map canvas         self.iface = iface         self.canvas = iface.mapCanvas()         self.mapRenderer = self.canvas.mapRenderer()         # initialize plugin directory         self.plugin_dir = os.path.dirname(__file__)         # initialize locale         locale = QSettings().value("locale/userLocale")[0:2]         localePath = os.path.join(self.plugin_dir, 'i18n', 'myplugin_{}.qm'.format(locale))              if os.path.exists(localePath):             self.translator = QTranslator()             self.translator.load(localePath)                  if qVersion() > '4.3.3':                 QCoreApplication.installTranslator(self.translator)              # Create the dialog (after translation) and keep reference         self.dlg = mypluginDialog()          def initGui(self):         # Create action that will start plugin configuration         self.action = QAction(             QIcon(":/plugins/myplugin/icon.png"),             u"My Plugin", self.iface.mainWindow())         # connect the action to the run method         self.action.triggered.connect(self.run)         QObject.connect(self.dlg.ui.searchButton, SIGNAL("clicked()"), self.searchFromDialog)         QObject.connect(self.dlg.ui.zoomButton, SIGNAL("clicked()"), self.zoom)              self.toolbar = self.iface.addToolBar("My Plugin")         self.toolbar.setObjectName("PMy Plugin")         self.toolbar.addAction(self.action)         self.toolbarSearch = QLineEdit()         self.toolbarSearch.setMaximumWidth(200)         self.toolbarSearch.setAlignment(Qt.AlignLeft)         self.toolbarSearch.setPlaceholderText("Type address and hit enter")         self.toolbar.addWidget(self.toolbarSearch)         self.toolbarSearch.returnPressed.connect(self.searchAddressFromToolbar)              # Add toolbar button and menu item         self.iface.addPluginToMenu(u"&My Plugin", self.action)


title: Filtering features in Bounding Box made from lat long?

text: I have a feature data which is based on lat/long. To show on the map, I convert them to east/nort. When dealing with Bounding box, I am getting co- ords is east/north, so I am converting from east/north to latlong. Left/Top, Right/Bottom pairs. But the issue is that after the conversion to lat/long, bounding box may not a rectangle. With east/north, I can use simple SQL clause to filter out features. What clause should i make for handling filetring based on lat/long. When dealing with feature data based on east/north, i use a simple where clause Lat < high && Lat > Low && Long > high && Long < Low. But when dealing with lat/long I cannot go with that. I need to do something addition to this. I am using SQL server/Oracle


title: Mac OS X 10.6.8 QGIS not using user-installed Python 2.7

text: My QGIS does not recognize the recently installed python 2.7 on my mac osx 10.6.8. it still uses the python version 2.6 that is automatically installed by apple. Opening qgis I always receive an error message telling me that the module importlib is not found and prevents the processing plugin from working. How can I tell QGIS to use the installed python version 2.7 (In /Library/Python) instead of 2.6 (In /System/Library/Python)? QGIS was installed from Dakota cartography nightly builds. Please note that this is different from this question as it does not ask for the _reason_ for the problem but for a _solution_. thank you for your help!


title: Having problems with joining an excel table to a shapefile in ArcMap

text: I have a shapefile of lower layer super output areas (LSOA) for England and Wales and I have a spreadsheet of the indices of deprivation for each of the LSOA's in England. I want to join the deprivation data to the shapefile so it can be mapped in ArcMap. I tried joining the table through the Join and Relates > Join option and put in the fields for the LSOA data for both shapefile and spreadsheet (the data that matches). the attribute table added the datafields to the attribute table from the excel spreadsheet but all of the data is blank!! ive tried looking at the field "type" as ive read that it has been an issue before but it seems to be ok?? Is there anything anyone can suggest? am I doing this wrong? is there a better way?


title: saga_api python library : raise AttributeError("No constructor defined")

text: Good morning, I'm traying to execute a python script using saga_api library, unfortunately I'm stoped in the first step :(. when I tray to execute this command on python: "aga_api.CSG_Module_Library()" I have this error message: "def **init** (self, *args, **kwargs): raise AttributeError("No constructor defined") AttributeError: No constructor defined" and it dose the same thing on windows ! Can you, please, help me to overpass this step ?! System : Ubuntu 13.10 x64 python version : 2.7.5+ saga_api library version : 2.1.1 SAGA program version : 2.1.1 swig version : 2.0.10 Best regards Mounirsky


title: SQL query for raster point samping within postgis

text: I am trying to update my table with the values from a raster stored within the database. **Edit** : I've posted the answer bellow: http://gis.stackexchange.com/a/63655/6711 The query I'm trying to use is Q               update data.points_test_10000          set sdi_index = (                 select                      st_value(rast,geom)  from                          rasters.sdi_4326 a,                             data.points_test_10000 b                      where                          a.rast && b.geom                         ) ;      but I'm getting the error: `more than one row returned by a subquery used as an expression` without the set statments the query works as it should


title: Placeholder Text in search box - Cartodb

text: I am trying to add `placeholder` text to the Cartodb searchbox using the following DOM code               document.getElementsByClassName('text')[0].placeholder='Search Your Constituency';      It actually does not seem to work.


title: Public reprojection services

text: Are there any free public services where I can send one point in a coordsystem and it returns the point reprojected in a specified coordinate system? I will not be doing many requests, for now it is just for a demo.


title: How do I create an animation in google earth using png overlays with kml timestamps?

text: I have the following kml files, each with a different timestamp and png:               <?xml version="1.0" encoding="UTF-8"?>      <kml xmlns="http://www.opengis.net/kml/2.2"      xmlns:gx="http://www.google.com/kml/ext/2.2">      <GroundOverlay>      <name>gx:LatLonQuad Example</name>      <Icon>     <href>     /Users/asd/Dropbox/0mylayerExport.png     </href>      </Icon>     <gx:LatLonQuad>     <coordinates>     -71.007186998722,42.2869344810739 -70.9807964189347,42.360133347777 -71.1410513483055,42.3916360561188 -71.1680083772048,42.3178859041619     </coordinates>     <TimeStamp>     <when>1944-06-06T06:2010-10-26T06:30:08     ></when></TimeStamp><rotation>100</rotation>     </gx:LatLonQuad>     </GroundOverlay>     </kml>      What I'm trying to do is to animate the sequence of png overlays, but I can't figure out how. I can view all of the kml files in google earth, and click through them manually, but I was wondering if there was a neater way of animating this, instead of ticking them on and off. * * * I have tried manually adding timestamps, and time intervals in google-earth, and am still failing to automatically animate overlays, so I would appreciate any advice on how to do this too. Thanks!


title: Legend is stuck on startup()

text:
All my layer URLs and Feature Layers are stored in an array. with an foreach loop, I am creating the FeatureLayers from the URLs,               dojo.forEach(window.layerUrls, function (info, idx) {                 window.featureLayers[idx] = new esri.layers.FeatureLayer(                 window.layerUrls[idx], {                     infoTemplate: infoTemplate,                     mode: esri.layers.FeatureLayer.MODE_ONDEMAND,                     outFields: window.outFields                 }               );                 map.addLayers([window.featureLayers[idx]]);             });      This is the code to generate the legend:               dojo.connect(window.map, 'onLayersAddResult', function (results) {                 var legendDiv = dijit.byId('legendDiv');                 if (legendDiv) {                     legendDiv.destroyRecursive(true);                 }                 var layerInfo = dojo.map(results, function (layer, index) {                     return { layer: layer.layer, title: layer.layer.name };                 });                      var legendDijit = new esri.dijit.Legend({                     map: map,                     layerInfos: layerInfo                 }, 'legendDiv');                 legendDijit.startup();                  });      Whe I run the page this is what the legend looks like and I have no idea why: http://abload.de/img/legend22uj3.jpg Here is the code related to this picture:

Keine Legende vorhanden

Legende wird erstellt...

Legende wird erstellt...

Legende wird erstellt...

Legende wird erstellt...

Legende wird erstellt...
      Additonally: when zooming the legend disappears and only one random FeatureLayer-legend remains Where did I go wrong and why?


title: QGIS Console error Libgrass

text: Just installed QGIS 1.8. on Mac OSX   * Installed GSL   * Install GDAL 1.9 Complete   * Installed QGIS keep getting this console error message in QGIS.               Failed to load /Applications/QGIS.app/Contents/MacOS/../PlugIns/qgis/libgrassrasterprovider.so (Reason: Cannot load library /Applications/QGIS.app/Contents/MacOS/../PlugIns/qgis/libgrassrasterprovider.so: (dlopen(/Applications/QGIS.app/Contents/MacOS/../PlugIns/qgis/libgrassrasterprovider.so, 5): Library not loaded: /Applications/GRASS-6.4.app/Contents/MacOS/lib/libgrass_gis.6.4.2.dylib       Referenced from: /Applications/QGIS.app/Contents/PlugIns/qgis/libgrassrasterprovider.so       Reason: image not found))      and               Couldn't import Python module 'psycopg2' for communication with PostgreSQL database. Without it you won't be able to run PostGIS manager.      when i try and use the postGIS admin tool Anyone know how i can fix this..


title: Is WFS:native mandatory to get OGC compliance?

text: I am a newbie to this domain. I am using WFS 1.1.0 and found out that is has a wfs: native operation. I wanted to know whether I can get OGC compliance without implementing WFS: native or is it mandatory to implement it to get OGC compliance. Any help is apreciated. Its really urgent. Thanks in advance.


title: Using ogr2ogr to download GeoJSON files from ArcGIS MapServer

text: I am trying to download as a GeoJSON file a line feature from a ArcGIS MapServer REST Service run by the National Park Service (link is here) so that I can open the data in QGIS. Using the guide found here, I typed the following command into ogr2ogr:                ogr2ogr -f GeoJSON Route66.json "http://imgis.nps.gov/arcgis/rest/services/NHT/NHT/MapServer/9/query?where=objectid+%3D+objectid&outfields=*&f=json" OGRGeoJSON -gt 1000      The command downloaded and created the file just fine (though it did complain about not knowing which CRS to project it to), but when I went to open the file in QGIS it displayed with a number of weird artifacts along the feature. A picture of what I am seeing can be seen here. Does anyone have any idea how I might go about fixing this situation, if there is any fix to it? As a side note, I have opened the REST Service data straight from their server on ArcGIS Explorer Desktop, and don't see a problem there. I'm running QGIS 2.2 from OpenGeo4W on Windows 7 Professional 64-bit. Thanks for the help in advance!


title: Advanced colour palette for raster data

text: I'm working with satellite date namely chlorophyll and sst. Each geophysical parameter generally has standard colours to represent them. I'm importing geotiffs into Qgis and I'm having difficulty finding the colours needed and a way of styling the raster data. Is there a way to add colour maps when in the raster properties? Can I show a colour bar in print composer or in the legent for these colours. I found a way of changing each colour individually but I'm hoping to find a standard range of colours like the pseudocolour palette. Any help is greatly appreciated. Regards


title: polygonize and raster tools

text: ok simplest question i have asked i think. but im a running QGIS 1.7.4 and there are no other tools in the dropdown menu other than raster calculator. I have seen in a lot of online demos tools below the raster tab.....the one i am interested now in is polygonize...i have searched in the pluggins and no luck......what am i missing ![what i see](http://i.stack.imgur.com/JNScg.jpg)


title: ArcObjects: How to insert data into a table?

text: I have a table in ArcCatalog named WorkOrderAss. This table contains 3 columns: (OBJECTID, FeatureName, Name). I want to insert data to this table from the code behind in C#. Any help would be appreciated.


title: ArcGIS Add-In - protected dll-s crashes ArcMap

text: Have anyone tried to use a protected dll inside an ESRI Add-In for ArcGIS Desktop? We use a 3rd party company to protect our .NET dll-s before we package them. This has worked for ArcGIS extensions before but now when try to do the same for an Add-In ArcMap keeps crashing as soon as we try to call functionality from within a protected dll. Calling this protected dll from outside ArcGIS Desktop works fine. Workflow: 1) Compile dll-s from Visual Studio 2) Change the file extension from .esriAddIn to .zip and unzip the contents 3) Protect the dll-s using 3rd party software 4) Zip the folder and change the extension back to .esriAddIn The Add-in installs fine with ArcMap and it launches the forms. Anyone has got any ideas on why this doesn't work?


title: How to display a control (zoom bar) outside map container in openlayers?

text: Since I'm new to OpenLayers this question might be the simplest of them all but after a quick search on the subject I couldn't find anything useful, so: Is it possible to put a OpenLayers zoom bar/slider outside the map container in another div? Like for example _OpenLayers.Control.Zoom()_.


title: How to compare two files with FME

text: I have two csv files which each have a field containing the same feature type but with different field names. I need to compare the values of these fields in the two files to find out where there are differences? How do I do this in FME.


title: Layer missing Native SRS in geoserver

text: I'm currently trying to get a couple of layers uploaded to a geoserver and I'm having trouble getting the projection recognized. The result of the curl command is that the two layers are both missing the Native SRS, which should be EPSG: 3857. I'm able to fix by manually going to the layer, choosing a Declared SRS, and computing the Lat/Lon Bounding Box from the native bounds. This allows me access to the layer via WMS ,which is what I want. But this is not a good solution. I have a lot of layers that I need to upload, so I don't want to manually fix the missing Native SRS problem for each layer. So how can I fix the shapefiles so that geoserver can find the Native SRS on its own? I got the correct .prj file from here: http://hub.qgis.org/issues/7368 So both the .prj and the .qpj files are set to this for the two shapefiles:               PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs"],AUTHORITY["EPSG","3857"]]