title: How to merge 48 separated US States layers into 1 layer, using MapInfo?

text: They are Census Block layers. The person on the website separated them into states so they can be download easier. I uploaded each states separate layer into MapInfo. Now I need to merge the files into one US Layer. They all have the same table structure and fields. I just downloaded MapBasic but I am unsure how to really use it.   I tried to laso the layers to select them all and then just save the selected. Only works on the top layer. Please help! Thank you all for your help in advance!


title: Reduce Tracking Data Set

text: I'm building an application that uses data from GPS units on board vehicles and displays it on a map. A lat/long is recorded every .5 seconds and a session can be many hours... this can add up to be a lot of data. The vehicles travel in a straight line the majority of the time but **the data needs to be very accurate when a vehicle turns a corner** , hence the high recording frequency. I'm storing the lat/longs as a POINT in a PostGIS/PostgreSQL database (This isn't set in stone). **I'm trying to find a way of reducing the dataset when displaying it on the map while still maintaining accuracy.** I have come up with a few options:   1. Group the data into 2 second blocks and average the lat/longs in each group. This is really easy to do but has too much information when traveling in straight lines and not enough when turning corners.   2. Group points together which are a certain distance (a vehicles length?) and time (4 seconds?... to ensure it won't be group if a vehicle moves over the same point half an hour later)   3. Calculate splines of the data (I don't know very much about this option). Perhaps PostGIS already provides this functionality? I'm simply looking for someone to point me in the right direction.


title: Time Slider in ArcMap 10 and Time Format Issues

text: I have an .xls file that contains Lat/Longs as well as a time stamp in this format: hh:mm:ss AM/PM When I create a feature class shapefile out of this .xls file, ArcMap reads it in and displays it fine, but the TIME field just shows 12:00:00 AM. What am I doing wrong here? I don't understand why ESRI makes it so difficult to do really simple things, like read in times correctly! Can anyone here show me the enlightened path to setting up my .xls properly or some other tricks that will enable me to enable the Time Slider feature? Many thanks!


title: How to store large amounts of text in an SDE table

text: I need to store a lot of text in a field in an SDE registered business table (an ITable, not a featureclass) - let's say 10,000 words roughly. I am using Oracle 10g and ArcSDE 9.1. I am programming with ArcObjects 9.2 sp6. It looks like the only option might be to use a BLOB as a CLOB is not usable with 9.1 (shame).   Can you use a BLOB in this way and how would you do it in ArcObjects code?


title: Open Source Training Materials

text: This recent question made me wonder if there are any open source training materials for GIS. By this I don't mean training specifically for open source software - of which I know there are some - but a set of general training materials for GIS and geographic data that are developed as an open source project. i.e. a set of training materials that are community developed, freely available, and with an open license. That anyone could take and use for general GIS training. If there isn't, does anyone think this would be a worthwhile project? Please add **license info** for the material you're suggesting.


title: Filter down geolocation using osm, google, or nokia js plugins

text: I have a simple map using leaflet and the osm geolocation plugin. Everything works fine, however I have not found alot of information on how to filter the search to say a city/ county. This would be something nice that way if you type in say a street name it will only zoom to one that pertains to that county. For osm I did find that they had a bounds:                var options = {             collapsed: true, /* Whether its collapsed or not */              position: 'topright', /* The position of the control */              text: 'Locate', /* The text of the submit button */              bounds: null, /* a L.LatLngBounds object to limit the results to */              email: null, /* an email string with a contact to provide to Nominatim. Useful                     if you are doing lots of queries */              callback: function (results) {             var bbox = results[0].boundingbox,                 first = new L.LatLng(bbox[0], bbox[2]),                 second = new L.LatLng(bbox[1], bbox[3]),                 bounds = new L.LatLngBounds([first, second]);                 this._map.fitBounds(bounds);            }      However I have tryed entering bounds yet nothing work if anyone knows how to do this or has any advice that would be great! thanks


title: Standalone applications using QGIS and environment variables

text: I've tried going through IRC to see if people can help me out with this, but the medium seems a little clumsy for making any answers clear, so I'm going to try this instead. I would like to program a standalone application using PyQGIS the way I can already program standalone applications using ArcPy. PyQGIS itself is straightforward. I have had no difficulty using running Python scripts within the QGIS console editor. However, in order to use the Python bindings in a standalone script, I am advised I must change the environment settings using a batch script (I'm using Windows Vista at home, so we're talking batch scripting for Windows). This has resulted in a mess on my end, as I don't really understand batch scripting, and I don't like the idea that I'm resetting an environment that needs to be a certain way for other applications I run. I'm having difficulty understanding why the instructions for creating these settings are so unnecessarily complicated, and why they don't amount to one line of code saying "go to where the bindings are, make the libraries I want available for this program to use). Certainly ArcPy doesn't require people to mess around with the computer's environmental settings, so I'm having difficulty understanding why PyQGIS does. It seems to me people will simply give up rather than teach themselves Windows Batch Scripting Language. Now, I notice that when I run a script in QGIS's console editor, it works. Granted, it also makes the rest of QGIS unusable after the script runs, so I have to restart QGIS again afterwards, but the script works exactly as I programmed it to work. But when I do so outside of the QGIS application, it does not. The issue does not appear to be that I have failed to import some Python package automatically imported by the QGIS application (qgis.core and qgis.utils) - I have those import statements in my standalone script, along with all the other package imports the script requires. This leads me to believe that the difference is that the QGIS application correctly sets external environment variables, but those variables are not set properly when I run it as a standalone script. Additionally, when I run the script as a standalone script, it gets through all of the code without throwing an error; it simply does not do what the code commands. When I run the script in the console editor, it does it all correctly. When I run it as a standalone, it creates a window, then immediately destroys it, while throwing no errors. So the intepreter understands everything I'm asking the script to do - it just won't do it. Here is the script:               from PyQt4 import *     from PyQt4 import *     from PyQt4.QtCore import *     from PyQt4.QtGui import *     from qgis.core import *     from qgis.gui import *     from qgis.utils import *     import Tkinter     from Tkinter import *     import sys     import os          qgishome = "c:/OSGeo4W/apps/qgis/"     app = QgsApplication([], True)     QgsApplication.setPrefixPath(qgishome, True)     QgsApplication.initQgis()          canvas = QgsMapCanvas()     canvas.setCanvasColor(Qt.yellow)     canvas.enableAntiAliasing(True)     canvas.show()          layer = QgsVectorLayer(r"c:/GIS Data/fed308/cpc.shp", "Ridings", "ogr")     reg = QgsMapLayerRegistry.instance()     reg.addMapLayer(layer)     canvas.setExtent(layer.extent())     canvas.setLayerSet([QgsMapCanvasLayer(layer)])     QgsApplication.exitQgis()      Please...is there some way I can run this script outside of QGIS and have it work as it does within QGIS (ideally without shutting things down at the very end)? QGIS is a wonderful program, and PyQGIS seems as intuitive as ArcPy does and would be a real advantage for an open source software to have - but if people have to go through all the hoops I have gone through already, and still not have standalone application access to PyQGIS libraries the way they do have access to ArcPy, it seems to me PyQGIS won't be of much use to people. I hope I'm wrong and this is easier than it thus far has been. Does anyone have a solution?


title: Finding poi using st_dwithin in postgis

text: I am not familiar with gis or writing sql, so my understanding in this field is lacking. I have a hundreds of lat/lng geographic coordinates stored in a single table called Places like this:               ID | Coordinate     -----------------------------     1  |  POINT(192.938 -28.348)     2  |  POINT(57.349 -88.482)      They are in 4326, and I'm using geography type. I want to find all nearby points that are within 10 miles of a given point. I want to use st_dwithin(), but I don't understand how to use it. I came up with this, but it doesn't seem quite right:               SELECT * FROM places WHERE ST_DWithin(places.Coordinate, ST_GeographyFromText('POINT(195.888 -28.348)'), 16093.4);      16093.4 metres is 10 miles. How do I get all points within 10 miles of a given point (in this example, from POINT(195.888 -28.348))?


title: projection error on Leaflet map

text: I am trying to add a converted shapefile (now a geojson) to a Leaflet basemap, using EPSG 26986, so I tried using proj4leaflet to reproject it. However, I keep getting an error message "phi2z has NoConvergence" - in fact, I seem to be getting one message for each point feature in the shapefile (there are over 800). I'm not sure why I'm getting this message - anyone have any thoughts?               Proj4js.defs["EPSG:26986"] = "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs";     var map = L.map('map').setView([42.317007, -71.088560], 12);     L.tileLayer('http://{s}.tile.cloudmade.com/655da89c06dd43a7aee306e594341325/997/256/{z}/{x}/{y}.png', {         attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © CloudMade',         maxZoom: 16     }).addTo(map);          $.getJSON("image_locations.geojson", function(data) {         data.crs={             "type": "name",             "properties": {"name": "urn:ogc:def:crs:EPSG::26986"}             };         L.Proj.geoJson(data).addTo(map);     });      live version here: http://altani.continuation.org/trilobites/leaflet.html


title: QGIS Server loads only one .qgs project file

text: I installed **QGIS Server** in WinXP via OSGeo4W and runs great. But the problem is, it loads only one .qgs project file. I restarted Apache but it is same. I use QGIS 1.9 default WMS client. I noticed that QGIS Server only load one project file and **it looks to the filename first char**... For example if i generated project files named as **abc.qgs** and **xyz.qgs** it loads abc.qgs. Do you have any idea ???


title: Is there equivalent to ArcGIS Feature to Polygon tool available?

text: Is there a method, combination of tools or a tool which can achieve the same as the **Feature to Polygon** tool? I want to get the same result just like I would use that tool.


title: How can i login in Geoserver from application?

text: I'm looking for advice how to login on Geoserver from php. I found much tutorial how to work with Geoserver through REST api and cURL: create workspaces, stores, etc. But still cant find how to login on Geoserver and still login to whole session. Its possible? In forums i find something but its not work.   Any advice? **UPDATE** I change Acegi security to Spring Security and now code looks:               function loginGeoserver($username, $password) {          $geoserverURL = "http://localhost:8080/geoserver/j_acegi_security_check";          $post = http_build_query(array(             "username" => $username,             "password" => $password,     ));          $context = stream_context_create(array("http"=>array(         "method" => "POST",         "header" => "Content-Type: application/x-www-form-urlencoded\r\n" .                 "Content-Length: ". strlen($post) . "\r\n",         "content" => $post,     )));          $page = file_get_contents($geoserverURL, false, $context);               for($i = 0; $i < sizeof($http_response_header); $i++){              $headerLine = $http_response_header[$i];              $pos = strpos($headerLine, 'Set-Cookie');              if ($pos === 0) {                 $str = explode("=",$headerLine);                 $value = explode(";",$str[1]);                 $cookieValue = $value[0];                 break;         }          }          $cookieName = "JSESSIONID";     $cookieDomain = "http://localhost:8080";     $cookiePath = "/geoserver";     $cookieExpiration = 0;          setcookie($cookieName,$cookieValue,$cookieExpiration,$cookiePath);     echo $page;     return $cookieValue;     }      Now its return Geoserver index page but nothing more i still can't log in. How can i make Acegi authorization?


title: How can I assign multiple classes to a layer in TileMill?

text: In my TileMill project, I have `my-class` that is assigned to most of my layers. I also have `my-other-class` that I want to assign to just a few of those layers. I tried assigning 2 classes using a comma, a semicolon, and a period, but all methods either gave me an error or failed silently. Is it possible to assign multiple classes to a layer?


title: Does OpenStreetMap have property boundaries?

text: I want to move from Google Maps to OpenStreetMap. I was planning on using MapBox to create the tiles if that makes a difference. OpenStreetMap seems to lack property outlines, which Google Maps has. I was wondering if this information is in OpenStreetMap but hidden, or if I would have to make my own custom layer. A few screenshots to help show what I'm talking about. First Google Maps, then MapBox below. ![Google Maps with property outlines](http://i.stack.imgur.com/LZkjf.png) ![MapBox without property outlines](http://i.stack.imgur.com/7ck1p.png) So I would like to have the light grey lines and property numbers in the OpenStreetMap version. The map is for New Zealand. Thanks in advance for any help. **Update:** Turns out the data is freely available here: https://data.linz.govt.nz/layers/category/property-ownership-boundaries/


title: PostGIS ST_Intersection of polygons can return lines

text: When clipping the polygons of one table with polygons in another, ST_Intersection can return a set of results that can be handled with ST_Dump. The returned multiple geometries are not necessarily ST_Polygon but also ST_LineString (probably also a point). So when running a query               INSERT INTO c (geom)       (SELECT (ST_Dump(ST_Intersection(a.geom,b.geom))).geom       FROM a INNER JOIN b ON ST_Intersects(a.geom, b.geom));      when trying to populate the table "c" with clipped polygons, it fails with ERROR: Geometry type (LineString) does not match column type (Polygon) I did another nested SELECT statement so only the polygon geometries came through, like:               INSERT INTO c (geom)       (SELECT geom FROM         (SELECT (ST_Dump(ST_Intersection(a.geom,b.geom))).geom         FROM a INNER JOIN b ON ST_Intersects(a.geom, b.geom))) AS cl         WHERE ST_GeometryType(cl.geom)='ST_Polygon');      As this is a bit cumbersome I am wondering if there is a more elegant solution for dropping invalid geometries?


title: I get an ERROR 000622 when it checks for arcpy.DefineProjection_management

text: So the purpose of my code is to create a loop that copies shapefiles from a folder to my folder and change its projection 'GCS_WGS_1984'. Each shapefile starts with the year follow by the month and '_rfe.shp' (ex. 200701_rfe.2007) which is why I made the loop the way it is. So when the first stage of the loop starts I get a error saying that in my arcpy.DefineProjection_management function, my projection is not valid. How can I get my projection to be 'GCS_WGS_1984' [ Traceback (most recent call last): File "C:\Users\Elvis\Desktop\Spring\Geog376\lab05\lab05.py", line 32, in arcpy.DefineProjection_management(shp, projection) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\management.py", line 8184, in DefineProjection raise e ExecuteError: ERROR 000622: Failed to execute (Define Projection). Parameters are not valid. ERROR 000628: Cannot set input into parameter coor_system. ]                   #import modules         import arcpy         import os                    # set workspace(This is where all your processing will be done)          #arcpy.env.workspace = 'S://376/spring14/eherrer2/'      arcpy.env.workspace = 'C://workspace/'                    workspace = 'C://workspace/'          otherFolder = 'C://folder/'              backup = []             for shapefiles in range(1,13):             arcpy.CopyFeatures_management(outPut+'2007'+str(shapefiles).zfill(2)+'_rfe.shp',inPut+'2007'+str(shapefiles).zfill(2)+'_rfe.shp')             shp = '2007'+str(shapefiles).zfill(2)+'_rfe.shp'             describeShp = arcpy.Describe(shp)             shpSR = describeShp.SpatialReference                  projection = 'GCS_WGS_1984'             arcpy.DefineProjection_management(shp, projection)             print 'GCS {0}'.format (shpSR.GCSname)


title: How to perform Viewshed Analysis in ArcGIS for Desktop 10.1?

text: I am trying to understand viewshed analysis in ArcGIS 10.1. After you add fields such as RADIUS1, AZIMUTH1 to your observer vector attribute table, does it automatically calculate visible/non-visible areas within the specified radius and azimuth? Or do you have to use a different tool? What I really need to find out is the areas visible from each monument location (including whether the monuments themselves are visible to each other, if they are close), in such a case what would be the best way to approach this? Also, is it necessary to always convert xy coordinates of sites (already added as File Geodatabase Feature Class) to Observer points using observer points tool? I am only asking because for some areas, I have more than 16 monuments and I think you can only have a max of 16 observation points. Any help would be massively appreciated!


title: Using data from table to make buttons in Mapbasic?

text: I have select Query that selects distinct value from a column. Is is possible to use these distinct values in my mapbasic program to make buttons and button labels? More Info: > SQL Query : Select vendor from table_name ; Now the selected vendors name are used to make buttons but I don't know how to get each row from table and put it in mapbasic variable. I am used to JAVA programming but don't know how it works in mapbasic. In java program we store the table in resultset and loop through it to get the row of column. I need to know how is it done in map basic. I read the mapbasic guide but could not get information about this kind of stuff.


title: UK Postcode District Aggregation

text: I've had a request recently to generate a map which includes UK Postcode districts, ie aggregations of postcodes based on the first section of the code (NW2, B1, E11 etc.). From what I've read, these aren't available freely (Postcode Shape Files for the UK). Is there a way of scripting aggregation of boundaries in either QGIS (or possibly R)? I've done this sort of aggregation before using MapBasic but no longer use MapInfo (plus it gave really messy boundaries). I'm thinking I may use Voronoi regions rather than the actual postcode boundaries as this will be easier in terms of file handling (my postcode shapefiles are split across lots of files so easier just to run Voronoi on the OS Codepoint data set, plus I imagine this will give cleaner, if less accurate, boundaries)


title: How to display dynamic raster (lidar) data on a Web map?

text: I have some high quality LiDAR data. I need to process it dynamically, and update a field (not elevation field) depending on my input and elevation at that point. Once this is done, I need to display this raster data on Web Map (Bing Map, Google Map etc.) as real time as possible. Here is what i have been able to do till now: I have come up with some scripts using ArcGIS Python Lib, that process my lidar clips, add a field , update that field according to the input coming in. So now i basically have all the points on raster classified into 3 categories every 5 mins. If i view this raster in arcGIS i can view nice 3 colored raster overlapped on a base map. But now i need to render these raster clips on a Web map. My first though was to polygonize these classified clips and display the polygons on a JavaScript Map. But polygonization takes a lot of time, and thus its eliminated. Now Other option I have is to to use GeoServer's Raster rendering capabilities to display the images. Then use this WMS i created, to overlap it on Bing Maps. This is where i am stuck. I have no clue how to automatically get Rasters that Geoserver supports, like Geotiff, jpg200o etc from my ADF files, render them on open layers first, then try to overlap them on bing maps. If someone knows of any good tutorial that does this kind of rendering of dynamically changing rasters on map , will be great if you could point me to it. Also if there are some other better approaches to get this kind of system in place, Please suggest. I am open to almost any solution. Thanks PS: I am pretty good at web programming, web services,databases and scripting etc. But new to working with Lidar and Geo-Rasters.


title: How to read MapInfo .tab files in ArcPy?

text: I want to use arcpy (the ESRI install of python 2.65) to analyse tab files...can this be done directly or do I need to convert them to shp files...if so would it be possible to do something like               tabs=glob.glob('*.tab') and then     for tab in tabs      some function to convert tab to shp tab_shp1.shp       > (maybe ogr2ogr -f "ESRI Shapefile" mydata.shp mydata.tab) not sure how to > call an external command line.                shpObj=arcpy.Describe(tab_shp1)      etc      I know there is functionality in FWTOOLS via OGR but can I access this via the ESRI python 2.65 install? We have both tab and shp data and I am trying to create a master spatial index of all the datasets we have. I have written the code for ESRI formats but want to include the tab's if possible. Thanks in advance,


title: How to produce multiple map PDF from Excel file with each record being two lat/long pairs?

text: I need to produce multiple maps from a single excel file consisting of approximately 1,500 records. Each record contain two lat/long pairs (four points) and I need a PDF map of each record zoomed to the extents of the four points. Can this be done using data driven pages or through the ArcPy mapping python object? Thanks to all. The records are part of a task related to public transport planning. Four points, four lat/long pairs. The four points are "pairs" (origin/destination and boarding/alighting). I'm using ArcGIS 10.1. Please forgive any confusion.


title: How to save a CompositeSymbol in a text file using Flexviewer 2.2?

text: I am using Flexviewer 2.2 draw widget that allows us to save text or shapes in a text file. I had created a compositeSymbol containing 3 textSymbols instead of a textSymbol, now I want to save it in a TXT file. Still no success because compositeSymbol is not listed while it checks for the child graphics on the layer whose information regarding size, color and opacity is to be added into TXT file. In simple I can say that I had drawn a compositeSymbol on graphicsLayer and now I want to save it in TXT. Any help would be appreciated. Thanks


title: Performing cluster analysis in R with Point Datasets

text: I am a R-Beginner, but I want to use it for some spatial statistics. I want to check the relation between the occurrence of ill persons and the existence of water in a area of interest. To give you a more specific use case, I've created some example datasets: **Table - Persons:** http://pastebin.com/WET3jmks **Table - City:** http://pastebin.com/emnKiGJp **Table - Water:** http://pastebin.com/5saUPKbb Firstly I want to plot them in a map including a basemap. This already works!               persons_dataframe = read.csv("persons.csv", header = TRUE)     city_dataframe = read.csv("city.csv", header = TRUE)     water_dataframe = read.csv("water.csv", header = TRUE)     # plot them on a map     # load used packages     library(RgoogleMaps)     library(ggplot2)     library(ggmap)     library(sp)          persons_ggplot2 <- persons_dataframe     city_ggplot2 <- city_dataframe     water_ggplot2 <- water_dataframe     gc <- geocode('new york, usa')     center <- as.numeric(gc)       G <- ggmap(get_googlemap(center = center, color = 'bw', scale = 1, zoom = 10, maptype = "terrain", frame=T), extent="device")     G1 <- G + geom_point(aes(x=POINT_X, y=POINT_Y ),data=city_dataframe, shape = 22, color="black", fill = "yellow", size = 4) + geom_point(aes(x=POINT_X, y=POINT_Y ),data=persons_dataframe, shape = 8, color="red", size=2.5) + geom_point(aes(x=POINT_X, y=POINT_Y ),data=water_ggplot2, color="blue", size=1)     plot(G1)      This has the following output: ![R Plot](http://i.stack.imgur.com/2k6Pd.png) No I want to create something like a cluster map. I've already looked for some useful packages and I've ended with the packages _SpatialEpi_ and _DCluser_. Both provide some functions, which might be useful. But at this point I don't know, how to proceed. Some open questions:   1. Is it right that I need polygons to cluster the dataset? I've read it in the SpatialEpi pdf but I only have these point datasets.    2. Additionally I don't know, if the fact that all points are located on only three locations might be a problem?!  Do you have a suggestions how to continue with my work?


title: Querying MapServer using WFS functionality

text:
I'm trying to display a shapefile using OpenLayers and Mapserver. Instead of overlaying it as a png, I want to return a vector, in this case a KML file. My HTML file (located in the same folder as `mapserv` on my server contains the following `html/javascript`:                             <title>OpenLayers Example</title>

                           The shapefile, `MLSOA`, is projected using EPSG:27700. My mapfile, is called `wfs.map` is as follows:               MAP # start of map file          NAME demo     STATUS ON     SIZE 420 300     EXTENT 82299.5 5002.78 655979.76 657599.55     UNITS METERS     SHAPEPATH "shapefiles"     IMAGECOLOR 255 255 255       PROJECTION         "init=epsg:27700"       END          OUTPUTFORMAT       NAME "kml"       DRIVER KML       MIMETYPE "application/vnd.google-earth.kml.xml"       IMAGEMODE RGB       EXTENSION "kml"     END          WEB     #TEMPLATE "template.html"     IMAGEPATH "/home/webapps/htdocs/output/"     IMAGEURL "/output/"       METADATA         "wfs_title"          "MLSOA"         "wfs_version"           "1.0.0"         "wfs_connectiontimeout" "60"         "wfs_maxfeatures"       "10"         "wfs_enable_request"   "*"       END     END            LAYER          NAME "MLSOA"          TYPE POLYGON          STATUS DEFAULT          CONNECTION "http://mysite.com/mapserv.cgi/wfs?&map=wfs.map&"          CONNECTIONTYPE WFS          CLASS            STYLE             COLOR 255 128 128               OUTLINECOLOR 96 96 96             END             END          END     END      To check that this works, when I run:               http://mysite.com/mapserv.cgi/wfs?map=/home/urbmet/webapps/htdocs/wfs.map&SERVICE=WFS&REQUEST=GetCapabilities&VERSION=1.0.0      I get the following output.                     so I assume that it is working ok. However when I open my HTML file, the post query appears to run ok (as far as I understand):               <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">     <wfs:Query typeName="feature:MLSOA" xmlns:feature="http://mysite.com/mapserv.cgi/wfs?&map=wfs.map&">     <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">     <ogc:BBOX>     <ogc:PropertyName>the_geom</ogc:PropertyName>     <gml:Box xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">     <gml:coordinates decimal="." cs="," ts=" ">-55.50109375,43.134977942511 55.24109375,59.593781185019</gml:coordinates>     </gml:Box>     </ogc:BBOX>     </ogc:Filter>     </wfs:Query>     </wfs:GetFeature>      but the response from the server is as follows:               <?xml version='1.0' encoding="ISO-8859-1" ?>     <ServiceExceptionReport version="1.2.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">       <ServiceException code="NoApplicableCode" locator="mapserv">     msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed     msWFSLayerWhichShapes(): WFS connection error. WFS request produced unexpected output (junk?) for layer MLSOA.     msBuildWFSLayerPostRequest(): WFS connection error. MapServer supports only WFS 1.0.0 or 0.0.14 (please verify the version metadata wfs_version).     msWFSLayerWhichShapes(): WFS connection error. WFS request produced unexpected output (junk?) for layer MLSOA.     msWFSLayerWhichShapes(): WFS connection error. WFS request produced unexpected output (junk?) for layer MLSOA.     msBuildWFSLayerPostRequest(): WFS connection error. MapServer supports only WFS 1.0.0 or 0.0.14 (please verify the version metadata wfs_version).       </ServiceException>     </ServiceExceptionReport>      I'm not sure what to do to fix this error message. I've checked that Openlayers is sending a query with `version: "1.0.0"` encoded, but the other errors are not as clear. What can I do to fix this?


title: Spatialite in .NET Application - AccessViolationException was unhandled

text: I am trying to use Spatialite in a .NET application using the System.Data.SQLite provider. Interestingly enough, everything works as expected except an error gets thrown at the very end when the connection is closed. The specific error is "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." The same thing happens if I wrap this function is a using statement. If I remove the conn.Close() it still bombs out. Any ideas?               try                 {                     conn = new SQLiteConnection(connectionString);                     conn.Open();                     cmd = conn.CreateCommand();                          cmd.CommandText = @"SELECT load_extension('libspatialite-2.dll');";                     cmd.ExecuteScalar();                          cmd.CommandText = "SELECT AsBinary(Geometry) AS WKB from country";                     rdr = cmd.ExecuteReader();                          while (rdr.Read())                     {                         //do work                     }                      }                 catch                 {                     // error handling here                 }                 finally                 {                     if (!rdr.IsClosed)                         rdr.Close();                          rdr = null;                     cmd = null;                     conn.Close();                     conn = null;                 }


title: ArcGIS10 Trace tool not honoring classic snapping

text: I have just installed service Pack 3 for ArcGIS 10 Desktop. Normally I use the new snapping environment, so I am unsure whether this is a new issue with SP3 or if it has been the case the whole time. I want to cut a polygon in layer 1 using a trace on overlapping polygons from layer 2. So to be sure I wasn't accidentally snapping to the wrong layer (as there are various other lines and points in the map), I turned on classic snapping and have only the edge in layer 2 selected. The trace is still following other lines and edges, totally ignoring my classic snapping settings. Has anyone else come across this, or do you know if it is a bug? Any comments are appreciated


title: Programmatic Configuration of ArcGIS Server data and layers?

text: Hey all, I'm trying to figure out how people in the ArcGIS Server world script configurations. In the GeoServer world we have the REST Config API, which lets you configure connections to a database or files, publish new layers, update their service metadata, cache the layer, change available and default styles, default projections, etc. What's the equivalent for ArcGIS Server? As far as I could tell the REST API there just allows access and manipulation of features and images, but doesn't let you actually publish new data. Or you can use the admin GUI, but I couldn't find a way to script the types of actions an admin would take. I've been scouring the docs, so if someone can point me to a reference that would be great. Thanks!


title: How to export selected records to a .txt file

text: I am working on a project where I need to create a tool/method to export the attributes of selected features to a .txt file. I have point features containing addressing information, and the tool would need to export the attributes from one field to a text file. I have been looking through the ArcPy documentation and found Copy Rows in the Tables Toolset - it can export selected features, but the only output option is exporting to a database table. It seems like this should be a simple task, since exporting to a .txt file is one of the options when manually exporting from a table. The ultimate goal here is to create a tool and publish it as a geoprocessing service to be used in a web application. I would prefer to find a solution using Python, which I am just beginning to work with and have a little familiarity. I am currently working with ArcGIS Desktop 10 SP1.


title: How to deal with direction (CW, CCW) of circles, in particular with shapely?

text: I am translating an input that describes zones by mixing segments and arcs. Arcs are given by a center, 2 points (beginning/end of arc) and a direction (CW or CCW). In a first prototypes using GDAL, I inspected once how the points were sorted after the call to .buffer() and made the assumption that they will always be in the same direction. Then I moved my code to shapely, and it looks like the direction used is not the same, so I'm back to inspecting and hardcoding the internal direction. But my guess is that this is not the correct way of dealing with circle direction. Should I check after every calls to .buffer() the direction in which the points are ordered ? If so, is there a well known method to compute the direction ?


title: How to clip raster by multiple polygons in multi rasters?

text: Using QGIS, I want to clip a raster by multiple polygons contained in a single shapefile. I read that `gdalwarp` can clip my raster by multiple polygons BUT the output is a single merged clipped raster. I want to have one clipped raster per polygon. If I have 20 polygons, I want to have 20 clipped rasters at the end :-) I can't find any option of `gdalwarp` that allows me to do this. Do you have any idea ?


title: How to perform Raster Reclassification in QGIS?

text: Is there a way to do reclassify a raster image to Qgis? In Arcgis you can do that in Spatial analyst Tools→Reclass→Reclassify Any ideas? ![screenshot of Reclassify window](http://i.stack.imgur.com/gozub.png)


title: How can I improve my Ray casting algorithm?

text: I have been using the following function below which have been working well to decide if a point in the polygon but once I have many points which is building the polygon say over few thousand it seems to fall. Is there any deficiency in this function need to be improved? Thank you.               DELIMITER $$     --     -- Functions     --     CREATE DEFINER=`root`@`localhost` FUNCTION `GISWithin`(pt POINT, mp MULTIPOLYGON) RETURNS int(1)         DETERMINISTIC     BEGIN           DECLARE str, xy TEXT;      DECLARE x, y, p1x, p1y, p2x, p2y, m, xinters DECIMAL(16, 13) DEFAULT 0;      DECLARE counter INT DEFAULT 0;      DECLARE p, pb, pe INT DEFAULT 0;           SELECT MBRWithin(pt, mp) INTO p;      IF p != 1 OR ISNULL(p) THEN      RETURN p;      END IF;           SELECT X(pt), Y(pt), ASTEXT(mp) INTO x, y, str;      SET str = REPLACE(str, 'POLYGON((','');      SET str = REPLACE(str, '))', '');      SET str = CONCAT(str, ',');           SET pb = 1;      SET pe = LOCATE(',', str);      SET xy = SUBSTRING(str, pb, pe - pb);      SET p = INSTR(xy, ' ');      SET p1x = SUBSTRING(xy, 1, p - 1);      SET p1y = SUBSTRING(xy, p + 1);      SET str = CONCAT(str, xy, ',');           WHILE pe > 0 DO      SET xy = SUBSTRING(str, pb, pe - pb);      SET p = INSTR(xy, ' ');      SET p2x = SUBSTRING(xy, 1, p - 1);      SET p2y = SUBSTRING(xy, p + 1);      IF p1y < p2y THEN SET m = p1y; ELSE SET m = p2y; END IF;      IF y > m THEN      IF p1y > p2y THEN SET m = p1y; ELSE SET m = p2y; END IF;      IF y <= m THEN      IF p1x > p2x THEN SET m = p1x; ELSE SET m = p2x; END IF;      IF x <= m THEN      IF p1y != p2y THEN      SET xinters = (y - p1y) * (p2x - p1x) / (p2y - p1y) + p1x;      END IF;      IF p1x = p2x OR x <= xinters THEN      SET counter = counter + 1;      END IF;      END IF;      END IF;      END IF;      SET p1x = p2x;      SET p1y = p2y;      SET pb = pe + 1;      SET pe = LOCATE(',', str, pb);      END WHILE;           RETURN counter % 2;           END$$          DELIMITER ;


title: Field Data Collection Tool

text: I'm new to Stackexchange so please forgive me if I make an error in how I ask my question. I'm investigating the options available to my employer for the development of a Geological Field Data Collection tool. We would like to develop an Android app that can run disconnected from the internet (we will be operating in some of the remotest places in the world where there are no wireless communications available) and allow teams of field geologists to input their findings into either a surficial or bedrock geological database. My question is: Does anyone: have any advice, know of things to stay clear of that could cause problems, know of any software that will help us meet our objective... or any other knowledge to impart that relates to this project. I will give a summary of what I have come up with so far as well as a bit of background info of the system design that I have envisioned that will work with what we have already. We have a Windows Mobile ArcPAD application that runs on Getac Mobile PC/GPS and was used previously for the last phase of our project, but being that several years have passed and technology has progressed we want to take advantage of touchscreen capabilities and get away from having to interface with teeny little icons & keyboard with a stylus. Okay, so here's what I see: There is a laptop for daily route/traverse planning with a repository of shapefiles to be used as a background/basemap for the system. The team leader opens an application that allows him/her to select an area and draw a "traverse" (linear route for the team to follow) on it and then load this onto a tablet. The leader does this for up to 10 different 2 person teams per day. The tablets are then distributed to their teams and they head out with the tablets GPS activated and guiding them to the beginning of their traverse. Once they are there they follow the route laid out for them and identify geological features along the way. The features are points lines or polygons and have attributes that are available to be chosen from drop down lists, radio buttons and checkboxes. This will standardize the language used to describe the features identified. At the end of the day the teams return their tablets, and the data management leader then imports and incorporates the days findings into an intermediary geodatabase that holds the data until the crew returns to civilization. Once they are back the data is loaded into a master Geological spatial database with surficial and bedrock manifolds. Does anyone know of anything that I should be aware of? I'm thinking: Develop a front end program with C# with Xamarin that uses SQLite to store the geological data. Is there an open source C# shapefile viewer out there that could be incorporated easily? How hard is it to use the GPS in the tablet to collect data? Thanks, Wish me luck, any advice / comments are greatly appreciated, I look forward to hearing what any of you might have to say.


title: MapPoint 2006 - can I have custom maps?

text: I have Microsoft MapPoint 2006 installed as a part of a larger system for home/social care planning. The maps and the address information points are quite incomplete and I would like to roll out my own layers that are way better. Can anyone explain how to do this or perhaps point to where I can find the information on the subject?


title: How can I find the farthest point from a set of existing points?

text: I have a set of points as a shapefile and I want to find (the coordinates) of a new point which will have the longest possible distance from each of the existing points. Is that possible? If yes, is there any sample VB code? Thanks Demetris


title: Importing a Geotiff into WhiteBox

text: I am looking for an opensource solution to create a seamless air photo mosaic. I came across WhiteBox from the University of Guelph which seems like it might do the trick, but it does not support GeoTiff Compression. Is there a way to convert Geotiff's into a non-compressed format that WhiteBox would be able to use? I'm also open to other software that can do air photo mosaics.


title: Creating routable network table in PostGIS

text: I am trying to create the routable network table, as per http://underdark.wordpress.com/2011/02/07/a-beginners-guide-to-pgrouting/. Everytime I do it in PostGIS extension, QGIS crashes. The area is no so huge, consist of one British county. I'm also trying to do it with with pgAdminIII of PostgreSQL, it takes ages to do so. I do have the limited knowledge of queries, indexing etc. so I am not sure how to speed the process up. Is there something developed since 2011 (the last posts on that subject I found with this date) would enable me to do it efficiently? Thanks **UPDATE:** (per @Pawel, Feb 19, 2013) I have reinstalled PosrgreSQL and PostGIS. When I am trying to execute assign_vertex_id() I have: function assign_vertex_id(unknown, numeric, unknown, unknown) does not exist. What would be the problem?


title: How to determine maxResolution and numZoomLevels in dynamic environment?

text: I want to determine resolution and number of zoom level dynamically instead of inputting the values in openlayers client. When the user move the position on map by dragging or panning control, I can track the updated Lat-lon and get the min and max lat-lon. Now, I would like to calculate the resolution and maxzoomLevel for newly calculated latlon position when each time user changes the map position. Thanks


title: Is it possible to use WMTS in QGIS?

text: Is it possible to use WMTS e.g. by http://data.wien.gv.at in QGIS? * * * ich möchte gerne daten der stadt wien als WMTS-Layer in qgis hinzuladen. ist das überhaupt möglich? ich bin kein profi und bitte daher um unterstützung. darum geht's > http://data.wien.gv.at/formate/geowebservices.html den wms- dienst konnte ich laden, an wmts bin ich aber gescheitert. danke für eure beiträge! SG


title: Making tracking data available to Geoserver

text: I have tracking data from GPS, which gives latitude, longitude, heading, etc. Right now it's stored in a non-standard database (Accumulo) and I'm looking into how best to make the data available for Geoserver to be displayed using OpenLayers. The data is not in any standard format either, it arrives as part of complex JSON files that report more information. Essentially I have some text based lat/long data that I can put into anything, though I'd prefer to avoid using PostGIS if possible so I don't have to maintain two databases. What are my options for getting the data into Geoserver?


title: OpenLayers and GeoJSON - problem projecting EPSG:4326

text:
I'm trying to project some GeoJSON data but it ends up at 0,0. I've looked at other posts and tried those solutions to no avail. Can anyone help? Here is the code:                           <title>OpenLayers Example</title>

                       Thanks in advance for any help Mini`


title: Printing a label from a point layer attribute on a raster layer (GRASS)

text: I am interpolating with boundaries using v.surf.idc in GRASS. It works wonderfully and I fully recommend it. I am creating an animation and I use v.surf.idc to generate sequential interpolated raster layers that will be used in an animation. Everything works fine and the animation looks good. You can see how it looks here I have a shape file that has position X, Y, name, a pair of (Temperature, timestamp) at each location (For example: T01, TS1 -> 12.5, 2013-06-12 12:45:00). At interpolation time I specify the temperature attribute which is used for interpolation for each point. To automate the process for all time snapshots I use a bash script in which I increase the number (e.g. T02) and call v.surf.idc with the new arguments and do interpolation again. And so on until I go through all the time attributes (T01 - > T200) of the point layer. My question is if there is any way that I can also extract the timestamp attribute and "glue" it at a certain position on the raster layer? It will be nice for the animation to show the time progress. Or perhaps there are much better solutions than what I am asking for? Thanks.


title: save polygon from image to PostGIS database

text: I'm working on a software to detect buildings from satellite imagery. so far I have managed to separate the building with other objects of the image. My problem now is how to save every building in the shape of a polygon into a PostGIS database? Are there libraries available ata function in java and PostGIS?![enter image description here](http://i.stack.imgur.com/m1n0a.jpg)


title: Can I get the coordinates of country borders from Google Maps?

text: I need to get the coordinates of a country's border (e.g., Iraq) from Google Maps. How can I do that? ![enter image description here](http://i.stack.imgur.com/3Vlya.jpg)


title: How can I create a radially-symmetric surface from a profile in ArcGIS 10?

text: I have created an expected profile for a radially-symmetric feature (an impact crater) using numerical modelling and would like to compare this with the actual topography (a DEM). My plan is to do this by making a surface/3d polygon based on the profile and then subtracting one from the other. However, I can't figure out a way to create a surface based on the profile. Is there a way to do this in ArcGIS 10?


title: FAHP/AHP for GIS in free software?

text: Anyone knows a free GIS software that implements the Analytic Hierarchical Process (or its fuzzy extended version) ? And while asking, have anyone had any experience with a commercial GIS that implements this process, if so, it would be nice to share it. Doing research, I've come to understand that IDRISI 17 implements it, ArcGIS has a extension as well. We intend to apply Fuzzy AHP to identify waste disposal areas, the hierarchy and layers are already prepared but we're still yet to find a tool to automate the calculations (weights of criterias), if we find none, we think about going the MATLAB way but I would here be keen to receive your suggestions. Thanks.


title: How to intersect more than two layers? Is there a quick way?

text: We have three layers, income, obesity and fast food restaurants for England and we wanted to find districts where they all intercepted. So we did a combination of two layers at a time to find where all three crossed over, but is there a quicker way of doing this in one step??


title: Invalid Topology [Topoengine error] ArcGIS 10.1

text: I'm trying to run the Identity function on two large data sets but it fails every time. I don't think it is a lack of hardware as I can run other processes on the same data sets. I've already updated software, and added the 64 bit geoprocessing add-in, checked and repaired geometry, and done the fix in KB29559. Executing: Identity DudleyStamp OA2011 "D:\Case Studies\National2\National.gdb\DudleyStampOA11" ALL "1 Meters" NO_RELATIONSHIPS Start Time: Wed May 08 21:11:43 2013 Reading Features... Processing Tiles... Assembling Tile Features... ERROR 999999: Error executing function. The table was not found. The table was not found. [DudleyStampOA11] The table was not found. The table was not found. [DudleyStampOA11] Invalid Topology [Topoengine error.] Failed to execute (Identity). Failed at Wed May 08 21:45:41 2013 (Elapsed Time: 33 minutes 58 seconds) **UPDATE 10-5-2013** Based on comments so far I tried copying data to new file geodatabase, and running the tool from ArcCatalog still get exactly the same error. I have ordered 16GB of the fastest RAM my computer can take (I current have 4GB). I also have a 6 Core AMD Phenom II X6 1090T, SSD, and AMD Radeon HD 6970 Graphics Card. So I'm not sure what more hardware I can add. **UPDATE 10-5-2013 B** I've also tried increasing the size of the page file which was a suggestion I found on Google with no effect.


title: How to read GeoTIFF using PHP?

text: My current pet project involves creating a web service that uses the CGIAR SRTM worldwide elevation data set. Each request to the service will query for elevation data from a small geographic area. Storing all the data in fashion that can be queried fast turns out to be difficult. My best idea is to keep the data in GeoTIFF files and create an index linking lat/lon coordinates to files. Which leads to my current main problem: **How do I get the elevation values out of a GeoTIFF file?** I know the projection, scale and orientation of the GeoTIFF files (i.e. I know what lat/lon values each pixel represents). How can I figure out what elevation that pixel refers to? I have to use PHP and thought I could use the ImageMagick function for reading a pixel's color. Unfortunately, it returns R=2 G=2 B=2 for all pixels. **update** To answer someone else's question below, here is my solution. I went with the library by Bob Osola suggested in the accepted answer below and made the following changes to adjust it to SRTMv4.1 file format (the one available from the CGIAR website). Update the constants to:               const NUM_DATA_ROWS = 6000;     // the number of data rows in the file ( = ImageLength tag value)      const NUM_DATA_COLS = 6000;     // the number of data columns in the file ( = ImageWidth tag value)        const DEGREES_PER_TILE = 5;     // each tile is 5 x 5 degrees of lat/lon     const PIXEL_DIST = 0.000833333; // the distance represented by one pixel (0 degrees 0 mins 3 secs of arc = 1/1200)     const STRIPOFFSETS = 0x44bbd5c; // the offset address of the 'StripOffsets' tag      In addition there was a bug in the computation of a longitude. To fix it, replace               $topleftLon = 180 - (($tileRefHoriz -1) * self::DEGREES_PER_TILE);      if ($lon < 0) {         $topleftLon = -$topleftLon;     }      by               $topleftLon = (($tileRefHoriz -1) * self::DEGREES_PER_TILE) - 180;       That should be it.


title: How can I apply symbology from two layers to one feature class with common features using ArcMap 10?

text: Say I have two layer files. Layer file 1 has symbology for feature types A, B & C. Layer file 2 has symbology for feature types B, C & D. In these two layer files, feature types B & C are the same and have the same symbology. If I merge these two layer files, I get Feature Class 3 with feature types A, B, C & D. How can I get all 4 feature types in Feature Class 3 with the "correct" symbology?   * **A** : symbolised from Layer 1    * **B** : symbolised from Layer 1 OR Layer 2   * **C** : symbolised from Layer 1 OR Layer 2    * **D** : symbolised from Layer 2 I hope that's clear. In the real world I have about a dozen layer files each with several dozen feature types, with an unknown level of overlap, so I'm looking for the quickest, least manual way of doing this. I know that using a Style, then symbolising by Matching Symbols to a Style is the "correct" way of doing this. However I don't have access to the style used to create these layers, and I _really_ don't want to have to manually save every single symbol from every single layer to a new style. However, if it's done once, then it's done forever, so it's not out of the question. If anyone knows of an easy way of generating a Style file from one or more layers, that would be much appreciated as well. Something in the back of my mind tells me it might also be possible to do this using Cartographic Representations. I don't know how to go about it, and I suspect it would be massive overkill, but if it's the best way, I'll take it. I'm pretty sure there's no easy way to do this, but I just want to confirm I'm not missing something. Any suggestions appreciated! Many thanks!


title: Help with technique to create contours from ASTER DEM in Phnom Penh, Cambodia

text: I have the ASTER version 2 DEM of Cambodia. I want to use it to create 1m contours of Phnom Penh, Cambodia. If anyone has this already please let me know. Now, onto the problems:   1. I am using ArcGIS so do not have advanced raster processing tools at my disposal such as ER Mapper   2. The ASTER DEM seems very noisy in Phnom Penh, using the contour tool in ArcGIS simply creates lots of contours around what looks like a field of knolls   3. Using the focal statistics tool, even with filter sizes up to 30m, does not appear to fix the problem.    4. I am comparing the output to 10 and 20m contour lines digitised from a topo map. These lines sweep across the city like contour lines should. They are in no way mimicked by the contour lines I have so far been able to generate from the ASTER DEM.  Does anyone have any advice for generating contours from the ASTER raster?


title: Arcpy - change layer from sde connection to file geodatabase

text: We are copying data from our corporate office to field offices and we are creating a file geodatabase at these field offices.   We are copying the layers that point to sde and they need to point to the file geodatabase.   I haven't been able to find any information on this. Only info on going from fgdb to sde.   The feature class names will remain the same in the fgdb as they are in sde so all I need to do is change the connection properties.   Can I use python to update the datasource? Thanks.


title: Why GetFeatureInfo does not work?

text: I´ve problem with getfeatureinfo code. Appears only: loading please wait.                   function setHTML(response) {              document.getElementById('nodelist').innerHTML = response.responseText;         };                         map.events.register('click', map, function (e) {                 document.getElementById('nodelist').innerHTML = "Loading... please wait...";                 var url =  map.layers[0].getFullRequestString(                     {                         REQUEST: "GetFeatureInfo",                         EXCEPTIONS: "application/vnd.ogc.se_xml",                         BBOX: map.getExtent().toBBOX(),                         X: e.xy.x,                         Y: e.xy.y,                         INFO_FORMAT: 'text/html',                         QUERY_LAYERS: map.layers[0].params.LAYERS,                         FEATURE_COUNT: 50,                         WIDTH: map.size.w,                         HEIGHT: map.size.h                     },                     "http://localhost:8080/geoserver/wms/"                 );                 OpenLayers.loadURL(url, '', this, setHTML, setHTML);                 OpenLayers.Event.stop(e);             });      I have three WMS layer from GeoServer                   var ol_wms = new OpenLayers.Layer.WMS(                     "OpenLayers WMS",                     "http://localhost:8080/geoserver/wms/vzk",                     {layers: 'GR_ORTFOTORGB'}                  );                 var ol_wms1 = new OpenLayers.Layer.WMS(                     "xxx",                     "http://localhost:8080/geoserver/wms/vzk",                     {layers: 'xxx', transparent: "true"}                  );          var ol_wms2 = new OpenLayers.Layer.WMS(                     "yyy",                     "http://localhost:8080/geoserver/wms/vzk",                     {layers: 'yyy', transparent: "true"}                       );      I can't figure it out. Thanks for any help. And please consider that i am beginner.


title: informations about "gdaltransform" utility of GDAL

text: I have a doubt about GDAL reprojection. I use "gdalwarp" utility to reproject an image in a specific projection system (for example WGS84 UTM49). "gdalinfo" on original image displays this corner coordinate: Lower Right ( 123.0220110, -54.6797900) (123d 1'19.24"E, 54d40'47.24"S) and projected image in UTM49: Lower Right ( 1845275.980,-6159877.836) (131d34' 2.85"E, 53d48' 4.36"S) I suppose that degrees (131d34' 2.85"E, 53d48' 4.36"S) are degrees coordinates of the pixel in lower right in the projected image, different from the originals. I read about "gdaltransform" utility that it reprojects coordinates from one system to another, but running this: $ gdaltransform -s_srs EPSG:32649 -t_srs EPSG:4326 1845275.980 -6159877.836 (when 1845275.980 -6159877.836 are projected coordinates in utm49) it displays geographic coordinate not in original image ( 123.0220110, -54.6797900), but in the projected image(131.56745835871 -53.8012102381326). From this result I suppose that gdaltransform doesn't reprojects from one system to another, but it simply "translates" coordinates. Is that affirmation correct?


title: how to split a line by a point which is on the line but not in the linestring itself?

text: i need some help with the following:               i have a linestring - geom     i have $lat,$lon (using some php syntax)        * i have an osm table with the roads geom, i am trying to get closest point, and then split the road into two parts, by that closest point. after using the lat,lon and st_closestpoint to retrieve the closest point on that line. the point which will be returned is not necessarily exist in the original linestring points.               ST_ClosestPoint (geom_way, ST_SetSRID (ST_MakePoint($lon, $lat), 4326)  ) as closest_point      after that i would like to split the geom(linestring) into two lines by closest_point, and this is where i need help. i tried using                st_asgeojson (ST_Split (geom_way, ST_ClosestPoint (geom_way, ST_SetSRID (ST_MakePoint($lon, $lat), 4326)  )))      but i believe that because the point i use is not on the geom, its not spliting and always returns the entire geom. if i use a point which exist in the line string, it works well.(but not what i need) how can i solve this? any solution even if with totally different approach will do. thanks for your help!


title: Error in Select Numeric type column in pyodbc with ArcCatalog

text: I created a python script that uses "pyodbc" plugin to connect a SQL Server database and write out data. It was imported in an ArcGIS 10.1 tool and run from there. try:               arcpy.AddMessage('FLAG 0')     cnxn = pyodbc.connect('DSN=' + DSN + ';UID=' + UID + ';PWD=' + PASS)     cursor = cnxn.cursor()          arcpy.AddMessage('FLAG 1')     # Retrieves all the records from the All Obs for KML view     if cnxn is None:         arcpy.AddMessage('cnxn is None')     else:         arcpy.AddMessage('cnxn is not None')          if cursor is None:         arcpy.AddMessage('cursor is None')     else:         arcpy.AddMessage('cursor is not None')          cursor.execute('SELECT LocationName, Lat from VW_Obs_for_KML_Exp')     for row in cursor:          arcpy.AddMessage(row.LocationName + ', ' + str(row.Lat))          arcpy.AddMessage('FLAG 2')          except (pyodbc.IntegrityError, pyodbc.ProgrammingError, pyodbc.Error):         arcpy.AddMessage("PYODBC Error. Details: " + str(sys.exc_info()[:2]))     except TypeError, e:         arcpy.AddMessage("TypeError. Details: " + str(sys.exc_info()[:2]))     else:         arcpy.AddMessage("No error occurred.")      The script accesses a Table and outputs 'Lat' as Numeric(38, 8) data type. It worked perfect the first time from ArcCatalog. However, it threw out an error the second time and onwards. Detailed error stack trace is as follow:               FLAG 0     FLAG 1     cnxn is not None     cursor is not None     Runtime error      Traceback (most recent call last):       File "<string>", line 1, in <module>       File "C:\Python27\ArcGIS10.1\Lib\decimal.py", line 543, in __new__         m = _parser(value.strip())     TypeError: 'NoneType' object is not callable     TypeError. Details: (<type 'exceptions.TypeError'>, TypeError("'NoneType' object is not callable",))     Process is complete.      So I had to restart ArcCatalog to successfully run it again. By the way, it also worked well when run from Python in the command line prompt. So this error only occurred when run from ArcCatalog. Is there anyone who has worked with "pyodbc" plugin and experienced similar problem before? Any tips would be appreciated! Cheers, Alex


title: ArcGIS 10.1: Subtype/Domain Functionality

text: Is there any way to create more complex conditional domains in a table than a single subtype and associated domains? I would like to get the same functionality that more than one subtype in a single table would provide but ArcGIS only allows one. I want to be able to use multiple domains in one field that are part of a subtype, where each domain might only allow other domains used in the next field. Any ideas?


title: How accurate is the google maps latitude and longitude I am using?

text: I am making a program that uses GPS location preferably from smart phone, laptop works too and compares it to a building, the points you in its general direction. I am making this web application specifically for San Jose State Campus for fun. I have read the other posts about the correlation between decimal places and accuracy and a .11m error will be sufficient. Google maps gives me coordinates to the 6th decimal place, I was wondering if they do indeed follow the standard I have read about here. Here is an example of one of the buildings I will index. https://maps.google.com/maps?q=%2B38%C2%B0+34%27+24.00%22,+-109%C2%B0+32%27+57.00%22&um=1&ie=UTF-8&sa=N&tab=wl I will only have an arrow point in the direction of the building and rotate it as the lat/long of the user changes and maybe display the approximate distance from the building. I have yet to learn how to properly use google api to draw the users path and etc and that is why I am asking.


title: Print Overview widget as part of map

text: I am using ArcGIS viewer for Flex 2.4. I am trying to get the overview map to print as part of the map using the print widget. In my customized print widget, the user has the facility to opt for overview map. For this, I intend to open the overview map widget from Print widget. Since it is a UI widget and does not seem to entertain widget id, how do I go about it?


title: GRASS 6.4.3 Landsat processing

text: what are the pre-processing steps required for landsat etm+ with GRASS 6.4.3 prior to land cover change detection? The product used is L1T.


title: AttributeError when I execute a python script

text: When I execute a python script to assign my database in postgres, I get this Error !! "AttributeError 'psycopg2._psycopg.cursor' object attribute 'execute' is read- only "               def ma_fonction(d):         # connexion à la base de données         conn = psycopg2.connect("dbname = 'test3' user = 'postgres' host = 'localhost' password = 'postgres'")         cur = conn.cursor()         for n in d :             cur.execute = ("""             PDATE douar SET distance_route = %s,  distance_piste = %s, distance_ecole = %s, distance_college = %s, distance_sante = %s, distance_souk=%s WHERE id =%s             """,             d[n]['route'] / 1000.0,             d[n]['piste'] / 1000.0 ,             d[n]['ecole'] / 1000.0,             d[n]['college'] / 1000.0,             d[n]['sante'] / 1000.0,             d[n]['souk'] / 1000.0             )         conn.commit()         print(commit)       Any solution plz !!


title: Cannot add plugins to QGIS on Ubuntu 11.10 Oneric

text: I have installed Qgis on ubuntu. it works fine but I am not getting option to add new plugins only option to manage plugins is available. Please help


title: Help with Python script for exporting mxds into pdfs!

text: I have written a python script to export my mxd into a pdf (not using data driven pages). I am getting the error that my mxd path is incorrect! I have included my script below. Any help would be appreciated.               # Necessary modules     import arcpy, os, string, sys          # For less complicated scripts -     # these 2 imports are necessary to utilize a simpler method of debugging outher than traceback      import win32ui, win32con          # example debug message to screen ......     # arcpy.AddMessage("mxd_file = " + str(mxd_file))     # val = win32ui.MessageBox("mxd_file = " + str(mxd_file), "title",                               #win32con.MB_OKCANCEL)          #Paramaters...          mxdList = string.split(arcpy.GetParameterAsText(0), ";")     dir = arcpy.GetParameterAsText(1)          #Loop thru & take the base name of each MXD selected and append all map pages to a single pdf      # and save to chosen directory......          for mxdPath in mxdList:         mxd = arcpy.mapping.MapDocument(mxdPath)         name = mxdPath[:-4] + ".pdf"         file = dir + os.sep + os.path.basename(name)         ddp = mxd         ddp.exportToPDF(file, "ALL")          del mxd, file


title: How not to Copy Features when too many would be output?

text: This question has already been posed to the ArcGIS Geoprocessing forum but I have had no responses there. I have a 3.5 million polygon layer (cadastre) stored in Oracle via ArcSDE. I use a polygon feature chosen by an end user from a second layer to copy out the cadastral polygons that intersect it (via Copy Features). I can get this to work fine for most polygons, and get the few seconds to few minutes response I need, by using the polygon the user chooses to set the geoprocessing extent (arcpy.env.extent) prior to executing Copy Features. However, for a few polygon features that the user might choose (think petroleum or gas pipeline corridor), the number of polygons that would be copied out can number up to about 200,000. These can be copied in about 15 mins, but rather than get all of these back so that I can write them into a very bloated PDF report, I would like to save time and pages by having the option to set a maximum number of features that can be copied out i.e. be able to set a MaxRecordCount = 500 that would stop the Copy Features once 500 had been copied. Is there a way to tell Copy Features to only copy up to a maximum number of features? Alternatively, is there a fast way to get a count of how many features in an ArcSDE layer are within the current geoprocessing extent? **UPDATE** : No real progress made but the results and code below may illustrate better how long it takes to use SelectLayerByLocation and GetCount (at least at ArcGIS 10.0) against the 3.5 million polygon ArcSDE layer even when the tenement chosen only overlaps 9,000 polygons (original example takes 10x as long). This is the output:               Copying one tenement to in_memory takes 2.87037144971 seconds     Setting arcpy.env.extent to that one tenement (in_memory)     SelectLayerByLocation takes 64.4129756363 seconds to intersect cadastre with this one tenement (in_memory)     8961 cadastral parcels found in Search Area     GetCount takes 206.410587153 seconds to come up with that number      This is the code:               import arcpy     import time          mxd = arcpy.mapping.MapDocument("C:\\MXDS\\CustRep\\Maps\\Search_layers_V1.mxd")     df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]     searchAreaLayer = arcpy.mapping.ListLayers(mxd,"Exploration Permits Petroleum (EPP)",df)[0]     searchAreaLayer.definitionQuery = "TENURENO = 644"     start = time.clock()     arcpy.CopyFeatures_management(searchAreaLayer,"in_memory/SearchArea")     elapsed = (time.clock() - start)     print "Copying one tenement to in_memory takes " + str(elapsed) + " seconds"          print "Setting arcpy.env.extent to that one tenement (in_memory)"     arcpy.env.extent = "in_memory/SearchArea"          cadastreLayer = arcpy.mapping.ListLayers(mxd,"Lot and Plan",df)[0]          arcpy.MakeFeatureLayer_management("in_memory/SearchArea","SearchArea")          start = time.clock()     arcpy.SelectLayerByLocation_management(cadastreLayer,"INTERSECT","SearchArea")     elapsed = (time.clock() - start)     print "SelectLayerByLocation takes " + str(elapsed) + " seconds to intersect cadastre with this one tenement (in_memory)"          start = time.clock()     result = arcpy.GetCount_management(cadastreLayer)     numRowsInSearchArea = int(result.getOutput(0))     print str(numRowsInSearchArea) + " cadastral parcels found in Search Area"     elapsed = (time.clock() - start)     print "GetCount takes " + str(elapsed) + " seconds to come up with that number"


title: Create a path following a road, interpolating from a set of points

text: I have several hundred vehicular routes within a city from which I wish to create shapefiles. These take the form of directions such as "From Green Street, turn left into Brown Street, Right into Blue Street". I first wrote a program to change them into the form "Corner of Green and Brown; Corner of Brown and Blue" and then geocoded them using the Google geocoding service. I now have sets of coordinates as csv files, each file (route) has between 20 and 50 points. I then plotted the route using www.gpsvizualiser.com and where the roads are straight it has worked very well. However, roads are not straight, and I wish to constrain these paths to follow roads, I'm supposing by interpolating points between the coordinates I have. I'm using QGis and Open Street Map data (I'd be prepared to try something else if this is not adequate). Using the RoadGraph plugin I can find routes between two points, but it is very resource intensive, and as I have several hundred sets of points and thousands of pairs of points, I need to find a better way. The question was asked and answered by a now-inactive user in Shortest Path using interpolated OSM points, however he provided his answer as a link to his blog, which I was disappointed to find is now defunct. * * * If there is no simple way to do this I will need to do it manually. If that is the case, is there a simple way to "snap" a line that I draw in QGis to an underlying polyline layer (the OSM data)? I may need to do some of them manually anyway, as I'm sure the data I have generated is not perfect. * * * Thanks and best regards! Ivan


title: What is Geonode ? What all can be achieved using it?

text: Ok i have searched the site and did not find enough information concerning regarding what is a Geonode so i really thought i may ask everyone who has used it to give their opinion. I am trying to set a website with geospatial data and want to decide whether it is a good solution. Is it a web application framework like Geodjango, Is it a CMS like drupal for Geospatial information ? Can it be used standalone to deliver both Geospatial and some non geospatial content ? And honestly , why isn't is as popular as it ought to be ( is it because it is new ?) The official documentation at http://geonode.org/ provides considerable documentation and examples but i want personal opinions of experts who understand it well.


title: A GeoServer layer is based on PostGis view, but featureID is random (PK is ignored)

text: I have a layer in GeoServer. It is based on PostGis view. It seems that GeoServer generates random featureIDs. The view has the same columns as the underlying table, including the PK column. But GeoServer ignores the PK column for layers based on the view. When I created a layers based on the table itself, Geoserver used PK as featureID. How to make GeoServer to do the same for a view? Thank you in advance. **UPDATE** I've accepted iant's answer. SQL I used to create the metadata table is below. After I ran it on the PostGis DB, I've restarted GeoServer and recreated the layer. It worked.               -- http://docs.geoserver.org/stable/en/user/data/database/primarykey.html#metadata-table-description          CREATE TABLE gt_pk_metadata_table (       table_schema VARCHAR(32) NOT NULL,       table_name VARCHAR(32) NOT NULL,       pk_column VARCHAR(32) NOT NULL,       pk_column_idx INTEGER,       pk_policy VARCHAR(32),       pk_sequence VARCHAR(64),       unique (table_schema, table_name, pk_column),       check (pk_policy in ('sequence', 'assigned', 'autoincrement'))     );               INSERT INTO gt_pk_metadata_table(                 table_schema, table_name, pk_column, pk_column_idx, pk_policy,                  pk_sequence)         VALUES (         'public',         'llsoa',         'identifier',         1,         'assigned',         null);


title: How to set raster values to NULL?

text: how can I define values to null? I tried it with the processing reclassify tool but I always get an error log (cannot open the result shape...or something like that).


title: Connection property set error on registering PostgreSQL geodatabase with ArcGIS for Server?

text: We're in the middle of a migrating process. We've imported a geodatabase on a new Linux machine and we're trying to publish some map services to this new ArcGIS Server (that resides on the same machine). We've upgraded the 10.1 geodatabase to a 10.2 one. The geodatabase was imported via pgAdmin backup- restore procedure then we used the Upgrade Geodatabase tool from ArcToolbox to go to 10.2. We've encountered problems when trying to register the geodatabase with the server. The error we get is: > The connection property set was missing a required property or the property > value was unrecognized. This release of the GeoDatabase is either invalid or > out of date. DBMS table not found ![enter image description here](http://i.stack.imgur.com/PfyKG.png) Same error occurs with a new created geodatabase as well. Details:   * ArcGIS Server 10.2 on a Linux Machine   * PostgreSQL Geodatabase 9.2 on the same Linux Machine


title: Geographical media coverage map - USA

text: I'd like to know if there are some maps giving the geographical coverage of the media publication, for example, a map giving the counties or even the cities where local newspapers are sold, and a map showing the coverage of the US radios?


title: Probelm with Add Network Analyst dll in My Web Mapping Application adf?

text: I'm a beginner in ArcGIS & I'm shooting blind really. I want to add the Network Analyst tool box to find the shortest path in my project. I tried this solution: I can't add Network Analyst dll to my web mapping application. I use ArcGIS 10 & Visual Studio 10 and I used web application adf to build my website. I tried the Network Analyst toolbox or networkanalyst.dll from developer kit folder but an error occurs: `there are no components in 'C:\Program Files (x86)\ArcGIS\DeveloperKit10.0\DotNet\ESRI.ArcGIS.NetworkAnalyst.dll that can be placed on toolbox`


title: What GIS software is required to export a GIS map as a hi-res raster image?

text: I am looking for some (preferably free) GIS software that will enable me to export multi-layered world maps (made up of shape-files and kml files and so on) as hi resolution (21,000 pixels wide), single layered tiff, jpeg or other raster format files, so that i can then edit them in photoshop. I am an artist, and new to GIS. I have recently started running the free Mapwindow program on my computer. This has enabled me to start constructing some of the world maps that I'm looking for, though I cant seem to find a way of exporting them as images from that program.


title: real time map matching

text: I am working on a project which requires real time map matching. I am currently using ArcGIS but not sure whether it will work. Here is what happens with my system: the cell phones sent GPS fixes every five seconds to my server and I need to do real time map matching to snap the point on to one of the links of the map and store the matched points. ArcGIS has a 'near' tool for snapping the point to nearest link. But the input to to the tool has to be a shape file for the points. I am wondering how I can deal with the real time data I get in ArcGIS. Creating a shape file for each point? Any other suggestion for accomplish this work? Thanks.


title: Looking for webservice for distances (road) between UK towns

text: I am thinking about writing a program to check some mileage claims (about 45'000 of them actually) made by British MPs recently. The data I have is quite course - the origin and destination of the trips is generally provided only at the Town level. What I am looking to do is basically look at the mileage figures they have submitted, look at the "calculated" mileage obtained from a web service, and then compare / contrast. (I'm thinking of perhaps being interested in cases where the claimed mileage exceeds 40 miles, and the claimed mileage exceeds the website figure by a factor of at least 1.4 for instance). Code wise I'm fine, but what I don't have is a webservice I can use to get the distances. Google Directions is out (has to be used with Google Maps) - and I am looking at writing this as a console app in C#. Can anyone suggest any suitable service? Martin.


title: How to create different diameter circles round points?

text: I want to map a tree survey. I am thinking that I will plot positional points of the trees and then add other data like tree type etc. to the attribute table later. Is there a way I can have an attribute that describes a radius or diameter, whichever is easier, of a circle round the point. In fact I need two circles, one to describe the canopy radius/diameter and another to do the same for the root protection area. Am I going about this the right way or is there a better methodology? Using QGIS 1.8.0


title: Is there an online tile-based elevation service?

text: I am working on an application that requires the elevation at a given lat/long coordinate for lots of closely spaced coordinates along any given irregular path. (The path is a trace of a glider/hang-glider flight.) I could use SRTM/GTOPO30/GLOBE data but I only need small (but arbitrary) sections of the world at any one time so I'd like to avoid storing a DEM database locally. There is also Google's elevation API (for use with their maps) but it has a usage limit of 2500 requests a day whereas my data can be tens of thousands of points. Plus querying a server so many times for closely spaced locations seems like a waste a bandwidth. So, ideally, I'd like a tile server for small DEM tiles. I found this http://www.arcgis.com/home/item.html?id=1b48cd3b6276416784fe90a68c580a89 but the ArcGIS API guide doesn't contain any useful info about it. Has anyone actually used it? Are there any other similar services?


title: Selection/Deletion of all smaller polygon/s in a SHP - Python solution?

text: ArcMap 10.2 user, with Spatial Analyst only. No ArcServer or of sort. I have abt 500+ polygon shapefiles, each containing 2 or more polygons. All of them has a NAME column and the rest of the columns may or may not be the same with each other, and may or may not has a AREA column. My objective is to delete all the smaller polygons in each SHP, leaving only the largest one. I know Definitive Query will not work on this as the largest/smaller polygon definition is rather relative. (Largest polygon in one SHP could be the smallest in another). As I am hopeless with Python (still reading Dummies for Python), can anyone advise how do I go abt doing this in Python? Maybe I would need to create a AREA column for all SHP first with Python? Another thing is the 500+ SHP is not the end, we are still adding to that folder on a weekly basis. So I would need something that we can run on with SHP consisting one or more polygons in the future. Thanks for reading this.


title: Openlayers Transform not transforming a point from EPSG 27700 to EPSG 4326

text: I am trying to add Google street view functionality to a Openlayers Map. I have started by using 3 divs to hold the Openlayers Map (which uses a local tilecached base map), a google api map and another for street view. If I try to transform the lonlat from EPSG:27700 to EPSG:4326 so that they can be passed to the google map object as the center location, the coordinates are not transformed. I have the following scripts included in the html:                   <script src="script/openlayers/proj4js-compressed.js"></script>         <script src="script/openlayers/OpenLayers.js"></script>         <script src="script/openlayers/defs/EPSG27700.js"></script>         <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.1.min.js"></script>         <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>        <script src="script/map.js"></script>      If I alert the lonlat variable after transforming it I get the original EPSG 27700 value of lon = 311711, lat = 530372, rather than the converted EPSG 4326 value. The Openlayers map is set up here:                   //private variables         var map = null;         var streetview = null;         var osgrid = new OpenLayers.Projection("EPSG:27700");         var googlegrid = new OpenLayers.Projection("GOOGLE");         var mapextent = new OpenLayers.Bounds(295000.0,505000.0,340000,565000.0);              var options = {              projection: osgrid,          displayProjection: osgrid,         maxExtent: mapextent,         restrictedExtent: mapextent,         units: 'm'         }         var osoptions = {         scales: [             250000,             107716.5936,             70866.18,             47243.9527,             22677.1776,             15000.236,             10000.9708,             6000.309,             3000.91484,             2000,             500         ]     };              //allow testing of specific renderers via "?renderer=Canvas", etc         var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;         renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;              //Set mapping this object for use in internal functions         var that = this;              var addControls = function() {                var nav = new OpenLayers.Control.Navigation();                   var zoomBox = new OpenLayers.Control.ZoomBox();                var layerSwitch = new OpenLayers.Control.LayerSwitcher();                map.addControls([nav, zoomBox, layerSwitch]);         };              //Public Objects         this.tmsurl = ["http://servername1/tilecache/",                         "http://servername2/tilecache/",                         "http://servername3/tilecache/",                         "http://servername4/tilecache/"                     ];              this.popup = null;              this.init = function() {                  map = new OpenLayers.Map("map_canvas", options);                  var osmap = new OpenLayers.Layer.TileCache(                 "OS Map",                  that.tmsurl,                 'base_StandardMap',                 {                      options: osoptions,                     format: 'image/jpeg',                     isBaseLayer: true                 }             );                       addControls();                      map.addLayers([aerialmap, osmap]);                  var lon = 311711;             var lat = 530372;             var zoom = 0;                  map.zoomToExtent(mapextent);                  that.centreMap(lon, lat, zoom);      The Google Map and Street view is set up here               var lonlat = new OpenLayers.LonLat(lon, lat);     lonlat.transform(osgrid,new OpenLayers.Projection("EPSG:4326"));             var location = new google.maps.LatLng(lonlat.lat, lonlat.lon);             var mapOptions = {               center: location,               zoom: 14,               mapTypeId: google.maps.MapTypeId.ROADMAP             };             var gmap = new google.maps.Map(                 document.getElementById('gmap'), mapOptions);             var panoramaOptions = {               position: location,               pov: {                 heading: 34,                 pitch: 10,                 zoom: 1               }             };             var panorama = new  google.maps.StreetViewPanorama(document.getElementById('streetview'),panoramaOptions);             gmap.setStreetView(panorama);              },


title: the min and the max in raster calculator Arcgis 10.1

text: Can you help me where I can find or how to calculate the minimum and maximum with raster calculator in arcgis 10.1


title: Multi-modal public transport Routing using pgrouting or opentripplanner

text: I need multi-modal public transport routing for my iPhone app and also to solve a TSP problem. I have been researching and I am unable to make a decision whether I should go with pgrouting or install Open Trip Planner.. Is there a chart comparison, what each of them offers and what is different about these softwares?


title: Join and Calculate vb.net

text: Im trying to join an excel table to a shapefile and then calculating those fields using vb.net. The code I have written has no errors, but won't work when I try it in ArcGIS 10.1 and I'm out of ideas. If anybody can find an error in my code or direct me to other sources, I'd gladly appreciate it. ModuleQ3 Code:               Public Sub JoinCalc(ByVal excelXLS As String, ByVal fromExcelTable As String, ByVal toFeatureClass As String, ByVal toField As String, ByVal fromField As String, ByVal calculateField As String, ByVal calculatorExpression As String)         Dim pMxDoc As IMxDocument         Dim pMap As IMap         Dim pFeatureLayer As IFeatureLayer         Dim pFeatureClass As IFeatureClass         Dim featureIndex As Integer              pMxDoc = My.ArcMap.Application.Document         pMap = pMxDoc.FocusMap              featureIndex = FindLayer(toFeatureClass)              If featureIndex = -1 Then             MsgBox("The join feature class is not in the current map document.")             Exit Sub         End If              pFeatureLayer = pMap.Layer(featureIndex)         pFeatureClass = pFeatureLayer.FeatureClass              Dim pWorkspaceFactory As IWorkspaceFactory         pWorkspaceFactory = New ExcelWorkspaceFactory              'open excel workbook          Dim pFworkspace As IFeatureWorkspace         pFworkspace = pWorkspaceFactory.OpenFromFile(excelXLS, 0)              'open excel table          Dim pFromTable As ITable         pFromTable = pFworkspace.OpenTable(fromExcelTable)              'Join the table to the feature class.          Dim pMemRelFact As IMemoryRelationshipClassFactory         Dim pRelClass As IRelationshipClass         Dim pDispRC As IDisplayRelationshipClass              ' Create a memory relationship class.          pMemRelFact = New MemoryRelationshipClassFactory         pRelClass = pMemRelFact.Open("Table-Layer", pFromTable, fromField, pFeatureClass, toField, "FeatureClassName", "TableName", ESRI.ArcGIS.Geodatabase.esriRelCardinality.esriRelCardinalityOneToOne)              ' Perform a join.          pDispRC = pFeatureLayer         pDispRC.DisplayRelationshipClass(pRelClass, ESRI.ArcGIS.Geodatabase.esriJoinType.esriLeftInnerJoin)              MsgBox("The join is complete")              Dim pDisplayTable As IDisplayTable         pDisplayTable = pFeatureLayer              Dim pFields As IFields         pFields = pFeatureClass.Fields              Dim fieldIndex As Integer         fieldIndex = pFields.FindField(calculateField)              If fieldIndex <> -1 Then             Dim pCursor As ICursor             pCursor = pDisplayTable.SearchDisplayTable(Nothing, True)                  Dim pCalculator As ICalculator             pCalculator = New Calculator             With pCalculator                 .Cursor = pCursor                 .Expression = calculatorExpression                 .Field = calculateField             End With                  pCalculator.Calculate()                  MsgBox("It should be calculated.")              Else             MsgBox("The field does not exist")             Exit Sub         End If     End Sub      These are the parameters that im passing through:               ModuleQ3.JoinCalc("ONT_Climate_Normals.xlsx", "ONT_Annual", "ONT_Stations_Shape", "CLIMATE_ID", "CLIMATE_ID", "TotalAnnua", "NORMAL_52 + NORMAL_54")


title: QGis compile with Qt Creator error

text:
I followed the steps in this article http://linfiniti.com/2011/06/using- qtcreator-with-qgis/ to compile QGis on Ubuntu 12.04 64bit with Qt Creator. I got the latest source for master with git. I get the following error:               make[2]: No rule to make target '/usr/lib/libQtXml.so', needed by 'output/lib/libqgis_core.so.1.9.90'.  Stop.
     make[1]:  [src/core/CMakeFiles/qgis_core.dir/all] Error 2     make:  [all] Error 2
     11:30:10: The process "/usr/bin/make" exited with code 2.     Error while building project qgis1.9.90 (target: Desktop)     When executing build step 'Make'      Looks like it cant find the `libQtXml.so` file On my machine its residing under
      /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8.1 and
     /usr/lib/i386-linux-gnu/libQtXml.so.4.8      How do i tell `cmake` where to look in one of these directories?


title: How to secure WFS services?

text: first time posting here.. Im currently tasked with finding a way to deploy wfs services to a number of clients. The services could be consumed by both desktop GIS software eg. MapInfo/ArcGis or by WebGis solutions. Is it possible, for a WFS service, to define eg. username/password or token to pass along for verification of access rights? (top notch security is not nessesary) -> Have been looking in OGC WFS specification, but I cant seem to find any relevant info on this. ty in advance /larssj


title: Converting point data into a weighted raster

text: I am completely re-writing my question as i think it was quite confusing before: I have a number of different points, each point has a -z value. I need to create some sort of raster or a series of polygons which buffers these points.. but i have a few complicated rules!   1. If the adjacent points are of the same z value then the buffer must merge into one polygon.   2. if the adjacent point is a different z value - then the buffers must be weighted in accordance to the depth of the z values, i.e. if one z-value is -10, and the other is -5, then the buffer of the -10 point will take up 75% of the distance between the 2 points. But because there are many points, and they are all related, this buffering will be different on different sides of the point, see diagram!![enter image description here](http://i.stack.imgur.com/Zoo0R.png)   3. The idea of the weighted voronoi diagram has been suggested to me and that would be perfect if it weren't for all of the points being related to all of the points around its!   4. I know how i would do it on paper - i would divide the space between all points by 10, and then based on the difference between the two points choose where the buffer would start (if there is no difference between the points then the buffer starts in the middle).   5. Although i cannot work out the formula for determining where the buffer starts.. i know it must be derived from the DIFFERENCE between the two points - but i do not have the mathmatical capacity to work out how i would use this to work out the distance! I am using Arcmap 9.3.1 and am open to python scripting! If you need me to try and explain anything further i will try! i am very confused myself!


title: Unknown Coordinate System on old drawing

text: I work with many old civil engineering documents, and occasionally I'll need to georeference one which has coordinates pairs listed at many given points but does not list which coordinate system these coordinate pairs refer to. These are typically scans of the original drawing lacking any metadata except for what has been scanned. I've always used the "brute force" methods as described by brenth here: .shp with unknown coordinate system My question though, is if I already know the approximate location and can easily find say lat,lon and I also have the original coordinate pairs, is there a tool out there that can eliminate the need for the "brute force" method, and speed things up for me? Thanks


title: Postgis TopologyException: side location conflict at 226.001 39.5158, what's the problem?

text: after st_union() PgSQL returns a note:               NOTE:  TopologyException: side location conflict at 226.001 39.5158      And in the results there are two rows with empty geometry and other rows are ok.   What causes that problem? How to solve it?


title: Leaflet: how can I update content of popup by jQuery

text: in my popup is a spinner with class=spinner and an empty container for addon informations.   1. I want to hide after successful ajax.   2. I want to add some html in a container. I tried this:               ~~~                   map.on('popupopen', function(e) {             var marker = e.popup._source;             $.getJSON(url,function(data) {             $(e.popup).find('.spinner').hide();             $(e.popup).find('container').html('same stuff')              });     ~~~      It doesn't work. Any ideas?


title: Why is QGIS 1.8 crashing when exporting to PDF?

text: I want to export for example this: ![enter image description here](http://i.stack.imgur.com/26T5J.png) but qgis crashes. Sometimes with an error message std::bad_alloc. But: My Mac has 8 GByte RAM and "just" 5,... something (of 8) GByte are used, moreover there is > 11 GByte free space on the disc. Sometimes it crashes and you can have a look on an error report, like this one: ![enter image description here](http://i.stack.imgur.com/9PQmg.png) Now I noticed that everything works fine if I disclaim labels like "Unserer Lieben Frau". Is this a bug? It seems to be independent on the font used. Or... what can I do to export the results to PDF? Thanks a lot!! Harald


title: How to buffer a vector shapefile using ogr python?

text: I am trying to learn how to use ogr in python using the country and populated places datasets from http://www.naturalearthdata.com/downloads/50m-cultural- vectors/. I am attempting to use filters and buffers to find points (ne_50m_populated_places.shp) within a specified buffer of a named country (filtered from feature class ADMIN in ne_50m_admin_0_countries.shp). The problem appears to be that I don't understand what units to use for buffer(). In the script I have simply used an arbitrary value of 10 to test if the script works. The script runs but returns populated places from around the Carribean region for named country 'Angola'. Ideally, I want to be able to specify a buffer distance, say 500km, but can't work out how to do this as my understanding is buffer() is using the units of countries.shp that will be in wgs84 lat/long format. Advice on method to achieve this would be much appreciated.               # import modules     import ogr, os, sys               ## data source     os.chdir('C:/data/naturalearth/50m_cultural')          # get the shapefile driver     driver = ogr.GetDriverByName('ESRI Shapefile')          # open ne_50m_admin_0_countries.shp and get the layer     admin = driver.Open('ne_50m_admin_0_countries.shp')     if admin is None:       print 'Could not open ne_50m_admin_0_countries.shp'       sys.exit(1)     adminLayer = admin.GetLayer()          # open ne_50m_populated_places.shp and get the layer     pop = driver.Open('ne_50m_populated_places.shp')     if pop is None:       print 'could not open ne_50m_populated_places.shp'       sys.exit(1)     popLayer = pop.GetLayer()          # use an attribute filter to restrict ne_50m_admin_0_countries.shp to "Angola"     adminLayer.SetAttributeFilter("ADMIN = ANGOLA")          # get the Angola geometry and buffer it by 10 units     adminFeature = adminLayer.GetFeature(0)     adminGeom = adminFeature.GetGeometryRef()     bufferGeom = adminGeom.Buffer(10)          # use bufferGeom as a spatial filter on ne_50m_populated_places.shp to get all places     # within 10 units of Angola     popLayer.SetSpatialFilter(bufferGeom)          # loop through the remaining features in ne_50m_populated_places.shp and print their     # id values     popFeature = popLayer.GetNextFeature()     while popFeature:       print popFeature.GetField('NAME')       popFeature.Destroy()       popFeature = popLayer.GetNextFeature()          # close the shapefiles     admin.Destroy()     pop.Destroy()


title: How do I select all points that lie within a layer's bounding box?

text: I'm using QGIS to do this. I have a mesh created from the v.trimesh tool. I want to find all the points that lie in the bounds of a layer. How should I go about doing this?


title: Area of a Cross Section GRASS GIS 7

text: I have a task I would like to solve with GRASS GIS 7, if somehow possible. I want to create a cross section from a landslide - and would like to calculate the area of that cross section/profile. Any way to do this easily without using ArcGIS? Best, and many thanks in advance, Peter


title: FeatureLayer infowindow position appears on wrong location

text:
![enter image description here](http://i.stack.imgur.com/r0AlJ.png) When I click the feature layer, info window popup is appearing wrong position. I use dojo dijit like this toolkit.

             Panel

                         Name:                         <input class="cell" id="name" type="text" size="25" />

      **If I delete content panes like following, the problem is solved.**

             Panel

      I can not add content panes. What do you think about this.


title: How can I iterate a model that solves multiple routes with multiple locations?

text: I have multiple line feature classes that I would like to make routes and solve. For each of these routes I have specific start/stop points (feature classes) that will act as locations. How could I build a model that would pull each route with its associated locations, solve, and write out the solved route? Any help is appreciated!