QGIS 2.0: move basemap by hand in order to achieve overlaying with a point layer

I am an environmental engineer and the aim of my QGIS 2.0 project is to visualize the results of a sewage water system inspection. In a first step I included the hoppers from a csv file and added a google streets layer. ![enter image description here](http://i.stack.imgur.com/51OkA.png) As you can see in the picture the hoppers don't overlay with the base map. I compared to the coordinate calculation of a mountain climber page (http://www.deine-berge.de/Rechner/Koordinaten/Sandersdorf,-06792-Sandersdorf- Brehna,-Deutschland), which confirms the on the fly crs transformation of qgis 2.0. So the coordinates of the hoppers are may wrong. However it is the only csv data I have and in the GIS system of our branch office it fits to the base map. **My question to you is the following: Is there a possibility to move the base map by hand in order to achive an overlaying?** For my purpose I don't need an exact fitting, but a difference of 500 m is too much. Thank you in advance for your efforts


Is there an iOS app to display several offline raster maps with transparency?

There are several iPhone apps displaying offline maps. Some of them can show custom maps, for instance loaded as MBTiles or sqlite files. Galileo-app does this pretty well. But it is only possible to display **only one** tiled map at a time. I need to display **several tiled raster layers** (say 3 or 4) with a **transparency** (for instance with an opacity control slider for each layer). My rasters are hand drawn tracks (black 'wire' on white/transparent background), old maps tiles and openstreetmap tiles. Goal: find my way by crossing information from those georeferenced maps. TiledMap app looks to be doing this, but is missing from iTune (dev account not renewed). Is there any iOS app doing this? (Otherwise I would have to code one, but this is too much work) Thanks


Reprojecting in postGIS from 900913 to 4326. Wrong coordinates

I'm working with postGIS 2.1 I have a table called 'xacementos' created with the srid: 900913. I took the points coordinates from google maps and I want to convert them to SRID:4326 to show the points in a map created over leaflet. (if a input the 900913 coordinates as geoJSON in the leaflet code the points show a little bit displaced) I'm using the function ST_Transform: SELECT ST_AsText(ST_Transform(geom,4326)) FROM xacementos WHERE enderezo='Rua Franja 9-11'; but the coordinates that show up are not correct: "POINT(-7.54315344075162e-005 0.000389606525237254)" The input coordinates in the 900913 srid are "POINT(-8.397 43.3708)" I'm newby in this postGIS stuff and I'm not sure if i'm following the right path. Any suggestion??


Points Solar Radiation reformat problem

I am trying to produce a set of monthly solar radiation maps based on a monthly parameterization of the diffuse proportion and transmissivity (i.e. new values for both parameters each month). The PointsSolarRadiation function in arcpy produces a full year of monthly radiation values for each function call (i.e. 12 months all based on the same diffuse proportion and transmissivity values). I am trying to extract only the specific month from each of the twelve output files (i.e. extract the "April" data from the file run using the "April" parameters). To do this I have a subsequent for loop which calls the individual files, identifies the appropriate data column in the file, extracts the data (using SearchCursor) then appends it to the placeholder. The _append_ method fails on the second iteration, which does not happen if I run this with a simpler example of appending defined lists. My code is as follows:               tableMonthHolder = []     for (j, value) in enumerate(diffuse):         b = str(j)         outFeatures = "c:/.../output" + b + ".shp"         outTableFinder = "T"+b         tableMonth = [row[0] for row in arcpy.da.SearchCursor(outFeatures,(outTableFinder))]         tableMonthHolder = tableMonthHolder.append(tableMonth)      Any advice is greatly appreciated.


MapServer: msWMSGetCapabilities(): WMS server error. WMS request not enabled

I took a look at this question/answer, and although helpful, it did not solve my issue. After spending the last couple days on this, I am confused as to why I'm getting: **msWMSGetCapabilities(): WMS server error. WMS request not enabled. Check wms/ows_enable_request settings** I've tried               "wms_enable_request" "*"      along with               "ows_enable_request" "*"      both in `METADATA` under `WEB` and `METADATA` under `LAYER` As for my URL, I am using: `http://192.168.2.164/cgi- bin/mapserv.exe?map=/data2/html/OL_AllWorldAirports/catest.map&SERVICE=WMS&REQUEST=GetCapabilities` I initially had the `VERSION` set too (to 1.1.1) but I read somewhere this is not a necessity. /tmp/mapserver3.log is not providing much help. In regards to how the mapfile(s) and data are set up: -I have one mapfile which has one layer. Within that layer, I reference another mapfile. The mapfile (catest.map) being referenced uses an `OGR` connection and connects to a .db file. See here for the mapfiles: https://gist.github.com/DavidPardy/5911943 Any input is greatly appreciated. I feel that I'm close and have some glaring error somewhere, but not sure where to pinpoint it.


How to resolve error "Handle bad layers" in QGIS?

I'm new to QGIS and have been seeing what it can do for me – seems good. I imported shape file data from a UK Ordnance Survey data file and saved the file in a new folder. It was very good, doing all I wanted. I exported and got exactly what I wanted ( a tiff image). I closed the file in order to try a new experiment. When I went to re-open it I got a dialogue box saying 'Handle Bad Layers. I don't understand what is at issue and what to do. It looks like bad news, Please advise me. I'm on a Mac using QGIS 1.8.0. Thanks


Is it possible to create a geoprocessing package from a script tool that runs and EXE?

Following the guidelines from the following link, you can create a script tool from an executable . . http://resources.arcgis.com/en/help/arcobjects- net/conceptualhelp/index.html#//0001000003t6000000 The project that I tested this with, is a simple console application that just uses the geoprocessing tool "CopyFeatures". It runs successfully and I was able to create a script from the .exe file. However, when I attempt to create the .gpk file from the result, I get the message "General function failure ERROR 999999: Error executing function." I can't seem to create a geoprocessing package from even the simplest console application. Thanks, Renee


From a script tool using ArcPy, can I store a point object in a BLOB field and retrieve that point later?

I am trying to write an ArcPy script tool that will store a point object in a BLOB field that I have created. I don't know if that is even possible. If it is, how do I do it, and how can I then retrieve and update that point later? It is probably possible to do it through ArcObjects (which I would rather do), but I am restricted to an arcpy script tool by client specs. I am rather new at the arcpy thing (much more comfortable with ArcObjects). I should ask: is there a way to access ArcObjects natively from within a script tool, like the ThisDocument hook that was available in VBA? If so, I could justify using ArcObjects, as long as I didn't have to go through comtypes (which is what I usually do with standalone Python automation scripts). Thank you all for your help.


Hide layers by default on CartoDB visualization

I'm loading a CartoDB visualization and I want all layers to be switched off as the default setting, so users have to switch them on using the layer selector loaded with the visualization. I'm reallly new on leaflet and cartodbjs so not sure where to begin to dive in the code. I think is related with this question but it doesn't have any answer. I have a sample code on gist (demo).


Running C# code from a python tool (ArcMap 10)

It appears that the only way to copy individual rows of data while preserving GlobalIDs in code is by using C# or VB.NET. I need to run the C# code from the above link within a python tool, and I am curious if anyone knows proper techniques or any examples of doing this. I have come across a couple ways to execute C# code within python, such as this and this, but I wanted to see if anyone could show me any examples or tips on doing this for ArcMap. Also, I know that writing the whole script in C# using arcobjects would probably be the 'best' solution, but my organization would like to keep all of our tools in python.


Add shapefile from a local file to a JS API map

Using ArcGIS.com's Map Viewer it's possible for the user to add a local shapefile to the map, using an Add Data approach. ![enter image description here](http://i.stack.imgur.com/NfnFM.jpg) Is it possible to add this functionality to an ArcGIS Server map built on the JavaScript API? (I posted this on the ESRI forum but haven't had a reply yet. I'm hoping the GIS.SE experts will know the answer)


Generate Two Triangles on KML file with PHP/MySQL

I am currently generating a KML file dynamically from PHP and Mysql. One latitude / longitude point is being passed to the script. What I want to do now is create two triangle polygons from this point based upon a wind variable in the database. So if the wind is blowing 'S' then I want the triangle 'point' to start at the lat/long point variable, and build a polygon with the point of the triangle headed south towards the lat / lng. Can anyone share with me how this can be done? Here is my script:               // Selects all the rows in the markers table.     $query = 'SELECT lat, lng, waves, wave_secs, current_dir, pri_id AS id FROM kml';     $result = mysql_query($query);          if (!$result)      {     die('Invalid query: ' . mysql_error());     }          // Creates the Document.     $dom = new DOMDocument('1.0', 'UTF-8');          // Creates the root KML element and appends it to the root document.     $node = $dom->createElementNS('http://earth.google.com/kml/2.1', 'kml');     $parNode = $dom->appendChild($node);          // Creates a KML Document element and append it to the KML element.     $dnode = $dom->createElement('Document');     $docNode = $parNode->appendChild($dnode);          // Iterates through the MySQL results, creating one Placemark for each row.     while ($row = @mysql_fetch_assoc($result))     {     // Creates a Placemark and append it to the Document.          $node = $dom->createElement('Placemark');     $placeNode = $docNode->appendChild($node);          // Creates an id attribute and assign it the value of id column.     $placeNode->setAttribute('id', 'placemark' . $row['id']);          // Create name, and description elements and assigns them the values of the name and address columns from the results.     $nameNode = $dom->createElement('name', 'Wave Height '.htmlentities(ceil($row['waves'] * 3.280)).' Feet');     $placeNode->appendChild($nameNode);     $descNode = $dom->createElement('description', 'Wave Duration ' .htmlentities($row['wave_secs']). ' Seconds');     $placeNode->appendChild($descNode);     $styleUrl = $dom->createElement('styleUrl', '#' . $row['current_dir'] . '-Style');     $placeNode->appendChild($styleUrl);          // Creates a Point element.     $pointNode = $dom->createElement('Point');     $placeNode->appendChild($pointNode);          // Creates a coordinates element and gives it the value of the lng and lat columns from the results.     $coorStr = $row['lng'] . ','  . $row['lat'];     $coorNode = $dom->createElement('coordinates', $coorStr);     $pointNode->appendChild($coorNode);     }          $kmlOutput = $dom->saveXML();     header('Content-type: application/vnd.google-earth.kml+xml');     echo $kmlOutput;


Reload image in MapInfo

I have a mbx that creates a layout. The layout consist of a number of .wmf pictures and ofcource a map. During the execution I create .Tab files that reference to the pictures looking like:               Definition Table       File "picture.wmf"       Type "RASTER"       (0,1) (0,0) Label "Pkt 1",       (1,1) (1,0) Label "Pkt 2",       (0,0) (0,1) Label "Pkt 3"       CoordSys NonEarth Units "ft"       Units "ft"      When something is changed and I make a new layout some pictures are updated and overwriten with new ones. The .Tab files is still the same. The problem is that it's the old pictures that shows up in the layout. When I open the pictures direkt in my filesystem it shows the new one. I think MapInfo caches the old picture in some way and wonder if there is a way to reload the .Tab file or in some way to make MapInfo understand that the information that the .tab file refers to is updated? Regards Ulrik


Crime mapping symbology

Are there any standard, publicly available symbol sets for crime mapping? What are their intended applications and their strengths and weaknesses?


How to plot a point on a static Google map [png]?

http://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318&markers=color:red%7Ccolor:red%7Clabel:C%7C40.718217,-73.998284&sensor=false shows a static map which is a **`png`** file. If I do have a coordinate which lies between the coordinates of this static map file, then how should I plot that point on this map _(which is basically a **png** )_? **EDIT:** I would be doing it offline. Can't use the maps API. Will save that map as a PNG, then I have to plot the points.


Is there a function to select a region of a map for further processing with Python?

I would like to select a map's region in QGIS for further processing with python console.![enter image description here](http://i.stack.imgur.com/cIKTC.gif) Ideally I would like to select the region with a mouse drag (like Gimp crop function) and then e.g. analyze the elements inside that area using Python, take a snapshot the selected area and others stuff like these. Is there a prebuilt function in QGIS that allows me to do that? I want to achieve this for many tasks, mainly to export the data, these are three examples: ## 1 **Get the RELATIVE COORDINATES of attributes inside the selected area** What I need for an application is to get **coordinates relative to the selected area and not only the "geographical" CRS** of the attributes. ![enter image description here](http://i.stack.imgur.com/DXIzM.png) E.g. if I have the attribute "DILLINGHAM" inside the selection (the image is from Alaksa data set Airports) I need to have the **image** coordinates of the label and the name field e.g. (X,Y, "label"): `(210,150,"ST "DILLINGHAM")` `(200,350,"PORT HEIDEN")` `...` **So I would like to retrieve the position of the attribute relative to a simple reference system (my selection), where the 0 is a corner of my selection** ## 2 **Make a better clipper** I would like to use this function even for make a better clipper. Raster->Extraction->Clipper. When I work with may raster files I would like that QGIS allow me to clip only the rasters that are into my selection and not to show me all the list of other rasters that are not inside the selection as actually does. ## 3 **Get a snapshot of the selection**


OpenLayers - markers not displayed

I just started worrking with OpenLayers and hava a problem with markers that don´t appear. I have no idea where is the problem.               <script type="text/javascript">          function init() {         var center = new OpenLayers.LonLat(17.55, 53.7).transform('EPSG:4326', 'EPSG:900913');         var map = new OpenLayers.Map("map");         var osm = new OpenLayers.Layer.OSM();         map.addLayer(osm);         map.setCenter(center, 12);                   var markers = new OpenLayers.Layer.Markers("Markers");         map.addLayer(markers);         var size = new OpenLayers.Size(21, 25);         var offset = new OpenLayers.Pixel(-(size.w / 2), -size.h);         var icon = new OpenLayers.Icon('http://www.openlayers.org/dev/img/marker.png', size, offset);         var table;              console.log(map);               $.getJSON('url',          function (data) {         console.log(data);         $.each(data.response.venues, function (i, venues) {                  markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(venues.location.lng, venues.location.lat).transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913")), icon));             markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(venues.location.lng, venues.location.lat).transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913")), icon.clone()));         });     });     }          **1 UPDATE** : `map.addLayers(markers)` changed to `map.addLayer(markers)` **2 UPDATE** : put the getJSON call in the init() function


QGIS 2.0 Python API: Layer vector style loaded from file, marker symbology is respected, labels are not

Im loading a QgsVectorLayer and showing it on map. I load the style i prepared with desktop QGIS 2.0.1 using the layer.loadNamedStyles(path) function in the API and it seems to work, kind of, because the markers are shown on map canvas the way i specified, however the labels are not shown even though the labels styling is defined in the .qml style file (looked at it in notepad). Is there something else i need to do, to display the labels for a vector layer? Result is the same if i save the style as .sld then load it via layer.loadSldStyle(path) I think the issue is the rendering engine/settings used. The style files assumes 'pal' rendering in the custom properties, so it could be something with the way Pal related objects are (not) initialized for the layer This seems to have enable the labels, but it just displays "label" for every feature:               layer.enableLabels(True)      I still think the style i prepared is being ignored for some reason. There must be a simpler/better way to do this! If i use a qml file, generated with qgis 1.8, labels show up without me doing anything other than loading the layer. Must be 2.0.1 related. **UPDATE:** I finally know what the issue is: .qml style file. Despite the fact that it was generated with qgis 2.0.1 it seems that when style file is loaded into my stand alone app, it tries to load the label styling information from the legacy part of the file, which is not filled out:                 <displayfield>name</displayfield>       <label>0</label>       <labelattributes>         <label fieldname="" text="Label"/>         <family fieldname="" name="MS Shell Dlg 2"/>         <size fieldname="" units="pt" value="12"/>         <bold fieldname="" on="0"/>         <italic fieldname="" on="0"/>         <underline fieldname="" on="0"/>         <strikeout fieldname="" on="0"/>         <color fieldname="" red="0" blue="0" green="0"/>         <x fieldname=""/>         <y fieldname=""/>         <offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>         <angle fieldname="" value="0" auto="0"/>         <alignment fieldname="" value="center"/>         <buffercolor fieldname="" red="255" blue="255" green="255"/>         <buffersize fieldname="" units="pt" value="1"/>         <bufferenabled fieldname="" on=""/>         <multilineenabled fieldname="" on=""/>         <selectedonly on=""/>       </labelattributes>      If i changed the file by hand accordingly, the style now works. But the questions is: how do i force, or properly use custom properties where the style i saved was actually saved?


How to to print and save the map with tiled and dynamic layers in arcgis using javascript?

I want to print this map. Can anyone please suggest to me how to print and save the displaying pap in ArcGIS using JavaScript?               <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">     <html>       <head>         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">         <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />         <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices-->         <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>         <title> World Street Map</title>         <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/claro/claro.css">         <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" />              <style>           html,body,#map,.map.container{             padding:0;             margin:0;             height:100%;           }         </style>         <script type="text/javascript">var djConfig = {parseOnLoad: true};</script>         <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2"></script>         <script type="text/javascript">           dojo.require("esri.map");                var map;                function init() {             var initExtent = new esri.geometry.Extent({"xmin":-17731,"ymin":6710077,"xmax":-12495,"ymax":6712279,"spatialReference":{"wkid":102100}});             map = new esri.Map("map",{extent:initExtent});                 //Add the world street map layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service                 var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");             map.addLayer(basemap);             dynamicMapServiceLayer = newesri.layers.ArcGISDynamicMapServiceLayer("http://maverick.arcgis.com/ArcGIS/rest/services/World_WGS84/MapServer");                    dojo.connect(map, 'onLoad', function(theMap) {               //resize the map when the browser resizes               dojo.connect(window, 'resize', map,map.resize);             });          }          dojo.addOnLoad(init);         </script>       </head>            <body class="claro">         <div id="map">         </div>       </body>     </html>


How to dynamically connect Excel data sources to MapInfo?

How to connect **Excel(2010)** with **Mapinfo(10.0)**? I saw that Excel can be connected using **Excel** as **Data Source** but my Data Source is already **MS-SQL**. Actually I would like to **reflect** any **changes** in excel to mapinfo and MS-SQL database.


Does QGIS have something like the MS Office macro recorder?

I would like to use python console in QGIS to automate tasks. Is there something like a macro recorder in MS Office to get the python commands?


How to aggregate points with same value into polygons from a shapefile using GDAL or any other opensource solution

I have a shapefile with around 19,000 points. Its basically export from a raster. No i need to extract polygons, by aggregating the points which have same value.The field who's value i am going to use for aggregation is dynamically calculated each time using the elevation of points. NOw i need to spit out polygons. How can I do that using GDAL? is there a utility to do it. Any other opensource solutions are welcome. I have ArcGIS which has a toolbox called 'Aggregate Points' but somehow licence for it is missing.


How to display unique records in combo-box in ArcGIs Java Script API ver 3.0/3.1?

I am displaying almost 9000 records by four type (A,B,C & D) in which I am displaying records using combo-box. Each record is classified by "ctype" ( A or B or C or D) so I am putting this in combo so that If I select type A then all records of type A will be display.. Code that I am following : Code link : http://jsfiddle.net/sunilspalkar/hdmNx/1/ In above code all records displaying but its not showing unique records of dam . I am facing same problem.. What I tried : 1.I am using query layer & I can not use "distinct" because of "geom" column . 2.I searched the API reference also for "unique elements for combo-box" but I did not found suitable material. 3. I found this link In this link values are hard coded and I have dynamic values. 4. If I use "STATE" column instead of "ctype" then it works fine.. the "ctype" column has string type and all records are well formatted.. Any help will be great..thanks in advance : ) Software's : Sql Server 2008 r2 (for query layer) , ArcGIS Server/Desktop 10.1 , Java script API ver. 3.0/3.1


Why does updating Definition Query on layer in ArcGIS 10.1 SP1 no longer allow access to all unique values in dataset?

In ArcMap 10, setting a definition query on a layer would display only the subset of features: ![Defn query in ArcMap 10](http://i.stack.imgur.com/dybAf.png) To add more features to the query would simply involve clicking `Get Unique Values` to list all the values for that field again: ![Updating the defn query in ArcMap 10](http://i.stack.imgur.com/H7pVb.png) The steps are the same in 10.1, except when I go to update the query by getting the unique values again, this happens: ![Updating a defn query in ArcMap 10.1](http://i.stack.imgur.com/OnPAh.png) The values window no longer shows all the values for that field in the feature class, it only shows the values which were set by the current definition query. I'm not sure if this was a deliberate change (I went from 10.0 SP5 to 10.1 SP1), but it seems that I now have to clear the current query, apply, then go back into the query builder for all values to become available again. Has anyone else encountered this issue?


How can I multiply rows with a number using C#?

I have a dbf with a field named "ppa" .the type of ppa is double. users enter number (for example 0.023) in a textbox and select the dbf in a combobox . then click Run and program multiply 0.023 with each number of ppa and save the result in another field . what objects do i need for programming ? How can i do this ?


Running a bat file for rebuilding and republishing a geocoder using two Python scripts, but would it work better as one script?

We all love ESRI and Python.... I'm looking for some insights and here is the situation. I've got a bat file calling two separate .py scripts. The first .py is a geocoder rebuild and the second is a .py script that publishes the service to the ArcServer. Both scripts run fine (individually) when run within PyScripter or on the cmd. BUT it seems the bat file does not produce a completely rebuilt geocoder and an updated and published service. Anyone have any ideas? I'll post the code if anyone wants to experiment. W


Alternatives to ArcGIS Extensions using ArcObjects?

I was wondering if there are any projects based around using ArcObjects and external libraries to create open source alternatives to extensions in ArcGIS. For example 3D Analyst, Spatial Analyst etc or even stuff like implementing some ArcInfo functionality in ArcView?


Eliminating a column from a copied feature class via a fieldmap object in ArcGIS Python

The use case is exporting a feature class via a Python script (arcgisscripting v9.3x. Only a few of the columns are needed in the result feature class. I commonly use the fieldmappings/fieldmap objects to rename columns. The docs state that you can also use them to delete a field as the feature class is being exported. Can anyone provide an example of this?


How to calculate parameters for SQLServer raster to ESRI grid script?

My question is related to How to convert SQL Server Rasters to ASCII Grid? I would like to transform the data in the database into Esri grid format. I would like to write the program/script myself and wonder how these values are computed:               xllcorner, yllcorner, cellsize      I know that my squares are 25km^2. The wiki site mentions easting and northings. Should I just transform the lower left latitude/longitude values into easting and northings and use 25 for cellsize?


Openlayers - Losing selection or style on layer redraw

When I zoom or move the map my layer is redrawn. This is what I want, because I have allot of features to load at once. This is the code:                   wfs = new OpenLayers.Layer.Vector("WFS", {         strategies: [new OpenLayers.Strategy.BBOX({                         resFactor: 1,                         ratio:1                     })],         protocol: new OpenLayers.Protocol.WFS({                   maxFeatures:1000,                   url:  myUrl,                   featureType: myFeatureType,                   featureNS: myFeaturedNS,                   version: "1.1.0"                   }),           filter: setFilter(year, variant)     });      The following code is my selectioncode. This all works as I wan't it to. However, when the layer is redrawn the selection is lost and the onFeatureUnselect is not fired (which it should). I'm not sure if the selection is really lost or that the style is resetted.                   selectCtrl = new OpenLayers.Control.SelectFeature(             wfs,             {                 clickout: true, toggle: false,                 multiple: false, hover: false,                 box: true,                 toggleKey: "shiftKey", // ctrl key removes from selection                 multipleKey: "shiftKey",                 eventListeners: {                     featurehighlighted: onFeatureSelect,                     featureunhighlighted: onFeatureUnselect                      }             }         );      @geographika My onFeatureSelect and onFeatureUnselect functions:               function onFeatureSelect(e) {     var feature = e.feature.attributes;     var featureclone = e.feature.clone();          var style = {         pointRadius: 10,         fillOpacity:0,         strokeColor: "#000000"         };          featureclone.style = style;          layer2.addFeatures([featureclone]);     selectedFeatures[featureclone.attributes.receptor_id] = featureclone;     }          function onFeatureUnselect(e) {         var feature = e.feature.attributes;         layer2.removeFeatures(selectedFeatures[feature.receptor_id]);            delete selectedFeatures[feature.receptor_id];     }


Both dashed line and stroke line in parallel in the SLD

I just started in GIS. how can i draw in the GeoServer's SLD editor, both dashed and stroke line in parallel? like this,               -----------------------------------     ___________________________________      thanks.


Count the number of segments of a polygon based on the angles

I wish to count the number of segments of a polygon that has a length less than 25 meters when the angle between two vertices is not close to 180 degrees i.e. if the angle is between 178 to 182 degrees I want to ignore this case even though the segment length is less than 25 meters. I note the basic part of the code below is in VBA. Could anybody help me please to find why I get the wrong results? Thanks.                    Dim pFCursor As IFeatureCursor     Set pFCursor = pFeatureClass.Update(Nothing, True)          Dim pFeature As IFeature     Set pFeature = pFCursor.NextFeature          Dim pGeomColl As IGeometryCollection     Dim pSegColl As ISegmentCollection     Dim pCurve As ICurve     Dim pLine1 As ILine     Dim pLine2 As ILine     Dim dVtxAng As Double     Dim i As Long, j As Long     Dim pi As Double     pi = Atn(1) * 4          Dim counter As Integer     counter = 0     Dim angleDeg As Double          Do Until pFeature Is Nothing     FID = pFeature.Value(intPosFID)          pFilter.WhereClause = "FID=" & FID     pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing          Set pSelection = pLayer     pSelection.SelectFeatures pFilter, esriSelectionResultNew, True     '******************Code for measuring angles and minimum lenghts              ' Get all disjoint paths         Set pGeomColl = pFeature.Shape              ' Loop thru the paths         For i = 0 To pGeomColl.GeometryCount - 1             ' Get all segments that make up this path             Set pSegColl = pGeomColl.Geometry(i)             Set pCurve = pSegColl                  ' Loop thru the segments             For j = 0 To pSegColl.SegmentCount - 2                      ' Get the next two lines                 Set pLine1 = pSegColl.Segment(j)                 Set pLine2 = pSegColl.Segment(j + 1)                      ' Calculate the left side angle (in degrees)                 dVtxAng = CalcAngleBetweenLines(pLine1, pLine2)                  angleDeg = dVtxAng * 57.2957795                           If angleDeg >= 178 And angleDeg <= 182 Then                 counter = counter                 'if angle is close to 180 degrees then ignore the points and its vertices         GoTo Nextsegment                 End If                      'if angle is not close to 180 degrees and lenght of segment is less than 25m then count the segment         If angleDeg < 178 Or angleDeg > 182 And pLine1.Length < 25 Then                  counter = counter + 1                      End If                    Nextsegment: Next j               Next i               'Store number of points in the field     pFeature.Value(intPosminLenght) = counter     pFCursor.UpdateFeature pFeature               counter = 0     Set pFeature = pFCursor.NextFeature     Loop          End Sub


Help with PostGIS polygon geometry - non-closed rings

I've picked up a copy of the super-wicked book 'Python Geospatial Development' by Erik Westra (Amazon link), and I'm working through it. Currently, it's teaching me to load GSHHS coastline data from a shapefile into a PostGIS database, in preparation for building a geospatial web app. My problem is this: when I try to import the GSHHS data into PostGIS, it is rejected due to the coastline polygons not being considered 'valid'. Specifically, I am given an error message described some (but not all) of the coastline polygons as being 'non-closed rings'. I understand that this error is trying to tell me that the first and last points of the polygon are not the same. However, this is simply not true. I have examined the WKT representation of many of the polygons, and they are correct. They _definately_ begin and end with the same co-ordinate. The polygons are extracted from the shapefiles using the OGR library, and exporting each polygon feature to WKT. I've tried reconstituting the polygon via Shapely, and experimented with WKB, but to no avail. I _have_ been able to load the same data into PostGIS as a MULTIPOLYGON table, using the shp2pgsql loader. I was wondering if anybody out there had:   (a) perhaps used the same book, got stuck at the same problem, and has the answer for me?   (b) has encountered a similar problem, and found a solution?   (c) failing that, has some 'best practice' advice for ensuring valid geometry before loading into PostGIS? Thanks folks, Tim UPDATE: a colleague has suggested that the 'non-closed rings' problem may just be a symptom of another problem. It is possible that my PostGIS/PostgreSQL configuration has size limits (on insert transactions, packets received, text strings, etc). As I'm using very long WKT polygons as input, PostGIS may be cutting them too early to allow each polygon to complete. I will test it out tomorrow, but it does sound likely. My insert of country borders was only accepting _some_ records and not others. From memory, the accepted geometries were for small island nations like Antigua (and so probably had short WKT representations). So this could end up being more of a PostGIS database admin thread, rather than an invalid geometry thread.


App using ArcGis Engine throws error at customers

I developed a program using the ArcGIS Engine 10.0. On my development computer it runs nicely, but when I deploy the binary to the customer computer the program throws an exception when trying to initialize the license. The exception: " _ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS components._ " This error does show after I called RuntimeManager.Bind, and I'm quite sure I did not accidentially instanciate any other ArcGIS objects before calling RuntimeManager.Bind. How can I find the source of this problem? Why does it only show up at the customer? The code I'm using to initialise:               ESRI::ArcGIS::RuntimeManager::Bind(ESRI::ArcGIS::ProductCode::Engine);     ESRI::ArcGIS::esriSystem::AoInitialize^  aoi = gcnew ESRI::ArcGIS::esriSystem::AoInitializeClass();          ESRI::ArcGIS::esriSystem::esriLicenseProductCode productCode = ESRI::ArcGIS::esriSystem::esriLicenseProductCode::esriLicenseProductCodeEngine;     if (aoi->IsProductCodeAvailable(productCode) == ESRI::ArcGIS::esriSystem::esriLicenseStatus::esriLicenseAvailable)     {       aoi->Initialize(productCode);     }


How to list..only the Field names for a group of files in a folder?

I am having...for eg, 27 files in a folder (may be a shp or tab). Is it possible to list the **Field_Names (ID, Type, Date, Allotment, etc..) alone** of all those 27 files in a csv format or xls format?


Where can I get public transportation locations for USA

I am trying to find a list of all public transportation/transit locations like subway stations, airports, bus terminals and bus stops for USA. Only major transit locations are required, rural bus stops are not necessary. This will be used to provide the nearest transit stations at a particular place (for a buy/sell listing), similar to whwat Yelp did for its listings. **Yelp's Transit Details**               Nearest Transit Station:     Haymarket Station - Outbound (Orange Line)     Haymarket Station - Inbound (Orange Line)     Congress St @ Haymarket Sta (191, 192, 193, 325, 326, 4, 92, 93)      Any suggestions? Does OSM have such information? Could OSM contributors have included the major transit locations in America, and is it currently at least comprehensive in the major cities? And what do I have to do to clean the data before I can import it into PostGIS and QGIS/ArcGIS?


How to partition a Census block shapefile according to towns in a separate shapefile?

I have a census block shapefile and I want to separate the data according to their towns or village. The towns/village is a separate shapefile. Any help is greatly appreciated. I am using ArcInfo 10.


How do I add my own map layers to Leaflet

I have a Leaflet map and want to add two of my own small polygon layers (currently in shapefile format, but they could be converted to GeoJSON). Can this be done without a mapserver to publish them as map services? Is so, are there specific instructions for this? If it can not be done, are there "free" services for publishing small map layers?


Seamless, color balanced mosaics of aerial RGB photos with Open Source

I'm looking for an open source tool/workflow (even a command line one) to obtain what it is advertised in programs like http://www.inpho.de/index.php?seite=index_orthovista http://www.orthomapper.com/color_balance_example.html http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009t000001v8000000 I already tested OSSIM and GRASS, for instance http://trac.osgeo.org/ossim/wiki/histogram_operations http://grass.osgeo.org/grass64/manuals/i.image.mosaic.html but results are not as expected. I also had no luck with http://www.lizardtech.com/products/geoexpress/ that is the only close source that I was able to test thanks to a trial. Maybe it depends from my input data, so a small working sample dataset would be highly appreciated. By the way, does Orfeo do something like that? Thanks in advance PS I'm open to use even a non GIS software


How do I create a basic image layer as a base layer in OpenLayers?

I'm trying to create a map using OpenLayers which uses a png image as a base layer but I'm having a bit of trouble. I'm not too familiar with OpenLayers as I have only come across it today and thought that it could prove to be a powerful tool. So far I have just been using the code from the tutorial and changed the base layer from a WMS format to an Image format but it still does not show the map on the webpage.               <!DOCTYPE html>                     <title>OpenLayers Tutorial - Basic Map Setup</title>
OpenLayers Tutorial - Basic Map Setup

                  It's probably something really silly that needs changing but I've looked at documentation and I can't seem to find the issue. Any help would be appreciated!


How to extract primary and secondary roads from OSM data?

After importing my country roads from OSM data, I need to create a network ( roads connecting big cities ) for use with pgRouting. For this, I need the green, blue and red ones (http://www.openstreetmap.org/#map=11/-29.8582/-51.5238) but I'm unsure how to select them in database, since OSM is not clear about how to find them. I just try http://taginfo.openstreetmap.org/keys/highway#values using PRIMARY and SECONDARY tag values, but the result sometimes gives me the orange and yellow ones too.


Google Maps + Geojson vector layers --> Save as Image

I've created a custom website with Google Map's + geojson layers read from a Postgis database. I draw some other layers on top of it, including some polygon and line layers... I display this website on a Microsoft Access 2003 form. Everything works fine. The thing is that the Webbrowser control is not showing anything on on a report (blank). So the work line is now saving the website's result as png and display on the report that png. How could i save the result of the html site into a png? Regards,


ST_NumInteriorRings not returns zero, is a bug?

I am using PostGIS v2.0.3, the guide say that `ST_NumInteriorRings` "will work with both POLYGON and MULTIPOLYGON types but only looks at the first polygon. Return NULL if there is no polygon in the geometry"... But my query returns only NULLs,               SELECT gid,             ST_NRings(geom) as nrings,             ST_NumInteriorRings(geom), ST_NumGeometries(geom) as ngeoms      FROM t      WHERE ST_NRings(geom) >1 or ST_NumGeometries(geom)>1      for all gid returns `nrings=ngeoms>2` and `ST_NumInteriorRings=NULL`... But I see with my GIS viewer the holes there (!). * * * Example (req. by @JakubKania):               SELECT gid, ST_SRID(geom), ST_Geometrytype(geom),             ST_NumGeometries(geom) as ngeoms, geom::text     FROM kx.quadrasc      WHERE ST_NRings(geom) >1 or ST_NumGeometries(geom)>1     LIMIT 2;       2;31996;"ST_MultiPolygon";2;"0106000020FC7C0000020000000103000000010000004D000000ACC4E8BCDCD82241AE3B4A8C039359412D2281C0DCD822417EA0DE8E0393594170F08509E7D8224146B6F341089359413BA85897EED82241EA2145430B935941E5D45897EED822410B3145430B93594198D380AD26D9224110743093219359411AC884B626D92241E0D9D5952193594191180ACD26D92241D40D3F95219359415F3DF733A9D92241556F12761C935941C236BE3AA9D92241C9EFCF751C935941E7434D68C1D92241B7F06C8E1B935941D82803CBC1D92241E51F068C1B935941BE03932FC2D922413395148C1B9359413BB11B92C2D92241D5C1978E1B9359414815D0EEC2D92241E2D576931B93594186A51C42C3D9224159B5819A1B93594104BBCA88C3D9224142D372A31B935941A64E20C0C3D9224190E0F1AD1B935941D1E6FAE5C3D922413D3497B91B93594179A316B1C4D9224125876E0F1C935941804FBDB9C4D92241FD5E18121C9359410A4B54D0C4D92241E5858E111C9359413B605ED2D2D92241F4397A8D1B935941A600B2E7D2D92241C2E7658C1B935941690A63E3D2D9224147A892891B93594189B402E6D1D922413B1B151E1B935941404237D3D1D92241E011C2111B935941CA6F04D4D1D92241B85236051B935941995A62E8D1D92241304BEDF81A935941BDA3880FD2D9224154D85FED1A9359412923F647D2D92241C3A1FFE21A935941E7B47F8FD2D9224186BB32DA1A9359419B8E65E3D2D92241D1B94FD31A935941744B6E40D3D922413F5D9ACE1A935941EDCBF3A6DCD92241CCBAF8751A935941359FF5A6DCD9224167A6F8751A9359417779E62AF6D922413695638519935941B55EE72AF6D92241378B6385199359416417D9AE0FDA2241C5CCCC94189359419019D9AE0FDA2241B1CDCC941893594158B4D9AE0FDA2241FDC6CC94189359413849E2F02CDA22418153ED801793594198E535062DDA2241DA00D97F179359412FEFE6012DDA2241B2C1057D179359417241A5AB24DA2241D73F9AF3139359413170FDAA24DA2241A67352F3139359410ACFCBAD1CDA2241FC42D88010935941E0578AAC1CDA224182314B8010935941A2B46C9719DA224181A107200F9359412E00B98D19DA2241C93D001D0F935941E3F3017519DA2241E8AEF31B0F935941EB57DCE4F5D9224123BE081E0E9359417B537B59F5D92241A9515C170E935941008308C4E7D922410E6907230D9359410F92F1B0E7D92241CE39D2210D9359416C2A77AEE7D92241D746B3210D935941BEB36E98E7D9224168D2E9200D93594135B9926BD5D9224140D613990C9359419DD1AB45D5D922414EFFC6970C935941EF7F0629B7D922416ACA1F670B9359414CD66A25B7D92241F4D0FA660B9359419990E13C9DD92241B472175A0A9359415805E9239DD92241DE3FFD580A9359414D34F06777D922416982178B089359414D8B0F6577D92241F5AAFE8A08935941942D7B3977D92241F3C04289089359410DD1603677D92241B32F1E890893594121A9D0D94ED9224196E4713D0793594166062EC04ED92241D44F883C07935941BA2F08B21BD92241B5BEFF3C05935941336CD5A61BD9224174B7B53C059359413E819B801BD92241AA8A873B0593594108EC6C7E1BD922414F6A733B059359413EB2CC89FFD822413C38529F04935941CC56E466FFD822417CE4669E04935941FBECA0D1DCD822411007AD8C03935941ACC4E8BCDCD82241AE3B4A8C039359410103000000010000000400000070F08509E7D8224146B6F341089359412C5DC008E7D82241E577FA41089359419088C208E7D822410763FB410893594170F08509E7D8224146B6F34108935941"            12;31996;"ST_MultiPolygon";3;"0106000020FC7C0000030000000103000000010000003C000000C396357D77C62241B141A01D82925941D4C3748E77C62241619A871F8292594158302AE997C62241F241CF0A8592594174232AE997C622412E44CF0A85925941150D2BE997C62241DC55CF0A859259418647B520A8C622413A0E608186925941B0D1B620A8C622413B2E608186925941064E5158B8C622417C8FEFF787925941F9DBDE8FC8C622413FF17E6E899259412D1EDF8FC8C622419FF67E6E899259419975FB5FD8C62241B7B4B8DB8A925941916ADE73D8C6224148042BDD8A925941F02D1983D8C62241721E03DB8A925941DCABE85AE8C62241ED209B1C889259418BE67864E8C6224180CB001B88925941D04D6230F0C622419E5E29D7869259413F64579907C72241752846C9829259419CCF579907C72241CD1346C98292594139F2D24D13C7224123BD52C28092594181F7D24D13C722419DBD52C280925941A064D34D13C7224153A952C2809259414D834D021FC722410B2161BB7E925941F9864D021FC72241602161BB7E925941F0D24D021FC72241401361BB7E925941AC8D4F6B36C72241B9F17DAD7A9259415943506B36C72241C4CE7DAD7A9259412D93CB1F42C72241B4718AA6789259416F98CB1F42C722412D728AA6789259413005CC1F42C72241F55D8AA678925941807346D44DC72241E3C7989F76925941C854C18859C72241E71DA79874925941E696FEE270C72241F8CC4E8D70925941301291EE70C72241746ED28A709259417FE651DD70C72241F715EB8870925941B1B52ABA60C72241D6DF32146F92594190102ABA60C722416ED232146F925941C0FA8F8250C722417E7CA39D6D925941480C024B40C72241061214276C925941C15AE8DB1FC72241326FF53969925941A0B5E7DB1FC72241CA61F539699259416C37B2B80FC72241160D3DC5679259416C41CFA40FC722412DBECAC367925941BF8094950FC7224103A4F2C5679259412778573BF8C62241FCEA4AD16B925941605DDC86ECC62241ED9E3CD86D925941187C61D2E0C62241E9482EDF6F925941F446E71DD5C6224117D51FE67192594199DBE61DD5C62241BFE91FE67192594166267B69C9C622416C9410ED73925941FFFB1FB1BDC62241E4933EF4759259411FB003B1BDC622413B0544F475925941DA26A5FCB1C62241183A30FB77925941AED288FCB1C6224134AE35FB779259411B140A4CA6C62241F4A4E5017A925941703480979AC62241AC8BDB087C925941212F80979AC62241318BDB087C92594178C17F979AC62241959FDB087C925941285305E38EC62241A835CD0F7E925941B616C88877C6224135E3231B82925941C396357D77C62241B141A01D8292594101030000000100000004000000C854C18859C72241E71DA79874925941BBE8BF8A59C72241982ED5987492594103E9BF8A59C722418C2ED59874925941C854C18859C72241E71DA7987492594101030000000100000004000000D04D6230F0C622419E5E29D786925941E2D63731F0C62241E5EE3DD7869259410BDE3C31F0C62241B9163DD786925941D04D6230F0C622419E5E29D786925941"


Strange results

I am getting a strange error within GIS, when using the internal MapInfo Select query for objects.               SELECT featurecode, area(obj,"sq km"),theme, DescriptiveGroup,count(*) from mastermap_topo_497145_0_Topogr GROUP BY featurecode      Shows up all the results, with the area in KM, now when its applied to an object area, for example to select all objects within a distance of a point, even a large value it does not give the same results. The counts are equal (only one layer) per featurecode, but the area calculations are wrong and vastly different as if the SQL command is not selecting all the objects but the object count is equal, BTW the point creation / sql is via MapInfo Basic. Just very odd to get the same objects two different results.


Atlas - How to set in rows from table linked to polygonlayer?

I have polygonlayer and a textlayer. The polygons have unique ID´numbers. The textfile also have unique ID-numbers (and therefore possible to join together, yes), but it contains several rows with the same ID-number. In Print Composers Atlas it´s no problem to make an output print for each polygon by the ID, but I want to show the rows in the table/text-document as well. I can´t figure out if I´ll have to join the text-document by the polygonlayer or try with the Expression filter? For Q-GIS 2.0. This i s what I want as output for each output:![enter image description here](http://i.stack.imgur.com/emBHI.png)


Adding imagery or world topo map from arcgisonline to map

I have an ESRI Javascript API application that uses a local Map Service with various feature layers. Now I need to add Imagery or top maps from ArcGIS online as base maps. I am trying the following. First two lines add layers from my local map service. Then I am trying to add topo map. When I do this I can't see any topo layers on the map. If I comment out code adding from local map service, I can see topo layers. Is there something I need to do to mashup layers from different map services?               layer = new esri.layers.ArcGISDynamicMapServiceLayer(mapServiceURL);             map.addLayer(layer);                  var layer1 = new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer");     map.addLayer(layer1);      Thanks Cyril


Want to dissolve adjacent polygons but no common edges

I have a bunch of parcel data, I want to join the polygons basing on the same owner name. Even they are not touched, I want merge them together, such a 100 feet tolerance. The purpose is to show the somebody's properties without too much separated lines. Like this I have some programming experience, but just start to try to get the tool by python script, and tried arcgis add_in wizard. If there is some idea about the script work flow, it will be really helpful!


Geoexplorer cannot Save and Publish maps

I installed Geoexplorer 3.0.2 according to instructions. I also setup GEOEXPLORER_DATA in _web.xml_ file and it seems that it works fine because `http://localhost:8080/geoexplorer/maps/?` returns:               {"maps":[]}      But when I'm trying to Save my map I get back the half link:               http://localhost:8080/geoexplorer/composer/      _Notice there is no **#maps/MapID** at the end of the above link,as it was supposed to be._ Also when I'm trying to Publish my map I get the following link:               <iframe style="border: none;" height="400" width="600" src="http://localhost:8080/geoexplorer/viewer/#maps/undefined"></iframe>      Notice that instead of **MapID** at the end of the above link, it gives me the **undefined** The directory GEOEXPLORER_DATA and geoexplorer.db have full permissions to tomcat7 user/group. Is it an insertion problem in my db file? Is it a bug or something else? If I run GeoExplorer in **development** mode (without setting any GEOEXPLORER_DATA directory), I have no problem. I can Save and Publish my maps. I only have that problem when I run it under **deployment** in a production environment (under tomcat7). Maybe is a **GeoServer Proxy problem** because during debugging I get:               POST http://myexternal_IP:8080/geoexplorer/maps/ 401 (Unauthorized) GeoExplorer.js:396         b.send GeoExplorer.js:396         (anonymous function)     Trouble saving: {"error":"Not authorized"}       My configuration is the following: I set up **Proxy Base URL** of Geoserver to `http://myexternal_IP/geoserver`   I also setup **Apache ProxyPass** :               ProxyRequests Off     ProxyPreserveHost On     <Proxy *>     Order deny,allow     Allow from all     </Proxy>     ProxyPass /geoserver http://localhost:8080/geoserver     ProxyPassReverse /geoserver http://localhost:8080/geoserver      Finally, I **build the app** with:               ant -Dapp.proxy.geoserver=http://myexternal_IP/geoserver debug      But the problem still remains...


Use of Grass and R w.r.t. Land Use Prediction

In my data mining term project I need to conduct a work on geospatial data related to a big city to show possible urbanization fields in next years. I've used GRASS lately on other projects so I'm a bit familiar with GRASS. After some research I've seen that R can be used for spatial statistics issues and I've read about forecast, raster, sp, spatstat, geospt etc libraries of R and it seems it can be helpful for my project. But on the other hand it has a very steep learning curve. Though I'm not sure that GRASS is whether sufficient or not at that point, learning process of R is seems scaring to me. I'm coding for 4 years with C, Java, C#, Python etc but R's syntax, working mechanism is like an alien to me. What do you suggest for this problem. Do you think GRASS can be used solely or do i need to invest on R? Thanks in advance. EDIT: I have etm+ images produced at 3 different years(2010, 2011, 2012) for same location. I will use first 2 for training and last one for test. I will define parameters such as city centers, roads, urbanized places etc. to predict areas which are probable to be urbanized. There are some researches using Bayesian Belief Networks or Artificial Neural Networks to achieve this. I will use 2 or 3 parameters(roads, rivers) to estimate urbanization model of a city. Using vector data and raster data I think I can predict urbanization model more or less. So I need to evaluate raster cells against vector data to calculate their urbanization probability.


The submit button for styles in Geoserver

Say I have a layer L in Geoserver to which i attach a style S (in the GS backend i published L using S). Of course, If I use the style editor in the GS backend and change the SLD for S and then 'submit' the new style, my layer looks different next time I load it in a browser. Now, I am planning to re-generate the SLD for S regularly directly into the Geoserver styles folder using php : each time the database has a new entry, it is queried, the appropriate style/legend is calculated and my php is parsed and prints the SLD code for S in the styles folder, overwriting the previous version of S in the process. It does not work, i.e. if I modify or overwrite S directly in the styles folder and then reload my layer in a browser the style is not updated. Hence my question: what does the 'submit' button in the GS backend style editor do and how can it be simulated using code instead of manually. Hope this makes sense. Thanks for your help. B


Network Analyst does not take oneway street from attribute table

I want to build a network dataset to calculate travelling times for buses (service area). I have on shapefile with the streets from my home town, which has a column intitled 'ONEWAY', with values of -1 (to-from), 0, 1 (from-to), but the network is created without the oneway restrictions on those streets. Even if i try a route, for example, it is generated without taking in consideration the oneway street. Can anyone help me understand why or what i could do?


How do I prevent from a feature to be cut from a tile in openlayers?

I have a map with GeoJSON layer. I draw features on zoom 18 of OSM base layer. When I zoom out the feature is overlay by the map tile How can I enforce the feature to be on top of the tiles ? ![enter image description here](http://i.stack.imgur.com/2jLay.png)                    <title>Map View</title>                    <link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css">     <link href="Scripts/theme/default/MapView.css" rel="stylesheet" type="text/css" />     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">              </telerik:RadCodeBlock>


Export from GIS to static html clickable hypermap?

What plugins or tools are available to conveniently export a GIS view to a html clickable hypermap? Since 2005 or so we use a commerial plugin for ArcGIS, We have a working example of the output here. At this time, this is good enough, but it requires a few manual postprocessing steps, which should be reduced. Besides, the annual license for the plugin is considered a nuisance from a corporate accounting standpoint. Now we are wondering if there are better alternatives. Here are our requirements   * Export a GIS view map to a bitmap, Correctly export it without distortions and with valid html, preferably with style information extra (in css), no proprietary attributes inside the html...   * Export point features to clickable <area> elements. Make the points clickable, _but also make the labels clickable._   * Export as a single bitmap, do not convert to tiles   * Export without a sidebar (only export the map, not the layer selection frame and other stuff such as trademark infos, "created with" footers in the bitmaps, etc.)    * Aesthetic alignment of labels next to points   * Label alignment configurable, set preferences and priorities image-wide (try to put label to the right of a point. If there is a collision with another label, then put label at the top of a point, etc)   * _Possibility to re-align + re-format labels individually_ after semiautomatic/algorithmic alignment steps have completed   * it's ok when based on free software. However, if we switched to this software, it should be able to import ArcGIS 9 project files.   * easy to use, preferably gui-based


How to convert geometry coordinates into Google lat/lons?

For storing geospatial data, the `geometry` field is used in SQL Server or Oracle Spatial. I want to know is there any way where we can convert this geometry field into a set of latitudes and longitudes.


Problem with publishing GIS resources in ArcGIS Server

I have ArcGIS 9.3 on Win 7 sp1 integrated with VB.Net 2008. I have connected my server in ArcCatalog and publish mxd to ArcGIS Server without any problem, put after I open ArcGIS Server Manager and publish GIS services to GIS resources it gives me this error: ![enter image description here](http://i.stack.imgur.com/tt2Pm.png)


How can I confirm the existence of pyramids in QGis?

I have created pyramid layers for my ASTER satellite images (.img) using Gdal Tools "Build Overviews" (Pyramids). The dialog said "Processing completed". I don't have the impression that zooming in or out has been accelerated in any way and under "Properties" / Pyramids there is still the "description", no pyramids are listed. Does anybody know how I can find out about this?


Can osm2po produce a travel distance buffer for a given time?

Given a starting point and a travel time, I would like to produce a travel distance polygon. Can I request this from osm2po via http?


Problem reprojecting LIDAR data with Liblas

I am currently trying to reproject a LIDAR file (.las) using the Open-Source LibLAS, compiled on a Scientific Linux server. The Original data is in Oregon Lambert, NAD83 (EPSG:2992), and I am trying to reproject it to UTM WGS 84, Zone 10 N (EPSG:32610). However, when I use the --t_srs option, I get the following error: "error: X scale and offset combination is insufficient to represent the data" I am suspecting it has to do with the integer values stored and the distance of translation. How do I get it to work? Is there anything I have to change in the header information? Regards, Edit: Here is the command line I am using (lasinfo detects the original EPSG, so no need to specify it): > ./las2las -i path/to/input/folder/*.las -olas -odir path/to/output -v > --t_srs EPSG:32610 Result: > $ Setting output SRS to EPSG:32610 > > $ error: X scale and offset combination is insufficient to represent the > data


Buffer point dataset based on compared value

I am creating polygons from the dissolved buffers of points and need to control the dissolve process. In the model the first stage is to assign high/med/blackspot using the following               f2='ERROR'     def re_score(my_field,f2):           if (my_field*1) < 14:       f2 = 'Black'      elif (my_field*1) < 24:       f2 = 'Medium'      elif (my_field*1) >= 24:       f2 = "High"          Expression = re_score(!Rx!,f2)      and then use the following settings in buffer...               arcpy.Buffer_analysis(Signal_Strength_Added, Buffered_tower_range, Distance__value_or_field_, "FULL", "ROUND", "LIST", "Signal_Strength")      If distance between points is 30m then I buffer at 35m I want to deal with overlap by defaulting to the worst case scenario, so if when dissolving the buffers are "med" and "blackspot", then it should be incorporated into the blackspot zone - I don't know how to specify this! Any ideas? The base points dataset is               Latitude    Longitude   Rx_dB  Best_unit     -17.06694    145.23158  -050.5  2     -17.06695    145.23297  -044.1  2      my_field in this case is the Rx_dB The image below illustrates the issue... ![enter image description here](http://i.stack.imgur.com/NTUF5.jpg) _pts is the output point dataset with signal strength _Lamb is the 30m buffer with dissolve by signal strength _pts_30m_Buffer - is just the buffer without the dissolve Areas around 1a should be red, 2a/2b area should be yellow and 3 is correct. Each dataset is around 500,000 points and I am still trying to do a spatial join on a new dataset without the dissolve.


How to avoid Pink tiles when DB view/Table is empty?

I have views that are spatial in a sense that they select some spatial column from other table. This table is published using geoserver. This table is live and sometime has no data at all. When the table has no data the wms displayed is all `red` and error in firebug console is: ![enter image description here](http://i.stack.imgur.com/2Nx4z.png) The WMS returned:               >  <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE     > ServiceExceptionReport SYSTEM     > "http://192.168.70.65:80/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" >   <ServiceException>     >           java.lang.NullPointerException     >     null     >     </ServiceException></ServiceExceptionReport>      The Code:               function init(){                     OpenLayers.IMAGE_RELOAD_ATTEMPTS = 1;                     OpenLayers.Util.onImageLoadErrorColor = "transparent";                              map = new OpenLayers.Map('map', {                            projection: new OpenLayers.Projection("EPSG:900913"),                         displayProjection: new OpenLayers.Projection("EPSG:4326"),                         numZoomLevels: 21,                         maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, 20037508.34),                            controls: [                             new OpenLayers.Control.Navigation(),                             new OpenLayers.Control.PanZoomBar(),                             new OpenLayers.Control.LayerSwitcher({'ascending':false}),                                                    new OpenLayers.Control.ScaleLine(),                             new OpenLayers.Control.MousePosition(),                             new OpenLayers.Control.OverviewMap(),                             new OpenLayers.Control.KeyboardDefaults()                         ]                                  });      Using GeoExt:               <script src="http://localhost/geoserver/www/ext/adapter/ext/ext-base.js" type="text/javascript"></script>             <script src="http://localhost/geoserver/www/ext/ext-all.js"  type="text/javascript"></script>             <link rel="stylesheet" type="text/css" href="http://localhost/geoserver/www/ext/resources/css/ext-all.css"/>                  <link rel="stylesheet" href="http://localhost/geoserver/www/openLayers/theme/default/style.css" type="text/css" />             <script src="http://localhost/geoserver/www/openLayers/OpenLayers.js" type="text/javascript"></script>                  <script src="http://localhost/geoserver/www/geoext/lib/GeoExt.js" type="text/javascript"></script>                     <link rel="stylesheet" type="text/css" href="http://localhost/geoserver/www/geoext/resources/css/geoext-all.css"/>                       <script>                      OpenLayers.Util.onImageLoadErrorColor = 1;                 OpenLayers.Util.onImageLoadErrorColor = "transparent";                                Ext.BLANK_IMAGE_URL = "http://localhost/geoserver/www/ext/resources/images/default/s.gif";                 var app, items = [], controls = [];                 var lon = 85.344;                 var lat = 27.7;                 var zoom = 12;                 var url = "http://localhost/geoserver/wms";                                Ext.onReady(function() {                                 app = new Ext.Viewport({                         layout: "border",                         items: items                     });


Assign a Value to a Customized Toolbar Item

I have developed a main toolbar that uses windows forms and arcobjects to write to sde databases. I am trying to extend the functionality of the toolbar to point to two different databases dependent on which item on the tool bar they choose. Each item has the same process and steps associated with them. Is there a way to pass a value when using the AddItem() command, similar to an onClick event?                   Public Sub New()                  AddItem("tlb_Champ") *I would like to pass the database path when they choose this item vs the item below             BeginGroup()             AddItem("tlb_Dommage")             BeginGroup()             AddItem("tlb_Seismic")              End Sub


Clipped raster leaks outside polygons

I am trying to clip a raster (DEM) with a polygon layer in ArcGIS10.1, using Data Management>>Raster>>Clip. Basically the clipped raster has many pixels outside the polygon boundary, mainly for thin polygons (about 1 pixel wide) or ones with sharp corners. I have different versions of the original raster, all with 25m cell size (but slightly different outline extent), andwhen I clip them I get slightly different results. (I would expect one or two pixels, but this seems like too much). I'm a fairly new GIS user, and I suspect the problem is something with my environment settings, but I've tried with 'snap to raster' both on and off, and the problem persists. I have to calculate zonal statistics on the clipped raster, and the area calculation shows that the clipped area is not the same (or even close sometimes) as the original polygon. Has anyone encountered this problem or have suggestions to fix it?


QGIS offset dash line style - dash spacing does not vary with rotation

I'd like to make a USGS-style dirt road marker but with smaller dashes and bigger spacings (i.e. less duty cycle) to indicate lower quality road. First attempt = two simple lines, custom dashes of the same value, offset same distance in opposite directions. Problem is, when the line goes around a curve, the spacings don't automatically adjust (stretch on outside of curves, compress on inside of curves) to account for the curve, so you get something that looks like phase shifting or 'pulling' of one side relative to the other ![enter image description here](http://i.stack.imgur.com/hptah.png) So, some attempts to fix that:   1. solid black line, centered, say width = 1; solid white line on top, centered, say width=0.6; so, this works to keep the dashes across from each other as the line curves, but, the center line that covers/hides the black is solid white - not transparent as in a USGS. Anyone know of a way to do that?   2. change it to a marker layer - I used a font marker, picked a colon, set the y offset so it's basically centered, and good to go. The 'rotate' checkbox, on by default, seems to keep the dashes 'across' from each other as desired. Problem is, it's pixellated and a bit chunky looking. So, is the cleanest solution to make a svg that looks nice and use that? Not sure how it will handle compressing on inside of curves vs stretching on outside of curves. What would really win is a checkbox in the dashed line type that says 'keep offset dashes across from each other around curves' or such, akin to the 'rotate marker' checkbox for marker lines. Thanks in advance.


Only Capability appearing is Feature Access

I was wanting to know if anyone could explain why the only capability showing when I try to publish an ArcGIS Service is Feature Access (Picture Below). I am needing to create a service that will allow the user to update, add, and delete attributes from a feature layer. I have the database registered, but the only Feature Access capability I am able to access is the ability to query. Any help would be appreciated. ![enter image description here](http://i.stack.imgur.com/hI7wG.png)


JSON URL won't open in QGIS

When attempting to display the national chargepoint registry from the following URL: http://chargepoints.dft.gov.uk/api/retrieve/registry/format/json The following error returns: http://chargepoints.dft.gov.uk/api/retrieve/registry/format/json is not a valid or recognized data source I've tried following the instructions in another similar post without success: How to display geoJSON from an URL in a layer. Any help much appreciated.


Why do we use the terms “longitude” and “latitude” for a spherical body?

To specify a geographic coordinate we use the terms “longitude” and “latitude”. Far as I know, these terms derive from the Latin latitudo (= breadth) and longitudo (= length). In German we use the terms “Breite” (=english “breadth”) and “Länge“ (= english “length”). The earth is a sphere. Why do we use “breadth” and “length” here? The earth has the same breadth and length in all directions. We may also use the terms “longitude” and “latitude” just the opposite. ![enter image description here](http://i.stack.imgur.com/u0bhk.jpg)


Error creating Geoserver App-schema Store with Postgres: "AttributeTypeImpl cannot be cast to ComplexType"

I have this postgis table el_str( classid varying(70), meta_ist_data_cre date, meta_ist_data_mod date, meta_ist_ent_for character varying(100), meta_ist_livello numeric(15,0),meta_ist_origine character varying(80), meta_ist_scala character varying(80), meta_ist_tipo_mod character varying(80),el_str_tra geometry) I have created the datastore.xml file and mapping file el_str.xml and this is a simple mapping:               <targetTypes>         <FeatureType>             <schemaUri>newxsd.xsd</schemaUri>         </FeatureType>     </targetTypes>     <typeMappings>         <FeatureTypeMapping>             <sourceDataStore>datastore</sourceDataStore>             <sourceType>el_str</sourceType>             <targetElement>IT:EL_STR</targetElement>             <attributeMappings>         <AttributeMapping>                     <targetAttribute>IT:EL_STR</targetAttribute>                     <idExpression>                         <OCQL>getId()</OCQL>                     </idExpression>                 </AttributeMapping>             </attributeMappings>         </FeatureTypeMapping>     </typeMappings>      The xsd file (newxsd.xsd) its:               <?xml version="1.0" encoding="UTF-8"?>     <schema elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0"    targetNamespace="http://webgisproject.no-ip.org" xml:lang="it" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink">          <import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>               <element name="EL_STR" type="IT:EL_STRType" substitutionGroup="gml:_Feature"/>          <complexType name="EL_STRType">         <complexContent>             <extension base="gml:AbstractFeatureType">                 <sequence>                     <element name="UUID" minOccurs="1" maxOccurs="1" />                     <element name="EL_STR_TRA" type="gml:CurvePropertyType" minOccurs="1" maxOccurs="2" />                     <element name="META_IST_DATA_CRE" minOccurs="1" maxOccurs="1"/>                     <element name="META_IST_DATA_MOD" minOccurs="1" maxOccurs="1"/>                     <element name="META_IST_ENT_FOR" minOccurs="1" maxOccurs="1"/>                     <element name="META_IST_LIVELLO" minOccurs="1" maxOccurs="1"/>                      </sequence>             </extension>         </complexContent>     </complexType>          </schema>      When I enable IT_el_str store I have this error: > Original exception error: > > org.geotools.feature.type.AttributeTypeImpl cannot be cast to > org.opengis.feature.type.ComplexType In catalina.out there are this warnings/errors:               WARN [data.complex] - IT:EL_STRType has no super type     WARN [data.store] - Error obtaining datatore with modified values     java.io.IOException     ...     ...     Caused by: org.geotools.feature.type.AttributeTypeImpl cannot be cast to org.opengis.feature.type.ComplexType      Do you have any idea?? Thanks


Big ImageMosaic is not showing in Geoserver?

I create imagemosaic with many big pictures, but in geoexplorer or geowebcache this layer is not display. If i create imagemosaic with 3(for example) pictures(from big imagemosaic) then layer display, why?


Linking two Models together in ModelBuilder

I am trying to link two separate models that iterate thought two different feature classes together into one, however I am having a small issue. When I bring in the sub-model into the larger one it it able to iterate thought the feature classes however, it then sends the last feature iteration class to the outer model. The way I am linking the two models together is by opening in edit mode the large model and then drag in the sub-model while having the last output of the sub-model as a model parameter so that I can use it as input into my larger model. I think the reason this may not be working properly is because I am not using the collect values tool that is available in the sub-model.However if I do that it changes everything into values and I am not able to link the output of the sub-model into my larger model. I have read the ESRI help guide on running a model within a model and the ESRI forums and none of them seen to do the trick. Below I have provided the two models: ![Sub- model](http://i.stack.imgur.com/qaKKu.png) Large Model Image I would greatly appreciate any help/suggestions. Thank You!!


Geoserver, WMS-T and time ranges

I got a case where WMS-T is desired, preferably using GeoServer. The input data contains two date fields with start and end date, which describes a timespan. However, in Geoserver it seems that one can only specify one time field for dimensions. Is there a way to get around this ? I am thinking that one possible scenario would be to use PostGis for serving data, and create a view/PL-pgSQL that does some of the logic. Any suggestions are appreciated.


How to fix missing ippj-5.3.dll error in QGIS?

I try to install OSGeo4W but when I tried to run it appeared an error message about ippj-5.3.dll is missing... does anyone know what happen?


What is the most appropriate journal for publishing a paper about data collection with QGIS and mobile equipment?

I am a QGIS user, and a few months ago, we used QGIS on a PC Tablet to collect data on nesting birds on a cliff directly on the field. The principle is to have QGIS installed on a PC-Tablet with an SQL database, and with easy way to write data. We are still work on it, and to share this example and cite this work, we would like to write a manuscript, but we don't know in which journal. Does someone have advice as to which journal we could submit this kind of work?


How to display transparent overlapping polygons in ArcGIS?

I'm trying to draw home range maps in ArcGIS 10.1 and am having difficulty displaying them as I would like. The home ranges are in the form of polygons and many of them overlap. I'm trying to get a display setting that allows all polygons to be displayed at once, particularly where they overlap. Essentially what I'm trying to do is display the polygons in the same way that the standard primary colour illustration appears, with three overlapping circles of different colours. The important part here is that where the polygons overlap they will combine to make a new colour, thus clearly demonstrating the overlapping area. Another way this is often done is to display each polygon with a unique crosshatching. For instance polygon 1 could have a left-facing diagonal hash, while polygon 2 could have a right-facing diagonal hash. Where they overlap, a cross-hatch pattern would be observed. Transparency works in relation to other layers in the map, but unfortunately it doesn't seem to work in terms of each polygon within the layer. Same goes for defining the symbology level (essentially they all need to be on the same level). I've seen this done with many other maps of animal home ranges or other overlapping zones, so I'm assuming there's got to be a way of doing this. Any help would be appreciated!


How can I export data from a feature layer in ArcGis Server?

I'm using a public ArcGis server with some data I would like to export to shape or some other format. I know I can make a program (I'm a developer) that could query the server for all the features on that layer, but I would like something cleaner. Is there a easy way to export data from a feature layer in ArcGis Server to Shapefile using ArcMap or via web?


When I run qgis 1.8.0 on Linux and load a WMS layer from a remote server I get messages (in terminal) saying Warning: QNetworkDiskCache::prepare() unable to open temporary file Downloading tiles from the WMS server was quite slow. So I wondered if having a tile cache would help. Is there some configuration variable I can set so that the QNetworkDiskCache can open a temporary file? e.g. by specifying a location for temporary files? Or can this warning safely be ignored? Thanks, David


ogr2ogr / GDAL remove features in FileGDB while in use by ArcGIS Server map service

I'm using ogr2ogr to pull features out of Oracle and put them into a File GeoDatabase. The FGDB is being used by an active ArcGIS Server map service. This is all done for performance / reducing DB load. The DB data is refreshed nightly and then the ogr2ogr process runs so I don't worry about stale FGDB records. The data can both grow and shrink overnight during the update so I need my FGDB refresh to both remove and add features. I know this is possible if I use ogr2ogr's `-overwrite` option, e.g.               ogr2ogr --config FGDB_BULK_LOAD YES -f "FileGDB" <path to>.gdb OCI:user/pass@SID -overwrite -nlt LINESTRING -a_srs EPSG:4326 -nln layer_name -sql "select * from src_table"      But `-overwrite` fails if I don't first stop the ArcGIS Server map service. I can use `-update -append` to update FGDB records while the service is running but this is 'additive' - records are added but nothing is removed.               ogr2ogr --config FGDB_BULK_LOAD YES -f "FileGDB" <path to>.gdb OCI:user/pass@SID -update -append -nlt POINT -a_srs EPSG:4326 -nln layer_name -sql "select * from src_table"      I'm looking for a way to either   1. Truncate the FGDB layer without removing it prior to an `-update -append` or   2. Change my ogr2ogr command to remove features not pulled from Oracle I also saw ~~this post~~ this page on programmatically stopping / starting AGS map services but option 1 or 2 is my preference as I want an approach that doesn't require authentication / tokens over HTTP. If necessary I can bring in Python and perhaps the arcpy module. Any input on GDAL / ogr2ogr parameters I haven't seen yet that might help would be much appreciated (or alternative approaches of course).


ASTER GDEM v2 coastline generation?

I try to generate world coastline 1:30000 from ASTER's DEM with: gdal_contour -a ELEVATION -fl 0 But above produce some of missing coastlines. Whats happening? Is it cliffy shore? How would you generate coastline? Note: If I use 0.5 it will show all but I'm afraid it'd be inaccurate. Furthermore how to cleanup "tails" using v.clean? I found ASTER mirror (mediafire) here: http://sasgis.ru/forum/viewtopic.php?f=21&t=1848&start=360


What is the Typical Workflow from QGIS to Publishing Programs?

I have been playing with using Inkscape to combine my CAD title block and the map project created in QGIS. I was curious to understand what a typical workflow might be to Inkscape or another post processing programs. For instance, do you export each layer separately from QGIS or collectively? Let me know any input you may think is valuable.


Polygonize vegetation area from Landsat7 RGB using QGis / Bilko?

I'm trying to extract the areas with vegetation as a polygon-shape from a landsat7-image, 30m resolution, RGB, using QGis 1.8 or Bilko or (hopefully in the near future) ArcGIS. The area is in Northern Peru, dry season, so basically I want to extract all the shades of green. I have never really worked with raster data and don't know what to do. I have found out there are "vegetation indices" which can be calculated, and have found Bilko as a software I could do this with. However, if I got it right I need more bands than RGB to do this - is this true? I'm not sure. On this website I have also found threads on how to calculate vegetation area in QGis - using GDAL tools or SEXTANTE: calculate area of vegetations in a raster file However I would like to not only calculate but extract the data as a polygon. What would be the best way to do this? I've never worked with Bilko, GDAL or SEXTANTE, of course I will go into that and try to learn, but I would like to know what will work before I spend hours and hours only to find out I can't do it... P.S.: I will probably have ARCGis in a while, so if it is much easier with ARCGis I might wait for that...


Multiple labels for 1 point

I have map points for schools in a district. I want to label the map ID and the name of the school on the map. I have the map ID labeled within the point symbol but I want the school name outside of that. Is this possible without manually putting in a text box for the school name? Using ArcMap 10


How do I convert the LST values on the MODIS LST Image to degree celsius

I have downloaded MODIS 8 day average LST images, but the values are way too high. How do I convert the pixel values to degree celsius? Someone said they multiplied the data with 0,02 and then subtracted 273 to get them as Celsius. is that the correct method?


How to get partial polyline from stream trace?

I am creating SOE to do stream trace. That works fine. The geometric network only have NHD flowline. The problem is that tracing result return whole flow line. I am wondering if the result only return partial flowline stating from the input point(s) and stop at the ending point or end of flowline.


How do I figure out if there are clusters of one set of points around another set of points from a different layer?

I want to see if there is clustering of a certain type of buildings (x) around another type of buildings (y). The two point files are in different layers. I cannot figure out which tool I would use to do this.


gdal_grid problem reading vrt file

I am trying to parse csv file and visualize it as geotiff using gdal_grid but I keep getting this error:               C:\work\testgdal1>gdal_grid -ot Float32 -l test  test.vrt dona.tif     ERROR 1: Failed to open datasource `test.csv'.     Unable to open input datasource "test.vrt".       Failed to open datasource `test.csv'.      Both test.csv and test.vrt are in the same folder. What can possibly go wrong and how to fix it? Environment:               Windows 7 x64     osgeo4w as of 2 May 2011      test.vrt               <OGRVRTDataSource>         <OGRVRTLayer name="test">         <SrcDataSource>test.csv</SrcDataSource>                 <SrcLayer>test</SrcLayer>         <LayerSRS>WGS84</LayerSRS>         <GeometryField encoding="PointFromColumns" x="field_10" y="field_9" z="field_20"/>         <GeometryType>wkbPoint</GeometryType>     </OGRVRTLayer>      2 lines of test.csv               200010  207  020311    40658.5  406593 52 344927.31 7100203.50  -26.2078720  127.4491855 345060.64 7100369.14   26.4  650.3  628.0 55471.293    20.168 55648.817 55637.523  -146.062     200010  207  020311    40658.6  406594 52 344932.31 7100203.50  -26.2078726  127.4492355 345065.64 7100369.14   27.2  650.3  627.2 55456.719    20.172 55648.814 55637.520  -160.629


GDAL-GRASS building fails

When I run `./configure --with-grass=/usr/local/grass-6.5.svn/` I get the following errors:               ..........     checking for gdal-config... /usr/bin/gdal-config     using /usr/lib/gdalplugins as GDAL shared library autoload directory     checking for G_asprintf in -lgrass_gis... no     configure: error: --with-grass=/usr/local/grass-6.5.svn/ requested, but libraries not found!  Perhaps you need to set LD_LIBRARY_PATH to include /usr/local/grass-6.5.svn//lib?      Also if I use `\--with-grass=/usr/local/grass-6.5.svn`, I get the following error:               checking for gdal-config... /usr/bin/gdal-config     using /usr/lib/gdalplugins as GDAL shared library autoload directory     checking for G_asprintf in -lgrass_gis... no     configure: error: --with-grass=/usr/local/grass-6.5.svn requested, but libraries not found!  Perhaps you need to set LD_LIBRARY_PATH to include /usr/local/grass-6.5.svn/lib?      I have created a **grass.conf** as instructed elsewhere inside /etc/ld.so.conf.d/ and have added following lines in it:               /usr/local/lib     /usr/local/grass-6.5.svn/lib      I ran `sudo ldconfig` after that too. I came across a similar issue posted in the GRASS-Dev mailing list. As an answer it was instructed to: You could just generate the symlinks yourself, e.g.:                   cd /usr/local/grass-6.5.svn/lib         for file in libgrass_*.so ; do ln -s $file ${file%.6.5.svn.so}.so ; done html.       I ran,               cd /usr/local/grass-6.5.svn/lib     ln -s $file ${file%.6.5.svn.so}.so      It made no difference to the errors. Did I make any mistake? What do I need to do?


C# & Mapscript - Setting Environment Variables At Runtime

I am working on an application that makes use of the c# Mapscript bindings. When I manually set and/or append to the GDAL_DATA, GDAL_DRIVER_PATH, PROJ_LIB, and PATH environment variables - the application code works beautifully. For a number of reasons, I am trying to avoid permanently setting/changing these environment variables. I am under the impression that by using the .NET frameworks Environment.SetEnvironmentVariable method, that I should be able to set these environment variables at runtime for the current process. This approach seems to work in some capacity - as the mapscript objects initialize properly (i.e., I dont get PInvoke errors...etc). In my code snippet below, I get an error at map.draw() complaining about GDAL_DATA and gcs.csv.               // add some new environment vars     // TODO check if they may already exist - in which case append to     Environment.SetEnvironmentVariable("GDAL_DATA",MY_GDAL_DATA_PATH)     Environment.SetEnvironmentVariable("GDAL_DRIVER_PATH",MY_GDAL_DRIVER_PATH)     Environment.SetEnvironmentVariable("PROJ_LIB",MY_PROJ_LIB_PATH)          // append to existing PATH variable     string pathVariable = Environment.GetEnvironmentVariable("PATH")     pathVariable += MY_PATH_VARS     Environment.SetEnvironmentVariable("PATH",MY_PATH_VARS)          mapObj map = new mapObj(transmitterMapFile);     map.setSize(request.Width, request.Height);     map.setExtent(extent[0], extent[1], extent[2], extent[3]);          imageObj img = map.draw();      Does anyone see something wrong with this approach? Or is there a better way to set these variables at runtime?


Data request to GeoServer: "Could not determine geoserver request from http request GET /geoserver/ows?service=WFS HTTP/1.1"

I am using ExtJS ajax to send a data request to geoserver (which is in another domain different from web server), codes are as follows:               Ext.Ajax.request({ //send data request             url : '../proxy.py?url=' + dataUrl,             method : 'GET',             headers: {                 'Content-Type': 'application/json'             },             success : function(response, opts) {                 var eventData = Ext.decode(response.responseText); //decode into JSON                      //parse eventData             },             failure: function(response, opts){                 Ext.Msg.alert("Failure", "Failed to retrieve event, please check service connection at " + dataUrl);                                                 }         });      since it relates to cross-domain issue, we employed a python proxy at web server, and put the GeoServer domain into the accessible list. If I put the request url in browser then I can get the JSON response; however by using ajax call in code, we got following error:                   <ows:Exception exceptionCode="MissingParameterValue" locator="request">      <ows:ExceptionText>Could not determine geoserver request from http request GET /geoserver/ows?service=WFS HTTP/1.1          Accept-Encoding: identity
          Host: XXXX
          Connection: close
          User-Agent: Python-urllib/2.5

          </ows:ExceptionText> </ows:Exception>      I searched online, somebody said it's an issue related with proxy and the request headers. however, no detailed solution is found yet. I hope someone here can help me out. thanks a lot! **UPDATE:** using escape() to escape the request URL!


How do I get the coordinates of a click on vector feature/layer in OpenLayers?

I need to get the coordinate of the click when the user clicks on a vector feature on the OpenLayers map. The SelectControl only gives the feature that was clicked and not the coordinates of the click. Anyway to get at the coordinates of the click on a vector? I need to show AnchoredBubble at the point of the user click.


Need to programmatically create Barriers in my Network Dataset

I have the following C# code to create a Network Dataset layer that I can bring into ArcMap. However, even though I am able to create a Route from the ND, I am not able to create Barriers of any kind using this ND (even when using the editing t. What attributes do I set, or what should I do to the code that will allow for a Barrier layer in the Route layer that gets created when I click on "Network Analyst" and "New Route"?                   public ILayer CreateNDLayer(string sFeatureWSname, string sShapefileName)         {                  // Create an empty data element for a buildable network dataset.             IDENetworkDataset2 deND = new DENetworkDatasetClass();             deND.Buildable = true;                  // Open the shapefile feature class             IWorkspaceFactory workspaceFactory = new ShapefileWorkspaceFactoryClass();             IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspaceFactory.OpenFromFile(sFeatureWSname, 0);             IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(sShapefileName + ".shp");             IGeoDataset geoDataset = (IGeoDataset)featureClass;                  // Copy the feature dataset's extent and spatial reference to the network dataset data element.             IDEGeoDataset deGeoDataset = (IDEGeoDataset)deND;             deGeoDataset.Extent = geoDataset.Extent;             deGeoDataset.SpatialReference = geoDataset.SpatialReference;                  // Specify the name of the network dataset.             IDataElement dataElement = (IDataElement)deND;             dataElement.Name = sShapefileName + "_ND";                  // Create an EdgeFeatureSource object and point it to the feature class.             INetworkSource edgeNetworkSource = new EdgeFeatureSourceClass();             edgeNetworkSource.Name = sShapefileName;             edgeNetworkSource.ElementType = esriNetworkElementType.esriNETEdge;                  // Specify the network dataset's elevation model.             deND.ElevationModel = esriNetworkElevationModel.esriNEMNone;                  // Set the edge feature source's connectivity settings.             IEdgeFeatureSource edgeFeatureSource = (IEdgeFeatureSource)edgeNetworkSource;             edgeFeatureSource.UsesSubtypes = false;             edgeFeatureSource.ClassConnectivityGroup = 1;             edgeFeatureSource.ClassConnectivityPolicy = esriNetworkEdgeConnectivityPolicy.esriNECPAnyVertex;                  // Create a StreetNameFields object and populate its settings.             IStreetNameFields streetNameFields = new StreetNameFieldsClass();             streetNameFields.Priority = 1;             streetNameFields.StreetNameFieldName = "nam";                  // Add the StreetNameFields object to a new NetworkSourceDirections object,             // then add it to the EdgeFeatureSource created earlier.             INetworkSourceDirections nsDirections = new NetworkSourceDirectionsClass();             IArray nsdArray = new ArrayClass();             nsdArray.Add(streetNameFields);             nsDirections.StreetNameFields = nsdArray;             edgeNetworkSource.NetworkSourceDirections = nsDirections;                  deND.SupportsTurns = true;                  IArray sourceArray = new ArrayClass();             sourceArray.Add(edgeNetworkSource);             deND.Sources = sourceArray;                  // Create a new EvaluatedNetworkAttribute object and populate its settings.             IEvaluatedNetworkAttribute2 lengthEvaluatedNetworkAttribute = new EvaluatedNetworkAttributeClass();             INetworkAttribute2 lengthNetworkAttributes2 = (INetworkAttribute2)lengthEvaluatedNetworkAttribute;             lengthNetworkAttributes2.Name = "Length";             lengthNetworkAttributes2.UsageType = esriNetworkAttributeUsageType.esriNAUTCost;             lengthNetworkAttributes2.DataType = esriNetworkAttributeDataType.esriNADTDouble;             lengthNetworkAttributes2.Units = esriNetworkAttributeUnits.esriNAUDecimalDegrees;             lengthNetworkAttributes2.UseByDefault = true;                  // Create evaluator objects and set them on the EvaluatedNetworkAttribute object.             INetworkFieldEvaluator lengthNetworkFieldEvaluator = new NetworkFieldEvaluatorClass();             lengthNetworkFieldEvaluator.SetExpression("[SHAPE]", "");             INetworkEvaluator ddNetworkEvaluator = (INetworkEvaluator)lengthNetworkFieldEvaluator;             lengthEvaluatedNetworkAttribute.set_Evaluator(edgeNetworkSource, esriNetworkEdgeDirection.esriNEDAlongDigitized, ddNetworkEvaluator);             lengthEvaluatedNetworkAttribute.set_Evaluator(edgeNetworkSource, esriNetworkEdgeDirection.esriNEDAgainstDigitized, ddNetworkEvaluator);                  INetworkConstantEvaluator lengthNetworkConstantEvaluator = new NetworkConstantEvaluatorClass();             lengthNetworkConstantEvaluator.ConstantValue = 0;             INetworkEvaluator lengthConstantNetworkEvaluator = (INetworkEvaluator)lengthNetworkConstantEvaluator;             lengthEvaluatedNetworkAttribute.set_DefaultEvaluator               (esriNetworkElementType.esriNETEdge, lengthConstantNetworkEvaluator);             lengthEvaluatedNetworkAttribute.set_DefaultEvaluator               (esriNetworkElementType.esriNETJunction, lengthConstantNetworkEvaluator);             lengthEvaluatedNetworkAttribute.set_DefaultEvaluator               (esriNetworkElementType.esriNETTurn, lengthConstantNetworkEvaluator);                    //array for the network attributes will be created, then each attribute will be created and added to the array             IArray attributeArray = new ArrayClass();             attributeArray.Add(lengthEvaluatedNetworkAttribute);             deND.Attributes = attributeArray;                  // Create a new UID that references the NetworkDatasetWorkspaceExtension.             UID ndWorkspaceExtensionUID = new UIDClass();             ndWorkspaceExtensionUID.Value =               "esriGeoDatabase.NetworkDatasetWorkspaceExtension";                  // Get the workspace extension and create the network dataset based on the data element.             IWorkspaceExtensionManager workspaceExtensionManager =               (IWorkspaceExtensionManager)featureWorkspace;             IWorkspaceExtension workspaceExtension =               workspaceExtensionManager.FindExtension(ndWorkspaceExtensionUID);             IDatasetContainer2 datasetContainer2 = (IDatasetContainer2)workspaceExtension;             IDEDataset deDataset = (IDEDataset)deND;             INetworkDataset networkDataset = (INetworkDataset)datasetContainer2.CreateDataset(deDataset);                  // Once the network dataset is created, build it.             INetworkBuild networkBuild = (INetworkBuild)networkDataset;             networkBuild.BuildNetwork(geoDataset.Extent);                  //Create the Network Layer             INetworkLayer networkLayer = new NetworkLayerClass();             networkLayer.NetworkDataset = networkDataset;                  IFeatureClass fClass = featureWorkspace.OpenFeatureClass(sShapefileName + "_ND_Junctions.shp");             IFeatureLayer junctionsLyr = new FeatureLayer();             junctionsLyr.FeatureClass = fClass;             junctionsLyr.Name = sShapefileName + "_ND_Junctions";                  //Return the ND layer             ILayer pNetworkLayer = (ILayer)networkLayer;             pNetworkLayer.Name = sShapefileName + "_NDlayer";             return pNetworkLayer;              }


How to show Grid at Data view?

I need to use Grid of local cooridante system at data view in order to improve georeferencing process of old map. how to make it visible, without convert it to graphics ?


How do you remove a custom extension?

For example: you run the DesktopExtensionCS2010 sample that comes with the SDK, having it open arcCat at startup. Now whenever I open ArcCat the extensions are there. I can uncheck them but I want to get rid of them (without hacking the registry).


QgsFeatureRequest and QgsVectorLayer are missing in the QGIS

I am trying to use part of my friend's code in eclipse written in Python using QGIS APIs. I have installed the QGIS 2.2.0. now before running the code, it seems that something is missing here. All QgsFeatureRequest, QgsVectorLayer and QgsApplication are underlined as undefined variables. the run-time error is also:               QPixmap: Must construct a QApplication before a QPaintDevice      I have checked my QGIS does not have any feature with aforementioned names, but QGIS-master has some SIP, CPP and .h files with those name but I have no idea why i don't have them. I used both OSGeo4W and standalone QGIS installer for installing, but none of them has such things. I tried QGIS-master but I could not install it and was a bit complicated for me. here is the initialization of my code:               if __name__ == '__main__':         qgisprefix = 'C:\Program Files (x86)\QGIS Valmiera\apps\qgis'         QgsApplication.setPrefixPath(qgisprefix, True)         # initalise QGIS         QgsApplication.initQgis()         app = QgsApplication([], True)         main()


How to ensure uniform colour for DEMs?

This is a silly question, but one I've been trying to figure out for a while. I have two Aster DEM tiles, one next to the other. How do I ensure uniform colour for both? ![how do I ensure uniform colour for adjacent DEM tiles?](http://i.stack.imgur.com/9HuuS.jpg)