How to route on OSM without using any already released routing engine?

i'm a computer science student and a complete beginner in GIS and stuff. i'm trying create **my own web-based multi-modal journey planner** as my thesis. And as it is a thesis i cant use any ready-made routing engines like graphserver or opentripplanner, etc. though i can use third party applications for data convertions, like map data into sql or KML, etc. i've done some research and this what i've learned so far.   1. that i can download map data from Open Street Maps (OSM) and convert them into sql like SQLlite or postreSQL for querying. (in RTree index structures)   2. that i can also convert GTFS data into sql, again for querying.   3. that i can link those two data sets through stops (those loading & unloading stations for each mode of transit).   4. that i should convert those two data sets into a graph then link them in order to perform multi-modal routing. (i don't know if there are other solutions)   5. that i can convert the resulting route into KML so i can overlay/display them on GOOGLE MAPS or other api's, for presentation. (forgot where i read this, but i know i read about this somewhere) My question is how can i convert an osm database into a graph data .. how can i perform routing on those graph data .. this is where i got lost, i still dont know how can i perform routing algorithms from those given data sets as input/source. i tried reading the source code of graphserver, but it did no good to me.. besides it needs to be in linux system to work, and i'm currently working on windows .. i have few understanding on java .. but if i have to, i can learn it. if it what it takes so i can grasp the steps in performing routing. (as i see .. most of the routing engine are written in java)


ArcGIS GeoRSS widget source code not recognizing com.esri.ags.portal package import

For some reason while attempting to import the com.esri.ags.portal.*, despite having the library imported in flex builder, it keeps on giving the error "import cannot be found." The strange thing is every other required import from the sample widget is not giving the same error. I tried multiple flex versions and refreshed and rebuilt, but it still has that issue.


Binding to ArcGIS for server

I am building a stand alone .NET applications using ArcObjects. I want to run it on the server, where I have ArcGIS for Server. I am trying to bind the license at runtime to the ArcGIS server runtime. But the application giving an error message "Invalid ArcGIS Runtime Binding" I am using this command RuntimeManager.Bind(ProductCode.Server) I don't want to install the engine there or have a license for the engine, because the application run at night when there is no activity , so I want to use the server license Is that possible?


How to get DXF to show up in the right spot?

I just followed the advice of this forum post in order to export the vector layers of a PDF for usage in ArcMap. The map vector layers in the PDF were spatially referenced. I was able to export the layers as a DXF using Inkscape and open the layers in ArcMap. I then went to the properties of the DXF in catalog and set the proper projection. However, when I brought the DXF into the map document, it was not showing up in the right location. It appears the the spatial information was somehow removed in the process of exporting into a DXF. Does anyone know of a solution to my situation? Thanks!


QGIS Holux gpx file doesn´t show up

I´ve got a problem with displaying the imported gpx file. The gpx file is created in Holux Funtrek 130 PRo. The map I use is from Openstreetmap, I am sure it is the right map from the location I recorded the gpx file. Everything works fine...except the gpx file doesn´t show up. The layer icon is ticked in the layer(s) box. WGS 1984 is set up, both on my gps device and in QGIS. I study geoinformatics, and am really interested in how these things work..but nothing like this has been taught yet..we´ve learnt only adding scalebar and all these elementary tasks. I´d be glad if there was anyone who could answer this question. Thank you.


Examples of Creative Cartography

I am looking for some examples of creative cartographic output. I am planning for something like a mixture of cartography, graphic design and spatial information. The output will be initially in hardcopy, maybe poster size maps. These maps are reuired to be very unconvetional, uncommon but appleanig. I am not bothered about map scale, projection or other technical details, since my target audience will be mostly laymen in mapping. This could be considered as an idea of InfoGraphics, with a spatial sauce! For example what I have in my mind is   1. A map for "Around the World in Eighty Days" by Jules Verne. This will be a poster size map, with world boundary and trip route alongwith some images/ photographs/ descriptions at major breaks.    2. Another could be the use of beautifull and informativs symbols in pollution maps (Elements of cartography, H. Robinson), where all the indicators are shown as a combination of parts of human face. eg. size of ear for sound pollution, color of mose for air pollution(from red to yellow), the curve of mouth for water pollution and etc.   3. Or even a map of Europe made out of clothes. You can see it here. I am not looking for webmaps or historical maps or maps of very specialized theme that requires special understanding of maps. Thanks.


Problem converting georeferenced jpgs to geotiff - image is shifted/warped

I have hundreds of georeferenced jpgs in ArcGIS 10 that I need to convert to geotiffs. I'm trying to use GDAL translate to create geotiffs from them. Everything works great except that the resultant geotiff is slightly shifted/warped (see image 1 and note that the road locations are shifted on the right panel.) Can anyone suggest how to convert georeferenced jpgs to geotiffs without this shift/warp? My GDAL command to create this geotiff was:               gdal_translate -of GTiff input_file.jpg output file.tif      Gdaltranslate indicates exactly the same coordinate system and bounding coordinates between the jpg and the geotiff (image 2). I'm not sure what is wrong. Thank you for your help! (Images are provided as dropbox links because I don't have enough reputation points to post images here.)


Conflicts while installing postgresql9.3-postgis2.1,QGIS and gdal-bin

I want to use postgresql9.3-postgis2.1 and gdal-bin parallel . I have refer instruction here for installing postgresql-9.3 on ubuntu 12.04. I have install qgis from here While installing gdal-bin it will remove postgis. As I explore I found similar question which says **_ubuntugis-unstable repository and postgresql repository will not work together_**. ![enter image description here](http://i.stack.imgur.com/UrIJM.png) Then how can install postgresql9.3-postgis2.1 and gdal-bin parallel. Can someone help to solve the problem , Any suggestion will be great help for me. Thanks


GeoExt WMS GetFeatureInfo in proxy server. Problem - popup is empty in chrome and not responding in firefox?

* I have python2.7 and apache installed in my computer.   * In proxy.cgi, I included in topline : > #!/usr/bin/env python.exe -u; >   * I also added 'localhost:8080/geoserver' and 'localhost:80 in > allowedhosts. >   * I moved the OpenLayers files to htdocs folder of apache. >   * I copied the cgi file to apche/cgi-bin. >   * Now, when I click on feature, popup appears but is empty. > Please help!! where my code went wrong? Given below is my code:                   <script type="text/javascript" src="http://localhost:8080/recipes/resources/ext/ext-all.js"></script>         <link rel="stylesheet" type="text/css" href="http://localhost:8080/recipes/resources/ext/resources/css/ext-all.css" />         <link rel="stylesheet" type="text/css" href="http://localhost:8080/recipes/resources/ext/resources/css/xtheme-gray.css" />         <link rel="stylesheet" href="http://localhost:8080/recipes/resources/openlayers/theme/default/style.css" type="text/css" />         <link rel="stylesheet" href="http://localhost:8080/recipes/resources/app/theme/style.css" type="text/css" />         <link rel="stylesheet" href="http://localhost:8080/recipes/resources/geoext/resources/css/gxtheme-gray.css" type="text/css" />         <script src="http://localhost:8080/recipes/resources/openlayers/build/OpenLayers.js"></script>         <script src="http://localhost:8080/recipes/resources/geoext/build/GeoExt.js"></script>         <script>             OpenLayers.ImgPath = "http://localhost:8080/recipes/resources/openlayers/img/";                  // the `panel` and `popup` variables are declared here for easy debugging             var panel, popup;                  Ext.onReady(function() {             OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";                     // queryable WMS layer                 var zoning = new OpenLayers.Layer.WMS(                     "railroads",                     "http://localhost:8080/geoserver/usa/wms",                     {layers: "usa:states", format: "image/gif", transparent: "true"}                 );                      panel = new GeoExt.MapPanel({                     title: "MapPanel",                     renderTo: "map-id",                     height: 300,                     width: "100%",                     layers: [                         new OpenLayers.Layer.WMS(                             "Global Imagery",                             "http://maps.opengeo.org/geowebcache/service/wms",                             {layers: "openstreetmap", format: "image/png"}                         ),                          zoning                     ],                     center: [-122.87, 42.34],                     zoom: 13                 });                      // create a control to get feature info from queryable layers                 var control = new OpenLayers.Control.WMSGetFeatureInfo({                     url: "http://localhost:8080/geoserver/usa/wms"                     title: 'Identify features by clicking',                     layers: [zoning],                 });                 panel.map.addControl(control);                 control.activate();                      // register a listener for the getfeatureinfo event on the control                 control.events.on({                     getfeatureinfo: function(event) {                         // close existing popup                         if (popup) {                             popup.destroy();                         }                         popup = new GeoExt.Popup({                             title: "Popup",                             map: panel.map,                             lonlat: panel.map.getLonLatFromPixel(event.xy),                             width: 250,                             autoScroll: true,                             collapsible: true,                             bodyStyle: {padding: 5},                             html: event.text                         });                         popup.show();                     }                 });                  });              </script>      ![enter image description here](http://i.stack.imgur.com/0FNv0.png) After changing the path to wamp/www and still I am getting this new following error: ![enter image description here](http://i.stack.imgur.com/Iayau.png)


QGIS fTools very slow adding random points?

I am currently on windows 8.1 qgis 2.2 and almost everything I am trying to do using ftools is too slow. For example: using divaGIS world countries layer (.shp) when I try adding 500 random points it takes about 15 minutes. Is it supposed to be that slow or is there anything I can do to improve that?


Professional Indemnity Insurance for freelance GIS

I am about to go freelance and I know there are a few freelancers on the forum so I'd welcome recommendations/experiences relating to Professional Indemnity Insurance. Are there companies (brokers or providers) that specifically cater for GIS and would you recommend them? I am based in the UK - so, while all replies are welcome, I am particularly looking for responses from UK freelancers. _Following Mapperz comments, to be clear:_ This question is about insurance for GIS professionals and NOT GIS for insurance analysis. I am looking for information on companies who **PROVIDE** professional indemnity insurance to freelancers rather than work opportunities. I am also interested in knowing the sort of level of cover people have and whether the level of cover has ever been an issue when tendering for work. Thanks.


Why does only one of three elevation rasters display correctly?

I downloaded a selected sub-set of the USGS National Elevation Data (NED) using their online GUI. This download came in the form of three files. The names of the files are 61471006, 61471006_2, and 61471006_3. To load the rasters, I have found I go into these files and load the file of type ".adf". (Is this not true?) It works just fine for one file at a time. When I load all three in turn, the QGIS layers list shows three little raster icons with tiny "previews" of the area covered; the name of each one happens to be identical to the other two (w001001). They always load "flat" -- that is, one gray-scale tone. So I use the **Properties dialog to stretch to MinMax**. When I do, **only one of the three will change** and show the range of shadings indicative of elevation range. **The other two turn black**. How can I get all three to show the MinMax range? Thank you.


In TileMill/CartoCSS how do show several markers for the same point?

I'm creating a custom map using TileMill to show local walks. I want to show Points Of Interest along the path. I've exported the points from Google Maps using KML and I want to show an icon on a background for each. I have a pin icon and the icon for each location but I can't work out how to display one on top of the other. I've looked into using a point and a marker but point doesn't allow color styling and I would like to color the background pin as well as the icon.


How do I use Proj4Leaflet projections correctly?

I'm loading data layers from a WMS server into a Leaflet map, and I need to give the user a choice of projections. For the WMS server requests, I just need to change the CRS parameter to a different string (the server definitely supports the projection I am using). However, when trying to change the projection of the Leaflet `map` object (by change, I mean remove and then re- initialise with the new projection), the map does not seem to update correctly, leaving the zoom levels and location completely out of sync with the WMS layers. I'm using Proj4Leaflet, and I'm focussing on the EPSG:27700 (British National Grid) projection right now. The code I'm currently using is:               context.EPSG27700 = new L.Proj.CRS( 'EPSG:27700',             '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000' +              '+ellps=airy +datum=OSGB36 +units=m +no_defs',             {             resolutions: [2800, 1400, 700, 350, 175, 84, 42, 21, 11.2, 5.6, 2.8, 1.4, 0.7, 0.35, 0.14, 0.07],             });      When I set `EPSG27700` as the CRS property of the map, I have to zoom far out to see the WMS layer and the origin moves away from the coordinates I set using the Leaflet `setView` method. How do I go about using custom projections like these, and does anyone know of some working examples for this particular projection?


How to make multivalue input script run from a toolbox?

I have a working python script:               import arcpy          sdeconnection = arcpy.GetParameterAsText(0)     layerfiles = arcpy.GetParameterAsText(1).split(";")          for layerfile in layerfiles:         print layerfile         lyr = arcpy.mapping.Layer(layerfile)         lyr.replaceDataSource(sdeconnection, "SDE_WORKSPACE", lyr.datasetName, False)         lyr.save()         del lyr      I can run it from the command line with multiple layer files as input (separated by ";"). However I cannot make it work when I the script to add to a toolbox. The script runs as expected if I set "multivalue" to false for the layerfiles parameter. ![parameters settings](http://i.stack.imgur.com/OTwiT.png) However when I set "multivalue" to true I get the error:               Start Time: Thu May 16 10:13:47 2013     Running script changeLyrWorkspace...     <type 'exceptions.ValueError'>: Object: CreateObject Layer invalid data source     Failed to execute (changeLyrWorkspace).     Failed at Thu May 16 10:13:47 2013 (Elapsed Time: 0,00 seconds)      I get this error regardless of whether I add one or more layers when I run the script through the toolbox. **EDIT** It turns out that the script works through the GUI _if_ there are no spaces in file name of the layer file. Are there any workarounds for this problem?


Create global raster layer with latitude values of each cell in QGIS

I have a raster with a 0.0083 degree resolution (WGS 84) of which I need the area of every single pixel. An easy but compute-intensive approach is explained here but as I need to work with bigger rasters for whole continents now, I need to create a global raster if possible. In the thread mentioned above it was recommended to use the formula 0.8534 * cos(latitude) with 0.8534 being the area of a cell at the equator (0.8534 = (0.0083 * 111.300km)^2.) and cos (latitude) being =1 at the equator and close to =0 at the poles. This makes sense to me and leads to the need of a raster of the same resolution containing the latitude values of each pixel. I've read various similar posts including this one giving a solution for another software, but wasn't able to do this in QGIS. I'm still rather new to QGIS so I would appreciate if you could answer on a basic level... Thank you very much, G.


Extract a polyline f rom a geoserver shapefile

I've been Googling my question for 3-4 hours now but I couldn't come up with an answer. I have a GeoServer which contains a shapefile with some roads on it. Is it possible to programmatically query the GeoServer and extract a specific road from it and display it in a layer? I'm using OpenLayers library locally. The reason I want to do this is because I want my line to be snapped on to the actual roads on my basemap (Bing maps).


read feature of a region in map

I am using geoserver and openlayer for developing a GIS application. Is it possible to read features lying within a known polygon area of map through some looping logic without any click on map? I am trying to divide the map in to 10 x 10 =100 equal size region..so i have the square's coordinate array containing the coordinates of these 100 polygons.. I am looking for a solution to get the list of features of map layer within these square.. wms layer which I am using is a layer group having 20 layers containing various features of map like road , canal, river, temple, town etc.


Help obtaining nodata information for ASTER datasets

Is there any way to determine what the nodata value should be, in a set of geotiff images that do not have the 42113 tiff tag ?   I am trying to get elevation information, programatically in c++, and I have encountered areas that return a value of -1 (when I skim over the longitude/latitude points in Global Mapper, and I get to certain points the cursor seems to just skip over them and the elevation shows -1, jumping from something like 200 so I know the info is missing on that exact point).   I would like to have some way of determining an invalid value for the elevation/ nodata, but I haven't found anything in my searches. And I don't trust my assumption of -1 being bad data, since it can be a very reasonable elevation.   Thank you.


ICESat/GLAS coordinate system conversion

I have to import ICESat GLAS14 product data into ArcGIS. I managed to export into an ASCII file the binary GLAS data using NGAT tool, but the coordinates system are in an uncommon format (TOPEX/Poseidon). Apparently they provide an IDL script to convert the coordinates, but I can't get it work. The tools are listed here: http://nsidc.org/data/icesat/tools.html Does anyone have experience working with ICESat/GLAS product and can help me getting this points in WGS84 coordinates?


Passing ng-directive to Leaflet L.popup().setContent()

**Goal: Pass an Angular directive to the .setContent() method of L.popup()** **The Problem** : I need to run `$compile` on the directive in order for it to enter ng. But something like:               .setContent($compile('<new_marker_form></new_marker_form'))      yields a :               Failed to execute 'appendChild' on 'Node': The new child element is null.      As I bet the ng is trying to compile before leaflet has actually appended any HTML. Not sure if this is better suited for Stack Overflow. Please let me know if I ought to move it.


raster files are not exact in extent after clipping

My two layers (chlorophyll-a and Bathmetry) are not exact after I clip my rasters. My bathymetry data (1) is reporting up to 10 decimal places where as chlorophyll-a (2) is only 3 decimal places and there is a rounding error occurring (see images). I need these two layers to be absolutely the same in extent, as i am uploading them as ascii files to maxent (species distribution), which requires exact extent. the extent i need is 118W, -10N, -18S and 126E. I have tried clipping files by the extent of the other and also tried manually entering the values but after that the rounding error results in slight differences between the two files. They are the same co-ordiante system and are the same cell size. I am out of ideas to fix this can anyone suggest anything to solve this problem The program is arcmap 10.1 Cheers ![Bathymetry](http://i.stack.imgur.com/AHmdQ.png) ![Chlorophyll-a](http://i.stack.imgur.com/ZLXkt.png)


Configure the Search Function in QGIS Web Client

I have set up the QGIS Web Client but do not know how to get the search function to work. I read the instructions in the guide but can't really understand what it is saying:                6.1.2. PHP configuration file         =============================          Configuration for the services is stored in  `config.php`.          Example:            /****************************        * Map rewrite configuration        */       // Prefix map name with path       #define('MAP_PATH_REWRITE', '/home/xxx/public_html/QGIS-Web-Client/projects/');       // Append .qgs to the map name       #define('MAP_PATH_APPEND_QGS', true);                 /**************************************        * search configuration        */       // Configuration for searchable layers       $searchlayers_config = array(           // Key is layer name           'Country' => array(               // SQL for text search: where to search               'search_column' => 'name'           )       );            // Default search tables       define('DEFAULT_SEARCH_LAYERS', 'Country');       // Limit search results       define('SEARCH_LIMIT', 100);                 /**************************************        *  Get legend configuration        */       // Cache expiry time in seconds 0=never cache       define('GET_LEGEND_CACHE_EXPIRY', 60*60);       // Cache directory, defaults to dirname(__FILE__) . '/legend_cache'       define('GET_LEGEND_CACHE_DIRECTORY', null);       // Defaults to current URL + '../cgi-bin/qgis_mapserv.fcgi?'       define('WMS_ONLINE_RESOURCE', null);            /* End configuration */          QGIS Web Client needs to know where to find the scripts, since most     configuration is read from the project file, this must be passed in the     query string, the file where this parameters are set is     GlobalOptions.js see the example below:            // Adds project_map, read value from query string       var project_map = Ext.urlDecode(window.location.search.substring(1)).map;            var searchBoxQueryURL = '../php/search.php?map=' + project_map;       var searchBoxGetGeomURL = '../php/search_geom.php?map=' + project_map;      Can anyone enlighten me what must I do, which part of the code to edit? Thanks.


Scaling DA UpdateCursor to large datasets?

I am currently having what appears to be a scaling issue with arcpy, da update cursors, and large file geodatabases. I have a piece of code that iterates through every feature in a feature class and does some calculations and manipulation on the data. It works great for smaller data sets, but it is orders of magnitude slower on large ones. I have a simple counter in it and print statements every 1000 records for the purpose of benchmarking it and here are the results:   * 48k features, each 1000 takes ~0.12 seconds to do    * 133k features, each 1000 takes ~0.12 seconds to do   * 2mil features, each 1000 takes ~0.17 seconds to do   * 48mil features, each 1000 takes ~23 seconds to do (yes, twenty three seconds, no decimal place) I only let the 48mil run for a few minutes before I killed it but the rest of them were ran until completion and these times are very consistent, be it the first or the last one with only a few hundredths of a second deviation once in a while. Even if they were scaling linearly I would only expect .05 seconds every 2mil records and that would put 48mil somewhere in the 1.3 second area. The results are 20 times that. The ones with less features are just subsets of the data for testing purposes so it should not be an issue with differences in the data. All of them were created in the same methods, so I do not think there is an issue with differences in the data other than size. It seems to be coming purely from the number of features. Sorry I don't have the exact code with me at the moment, it is at work, but this is basically it. The code itself works great though, I am mostly wondering if anyone as run into similar issues with large datasets. I was thinking that it could be a memory leak error, but these are all run outside of Arc in the python window and would expect that a memory leak would take time to ramp up (slow down) over time rather than instantly being much slower.               import arcpy     from datetime import datetime          ...          i = 0     fromlast = datetime.now()     with arcpy.da.UpdateCursor(fc, fields) as rows:         for row in rows:             if i % 1000 == 0:                 now = datetime.now()                 print i, ': ', now - fromlast                 fromlast = now             ###do stuff here             rows.updateRow(row)             i += 1      I only have ArcGIS (ArcInfo license), gdal/ogr2ogr, and python to work with, but I am not set on using the FGDB or da cursors if there is some better way to do it within my limited selection of tools.


What software to use for making digital elevation models from UAV aerial imagery?

I have a an unmanned aerial vehicle (UAV, also called a drone) and would like to use it to create a digital elevation model and orthomosaic over a smaller area (10 km2). My platform will be able to produce overlapping imagery with an altitude of around 120 meters (400 feet). I have looked into several alternatives. Here are some:   * www.pix4d.com   * www.dronemapper.com Both of the above are commercial options and seem to offer many features and high quality. I am also looking for solutions where I can have more control of the process and possibly also set up my own batching processing. Python and other open source tools are interesting. What are my alternatives?


IfeatureClass.searc(Iqueryfilter pqueryfilter, bool recy) is throwing external component has thrown exception

I am running my code to trace features approx 20 lacs and my code is working fine for 2 or 3 lacs features and after sometime it thrown external component exception. Please provide any code assistance. Thanking you.


How do I gather X and Y co-ordinate data from a vector grid overlay in QGIS 1.8.0?

I have overlaid a 10m x 10m grid onto a UK Ordnance Survey raster map. I have set both raster and vector maps to the same CRS, (OSGB 1936 British National Grid; ESPG:27700). I have a csv file containing biological survey information gathered at differing 10m quadrats. I want to join the survey data to my 10m x 10m grid as a new layer. However, when I open the attribute table, only Y co- ordinate data is shown. How do I make QGIS show both x and y co-ord attributes for a grid so that I can import my tabular information?


Ubuntu user want to use District Council Uk OS data to print a map!

Hi, I have been told by my Local District Council that to make proper maps that can use their published UK OS data without having to buy the special program is your open source solution. I happen to use Ubuntu 12.04 which may sound like I'm a geek, but actually I am just someone who got fed up with Windows!. So my question is, I have read the list of versions and can see Ubuntu Precise.   Is this a live download or will I need some instruction in the use of the terminal to load this?


Configure Python with Geoserver

I am developing a WebGIS application with:   * Openlayers 2.12   * PostgreSQL 9.2 with PostGIS 2.0 extension   * Geoserver 2.2.3   * Apache 2.0 configured with Tomcat 7.0.35 **PROBLEM** One of the services of the Web application is the generation of an isochronal curve requiring geoprocessing. Here is more detail on the description of the geoprocessing :   * Input: coordinated X,Y in " Spherical Mercator " ( 900913 ) of a point selected by the user on the map and an image (road network raster).   * The geoprocessing : the geoprocessing is applied to the road network raster and sends back a new image output. This geoprocessing is already implemented on my machine with Python (without Apache nor geoserver connections). I use the GDAL library to convert my images to array onwhich I apply my geoprocessing.   * Output: an image which must be displayed on my Web application (a ' layer ' ) **SOLUTIONS ?** Do you have a solution to make this service? Which tool or extension should I use? Here is what I found on the Internet : The idea would be to integrate my python script (developed on my machine alone) on geoserver. This script should be able to use an image of the road network (hosted on the geoserver) and location (X,Y) of a point sent by the user. Then the script has to answer an image and display customer side with OpenLayers. **WPS** geoserver : this one uses functions predefined at the geoserver level while I want to create my own function !!! **Visual render** geoserver side : the problem is that it does not make call to a script python (but rather in **SLD transformation** ). Does the **python extension** of the geoserver allows to generate this kind of geoprocessing? If yes, how to make concretely? I downloaded it on this page http://gridlock.opengeo.org/geoserver/2.2.x/community-latest/ (geoserver-2.2-SNAPSHOT-python-plugin.zi p). How to exploit(run) the **Geoscript** library and the **Script Hook**? **The other solution** would be to configure python with Apache. To launch the script python at the Apache level, the result of my script would feed a table in postgres (raster) which is in WMS side geoserver. NEWWWWWWWWW HERE AN ILLUSTRATION TO UNDERSTAND BETTER THE PROCESS ![enter image description here](http://i.stack.imgur.com/jfI7r.jpg) One thank you in advance. Pierre, expert in business GIS


How to find and quantify duplicate vertices on a polygon/polyline in ArcGIS 10.0

I need to clean up topological errors in various shapefiles and databases. I did read that the Repair Geometry tool could clean duplicate vertices but how can I know the number of errors before and after using this tool, to ensure these errors were repaired? I'm using ArcGIS 10.0. I have no programming skils.


Postgresql JDBC Table Valued Parameters

**MSSQL** has a great feature called **Table Valued Parameters**. It allows you to pass a table of a custom data to stored procedures and functions. I was wondering what is the equivalent , if exists, in **PostgreSQL** , using **JDBC**? I know about the option of passing Arrays as a function parameters, but that seems limited to Postgresql data types. Consider the following PL/pgSQL code:               CREATE  TYPE number_with_time AS(     _num   float,     _date  timestamp     );      and this function header:               CREATE OR REPLACE FUNCTION myfunc(arr number_with_time[])      Can anyone post a **JAVA** code using JDBC driver of calling that function with an array of the user defined data type? Thanks


how to add layer style in geoserver using gxp_styler by GXP api

I am using GXP api(open Geo Suit) for my GIS application.I want to add style to layer using gxp_styler plugins.This plugin is working fine for me but the problem is that when i add a new style to layer and save.Then this new style is automatically set for all layer in Geo server. But i want to style only one layer that is only particular layer not all layer in the Geoserver.                 My code is               {             ptype: "gxp_styler",             actionTarget: "map.tbar",             showButtonText:true         }      This plugin add layer style(default style) for all layer in Geoserver But i set only for one layer not all layer of Geoserver. Thanks


In what ways has QGIS 2.x API changed making Plugin Builder Tutorial invalid?

I am working on the QGIS workshop Tutorial for QGIS Plugin Builder and notice that it is for QGIS 1.1. As this seems like a popular tutorial, in general, what are some areas of this tutorial that need to be changed since the QGIS 2.0 release?


How can I extract only band 4 from a geotiff multi bands to create geotiff or AAIgrid with this band using Python?

I have a geotiff file with many bands... I will like to create a .asc file or tiff file by converting only one band from the geotiff file. I don't find the solution by using python... With os.system, i use:               os.system("gdal_translate -b 4 -of AAIGrid C:\in.tif C:\out_onlyband4.asc")      it is ok, but i will like to use by `from osgeo import gdal`... How can i do that?               from osgeo import gdal          drv = gdal.GetDriverByName('AAIGrid')          ds_in = gdal.Open('in.tif')          #i just want to extract one band (sample 4...) and create AAIGrid or GTiff with only one band, can you help me?          ds_out = drv.CreateCopy('out_onlyband4.asc', ds_in)          ds_in = None          ds_out = None


Failing to build PostGIS on OS X 10.7 Lion

I am trying to install postGIS from source to match the default install of postgreSQL on OS X 10.7. I installed GEOS and PORJ.4 from Kyngchaos and ran               $export MACOSX_DEPLOYMENT_TARGET=10.7     $export CFLAGS="-Os -arch i386 -arch x86_64"      $export PG_CPPFLAGS="-arch i386 -arch x86_64"     $export SHLIB_LINK="-arch i386 -arch x86_64"     $export LDFLAGS="-arch i386 -arch x86_64"     $cd ~/source/postgis     postgis $./configure --with-pgconfig=/usr/bin/pg_config --with-geosconfig=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --with-projdir=/Library/Frameworks/PROJ.framework/Unix      I get this               PostGIS is now configured for x86_64-apple-darwin11.0.0      however after running make i get the following error               collect2: ld returned 1 exit status     lipo: can't open input file: /var/folders/dh/11gwx5cs5sl8v4r7qrzf3pd00000gn/T//ccsAdaB9.out (No such file or directory)     make[1]: *** [postgis-1.5.so] Error 1     make: *** [postgis] Error 2      Something i don't know about (architecture?) seems wrong here. Any clue? Thanks in advance.


Adjacency matrix in GRASS

I have a line shapefile that I use as network. I connect a set of point to it using "v.net operation connect" command. ![problem described here](http://i.stack.imgur.com/tr8u9.png). My questions are: (i) how can I get the list of neighbors for each "connected" point (or the adjacency matrix between all the points)? I mean a list like A-B, A-D, B-A, B-C, C-D, C-B, ... (ii) how can I simplify the network by dissolving/merging unnecessary edges between my points? I mean merging edges 1-2, 3-4, 5-6 and so on. It seems quite simple but I am not able to manage it...


Accessing all fields of joined tables using ArcObjects SOE?

I am using arcobject 10.2 java sdk I have a service published where data is coming from a featureLayer and table, the mapservice is returning all the results as expected but when i search the fields in SOE it says fields does not exist. Here is my code               public JSONObject getallFilds(IFeatureClass pointfeatureClass,String fieldName, String fieldValue)     {     ITable pointFeatureClassTable = (ITable)pointfeatureClass;          // IDisplayTable pointFeatureClassDisplayTable = (IDisplayTable)pointfeatureClass;      //tried this but was not working cast error               IFields totalFields = pointFeatureClassTable.getFields();          for (int i = 0; i < totalFields.getFieldCount(); i++) {                 str += totalFields.getField(i).getName() + ",";     }          this.serverLog.addMessage(2, 200 ,str);          // this don't output all the fields          IQueryFilter qf = new QueryFilter();     qf.setWhereClause(fieldName + " = " + fieldValue);          Cursor cursor =     new Cursor(pointFeatureClassTable.ITable_search(qf, false));          IRow feature =  cursor.nextRow();          List<PointData> lst_PntData = new ArrayList<PointData>();          PointData pntData;               while(feature != null)     {                                    pntData = new PointData();          pntData.setPoint((Point)feature.getFields().getField(feature.getFields().         findField(pointfeatureClass.getShapeFieldName())));  // cant get the shape also          pntData.setObjectID(feature.getOID());              lst_PntData.add(pntData);                                 feature =  cursor.nextRow();                     }             }


Display 3 maps equally

How can I get a 33% equal split for 3 map panes - I keep getting the middle map being smaller than the left and right ones for some reason. Theres no header or footer - just 3 maps. If anyone can help that would be great. ![enter image description here](http://i.stack.imgur.com/bn9P5.png) Code below:

               #mainWindow {         width: 100%;         height: 100%;     }           #map0, #map2 {         width: 33%;      }          #map0, #map1, #map2 {         margin: 5px;         border:solid 4px #224a54;         -moz-border-radius: 4px;     }


Calculate length of 2,000 paths - lines in Google Earth?

I have ~2,000 paths/lines drawn in Google Earth and I would like to know their cumulative length. How can I do this easily? I have been able to convert into excel the Lat & Long of each point in the string, but some are too long for Excel to accept. Dylan


pgRouting - calculating route from point to point

I have three shapefiles:   * roads(lines),    * logistic center(one point feature) and    * places(a lot of point features).  I have tried to calculate route from logistic center to places by ArcMap network analyst, but it was pain and I do not successfully made it. So I installed PostGIS/Postgresql with pgRouting extension. Now I have those shapefiles imported to dabatabase with SPIT tool from QGIS. In database they are shown as 3 tables. Also I successfully created topology for roads by tutorial found in pgRouting workshop documentation. For now, I can't find tutorial for my situation, as I want to calculate shortest routes from logistic center to places using roads layer. I can do it by hand, one by one, on QGIS or ArcMap, using their tools, but I have 1500 places, so it would be pain to do it. My questions: Is it possible to calculate routes from one point to many with pgRouting (I need only distances for shortest route) using logistic center as source and places as targets? Is it possible to create a table with information containing target ID and route distance and create a shapefile with geometry? How to do that?


How to use values such as 2014-03-31T15:00:33.000Z in QGIS Time Manager?

I´m trying to use the QGIS Time Manager plugin but I have a problem with my attribute columns. Time Manager supports %Y-%m-%d %H:%M:%S format but my dataset uses the following format in the timestamp column               2014-03-31T15:00:33.000Z      How can I use the plugin? Do I have to format my column ?


What sample size should be used when applying the National Standard Spatial Data Accuracy (NSSDA)?

I'm less interested in what is recommended by FGDC, and more interested in information like this: SAMPLE SIZE AND CONFIDENCE WHEN APPLYING THE NSSDA, which suggests you need a sample of 100. Is there any agreement on this in the GIS Community? I'm not sure if this means anything, but the actual worksheet provided by the FGDC has 40 rows. Please think twice before just tossing a number into an answer without an explanation. I expect several good answers, but this question isn't intended to be a poll.


ArcGIS: Generate Random polygons within a polygon

I have a generic polygon layer, would it be difficult to do subdivide the polygon into sub polygons provided they're all relative of the same area? Let's say divide a polygon into 10 or so sub polygons.


qgis android problem on load

Hi I am new to both android and qgis, but have 20 yrs experience with mapinfo and arc gis. I have installed qgis on a nexus 7 (4.2), but keep getting the error : No qgis data provider plugins found in /data/app_lib/lib No vector layers can be loaded. Any assistance in fixing this error much appreciated. Thanks


ArcMap spatial adjustment rubbersheeting

How much minimal count od of links I must add to align some layers ? I know that exist roole to counting minimal links count, something about TIN.


Can I create a balloon callout on an address point on a published map?

Very new to this, so please excuse any ignorant question! I've created a vb.net app to open a published map in ArcReader. Have a few questions... First, I started with the query attribute sample to find an address, zoom to the point on the map, and flash. I'd like to have a balloon callout display showing the address on the map as well. From this site, I tried the following code (below), but trying to use ICallout and IFormattedText Symbol tells me 'ambiguously defined for esri.ArcGIS.Display'. I'm using ArcReaderControl to build this and then adding on to it. Have I missed something simple? Thank you very much for any help you have! # DonnaB Private Sub AddBalloonCallout(ByVal activeView As IActiveView, ByVal text As String, ByVal x As Double, ByVal y As Double)                   Dim pTextElement As ITextElement         Dim pElement As IElement         Dim pPoint As IPoint         Dim pCallout As ICallout         Dim pTextSymbol As IFormattedTextSymbol         Dim pGraphicsContainer As IGraphicsContainer         Dim midX As Double, midY As Double                   Dim pCallout As ICallout         pTextSymbol = New ESRI.ArcGIS.Display.TextSymbol                        'Dim pTextSymbol As IFormattedTextSymbol         Dim pGraphicsContainer As IGraphicsContainer         Dim midX As Double, midY As Double              'Create a new text element          pTextElement = New TextElement         pElement = CType(pTextElement, IElement) 'QI          pTextElement.Text = "Text callout" & vbCrLf & text              'Position the new element on the active view's center point          midX = (activeView.Extent.XMax + activeView.Extent.XMin) / 2         midY = (activeView.Extent.YMax + activeView.Extent.YMin) / 2         pPoint = New ESRI.ArcGIS.Geometry.Point         pPoint.PutCoords(midX, midY)         pElement.Geometry = pPoint              'Set the text element symbology to a default balloon callout          pTextSymbol = New ESRI.ArcGIS.Display.TextSymbol         pCallout = New BalloonCallout         pTextSymbol.Background = CType(pCallout, ITextBackground)          End Sub


How to set order of operations for Field Calculation in Network Analyst Evaluator Dialogue?

I desire to have a ratio calculated each time I create a new route. To get this ratio, I created and populated a field that multiplied the length of each segment by a designated number from 1-5, where 1 was most desirable, we'll call this [FieldValue]. Theoretically, when divided by the length, this would produce a value that, the closer to 1 would indicate a more desirable route. In the **field evaluator** value dialogue box, I was able to divide my calculated value by the length of the segment ([FieldValue]/[Length]). I was hoping that they would sum each field first and then divide the two values at the end. However, when I ran the route analysis, the values were dividing each row, and summing all of the individually divided values at the end. I would like each field, [FieldValue] and [Length] to sum first, then divide the two summed fields to produce the ratio. It would appear that I can do this with a VB script or Prelogic within the network analyst evaluator value field, but I lack the programming skills to do so. What would be the best route to take in order to have them calculate in my desired order?


Balloon popup in dynamic display looks weird (with image link)

Here's how it looks when dynamic display is enabled http://iterationx.posterous.com/34293301 Each letter gets its own balloon callout - this is quite annoying and I can't image why anyone would actually want this. Here's the code I'm using, its in a custom dynamic layer:               public override void DrawDynamicLayer(esriDynamicDrawPhase DynamicDrawPhase, IDisplay iDisplay, IDynamicDisplay iDynamicDisplay)      {     if (this.m_textGlyph == null)     {     IBalloonCallout balloonCallout = new BalloonCalloutClass();     balloonCallout.Style = esriBalloonCalloutStyle.esriBCSRoundedRectangle; //oval doesn't work      ITextElement pTextElement = new TextElementClass();     TextSymbolClass textSymbolclass = new TextSymbolClass();     IFormattedTextSymbol balloonCalloutTextSymbol = textSymbolclass as IFormattedTextSymbol;     balloonCalloutTextSymbol.Background = balloonCallout as ITextBackground;      balloonCalloutTextSymbol.Font = ESRI.ArcGIS.ADF.Connection.Local.Converter.ToStdFont(new Font("Arial", 10.0f, System.Drawing.FontStyle.Regular));     m_textGlyph = dynamicGlyphFactory.CreateDynamicGlyph(balloonCalloutTextSymbol as ISymbol);     }          m_dynamicSymbolProperties.set_DynamicGlyph(esriDynamicSymbolType.esriDSymbolText, m_textGlyph);     dynamicDisplay.DrawText(mousePoint, textToDisplay);          }      edit: I tried this but it looks the same               ASCIIEncoding ascii = new ASCIIEncoding();     Byte[] encodedBytes = ascii.GetBytes(textToDisplay);     String decodedString = ascii.GetString(encodedBytes);     dynamicDisplay.DrawText(mousePoint, decodedString);      * * * Since I don't think there is going to be an answer, I'll just mention my workaround. I created a Polygon to represent the Hover balloon, the simplified the geometry and drew text in the middle of it. Then I kept a copy of the Balloon PointCollection in memory, and if the mapscale changes, I used a Transform2D, to move or scale it, depending on which was necessary. The Glyph outline has to be the same as the fill color or you will get weird squares.


Making bus routes in ArcGIS Network Analyst?

I am a novice. Aim is to make bus routes in ArcGIS Network Analyst, so specifying two points on the map, I could see what buses to ride with minimal layovers and time. Please tell me where it is written in detail.


How to calculate area in sq km of an ellipsoid shapefile

In QGIS, I often find myself setting up projects with an ellipsoid coordinate system (e.g. WGS84) so that the resulting maps have lat lon scales, etc. Often in these projects I also need to do some calculations in other units (e.g. calculate the sq km of a feature). At present I do this my maintaining two versions of a shapefile, one projected for calculations and one ellipsoid for layouts. This becomes complicated in large projects! Is there an easier way? Am I overlooking a technique for doing these calculations on-the-fly from spheroid shapefiles?


Is it possible to solve Differential Equations in ArcMap and/or ERDAS Imagine?

I would like to know if it is possible to solve differential equations and run them directly in either ArcMap or ERDAS Imagine, similar to the raster calculator in ArcMap?


How to reclassify a float raster?

I have three rasters which represent distance (in metres) from certain things (bus stops, parks, libraries). I would like to reclassify these rasters so that they get integer values based on the following criteria:               between 1 - 1000 = 1     between 1000 - 2000 = 2     between 2000 - 3000 = 3     between 3000 - 4000 = 4     between 4000 - 5000 = 5     between 5000 - 6000 = 6     between 6000 - 7000 = 7     between 7000 - 8000 = 8     between 8000 - 9000 = 9     9000 and above = 10      I know how to do this in Spatial Analyst, but I don't have a license and I'm trying to use Open Source tools. I've attempted to use r.reclass and followed the tips in this question, but the input raster needs to be an integer raster. At the moment, my distance rasters are floats. I've also tried using the reclassify tool in the Geospatial Modelling Environment but the input raster also needs to be an integer raster. I've also tried using the Raster Calculator in QGIS by following this example, but it appears that that only works with a single criteria not 10. I've been pulling my hair out trying to convert the rasters to integer, but can't figure it out. Does anyone know how to either reclassify a float raster or convert a float raster to an integer raster? Note, the end goal of this will be to perform a weighted overlay. Eventually, I may have Spatial Analyst in ArcGIS to do this, but I'd like to know how to do it using Open Source tools. Thanks.


Is there any Google Maps-like zoomable world map, but with an equal-area projection?

Whenever I look at Google Maps at a global or polar area, the projection hurts. Is there any web service with a zoomable world map, that uses an equal- area projection — preferably pseudorectangular such as the Mollweide projection? Even National Geographics online map uses Mercator. Another alternative, Google Earth, does not particularly distorts the Earth, but does not give a global view either. See also: _Why has Web Mercator (auxiliary sphere) become the web map standard?_


error message: "Cannot split, erase or overlay with points, collection, Text or layout frame objects" in Mapbasic

In order to automate procedures using MapBasic, I wrote the code for overlapping two objects -- one a polygon object and the other a point object -- using Objects Intersect statement written below. It gives me the above mentioned error. But actually, when I manually do the intersect via Mapinfo application (via Table\Update) it gives me a result which is a modified target table (BB.TAB).               'Open the point table     Open Table "C:\Temp\AA.TAB" Interactive          'Setting the Target     Select * from BB     Set Target On          Select * from AA          Objects Intersect Into Target Data CC=CC,DD=DD      How can I rectify Mapbasic error ?


Any updates on problems with loading ESRI FileGDBs in QGIS 2.2?

There are many posts in different forums about people having trouble reading File GDBs in QGIS 2.2, but no real solutions. Is there any word on a resolution to this problem? I am using QGIS 2.2 (installed via the OSGeo4W online installer) on Windows 8.1 64-bit. I can confirm that the gdal-filegdb (version 1.11.0-1) library is installed, as reported by the OSGeo4W setup. The FileGDB option does not appear at all in the Directory source type list, and if I go and choose the .gdb folder anyway I get an error about it not being a valid data type. And please don't suggest compiling QGIS from scratch with the gdal-filegdb library linked -- that might fly on Linux but it is not a practical alternative on Windows, even assuming I _did_ know how to do it.


How change border line to no pen with python console?

From Python console I load a shapefile with qgis.utils.iface.addVectorLayer. How I can remove border lines (change to no pen) in the active layer?


ArcGIS JS API: Merging Popups with Relationship Queries (with fiddle)

I am trying to **merge** two ArcGIS JS API examples: Feature Layer with Popup and Query Related Records. The idea I have in mind is clicking on a country feature, retrieve all related records from a service (already prepared for relationship queries) and **present those text records inside a Popup** (`esri.dijit.Popup`). I was interested in doing this exercise, because I like the way this Popup presents multiple results for a feature, by paging them as you can see in the first link when clicking on a tree. And it was a good match for my application with Relationship Queries. So far, I have most of the functionality already prepared and I can see the related records retrieved from the services in my firebug console. Good news. My problem comes when I have to put those records in the Dojo Popup: The example shows that adding features to the Popup is as "simple" as using the setFeatures(features) method. This method receives either an array of Deferreds or an array of Features. In my case, I have both of them available. I get the results like this and add it to the popup on map.infoWindow parameter:               mydeferred = featureLayer.queryRelatedFeatures(relatedTopsQuery, function(relatedRecords) {     var fset = relatedRecords[res.attributes['OBJECTID']];     var items = dojo.map(fset.features, function(feature) {         feature.attributes.DateStart = Date(feature.attributes.DateStart).toLocaleString();         feature.attributes.DateEnd = Date(feature.attributes.DateEnd).toLocaleString();         feature.setGeometry(evt.mapPoint);                       return feature.attributes;     });           map.infoWindow.setFeatures(fset.features);     map.infoWindow.show(evt.mapPoint);      But, no matter if I pass to `setFeatures` a Deferred or a Feature array, that my output is the following one: ![enter image description here](http://i.stack.imgur.com/ItIYy.png) Does anyone detect the problem or the bug? I think that the problem might be related with the DOM structure of the features, because if you see the image attached, the function knows the size of the array of features, but does not display any of the related records. It is **important to highlight** that:   * I had to manually add the geometry field to the features, maybe any other required parameter is missing and that is why the popup is showing nothing. Does it make sense?   * At this moment, the info template function `getTextContent()` returns a string _"Hello world"_ , but it is not appearing in the popup. Can anyone provide some help? :-) Thank you very much!! * * * ## **EDIT** : Just to illustrate what I mean I have adapted ESRI's Query Related Records example to use Popup in **this jsfiddle:** http://jsfiddle.net/uBNAm/ I hope if you see this, you can understand fully what I mean. Just click red spots until a popup like the one above appears. Maybe is it a bug? How should I proceed to report it? Any? * * *


How to make world file in WGS84 out of OpenLayer's Google Earth layers?

I would like to make world file out of OpenLayer's Google Earth. The problem is, that Google Earth layers in Qgis are shown EPSG:3857, but I need just standard WGS84 (ESPG:4326). When I try to set layer units to decimal degrees, Qgis does not change anything. If i force WGS84 projection, than map displayed incorrectly. Could you please help with this ? I couldn't imagine, that this "map stuff" is so complicated... Actually, Qgis is not necessary for me... I just need a simple way to get map with world file (WGS84). Are there some small free applications, which could take Google Earth image and make world file for them ?


Choropleth in R: custom breaks and plotting

I have a question with regard to plotting a choropleth map. What is recommended with regard to plotting a map with custom breaks? And make it look a bit attractive. In my script I have used the plot and spplot command to visualize some data but I am not entirely happy with the result. It is easy to see why. Using spplot I get a colour ramp that repeats colours for different values which is a bit weird. Using plot with the custom breaks I have not been able to make better intervals for the values, such that for instance zero-values are white on the map. The skewed proportions between legend and map are I think probably the result of Rstudio. So I wondered whether someone has better suggestions for plotting choropleth maps in R using custom breaks? **EDIT 20-02-2013** As suggested I have used ggplot2 for creating a choropleth map. I've used the code below. I encountered two problems. One is that after fortifying the data not all data from the shapefile is transferred to the data frame. So I have to rename the "id" variable such that I can merge the data. Minor issue. A bigger issue is that despite the fact that the data in the dataframe is correct, the ggplot shows a map where the data is incorrect. The colour value according to the legend does not correspond with the value of the variable in the data. Am I overlooking something here?               # Plotting polygon shapefiles (try-out)     # Load the packages     require(rgdal)     require(maptools)     require(ggplot2)     gpclibPermit() # required for the fortify method     # Load the shapefile     africa=readOGR("/home/GIS",layer="africaII")     names(africa)      # Load the data on conflict     conflict<-read.csv("africa_conflict.csv", header=TRUE)     names(conflict)     # Merge the data together     africadat<-merge(africa, conflict, by="ISO3")     # Changing the data in the shapefile     africa@data <- africadat     # Fortify so that ggplot can plot     africa.points = fortify(africa,region="ISO3")     # Change "id" to "ISO3"such that the datasets can be merged again     names(africa.points)[names(africa.points)=="id"]<-"ISO3"     africa.df=merge(africa.points,africadat,by="ISO3")     # Plot the data     ggplot(africa.df) +      aes(long,lat,group=group) +      geom_polygon(aes(fill =onset))+     geom_path(color="white") +     coord_equal()      Link to replication data


How to create a collaborative mapping website?

I have read about webservers, static and dynamic pages, cgi-bin... I can create a simple web mapping service in which a map with layers and controls will be there. And now I want to provide login user option so that the authenticated users can upload layers that will be overlayed on the map and also create features with vector point, line and polygon tools and save it. Here my questions are: > When I created layers in map, I uploaded it to PostGIS, then to GeoServer > and wrote all the code myself in OpenLayers(name, format, service url etc.). > How can I do all this by creating a simple upload button for the user where > they can upload their layers and then allow the layer to be overlaid by > clicking on addlayer button. Will it be simple? > > And also how to allow them to create features with vector tools? Please tell me what things I have to learn and if any links that I can refer.


What output colour format is expected by the QGIS data defined properties widget?

I'm trying to write a python function that takes a BGSREF attribute from a BGS geology shapefile and uses it to colour up the geology polygons of a shapefile. I posted my non-code working as a part answer to Data-defined Styles in QGIS as it shows the maths behind taking a BGSREF code and converting it to RGB values, but I would like to know what needs to be corrected to have the full solution. Using Nathan's QGIS Blog post on User defined expression functions for QGIS as a basis I created my code like:               from qgis.utils import qgsfunction     from qgis.core import QGis          aColourAdjust = [0,7,14,21,31,42,54,67,80,100]          @qgsfunction(1, "Python")     def BGSrefToQGIScolorRGB(values, feature, parent):         """            Converts BGSref colour (attribution) to RGB values.            Output as integers in the range 0 - 255, in the style:            color_rgb(rrr,ggg,bbb) or color_rgba(rrr,ggg,bbb,aaa)         """         # set some variables         #rgbValue = "color_rgb(255,255,255)"         rgbValue = "255,255,255"         #rgbValue = "<255>,<255>,<255>"         isTransparent = 'False'              bgsref2Convert = values[0]              # Test the length of the input value and pad with zeros if applicable.         if len(str(bgsref2Convert)) == 1:             bgsref2Convert = "00" + str(bgsref2Convert)         elif len(str(bgsref2Convert)) == 2:             bgsref2Convert = "0" + str(bgsref2Convert)         elif len(str(bgsref2Convert)) == 3:             pass         else:             isTransparent = 'True'              #Now we can calculate the RGB values...         if isTransparent:             #rgbValue = "color_rgba(255,255,255,255)"             rgbValue = "255,255,255,255"             #rgbValue = ""<255>,<255>,<255>,<255>"         else:             yellow = aColourAdjust[int(bgsref2Convert[:1])]             cyan = aColourAdjust[int(bgsref2Convert[-1:])]             magenta = aColourAdjust[int(bgsref2Convert[1:2])]                  # 100.0 is deliberate to get a floating point result, otherwise the result of division will always be zero.             red = 255-((cyan/100.0)*255)             green = 255-((magenta/100.0)*255)             blue = 255-((yellow/100.0)*255)                  #Now just need to find the expected QGIS format for the colour output...                  #rgbValue = "color_rgb(" + str(int(red)) + "," + str(int(green)) + "," + str(int(blue)) + ")"             rgbValue = str(int(red)) + "," + str(int(green)) + "," + str(int(blue))             #rgbValue = "<" + str(int(red)) + ">,<" + str(int(green)) + ">,<" + str(int(blue)) + ">"         return rgbValue      I start QGIS (2.2.0), open the Python Console, import my function, and it shows in the expression string builder. For my chosen layer style properties, I choose Single Symbol, data defined properties, Expression and create an expression like: **BGSrefToQGIScolorRGB( "BGSREF" )** and apply this, but I never seem to get any colours in the map. The help tip tells me the colour format is: '<red>,<green>,<blue>,<alpha>' but what does this actually mean? I've tried outputting the results as the following strings (255 here indicates number format not the literal output):               * <255><255><255><255>     * <255><255><255>     * 255,255,255     * color_rgb(255,255,255)      Nothing seems to work for me. What format is expected?


Is it possible to use PostGIS on gisgraphy database?

I have the entire gisgraphy database inside my server. Is it possible to use PostGIS on it to query such as "get locations within 10 miles from this coordinate"? I tried reading about spatial queries and PostGIS but I am not sure if I could directly use the tables in gisgraphy to obtain results.


How to remove ghost layer in Qgis?

I added a delimited text layer to a Qgis 2.0 project, working in Windows, but it got added wrong: It didn't appear in the list of layers on the left panel, nor did it show in the map canvas. However, when I try to use Points2One to create a polygon, it appears in the list of available layers, but if I select it Points2One generates an empty layer. (If I add it again it works fine, but I can only eliminate the second, working layer, not the first one, and I can't delete it from the layer list because it doesn't show there.) Any idea of what might be the cause? Thanks.


QGIS and Python - create line with multiple points in postgis

How can I create a line, with Python functions, with many points that are records in Postgis? Thank you


Why do temporary features disappear when hovered over?

With DrawFeature I'm putting new features to my map. With the hover option of SelectFeature it is possible to get feature information when hovering over it. Now I have the problem of disappearing features on the map when hovering over newly added (=temporary) features? Any solutions how to style the features so that they stay on the map during storage/editing process? Here is the relevant code I use styling the point features:               var defaultPoint = new OpenLayers.Style({ label: "D", pointRadius: 8, fillColor: "red", fillOpacity: 0.7, strokeColor: "black", strokeWidth: 3});     var selectPoint  = new OpenLayers.Style({ label: "S",pointRadius: 8, fillColor: "blue", fillOpacity: 0.7, strokeColor: "black", strokeWidth: 3 });     var tempPoint    = new OpenLayers.Style({ label: "T",pointRadius: 8, fillColor: "green",    fillOpacity: 0.7, strokeColor: "black", strokeWidth: 3 });           var stylemapPoints = new OpenLayers.StyleMap({'default': defaultPoint, 'select' : selectPoint , 'temporary': tempPoint});      This is the code for the Hover control:               HoverSelectControl = new OpenLayers.Control.SelectFeature([layerName],                               { hover:true,                                highlightOnly:true,                                renderIntent: "select"                               });      HoverSelectControl.handlers.feature.stopDown = false;     map.addControl(HoverSelectControl);     HoverSelectControl.activate();


How can a GPS receiver know the estimated error?

I would like to plot a circle of possible error on the map in a GPS app. From http://en.wikipedia.org/wiki/Dilution_of_precision_(GPS), we can see that GDOP is equal to "delta of output location" over "delta of measured data". How can we know the "delta of measured data" in order to calculate "delta of output location"? If it is not possible, how do the receivers plot the circle of possible error on the map?


How to configure proxy.cgi in windows using apache and geoserver?

I want to dispaly my layers on a server. I'am using geoserver 2.3.2 and apache 2.4 Till now i Create a proxy file in referring in this link : http://trac.osgeo.org/openlayers/browser/trunk/openlayers/examples/proxy.cgi and i Put it in cgi-bin folder. I Installed python and in the starting line of proxy.cgi i put the location of python. #!C:/Python27/python.exe -u I found in some tutorials that i should configure the file httpd.conf and i have no idea how to configure it and where should i add this code : " ProxyRequests Off ProxyPreserveHost On Order deny,allow Allow from all ProxyPass /geoserver //localhost:8080/geoserver ProxyPassReverse /geoserver //localhost:8080/geoserver " Thank you guys for your help


ArcMap label expressions with Python

Having trouble here: I'm trying to use python to write selective label expressions. I have several concentrations and depending on its "_Ex" number I either want it labeled red, not red, or not labeled at all. I have started with just one trying to set it to red. when i put this into the lable expression it says line one Findlabel not defined. Any help would be appreciated. -Acrain (Indentations are not showing up correctly here, but I don't think thats my problem)               def FindLabel ([cis12DCE] , [cis12DCE_Ex]):          if short ( [cis12DCE_Ex] ) = 1:         return "<clr red = "255">"+"cis-1,2-Dichloroethylene  "+[cis12DCE]+"</clr>     else:            return "cis-1,2-Dichloroethylene  "+[cis12DCE]      ![enter image description here](http://i.stack.imgur.com/qc54A.jpg)


from node to node geometric network arcgis

this is my first question here. ('cause i'm really jammed with this for severals days!) I'm really new to geometric network and geodatabase, I basically finished all the arcgis tutorial. Anyway I cannot figure out how to fill a **from_node** and **to_node** fields in a polyline shape with ids of the junctions feature (added during the geometric network creation). Topology of the network is fine... Any help is very appreciated!


osm2pgsql error when import pbf for Nominatim DB

Good day to all, Am getting the following error when running utils/setup.php in nominatim 2.1:               Reading in file: /storage/Library/geodata/africa-latest.osm.pbf          Processing: Node(54854k 62.1k/s) Way(4740k 8.26k/s) Relation(0 0.00/s)get_way_list failed: (7)          Arguments were: {48725024,162617539,160913750,95107659,95107632,95061927,94828942,94795314,94795281,48725023,48724896,48493347,48491792,48457398,23462217,23463574,23463575,23463577,23556792,23556834,23496195,48501117,48501200,48501201,48501202,48501381,48501375,48501379,48501377,48457182,48457183,48457186,48457403,48457198,48457202,48457177,48491809,48491797,48493349,48493348,48493350,161906130,161906134,93072207,93086913,93086923,93086924,93086919,93062967,162596086,162596088,94795372,162596089,94795354,94795273,94795305,94795303,94795351,94795355,94795375,94795358,94795370,94795380,94795278,94795381,94795250,94795368,94795378,94795307,94828944,94828939,94828937,94828935,94828940,94828948,94828941,94828951,94828938,94828936,94828949,94828934,94828950,94828952,94828947,95061929,94828946,95061931,95061930,95061926,95061928,95099314,95099312,95099311,95099313,95085072,95085071,95085075,95085076,95085070,95085074,162596087},      Error occurred, cleaning up     ERROR: Error executing external command: /storage/Nominatim/osm2pgsql/osm2pgsql -lsc -O     gazetteer --hstore -C 958 -P 9999 -d nominatimnew /storage/Library/geodata/africa-latest.osm.pbf     Error executing external command: /storage/Nominatim/osm2pgsql/osm2pgsql -lsc -O gazetteer --hstore -C 958 -P 9999 -d nominatimnew /storage/Library/geodata/africa-latest.osm.pbf      The command I'm running to do the initial import to create a new Nominatim DB is:               ./utils/setup.php --osm-file africa-latest.osm.pbf --all      within the Nominatim directory. Running osm2pgsql 0.85.0, PostgreSQL 9.3.2, PostGis 2.1.0 running on Slackware 14.1 64 Bit. Thanks.


How to count number of points/lines/polygons contained within a polygon, when the feature to count is from a server

I'm currently running a study where I need to query the number of points/lines/polygons that are contained within a project boundary - intersecting lines and polygons need to be counted as well. The features are linked to an agency server (operations allowed: Map (display), Query (Identify), Data (Find)). It would be extra helpful if I could get an output table that preserved the attributes, but I will walk away with just summing the points/lines/polygons contained within a polygon. Any help would be greatly appreciated.


What topologic relation means "interior-disjoint"?

I am using the **JTS Topology Suite** , and trying to write an expression that means "shape A and shape B are interior disjoint". I read this **documentation page** but I don't entirely understand the relations. The "disjoint" relation (which is the opposite of "intersects") means that the two shapes don't have _any_ point in common, including the boundary. The "overlaps" relation means that the two shapes have some points in common but no shape is covered by the other. Thus the "not overlaps" relation doesn't take care of the case in which one shape entirely covers the other. There is a function that defines the "DE-9IM Intersection Matrix", but, I couldn't figure out what matrix implies the "interior disjoint" relation.


How to disable double-click zoom in Arcgis Javascript API

I am using ArcGIS java script API for creating map. I am trying to disable the double-click zoom in the map. Here is link of my map: http://urbanaccessregulations.eu/mindcrew/mobile-popup.html I used both methods which are given in documentation of Arcgis JS:               map.isDoubleClickZoom=false;     map.disableDoubleClickZoom();      But still the double click zoom is not disabled - what am I doing wrong?


Symbolizing individual highway network segments in ArcMap

I have a highway layer that I need to style in ArcMap in such a way to differentiate between individual highway sections, ideally using no more than 6-7 distinct colors. Each highway is divided into one or more sections. Highways have Road Number and Section Number attributes that I can use for styling. The symbology will need to be exportable to ArcPad. I can calculate/add new fields to the table, if that helps. Here's an image of how a section of highway may look like: ![enter image description here](http://i.stack.imgur.com/Rq69B.jpg) Note that in the image, the colors aren't repeated, but they will definitely have to be over the entire highway network. All I'm looking to accomplish is show highway section breaks with a limited subset of colors.


Is it possible to drive one mxd (pan) using a different mxd with python?

I have 2 mxd's. mxdA and mxdB They both show different data, but are both in the same coordinate system. I want to be able to sync mxdB with mxdA, so that if I pan / zoom in mxdA, I can then, with a single button press, view the same extent in mxdB. I know that this is possible using a Viewer window (where a 2nd data frame is used rather than a 2nd mxd), however there is a memory leak present where a Viewer window is used alongside an editing session with snapping turned on (NIM103256) which causes our session to crash after <1 hour of editing. I know that another option could be to use production mapping views, but these seem to be limited to both mxd's having the same datasets, and once you have opened mxdB and linked it to a view, you are then unable to update the view file using mxdA because it is locked by mxdB. This is not practical for us as it would mean closing and re-opening mxdB many times every day (50+) I'm hoping that there is a way using python where I can calculate the center point of the active dataframe in mxdA and then pan/zoom mxdB (which is already open) to the same location. I can then create a button as an ESRI Add-in. Calculating the center point is simple enough                   mxd = arcpy.mapping.MapDocument("Current")         df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]         # Calculate the centre X coordinate         x = (df.extent.XMax + df.extent.XMin)/2         #Calculate the centre Y coordinate         y = (df.extent.YMax + df.extent.YMin)/2      But I'm struggling with passing this center point information to mxdB to get it to pan. Is this even possible without using ArcObjects? I am using ArcGIS (Advanced) 10.2.2 EDIT: I have seen this post, unfortunately it doesn't answer my question. I have written some code that can be run in mxdB which will update mxdB based on the extent of mxdA. However, I need to be able to run the code in mxdA and for it to update the extent of mxdB (as mxdB is a fixed mxd, whereas the name of mxdA could change).               import arcpy     #define mxdA     mxd = arcpy.mapping.MapDocument(r"C:\Testing\Scratch\mxdA.mxd")     #define the dataframe from mxdA     df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]     #define mxdB     mxd2 = arcpy.mapping.MapDocument("Current")     #define the dataframe from mxdB     df2 = arcpy.mapping.ListDataFrames(mxd2,"Layers")[0]     #set 'newextent' to be the extent of the dataframe in mxdA     newextent = df.extent     #set the extent of the dataframe in mxdB to be the same as that of mxdA     df2.extent = newextent     #refresh the view in mxdB     arcpy.RefreshActiveView()


Creating geoprocessing package (*.gpk) that contains more than one model?

I'm making gpk (= geoprocessing package) packages for ArcGIS Runtime 10.2.2. I'm making several models, and wanted to know if there is a way for including several models in one gpk file or do i need to make several gpks and move between them with code?


How to fix shape file projections

I have a project with several shape files. The files overlapping however. I have to go to unusable extents to even see the file on the same screen. I have tried using to project to as suggested here to now avail. Any ideas. I have created a public github repo here with the project ![enter image description here](http://i.stack.imgur.com/gWM5M.png)


QGISCloud in mobile QGIS

I’m new with QGIS mobile, I can’t open shapefile on QGISCloud using samsung note 8. Does anyone know how to do that? I haven’t found qgis plugin for mobile yet. Thank you


How to export shape file to SpatiaLite

I have a shapefile with one layer. I can open it with QGis. Now I want to convert this shapefile or layer to Spatialite database. How can I do it? Is it possible to do with QGis?


Need XML structure for importing metadata into Geoportal

I have older data stored in ArcIMS(I think it's ArcIMS?) format, I would like to convert this data over to be used with geoportal. Other than a sample document, I haven't been given much info on how to make the XML file. I'm writing custom code, so some type of document on how to make the XML file would be really nice.


OpenLayers ArcGIS Image Service Support

i have ArcGIS Image Server for publishing my raster data to my user. In traditionally way i have been tiling with gdal and it takes a long time besides this it requires more effort for getting true result. Do you know ArcGIS Image Service support for openlayers like Openlayers ArcGIS Server REST support?


Converting Lon Lat to UTM Zone 32N in C# with SQLSpatialTools

I have a set of coordinates; Lon 9.42221521, Lat 56.44978001 and I want to convert them to UTM Zone 32N coordinates. I found the SQLSpatialTools library to do the conversion but I need some help. When I use the following code:               SqlChars chars = new SqlChars(string.Format("POINT({0} {1})", lon, lat));             SqlGeography mapPoint = SqlGeography.STPointFromText(chars, 4326);                  SqlProjection proj = new SqlProjection();             proj = SqlProjection.TranverseMercator(0);  //(or Mercator)             SqlGeometry geometry = proj.Project(mapPoint);             geometry.STSrid = 25832;                  SQLSpatialTools.AffineTransform affTrans = new AffineTransform();             SqlGeometry newPoint = AffineTransform.Scale(6378137, 6378137).Apply(geometry);      ...the lon lat set gets converted to 578664.03 - 6323756.73 If I check the lon lat set in ArcMAP I get the following values: 526026.284 - 6256221.368 ...so obviously I must be doing something wrong. I'm using SQLSpatialTools because it's easier for me to perform some spatial queries later. Thanks!


Is it possible to label bar charts?

I have added bar charts to my map and this works fine. But I have no idea how to add values to the bar chart. For example one bar shows the value of 2000 and another shows the value of 2100. Is it possible to show this values in the bar chart? I tried labeling but this is not what I want. Any ideas? A Plugin or something else? qgis 2.01 and 1.8 Thanks.


Filter features with multi-table joins in ESRI Silverlight/REST API

We have a rather involved data warehouse (SDE 9.3.1 / Oracle 11g) that contains a single related point feature class. Our (analytical) application should allow users to construct complex, ad hoc queries against the data. In every case there will be joins across numerous (but not always the same) tables; only matching features should show on the map. The REST & Silverlight APIs support a simple `where` clause, which seems to limit our options. Can you recommend a strategy for surmounting this limitation?


How to get all the lat/long coords that define a shapefile

I have a Shapefile with several shapes inside it. Using MapWindow I have been able to determine that the shape I need is the one with shapeId 19. As you can probably tell I have very little experience with GIS in general but I think I have come to the right palce to ask for help. What I need is to extract all the lat/long coordinates that determine the shape. Is it possible to do this using MapWindow or do I need to use some other software? If more information is needed to help, please comment and I will update as soon as possible. Any help is appreciated as this is driving me crazy! Thank you very much for the help!


WFS layer not showing?

> **Possible Duplicate:**   >  How to add GeoServer wfs layer on OpenLayers? I'm really new to this and am making a map for a university project, I can't get my WFS layer to show up on my map, the WMS layer shows up fine, just no WFS layer, here is my code:               Ext.onReady(function() {          var map = new OpenLayers.Map('map');          map.addControl(new OpenLayers.Control.OverviewMap());     map.addControl(new OpenLayers.Control.LayerSwitcher());     map.addControl(new OpenLayers.Control.PanZoomBar());     map.addControl(new OpenLayers.Control.MouseToolbar());     map.addControl(new OpenLayers.Control.KeyboardDefaults());          var base = new OpenLayers.Layer.WMS(     "UK base map",     "http://localhost:8080/geoserver/wms",     {layers: "topp:GBR_adm2"}     );     map.addLayer(base);          var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;     renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;          var wfs = new OpenLayers.Layer.Vector("WFS", {     strategies: [new OpenLayers.Strategy.Fixed()],     protocol: new OpenLayers.Protocol.WFS({     version: "1.1.0",     url: "http://localhost:8080/geoserver/wfs",     featurePrefix: "topp",     featureType: "reptiles_amphibians_locations",     featureNS: "http://www.openplans.org/topp",     srsName: "EPSG:4326",     geometryName: "the_geom"     })     });     map.addLayer(wfs);          var mappanel = new GeoExt.MapPanel({     region:"center",     height: 400,     width: 600,     map: map,     title: 'UK Distribution'     });          var layerList = new GeoExt.tree.LayerContainer({     text: 'Species',     layerStore: mappanel.layers,     leaf: false,     expanded: true     });          var layerTree = new Ext.tree.TreePanel({     title: 'Map Layers',     maxWidth: 500,     region: "east",     collapsible: true,     collapsed: true,     root: layerList     });          mainPanel = new Ext.Panel({     height: 600,     renderTo: "mainpanel",     layout: "border",     items: [mappanel,layerTree]     });          });      I keep reading that it could be due to the fact i'm not using a proxy, but its on localhost:8080, so does it still need one? It could be a geoserver problem. Its been driving me mad for weeks, any help would be much appreciated. Thanks Will


ArcView Feature-creation Hanging

When creating polygon features in ArcView 10, using the auto-complete polygon tool, I create a feature neighboring another polygon and ArcView hangs or processes for over 15 seconds. The feature is successfully created, but it takes _forever_. The polygon layer being edited is in a file geodatabase (although location of the feature, in or out of a gdb, being edited appears to have no bearing on the problem). I've done the Normal.mxt rename and all the tried-and-true solutions and ESRI has been of little help. Any help would be appreciated, thanks. -Ross


How to query some properties of a list of typenames in geoserver

I want to query selected propertynames from a list of Typenames in Geoserver. I could find an example from OGC WMS 1.1.0 Implementation Specification ( pdf document page 80 Example 10) which is not working for me. Here is the example: Example 10 Query some properties of a list of feature types. In this case, the attributes WKB_GEOM and TILE_ID are fetched for the INWATERA_1M feature type and all the attributes of feature type BUILTUPA_1M are fetched. http://www.someserver.com/wfs.cgi& SERVICE=WFS& VERSION=1.0.0& REQUEST=GetFeature& PROPERTY=(INWATERA_1M/WKB_GEOM,INWATERA_1M/TILE_ID)(BUILTUPA_1M/*)& TYPENAME=INWATERA_1M,BUILTUPA_1M When I try to implement this I got the following error "Requested property: PropertyName1 is not available" The possible propertyName values are:[PropertyName1, , , , , ]" It would be great if someone give me a working example for Geoserver. thank you in advance


Update layer datasource in multiple map documents using ArcPy?

I would like to update the data source of a specific layer in multiple map documents using ArcPy, however I'm getting a `<type 'exceptions.SyntaxError'>: invalid syntax` error on this line: `if lyr.datasetName == inputlayer`               import arcpy, string, os     import arcpy.mapping as MAP          try:         MXDList = string.split(arcpy.GetParameterAsText(0), ";") #ArcMap document(s)         inputlayer = arcpy.GetParameterAsText(1) # featureclass         newwork = arcpy.GetParameterAsText(2) # Workspace              for MXDPath in MXDList:             MXD = MAP.MapDocument(MXDPath)             for dataframe in arcpy.mapping.ListDataFrames(MXD):                 lyrs = arcpy.mapping.ListLayers(dataframe)                   for lyr in lyrs:                     if lyr.datasetName == inputlayer                         lyr.replaceDataSource(newwork, "FILEGDB_WORKSPACE", "Center")         MXD.save()      I must be missing something obvious here? I was attempting to reference this forum thread. Thank You


Calculate neighborhood statistics for polygons?

I've been searching around for the answer to this (including here) and have yet to find it. I'm interested in finding out how to calculate a 'neighborhood sum' for vector, polygon data. I am aware of how to do this with rasters- the equivalent, then, would be to compute a focal sum for each polygon. I use ArcView 10. Thanks for your assistance!


Is there a way to automatically run the Workflow Manager Postinstallation (WMXPostInstallation.exe)?

I'm looking for a way to script the WMX post-install and, for example, provide the sde connection info as parameters. I don't see any command-line parameters for WMXPostInstallation.exe--are there any undocumented command line parameters. Or is there different approach to automating post-installs?


How to project the result of a QueryTask in ArcGIS Javascript API?

I have created a web map that displays point features based on a given date range. Our current projection is Oregon State Plane South. My boss wants me to change the map to use a Web Mercator projection. I am loading our web mercator basemap fine, but I'm having trouble projecting and displaying the points. What is the most efficient way of doing this?


Vector Layer Causes Movable White Box to Display Outside of Map Viewport

In OpenLayers 2.13.1, odd behavior arises with Vector Layers in my application where a white area appears outside of the map viewport and blocks the visual aspect of my controls. The controls actually still work if you click within the white area, but you don't see them. You can see an example of this in the picture below. The white area inside the red dots is not supposed to be there. As you pan the map left using a click and drag it gradually takes up more space. What would cause this? I'm using Google Chrome v36. It doesn't appear to do this in Firefox or IE. ![Example of the mystery white area](http://i.stack.imgur.com/Dwh6K.png)


Custom projection with mapnik

I would like to superimpose openstreetmap data over a raster image, using mapnik. My problem is that this image is not in a projection being defined by a SRS, I have some non-linear algorithm to run to be able to match a pixel and a geographic position. Is it possible to use some kind of custom converter for positions in mapnik ? Another possibility would be to modify every longitude/latitude in the database to set them to the corresponding pixels, but I'm afraid that it won't play well with the internal reprojections in mapnik. I still have the possibility to do everything by hand using the OSM API, but the result would be ugly. The processing will be done in python.


How to refine queries using GeoNames

The people on this site have been wonderful in helping me query a list of the worlds parks with something like this query: http://api.geonames.org/search?featureCode=PRK&maxRows=10&username=demo It was great to get that, but is it possible to query for the type of park it is (county/national/state/city) or also to break it down by state and country, or just query within one country? Is that asking too much or is that possible to do with that API? How could I get those values? And how do I get the total number of parks they have? Thanks very much!


ArcPy Data Access Insert Cursor not writing geometries to feature class?

I'm running ArcGIS 10.2.1 and am having troubles with the Insert Cursor in the arcpy module. I have an empty feature class in my geodatabase and have created the short script below to try and find the issue, but have not been able to. When I run the script, it executes fine, but when I look in the attribute table of the feature class afterwards it is still empty.               import arcpy          fc = r"C:\Users\djh\Desktop\topo_map\test.gdb\well_location"     cursor = arcpy.da.InsertCursor(fc, ["SHAPE@XY"])     xy = (206901.75, 5997594.47)          cursor.insertRow([xy])      I have copied this script straight from the "writing geometries" page on the ArcGIS help website, so I don't think it's a problem with syntax. Please let me know if there's a way to get around this issue.


Do you know a fairly up-to-date ArcExplorer tutorial video for non-gis staff?

Does anyone know of a fairly up-to-date ArcExplorer tutorial video to show to our non gis staff who will be using ArcExplorer? Thanks.


Is there a way to reshape graphics in ArcEngine?

Our GIS-tool should allow the customer to reshape self drawn (polygon) graphic elements, like one can reshape features in edit mode with the Editor. Is it possible to reshape graphic elements? If not, I think of turning the polygon graphics to features. **Update:** I would accept a simple 'No' :)


Is there a line symbology that also shows vertices?

**Is there such a thing as a line/vertices symbology?** If not a workaround? In some situations, particularly when editing, I would like to see my lines as well as all the vertices similar to the effect I get when using the Edit Vertices tool but on all features in the feature class not just the selected feature. The solution should be dynamic, without having to create a separate point layer but having one line features class loaded twice in the TOC is acceptable. Programmatic solution using an example (addin, ArcObjects & VB.Net) is acceptable. I have the ArcEditor license in case there is a trick to use with representations.


How to specify a port when creating a WFS service?

This is a arcgis forum posting simplified. When setting up a service using ArcCatalog 9.3.1 the URL port number is not included in the WFS GetCapabilities response. Is there a way to correct this?


how to find close and parallel lines

I need help with script for QA of water network. I need to find all lines that are almost parallel and close to each other less then 2 meters. The script have 3 stages:   1. add azimuth field and calculate azimuth.   2. iterate and find close lines.    3. If lines have almost the same azimuth - select them. I've used these lines here for first stage and need help with the loop that will go thru all the line and find close pairs.


Trouble finding YMin and YMax of a shapefile in ArcMap 10 and Arcpy

I want a python script that tells me the Xmin, Xmax, Ymin, and Ymax of a polygon. (I guess this is finding the extent of a polygon?) My current script gives me the correct the Xmin and Xmax, but it gives me the Ymin and Ymax of the data frame. I want the Ymin and Ymax of a polygon. Here is my current code:               # Specify the shapefile     shapeFile = "C:/Big_Creek_MapUnits.shp"          # Use the describe function     desc = arcpy.Describe(shapeFile)          # Print stuff out     arcpy.AddMessage(desc.extent.Xmin)     arcpy.AddMessage(desc.extent.Xmax)     arcpy.AddMessage(desc.extent.Ymin)     arcpy.AddMessage(desc.extent.Ymax)      Anyone have any solutions or tips?


Exporting map to jpg (multiple times with python)?

I set symbology and exported each raster in my mxd (one by one) to jpg file. My script is ok and it works (it is shown at the bottom). The question is: how can I customly set my legend? Now I have those standard labels ("High: #max.number" and "Low: #min.number"), see the image link. Is it possible to use a python script that sets labels different, for example "Max. value: #maximum number" and "Min. value: #minimum number"? I have 200 images and renaming each legend is time consuming... image link (example): ![enter image description here](http://i.stack.imgur.com/5aa8C.jpg)               MY SCRIPT:     mxd=arcpy.mapping.MapDocument("CURRENT")     for lyr in arcpy.mapping.ListLayers(mxd):         arcpy.ApplySymbologyFromLayer_management(lyr, "my_first_layer")     for lyr in arcpy.mapping.ListLayers(mxd):         #turn off all layers         lyr.visible = False     for lyr in arcpy.mapping.ListLayers(mxd):         #turn one layer on at a time and export ...         lyr.visible = True<BR>         arcpy.mapping.ExportToJPEG(mxd, "D:\\Users\\JPG_FILES\\"+ lyr.name                                           +".jpg",resolution=300)         lyr.visible = False


How Do I Snap a CSV to a SHP Using ArcPy?

I'm a veteran Python programmer very new to ArcGIS. I'm trying to do what seems like it would be a simple operation in arcpy, but I don't think I know enough about the ArcGIS terminology to do more than fumble around. Here's what I'd like to do:   1. Load a .shp file containing terrain features (lines).   2. Load a .csv file containing X-Y coordinates, setting the projection.   3. Snap the coordinates in the csv to the .shp file.   4. Save the new csv data to disk. I can do this in the ArcMap UI without any trouble, but automating this with arcpy is a confusing mess to me. To load the data files do I use CreateFeatureDataset_management, CreateTable_management, CopyFeatures_management, AddXY_management, Project_management, CopyRows_management, or something else entirely? I would very much welcome a tutorial, overview, or clue hammer. It seems that all of the ESRI documentation starts "in the middle" and I need to start at the beginning. I don't suppose there's something like a "record what actions I perform in the GUI and export it as an arcpy script" function?


Java GeoTools - Getting CRS from SRID

I might confuse between two things, but I need to do some calculation on my polygons (distance, area etc.). Using the WKBReader, I'm getting the geo:               WKBReader wkbReader = new WKBReader();     byte[] a = results.getBytes(8);     Geometry geo = wkbReader.read(results.getBytes("st_asbinary"));      But I'm not getting it in EPSG:4326. I want to use GeoTools to do the transform. How do I get the CRS from the geo object? (look at the 3 question marks)               CoordinateReferenceSystem sourceCRS = ???     CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326");          MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS);     Geometry targetGeometry = JTS.transform(geo, transform);      Any help will be appreciated.


Programatically take screenshot of map extent in ArcMap 9.3

Is it possible to programatically capture a screenshot of the current map extent (the map area with any active displayed layers) in ArcMap with the ArcObjects .NET SDK?


Convert distance in ESRI Android SDK

Hello I have a Polyline that I draw on the map and I would like to get its distance in meters. right now it's not working, basically what I have is                  distanceSeg=new Polyline();        double  len1=distanceSeg.calculateLength2D();        double m_len=              Unit.convertUnits(len1,Unit.create(AngularUnit.Code.DEGREE),Unit.create(LinearUnit.Code.METER));      The call to Unit.convertUnits throws a GeometryException with "invalid_call". Any ideas? thanks,


Intersect shapefile with raster, then determine proportion of each raster value?

Using the arcpy module in Python, I want to find the proportion of each pixel value within the boundary of an overlaying polygon. (The polygon is in a shapefile.) For example, there are 10 possible values in the raster, and intersecting the polygon 17% of the pixels are `class1`, 8% are `class2`, etc. This may involve use of the _Zonal Statistics_ tool, but apparently I'm having trouble working out the syntax programmatically.


How to hide all fields at once in QGIS 1.7

Is there a way to hide all the fields at once in QGIS 1.7? I see where I can hide one field at a time but I would like a button which does it all at once.


Why is Raster Layer not visible?

I have a raster dataset that is not visible in Data View, but it is listed in the Table of Contents. I have tried viewing it in ArcCatalog but it is not visible there either. Is there something I can do make it visible so I can perform further analysis?


TO_DATE query on ArcSDE for Oracle dataset failing?

I'm trying to use TO_DATE to query an Oracle SDE dataset. It's not working in the javascript API application so I tried to query the rest end point directly and I get the error: "Unable to perform query" on a java version of ArcGIS Server I also get the error "Please check your parameters" Here is the ESRI topic at 10 which shows how to_date should be used http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm The format:               Datefield = TO_DATE('yyyy-mm-dd hh:mm:ss','YYYY-MM-DD HH24:MI:SS')      My Query:               DateTest = TO_DATE('2012-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')      I have also tried not including the time and using / instead of - Oracle version is 10g. ArcGIS server is version 10 (.net and java tried)


uncaught typeerror: undefined is not a function

Using some examples from internet, I found this code that shows WMSGetfeatureinfo I don't know where's the problem: Here goes my code:               <!DOCTYPE HTML>     <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >     <title>MB_OL</title>     <link rel="stylesheet" href="css/google.css">     <link rel="stylesheet" href="css/view_css.css">     <link rel="stylesheet" href="../openlayers/theme/default/style.css" type="text/css" />

                Thank you guys, See ya.


I want to convert openlayers interface code to dojox code for pie chart use.So can we use same controls of openlayers map in dojox.If yes, how?

Is their any way to add same openlayers map control to dojox map like navigation,panel,panzoom


Symbology count in database form

I am working on a file which contains points from different areas of country. I have symbolized points. I want the feature count of respective area in a database form in .dbf file or excel etc. How can i get this count number (shown in figure) the dbf file. ![enter image description here](http://i.stack.imgur.com/6dIRs.jpg)