Select independent objects using GEOJson on Openlayers

I'm working with OpenLayers and loading a couple of GEOJson files which works perfectly. Now I want to be able to select individual components of the GEOJson file. As for example if I have more than one Feature (a couple of polygons) when I activate the hover selection, nothing happens. I added the hover selector to this example http://openlayers.org/dev/examples/geojson.html I can actually drag the elements independently but I can't select them. I assume it is because of the projection I'm using. Any Ideas how to fix it? Cheers!               function init(){          var options = {         projection: new OpenLayers.Projection("EPSG:900913"),         displayProjection: new OpenLayers.Projection("EPSG:4326"),         units: "m",         numZoomLevels: 18,     };          map = new OpenLayers.Map('map', options );     var mapnik = new OpenLayers.Layer.OSM({layers: 'basic'});                map.addLayer(mapnik);          map.addControl(new OpenLayers.Control.MousePosition());          var lon = 12.18;     var lat = 53.81;     var lonLat = new OpenLayers.LonLat(lon,lat).transform(map.displayProjection,  map.projection);          var mapcent = new OpenLayers.LonLat(lon, lat).transform(map.displayProjection, map.projection);     zoom = 5.5;     map.setCenter(mapcent, zoom);     document.getElementById('noneToggle').checked = true;          var proj = new OpenLayers.Projection("EPSG:4326");          var file = [];     file[0] = "geojson/nuts3.geojson";          var style = [];          i=0;     while(i<file.length){         style[i] = new OpenLayers.StyleMap({             pointRadius: 2,             strokeColor: 'red',             strokeWidth: 1,             strokeOpacity: 1,             fillColor: 'red',             fillOpacity: 0.2         });              var layer_name = "layer_" + i;         vectorLayer[i] = new OpenLayers.Layer.Vector(layer_name,  {             styleMap: style[i],             projection: map.displayProjection,             preFeatureInsert: function(feature){             feature.geometry.transform(proj, map.getProjectionObject());             },         });         map.addLayer(vectorLayer[i]);                 var gjson = new OpenLayers.Format.GeoJSON();         var featurecollection = ReadFile(file[i]);         //Readfile is just a normal Request.POST function            vectorLayer[i].addFeatures(gjson.read(featurecollection));           i=i+1;     }          controls = {         selecthover: new OpenLayers.Control.SelectFeature(vectorLayer[0],{             hover: true,             highlightOnly: true         })     };          for(var key in controls) {         map.addControl(controls[key]);         controls[key].activate();          }                      var report = function(e) {                 OpenLayers.Console.log(e.type, e.feature.id);             };                  var highlightCtrl = new OpenLayers.Control.SelectFeature(vectors, {                 hover: true,                 highlightOnly: true,                 renderIntent: "temporary",                 eventListeners: {                     beforefeaturehighlighted: report,                     featurehighlighted: report,                     featureunhighlighted: report                 }             });                       map.addControl(highlightCtrl);             map.addControl(selectCtrl);                 }         The geojson file looks something like { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": 0, "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ [ 9.244170, 48.847009 ], [ 9.246171, 48.822260 ], [ 9.248220, 48.796910 ], [ 9.248433, 48.794277 ], [ 9.290007, 48.791633 ], [ 9.298732, 48.785304 ], [ 9.145165, 48.859655 ], [ 9.153553, 48.861241 ], [ 9.207493, 48.852769 ], [ 9.235667, 48.848344 ], [ 9.244170, 48.847009 ] ] ] } } , { "type": "Feature", "id": 1, "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ [ 9.064848, 48.755577 ], [ 9.038994, 48.741317 ], [ 9.104720, 48.709080 ], [ 9.104721, 48.709079 ], [ 9.146561, 48.663574 ], [ 9.156822, 48.652414 ], [ 9.162166, 48.646602 ], [ 9.174173, 48.633544 ], [ 9.064848, 48.755577 ] ] ] } } , ... etc


Short name for SDE featureclass?

Is there an ArcObjects function to get a short name version of an SDE featureclass? For example if my featureclass is: FOOSCHEMA.BARLAYER How do I just get "BARLAYER". Or is it just a simple case of using string manipulation techniques with your language of choice? BTW - This is an ArcEngine app.


How to get distance & bearing between a point and the nearest part of a polygon?

I am fairly new to writing SQL and using PostGIS so apologies if this seems a bit simple or obvious. I have a table of polygon features held in a postGIS database and I need to write an SQL query to select all the attributes, the distance and the direction of the polygon features within a certain distance of a predefined point. I have managed to select the features and calculate the distance (using ST_Distance) but cannot work out how to obtain the bearing. This is the script I am using so far:               SELECT *,       ST_Distance (Geometry, ST_GeomFromText ('POINT(292596 90785)', 27700))     FROM mytable     WHERE       ST_DWithin(         Geometry,         ST_GeomFromText('POINT(292596 90785)', 27700),         250)       How do I work out the bearing of the features as well as the distance? Any help is very much appreciated. Thanks in advance James


Table join with .csv file results in null fields after join

Similar to questions already asked about .dbf files, I'm attempting to join .csv files to a .gdb or shapefile coverage in QGIS. The tables as added to QGIS prior to the join look fine, but after the join is complete, the amalgamated table has NULL values for all joined fields. The same happens with a variety of different tables, and regardless of whether I'm joining to a shapefile or .gdb file. I'm running QGIS 2.0.1 on a OSX 10.8.5. The original table files are contained in .mdb format so I've purchased and used the MDB ACCDB Viewer to export them to .CSV The fact that they are fine when viewed separately leads me to believe the issue is with the join procedure, not the tables themselves. Suggestions?


How to set coordinate system on raster catalog with arcpy?

When creating a raster catalog, if the optional coordinate system fields for the raster and geometry columns are left empty, they will be stored as unknown. What geoprocessing functions in arcpy should I use to set both of them? ![enter image description here](http://i.stack.imgur.com/CRefI.png) ![enter image description here](http://i.stack.imgur.com/KH6XZ.png)


How to sum the values for bins with the same location?

I have two maps in csv form, each has a latitude, longitude, and value column. Since not all the positions in one map are in another map, is there any way in QGIS to display a new map which only shows the points that are in both of the original maps? Besides, is it possible to display the value of each bin in the new map as a function (e.g. sum) of the values of original maps? Thanks very much


3D features (Polyline, Polygon) intersection library

For my research I am looking for a (python) library to get the intersection of some 3D features. The features can be Polygons or Polylines. Mostly I need to intersect a plane with my features and get the result. After some search I came to CGAL, but CGAL build is not successful because of some missing stuff (Eigen) and since I am not very linux, cmake and make literate, I am searching for something else. (PostGIS is also OK, but the ST_Intersection seems to work only in 2D).


Using nviz module in GRASS through qgis error

I'm an new user to qgis/GRASS and I've run into a problem with the `nviz module`. In trying to visualise a raster heat map created from vector contours in 3D using the nviz module in GRASS tools in qgis. I received the following error dialogue box:               Can't find usable tk.tcl in the following directories:     C:/OSGeo4W/apps/Python27/lib/tcl8.5/tk8.5     C:/OSGeo4W/apps/grass/GRASS-~1.2/etc/lib/tk8.5     C:/OSGeo4W/apps/grass/GRASS-~1.2/lib/tk8.5     C:/OSGeo4W/apps/grass/GRASS-~1.2/etc/library      I'm running `QGIS 1.7.4 Wroclaw` on Win7 32 bit and GRASS 6.4.2 I looked in these directories and both tcl8.5 and tk8.5 were missing. I did find tcl8.5.11 and tk8.5.11 on sourceforge. I'm now not sure how to proceed. Will these files fix my problem and how do I get them running and into the right directories? Any help is greatly appreciated. Kind regards


LineJoiner in FME

I have lot of line objects. Some of them are smaller than some criteria. I would like to join all lines or smaller segments of line which are smaller than `1 meter` to bigger lines, keeping the attributes of the bigger line. Any advice? I tried to use first Tester to check length of the line objects (if it is smaller than 1 m), and than passed output goes to LineJoiner. But actually nothing happens, and lines which come from output port of LineJoiner do not have attributes as lines before (as they should have it). MAybe I complicate too much, but i thought this will be easy task.


Python and CalculateField

I am having trouble with using Python together with my gp.Calculatefield tool in my python script, and I am not sure why.. Heres the code (UPDATED)               import arcgisscripting, os, sys     myTempWorkspace = r"D:\ScheduledTasks\Temp\TempWorkspace_HyMS_Licences.gdb"     #workspace set up     gp = arcgisscripting.create()     gp.toolbox = "management"     gp.Workspace  = myTempWorkspace     gp.overwriteoutput = 1          codeblock = """\     def calField(Location):         fldLocation = !LICENCE_2_LICENCE_0_LICENCE_LOCATION!              if fldLocation <> " ":             return !LICENCE_2_ROAD_NAME! + " (" + !LICENCE_2_LICENCE_0_LICENCE_LOCATION! + ")"         else:             return !LICENCE_2_ROAD_NAME!     """          try:         #gp.CalculateField_management(myTempWorkspace + os.sep + "LICENCE_3", "LOCATION", "[DWWEB_ADDRESS1] & \" (\" & [DWWEB_LOCATION] &\")\"","VB","")         gp.CalculateField_management(myTempWorkspace + os.sep + "LICENCE_3", "LOCATION", "calField(Location)","PYTHON","codeblock")              print "Calculate Field - Success"     except:         print "Calculate Field - Failure"      I am getting the following error in the pythonWin IDE               >>> Unhandled exception while debugging...     Traceback (most recent call last):       File "D:\temp\CalcFieldTest.py", line 21, in ?         gp.CalculateField_management(myTempWorkspace + os.sep + "LICENCE_3", "LOCATION", "Location(newField)","PYTHON","codeblock")     RuntimeError:      exceptions.NameError: name 'Location' is not defined     Failed to execute (CalculateField).     >>> Calculate Field - Failure      Now I am not sure why I am getting the error, I think I have done everything I should within the codeblock and on the gp.calculatefield line. I'm using ArcGIS 9.3.1 So any help is appreciated.


Turning addresses into GPS coordinates into delivery route?

I have a list of locations (prospects I need to meet) I have to drive to, and I'd like to use either Google Maps or Open Street View to build an optimized route. Are there tools that can take a CSV list of locations and generate a driving route? Thank you.


Smaller raster file natively supported by GeoServer

I have a 800MB GeoTIFF file generated from (ASTER GDEM v2 tiffs) depicting relief to be used as part of a basemap for an application I am working on. I intend GeoServer to serve this raster but it's way too big for my disk-quota allocation. When converted to JPEG200 it's about 15MB but can't use it since I can't install GDAL support on the host machine . My question is: how else can I get a file < 100MB supported by GeoServer whilst retaining the relief depiction of my original GeoTiff.


How to make a WPF Window be a well-behaved child window of ArcMap?

I am pretty familiar with Windows Forms in ArcGIS but WPF, which I'm just starting to tinker with, seems to be a different animal. I've created an ArcMap add-in with a button that displays a Window with some controls on it and would like to display it as a **modal dialog** and have it behave like other dialogs in ArcMap. That is, it should:   1. Initially display centered in the middle of the ArcMap window   2. Block the ArcMap main thread from continuing until the window is closed   3. Not allow the ArcMap application's window to take the focus   4. Not have its own task bar button or show up in the alt-tab list   5. Always draw on top of the ArcMap window I've gotten 1 and 2 taken care of, but the rest I haven't figured out yet. Anyone already tackled this? Related: How stable is WPF in Arcmap?


mapserver ESRI personal geodabase.mdb

I´m trying to read ESRI personal geodabase.mdb through OGR.I have my driver "PGeo" but when I write > ogrinfo INFLOR090812.mdb I have this bug ERROR 1: Unable to initialize ODBC connection to DSN for DRIVER=Microsoft Access Driver ( _.mdb);DBQ=INFLOR090812.mdb, [Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'. ERROR 1: Unable to initialize ODBC connection to DSN for DRIVER=Microsoft Access Driver (_.mdb);DBQ=INFLOR090812.mdb, [Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'. Someone could connect to a database.mdb to read the shapefiles in mapserver? Thank in advance


Invalid return value: published arcgis server 10.0 toolbox

I have a published toolbox that is using conditional execution in one of its models: ![ModelBuilder model showing two possible branches](http://i.stack.imgur.com/7kf0Z.png) This works fine in ArcGIS Desktop 10.0, and each sub model\script works fine when run separately from this model via the geoprocessing service. It appears that ArcGIS Server does not like having a nonassigned model parameter. When this model is run via a geoprocessing service, ArcGIS Server sends a Invalid return value error regarding the first dataset of the branch that does not execute. I could move the conditional branch to the client or to a middle wrapping web service instead. However, I would like to keep the client side execution of this as simple as possible. Has anyone here run into this problem or know of a workaround that doesn't require a separate web service or conditional logic in the client?


Any luck with photo2shape?

I have had variable success with photo2shape in QGIS. I can't figure out what is the success/no success prerequisites. Any thoughts? Currently I have a directory with all 334 photos having geotag data. QGIS stalls when photo2shape is set to work, and QGIS is hard to kill. On a test of 5 of those photos it runs fine.


What is the case for Building Information Modeling (BIM) in GIS?

Working for a consulting firm has introduced me to many hot topic technologies, and key words/lingo. One of which is BIM, or building information modelling. It is definitely a popular topic among architects, structural and civil engineers that praise its utility, as well as software developers and architects that are data-savvy. There is definite talk about developing GIS workflows to support BIM project deliverables. What it the case for BIM in GIS and where do we currently stand? How is BIM slated to improve GIS workflow, quality of deliverables, etc. Since when did GIS analysis become concerned with the "inside of buildings". Traditionally speaking, autocad/microstation technicians were left to design the interiors, and GIS was used for those exterior applications (zoning, land use managements), macro in retrospect.


Setting Center Point of Pixmap Symbol for Mapserver

It seems like all the Mapserver documentation on changing the center-point of a symbol only deals with TYPE 'vector' symbols. I have pixmap symbol (the standard looking Google marker image thingy) that i'm using with a WMS overlay. Once it's rendered the location the symbol represents ( the symbol center-point ) is the middle of the image. This makes the location the symbol represents seem off. I would rather have the marker's tip/point line up with the location it represents. I'm not sure how to do this. Any advice?


How can i display GIF images in map tip using ArcGIS silverlight API?

I'd like to display GIF image in map tip using Silverlight API .I found the below code but it doesn't work for GIF image. Is there any way to display GIF images in map tip using ArcGIS silverlight API?               <StackPanel Orientation="Horizontal">              <Image x:Name="MyImage" Source="/Assets/images/i_zoomin.png" Stretch="None"></Image>     </StackPanel>      Thanks for Advance


Error openlayers plugin in qgis

I did the following steps:   * I put the projection in 3857 and I enabled the project on the fly    * Open a vector shape layer in the projection 4326    * I enabled the openlayers plugin    * Clicked enabled  The error below:               Traceback (most recent call last):       File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\GoogleMapsEngineConnector\googlemapsengineconnector.py", line 266, in handleSelectionChange         gmeMap, gmeLayers = self.getAssetsFromLayer(currentLayer)       File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\GoogleMapsEngineConnector\googlemapsengineconnector.py", line 311, in getAssetsFromLayer         if self.isGmeConnectorLayer(layer):       File "C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\GoogleMapsEngineConnector\googlemapsengineconnector.py", line 294, in isGmeConnectorLayer         provider = layer.dataProvider()     AttributeError: 'OpenlayersLayer' object has no attribute 'dataProvider'          Versão do Python:     2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]      Using OpenStreetMap: ![OSM](http://i.stack.imgur.com/SsWaY.png)


Custom project of Geoexplorer

Is there some custom project existing of geoexplorer free downloadable? I'm student and I'm doing a stage. I need to have a query mask for my map but I'm not able to do it with sdk-suite.


Is it possible to paste features into QGIS from another application?

One of the coolest features in my QGIS workflow is the ability to copy features (select and copy) and then paste the results into, say, Excel or Openoffice - you get your attributes table plus a WKT column that describes the geometry:               wkt_geom               id    name     POINT(250000 9012000)  1     Home      (You can then parse this directly in Excel using something like `=MID(A2, 7, 6)` to get the X value of the point). What would be even better is to be able to edit that table in the external app, copy it again, and paste it back into QGIS (with the relevant layer in edit mode). However, I've tried that without success - QGIS remembers its set of copied features from the previous operation, ignoring the system clipboard (which I've confirmed has the right table stored). Any clever ways to make this work?


How to work with 16 GB orthophoto raster

I would like to use one GeoTIFF raster in a custom ArcGIS-Engine Application, but my provider gave me 4 orthophotos GeoTIFF 4 GB each, because GeoTIFF is limited to 4 GB. Is there any other way to mosaic these images in a format (lossless and well supported), for example, as in file geodatabase or Postgres SDE database (using Arcgis tools or open source tools both are welcomed) ?


XMLHttpRequest cannot load error When we have GeoServer and WebServer on same domain

I have Geoserver and webserver on same domain (Windows XP with IIS). But when i tried to get WMS feature info, i got this error in chrome. If Geoserver and webserver on same orgin, no need of proxy i think. so please suggest me to overcome this issue. Thanks in advance               XMLHttpRequest cannot load http://localhost:8080/geoserver/cite/wms?LAYERS=cite%3Aplym_p1_examplec…e%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A27700&X=596&Y=160. Origin http://localhost:3890 is not allowed by Access-Control-Allow-Origin.


Calling GRASS 6 in GRASS 7 (shell)?

I am running a shell script for batch processing in GRASS 7 (calling it with sh [...sh] in the command line window), which creates a series of rasters through classifications, raster calculator and regression analysis. What I would like to do now is extend that script, so that it calculates the surface roughness of the resulting raster. r.roughness only works so far in GRASS 6, however. I have GRASS 6 installed as well. Is it possible to call GRASS 6 and its extensions with the GRASS 7 command line without starting GRASS 6? Or do I have to write a script that calls both programs from outside of either GRASS environments? Cheers! Peter


How to add command developed with C# to ArcToolbox

I have a command that develop with c# . I want to add this command to the arctoolbox . is there any way to add command to arctoolbox in arcgis programmatically ?


Only one row displayed when opening attribut table

When running the example data for Alaska, the attribute table view for Lakes only shows the first row. All lakes are displayed in the map view.


Line calculation from KML file

I am a beginner in QGIS 2 and Mac OSx Mountain Lion I need to get line length in meters for different gps waypoints. 1 I import kml file to create a new vector shape (this works fine). The projection CRS is WGS84 (as google earth from which KML files are generated). I went through many posts but it was impossible to get a correct distance. Thanks


Changing border thickness QGIS

Does any one know how to stylish a map using QGIS? Im working on some maps but when I project them in Stat Planet Plus the lines look very pointy, not curvy at all and it looks really unprofessional. I attach an image. Any tipps? Thanks in advance. PD if it works, the only files that I have are .shp, .prj, .qpj, .shp, .shx and .dbf. PD 2 to project them in Stat Planet Plus I only use the .shp and .dbf files. ![enter image description here](http://i.stack.imgur.com/RJfkl.png)


How to create multipart polygon if coordinates of each part are given?

How to create a multipart polygon if i am having the values of coordinates of each part. Thanks in advance.


How can I add a pdf as hyperlink for a point in QGIS? Can I do the same in GVSIG?

I am working on a project for which I would have to make a map displaying all archaeological sites of the city; it will later be used and accessed by my office's stuff only. In the end, when clicking on each site, the user should be able to see all the site's information displayed in a dialogue box, but also he should be able to see and have access to the site's relative documents (one pdf for each site). Till now, they have been using gvsig, and some of them insist that we continue working with it, although I have the possibility to choose between that and Qgis. In any case, I know neither to that level (i am a beginner in qgis and never worked with gvsig) so would you please indicate me which of the two programs is better for what I want? And then, could anyone please tell me a simple and easy way to do it (details would be highly appreciated)? Thanks a lot! Eva


Why is the attribute table alphabetizing out of order?

I'm having a problem with the attribute table alphabetizing out of order in QGIS, while working on a Macbook Pro. First, I know that clicking the top of the column will alphabetize in ascending or descending order, that's not the problem. An example is for the name column:   * Kamm's   * Kinsman   * Lee   * Little   * Mount   * North Broad   * North Collins   * West Boulevard   * Woodland   * Buckeye   * Central   * Corlett   * Downtown   * Fairfax The column will have blocks of alphabetized text, but skips certain letters, and then starts alphabetizing again with those letters later in the column. Some things I have already tried to troubleshoot the problem:   * Restarted Computer   * Uninstalled QGIS 1.8 and 2.0   * Follwed the instructions at this link: http://press.underdiverwaterman.com/clean-install-of-qgis-in-osx/   * Installed the GDAL Complete 1.10 framework package   * Reinstalled QGSI 2.0  Additionally, I have tried opening many different shapefiles, but the columns will not sort properly with any of them. Other people have opened the same shapefiles without any problems, so it appears to be specific to my computer. Any help or suggestions are greatly appreciated.


How do I create a non-spatial web map

This question pertains to mapping arbitrary data using web map tile technology. Most of the time the data source for a web map is spatial in nature (OSM). I'd like to create a site map using the cartographic sense of the word. Rather than a boring list of links I'd like to model a site map after cartography from the Metro in Washington DC. This could be used as a sort of alternative to a standard navigation bar. Is it possible to churn any old image/vector into a set of tiles at different zoom levels, if I were to say, draw vectors manually with inkscape?


Which UTM zone 32N with prefix should I use in Rhineland-Palatinate (Germany)?

I would like to store and use GIS-Data in Rhineland-Palatinate (Germany). The coordinate System should be UTM 32N **with 32 as prefix** (false easting = 32,500,000; not 500,000). I looked at **EPSG 4647** [ETRS89 / UTM zone 32N (zE-N)].   But I'm confused because EPSG says: > Scope: Used in Schleswig-Holstein. > > Information Source: Landesvermessungsamt Schleswig-Holstein. Which UTM 32N coordinate system (EPSG-code) should use in Rhineland- Palatinate? EDIT: I will convert a large database from Gauss-Krueger to UTM. The database (and the new coordinate system) will be used for many years. We will exchange data with other (UTM with and without prefix, Gauss-Kueger). Since 4647 to refers to Schleswig-Holstein I am not sure whether 4647 is good for us. But there are no other EPSG codes with zone prefix.


How do I install ArcGIS 10.1 and use my current Python 2.7.2 install?

I just did a clean OS install and installed ActivePython 2.7.2 I want to use this Python install for use with ArcGIS 10.1 I just installed ArcGIS 10.1 and it did a new Python install. What do I need to do to get Python for ArcGIS to install on my current Python?


How best to fix a non-noded intersection problem in PostGIS?

I'm using a `PL/R` function and `PostGIS` to generate voronoi polygons around a set of points. The function that I am using is defined here. When I use this function on a particular dataset I get the following error message:               Error : ERROR:  R interpreter expression evaluation error     DETAIL:  Error in pg.spi.exec(sprintf("SELECT %3$s AS id,        st_intersection('SRID='||st_srid(%2$s)||';%4$s'::text,'%5$s')      AS polygon FROM %1$s WHERE st_intersects(%2$s::text,'SRID='||st_srid(%2$s)||';%4$s');",       :error in SQL statement : Error performing intersection: TopologyException: found non-noded      intersection between LINESTRING (571304 310990, 568465 264611) and LINESTRING (568465      264611, 594406 286813) at 568465.05533706467 264610.82749605528     CONTEXT:  In R support function pg.spi.exec In PL/R function r_voronoi      From examining this part of the error message:               Error performing intersection: TopologyException: found non-noded intersection between     LINESTRING (571304 310990, 568465 264611) and LINESTRING (568465 264611, 594406 286813)      at 568465.05533706467 264610.82749605528      This is what the problem listed above looks like: ![enter image description here](http://i.stack.imgur.com/MSxmL.png) I initially thought that this message might be caused by the existence of identical points, and tried to solve this using the `st_translate()` function, used in the following way:               ST_Translate(geom, random()*20, random()*20) as geom       This does fix the problem, but my concern is that I am now translating all points up to ~20m in the x/y direction. I also can't tell what an appropriate translation amount is need. For example, in this dataset through trial and error a `20m * random number` is ok, but how can I tell if this needs to be bigger? Based on the image above I think the problem is that the point is intersecting with the line while the algorithm is trying to intersect the point with a polygon. I'm not sure what I should be doing to ensure that the point is within a polygon, rather than intersecting with a line. The error is occurring on this line:               "SELECT        %3$s AS id,        st_intersection(''SRID=''||st_srid(%2$s)||'';%4$s''::text,''%5$s'') AS polygon      FROM        %1$s      WHERE        st_intersects(%2$s::text,''SRID=''||st_srid(%2$s)||'';%4$s'');"      I have read through this previous question, What is a "non-noded intersection"? to try to better understand this problem, and would appreciate any advice on how best to solve it.


Importing matplotlib basemap and shapely

I'm not sure if this is the right place to ask this, but here we go. I have a python script that uses matplotlib's basemap and another part that uses shapely to do an intersection of 2 polygons. If basemap is imported before shapely and I run the intersection I get this exception:                 intersect_poly = grid_poly.intersection(data_poly)     File "/sw/lib/python2.7/site-packages/shapely/geometry/base.py", line 334, in intersection       return geom_factory(self.impl['intersection'](self, other))     File "/sw/lib/python2.7/site-packages/shapely/topology.py", line 53, in __call__       "This operation produced a null geometry. Reason: unknown")     shapely.geos.TopologicalError: This operation produced a null geometry. Reason: unknown      If I import shapely first everything works fine. I would assume this is because of some "funkiness" in the way they are accessing the GEOS library. I've checked that in both situations the same library file is loaded in shapely ("print shapely.geos._lgeos"). Does anyone have an idea as to why this is happening and if there is a right way of doing this? Does this happen for anyone else? In the mean time I can just make sure to import shapely first (not sure if that affects basemap yet). Otherwise maybe I'll skim through the basemap source and ask this question on one of the mailing lists. Any suggestions on which mailing list I should post this to? Thanks. I'm using OSX(10.7) with a fink install that has "libgeos3.3.3-shlibs", "libgeos3.3.1-shlibs", "libgeos3.3.1", "libgeos3.3.0-shlibs", "libgeos3.3.0", and "shapely-py27 (1.2.16-1)" installed. And here's a simple test script that reproduces the problem (flip the imports and it works):               from mpl_toolkits import basemap     from shapely import geometry          g_ring = [(-88.462425, 26.992203), (-57.847187, 26.992203), (-57.847187, 17.599869), (-88.462425, 17.599869), (-88.462425, 26.992203)]     grid_g_ring = [(-123.044, 59.844000000000001), (-49.384999999999998, 57.289000000000001), (-65.090999999999994, 14.335000000000001), (-113.133, 16.369), (-123.044, 59.844000000000001)]          data_poly = geometry.Polygon(g_ring)     grid_poly = geometry.Polygon(grid_g_ring)          print grid_poly.intersection(data_poly).area


Layer visibility using maxscale minscale not working

I'm using Openlayer and Geoserver. I have a series of layers that have a scale parameter like: 1:50000-1:25000 where 50000 is the max scale while 25000 is the minscale. I have a map like in this example:               map = new OpenLayers.Map(     {             allOverlays: false,             projection: "EPSG:32632",             maxExtent: bounds,             scales:[500000,350000,250000,100000,25000,20000,15000,10000,5000],                     units: 'm'         });      And I have this layer WMS:                var layer = new OpenLayers.Layer.WMS("layer1",wms_address,             {                 layers:"ws:layer1",                 transparent:true                                         },             {             //        minResolution: 14.035643,     //        maxResolution : 7.01782148                     maxScale:50000,             minScale:25000         });       and I would expect that the layer within that scale it dosen't show up in the map. I need this kind of behaviour. However if I set the scale 1:25000, the layer is present inside the map (I saw it with Firebug) but it is not showed up in the map! I also tried with max and min Resolution but nothing, the layer is in the map but I cannot see it. What I'm doing wrong? Please help me, I looked everywhere in every forum I don't know how to solve this problem! Thank you very much. Laura


How to decrypt/decompile old toolbox tbx-file in ArcGIS 10

I have inherited an arcgis 10 toolbox tbx file for a web application. Are there any way to open the fil in for example Model Builder to see its interiors?


Leaflet: Linking a marker click event to an image

I'm breaking down my question into three parts. I am a beginner to Leaflet and to writing code. Currently, I have a JSON file with all of my markers linked to my map page. The idea is that every marker will have a different image so when the user clicks on the marker the thumbnail for the image will appear in the map, which will link to an image in the website. Here is an example of a marker in the JSON file: var mapshs4 = { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": 0, "properties": { "idcode": "A", "popupContent": "Here!" + '< img src="thumbnail">' }, "geometry": { "type": "Point", "coordinates": [ -89.2, 22.4 ] } }   1. Is there a way to resize the popup box to the image in the popup of a marker.   2. At the same time, I would like the click event to connect to a larger sized image embedded within the site. My guess is that I would have to attach an ID to each image and to each marker to link them together.   3. Conversely, how do you make it so that when the user clicks on the image embedded in the site, it will go to that marker on the map? (For an example that uses a label: http://www.theglobeandmail.com/life/home-and-garden/real-estate/exclusive-how-much-are-homes-in-your-toronto-neighbourhood/article4520994/) Any help would be much appreciated.


How to represent two fields of the same states or district layer using different color borders and fills in QGIS?

If I had a set of data in QGIS that was gradually shading a state or district the exact way I wanted -- but I also need to portray more information about that state or district with additional colors, is that possible to do using colored borders? If so, can somebody walk me through that? And if not, has anybody else thought of another way to represent multiple things about one location? I guess the ideal would be something like shading the state lame yellow to bright yellow pending on how high their statistic was -- and if the state was Democratic-controlled, put a blue border around it, and if it was Republican- controlled, put a red border around it. Something like that. Any suggestions? Thanks! -- *Edit: I think I've potentially figured it out by adding another layer and creating my own border-only style and classify one as Democrat (blue) and one as Republican (red). If the polygon fills are 100% transparent and this layer was on top of the other one, I'd imagine that this should work, right? But every time I get to hitting "ok" to where the map should change to reflect the new borders, it always loads forever to the point where I have to 'Force Quit.' Any thoughts on that? Thanks again!


Fetch Google Map tile, without using Google Map API

Does anyone here know is there any other way to fetch Google map tile, without have to use Google Map API? Microsoft Bing Map does provide Rest API. wonder if possible to with Google Map, Cheer.


QGIS plugins with python dependencies

Problem: I have a Windows XP machine with Python 2.7.3 installed at ‘C:\Python27' and the scipy module installed at ‘C:\Python27\Lib\site- packages'. I installed QGIS 1.8 recently and started exploring plugins. One of the plugins I wanted to use required the scipy module, which, as mentioned above, was already installed. However, the plugin couldn't find scipy because it was not in the ‘C:\Program Files\Quantum GIS Lisboa\apps\Python27\Lib\site- packages’ folder. I considered installing a separate copy of scipy in ‘C:\Program Files\Quantum GIS Lisboa\apps\Python27\Lib\site-packages’ but backed away from using the scipy Windows installer when it couldn't see the QGIS python installation and didn’t give me the option to install scipy under QGIS. Work-around: So I went into the ‘C:\Program Files\Quantum GIS Lisboa\apps\Python27\Lib’ folder and found the 'site.py' file. I opened it in a text editor and, right below the import statements, I found the text: PREFIXES = [sys.prefix, sys.exec_prefix] and I changed it to read: PREFIXES = [sys.prefix, sys.exec_prefix, 'C:\Python27\Lib\site-packages'] Now the QGIS python installation is able to find my original scipy module and it seems to be working fine. Presumably, QGIS plugins will be able to take advantage of the many other [python(x,y)] modules I have installed in this directory. Hope this is useful for others.


Symbology Stretch Multiple Raster

I need to change stretch of a raster using properties - Symbology to **Minimum-Maximum** like image bellow :   ![enter image description here](http://i.stack.imgur.com/NhuoM.png) Problem is I have about 172 raster, is there any way to make this automaticaly change? I have arcinfo license


Model Builder is not intersecting erased and selected files

I'm having trouble debugging my model that I'm creating in ArcMap 10.1 ModelBuilder. The model is just a simple string of geoprocesses, but there's a point at which the model isn't exporting the expected features. Specifically, I've narrowed it down to a point at which the model takes a polyline file which had been erased (interim_erased) and intersects it with a selected polygon file (Inactive_ESA), and at this point the output file (interim_intersect) is empty. The only thing I see that could be happening is that the "ESA" isn't getting selected at the "Select by Attributes" step (The output being "Inactive_ESA"), because the erased file "interim_erased" has the expected features in its table. Also, I've double-checked the selection expression - it's correct and works fine outside of ModelBuilder. I also have the license to execute Erase. Maybe, if someone knows how to look into ModelBuilder at what's actually getting selected at the "Select Layer By Attributes" point in the model? ![part of the model process which has output a blank attribute table](http://i.stack.imgur.com/s5X2S.png) ++++++++++++ ADDED 2014-07-31 +++++++++++++++ The ESA polygons are broken down by active(green) and inactive(red), the polylines as well, active(green) and inactive(red). I'm selecting the green polygons in the ESA, and selecting the red polylines. Then I'm Erasing the red polylines with the green ESA. (This part works, and my intermediate data for this process outputs the expected result - red polylines only on the red ESA with no red polylines overlapping onto green ESA). However, when this erased file of red polylines is intersected with my selected Inactive_ESA (which is where I'm selecting the red polygons), the table is empty. So this suggests to me that the ESA isn't actually getting selected by the "Select Layer By Attribute (9)" process. How might I see what's actually getting selected at this step? (because I've double checked my expression and it's correct and works fine outside of the model) ![ESA and polylines included in the model](http://i.stack.imgur.com/PpXp0.png)


How to use Ordinary Least Square (OLS) & Geographically Weighted Regression (GWR)?

I have managed to join the data set(xl. file) with a shapefile. I want to run these models, OLS and GWR in Arcmap, my problem is, I'm bit confuse about these fields, "Input Feature Class", "Output Feature Class", and "Input Features"?, what do I need to do in order to achieve this task?


How to mask the images in GRASS

I have MODIS NDVI images, which needs to be masked with VI_Quality. I am using GRASS software and executing GRASS commands using shell scripts. I need to perform raster calculation (multiplication) for NDVI images with the VI_Quality. I want to multiply ith NDVI image with the ith image of VI_Quality. I have used the following codes :               for file in $NDVIFILES;     do     r.mapcalc "$file = $NDVIFILES * $QAFILES;     done          i=1     for file in $NDVIFILES;     do     r.mapcalc "file $((i++)) = NDVIFILES $((i++)) * QAFILES $((i++))";     done      I am unable to do this raster multiplication in a loop. Please let me know the correct syntax to do this operation. Thanks


Adding KmlLayer using local file (File API)

I am trying to load a local KML file to the map for this I am using FileReader object (File API). To use google.maps.KmlLayer I need to use readAsDataURL to transform to a URL the file, the problem is that KML File is not loading to the map and I don't get any error. I think may be url attribute in KmlLayer doesn't accept data url. This is the code:               gp.addEventListeners = function(){       $("#file-upload").change(function (evt){           var file  = evt.target.files[0]; // FileList object           var reader = new FileReader();                reader.onloadend = function () {              var ctaLayer = new google.maps.KmlLayer({               url: reader.result             });             ctaLayer.setMap(gp.map);           }                if (file) {             reader.readAsDataURL(file);           }            });     }      In OpenLayes the same code is working. What I can do? I need help :( Sorry for my English.


Anyone who has the ESRI Census 2000 Tiger/Line data?

The ESRI Census 2000 TIGER/Line Data were free. http://www.esri.com/data/download/census2000-tigerline http://arcdata.esri.com/data/tiger2000/tiger_download.cfm But they vanished. The download link is broken. Is there anyone out there who has the data?


ArcGIS 10 - Text background not showing up when exporting

I have highways labeled with the standard shield and route number on it. For my main data frame the labels come up correctly. I also have 4 inset maps where **only the number will show up, not the shield** when exporting to a file (any type). Here are some things that I tried that did not work:   * Exporting the labels to annotation   * Creating replacement graphics (in each inset's data frame view)   * For each of the above, using .png background instead of .emf The only solution that seems to work is creating graphics as part of the document itself and overlaying those on top of the inset. This is very bad practise however and the graphics will not pan with the inset. Just to clarify, the shields (text background) shows up in the layout screen when editing the map but not in the exported product after exporting the map to a .pdf or other extension. The version of ArcGIS being used is 10.1 SP1. I cannot upgrade or change the installation. Suggestions tried:   * Deleting the main dataframe, then exporting - same result   * Moving the inset dataframe to a new document **UPDATE:** It appears that ArcGIS will hide (or not draw) background symbols that are smaller than a certain size compared to the map (% or ratio). When I made the print size smaller (it was originally 34x40 inches) or the symbols larger, the shields showed up. Does anyone know how to change this option on ArcGIS and possibly show all symbols regardless of size? Following comment suggestions, the links provided in this forum post did not help.   * http://support.esri.com/en/knowledgebase/techarticles/detail/28548   * http://support.esri.com/en/knowledgebase/techarticles/detail/30753   * http://forums.esri.com/Thread.asp?c=93&f=1731&t=235317   * http://forums.esri.com/Thread.asp?c=93&f=1731&t=178684   * http://support.esri.com/en/knowledgebase/techarticles/detail/17783 However, following the last link showed that the exported EMF file was not correct, signaling that "the problem exists within ArcMap, usually in converting the elements drawn in the map to the EMF format."


WMS GetFeatureInfo and CQL on Multiple Layers

I am having issues with querying CQL filtered layers with OpenLayers and GeoServer, using the GetFeatureInfo control. It is ignoring the CQL filter and just querying the entire layer (as evidenced by both the results and the request it sends to GeoServer). I've seen examples where the CQL filter is passed to GeoServer along with the GetFeatureInfo request, but I have several layers visible and each of them has a different CQL filter; so I'm not sure how/if I can handle this by appending my filter to the request URL. Does anyone have any ideas how I can solve or work around this issue?


How to handle a UnicodeEncodeError with sampling tool?

I'm using qgis and I keep getting an error when using the point sampling tool, its keeping me from getting the sampling done. Does anyone has an idea what is it about? Thanks! ![error](http://i.stack.imgur.com/KquJW.png)


Looking for geodata of Europe's major roads

As stated in the title, I'm currently looking for a shapefile/other geodata source of Europe's major roads (highways). If anybody knows a free datasource (or a possibility to extract that data from Open Street Map without processing the world file), it would be greatly appreciated.


Merging many to one data rows in arcpy

The dataset 'left_right_merge' at the bottom of my screen shot shows the dataset that I'm currently working with. The NODE values indicate a single point feature, but is duplicated with many attributes. I want to collapse the dataset so that it looks like the 'test_data_nodes' at the top of the screen shot. How would I do this in python? ![enter image description here](http://i.stack.imgur.com/eFsrZ.jpg)


ArcGIS SP4 fails to open file geodatabases created with ogr2ogr

I've been using the new FileGDB support in gdal-1.9.0 to create file geodatabases that can be opened in ArcGIS. For example (I'm doing this all on one line, so I'm not certain this will run as indented here):               ogr2ogr -overwrite -f 'FileGDB' \         -sql "SELECT                    CAST(gml_id AS character(255)), id,                    CAST(scene_id AS character(255)),                    CAST(license_type AS character(255)),                    CAST(url AS character(255))               FROM SDMI_Inventory" \         sdmi_inv.gdb \         WFS:"http://wfs.alaskamapped.org/inventory"      This worked great until 10.0 Service Pack 4, at which point ArcMap / ArcCatalog started reporting errors similar to this when you try to add / preview the layer:               Error opening feature class     The item does not have a definition. [SDMI_Inventory]     The item does not have a definition.     The XML being loaded could not be parsed. [physical name: SDMI_INVENTORY]     The item does not have a definition.     The XML being loaded could not be parsed. [physical name: SDMI_INVENTORY]      I've got the latest (1.2) API and the latest GDAL (1.9.0), x86_64 GNU/Linux. Anyone have any ideas how to get this to work again?


Geoserver SQL Parameter View

I'm trying to use Geoserver Parameter SQL views, but I'm having trouble getting geoserver to recognize the parameters (and I'm not able to follow the documentation - it's not very clear to me). Here's the code I'm working with so far, does anyone have any suggestions?               SELECT *     FROM Table1 INNER JOIN Table2     ON Table1.ID = Table2.ID     WHERE Table1.Date = %Date%      I'm trying to get geoserver to recognize each "Date" as a parameter - there are about 25 total dates, and I want the user to be able to select a date (or multiple dates) for display. The dates are in yyyy-mm-dd format. Thanks for your help.


Hibernate Spatial 4 and Postgis 2.0

I'm having some issues integratings this technologies:   * Hibernate Spatial 4.0-M1   * Postgis 2.0.2 (with compiled jdbc 2.0.2)   * Hibernate 4.1.1 The specific error is:               Caused by: org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of org.postgis.PGgeometry. Use setObject() with an explicit Types value to specify the type to use.      The entity anotation is:               @NotNull     @Column(columnDefinition="Geometry")     @Type(type="org.hibernate.spatial.GeometryType")     private Point geom;      And the Point creation example is:               Location location = new Location();     WKTReader fromText = new WKTReader();     Point geom = null;     try {         geom = (Point) fromText.read("POINT(-56.2564083434446 -34.8982159791812)");     } catch (ParseException e) {         throw new RuntimeException("Not a WKT string:" + "SRID=4326;POINT(-56.2564083434446 -34.8982159791812)");     }     if (!geom.getGeometryType().equals("Point")) {         throw new RuntimeException("Geometry must be a point. Got a " + geom.getGeometryType());     }     location.setGeom(geom);     locationDAO.insert(location);      Thanks!


Is there any way to use mbutil on windows?

I have used mbutil on ubuntu. Its a very handy tools. I am curious that is there any way to use it on windows 64 bit machine. If there is a way please help me to do so. Thanks in advance.


Ogr2Ogr SQLite Geometry Functions

I believe title is all clear.I'm using Ogr2ogr utilities & binaries to read geometry. I used something like this:               ogr2ogr -f "SQLite" test2.sqlite test.sqlite -sql "SELECT ST_X(GEOMETRY),ST_Y(GEOMETRY),COL1,COL2 FROM TABLE"      Error says that there is no function ST_X,where I also tried X(..) that doesnt work either. What am I missing ? I checked the documentation for SpatialLite.There is no other inline function that export X,Y portions of geometry to double.I also need to create geometry from LAT,LONG columns from selection. How can i do these ?


ogrListLayers() in rgdal returns character(0) for a kml file

I try to read a kml file in R. In the past, there was a post (link). I checked stack overflow and found similar posts. By following the examples, I was trying to read a kml file. I could read the kml file using `getKMLcoordinates()` in the maptool package and extract geo data (i.e., longitude and latitude). I also used the `rgdal` package in order to see layer names. But, `ogrListLayers(dsn = "name.kml")` surprisingly returned character(0). My questions are:   1. Is is possible for kml files not to have layer names?   2. If there is no layer name, is there still any hope to find the names? Or do you have to simply give up? P.S. I originally posted this message in stack overflow, but I have not received any suggestions. So I decided to post this message here.


What does "Error: Layer not found: -1" from ArcGIS Silverlight API 2.4 mean?

We are using ESRI SL 2.4 API- and our application has one dynamic service and one feature layer. Only few of the users getting below error, not sure whether this is issue with Microsoft sliverlight version. Any quick help on this. Error: Layer not found: -1 at ESRI.ArcGIS.Client.Layer.OnInitializationFailed(EventArgs e) at ESRI.ArcGIS.Client.Layer.Initialize() at ESRI.ArcGIS.Client.FeatureLayer.info_Error(Object sender, TaskFailedEventArgs e) at ESRI.ArcGIS.Client.FeatureService.FeatureLayerInfo.OnError(Exception err) at ESRI.ArcGIS.Client.FeatureService.FeatureLayerInfo.Execute_Completed(Object sender, DownloadStringCompletedEventArgs e) at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e) at System.Net.WebClient.DownloadStringOperationCompleted(Object arg)


Migrating Lines to ArcGIS polyline

I'm trying to import geometry lines from Oracle Spatial database to ArcGIS enterprise geodatabase. and some data will cause the error. Its says not enough points for feature class, but when I look at offending object. it clearly has 2 or more coordinates stored, but I notice the start and end point is the same. I have check the following a) Using geometry filter to take out lines only b) Use FME inspector to view the lines. b) Used geometry validator 4) Used duplicate coordinate -> Valid dataset will cause the same error How can I solve this problem? May i know is it possible to set FME to skip those data


Easy Custom Labeling plugin does allow to save?

I use the **Easy Custom Labeling plugin** chose positions of the labels and safe the layer and project for continuing later. When opening again the project, the layer opens but without any objects inside. Is there a reason why the layer is saved, but not its content?


How to select behind feature which is overlapped with the same layer on QGIS 1.8.0

My issue: I received data which was created without "Avoid intersection of new polygon". There a few overlapped feature with the same layer. I could fine overlapped feature by the spatial query. But then, I could not select behind small feature. At present, I select target feature from attribute table and delete that feature. I'm hoping I could be able to select feature without attribute table. Grateful for any help!!


Neighborhood analysis based on occurrence of value

How can I do, either in ArcGIS, grass or another tool, the following: for each cell (pixel), if there is at least one cell with value '4' in a neighborhood of 5 cells around it, reclassify that cell to 0, otherwise don't change the value? Thanks.


Weather conditions forecasting / interpolation

I'm trying to carry out weather conditions interpolations. I have information of 92 weather stations for 800,000 km2. As you can imagine the extension of land is huge and I need some kind or weather forecasting models to predict wind velocity and direction and solar irradiation for points in between the stations via interpolations. This means if I have a weather station in A and another one in C, I can know what is happening in B with weather forecasting models. Do you know if QGIS does something alike? (maybe there is a plugin to download ?!) Are you familiar with any models that could help me out? Thanks in advance!!


Should I move from ArcGIS modelbuilder to python?

I have been learning how to use ModelBuilder with ArcGIS 10.2, and I like that it shows me visually how to process data using ArcGIS's functions. I think visually. I see, however, many replies by folks that users should drop MB in favour of Python. I am not a programmer, and don't foresee dropping everything to learn a new language. It's not that I can't; it's more that I don't have the time to learn a new language. Why should I, a non-programmer, move from ModelBuilder to Python, and if I really should, is there a relatively painless way to make the transition? Is there a visual Python equivalent to MB, for example? This trend of pushing people towards Python and away from MB troubles me. I have noted that development for MB seems at a standstill, ditto bug-swatting for MB. Can anyone shed some light on a murky topic for me? Thx, Russell in Canada


How to search and zoom to result using WMS?

I am making a web gis application (openlayers/geoserver) to display a layer of properties, I need to add a functionality of search in it based on the name of the owner. A list of similar names owners with address should be displayed and when i click a particular item the map should be zoomed on the particular property location. The problem is that i want this functionality using WMS. (I do not want it in WFS as the vector layer can be copied using QGIS or other tools, it is not secure). Please let me know how will this be possible using WMS.


error performing wfs-t insert in postgres 9.1.4

I am getting **error performing insert** exception while performing wfs-t insert operation when i use **postgres 9.1.4 and postgis 2.0**. but i get **successful insert** when using **postgres 9.0.1 and postgis 1.5** (on another computer). is this some kind of bug in postgres/postgis or i am doing something wrong ? my script is below               OpenLayers.ProxyHost= "/cgi-bin/proxy.cgi?url=";     //variables     //var host = "http://192.168.10.11";     var host = "http://localhost";     var port = ':8888';     var centerX = 85.3403;//491213.721224323//-123.1684986291807;//9497800;     var centerY = 27.70774;//5456645.24607268//49.245339757767844;//3212000;     var center = new OpenLayers.LonLat(centerX, centerY);     var range = 1.5;//10000000//.5;//10000;     var map_bound = [centerX-range,centerY-range,centerX+range,centerY+range];     var map_wd = 490;     var map_ht = 360;     var legend_wd = 100;     var legend_ht = map_ht;     var tbar_wd = map_wd + legend_wd;     var tbar_ht = 100;     var zoom = 15;          var proj_sp = new OpenLayers.Projection("EPSG:4326");          var DeleteFeature = OpenLayers.Class(OpenLayers.Control, {         initialize: function(layer, options) {             OpenLayers.Control.prototype.initialize.apply(this, [options]);             this.layer = layer;             this.handler = new OpenLayers.Handler.Feature(                 this, layer, {click: this.clickFeature}             );         },         clickFeature: function(feature) {             // if feature doesn't have a fid, destroy it             if(feature.fid == undefined) {                 this.layer.destroyFeatures([feature]);             } else {                 feature.state = OpenLayers.State.DELETE;                 this.layer.events.triggerEvent("afterfeaturemodified",                      {feature: feature});                 feature.renderIntent = "select";                 this.layer.drawFeature(feature);             }         },         setMap: function(map) {             this.handler.setMap(map);             OpenLayers.Control.prototype.setMap.apply(this, arguments);         },         CLASS_NAME: "OpenLayers.Control.DeleteFeature"     });          function oldBrowser() {         var browser = navigator.appName;         var b_version = navigator.appVersion;         var version = parseFloat(b_version);         var useragent = navigator.userAgent;         switch (browser){             case 'Microsoft Internet Explorer':                 browser = "MSIE";                 version = useragent.substr(useragent.lastIndexOf('MSIE') + 5, 3);                 if(version<10)                     return true;                 break;             case 'Netscape':                 if (useragent.lastIndexOf('Chrome/') > 0) {                     browser = "Chrome";                     version = useragent.substr(useragent.lastIndexOf('Chrome/') + 7, 10);                 }                 else if (useragent.lastIndexOf('Firefox/') > 0) {                     browser = "Firefox";                     version = useragent.substr(useragent.lastIndexOf('Firefox/') + 8, 5);                 }                 else if (useragent.lastIndexOf('Safari/') > 0) {                     browser = "Safari";                     version = useragent.substr(useragent.lastIndexOf('Safari/') + 7, 7);                 }                 else                 { alert("undefined browser"); }                 break;             case 'Opera':                 version = useragent.substr(useragent.lastIndexOf('Version/') + 8, 5);                 break;         }     }          Ext.onReady(function() {             if(oldBrowser()){             alert("Your browser version is pretty old."                  +"please update to latest version"                  +"performance may be reduced.");         }              var saveStrategy = new OpenLayers.Strategy.Save();         /*saveStrategy.events.register("start", '', alert('saving'));         saveStrategy.events.register("success", '', alert('save success'));         saveStrategy.events.register("failure", '', alert('save failure'));         */         //map configuration         var map_options = {             allOverlays:true,             maxExtent:new OpenLayers.Bounds(map_bound[0],map_bound[1],map_bound[2],map_bound[3]),             numZoomLevels: zoom,             controls: [new OpenLayers.Control.PanZoomBar(),                 new OpenLayers.Control.MousePosition(),                 new OpenLayers.Control.ScaleLine(),                 new OpenLayers.Control.Scale(),                 new OpenLayers.Control.Navigation()             ],             minScale: 50000,             projection: "EPSG:4326"         }         var map = new OpenLayers.Map(map_options);         var navi = new OpenLayers.Control.NavigationHistory();         map.addControl(navi);         center.transform(proj_sp, map.getProjectionObject());         //layers configuration         var world = new OpenLayers.Layer.WMS(             "OpenLayers WMS"             ,"http://localhost:8888/geoserver/wms"             ,{layers: 'nurc:Arc_Sample'}             ,{displayInLayerSwitcher:false}         );              var roadswgs = new OpenLayers.Layer.WMS(             "roadswgs"             ,host+port+"/geoserver/wms"             ,{  layers: "postgis:trans_ln_8"                 ,transparent: true             }             //,{'reproject': true}         );              var portwgs = new OpenLayers.Layer.WMS(             "airportwgs"             ,host+port+"/geoserver/wms"             ,{  layers: "postgis:airport_runway"                 ,transparent : true             }             //,{'reproject': true}         );              //var vector = new OpenLayers.Layer.Vector('editable');              var vector = new OpenLayers.Layer.Vector('editable'             ,{  strategies: [new OpenLayers.Strategy.BBOX(),saveStrategy]                 ,protocol: new OpenLayers.Protocol.WFS({                     url:  host+port+"/geoserver/wfs",                     featureType: "airport_runway",                     featureNS: "http://geoserver/postgis",                     version: "1.1.0",                     geometryName: "geom"                 })                 /*,styleMap: new OpenLayers.StyleMap({                     pointRadius: 5,                     strokeColor: "#ff005b",                     strokeWidth: 1,                     fillOpacity: 0.4,                     fillColor: '#ffffff'                 })*/             }         );         alert('vector.protocol.url='+vector.protocol.url);         var wfsroads = new OpenLayers.Layer.Vector("PostgisWFS",              {   strategies: [new OpenLayers.Strategy.BBOX()],                 protocol: new OpenLayers.Protocol.WFS({                     url:  host+port+"/geoserver/wfs",                     featureType: "trans_ln_8",                     featureNS: "http://geoserver/postgis",                     version: "1.1.0"                                     })                 /*,styleMap: new OpenLayers.StyleMap({                     pointRadius: 6,                     strokeColor: "#ff005b",                     strokeWidth: 1,                     fillOpacity: 0                 })*/             }         );         map.addLayers([wfsroads,roadswgs,vector,portwgs/*world,,gsat*/]);                //adding OSM layer         //map.addLayer(new OpenLayers.Layer.OSM("OSM"));         //adding google satellite layer         map.addLayer(new OpenLayers.Layer.Google("Google Satellite",{type:G_SATELLITE_MAP, numZoomLevels: 22}));                        //mappanel configuration         var mapPanel = new GeoExt.MapPanel({             renderTo: 'gxmap',             height: map_ht,             width: map_wd,             map: map,             title: 'A Simple GeoExt Map',             extent: map_bound,             center: center,             //zoom: zoom         });         //layer tree configuration         var layerList = new GeoExt.tree.LayerContainer({             text: 'All Layers',             layerStore: mapPanel.layers,             leaf: true,             expanded: true         });              var layerTree = new Ext.tree.TreePanel({             title: 'Layers',             renderTo: 'layerTree',             root: layerList,             width: legend_wd,             //height: '*',             autoheight: true         });              //legend configuration         var legendPanel = new GeoExt.LegendPanel({             title:'Legend',             layerStore: mapPanel.layers,             renderTo: "legend",             border: true,             width: legend_wd,             //height: legend_ht,             autoheight: true         });              //editor tools         var editor = "editor tools";         { //snap for drawing          var snaproad = new OpenLayers.Control.Snapping({             layer: vector,             targets: [{                 layer: wfsroads,                 tolerance: 15,                 greedy: true             }]         });         //snaproad.activate();         var snapvector = new OpenLayers.Control.Snapping({             layer: vector,             targets: [{                 layer: vector,                 tolerance: 15,                 greedy: true             }]         });         snapvector.activate();}         { //Draw Feature control         var draw = new OpenLayers.Control.DrawFeature(             vector,     //layer             OpenLayers.Handler.Path, //Handler             {   multi:true,                 type: OpenLayers.Control.TYPE_TOGGLE,                 //handlerOptions : {maxVertices: 5}             }//options         );              /*draw.featureAdded = function(feature) {             //feature.layer.eraseFeatures([feature]);             // cast to multilinestring             //alert(feature.geometry);             //feature.geometry = new OpenLayers.Geometry.MultiLineString(feature.geometry);             //alert(feature.geometry);//feature.style.strokeColor = "#ff0000";             feature.state = OpenLayers.State.INSERT;             feature.layer.drawFeature(feature);         }*/         map.addControl(draw);         // DrawFeature control, a "toggle" control         var draw_ac = new GeoExt.Action({             text: "draw",             control: draw,             map: map,             // button options             enableToggle: true,             tooltip: "draw feature",             toggleGroup: editor         });}         { //Select Feature control         var select = new OpenLayers.Control.SelectFeature(             vector,             {multiple: false, hover: true,             }         );         var select_ac = new GeoExt.Action({             text: "select",             control: select,             map: map,             // button options             enableToggle: true,             tooltip: "modify feature",             toggleGroup: editor         });         }         { //Modify Feature control         var modify = new OpenLayers.Control.ModifyFeature(vector,{type: OpenLayers.Control.TYPE_TOGGLE});         map.addControl(modify);         var modify_ac = new GeoExt.Action({             text: "modify",             control: modify,             map: map,             // button options             enableToggle: true,             tooltip: "modify feature",             toggleGroup: editor         });         }         { //Delete Feature control         var del = new DeleteFeature(vector, {title: "Delete Feature"});         map.addControl(del);         var del_ac = new GeoExt.Action({             text: "delete",             control: del,             map: map,             // button options             enableToggle: true,             tooltip: "delete feature",             toggleGroup: editor         });         }         { //Save Feature control         var save_ac = new GeoExt.Action({             text: "save",             //icon: 'icons/icon_zoomnext.png',             //control: saveStrategy.save(),             onClick: function(){                 //var s=confirm('save?');                 //if(s==true){                     saveStrategy.save();                 //  alert('saved');                 //}                  //else                 //  alert('not saved');             },             disabled: false,             //deactivateOnDisable: true,             //activateOnEnable: true,             tooltip: "save road"         });}         { //Measure Feature control         var length = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, {             eventListeners: {                 measure: function(evt) {                     alert("The length was " + evt.measure + ' ' + evt.units);                 }             }         });         var area = new OpenLayers.Control.Measure(OpenLayers.Handler.Polygon, {             eventListeners: {                 measure: function(evt) {                     alert("The area was " + evt.measure + ' sq ' + evt.units);                 }             }         });         var measu_length = new GeoExt.Action({             //text: "measu_length",             icon: 'icons/icon_ruler.gif',             control: length,             map: map,             // button options             enableToggle: true,             tooltip: "measu_length",             toggleGroup: editor         });         var measu_area = new GeoExt.Action({             //text: "measu_area",             icon: 'icons/tool_measurearea.png',             control: area,             map: map,             // button options             enableToggle: true,             tooltip: "measu_area",             toggleGroup: editor         });}         { //identify Feature control         var info = new OpenLayers.Control.WMSGetFeatureInfo({             url: host+port+'/geoserver/wms',              eventListeners: {                 getfeatureinfo: function(event) {                     map.addPopup(new OpenLayers.Popup.FramedCloud(                         "chicken",                          map.getLonLatFromPixel(event.xy),                         null,                         event.text,                         null,                         true                     ));                 }             }         });         var identify_ac = new GeoExt.Action({             //text: "identify",             icon: 'icons/icon_query.gif',             control: info,             map: map,             // button options             enableToggle: true,             tooltip: "identify",             toggleGroup: editor         });}         { //pan Feature control         var pan = new OpenLayers.Control.DragPan();         var pan_ac = new GeoExt.Action({             //text: "pan",             icon: 'icons/tool_pan.gif',control: pan,             map: map,             // button options             enableToggle: true,             tooltip: "pan map",             toggleGroup: editor         });         }         {//tools simple         var toolsbar = "tools"          //tools toolbar         //zoom to max extent tool         var maxext = new GeoExt.Action({             //text: "Max Extent",                    icon: 'icons/icon_fullextent.gif',             control: new OpenLayers.Control.ZoomToMaxExtent(),             map: map,             deactivateOnDisable: true,             activateOnEnable: true,             tooltip: "zoom to max extent"         });              var zoomin = new GeoExt.Action({             //text: "Zoom In",             icon: 'icons/icon_zoomin.gif',             control: new OpenLayers.Control.ZoomIn(),             map: map,             deactivateOnDisable: true,             activateOnEnable: true,             tooltip: "zoom inside",         });              var zoomout = new GeoExt.Action({             //text: "Zoom Out",             icon: 'icons/icon_zoomout.gif',             control: new OpenLayers.Control.ZoomOut(),             map: map,             deactivateOnDisable: true,             activateOnEnable:true,             tooltip: "zoom outside",         });              var pan = new GeoExt.Action({             text: "Pan",             control: new OpenLayers.Control.Pan(),             map: map,             deactivateOnDisable: true,             activateOnEnable:true,             tooltip: "drag to move",         });              var prev_ext = new GeoExt.Action({             //text: "previous",             icon: 'icons/icon_zoomprevious.png',             control: navi.previous,             disabled: false,             deactivateOnDisable: true,             activateOnEnable: true,             tooltip: "previous in history",         });              var next_ext = new GeoExt.Action({             //text: "next",             icon: 'icons/icon_zoomnext.png',             control: navi.next,             disabled: false,             deactivateOnDisable: true,             activateOnEnable: true,             tooltip: "next in history"         });              }         var toolbar = new Ext.Toolbar({                 //embed tool in toolbar             renderTo: 'tools',             width: tbar_wd,             height: tbar_ht,             autoWidth : true,             autoHeight : true,             items: [draw_ac,'-',modify_ac,'-',del_ac,'-',save_ac,'-',measu_length,'-',measu_area,'-',select_ac,'-',identify_ac,'-',pan_ac,maxext,'',zoomin,'',zoomout,'',prev_ext,'',next_ext]         });              // the part below is just to make the bounds show up on the page         function updateBounds(){             var bbox = map.getExtent().toArray();             code = "Bounds      lower left: "+bbox[0]+','+bbox[1]+"     upper right"+bbox[2]+','+bbox[3];             document.getElementById('bounds').innerHTML = code;         }         // update the bounds with each map move         map.events.register('moveend', map, updateBounds);         // and update the bounds on first load         updateBounds();          });


How to pan (rather than zoom) when using a 2-finger drag on a Mac

Using Mac OSX, dragging the trackpad with 2 fingers performs a scroll of the web page, equivalent to using the mouse wheel. However, if the cursor is located within an OpenLayers map, the 2-finger drag performs a zoom-in on the map. Is it possible to change this action to perform a pan instead of a zoom? Eg, see the ArcGIS Server JS API's behaviour on a Mac with a trackpad. Thanks


I am trying to put autocomplete of Google API V3 for places, but giving some error

I am trying to put textbox within the infowindow which is working fine in order to get direction and route. And now i want to make textbox autocomplete for google api places. I have ref this link "autocomplete in google api for places":https://developers.google.com/maps/documentation/javascript/places#places_autocomplete I am trying to put autocomplete in google API V3 but some error of **a is null {main,places}.js** following are my code: Find way #directions-panel { height: 100%; float: right; width: 390px; overflow: auto; }                 #map-canvas {         margin-right: 400px;       }            #control {         background: #fff;         padding: 5px;         font-size: 14px;         font-family: Arial;         border: 1px solid #ccc;         box-shadow: 0 2px 2px rgba(33, 33, 33, 0.4);         display: none;       }            @media print {         #map-canvas {           height: 500px;           margin: 0;         }              #directions-panel {           float: none;           width: auto;         }       }     </style>                Start: End: --> can any one please tell me weather i am going right. and what correction i need to do for same.


How to insert non-spatial data through WFS-T insert?

When i perform wfs-t insert operation using postgis database only spatial data and primary key gets inserted. Can anyone point me to some examples in which attribute data are also inserted along with spatial data using openlayers?


Data defined label alignment option greyed out on new Quantum GIS Dufour

I am trying to customise the positioning of labels in relation to points in a vector file layer in the new QGIS 2.0. In QGIS 1.8 I was able to enter two customised X/Y columns in the attribute table of a shapefile to precisely align the labels around the points. However, from the new QGIS 2.0 menu 'Layer label options'>'Placement'>'Data defined', the X and Y 'Alignment' options are greyed out and I am unable to enter the columns. Please see a screen dump of the issue below Can anybody explain why this might be the case? Thanks for your consideration. ![enter image description here](http://i.stack.imgur.com/0eiNe.jpg)


how do you identify ridges on an elevation raster?

I was wondering whether anyone might be able to tell me in layman's terms how to extract or differentiate between ridges and hilltops from 10m elevation data using ArcGIS 10.1? Any advice would be greatly appreciated


Is it possible to convert a Geoserver SLD to Quantum QML format?

I have a web application which runs on Geoserver. I am migrating my application to desktop and am struck at applying the same color schemes and symbology. I am not able to find a way to convert SLDs to QML for implementing in desktop application. I am aware that Quantum GIS 1.8 has the SLD input in styling. I specifically need a solution for Quantum GIS 1.6, as it is more preferred in my organization. Any suggestion is highly appreciated.


SAGA grid VRT, file how to apply a LUT?

I've created a heap of saga grid files for some hydro survey work. I'm looking at a way to read these into a mapguide raster/grid layer, I'm able to load up the grids using a vrt file, I can't figure out how to apply a color table to them though, values should bein the order of 0 to 50 float ... So I guess I need help on stylizing the source using a vrt file?? And perhaps some other program external to mapguide to check the display of the vrt dataset? Any help much appreciated, just ask if theres more info I can supply. an example of the vrt source I'm playing with               <VRTDataset rasterXSize="2957" rasterYSize="4598">               <GeoTransform> 5.3048100000000000e+005, 5.0000000000000000e-001, 0.0000000000000000e+000, 6.9916320000000000e+006, 0.0000000000000000e+000,-5.0000000000000000e-001</GeoTransform>       <VRTRasterBand dataType="Float32" band="1">         <NoDataValue>-9.99990000000000E+004</NoDataValue>          <ComplexSource>       <SourceFilename relativeToVRT="1">15251007.sdat</SourceFilename>       <SourceBand>1</SourceBand>       <SourceProperties RasterXSize="2957" RasterYSize="4598" DataType="Float32" BlockXSize="2957" BlockYSize="1" />       <SrcRect xOff="0" yOff="0" xSize="2957" ySize="4598" />       <DstRect xOff="0" yOff="0" xSize="2957" ySize="4598" />       <LUT>0:50,15:256</LUT>             <NODATA>-99999</NODATA>     </ComplexSource>


**One of my WMS layer is not loading the image tiles.** See the code:                   <script type="text/javascript">         var map, ia_wms;         function init(){             map = new OpenLayers.Map('map', {zoomDuration: 1,projection: 'EPSG:3857'});         var esr_all = new OpenLayers.Layer.WMS("ESR_Boundary","http://localhost/cgi-bin/mapserv?map=/var/www/mstest/plant_sr.map",{'layers':"ESR_outline",'transparent':true,'format':'image/png'}                ,{                 isBaseLayer: false,opacity: 100                 }                 );         var mslayer = new OpenLayers.Layer.WMS( "MapServer Layer",                                               "http://localhost/cgi-bin/mapserv?map=/var/www/osm-demo/mapserver-utils-svn/osm-google_test.map&",                                               {'layers': "land0 borders0 places0 land1 borders1 places1 land2 borders2 places2 land3 borders3 places3 land4 landuse4 transport_areas4 waterarea4 borders4 places4 land5 landuse5 transport_areas5 waterarea5 roads5 borders5 places5 land6 landuse6 transport_areas6 waterarea6 waterways6 roads6 borders6 places6 land7 landuse7 transport_areas7 waterarea7 waterways7 roads7 borders7 places7 land8 landuse8 transport_areas8 waterarea8 waterways8 railways8 roads8 borders8 places8 land9 landuse9 transport_areas9 waterarea9 waterways9 railways9 roads9 borders9 places9 land10 landuse10 transport_areas10 waterarea10 waterways10 railways10 roads10 aeroways10 borders10 places10 land11 landuse11 transport_areas11 waterarea11 waterways11 railways11 roads11 aeroways11 borders11 places11 land12 landuse12 transport_areas12 waterarea12 waterways12 railways12 roads12 aeroways12 borders12 places12 land13 landuse13 transport_areas13 waterarea13 waterways13 railways13 roads13 aeroways13 borders13 places13 land14 landuse14 transport_areas14 waterarea14 waterways14 railways14 roads14 aeroways14 borders14 places14 land15 landuse15 transport_areas15 waterarea15 waterways15 railways15 roads15 aeroways15 borders15 places15 land16 landuse16 transport_areas16 waterarea16 waterways16 railways16 roads16 aeroways16 borders16 places16 land17 landuse17 transport_areas17 waterarea17 waterways17 railways17 roads17 aeroways17 borders17 places17 land18 landuse18 transport_areas18 waterarea18 waterways18 railways18 roads18 aeroways18 borders18 places18"}                                                );             map.addLayers([esr_all, mslayer]);         map.addControl(new OpenLayers.Control.LayerSwitcher());         map.zoomToExtent(new OpenLayers.Bounds(69.00,21.00,70.00,22.00));         map.setCenter(new OpenLayers.LonLat(69.57,21.55).transform(         new OpenLayers.Projection('EPSG:4326', 'EPSG:3857'),         map.getProjectionObject()         ), 14);         }     </script>      See the image: ![esr_all layer is showing](http://i.stack.imgur.com/jxGfh.png) I get an error: > msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in the > LAYERS parameter. A layer might be disabled for this request. Check > wms/ows_enable_request settings. Instead if change it as a mapserver layer,                   var mslayer = new OpenLayers.Layer.MapServer ( "MapServer Layer",                                               "http://localhost/cgi-bin/mapserv?map=/var/www/osm-demo/mapserver-utils-svn/osm-google_test.map&",                                               {'layers': "land0 borders0 places0 land1 borders1 places1 land2 borders2 places2 land3 borders3 places3 land4 landuse4 transport_areas4 waterarea4 borders4 places4 land5 landuse5 transport_areas5 waterarea5 roads5 borders5 places5 land6 landuse6 transport_areas6 waterarea6 waterways6 roads6 borders6 places6 land7 landuse7 transport_areas7 waterarea7 waterways7 roads7 borders7 places7 land8 landuse8 transport_areas8 waterarea8 waterways8 railways8 roads8 borders8 places8 land9 landuse9 transport_areas9 waterarea9 waterways9 railways9 roads9 borders9 places9 land10 landuse10 transport_areas10 waterarea10 waterways10 railways10 roads10 aeroways10 borders10 places10 land11 landuse11 transport_areas11 waterarea11 waterways11 railways11 roads11 aeroways11 borders11 places11 land12 landuse12 transport_areas12 waterarea12 waterways12 railways12 roads12 aeroways12 borders12 places12 land13 landuse13 transport_areas13 waterarea13 waterways13 railways13 roads13 aeroways13 borders13 places13 land14 landuse14 transport_areas14 waterarea14 waterways14 railways14 roads14 aeroways14 borders14 places14 land15 landuse15 transport_areas15 waterarea15 waterways15 railways15 roads15 aeroways15 borders15 places15 land16 landuse16 transport_areas16 waterarea16 waterways16 railways16 roads16 aeroways16 borders16 places16 land17 landuse17 transport_areas17 waterarea17 waterways17 railways17 roads17 aeroways17 borders17 places17 land18 landuse18 transport_areas18 waterarea18 waterways18 railways18 roads18 aeroways18 borders18 places18"}                                                );      it works and I get tiles for both the layers. Why is it not when both are WMS layers? In my **osm-google_test.map** file the **WEB** portion is like this:               WEB     #IMAGEPATH "/tmp/ms_tmp/"     #IMAGEURL "/ms_tmp/"         IMAGEPATH '/opt/fgs/tmp/ms_tmp/'          IMAGEURL  '/ms_tmp/'     TEMPLATE  '/var/www/mstest/templatesample.html'     #labelcache_map_edge_buffer "10"         METADATA             "wms_enable_request"    "*"             #"ows_enable_request" "*"             "wms_srs" "EPSG:900913 EPSG:4326 EPSG:3857 EPSG:2154 EPSG:310642901 EPSG:4171 EPSG:310024802 EPSG:310915814 EPSG:310486805 EPSG:310702807 EPSG:310700806 EPSG:310547809 EPSG:310706808 EPSG:310642810 EPSG:310642801 EPSG:310642812 EPSG:310032811 EPSG:310642813 EPSG:2986"                 "labelcache_map_edge_buffer" "-10"                 "wms_title" "osm france"         END      END


Defining a WHERE clause from a subquery for a query to create a handy view

It is about my implementation from an answer of this question. It is more an postgresql issue than a GIS issue, whereas it is about geometries and spatial queries. I want to create a view from the query below, whereby I can select the result by an ID (that defines a linestring). My problem is, that I had no success with coding the query in that way, that for every linestring only one `newpoint` is created that is half the length away from the linestring (see last subquery 'newdistance'). I tried to `SELECT DISTINCT ON (id)...` but that failed. The linestring table:               id smallint NOT NULL,     geom geometry(linestring, 31468)      I have the same problem in another query, to "extract" a WHERE clause (here in the first part of the query) from an subquery. My goal is to have a view `newpoint` (from the query below) whereby I can query like this               SELECT * FROM newpoint WHERE id=1      The query:               WITH line AS         (SELECT             geom         FROM linestring             WHERE id=1),     points AS         (SELECT             ST_StartPoint(geom) AS A,             ST_EndPoint(geom) AS B         FROM line),     azimuth AS         (SELECT             ST_Azimuth(A,B) AS azimuth         FROM points),     distance AS         (SELECT             ST_Distance(A,B) AS length         FROM points),     newdistance AS         (SELECT             length + (length * 1/2) AS newlength         FROM distance)          SELECT         ST_SetSRID(ST_Translate(A, sin(azimuth) * newlength, cos(azimuth) * newlength), 31468) AS newpoint     FROM newdistance, azimuth, points      Setting the WHERE clause id=1 at the end of the query didn't succeed. **EDIT** When I use               SELECT DISTINCT ON (geom) ...      in the last part of the query it works ONLY with 2 objects (linestrings). With more than 2 linestrings it doesn't work. Here is a picture, how does it has to look like. ![enter image description here](http://i.stack.imgur.com/Zk006.png)


Admin Sample GXP Viewer

I have Geospatial application which is using GXP, GeoServer, GeoExt and PostgisSQL. We would like to enhance the application by adding a user friendly Admin system, similar to what GeoNode has. This sytem would let us create and manage users and create projects specific to users. Can someone give us a head start on how we can do this? Or any place we can download it and configure it according to our requirements. I would really appreciate your help. Thanks


How to figure out the SRID of a point by comparing it to another point with known SRID?

I have a set of store locations defined in the coordinate system of Bottincarto, which I need to display on Google Maps iOS. Here is an example of coordinates for Notre-Dame-de-Paris:   * 600926 2428323 (Notre-Dame-de-Paris on http://maps.bottincarto.com/...)   * 48.852968 2.349902 (Notre-Dame-de-Paris on http://www.google.fr/maps/...) Here is an example of coordinates for Trafalgar Square:   * 428285 2726837 (Trafalgar Square on http://maps.bottincarto.com/...)   * 51.508039 -0.128069 (Trafalgar Square on http://www.google.fr/maps/...) I already tried a linear regression, but it is not even good as an approximation. How can I reverse engineer BottinCarto projection system?


How can I zoomToExtent and then zoom out?

I use openlayers 2.12 I use HTML5's geolocation API to get the coords and then I insert them in a layer as feature (point). After that, I zoom in , since the layer has no other feature.               map.zoomToExtent(geoloc.getDataExtent());      `geoloc` is the name of the layer... My problem is, how do I zoom-out automatically after the `zoomToExtent`? Because the map zooms in too much and I can see just the point and very little details. It would be more user-friendly to zoom out a bit Thanks


Convert Shape Length Area Data to Latitude Longitude

I am attempting to import publicly available shapefile data from http://gis.utah.gov/data/boundaries/zip-codes/ into Tableau for a data visualization project. Unfortunately, the .shp file and .gdb database that are available for download include only the shape length / area for each of the Utah zip codes. My goal is to convert these from the current NAD 1983 UTM 12N (EPSG: 26912) format into latitude / longitude coordinates that can be read into Tableau. I am using Quantum GIS (QGIS 2.0.1) and would appreciate any and all help.


Migrating 10.0 map services to ArcGIS 10.2 for Server?

I have a few map services that I would like to move to ArcGIS for Server 10.2. Each server is on a separate machine. I have come across instances where people migrate the entire arcgisserver folder, (arcgisinput, arcgisoutput, cache, etc.) however my 10.0 services only maintain an input and an output. What's the most time efficient manner in migrating single map services and not an entire instance from 10.0-10.2?


Star Markers - unable to get tie points in Inpho Match-AT

What do the star markers mean in Trimble's Inpho Match-AT software, specifically in the multi-photo measurement feature? I have been unable to generate tie points in an aerial triangulation in photos which have no star in the center icon. ![enter image description here](http://i.stack.imgur.com/3XqGJ.jpg) I don't know what they mean or why they don't have stars. The photos are present and connected, they have initialized external orientations and correct camera parameters, and each file does actually have data. I haven't been able to find anything in any help documentation.


Qgis installation fails on Ubuntu 14.04

I am having problems installing Qgis on Ubuntu 14.04 (Trusty). I tried several approaches: installing from the Ubuntu standard repos, installing from http://qgis.org/debian and installing from http://qgis.org/debian-nightly, using both apt-get and aptitude. Everytime, the installation fails because libnetcdf.so.6 cannot be found:               Setting up qgis-providers (2.3.0+git20140530+ca6d4d9~trusty1) ...     /usr/lib/qgis/crssync: error while loading shared libraries: libnetcdf.so.6: cannot open shared object file: No such file or directory      ls /usr/lib/libnet* gives:               /usr/lib/libnetcdf.a       /usr/lib/libnetcdf_c++.so.4      /usr/lib/libnetcdff.so        /usr/lib/libnetcdf.so        /usr/lib/libnetpbm.so.10     /usr/lib/libnetcdf_c++.a   /usr/lib/libnetcdf_c++.so.4.1.0  /usr/lib/libnetcdff.so.5      /usr/lib/libnetcdf.so.7      /usr/lib/libnetpbm.so.10.0     /usr/lib/libnetcdf_c++.so  /usr/lib/libnetcdff.a            /usr/lib/libnetcdff.so.5.1.0  /usr/lib/libnetcdf.so.7.1.1      So the library is indeed missing. Any help is highly appreciated!


Using a shapefile in QGIS makes it unusable in ArcGIS?

We currently use Arcgis 9.2, and we are looking at moving forward with other software, and we have been testing QGIS recently. Basically we are trying to copy the existing projects we have, and re-create them in QGIS. But I have came across quite a big problem, re-created a project which has a couple of polygon shapefiles. They came into QGIS fine as always. I then opened up the .mxd project in ArcGIS, and noticed a couple of deadlinks... they were the two shapefiles I had just brought into QGIS! Tried a couple of other random shapefiles and the same thing happens... seems a single shapefile cant be used in both QGIS and ArcGIS at the same time? Looking at the shapefile in catalog and it shows as a green question mark. If i close QGIS the shapefile opens fine again in ArcGIS. I could of course create a copy of each shapefile and point QGIS to the copies, but it means duplicating A LOT of shapefiles, which is far from ideal. Anyone else come across this? And if so, is there a solution/work around?


Is it possible to add dynamic controls to a dockable window?

I am writing a small application that uses the dockable window. What will happen is that for each layer in the TOC a label and checkboxes will appear within the dockable window. However what do i need to do to add the control onto the Dock Window. As an example i have                               IDataset dataset = enumDataset.Next();                 while (dataset != null)                 {                     MessageBox.Show(dataset.Name);                     //create a label object                      Label label = new Label();                     label.Name = "lbl_" + dataset.BrowseName;                     label.Text = dataset.Name;                     label.Top = top;                     label.Height = height;      But there is no               this.Controls.Add(label);      Does anyone know what the code should be to add the control? Thanks


ArcGIS Fill Editing Tool

Is there a way to fill while editing in ArcGIS? You know similar to the popular paint tool, where an enclosed area is filled with a colour. I'd like to fill an enclosed area (enclosed by poly lines or polygons or both). I'd like to be able to do this in an edit session, a batch process or tool would not provide the functionality that I am looking for. Here is an image to better explain the situation: ![ArcGIS Fill Example](http://i.stack.imgur.com/HW5AC.png) I need to fill the area between the High Water Mark (the dark blue polyline) and the lake (the blue polygon). I've highlighted the area I need to fill with a red scratch. Now there is a lot of gaps and inaccuracies in the data, so I need to manually check each one as I do it. It takes forever to trace first the watermark and the lake. I don't see why there isn't an ArcGIS editing tool to fill in gaps. If Microsoft can create one anyone can.


how to geowebcache my own group layer in geoserver?

I am unable to geowebcache my layer group in geoserver. But in Geowebcache demo page, default layer groups are available. How to add my group layer into geowebcache? please guide me.


QGIS 1.8.0 ask me to install scipy

I need help in a step by step to install scipy via QGIS or via python, I'm not familiar with python language so the guide of Nathan's blog wasn't useful to me due that OSGeo4W don't recognize the commands there described. I have win8 and win7 OS. I'd like to have some help with this issue becuase I can't download LecoS properly that way. TVM!


GIS Certification

I have a question regarding GIS certification. My main goal is to develop GIS web applications. Currently I am a developer with over 20 years building software and for the past 10 building web application using mostly Java on the server and HTML/Javascript/CSS on the client. I also have a lot of experience with data integration. I am currently enrolled in the Penn State's Postbaccalaureate Graphical Information System program. I just completed the first course this week and there are an 4 additional classes after that. The first course was very good and informative and I feel I learned a lot of background knowledge in the GIS field. I am trying to decide if I should continue on with the additional classes and complete the program. Two reasons why I am reluctant to continue: 1) Not sure if this is the best way for me to get into the GIS industry given I want to develop in the field 2) The classes are expensive Please offer any suggestion on this subject area. Thanks in advance.


How to create and visualize groundwater plume models?

My water department has asked me about visualization of groundwater plume models. I have no idea where to start. All the links refer me to Cameo/Aloha but these are for Atmospheric modeling as far as I can see. Has anyone any experience with point source plumes in groundwater? I guess the models are similar to those from atmospheric contamination models but I also need to understand which variables are necessary for a successful model.


Creating custom size images from WMS cache

I am currently working on my own WMS service (using PHP). The service works currently if the requested image is in 256x256px size but currently does not support any other size. My service basically returns cache tiles that were generated by Arcgis. My question is if it is possible to generate correct tiles from these arcgis 256x256px tiles that are larger or smaller then 256x256px. For example if the request is asking for 512x512px tile could I generate the tile on the fly using the 256x256px tiles? One idea on how to do this is by finding all the 256x256px images that are part of the requested larger/smaller image, merge them and cut out the request image.


Getting data of an area covered by a polygon in ArcGIS

We have a layer that contains land parcel information such as area for each parcel, and a unique parcel ID. We also have multiple polygons that cover some parcels. We're trying to figure out how to determine which parcels are covered by the polygon and which parcels are not covered by the polygon. We really have no idea how to proceed so any help is appreciated. Thanks everybody.


How to define which columns in a Spatialite database are the latitude and longitude?

I have imported a CSV containing points with coordinates specified in columns named Latitude and Longitude. How do tell spatialite that these columns are the coordinates of of my points?


NVIS module not found in QGis

When I try to use the nvis module in Grass, QGis, pops-up a warning window saying "Module nviz not found". how can I solve this issue and use the nviz?


What lens and camera settings are recomended for UAV (drone) aerial imagery capture?

I have been toying with the idea of purchasing/bowrrowing a UAV and attempting to capture my own aerial imagery. I have pretty good DSLR Canon gear and several lenses but I am wondering what lens, focal length and camera settings, including capture intervals, vehicle speed, etc. are recommended.


Labeling dilemma

How would you label this map logically? I will preempt the question, with the statement it is for a fire truck, so we really have to worry about seeing the address numbers at 3 am with one contact in. I have tried a few different options but any suggestions would be greatly appreciated!![enter image description here](http://i.stack.imgur.com/wyteb.png)


How to expedite process of creating features

I am creating TIN out of each two cross sections and in the end I merge them all together and create a seamless TIN using python scripting. First I create all the TIN and save them somewhere in my local hard drive and finally I merge them. Someone told me there should be a way to do this process in the memory to save time and them create the final TIN and copy that in my hard drive. I already use feature layer for cross sections to expedite the process. I was wondering if there is still any trick I can use to lower the process time?


How to deal with political boundaries in grid cell analysis?

I have point data for Africa and I want to aggregate these data to grid cells which I create by a fishnet. Some grid cells cover parts of 2 or 3 countries. Normally, such cells are by different methods completely assigned to a single country. I would like to ask whether there is a method to create grid cells that is more sensitive to national borders? Can I split such cells with country borders and assign them to different countries or is it possible to duplicate such cells and assign them partially to one country? I use ArcGIS 10.2. Thank you for your help!


I use Quantum GIS 2.2.0 Valmiera I have a polyline layer. I can drag&drop polyline nodes by using "Node Tool". Is it possible to drag&drop line precisely 6 meters to right or left?


Are the ESRI .lyr and .mxd data format specs published?

Are the binary formats of .lyr and .mxd files published?