Why can't I share project files with another QGIS user?

I am working with another QGIS user at a separate location and we want to share the projects that I have already created using QGIS. However, the other user is unable to open the project files in QGIS. This problem has occurred when sharing via USB stick or via files shared in Dropbox. Could there be an issue with the fact that I installed the standalone version of 1.8.0 whilst my colleague installed the OSGeo4W version?


From Bessel 1841 to WGS 1984

I am having problem with projecting my counties which are in GSC_1841/Hermannskoegel to WGS_1984 in ArcGIS 9.3. I tried the basic "project" with importing the existing coordinate system but that's pretty much it and nothing happens. Somebody advised me that first I have to change the ellipsoid manually, and then do the transformation using predefined seven values/numbers. Could anyone be more specific? Thank you in advance. EDIT: Old Yugoslavia is the country.


Why does the buffer take up whole screen?

I am trying to create buffers around the Hurricane Sandy path I created in QGIS (points are lat/long). I have both points from each day she was tracted and the line I created from it with Points2One. When I go to make buffers around either the line or the points, the buffer takes up the whole screen. Its all just one color. I have made buffers before but from data I did not create. Right now all of my projections are set to WGS 84 EPSG 4326. Please help! I have been working on this for two days trying to figure out what is wrong.


How to retrieve metadata from a feature layer in ArcGIS Server 10 using Flex

I need to retrieve the metadata information from a feature layer. I have the web services available and I can run queries to retrieve the feature attributes, but I don't know any method to retrieve the metadata. Is there any sample or code snippet that I can use to understand the method?


Difference between Geographic-3D and Geocentric CRS

I'll start with the OGP definitions:   * **Geographic**. A coordinate reference system based on a geodetic _datum_ and using an ellipsoidal (including spherical) model of the Earth. This provides an accurate representation of the geometry of geographic features for a large portion of the Earth’s surface. Geographic coordinate reference systems can be two- or three-dimensional. A _Geographic 2D_ CRS is used when positions of features are described on the surface of the ellipsoid through latitude and longitude coordinates; a _Geographic 3D_ CRS is used when positions are described on, above or below the ellipsoid and includes height above the ellipsoid. [...]   * **Geocentric**. A coordinate reference system based on a geodetic datum that deals with the Earth’s curvature by taking the 3D spatial view, which obviates the need to model the curvature. The origin of a geocentric CRS is at the centre of mass of the Earth. In practice, I would identify the difference between, say, a _Geographic-3D_ and a _Geocentric_ CRS in the fact that the latter has a central point in the 3D space from which angles and elevation are computed (no ellipsoid is needed, Earth is spherical?), whereas the former refers to the datum/ellipsoid, i.e. latitudes, longitudes and heights are computed with respect to the ellipsoid. Am I saying something wrong or missing something? Thanks.


How to add to an existing dataset in Model Builder?

I want to run a custom tool created with the Model Builder in ArcGIS. It needs to output to the SAME file each time it runs, just adding the data. Basically I have a custom Dissolve tool that will dissolve (in this case) counties together based on user selection. I need a single file containing ALL the dissolved final shapes, but the Model Builder complains unless each output file is unique. Is there anyway around this or do I have to create dissolve_1, dissolve_2, etc... (to 500 or so) and then combine them afterwards?


Selecting polygons with a minimum internal straight line value - ArcGIS 10

I have a map of polygons representing forest stands. I am trying to sort through them to find those polygons that have a minimum internal distance of 200 m in a straight line (my field sampling will consist of ground truthing the stands, and will require a 200 m line to fall within the stand). I have tried to find if there is an automated way to do this, which there doesn't appear to be. There was something made thats no longer applicable for arcgis 10 ( http://www.jennessent.com/arcview/longest_lines.htm ). If it comes to it, I don't mind eyeballing the distance, and drawing a line myself. But I can't seem to figure out a way to draw it so that I can pull geographic coordinates off of it. As in, when I draw two points I somehow convert the drawn points to a feature set of X and Y coordinates. All I can figure out is just doing it by hand, and viewing the values at the bottom right of the screen and recording them by hand. Thanks in advance, and let me know if you need anything cleared up, not great at explaining my problems (probably why I can't find anything online too). Ayden


automatic zoom to layer in arcgis js api

I'm trying to zoom to layer automatically as soon as the map finishes loading using the guide here. To be clear, I'm only loading one layer and just want to zoom in on one of the layers provided by the service. js script               dojo.require("dijit.layout.BorderContainer");     dojo.require("dijit.layout.ContentPane");     dojo.require("esri.map");     dojo.require("esri.renderer");     dojo.require("esri.graphic");     dojo.require("esri.dijit.Legend");     dojo.require("esri.utils");          dojo.require("dijit.layout.AccordionContainer");     dojo.require("esri.layers.FeatureLayer");          var map;     var basemap;     var trafficmap;     var basemapServiceSource;     var featuremapServiceSource;     var trafficServiceSource;     var renderer;     var loading;          function init() {              // for now, these are referring to a single source         basemapServiceSource = "http://co-gis-01/ArcGIS/rest/services/dev_RTIA/rtia/MapServer";              //Add the topographic layer to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service                   basemap = new esri.layers.ArcGISDynamicMapServiceLayer(basemapServiceSource);         basemap.setVisibleLayers([0, 1, 2, 4, 5, 6]);              map = new esri.Map("map", {                      // remove logo                 logo:false             });              //loading image. id         loading = dojo.byId("loadingImg");         dojo.connect(map,"onUpdateStart",showLoading);         dojo.connect(map,"onUpdateEnd",hideLoading);              /*             IDs of Layers for http://co-gis-01/ArcGIS/rest/services/dev_ExIS/exis/MapServer                 Site Name (0)                 Section ID (1)                 AADT some (2)                 AADT all (3)                 AdministrativeAreas_CongressionalDistricts (4)                 AdministrativeAreas_Provinces (5)                 AdministrativeAreas_Regions (6)         */         map.addLayer(basemap);              // executes function on onLoad event         dojo.connect(map, 'onLoad', function(theMap) {                   dojo.connect(dijit.byId('map'), 'resize', map,map.resize);             zoomToLayer();         });     }               function zoomToLayer() {              var requestHandle = esri.request({             url: "http://co-gis-01/ArcGIS/rest/services/dev_RTIA/rtia/MapServer/2",             content: { f:"json" },             callbackParamName: "callback"         });              requestHandle.then(requestSucceeded, requestFailed);     }          function requestSucceeded(response, io) {              var extent = new esri.geometry.Extent(response.extent);         dojo.byId("extent").innerHTML = dojo.toJson(extent.toJson());         map.setExtent(extent);     }          function requestFailed()    {              alert("requestFailed");     }          function showLoading()  {              esri.show(loading);         map.disableMapNavigation();         map.hideZoomSlider();     }          function hideLoading(error) {              esri.hide(loading);         map.enableMapNavigation();         map.showZoomSlider();            }          dojo.addOnLoad(init);      html code               <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">                     <title>RTIA Map</title>         <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >              <link rel="stylesheet" type="text/css" href="gis.css" />

                                   The problem is that the outputs of dojo.toJson(extent.toJson()) show the same extent, which is the full extent, no matter the layer. This particular layer that I would like to zoom to, `http://co- gis-01/ArcGIS/rest/service...ia/MapServer/2`, is just a filtered version of one of the "full-extent" layers. The filter is defined in the mapservice. How do I correctly do this function?


Alignment Issue with using NAD27 data within ArcGIS Server 10

I am using ArcGIS online base map in my web application. I am trying to add some layers with Geogrphic - NAD27 projection. I am using NAD_1927_To_WGS_1984_33 for transformation, based on documentation this is the projection that is suggested for Canada. Our data spans four provinces in Western Canada. Within ArcMap project it looks fine and data is aligned. When I go to publish this as map service, map service shows a shift of 110m. It seems like ArcGIS Server is not using transformation properly. Looking for some ideas on how to fix this? Thanks Jay


Should I be using the OpenGeo Suite SDK or GeoEXT?

Im new to the OpenGeo Suite, and was wondering if I should create my apps using the SDK Link Here Or I should use openlayers and GeoEXT Link here I believe the SDK uses openlayers / geoext but makes the creation of map applications user friendly? I just need to know what to use each for in the terms of a new user EDITS: I want to create an app that displays layers, I have done that with the SDK pretty easy with GXP. However I also want to add graphs/charts to the maps, this is where I am unsure which route to go down. The user would click on a point and would be able to view a chart of that points change over time.


Class Extension Problem - RelatedObjectChanged not firing

I'm trying to set up class extensions to have 3 feature classes communicate. I have feature classes A, B, and C. A has a simple, forward relationship with B, B has a simple, forward relationship with C. The goal is to have attribute updates in A force attribute updates in B, which in turn force attribute updates in C. I have one class extension on feature class C that implements IRelatedObjectClassEvents2 RelatedObjectChanged, which listens for changes in feature class B. When I manually make an update to feature class B, as expected, the correct updates are made in feature class C. So that part is working. Likewise, I have a class extension on feature class B that implements IRelatedObjectClassEvents2 RelatedObjectChanged, which listens for changes in feature class A. Also as expected, when I manually make updates to feature class A, the expected changes are made on feature class B. So this part is also working. The problem I run into is that when I manually update Feature Class A, Feature Class B gets updated properly, but the extension on Feature Class C doesn't fire the RelatedObjectChanged event. As a result, my updates to feature class A aren't cascading all the way to feature class C. What am I missing that is causing the event to not fire on feature class C?


How to add a Data Frame to mxd in a c# stand-alone application?

I am writing a stand-alone application in c# (using vs2010). I have ArcGis Desktop license.   I only need to insert a new data frame in an mxd file and save this mxd. So: I create MxDocument coclass. Then get IMxDocument interface from that. Then i use its "Maps" property which return me IMaps interface. From that I call its method Add() to add a new dataframe. Code:               Dim pDocClassOut As MxDocumentClas = New MxDocumentClass()     Dim appl As IApplication = TryCast(pDocClassOut.Parent, IApplication)     Dim mxDoc As IMxDocument = TryCast(appl.Document, IMxDocument)     Dim maps As IMaps = CType(mxDoc.Maps, IMaps)     Dim pMap1 As IMap = New MapClass     pMap1.Name = "XYZ"     maps.Add(pMap1)          mxDoc.UpdateContents()     appl.SaveDocument()     appl.SaveAsDocument("E:\DEV EnGIS\Untitled.mxd")     appl.Shutdown()      Why this simple code doesn't work? Thank you so much!


Purpose of "myPlugin_dialog.py" file created by QGIS Plugin Builder

I usually use QGIS Plugin Builder to create working templates for QGIS plugins. While a generic Python plugin needs the files below; * * *               __init__.py     metadata.txt     resources.py (translated from resources.rcc via pyrcc4)     myPlugin.py     myPlugin_UI.py (translated from myPlugin_UI.ui via pyuic4)      * * * Plugin Builder also creates the following file; * * *               myPlugin_dialog.py      * * * I can understand and use it but **why do we need this file myPlugin_dialog.py**? If I import "myPlugin_UI.py" at the beginning, **I can already access and interact with the form objects directly from the main module** "myPlugin.py" Why should I need an additional file? **What is the advantage of this structure?** (Please explain in basic word since I am not fully fluent with PyQt)


how to add polylines(routes from public transport) on postgresql(pgrouting) with GUI

> After searching a several long time... i decide to ask here for help, im > currently using ubuntu 12.04(because of compatibility) with postgresql 9.1, > postgis2, pgrouting2 and qgis2.2 * * * i need to make a system for network adding one by one the lines and their "fixed routes" to the database, with eclipse/c# or something like that, so i can do custom interface to add polyliness into database with a GUI :   * Polylines(routes with name tag or ID, for later use on queries)    * A polyline is composed by 2 routes (one to go and on to back, where the last node of one is the first of the other like a circle)   * Polylines have infinite reverse cost(one way direction).   * Some linestrings might use some of the same nodes of other line. * * * I'm kinda newbie in this GIS world, so a detailed guide would be nice. i read that each thread should contain exactly one question and its answers, so other parts would go in other threads. * * * EDIT2:   * "lines", mean public transport routes   * i have a network(streets) that i want to extend with public transport (PT) routes in another layer    * i want to add one by one because there is no PT info available(lines or their routes) * * * EDIT3: i did some research again and see that what i need are polylines for each of my routes i have a network(streets) like this: ![enter image description here](http://i.stack.imgur.com/VGVdN.jpg) i want to add polyliness like this: ![enter image description here](http://i.stack.imgur.com/YtLAH.jpg) and one by one like this (but in the same table/layer, so i can use them on shortest patch query later): ![enter image description here](http://i.stack.imgur.com/WuB3X.jpg)


Looking for examples of doing raster layers in SharpMap or MapAround c# WMS implementations

We have a large set of photos taken from a plane. After georeferencing them we would like to show them in a WMS, and I have found two c# candidates : MapAround and SharpMap. Has anyone examples of presenting normal georeferenced images in either of the two. (Raster Layers) On a additional note, I have read up on the spec and the webservice requests are fairly simple and I am considering to do a Owin .Net based Implemenation of WMS as a prototype of a WMS. But i am first starting to learn GIS stuff now and would like to try get a WMS up and running first in something that have already been implemented.


Is it possible to customize the Vector and Raster menus?

a little but nervous problem. As you know QGIS offers the possibility of strongly customize all the menu, toolbar, statusbar,... thanks to the option **Customization** in the **Settings menu**. Here the problem: I'm not able to customize the vector and the raster **menu**. If I un-select some entries, when I reboot QGIS in order to update the view, nothing changes. For example: ![enter image description here](http://i.stack.imgur.com/gyQTI.png) But nothing changes after restarting: ![enter image description here](http://i.stack.imgur.com/dS9iB.png) BTW: I also tried to save the configuration file and then to load it, but the un-selected entries in the customization menu remain all active. Thanks a lot for your help! I'm running QGIS 2.0.1 on a Debian 7.2 machine.


Retrieve data from FeatureClass

I have :   * FeatureClass (Structure)   * column (Type)   * column (OID) I am trying to get the (Type) for specific OID. I tried to use this code but it dose not work.               IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;     IFeatureClass testFeatureClass = featureWorkspace.OpenFeatureClass("Structure");     IQueryFilter queryFilter = new QueryFilterClass();     queryFilter.SubFields = "Type";     queryFilter.WhereClause = "OBJECTID = " + feature.OID;     IFeatureCursor fCursor = testFeatureClass.Search(queryFilter, true);      I don't know what is the wrong, any help would be appreciated.


coordinate definitions from nyc.gov open data SpatialLocation field

The NYC Open Data website has a dataset of street events. The last column is called `SpatialLocation`, and is defined as a text field. An example is below. It is clearly two points on a physical map. Are these points in some standard axis or is it specific to their data? I'd like to convert them to lat, lng coordinates. `GEOMETRYCOLLECTION (LINESTRING (988207 219050, 986291 215593))`


Public Proxy WMS

Im looking to set up my own WMS proxy but before I rush off and reinvent the wheel I thought it might be a good idea to ask if anyone has heard of an existing public/commerical WMS proxy service?. If one exists what are the pros/cons of using an existing one as opposed to running my own??. I'm new to Web mapping so any advice would be helpful.


Adding large amount of data to web map using ArcGIS API for JavaScript?

I've got problem, I'm creating map based application, and now I have to add to map about 100 000 graphic points, from coordinates. I was trying in many ways to do it, but always process of adding points takes about 7-10 seconds, or my web browser just hang on. is it even possible to add this amount of data to map without having problems with performance? I'm using ArcGIS API for JavaScript with ArcGIS Server 9.3.1.


Using Geoserver to serve Tiles in zoom/x/y.png format

I have an application that receives tiles from an OSM tile server using the url format URL/zoom/x/y.png . I'm looking into using Geoserver instead of the OSM tile server. I understand that Geoserver uses the WMS standard. Is it possible to serve tiles using Geoserver with the endpoint url format similar to the OSM tile server? Thanks for the help!


How to restore the original Settings Menu in QGIS 1.8 (customization)?

Making some tests in Windows XP for **customizing a user interface in QGIS** 1.8 (see http://www.duif.net/qgis/doc/output/html/en/docs/user_manual/introduction/qgis_configuration.html#customization), I have **unchecked** , among other options, the **Settings Menu**. This means that, after restarting QGIS, there's no way of recovering the older settings because there is not already a Setting Menu. So, **I cannot reload any ini file**. For your information, as a precaution, previously I have saved in a folder both the original ini file, with all the options, and the customized ini file with only some options (of course, not included here the necessary Settings Menu). Before reinstalling QGIS (version 1,8), I would like to try other smarter options if there's any. Where and what does QGIS look at where this applications starts? Thanks in advance for any help.


Topographic Wetness Index

Is there any option to `SAGA` to calculate the `Topographic Wetness Index` ? I have a big area and I tried many times with SAGA, the last time I thought the results was ok (before SAGA would crash or give me a empty raster), however I just noticed that for a small part of my study area the TWI raster is empty. For the last TWI created in SAGA I decided to calculate the slope also in SAGA, but I still have problems with the file. The area with empty cells is near the right margin of the raster.This is how it looks like (black cells are NODATA cells): ![enter image description here](http://i.stack.imgur.com/LKgyE.png) I need to recalculate this asap but I can't find any another solution (in arcgis or qgis). **Edit/Update** I've just saw that I have the same problem in other small areas of the image, that are +/- flat. After overlaying with the SRTM, I can see that when the SRTM value is negative that the TWI cells have NODATA values. I guess this is the reason for the error.


Is it possible to use GDAL to combine (rather than mosaic) rasters

Is there a GDAL command which can combine multiple rasters so that a unique output value is assigned to each unique combination of input values, like the combine command in ArcGIS? gdal_merge seems to mosaic rasters so it is not exactly what I need.


Round Raster to next higher or lower int

I am using ArcGIS 10.1. I am searching for a solution to calculate a raster. The values are like: 0.2 0.6 5.3 i.e. How can I now get 0.2 as 0 and 0.6 to 1 and 5.3 to 5? In the end integer numbers. The "roundup" and "rounddown" functions are worse to do this. Thanks for any hints. Luigi


define a datum and meridian in a CRS in QGIS

I have a shapefile defined by the source as: "The layer is in geographical (lat-long) coordinates (GCS_Clarke_1866; Datum: D_Clarke_1866; Prime Meridian: 0)." opening the shapefile in QGIS 1.8 the proj4 format is:               +proj=longlat +ellps=clrk66 +no_defs      Why is there no datum defined and how can I define it? Is it necessary to define the Prime Meridian?


How to access the road graph plugin in python?

I am developing a few scripts in Python for QGIS 1.8 to automate some geo- tasks and one of them would be to calculate the shortest distance from a hospital to each building in a town. I would like to take advantage of the already existing Qgis plugin but, as it is a C++ plugin, I am not sure whether it is possible to access it from Python? Is there a binding or a trick for that? If not, any further advice would be appreciated! As the base data is OpenStreetMap data stored in a PostGIS DB, I may also try with pgRouting. But the Qgis plugin would be my favourite choice if possible. Thanks in advance! PS: this question is close to this one: Is there a way to access QGIS plugins in Python? but I believe it's still different enough to be worth a new thred.


Having issues removing white background from Raster images

I've got an issue with 4 raster layers that I have converted from kml files into layer files. It would only allow me to convert them if I used ground overlay and now the 4 raster images are overlapping each other. I can't come up with a way to let them all be seen without the background obscuring the other images behind it. I've tried using symbology options and it doesn't do anything. I've attached a screen capture. Basically the white background is what I'm trying to get rid of. I'm not sure if it's possible though. Also I have the original PNG's and when I import the png's themselves and edit the background I can eliminate the white background however they have no spatial reference. When I try the same thing with these layer files you see in the screen cap, it doesn't work. Any thoughts? Thanks! -Brett


Is there any python function to rotate map layers?

Is there any python function allowing a user to rotate map layers in the map canvas. If so, could you please point this out for me? I want to rotate a map layer, using a factor of rotation in degrees, into the map canvas so as to better fit and display all map elements in the layout. I tried using qgsAffine but I didn't succeed. Thank for your help.


How to use QGIS Photo import plugin?

I have a lot of Photos with lat, long, and altitude information. When I start the import, I get an error message. Do I need to prepare a blank point layer before importing? Is there another python plugin that is required? I have had some Gis training, but am not a programmer. I use win7 and Lisboa. Thanks for any answers.


Unable to update integers in PGDB table field using ArcObjects

Dim pLinerow As IRow     pLinerow = ptable.CreateRow       pLinerow.Value(pLinerow.Fields.FindField("IS_CLOSED")) = 0      when this code is executed, the below mentioned error is returned, > "Error HRESULT E_FAIL has been returned from a call to a COM component"


Autocad Civil Surface creation problem

I'm trying to create a new surface in Autocad Civil 2012. I have elevations for a landfill, and it seems like I'm following all the correct steps. But when I check the surface out under Surface Properties/Statistics, it appears the X,Y & Z coordinates have been scaled down by 3 decimal places. I'm using UTM coordinates to create the points. Example: Min elevation = 0.071m Min X = 481.510m etc. Any help greatly appreciated! -jason m.


Determining distances between multiple points without crossing roads?

I'm working with civic addresses (points) in the county that I work for (there are nearly 10,0000 points). I am trying to find out how many of the points are within certain distances or less from each other. (Ex: 400 feet or less from each other). The other challenge is that I do not want the calculation to include going across roads. They need to be on the same side of the road to meet the search criteria. I've never done this sort of query so would really appreciate any help. A small snapshot of what I'm referring to is below. I have access to full ArcGIS suite if necessary so have full range of tools at my disposal. I've done some coding before and can work with it, but I'm not good at creating it myself necessarily. I'm really just starting to tackle this problem and haven't put too much into it yet. It seems that the NEAR and POINT DISTANCE might be the way to go? I need to get access to the license to do these so am trying to do my research in advance to best utilize my time. ![Civics](http://i.stack.imgur.com/e3dL0.jpg)


How to select all unique values in a column and put it in multilist box?

I wanted to collect all unique values in a column and show it in multilist box.


Projection string for GOES-WEST

Full-res, full-disk GOES-WEST images are available from goes.gsfc.nasa.gov. Is it possible to rig up a projection string for these images? We know the center pixel is at (0N, 135W) and the satellite elevation is 35,786km. ARC has a "View from Space" variant of the orthographic projection. Can this be modified to provide Lat/Lon coordinates for pixels on the image? It doesn't have to be perfect, but I'd like to overlay coastal boundaries. PS: Don't know offhand if 35Kkm is from sea-level or from the earth's center.


graduated pattern polygon fill

I'm sure this question is really really basic but I appeal to you because I hate the idea that I have spent 20 minutes trying to do such a simple thing... All I want to do is style a polygon layer by increasing complexity of a pattern. ex. low value polygons will have very spaced out lines, high values will have lots of lines very close to each other... Again, I know this sounds incredibly low level, but I need some help.


How to convert lines to start points and end points?

I know there are several ways to convert lines to points in Qgis but I have not been able to find a solution that will convert the file so that it indicates if the point is the start point (upstream) or end point (downstream).


Maximum size on the bounding box with ST_MakeEnvelope and && and geography column in PostGIS?

I've done quite a few google searches, but haven't managed to find anything that has helped me directly. I've got a few features in a PostGIS table with a geography column. The features are focused around (latitude, longitude) 0, 100 and 1, 101 (those are literally the points for any POINTS or LINESTRINGS in that column). I'm making a query like this:               SELECT GUID, ATTRS, ST_AsGML(GEOG), ACTIVE, CREATED, FTIME FROM FEATURES WHERE GEOG && ST_MakeEnvelope(99, -3, 103, 3, 4326) AND ACTIVE = TRUE ORDER BY CREATED DESC LIMIT 100      And it returns all the data If I change the query to be much larger, then nothing comes back:               SELECT GUID, ATTRS, ST_AsGML(GEOG), ACTIVE, CREATED, FTIME FROM FEATURES WHERE GEOG && ST_MakeEnvelope(-75, -80, 110, 3, 4326) AND ACTIVE = TRUE ORDER BY CREATED DESC LIMIT 100      So is there a limit I'm hitting somewhere here I don't know about it? If I change the query to this:               SELECT GUID, ATTRS, ST_AsGML(GEOG), ACTIVE, CREATED, FTIME FROM FEATURES WHERE GEOG && ST_MakeEnvelope(-70, -80, 109, 3, 4326) AND ACTIVE = TRUE ORDER BY CREATED DESC LIMIT 100      I still get all my data back! **EDIT** Added the ST_AsEWKT(GEOG) as requested:               select ST_AsEWKT(GEOG) from features;                  st_asewkt                  -----------------------------------      SRID=4326;POINT(100 0)      SRID=4326;POINT(100 0)      SRID=4326;POINT(100 0)      SRID=4326;POINT(100 0)      SRID=4326;POINT(100 0)      SRID=4326;POINT(100 0)      SRID=4326;POINT(100 0)      SRID=4326;LINESTRING(100 0,101 1)      SRID=4326;POINT(100 0)      SRID=4326;POINT(100 0)      SRID=4326;LINESTRING(100 0,101 1)      SRID=4326;LINESTRING(100 0,101 1)      SRID=4326;LINESTRING(100 0,101 1)      SRID=4326;LINESTRING(100 0,101 1)      SRID=4326;LINESTRING(100 0,101 1)      SRID=4326;LINESTRING(100 0,101 1)      SRID=4326;POINT(100 0)      SRID=4326;POINT(100 0)


Exporting ArcSDE feature class to shapefile using OGR?

I'd like to export data from ArcSDE for SQL Server to SHP. I've tried first to run this python script in QGIS: http://trac.osgeo.org/gdal/browser/trunk/autotest/ogr/ogr_sde.py But finally I've got this error message:               "Traceback (most recent call last):       File "<input>", line 1, in <module>       File "C:/TEMP/ogr_sde.py", line 37, in <module>         import gdaltest       File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python\qgis\utils.py", line 454, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "C:\PROGRA~1\QGISCH~1\bin\gdaltest.py", line 68, in <module>         from gdaltest_python2 import *       File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python\qgis\utils.py", line 454, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)     ImportError: No module named gdaltest_python2"      Secondary to transform via ogr2ogr but with the "ogrinfo --formats" I couldn't find the ArcSDE driver in the list. Could somebody help me what the problem is?


Leaflet: maximum number of layers?

Is there a limit to have many layers you can have in a leaflet map?


When making a point feature a different point feature appears

I am digitizing a map and I have sample locations and station locations. The program (ArcMap10) worked fine until recently. Now when I try to add a sample it adds a station instead. Any ideas on how to fix this is much appreciated1


Refresh Currently Open ArcMap Attribute Table using ArcObjects

I have written an ArcMap Addin (ArcMap 10.0) that allows a user to perform a join between an in-memory table and a feature class (feature layer) added to the TOC. I want the attribute table of the feature layer to automatically refresh after the join occurs if the user happens to have the attribute table visible when performing the join. This way the fields added to the table via the join will be visible to the user without having to close and reopen the Attribute Table. The following function is what I have tried to refresh the Attribute Table, but it does not actually refresh the display.               Private Sub RefreshAttributeTable()         Try             Dim tableWindow As ITableWindow3 = New TableWindow             tableWindow.ActiveTableWindow.Refresh()                  My.ArcMap.Document.ActiveView.Refresh()         Catch ex As Exception                  Debug.WriteLine(String.Format("{0}; {1}", ex.Message, ex.StackTrace))              End Try     End Sub      Can anyone help with this?


Getting Basic Information about ArcGIS Map Service With IGxDialog

I am having a helluva time trying to get some basic information (server URL) about an ArcGIS Map Service using the basic IGxDialog. So far, I am able to pop open the IGxDialog, and allow the user to pick an ArcGIS Map Service by setting the appropriate filter(GxFilterMapServers). Thats about as far as I can make it. What should I cast pGxObj to so I can more info about the map service?               IGxDialog pGxDialog = new GxDialog();     pGxDialog.AllowMultiSelect = false;     pGxDialog.Title = "Browse For AGIS Map Service";          IGxObjectFilter pGxFCFilter = new GxFilterMapServers();     pGxDialog.ObjectFilter = pGxFCFilter;          IEnumGxObject pGxObjects = null;     if (pGxDialog.DoModalOpen(0, out pGxObjects))     {     pGxObjects.Reset();     IGxObject pGxObj = pGxObjects.Next();     while (pGxObj != null)     {     // what do I do here to get more info about the map server???     }          }


shell script ogr2ogr export

I'm writing a simple script to export postgis data to geojson. The ogr2ogr command works well, but I'm having problems when I'm passing the parameters.               #!/bin/bash     echo 'enter country code'     read export     echo 'exporting data from $export'     ogr2ogr -f GeoJSON export.geojson PG:'dbname=alamedaok user=postgres host=localhost' -sql "SELECT id_alameda, pais, geom FROM poblaciones_def WHERE pais = `$export`"      The problem comes in the `WHERE pais = **`$export`"**` I don't know how "insert" the variable in the sql sentence. I've tried with '$' and with `, with no luck. Any help? Thanks.


Do's and Don'ts for GPS Localization

We have recently purchased some new GPS survey gear (ProMark 500) and we have set up a localization around the town using some of the known survey marks. While I'm pretty confident that I have got it right so far, I was wondering if anyone had any good tips for setting up a GPS localization. Is there is anything to watch out for, or things I can do to reduce any error. _Also if anyone has any good articles on the subject it would be greatly appreciated, I'm struggling to find anything good on the net._ **EDIT** : **While I appreciate the general GPS surveying tips, I was more interested about Localization in general. Does having localization marks close together negatively affect result. Can you have to many localization marks? Things like that.**


Google Earth Enterprise & ArcGIS - How do you use them together?

I have been fielded a few questions about Google Earth Enterprise--which I don't know anything about, I'm having a time finding answers to the two following questions, which can probably be summed up by "Do you use both GEE & ArcGIS? And, if so, how do you interact between the two?" *Can you consume Google Earth Enterprise with ArcGIS? I am pretty sure you can bring ArcGIS created shapefiles into GEE, but does it work the other way around without converting KML data to shapefiles? *Can you use GEE as an image service? My instincts say the answer to this question is "yes", but I am unable to find an actual answer.  Thanks in advance, mb


Creating evenly distributed points within an irregular boundary

I need to create an evenly distributed series of points within a series of oddly shapped polygons (formerly squares, but now squares with donut holes). The way I have solved this problem so far is to create a fishnet of the polygon and then use the centroid of each unit that the fishnet creates. However, the problem has become more complex and I now have more complex polygons. The centroids of the fishnet units are no longer good enough. I was trying to convert the polygons to a raster and then use the Split tool for rasters, and create an output with a specified number of equal area units, but that won't work, as my input vector data doesn't have the necessary vaues for that raster process to run properly. I am working with Arc 9.3 (but also have access to several other software packages)


adding commas to number values in arc2earth generated kml balloons

I'm using Info Window Builder in Arc2Earth to generate some kml for a large dataset. I'm having some trouble formatting numeric values (pulled from the attribute table) to include commas (group separators). Basically I'm trying to output the numeric values as US dollar amounts ( **1234 -> $1,234.00** ). I've found some success using the floatformat filter as follows:   `[!MyFieldName|floatformat:2]`   to successfully place exactly 2 digits to the right of the decimal point. It seems I actually want to use the stringformat filter, but I can't figure out the correct syntax. I've tried permutations similar to the following:   `[!MyFieldName|stringformat:("N", en-US)]`   but with no luck. Anyone know how to do this?


Uncaught ReferenceError: GEvent is not defined after migrating to google map api v3

I have managed to change the needed things, but I get the error from the title in the console, and I cannot figure it out what else needs to be done. any ideas? This is my code(if you paste it and run it, it will show):               <!DOCTYPE html>                   <meta name="viewport" content="width=device-width" />         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">         <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">              <link rel="stylesheet" href="http://openlayers.org/api/theme/default/style.css" type="text/css" />         <link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css" />         <link rel="stylesheet" href="http://js.arcgis.com/3.8/js/dojo/dijit/themes/nihilo/nihilo.css">         <link rel="stylesheet" href="http://js.arcgis.com/3.8/js/dojo/dijit/themes/claro/claro.css">         <link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">

                     <select id="mapServers">                         <option value="">Please select a MapServer</option>                         <option           value="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer">Census</option>                         <option           value="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer">Bloomfield           Parcels</option>                     </select>


How to convert this geometry location format to a qgis usable format?

I am a beginner with regard to dealing with gis information, so please bear with me. I would be obliged if someone could help. I have data on asssembly constituencies of Delhi, with these constituencies being represented as polygons. But I am unfamiliar with the format in which it's geometry is given. Can someone tell me how to convert this to a format which can help me use the data on qgis or google fusion table.![How to convert geometry in this format into maybe WKT format or nay which can be used on qgis](http://i.stack.imgur.com/zD2zk.png)


Extract a PostGIS dump from OSM with a particular tag

I'm new to OpenStreetMap. I want to extract all restaurants from Switzerland with their capacity if available. I am using osmosis. I tried:               osmosis --read-pbf file=switzerland.pbf --tf accept-nodes amenity=restaurant --write-xml output.osm      (I downloaded switzerland.pbf from http://planet.osm.ch/) And it looks like it works. I would like to extract it not in XML but as a postgresql/PostGIS format. I tried               osmosis --read-pbf file=switzerland.pbf --tf accept-nodes amenity=restaurant --write-pgsql restaurant_osm.psql      But it fails with the following error:               INFO: Pipeline executing, waiting for completion.     Apr 8, 2014 1:06:08 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion     SEVERE: Thread for task 1-read-pbf failed     org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The server requested password-based authentication, but no password was provided.)      I don't really understand this error. How should I do in order to extract sport facilities, leisure facilities, restaurants and shops from Switzerland version of OSM with their capacity if available?


KML Opacity Slider

I am trying to build a KML opacity slider, but I am unsuccessful so far. Based on this answer: http://stackoverflow.com/questions/20667722/changing-opacity- of-kml-overlay-in-google-maps-v3, I try to get to the images that store the KML to apply some opacity on them, but I can't manage. I made a small example here: http://jsfiddle.net/DF86E/12/ I have no idea if I am actually on the right track with this approach, so any help is much appreciated.


ST_Buffer returns inaccurate results with radius of over 1 meter

I have a specific location: lat, lng and accuracy(meters) I want to return a geography object that will represent a polygon that surrounds this point with a given radius that will be equivalent to accuracy ( I don't want to use a circle) this postgis code SELECT ST_AsText(CAST(ST_Buffer(ST_SetSRID(ST_Point(-74.005847, 40.716862),4326),10) As geography)); returns an object with ponts such as: (-64.005847 40.71.6862) That are on a huge radius and not 10 meters as requested. What am I dong wrong here? Thanks


How to read ASTER metadata in IDL?

I'm trying to read many ASTER images (1B mainly) in IDL (I can try in R also). I'm used to work with Landsat, but the aster metadata is complicated. I write a code with a lots of conditional that can read the image parameters (angles, dates, etc). But I want to know if there is other way I can read this. Besides, I want to know if all the aster metadata have the same format, so I can batch all the images with the same code (or I need to modify it image by image).


How to link dataframes in ArcGIS or QGIS?

The below image shows a layout in ArcGIS 10.1 with four dataframes. Each dataframe is of the same geographic area, although they are different images. For example, the top left image is a 1989 DOQ, the top right image is a reversed 1989 DOQ, the bottom left image is a 2012 DOQ, and the bottom right image is a reversed 2012 DOQ.   1. Is it possible to link the dataframes so that panning the image in one dataframe pans the images in all of the other dataframes (i.e. similar to how you can "Link Views" in Erdas Imagine)?   2. Is this possible in QGIS? ![enter image description here](http://i.stack.imgur.com/9d4yH.jpg)


add a feature in openlayers using lonlat from geolocation

I'm trying to add a feature in a openlayer's vector layer using the lonlat that came from the HTML5's geolocation API. Combining tutorials for the geolocation and this demo I created the following code               <input type="button" value="Where Am I" onClick="loadDemo();" />               //this is outside the init() openlayers function. If i put it inside init(), will not work at all     function loadDemo() {     if(navigator.geolocation) {     document.getElementById("support").innerHTML = "I'll find you!";     navigator.geolocation.getCurrentPosition(updateLocation, handleLocationError, {timeout:100000});     } else {     document.getElementById("support").innerHTML = "Browser is so old";     }}          function updateLocation(position) {     var latitudeg = position.coords.latitude;     var longitudeg = position.coords.longitude;     var accuracy = position.coords.accuracy;     document.getElementById("latitude").innerHTML = latitudeg;//works     document.getElementById("longitude").innerHTML = longitudeg;//works     document.getElementById("accuracy").innerHTML = "This location is accurate within " +accuracy + " meters."//works     var lonLat = new OpenLayers.LonLat(longitudeg,latitudeg).transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:900913"));//works     alert(lonLat);//works     var pointg = new OpenLayers.Geometry.Point(lonLat);     var feature_point_g = new OpenLayers.Feature.Vector(pointg);     alert(pointg.lat);//not working, returns undifined     alert(feature_point_g);//not working, returns [object Object]     pins.addFeatures([feature_point_g]);//not working     pins.refresh({force:true});//not working     }      As you can see, problem is , there is something wrong with creating the point and the feature. Honestly, I searched and checked and can't solve this. Can you see something I don't? Thanks


How could I assign point values to a raster stream segment?

I need to assign a point value in raster format to a raster stream segment, which contains the point. See bellow: ![Point values and stream segments](http://i.stack.imgur.com/mmfie.jpg) The expected result is a segment, whose value is the point value. How could I?


How to give elevation information to a polygon feature class using existing TIN file ? (geological mapping)

I'm an ArcGIS 10.1 user. My issue: I have a printed form of a map which depicts geological bodies being surface rock occurence. Additionaly, there are elevation contour lines. I digitized the map by creating a polyline feature class which includes an elevation field (double), a point feature class which includes an elevation field (double) representing the highest spots and a polygon feature class which includes a rock type field (text). At the moment, I have created a TIN file using the elevation shapefiles (polyline and point as I mentioned). After that, I applied TIN to Raster and used this for a topographic cross-section. An idea came to mind which is: I'd like to see rock types in my DEM. My polygon feature class does not include any elevation information. How could I give elevation information to my polygon f.class? Ask me for more details...


Which part(s) of the ArcMap user interface uses the Rogue Wave Objective Grid(OG1200ASU.DLL)?

I'm trying to troubleshoot ArcMap 10 crashing when I reconcile a version and I think it is OG1200ASU.DLL causing the problem. I'm guessing it's the attribute table or the attribute inspector.               GetProcAddress(0x773D0000 [c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\COMCTL32.DLL], "InitCommonControlsEx") called from "c:\windows\winsxs\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.4974_x-ww_a96f9c14\MFC90U.DLL" at address 0x78A43931 and returned 0x773D4088.     LoadLibraryW("DbgHelp.dll") called from "c:\program files\arcgis\desktop10.0\bin\AFCORE.DLL" at address 0x007144A4.     Loaded "c:\program files\arcgis\desktop10.0\bin\DBGHELP.DLL" at address 0x28380000.  Successfully hooked module.     DllMain(0x28380000, DLL_PROCESS_ATTACH, 0x00000000) in "c:\program files\arcgis\desktop10.0\bin\DBGHELP.DLL" called.     DllMain(0x28380000, DLL_PROCESS_ATTACH, 0x00000000) in "c:\program files\arcgis\desktop10.0\bin\DBGHELP.DLL" returned 1 (0x1).     LoadLibraryW("DbgHelp.dll") returned 0x28380000.     GetProcAddress(0x28380000 [c:\program files\arcgis\desktop10.0\bin\DBGHELP.DLL], "MiniDumpWriteDump") called from "c:\program files\arcgis\desktop10.0\bin\AFCORE.DLL" at address 0x007144B4 and returned 0x283DD4F0.     Second chance exception 0xC0000005 (Access Violation) occurred in "c:\program files\arcgis\desktop10.0\bin\OG1200ASU.DLL" at address 0x064A310B.     Exited "c:\program files\arcgis\desktop10.0\bin\ARCMAP.EXE" (process 0x1298) with code -1073741819 (0xC0000005).      * * * **Update:**   I've narrowed my issue to the attribute table. When I start up ArcMap with the attribute table window docked, edit, then reconcile...ArcMap crashes. If I start up ArcMap, close the attribute table window ~~(or auto-hide)~~ , then edit, then reconcile...success! If I start up ArcMap, close the attribute table window ~~(or auto-hide)~~ , then open the attribute table window again, then **dock** ( _which effectively puts the attribute table window in same condition as it was on startup_ ) , then edit, then reconcile...success! http://dl.dropbox.com/u/1156285/ArcMap_Reconcile_CrashReproduce.avi


PyQgis Message Bar Woes

Having a bit of trouble with the basics of getting the (awesomely discreet) new user prompt/warning to properly display. Here is the (troubled) code I am using:               self.iface     ...     iface.messageBar().pushMessage("Error", "Please select a Topographic Map for your simulation!", level=QgsMessageBar.CRITICAL, duration=2)      ...and a bit more complete code for help in resolving this issue:               class GraphicGroundwater:     def __init__(self, iface):         # Save reference to the QGIS interface         self.iface = iface         # initialize plugin directory         self.plugin_dir = os.path.dirname(__file__)         # initialize locale         locale = QSettings().value("locale/userLocale")[0:2]         localePath = os.path.join(self.plugin_dir, 'i18n', 'graphicgroundwater_{}.qm'.format(locale))         # affirm window orientation         if os.path.exists(localePath):             self.translator = QTranslator()             self.translator.load(localePath)             if qVersion() > '4.3.3':                 QCoreApplication.installTranslator(self.translator)     # run add base     def run3(self, iface):         if FindDirectory._destination is 0:             iface.messageBar().pushMessage("Error", "Please select a central folder location to save your base layer(s)!", level=QgsMessageBar.CRITICAL, duration=2)         elif FindDirectory._destination is not 0:             if GetMaps._TOPOcrs is 0:                 iface.messageBar().pushMessage("Error", "Please select a Topographic Map for your simulation!", level=QgsMessageBar.CRITICAL, duration=2)             elif GetMaps._TOPOcrs is not 0:                 crs = str(GetMaps._TOPOcrs)                 Base =  QgsVectorLayer('Polygon?crs=' + GetMaps._TOPOcrs + '&field=LAYER:string(8)&field=BOTTOM:string(8)&field=TOP:string(8)&field=K:string(10)&field=R:string(10)&index=yes', "Base", "memory")                 QgsMapLayerRegistry.instance().addMapLayers([Base])                 pr = Base.dataProvider()                 BaseFeat = FindDirectory._destination+"/Base.shp"                 writer = QgsVectorFileWriter(BaseFeat, "CP1250", pr.fields(), QGis.WKBPolygon, pr.crs(), "ESRI Shapefile" )                 del writer      And here is the resultant conflict: > Traceback (most recent call last): File > "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\GraphicGroundwater\graphicgroundwater.py", > line 132, in run3 iface.messageBar().pushMessage("Error", "Please select a > central folder location for your simulation!", level=QgsMessageBar.CRITICAL, > duration=2) **_AttributeError: 'bool' object has no attribute > 'messageBar'_** Any clues for a qgis_python_novi?


UTM NAD 1927 to DMS

I have requirement to convert UTM NAD 1927 Northing (4804172), Esting(753352) to Geographic coordinatesystem(Degrees Minutes, Seconds). Iam doing like below m_mapPoint[0] = new esri.geometry.Point(4804172, 753352, new esri.SpatialReference({ wkid: 26712 })); var geogPt = esri.geometry.webMercatorToGeographic(m_mapPoint[0]); gsvc.project([geogPt], outSRgc83, convrtCord83); when I project the point I am getting result as NaN. But It's equivalent DMS should be 42 21' 58.42'', 107 52' 29.28'' and map point should be 42.5698, -107.5229 Please help me how to resolve it. Thanks, Uday


Cursor only completes one loop

I am at the end of my rope here. This cursor runs fine for one iteration and then stops. It doesn't throw an error, it just completes. There are 3,000 rows in my table, so I don't know why it would do this. Does the Generate Near Table function somehow stop the cursor? Thanks               import arcpy             rows = arcpy.SearchCursor("mergedVMS")     trip_id = 0     for row in rows:         if row.trip_id == trip_id:             continue         else:             trip_id = int(row.trip_id)             arcpy.SelectLayerByAttribute_management("mergedTrawls", "NEW_SELECTION", '"trip_id" = ' + str(trip_id))                 arcpy.SelectLayerByAttribute_management("mergedVMS", "NEW_SELECTION", '"trip_id" = ' + str(trip_id))             arcpy.GenerateNearTable_analysis("mergedVMS", "mergedTrawls", "C:\\Desktop\\Feb25\\Project.gdb\\pointdist" + str(trip_id))     del row, rows      Per dmahr's answer, my new script that works is as follows:               import arcpy             rows = arcpy.SearchCursor("mergedVMS2")     trip_id = 0     for row in rows:         if row.trip_id == trip_id:             continue         else:             trip_id = int(row.trip_id)             arcpy.SelectLayerByAttribute_management("mergedTrawls", "NEW_SELECTION", '"trip_id" = ' + str(trip_id))                 arcpy.SelectLayerByAttribute_management("mergedVMS", "NEW_SELECTION", '"trip_id" = ' + str(trip_id))             arcpy.GenerateNearTable_analysis("mergedVMS", "mergedTrawls", "C:\\Desktop\\Feb25\\Project.gdb\\pointdist" + str(trip_id))             arcpy.SelectLayerByAttribute_management("mergedTrawls", "CLEAR_SELECTION")             arcpy.SelectLayerByAttribute_management("mergedVMS", "CLEAR_SELECTION")     del row, rows      I have simply duplicated my mergedVMS layer and run the cursor on that (trip_id is my unique value). I also added two clear selection lines. It is currently running exactly as expected. Thanks so much for the quick help!


Can I download a layer displayed on the google api?

Given the google api displaying a map on some site with layer 'A' on top of it. How can I create a GIS file for layer A (as simply as possible of course)?


Skip errors in model builder

is there a way to handle an error within the arcgis modelbuilder? I have a model which iterates over hundreds of raster files. some of them may be corrupt. i`m looking for a way in which the model builder skips any corrupt raster files and proceeds with the next file. thanks for your help!


Libraries to render vector-based maps in the browser

Is there a open source JavaScript library like leaflet or openlayer which can be used in a web or mobile application and loads vector-based maps instead of images? I only need the road information and some POIs. The only library I found was polymaps \- but still I would need a server or service which serves the vector svg data (preferable from OpenStreetMap). Also there is the nice Android project called Mapsforge but I would need it for a web application or other mobile devices.


raster in TOC to geotiff on disk in ArcPy

I am really hoping that someone out there who knows a bit about ArcPy in ArcGIS10 can help me out. I am attempting to automate some work w/ netcdf files. Basically, I am able to automate the creation of the netcdf into a raster with arcpy.MakeNetCDFRasterLayer_md. However, I would simply like to then in the same python script save this layer out to a geotiff on my disk so that I can use it later in some analysis. Manually, I know I can go to the TOC right-click and export to geotiff, but it would be great to be able to script this. Any help would be greatly appreciated. I have pasted my arcpy code below for anyone’s reference which works to add the netcdf as a raster to the TOC, but I am stuck after that.               Cheers,     Derek               -----------------------------------------------------------------------     import arcpy          arcpy.env.workspace = "C:/data/NEMAC/Projects/NCA/ArcGISScripting/ArcPy"          mxd = arcpy.mapping.MapDocument("CURRENT")          # Local variables:     crcm_ccsm_cdd_mean_nc = "C:\\Data\\NEMAC\\Projects\\NCA\\NCANetcdfProcessing\\output_files\\crcm_ccsm_cdd_mean.nc"     outputRaster = "C:\\Data\\NEMAC\\Projects\\NCA\\ArcGISScripting\\ArcPy\\result1_Layer3.tif"          # Process: Make NetCDF Raster Layer     test = arcpy.MakeNetCDFRasterLayer_md(crcm_ccsm_cdd_mean_nc, "result1", "xc", "yc", outputRaster, "", "", "BY_VALUE")     df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]     addLayer = arcpy.mapping.Layer(r"C:\Data\NEMAC\Projects\NCA\ArcGISScripting\ArcPy\result1_Layer3.tif")     arcpy.mapping.AddLayer(df, addLayer, "BOTTOM")     lyr = arcpy.mapping.ListLayers(mxd, "", df)[0].name     #arcpy.mapping.ExportToTIFF(lyr, r"C:\Data\NEMAC\Projects\NCA\ArcGISScripting\ArcPy\result1_Layer3.tif"     del mxd, addLayer     #arcpy.SaveToLayerFile_management("C:\\Data\\NEMAC\\Projects\\NCA\\ArcGISScripting\\ArcPy\\result1_Layer3.tif", "C:\\Data\\NEMAC\\Projects\\NCA\\ArcGISScripting\\ArcPy\\result1_Layer3.tif", "ABSOLUTE")     arcpy.RefreshTOC()


Is it possible to generate a vector polygon from a polygon on a raster image?

I have a raster map which I have extracted from a government report providing flood extent return frequencies. I want to 'snatch' these flood extent polygons (i.e. convert to vector) and I was wondering if there is a simple way to do this in QGIS. Simply digitising these layers by tracing new polygons would be too time consuming and potentially result in human error. Is there a tool or methodology someone could recommend to me which would recognise these polygons in raster format (there are clearly outlined and coloured distinctly differently to the background) so I can convert them to vector? Any help with this is very much appreciated. Camilla


Where is QGIS installation path in Ubuntu

I can't find the QGIS installation path in ubuntu 12.10


Measuring Continuous Distance of GPS track in ArcGIS Desktop

I am looking for a way to quickly measure the distance covered of GPS tracks of foraging Seabirds. A tool that could give accumulative distance of point to point from the long and lat coordinates would be ideal. I have tried a few different tools in the distance toolbox but they don't seem to measure continuous distance from point to point more from a single source. And the Hawth's tools is not supported on arcmap 10.1, (http://www.spatialecology.com/htools/pntdistmatrix.php) which sheds some light on potential tools. Thanks in Advance![enter image description here](http://i.stack.imgur.com/83UHY.jpg) ![Foraging trip of Tropical Seabird on the coast of Northern Australia](http://i.stack.imgur.com/hobsk.jpg)


Having trouble selecting polygon from existing layer (using OpenLayers.Control.SelectFeature)

I am hoping someone can point me in the right direction. I am not a programmer, so that is my first roadblock. _ha_ The problem: I have an existing polygon layer and I am trying to select one of the polygons. This has got to be one of the simplest tasks, but I am unable to figure out how to do it. I am trying to follow the methods in the OpenLayers Beginner's Guide, but so far nothing has worked out:               var select_feature_control = new OpenLayers.Control.SelectFeature(          legal_land_descriptor,          {         multiple: false,         toggle: true,         multipleKey: 'shiftKey'          }     );          map.addControl(select_feature_control);     select_feature_control.activate();      Should this not allow me to select a polygon? I did manage to query the polygons by clicking on them, and now I am just trying to select one of the polygons, Argh! Any ideas as to what I am doing wrong here? Thanks!!


How to find parcels related to geocoded addresses?

I have geocoded a table of addresses (around 200 records) in ArcMap 10.1 and now need to select the parcel polygons that they are related to. Trouble is the geocoded addresses fall outside of the polygon boundaries. Is there a recommended method to be able to identify the parcels that belong to these addresses?


Arcpy Network Analyst solver error

Hello GIS Stack Exchange, I am finding it difficult to load locations to sublayers using python in ArcGIS 10.0 network analyst Vehicle routing problem. I'm also having some trouble debugging my code. Basically i keep getting the following error from the Solve_na function "An error occured on line 72 ERROR 030092: VRP Solver failed due to invalid input. Invalid input in the NA classes. Failed to execute (Solve)." It strikes me that even though there is an error, the depot and orders network analyst sublayers are well loaded with values from the input feature classes, while the routes network analyst sublayer does not load the values from its corresponding feature class. This implies that there must be a problem adding locations to the route from the corresponding route feature class that i created. Here is the code below               import arcpy     from arcpy import env          try:         arcpy.CheckOutExtension("Network")              env.workspace = arcpy.GetParameterAsText(0)         env.overwriteOutput = True              inNetworkDataset = arcpy.GetParameterAsText(1)         outNALayer = arcpy.GetParameterAsText(2)              impedanceAttribute = "CABLE_COST"         distanceAttribute = "Cable_Length"         timeUntis = "Minutes"         distanceUnits = arcpy.GetParameterAsText(3)         inTurbines = arcpy.GetParameterAsText(4)         inDepots = arcpy.GetParameterAsText(5)         inRoutes = arcpy.GetParameterAsText(6)              depotFieldMappings = "Name Name #;"         routeFieldMappings = "Name Name #; StartDepotName StartDepotName #; EndDepotName EndDepotName #; StartDepotServiceTime StartDepotServiceTime #; EndDepotServiceTime EndDepotServiceTime #; EarliestStartTime EarliestStartTime #; LatestStartTime LatestStartTime #; Capacities Capacities #; FixedCost FixedCost #; CostPerUnitTime CostPerUnitTime #; CostPerUnitDistance CostPerUnitDistance #; OvertimeStartTime OvertimeStartTime #; CostPerUnitOvertime CostPerUnitOvertime #; MaxOrderCount MaxOrderCount #; MaxTotalTime MaxTotalTime #; MaxTotalTravelTime MaxTotalTravelTime #; MaxTotalDistance MaxTotalDistance #; SpecialtyNames SpecialtyNames #; AssignmentRule AssignmentRule #;"         turbineFieldMappings = "Name NAME #; TimeWindowStart1 TimeWindowStart1 #; TimeWindowEnd1 TimeWindowEnd1 #; MaxViolationTime1 # 0"              outLayerFile = "C:/data/output" + "/" + outNALayer + ".lyr"              arcpy.MakeVehicleRoutingProblemLayer_na(inNetworkDataset,outNALayer,                                                 timeUntis,distanceAttribute,                                                 "Minutes", distanceUnits, "1/1/1900", "#", "Low","#",                                                 "NO_UTURNS", "#", "TRUE","","STRAIGHT_LINES")              arcpy.AddLocations_na(outNALayer, "Depots", inDepots, depotFieldMappings,"")              arcpy.AddLocations_na(outNALayer, "Routes", inRoutes, , "")              arcpy.AddLocations_na(outNALayer, "Orders", inTurbines, turbineFieldMappings,"")                arcpy.Solve_na(outNALayer)              arcpy.SaveToLayerFile_management(outNALayer,outLayerFile,"RELATIVE")              arcpy.AddMessage("Script completed successfully")          except Exception as e:              import traceback, sys         tb = sys.exc_info()[2]         arcpy.AddMessage("An error occured on line %i" % tb.tb_lineno)         arcpy.AddMessage(str(e))


If I've given two different layers the same CRS, why won't they overlay one another?

I have a "towns" and "state" shapefile for Massachusetts as two separate vector layers in QGIS. I've set the project coordinate system to WGS 84 at the bottom of the screen (next to the "coordinate" and "scale" windows), I've also used the "define current projection" tool under Vector> Data Management Tools. Lastly, I've right clicked on each shapefile in my layers window to "Set Layer CRS." I've also enabled "on the fly" transformations. Is there a common reason why the two shapefiles will not sit atop one another, though I've given them the same projection? Thanks! Alex


Can I prevent features from being created outside an OpenLayers map?

In our app, we allow users to create features on maps. The boundaries of these features will later be converted into real-life latitude/longitude coordinates, but does not make sense if features are created outside the actual boundaries of the map. ![](http://i.stack.imgur.com/iefG1.png) In the above screenshot, I'd like to prevent the blue feature from being drawn so that its upper edge stays _inside_ the actual map. How could I do that? I couldn't find any reference to this in OpenLayers examples or documentation. (Currently on 2.12-rc1)


One-to-many relationship classe(s)/table(s) used for monitoring

I realize that this may be a bit simplistic for this blog, so I apologize in advance. However, for someone with a working knowledge of ArcGIS, I've had issues figuring this out on my own. I have a water source feature class in my geodatabase that stores point locations and other non-changing information. I want to monitor these water sources year after year and keep track of the data from year to year (so I don't want to overwrite the previous year's data with the following year's data). I have a table that has the monitoring categories, and I have created a one:many relationship between the feature class and the table. So my question is, how can I best incorporate multiple years of data (through checking the geodatabase in and out of ArcPad on my GPS) into a table(s) related to my feature class? Thanks for the help!


is there a way to tell if two linestrings "really" intersect in JTS or GEOS

In JTS (or GEOS) you can't tell if two linestrings really cross each other. The result is exactly the same whether the lines simply have a point in common but don't cross or if they really cross. Is there an easy way to differentiate these cases ? thanks


Problems with registration modules in ArcMap (ArcGIS 9.3)

I’m programming a module for ArcMap (ArcGIS 9.3) in Visual Basic (Visual studio 2005) realizing ITool interface. My task is to link it to ArcMap to reflect an icon on the Tools toolbar. The problem is the procedure of registration itself: ArcMap doesn’t see my module. Also it’s important to say that if the interface ICommand was realized in my module then there won’t be any problems with the registration in ArcMap. But I need interface ITool, so I have such type of problems. More particularly, I have an instruction of performing the procedure of registration modules in ArcMap like this:   1. Create a new ActiveX dll Visual Basic project.   2. In the VB project, add reference to ESRI SystemUI, ESRI Framework, ESRI ArcMapUI Libraries.   3. Paste this code into a class module.In the Resource Editor in VB, add a bitmap and give it an Id of 101.   4. Also add a cursor and give it an Id of 102.   5. Compile the project to create the dll.   6. In the Customize dialog in ArcMap, click Add from file and navigate to the dll you just created. The custom tool will be added to ArcMap.   7. In the Commands panel of the Customize dialog, select MyCustomTools in the Categories list. In the Commands list, select MyTool and drag it to a toolbar.   8. Test the tool. So, step 6 is the main difficulty.


Why are the results from the same data different in ArcGIS vs MS Excel?

I have done some interpolation in Geostatistical Analyst in ArcGIS and I got the Standard Deviation (SD) a bit different from the SD that I calculated in Excel Spreadsheet. What algorithm does each package use? Why are the results different?


How to convert lat long into world region?

I have a list of lat/lon points in a kml file which I would like to group into world regions. How can I use the World Borders Dataset or some other dataset to generate a "region" tag for each point?


Why does a shapfile shift after transformation?

I have a shapefile created in the `raster` package (ER_14.3_2000_poly).               > #read in a raster file     >   ER_14.3_2000<-raster('E:/Ecoregions Models/Outputs/ER_14.3/ER_14.3_ConsensusMap3.asc')     > #convert the raster to a shapefile and add CRS     >   ER_14.3_2000_poly<-rasterToPolygons (ER_14.3_2000, fun=function(x){x==1}, dissolve=TRUE)     >     projection (ER_14.3_2000_poly)<- "+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs"     >     ER_14.3_2000_poly<- spTransform(ER_14.3_2000_poly,CRS("+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs"))     > ER_14.3_2000_poly     class       : SpatialPolygonsDataFrame      nfeatures   : 1      extent      : -856895.9, 916774.1, -2897667, -1500787  (xmin, xmax, ymin, ymax)     coord. ref. : +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs      nvariables  : 1     names       : value      min values  :     1      max values  :     1       I want to overlay it on to a raster image (alt) and two shapfiles (MX_L0 and USA_L0) showing political boundaries. raster:               > alt     class       : RasterLayer      dimensions  : 365, 515, 187975  (nrow, ncol, ncell)     resolution  : 7880, 9190  (x, y)     extent      : -2713276, 1344924, -2952807, 401543  (xmin, xmax, ymin, ymax)     coord. ref. : +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs      data source : in memory     names       : alt      values      : -185.8762, 3942.444  (min, max)      Shapefiles:                > MX_L0         class       : SpatialPolygonsDataFrame          nfeatures   : 1          extent      : -1785794, 1407980, -3312074, -1222596  (xmin, xmax, ymin, ymax)         coord. ref. : +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs          nvariables  : 24         names       : ID_0, ISO, NAME_ENGLI, NAME_ISO, NAME_FAO,                       NAME_LOCAL, NAME_OBSOL,                       NAME_VARIA, NAME_NONLA, NAME_FRENC, NAME_SPANI, NAME_RUSSI, NAME_ARABI, NAME_CHINE, WASPARTOF, ...          min values  :  145, MEX,     Mexico,   MEXICO,   Mexico, MÃ©xico|Estados Unidos Mexicanos,         NA, Estados Unidos Mexicanos|MÃ©jico,         NA,    Mexique,    MÃ©xico,    ???????,    ???????,        ???,        NA, ...          max values  :  145, MEX,     Mexico,   MEXICO,   Mexico, MÃ©xico|Estados Unidos Mexicanos,         NA, Estados Unidos Mexicanos|MÃ©jico,         NA,    Mexique,    MÃ©xico,    ???????,    ???????,        ???,        NA, ...          > USA_L0         class       : SpatialPolygonsDataFrame          nfeatures   : 1          extent      : -5978257, 2516534, -2116922, 3910986  (xmin, xmax, ymin, ymax)         coord. ref. : +proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs          nvariables  : 24         names       : ID_0, ISO,    NAME_ENGLI,      NAME_ISO,                 NAME_FAO,    NAME_LOCAL, NAME_OBSOL,                                  NAME_VARIA, NAME_NONLA,  NAME_FRENC,     NAME_SPANI,                NAME_RUSSI,       NAME_ARABI, NAME_CHINE, WASPARTOF, ...          min values  :  240, USA, United States, UNITED STATES, United States of America, United States,         NA, United States of America|USA|US|U.S.|U.S.A.,         NA, Ã‰tats-Unis, Estados Unidos, ??????????? ????? ???????, ???????? ???????,         ??,        NA, ...          max values  :  240, USA, United States, UNITED STATES, United States of America, United States,         NA, United States of America|USA|US|U.S.|U.S.A.,         NA, Ã‰tats-Unis, Estados Unidos, ??????????? ????? ???????, ???????? ???????,         ??,        NA, ...       When I plot it out, the shapefile is shifted to the east. The shapefile should be hugging the Mexican coast. Does anyone know where I went wrong? Any input helps! ![enter image description here](http://i.stack.imgur.com/T0JsC.png) I am thinking that for some reason the xmax value of the `extent` has been modified. does anyone have ideas on how to change it so they overlap? Cheers.


Cell calculations; QGIS,GRASS,GDAL,SAGA

I recently asked a question about trying to calculate the slope over distance (manually) using QGIS, but then I came up with another way of solving the problem, but I would have to get some help for that as well (Sorry, new to open source GIS). Can I calculate the value difference between adjacent cells, and if the condition is met (e.g. Cell A-Cell B => 1) the cell is given a value of 1, and if false, a value of 0? Or just a color map with intervals of values? This calculation would have to be repeated until every cell is compared with its connecting cells. Does this make any sense? I have latest QGIS with GRASS and gdal, and I also use SAGA. Thanks Fredrik


storing images in mysql from WebGIS applications

I'm a complete amateur at writing code. I would like to make an application for storing LNG, lat, and other data, as well as images in mysql. I've set up, I made a separate application for storing images and data storage via WebGIS applications. Now I do not know how to integrate the two applications. If someone could help me, to be shown how to integrate this code:               <form enctype="multipart/form-data" action="add.php" method="POST">      Photo: <input type="file" name="photo">
      <input type="submit" value="Add">      </form>      in               <!DOCTYPE html >          <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />     <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>     <title>Google Maps JavaScript API v3 Example: Map Simple</title>          <link rel="stylesheet" href="/ol/theme/default/style.css" type="text/css">     <link rel="stylesheet" href="/ol/theme/default/google.css" type="text/css">     <link rel="stylesheet" href="style.css" type="text/css">

                     thanks


QGIS (Mis)Detecting Escape Characters in SLD files

Okay, I am just running into some trouble with the string literal functionality with QGIS's rule based styling. For example I have an attribute called LITH that equals 'BAS\b'. The rule where LITH = 'BAS\b' does not work however as the escape character is not being ignored. How would I go about ignoring the escape character in QGIS? If I was using c# I could use @'BAS\b', if I was using XML I would use the ![] tags. I am loading these rules from a SLD file, but the symbology is incorrect in places due to the escape character not being ignored.


Opengeo and Ubuntu memory issue

I was working with LiDAR in Opengeo suite while following the Boundless tutorials (http://workshops.boundlessgeo.com/tutorial-lidar/) In my recent post titled 'LiDAR and Opengeo', I mentioned about the error with PDAL execution. I solved the issue by editing the 'laz2pg.xml' file and added appropriate port, localhost and password in the xml file. And now pdal commands can send request to read files. On the terminal, the white cursor blinks for a while and then stopped. At this point the terminal no longer respond. Here is the error message: `rblzaman@ubuntu:~/Downloads/tileindex$ pdal pipeline laz2pg.xml Requested to read 11418635 points Requested to write 11418635 points 0Killed rblzaman@ubuntu:~/Downloads/tileindex$` In the following day, in my same PC (Ubuntu installed on windows 7 via VM player), it show the following error: `rblzaman@ubuntu:~/Downloads/tileindex$ pdal pipeline laz2pg.xml Requested to read 11418635 points Requested to write 11418635 points 0Caught exception: std::bad_alloc rblzaman@ubuntu:~/Downloads/tileindex$` When I typed 'free -m' , it returns, `rblzaman@ubuntu:~$ free -m total used free shared buffers cached Mem: 1000 744 256 0 16 233 -/+ buffers/cache: 493 506 Swap: 1020 329 691 rblzaman@ubuntu:~$` Is this memory issue ? I have installed Ubuntu 12.04 on windows 7 using VM player. How to solve this error ? Thanks


SAGA GIS: How to load an .hgt file?

I want to display and work with the data from http://dds.cr.usgs.gov/srtm/version1/Eurasia/ in SAGA-GIS but am having difficulties knowing which module I should use to load the data. As far as I know hgt files are raw binary data, so this should work with the Import Binary Raw/data right? But by simply loading the data into the import window, nothing happens meaning I have to define the correct parameters, but how? any help most welcome, cheers, Rob


ArcMap, Make Grids and Graticules Layer example

I'm trying to use the Make Grids and Graticules Layer tool in ArcMap (have a ArcInfo license). I'm looking for a basic example like in North America. eg. 1.)Start with empty map 2.) Set data frame to NAD83 UTM Zone 1N 3.) Create File geodatabase 4.) Create GridExample dataset in FGDB in NAD83 UTM Zone 1N 5.) Open; Make Grids and Graticules Layer tool a) Select grid template C:\Program Files (x86)\ArcGIS\Desktop10.0\GridTemplates\Quad_24K_NAD83.xml b) Select Extent, and Same as Display from drop down list this sets Left: -5620263.767724, Top: -5620263.767724, Right: -5620263.767724, Bottom: -5620263.767724 c) Select the GridExample dataset in FGDB for Input Feature Dataset d) Output layer is set automatically to Quad_24K_NAD83 6.) Run the tool Output is as follows, but fails to create the grid. Creates the feature classes ok. **Can anyone hint on improving this example to create the grid?** Executing: MakeGridsAndGraticulesLayer "C:\Program Files (x86)\ArcGIS\Desktop10.0\GridTemplates\Quad_24K_NAD83.xml" "-5620263.767724 -5275836.261749 5621263.767724 5276836.261749" C:\data\FGDB\Grids.gdb\Grid1 Quad_24K_NAD83 Quad_24K_NAD83 24000 -3.18645767674729E-04 "3 Centimeters" "2 Meters" PROJCS['GCS NAD 1983 CORS96 UTM Zone 60N (Calculated)',GEOGCS['GCS_NAD_1983_CORS96',DATUM['D_NAD_1983_CORS96',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',177.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]];IsHighPrecision NO_CONFIGURELAYOUT "PROJCS['NAD_1983_StatePlane_Hawaii_1_FIPS_5101',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-155.5],PARAMETER['Scale_Factor',0.9999666666666667],PARAMETER['Latitude_Of_Origin',18.83333333333333],UNIT['Meter',1.0]];-5123000 -12084900 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision" "GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision" # # Start Time: Tue May 08 16:46:56 2012 The area-of-interest is much larger than the grid's intended area. Processing time may be long. Failed to create features in GRD_Grid1. Failed to execute (MakeGridsAndGraticulesLayer).


How to add push pin on map with mouse click using bing API

I am new to BING API. What my requirement is I have to add a pushpin on my map where the mouse is clicked. I added a map to my web page, created an click event on map and try to add a push pin. But its not working.. Mu piece of code :               <script charset="UTF-8" type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&s=1"></script>                        <script type="text/javascript">         var map,mapoptions;          var pinInfobox = null;         function init()          {                  var bingkey="Bing map key";                  var loc=new Microsoft.Maps.Location(58.995311, -103.535156)             mapOptions ={   credentials: bingkey,                             center: loc,                             zoom: 3,                             mapTypeId: Microsoft.Maps.MapTypeId.road                     }                  map = new Microsoft.Maps.Map(document.getElementById("bingMap"), mapOptions);             Microsoft.Maps.Events.addHandler(map, 'click',getLatlng );                   }         function getLatlng(e) {              if (e.targetType == "map") {                var point = new Microsoft.Maps.Point(e.getX(), e.getY());                var locTemp = e.target.tryPixelToLocation(point);                var location = new Microsoft.Maps.Location(locTemp.latitude, locTemp.longitude);              alert(locTemp.latitude+"&"+locTemp.longitude);                          var pin = new Microsoft.Maps.Pushpin(location, {'draggable': false});                       map.entites.push(pin);                  alert("Done");                  }                          }           </script>      This is my script. This init() function is invoked on body onload. Any help is greatly appreciated ..


How to color symbols by data in MapInfo?

In MapInfo 10.0, how can I quickly colorize point symbols according to a field in the data table, without creating a new map? My data is just longitude, latitude and time, and I'd like to colorize the points according to the time field. This seems really basic but I can't find any way to do it.


How can I delete relationship classes?

ArcGIS 10.2.2 Standard I'm looking for a code sample that can delete all relationship classes from a database, including inside Feature Datasets. I've searched ESRI's site and only found a suggestion to use IDataset. I've searched google and not found anything helpful. Do I need to delete the existing relationships prior to deleting the entire relationship class? Here is what I have so far:                IFeatureWorkspace FWS = WS as IFeatureWorkspace;         IWorkspaceEdit2 wse2 = WS as IWorkspaceEdit2;         if (!wse2.IsBeingEdited())           wse2.StartEditing(true);         if (!wse2.IsInEditOperation)           wse2.StartEditOperation();         IRelationshipClassContainer pRelClassCont = FWS.OpenFeatureDataset("MyFeatureDataSet") as IRelationshipClassContainer;         IEnumRelationshipClass eRelClass = pRelClassCont.RelationshipClasses;         IRelationshipClass relClass = null;         IRelationship rel = null;         eRelClass.Reset();         while ((relClass = eRelClass.Next()) != null)         {           //rel = relClass.GetRelationship(relClass.OriginClass as IObject, relClass.DestinationClass as IObject);           IDataset ds = relClass as IDataset;           if (ds.CanDelete())             ds.Delete(); // 4/10/14           //relClass.DeleteRelationship(relClass.OriginClass as IObject, relClass.DestinationClass as IObject);         }         if (wse2.IsInEditOperation)           wse2.StopEditOperation();         if (wse2.IsBeingEdited())           wse2.StopEditing(true);


How to calculate how long an arc second is for a given long/lat?

The title says it all, really. I am wondering what area is covered by a dataset which is one arc second wide. Thanks, Rob


Which projection should I use to get my WMS service to work?

* * * All of my shapefiles have exactly the same WKT. Using http://prj2epsg.org I have verified that EPSG:3059 has the same parameters as WKT definition of my shapefiles, so I'm using 3059 in my mapfile. I want to know what changes I must make in my mapfile for my WMS service to work. What I have tried:   * I thought maybe epsg:3059 is not supported by my mapserver version 6.0.3. I checked file C:\MS4W\ms4w\proj\nad\epsg and 3059 is listed there. Still, I tried to convert the shapefile to different epsg, for example, 4326 and 3857. No success. I also tried setting up the newest stable Mapserver version 6.4.1. No success. * * * When I send GetCapabilities request...               http://localhost:1025/cgi-bin/mapserv.exe     ?map=C:\MS4W\ms4w\Apache\htdocs\gis\mapfile2.map     &SERVICE=WMS&VERSION=1.1.1%20     &REQUEST=GetCapabilities      I get a response XML document with no errors and warnings. * * * When I send a GetMap request...               http://localhost:1025/cgi-bin/mapserv.exe     ?map=C:\MS4W\ms4w\Apache\htdocs\gis\mapfile2.map     &SERVICE=WMS     &VERSION=1.1.1%20     &STYLES=     &REQUEST=GetMap     &LAYERS=lat_rob_region     &SRS=EPSG:3059%20     &BBOX=313187.4,146161.56,766469.92,470367.64     &WIDTH=800     &HEIGHT=600%20     &FORMAT=image/png      I get this message as response: ...   **msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS must be valid for all requested layers.**   ... * * * If I access mapfile via browser, I can see the layer displayed correctly:               http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W\ms4w\Apache\htdocs\gis\mapfile2.map&layer=lat_rob_region      * * * **mapfile2.map** :               MAP              CONFIG "MS_ERRORFILE" "C:/MS4W/ms4w/Apache/htdocs/gis/tmp/log.txt"         DEBUG 5         NAME map         STATUS ON         SIZE 800 500         EXTENT 313187.4 146161.56 766469.92 470367.64         UNITS METERS         SHAPEPATH "shapefiles3"         IMAGECOLOR 155 155 155              WEB             TEMPLATE "MapServerCGI.html"             IMAGEPATH "C:/MS4W/ms4w/Apache/htdocs/gis/output/"             IMAGEURL "/gis/output/"                  METADATA                 "wms_title"             "MapServer Openlayers testa aplikacija"                 "wms_onlineresource"    "http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map"                 "wms_enable_request"    "*"                 "wms_srs"               "EPSG:3059"                  END         END              PROJECTION             "init=epsg:3059"         END          # lat_rob_region         LAYER             METADATA                 "wms_title"           "lat_rob_region"                 "wms_srs"             "EPSG:3059"             END             NAME "lat_rob_region"             DATA lat_rob_region             STATUS ON             TYPE POLYGON             CLASS                 NAME "lat_rob_region"                 STYLE                     COLOR 0 255 0                 END             END         END          END      * * * **WKT definition:**               PROJCS["GRS_1980_Transverse_Mercator",     GEOGCS["GCS_GRS_1980",     DATUM["D_GRS_1980",     SPHEROID["GRS_1980",6378137,298.257222101]],     PRIMEM["Greenwich",0],     UNIT["Degree",0.017453292519943295]],     PROJECTION["Transverse_Mercator"],     PARAMETER["False_Easting",500000],     PARAMETER["False_Northing",-6000000],     PARAMETER["Central_Meridian",24],     PARAMETER["Scale_Factor",0.9996],     PARAMETER["Latitude_Of_Origin",0],     UNIT["Meter",1]]      * * * **GetCapabilities.xml** looks like this:               <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>     <!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd"      [      <!ELEMENT VendorSpecificCapabilities EMPTY>      ]>  <!-- end of DOCTYPE declaration -->          <WMT_MS_Capabilities version="1.1.1">          <!-- MapServer version 6.0.3 (MS4W 3.0.6) OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->          <Service>       <Name>OGC:WMS</Name>       <Title>MapServer Openlayers testa aplikacija</Title>       <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/>       <ContactInformation>       </ContactInformation>     </Service>          <Capability>       <Request>         <GetCapabilities>           <Format>application/vnd.ogc.wms_xml</Format>           <DCPType>             <HTTP>               <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Get>               <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Post>             </HTTP>           </DCPType>         </GetCapabilities>         <GetMap>           <Format>image/png</Format>           <Format>image/jpeg</Format>           <Format>image/gif</Format>           <Format>image/png; mode=8bit</Format>           <Format>application/x-pdf</Format>           <Format>image/svg+xml</Format>           <Format>image/tiff</Format>           <Format>application/vnd.google-earth.kml+xml</Format>           <Format>application/vnd.google-earth.kmz</Format>           <DCPType>             <HTTP>               <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Get>               <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Post>             </HTTP>           </DCPType>         </GetMap>         <GetFeatureInfo>           <Format>text/plain</Format>           <Format>application/vnd.ogc.gml</Format>           <DCPType>             <HTTP>               <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Get>               <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Post>             </HTTP>           </DCPType>         </GetFeatureInfo>         <DescribeLayer>           <Format>text/xml</Format>           <DCPType>             <HTTP>               <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Get>               <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Post>             </HTTP>           </DCPType>         </DescribeLayer>         <GetLegendGraphic>           <Format>image/png</Format>           <Format>image/jpeg</Format>           <Format>image/gif</Format>           <Format>image/png; mode=8bit</Format>           <DCPType>             <HTTP>               <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Get>               <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Post>             </HTTP>           </DCPType>         </GetLegendGraphic>         <GetStyles>           <Format>text/xml</Format>           <DCPType>             <HTTP>               <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Get>               <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&"/></Post>             </HTTP>           </DCPType>         </GetStyles>       </Request>       <Exception>         <Format>application/vnd.ogc.se_xml</Format>         <Format>application/vnd.ogc.se_inimage</Format>         <Format>application/vnd.ogc.se_blank</Format>       </Exception>       <VendorSpecificCapabilities />       <UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1" RemoteWFS="0"/>       <Layer>         <Name>karte</Name>         <Title>MapServer Openlayers testa aplikacija</Title>         <Abstract>karte</Abstract>         <SRS>EPSG:3059</SRS>         <LatLonBoundingBox minx="20.809" miny="55.3892" maxx="28.5475" maxy="58.3742" />         <BoundingBox SRS="EPSG:3059"                     minx="313187" miny="146162" maxx="766470" maxy="470368" />         <Layer queryable="0" opaque="0" cascaded="0">             <Name>lat_rob_region</Name>             <Title>lat_rob_region</Title>             <SRS>EPSG:3059</SRS>             <LatLonBoundingBox minx="20.829" miny="55.6313" maxx="28.4458" maxy="58.0913" />             <BoundingBox SRS="EPSG:3059"                         minx="312878" miny="172940" maxx="762571" maxy="438874" />             <Style>               <Name>default</Name>               <Title>default</Title>               <LegendURL width="119" height="21">                  <Format>image/png</Format>                  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W/ms4w/Apache/htdocs/gis/mapfile2.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=lat_rob_region&format=image/png&STYLE=default"/>               </LegendURL>             </Style>         </Layer>       </Layer>     </Capability>     </WMT_MS_Capabilities>


Why does Animal Movement toolbox give SyntaxError: invalid syntax?

I found a complete toolbox (Animal Movement tbx, by Regan Sarwas) for my tasks and I tried it. I had a systematic problem with the codes for all tools (line 1), for exemple: Executing: MinimumConvexPolygon D_VIVEK C:\Users\student\Documents\ArcGIS\Default.gdb\D_VIVEK_MinimumConvexPolygon 100 Fixed_Mean # # Start Time: Sun Apr 13 13:12:47 2014 Running script MinimumConvexPolygon... Failed script MinimumConvexPolygon... SyntaxError: invalid syntax (HomeRange_MinimumConvexPolygon.py, line 1) Failed to execute (MinimumConvexPolygon). Failed at Sun Apr 13 13:12:47 2014 (Elapsed Time: 0.16 seconds) Could anyone help me to understand and correct the problem? P.S. ArcGIS 10.2.1 for Desktop - Windows 7


PostGIS to GeoJSON with GDAL: how to get lat/longs?

I'm trying to convert line features from PostGIS to GeoJSON files, as follows:               from psycopg2 import *     from subprocess import call          conn = connect(dbname='gis')     cur=conn.cursor()          cur.execute("SELECT distinct osm_id,route_name from planet_osm_line where route_name like '%Rail Trail' and network='rcn';")          for record in cur:       print "%s" % record[1]       call (["ogr2ogr", "-f", "GeoJSON", record[1] + ".json",  'PG:dbname=\'gis\'', "-sql", 'SELECT route_name,osm_id,tags::hstore->\'state\' as state,way from planet_osm_line where osm_id=%d' % record[0]])      That is, ultimately ogr2ogr gets called like this:               ogr2ogr -f GeoJSON blah.json "PG:dbname='gis'" -sql 'SELECT route_name,osm_id,tags::hstore->\'state\' as state,way from planet_osm_line where osm_id=-12345'      The GeoJSON files that get created have coordinates that look like this `[ 16153119.78, -4561568.23 ]`:               { "type": "Feature", "properties": { "route_name": "Waverley Rail Trail", "osm_id": -64660, "state": null }, "geometry": { "type": "LineString", "coordinates": [ [ 16153119.78, -4561568.23 ], [ 16153117.1, -4561567.48 ], [ 16153114.81, -4561565.86 ], [ 16153113.24, -4561563.55 ], [ 16153112.64, -4561561.63 ], [ 16153112.64, -4561558.82 ], [ 16153113.6, -4561556.2 ], [ 16153115.39, -4561554.05 ], [ 16153117.82, -4561552.66 ], [ 16153119.98, -4561552.2 ], [ 16153122.76, -4561552.48 ], [ 16153125.28, -4561553.69 ], [ 16153127.35, -4561555.88 ], [ 16153128.43, -4561558.46 ], [ 16153128.62, -4561560.38 ], [ 16153128.08, -4561563.13 ], [ 16153126.64, -4561565.51 ], [ 16153124.47, -4561567.26 ], [ 16153121.82, -4561568.17 ], [ 16153119.78, -4561568.23 ] ] } }      Please forgive my ignorance, but what am I doing wrong here? I assume what is being written is some kind of projected value rather than the raw lat/long - so how do I get those? I've tried using `t_srs=ESPG:3857` but that didn't fix it.


Editing many-to-many relationship classes with Javascript API

I am seeking some guidance on best practices when working with many-to-many relationship classes thru the ArcGIS Server Javascript API. I am designing a traffic count data management application. Count data locations are stored in a points layer, and there is a non-spatial table of count requests. My plan was to relate the two with a many-to-many relationship class. Count points can be requested any number of times, and each count request can request new data any any number of pre-existing count locations. A many-to-many relationship class seems like the obvious choice here because it enforces data integrity. There is a complicated process to relate records thru a many-to-many relationship class in ArcGIS Desktop. I had first tried doing this thru adding rows to the relationship class table, but later found out this is not supported. This leads to two questions as I look to implement this functionality in my web application:   1. Will I be able to access a many-to-many relationship class table thru Javascript and edit/delete records using `.applyEdits()?`   2. Is a many-to-many relationship class really necessary in this case? Or is there a more straightforward way to accomplish the same result?


Arcgis javascript - pan and zoom simultaneously

I'm using my android device to test the arcgis javascript API 's touch support. I noticed that by default, I cannot pan and zoom the map at the same time, like google maps. Am I missing something? A property, map option, some custom code to achieve this? Thanks in advance


How to create a new layer from a selection in QGIS?

I have been using ArcMap for the last three years. But I am now considering switching to Quantum-GIS. Is it possible to create layers from selection in QGIS? I am using **QGIS 1.7.4-Wroclaw**. **UPDATE** : To make it easier for others to see this, here are come pics. I used _QGIS 2.0.1-Dufour_. **SELECT** ![enter image description here](http://i.stack.imgur.com/D8SMG.png) **SAVE** ![enter image description here](http://i.stack.imgur.com/BnhEp.png) **ADD** ![enter image description here](http://i.stack.imgur.com/f4kFG.png)


Problems using ATCOR for Erdas Imagine '13

An output from ATCOR processing (besides an atmospheric correction and dehazing) is expected to be an image containing true reflectance values (instead of raw input DNs). As far as I know such data are commonly stored as a floating point values (and not 8 or 16 bit data), because each pixel represents a fraction (from 0 to 1). But each time I process an image (LS8, QB, etc) I get an output of the same type as an input image was (8b or 16bit data). Does anyone know why is that? (I used a proper calibration file each time, and also there is no output data type options dialog - it just prompts for a filename).