Viewing ST_MULTIPOLYGON data from ArcSDE DB2

We have inherited some tables that were created with ArcGIS/ArcSDE, and the data in these is still being used by our main web application to perform some spatial lookups. The queries are pretty simple, we just pass in some x/y coords and the query returns a code uniquely identifying the shape that the coords exist in. The majority of the mapping solution has now been decommissioned as we are no longer providing live maps, and thus we no longer have the Arc toolset. The basic lookups remain however, and the customer wants to provide us with a new shapefile for import. We used to use the tools to check that the new shapefile fit in with the existing ones visually, and to assign the unique code to the shape. Without the tools I am unsure how to proceed. There are three tables, each of which is associated with a different lookup, and each table has a column that looks like:               Column     Type      Type     name       schema    name               Length   Scale Nulls     ---------- --------- ------------------ -------- ----- ------     SHAPE      DB2GSE    ST_MULTIPOLYGON           0     0 Yes        along with some other columns. Can anyone recommend any free tools we can use to view this data visually? Is it even possible? Sorry if this comes off as very basic or n00bish, I'm a Java & Web developer and have no real experience with GIS solutions. If you need any other info please let me know.


Learn ArcObjects

Is it mandatory to have ArcEngine Licence to learn ArcObjects?I was able to develop Addins for arcmap but I need in-depth knowledge of ArcObject so started exploring MapControl Application but it started flashing message boxes for using Unlicensed control.If ArcEngine is must then is there any trail version of Arcengine 10.2 Licence available for learning.Is there are any online manual to learn ArcObjects.


how to install and use mapcache?

i installed mapserver 6.4.1 using osgeo4w and i created a mbtiles file for a small region of openstreetmap (loaded into postgis) using tilemill. my questions are: a - do i have mapcache?? mapserver site sais that mapcache is part of mapserver but i did not understand if i need to install it separately or is it 'in' the mapserver. b - if mapcache is not installed automatically (i assume it isnt, but i hope it is:) how do i install it? i cannot find compiled version for windows and i tried to build it myself but ran into problems of missing libraries etc. c - how do i use it to serve the mbtiles? i managed to use mapserver via ../cgi-bin/mapserv.exe?map=... but how do i put mapcache in the middle between the client (will be openlayers) and mapserver? (as i understood the cache server sits between the client and the server) or do i still talk to mapserver and it talks with mapcache? thanks allot!


Python If else statements

I'm trying to populate a field from another. The catch is that it isn't 1 or 2 values. If my field A = 4 then I want it to return field B to 0. But if Field A is 1, 2 or 3 then I want the user to be able to use the domain drop down list to choose what field B is--because it could be one of 3 other values. Is that possible? Below is the code I think is a start. But I need it to return 1, 2 or 3 if WaterType = anything but 4.               def Reclass (IrrigType):       if WaterType = 4:          return 0       else:          return 1


QGIS, Postgis: Geometry type does not match column type

I'm trying to import some polygon shapefiles to Postgis in QGIS via SPIT. One of them can't be imported and returns this error:               ERROR: Geometry type (Polygon) does not match column type (MultiPolygon)      I've tried to change attribute "Feature Class" in that table in SPIT widnow, from MULTIPOLYGON to POLYGON, but nothing happened. Is there any way to make Postgis to accept both types (polygon and multipolygon)? Or maybe somehow I can convert shapefile geometry from polygon to multipolygon? Any ideas? I've tried Qgis 2.0.1 in Windows and Qgis 2.3 in ArchLinux.


GeoMedia + WFS 1.1.0 -- how to specify a non-default SRS in a GetFeature request?

I'm forming a WFS post request like the one below. Notice I have SRSNAME="epsg:4326":               <GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS"     version="1.1.0" maxFeatures="500">       <wfs:Query typeName="SewerMainline" SRSNAME="EPSG:3857">         <Filter xmlns="http://www.opengis.net/ogc">           <BBOX>             <PropertyName>LinearGeometry</PropertyName>             <Envelope srsName="EPSG:4326" xmlns="http://www.opengis.net/gml">               <lowerCorner>46.226130203549 -119.23339223652</lowerCorner>               <upperCorner>46.226323539414 -119.23301630567</upperCorner>             </Envelope>           </BBOX>         </Filter>       </wfs:Query>     </GetFeature>      But the result looks like this. Notice the geometry is still in EPSG:3857 (the DefaultSRS):               <gmgml:FeatureCollection xmlns="http://www.intergraph.com/geomedia/gml"     xmlns:gml="http://www.opengis.net/gml"     xmlns:gmgml="http://www.intergraph.com/geomedia/gml"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:schemaLocation='http://www.intergraph.com/geomedia/gml http://usalvwdgis1:801/WFS1/request.aspx?request=DescribeFeatureType&VERSION=1.1.0&SERVICE=WFS&OUTPUTFORMAT=text/xml;subtype=gml/3.1.1'     numberOfFeatures='4'>       <gml:boundedBy>         <gml:Envelope srsName="EPSG:4326">           <gml:lowerCorner>46.2260082243399 -119.233511477885</gml:lowerCorner>           <gml:upperCorner>46.2262617590092 -119.232662186944</gml:upperCorner>         </gml:Envelope>       </gml:boundedBy>       <gml:featureMember>         <gmgml:SewerMainline gml:id="SewerMainline.5635">           <gmgml:ID1>5635</gmgml:ID1>           <gmgml:LinearGeometry>             <gml:LineString srsName="EPSG:4326">               <gml:posList srsDimension="2">46.2262145488833 -119.233114496317               46.2262139292097 -119.233327445878</gml:posList>             </gml:LineString>           </gmgml:LinearGeometry>         </gmgml:SewerMainline>       </gml:featureMember>     </gmgml:FeatureCollection>      I've confirmed the service supports 4326..here is a snippet from GetCapabilities:               <ows:Parameter name="srsName">       <ows:Value>EPSG:3857</ows:Value>       <ows:Value>EPSG:4326</ows:Value>     </ows:Parameter>      I also looked at the WFS 1.1.0 spec and the doc on the SRSNAME state the following: > This parameter is used to specify a WFS-supported SRS that should be used > for returned feature geometries. The value may be the DefaultSRS or any of > the OtherSRS values that a WFS declares it supports in the capabilities > document. The SRS may be indicated using EPSG codes or the URL form defined > in [2]. If the parameter is not specified then the value of the DefaultSRS > for the feature type being queried shall be used. Where am I going wrong?


Where are dynamic hyperlinks stored?

A while back (ArcGIS 10.0 times, or maybe even 9.3) a colleague of mine created a mxd with a few hundred manholes and attached dynamic hyperlinks to them (pointing to photos of them). (I know this might not be the most efficient method, but done is done.) However, now we can't seem to find this shapefile/mxd, and I would really need a way to search for a shapefile that has such hyperlinks. In the ArcGIS Help (linked above) it states that: _This [hyperlink] association is stored with your layer. They are also stored with your layer if you save the layer to a file. /.../ ArcMap uses the feature ID (FID) field to associate dynamic hyperlinks with features_. This far in my research I've been unable to find a way to see where they are stored or how to convert the dynamic hyperlinks into a field based hyperlink (which could indicate how to access the hyperlinks). I can probably figure out a couple of strings that should be in a list like that, if it could be of any use. Is there a way to search for shapefiles which contains dynamic hyperlinks? Preferably without heaps of programming, but I'm open to suggestions!


How to extract the number of vertices in each polygon?

I have ArcGIS Desktop 10.2 and my challenge is how to extract the of number vertices in each polygon for all features like this: ![enter image description here](http://i.stack.imgur.com/x7uT5.jpg) ![enter image description here](http://i.stack.imgur.com/rFSAN.jpg) ![enter image description here](http://i.stack.imgur.com/ZTFm1.jpg) I have many parcels in my feature class and I want to extract the number of vertices for all features separately, then I want to display XY coordinates for all vertices. for more information, i just want to convert vertices for each polygon and display number of each vertices staring from 1 number, so if i have polygon and it have a 4 vertices, a want to convert polygon to vertices i display number of vertices like this (1,2,3,4,5), then displaying xy for each vertices, i think the real challenge id to, how to convert all polygon to vertices and make each number of vertices starting from 1 number.


How to sort SLD file for BGS Digimap provided by Edina?

Does anyone know how to sort the sld files provided here: http://digimap.edina.ac.uk/webhelp/geology/using_data_with_gis/legend_files.htm The reason I ask is that I only want to display the appropriate types in the legend under Qgis. At the moment all of the rock types appear to be displayed. Unfortunately I can't access the LYR file provided by BGS with Qgis. Regards Neil


Where does QGS write its error log messages?

I want to read and copypaste the error log for the crashes I am experiencing in QGIS 2.0. The error I am getting freezes QGIS so I have to ctrl-alt-del. I can see the last mesasge in the panel, but can't copy it or scroll back to see the earlier messages. When I repoen it, the log message panel has reset to zero (QGIS starting, etc), so all the transform error messages I want are gone. Are the older log messages written to disk somewhere?


Adding an existing Feature class to an existing Feature Dataset in c#(arcobjects)

I want to add an **existing feature class to an existing feature dataset**. Both the feature class and the dataset have the same coordinate system, I searched over the net but only assistance I found was to create a new feature class in a feature dataset (I tried that and it worked). According my understanding I tried using `IDatasetContainer` but it's not working. Here is the code:               IFeatureDataset featureDataset1 = featureWorkspace.OpenFeatureDataset("featureDataset1");     IDataset datasetFcTenActors = fc_tenActors as IDataset;  // fc_tenActors is my feature class to add     IDatasetContainer container = featureDataset1 as IDatasetContainer;     container.AddDataset(datasetFcTenActors);


How do I extract a raster's extent in python?

I am looking for an easy way to extract a raster's extent in python. Currently, I am using gdalinfo and then parsing out the corner coordinates. The problem with this approach is that gdalinfo is not consistent in how it reports the corner coordinates. I am working with a variety of file types (hdf, tif, img, asc, etc). I need the extent to be in decimal degrees (or DMS - that I can convert to decimal degrees). This is being used with a PostgreSQL database so I have access to any PostGIS function, gdal, or ArcGIS, although I would prefer a function that does not involve ArcGIS unless it is fast (I am trying to index a large number of files, frequently). It can be run on either Windows or Unix. Thank you, Kevin


Make Feature Layer tool problems in Model Builder

I am having a slight problem with using the Make Feature Layer tool in model builder. Basically I have a file geodatabase of points. I am trying to make a model to pull out points according to a reference field value. I could just make the expression for the tool a variable but unfortunatly the users who are going to use it are to dense to create a simple SQL statement. I have created a model String variable (VRefNo) to take the reference number (Its alphanumeric hense the string. The column in the geodatabase is also a string) and tried to parse it in the usual way to the expression:               "RefNo" = '%VRefNo%'       and all the other variables are hard coded. I have made the variable a model parameter and checked the add to display check box for the output and made sure nothing is intermediate (There is only one tool in the model and thats it). The model runs ok with no errors but I am not getting an output........ Any Ideas? Many thanks in advance C UPDATE: I can get the select tool to work in model builder when run from the toolbox only when I make the output a model parametre.... Thats all nice but I only want to save the results temporarily to memory (in_memory) and would prefer the user not having the option to change this. Thank you ESRI!! I would make a python script to do it but all the clients dont have python installed on their machines.....


Exporting OpenLayers.Layer.WMS to GeoJSON / KML

I'm looking the way to exporting an especific region of a WMS layer to some XML format (GeoJSON, GML, KML) using OpenLayers and Geoserver. I've found how to export features objects with OpenLayers.Format.GeoJSON.write(), but this method only allow converting feature objects or geometry objects. An example of my idea: I'm viewing a map of a certain country with a couple of WMS layers with some data. Then I zoom to a particular state of that country and I want to export what I'm viewing to GeoJSON or KML for use that in a desktop GIS application (like QGIS). Does anyone know how to do this? Thanks.


How to maintain the data at XML document after changing schema with Diagramer?

After exporting XML with schema and data I did some changes to the schema with ArcGIS Diagramer. now i need to import the new schema and all the data to a new empty file GDB. what are the best practices for this ? using "Publish" on diagramer save only the schema. How can i load the data most efficiently (i have more the 40 layers) from XML to geodatabase ?


How to automate FGDC metadata generation in ArcGIS?

Does anyone know of a tool or script to automate FGDC standard metadata for ArcGIS? I would like to be able to select multiple feature classes and fill company info., dates, etc.


Parse a KML for Openalyers

I am trying to get a kml from a URL to display in OpenLayers. However, it is a ground overlay so it cannot be displayed the standard way. I found this thread: Does OpenLayers supports KML Ground Overlays? However, I am very lost as to how to parse this manually. I know I can make an AJA request and parse it, but don't think I can do that bc of cross-domain issues. So could someone guide me in the right diirection to get a KML parsed directly from a url? Thanks!


Converting Shapefile Elevation field to Height Field

HAve been trying to update the elevation field in my shape file (vector file *.shp) into a height field. Have tried to rasterize the shapefile then deduct the height using Raster Calculator with a reference dted (raster map). Then I filled the empty space with nodata. Afterwhich I polygonize. I have managed to get some resemblance of the height but however, I have found that the height in the shapefile is rounded off and the processing process actually cost me to lose some features. All of this is done in QGIS 2.2 Is there a better way I can do this? One of the way I am trying to explore is to use field Calculators in vector shapefile properties. Can I reference an external raster map layer with this? If so, how can I do this? THanks


How to solve error 'coordinate exceeds the valid coordinate' in ArcGIS?

All of the layers in map document are in wgs84. I am getting an error message in the ArcGIS server log for one specific layer (see below). I ran the analyze tool from the Map Service Publishing option and it did not pick up any errors on this layer. How to fix the issue? Does anyone know the reason for this error?               <Msg time='2012-12-13T13:51:13' type='ERROR' code='103800' target='Test.MapServer' machine='server1' user='?' process='5164' thread='7384'>Texas: Layer_RK:  The specified coordinate exceeds the valid coordinate range </Msg>


(arcengine) export selected features from sde to shapefile (with joined fields)

I have a SDE featureclass that is joined to an access table in my map control. I want to export selected features of the SDE layer to a shapefile AND retain the joined fields. this following method works great (except for retaining the joined fields)               public void ExportMapLyrToShapefile(ESRI.ArcGIS.Carto.ILayer pInLayer, string inputName, string outputPath, string qry)         {             // Set the GeoFeatureLayer to the layer in the map so that we can use it as the input feature later             IGeoFeatureLayer pInGFLayer = (IGeoFeatureLayer)pInLayer;             IFeatureLayer pInFeatureLayer = (IFeatureLayer)pInGFLayer;             IFeatureClass inputFeatureClass = pInFeatureLayer.FeatureClass;             IDataset inputDataset = (IDataset)inputFeatureClass;             IDatasetName inputDatasetName = (IDatasetName)inputDataset.FullName;                  // Get the layer's selection set (the selected/highlighted features of the layer in the mapcontrol)             IFeatureSelection featureSelection = (IFeatureSelection)pInFeatureLayer;             ISelectionSet selectionSet = featureSelection.SelectionSet;                  // Create a feature class name for the output shapefile and open the output's workspace             IWorkspaceFactory shpWorkspaceFactory = new ShapefileWorkspaceFactoryClass();             IWorkspace shpWorkspace = shpWorkspaceFactory.OpenFromFile(outputPath, 0);             IDataset shpWorkspaceDataset = (IDataset)shpWorkspace;             IWorkspaceName workspaceName = (IWorkspaceName)shpWorkspaceDataset.FullName;             IFeatureClassName shpFeatureClassName = new FeatureClassNameClass();             IDatasetName shpDatasetName = (IDatasetName)shpFeatureClassName;             shpDatasetName.WorkspaceName = workspaceName;             shpDatasetName.Name = qry.Replace(" = ", "");                  // Use the IFieldChecker interface to make sure all of the field names are valid for the output shapefile.             IFieldChecker fieldChecker = new FieldCheckerClass();             IFields shapefileFields = null;             IEnumFieldError enumFieldError = null;             fieldChecker.InputWorkspace = inputDataset.Workspace;             fieldChecker.ValidateWorkspace = shpWorkspace;             fieldChecker.Validate(inputFeatureClass.Fields, out enumFieldError, out shapefileFields);                  // We also need to retrieve the GeometryDef from the input feature class.             int shapeFieldPosition = inputFeatureClass.FindField(inputFeatureClass.ShapeFieldName);             IFields inputFields = inputFeatureClass.Fields;             IField shapeField = inputFields.get_Field(shapeFieldPosition);             IGeometryDef geometryDef = shapeField.GeometryDef;                  // Now we create a feature data converter to "Export" the selected features to a shapefile             IFeatureDataConverter2 featureDataConverter2 = new FeatureDataConverterClass();             IEnumInvalidObject enumInvalidObject = featureDataConverter2.ConvertFeatureClass(inputDatasetName, null, selectionSet, null, shpFeatureClassName, geometryDef, shapefileFields, "", 1000, 0);         }      the issue is with the IFieldChecker interface. it validates all the fields and removed the joined fields before exporting to a shapefile. Does anyone have any insight on this issue? If so, please help! I'm stumpped! btw... i also tried using an IDisplayTable as my input feature and I get the same output (missing joined fields) Thanks, Derek


UK road network dataset

Can anybody guide me to a website or a source to download the Geographical UK road network data set. The data set should include the road distances, since I want to apply shortest path search algorithm on it. I searched the web for such data but I could not find it in readable format.


header information is missing from image, after writing using opencv

I am doing complement of an image using open-cv python, while writing the image, open-cv is not writing the header information in the complemented image. my image data are in TIFF format. i am doing like this...               import cv2     img = cv2.imread("image.tiff", -1)     for i in xrange(0, len(img)):         for j in xrange(0, len(i)):           img[i][j] = 65535-img[i][j]     cv2.imwrite("complemented.tif", img)


Rendering OSM with QGIS for MapServer to use in OpenLayers

I want to show tiles in OpenLayers offline. I've installed QGIS 2.0, TileCache, and MapServer on Windows. Enabled plugin OpenLayers in QGIS. What kind of data I suppose to extract from QGIS with my own OSM file? And how can I done this process? I'm new in this map things and I'm now so close I think.


Using python to get extent and split coordinates into list

I have the following code:               for fc in fcs:         desc = arcpy.Describe(fc)         ext = desc.extent         ext.split(" ")         print ext      I'm getting error: AttributeError: Point: Get attribute split does not exist I know my fcs list is okay and the extent property is working correctly. I want each fc in fcs to output a list with the coordinates like this: [-179.168566355952, 51.2134728616834, 179.748708978836, 71.3896098800921, NaN, NaN, NaN, NaN]


Can I use GeoWebCache with GeoServer Layers which have different native and declared SRS?

We are using GeoServer to serve raster tiles with a native SRS of 27700, but are forcing use of a declared SRS of 900913. When I try to seed these tiles using GeoWebCache through the GeoServer web admin interface no tiles are cached. However when I use the native SRS of 27700 seeding works fine. Is what I'm trying to do possible? And if so, how do I do it? Thanks,


Error import ShapeFile shp2pgsql-gui

I'm trying to import a shape file to my PostGIS database but I can not, give a look:               Importing with configuration: 12mie250gc_sir, public, geom, / home/samuelribeiro/Desktop/MALHA_DIGITAL/ac/12MIE250GC_SIR, mode = c, dump = 1, simple = 0, geography = 0, index = 1, shape = 1, srid = 4326     Shapefile type: PolygonM     PostGIS type: MULTIPOLYGONM [3]     Failed SQL begins: "SET TO UTF8 CLIENT_ENCODING;     STANDARD_CONFORMING_STRINGS SET TO ON;     BEGIN;     CREATE TABLE "public". "12mie250gc_sir" (gid serial,     "id" float8     "nm_micro" varchar (100),     "cd_geocodu" varchar (2));     ALTER TABLE "public". "12mie250gc_sir" ADD PRIMARY KEY (gid);     SE "     Failed in pgui_exec (): ERROR: function AddGeometryColumn (unknown, unknown, unknown, unknown, unknown, integer) is not unique     LINE 9: SELECT AddGeometryColumn ('public', '12mie250gc_sir ',' geom ', '4 ...                     ^     HINT: Could not choose a best candidate function. You might need to add explicit type casts.          Shapefile import failed.


Intersection between two SpatialPolygonsDataFrame using gIntersection function in R

I want to select a subset of my map (a SpatialPolygonsDataFrame) to create a new vector map = part of the initial map included inside a given polygon (eventually, inside several polygons). I have a large study area, under the object "parcel", and would like to select the part of the map inside the polygon "hr_kud". This is basically the part of my study area used by an animal, so I want to compute basic statistics on this new map and used it for new analyses (of habitat selection). I have to repeat this operation for about 100 animals... Here are my data : _http://dl.free.fr/vX4TA8nsE_ **parcel** = my study area map. and **hr_kud** = an example of homerange used to reduce the study area Here is a part of my R code, used under Rstudio (R version 2.15.2 (2012-10-26)) : > library(rgeos) > > load("Data.RData") > > class(parcel) > >> [1] "SpatialPolygonsDataFrame" >> >> attr(,"package") >> >> [1] "sp" > > class(hr_kud) > >> [1] "SpatialPolygonsDataFrame" >> >> attr(,"package") >> >> [1] "sp" > > object.size(hr_kud) > >> 9536 bytes > > object.size(parcel) > >> 88090144 bytes > > plot(parcel, axes=TRUE) > > plot(hr_kud, col="red", add=TRUE) And when I run my final command, it causes Rstudio to crash : > hr_map <- gIntersection(parcel, hr_kud, byid=TRUE) It is not the first crash reported, but non of the answers find on the net are efficient for me... It's exactly the same using R and all my packages are updated. So If you have any idea of why it's crashing, or of an alternative method to create my subset map or intersect two SpatialPolygonsDataFrame in R, I will be really appreciated ! thanks in advance, Sophie


Acquiring road labels

So this is a data acquisition questions: I have data retrieved from OSM, QGIS2.0. It's a region of Qatar. Of the 13 thousand or so roads, I only pulled in about 1 thousand road names. The roads do have names, I've researched it. And the names are necessary for a network dataset that will use the street names for routing purposes. This is just the beginning to my problem, but I'll only ask this question here... I don't want to bombard this post with multiple inquiries. Is there a way, or a plugin, or a data source somewhere I do not know about that will let me "append" road names to my current data I already have? I have already manipulated what I have so I really don't want to hunt down another source unless absolutely necessary. Thanks, Logan


What's the correct link for adding GeoServer WFS to ArcMap?

What is the correct URL to enter in ArcCatalog WFS Parameters when adding a WFS layer from GeoServer into ArcMap? Here's a link to our Get Capabilities document: https://weaveprod.ucdp.utah.edu/geoserver/ows?service=wfs&version=1.0.0&request=GetCapabilities I am using ArcMap 10.1 and experiencing the same problem described here. When I try to add WFS layers from GeoServer, "Feature Types" is blank. That post says it is a bug with 10.1. However, I added WFS from GeoServer not long ago, so I'm skeptical that the answer is to upgrade to 10.2. The only thing that changed was our GeoServer location. I was able to bring in WFS layers from http://www2.dmsolutions.ca/cgi- bin/mswfs_gmap?version=1.0.0&request=getcapabilities&service=wfs. Although that is not GeoServer, I previously had GeoServer WFS working fine. Here's an image of one URL I tried (which was https:// weaveprod.ucdp.utah.edu/geoserver/sf/ows?service=WFS&version=1.0.0&request=GetFeature? - remove space before weaveprod - I can't post over two links). No matter how I change it, no layers are coming up in feature types. There shouldn't be any problem with my WFS layers because I can preview them as WFS through GeoServer. I appreciate any input. Thank you!      ![Adding WFS in ArcMap](http://i.stack.imgur.com/7nl1k.png)


Binding between QGIS custom form (Qt Designer) and date/time field in a SpatiaLite database table

For my attribute table I created a custom form in Qt Designer. The table has a date field and a time field. In Qt Designer there are widgets for entering date and time. But what data type is expected for the fields in my attribute table in QGIS? The values always stays NULL in every case, when I choose date, datetime or text. Under Layer properties when I choose the edit widget "calendar" there is a calendar popup even when I use my custom form.


Adding additional columns of data to CartoDB table? (in-place / no merge)

Is there any quick way to add some data to a table without either a) merging / replacing the whole thing or b) having to do it one cell at a time ? example: i have a table loaded now with the counties of Arizona. I would like to add a few columns of county-specific data in-place. I don't want to merge unless i can merge in-place. the end result would be as if i exported the data, added columns to it (e.g. in google docs), and created a new table using that same data. This is the thing to be avoided.


GRASS error reading raster map: request for row 1 is outside region

I'm a rather inexperienced GRASS user, and am trying to use an addon module called r.geomorphon (see http://sil.uc.edu/downloads.html#software). I've managed to get it installed and am trying to run it, but get an error of:               ERROR: Reading raster map <decal1@PERMANENT> request for row 1 is outside region      and I have no idea what that means. From the Googling that I've done it seems that this error can be caused by some commands when the vector data doesn't overlay the raster data properly - but this routine only uses a single raster DEM file as input. Does anyone have any idea why this might be caused, or do I need to go directly to the author of the addon? In case it affects things, I'm using a simple arbitrary location, as this DEM was generated by a computer model and therefore only has arbitrary X and Y co- ordinates.


Precondition in Modelbuilder - use in next process

In modelbuilder I am trying to create a tool which will check the coordinate system of the input shapefile. If it is GCS_WGS_1984, then nothing happens. If it is not, then it will reproject it to GCS_WGS_1984. I know I have to create a script and import the tool to modelbuilder, which I have done. Below is the script I used:               import arcpy, os     from arcpy import env     env.overwriteOutput = True     arcpy.CheckOutExtension("Spatial")          Footprints = arcpy.GetParameterAsText(0)          desc = arcpy.Describe(Footprints)     type = desc.spatialReference          try:         if type.name == "GCS_WGS_1984":             arcpy.SetParameterAsText(1, "True")             arcpy.SetParameterAsText(2, "False")         else:             arcpy.SetParameterAsText(1, "False")             arcpy.SetParameterAsText(2, "True")          except Exception as e:     AddPrintMessage(e[0], 2)      And my model: ![enter image description here](http://i.stack.imgur.com/3GgHc.png) I connected the "NOT" to the "PROJECT" and set it as a precondition, but when I try to run it, I get an error telling me that no input is set for the Project Function. I know that the Footprints are not GCS_WGS_1984. So how do I get the model to run properly? Is there a problem with the model, script, or both? Thanks! * * * Ok, so I added in the project tool as suggested, but then I get the following error: ExecuteError: ERROR 000622: Failed to execute (Project). Parameters are not valid. ERROR 000628: Cannot set input into parameter out_coor_system. My script now looks like               import arcpy, os     from arcpy import env     env.overwriteOutput = True     arcpy.CheckOutExtension("Spatial")          Footprints = arcpy.GetParameterAsText(0)     NewProject = arcpy.GetParameterAsText(2)     OutCoorSys = "GCS_WGS_1984"          desc = arcpy.Describe(Footprints)     type = desc.spatialReference          if type.name == "GCS_WGS_1984":         arcpy.SetParameterAsText(1, "True")     else:         arcpy.Project_management(Footprints, NewProject, OutCoorSys)


Does leaflet support wms tile layers in applications/openlayers formats?

I am trying to create a tilelayer.wms overlay on top of a wfs base map and I wasn't sure whether leaflet allows the applications/openlayers type of format which I served up from geoserver or only images/pngs.


Editing polylines in QGIS (extend, trim, fillet etc)

I was wondering, if its possible to edit lines and polylines in qgis, in similiar way as autocad commands "extend", "trim" and "fillet"? About how the commands for in Autocad, very shortly: The EXTEND command allows you to extend an entity to touch another entity in a drawing. The TRIM command allows you to shorten an entity to an intersection or remove a section of an entity between two intersections. Fillet: Constructs an arc of specified radius between two lines, arcs, circles, or will create arcs of the specified radius at the vertices of a polyline. Radius of the arc to be constructed may be set to 0, which will make a sharp corner. I am updating certain trailpath map and the accuracy isnt really issue - so i could just use snap and digitize/split & delete, but I began to wonder if there is for example plugin to do this in more efficient way?


Filtering (non-WFS) features in OpenLayers

Say I have a vector layer with a couple hundred features, and I just want to operate on a filtered subset of those features, such as those that have a State attribute of "OR". Am I reading the OL docs correctly that the Filter classes are only for filtering WFS requests? Is there some other way of filtering ordinary features by a specific attribute (e.g. for zooming to the extent of just those features)? Or do I have to just manually iterate over the features and populate an array of the desired ones? (Not a huge deal, by the way; just wondering if there's a more OpenLayers-y way of doing this).


Counting raster points within boundaries in another layer?

I know this question is similar to some out there, but I have tried all the 'solutions' and none of them are working for me. I am using the latest version of Qgis. I have a raster layer with lat/long/ARI attributes (average recurrence intervals) I have a vector layer with country boundaries I want to count/collect all the raster points within each country and then export this data in to a text file so I can then calculate min/max/mean values of ARI within each country. PLEASE help, thesis due in in 2 days!! Thank you.


How to make Map Book of pages with same area shown but different layers turned on/off?

In ESRI a Map Book is best suited for a series of features that each get their own page. It allows you to pick a feature and generate a Map Book Page for each feature including any additional information you wish to add to each page via dynamic text, charts, etc. Is there an alternative for say a series of pages showing the EXACT same area but with different layers turned on and off? We have a Capital Improvements document that I have to create showing the City Boundaries on every page. One page has all police and fire stations listed, another shows proposed water systems, another shows expressways and highways and work being done near or on them... etc., ad nauseum. Is there some way to set this up so that I **DON'T** have to created a separate MXD for each Map Page of this document?


Sending map extent in (geo)JSON

I have a leaflet map that I need to fitBound on a given rectangle. The coordinate for the fit bound will be transfered in JSON via a REST call on a server. We are using GEOJson to encode our geometry So my question is : what would be the correct way to encode this using geojson? The RC candidate seemed to include a BOX type that would be perfect, but this type is not present in the final specification. So far I see :   * There is a bbox attribute, but it seem to apply to a specific geometry. I couldn't use it on its own.   * I could just send a dumb JSON array `[-90, -180, 90, 180]`, but then I lose the advantages of using a standardised format.   * I could use the BOX type but it appear to have been dropped. What should I use to send this information?


QGIS WMS using tile size restrictions

When I add a WMS layer with a tile size restriction (2048 2048) the resulting WMS datasource in the QGIS project file is               <datasource>tiled=2048;2048,url=http://openmaps.gov.bc.ca/mapserver/base3</datasource>      This does not look to be a properly formed GetMap request, which I believe is resulting in the WMS server sending out a tiled WMS feed while ignoring the fact that the feed is transparent. Using the transparency tools in layer properties results in the entire layer (features and background) becoming transparent. If the tiled portion of the datasource is removed, the WMS feed displays correctly but does not print. If you attempt to demo this, use the Layer group called "BASE_MAPPING_20K" So is there a way to edit the GETMAP request to be properly formatted with Width & Height & Transparent? thanks! C


How many stereo satellite imagery required to prepare DEM of an area?

I want to know how to find the nos. of scene of stereo CARTISAT-1 data required to prepare DEM of an area(say 84000 sq km)? any suggestion/solution/calculation?


Applying styles to Polygons

Still learning OpenLayers and I think my problem may be a lack of understanding the terminology, however. Is it possible to draw polygons in a different colour within one vector layer, or do all polygons get their colour from the colour set within the layer? I ask because I have a map which draws the borders of several (up to 10) different countries around the world and I'd rather have one layer with different coloured polygons rather than have several different layers. I have the following code:               var polyCountry = format.read("POLYGON((" + polyString + "))");     Zip15021.addFeatures([polyCountry])      Which works perfectly, but can't see any documentation anywhere on how to style the polygon.


How to remove a layer from the Layerswitcher in Openlayers

I have an init-Function, there some layers are added with the option displayInLayerSwitcher = false; Thats ok, but in some situations i need to set this later in the application to true. So i want to reset the option. The ways i tried to figure out: 1:               my_layer.displayInLayerSwitcher = true;     my_layers_switcher.redraw();     // Result is, that my_layer is resetted and in the LayerSwitcher nothing changed. 2:               my_layer.displayInLayerSwitcher = true;     my_layers_switcher.destroy();     map.removeControll(my_layers_switcher);     my_layers_switcher = new OpenLayers.Control.LayerSwitcher();     map.addControll(my_layers_switcher);     // Same Result as by way 1 Anyone, who have an idea for this?


How to reproject aqua modis images / ocean color?

I am working with aqua modis, ocean color, L2 - SST image but in order to do I must reproject it. I use the gdal_translate to convert the format of the image but reprojection is becoming very difficult... When I download it, it has a north down projection. This image has 5 bands and the two first bands are the lat lon in decimal degrees. Do you know how can I reproject them by using the band 1 and band 2 as coordinates?


Is it possible to run a search cursor on a multipart feature class?

I have a multipart feature class of cities. I want to run a search cursor on a cities feature class where:   1. one city is selected and a select layer by location is run to select all parcels that are within a certain distance X;   2. Values from the selected parcels are then summed together;   3. move on to the next city record Currently, I am having trouble getting my select by location statement correct. Instead of only selecting the parcels that are within distance X of one city, it's selecting all the parcels that are within distance X of all the cities in the feature class.                   arcpy.MakeFeatureLayer_management(city, c_layer)         cCursor = arcpy.SearchCursor(c_layer)         print "Created search cursor on c_layer"          arcpy.MakeFeatureLayer_management(parcel, p_layer)          for row in cCursor:         geoName = row.getValue("GEO_NAME")         print geoName         geoID = row.getValue("GEO_ID")         print geoID                   arcpy.SelectLayerByLocation_management(p_layer, "WITHIN_A_DISTANCE", c_layer, search_radius, "NEW_SELECTION")         print "Completed select by location on p_layer"         y = arcpy.GetCount_management(p_layer)         print y


Small script crashes Python

I'm running a rather simple script with ArcPy, which extracts values of raster to points of a shapefile:               def raster_overlay(input_files):         for raster in input_files:             in_shp = "temp/shapefiles/points.shp"             in_raster = raster             print in_raster             ExtractMultiValuesToPoints(in_shp, in_raster, "BILINEAR")          raster_overlay(raster_files)      The variable `raster_files` is a list with strings pointing to a number of raster files on the local hard disk. The shapefile contains around 50 points, and each raster is around 15MB. If the list of raster is small (more or less <20), everything works as expected. However, I have around 50 raster images. Using the complete list, Python crashes (`"python.exe has stopped working"`) after processing 21 images or so. The values of the first 20 raster are correctly appended to the shapefile (one column for each raster). I monitored python.exe in the Windows 7 Resource Monitor. Memory usage of Python starts around 15 MB and then gradually increases to around 700 MB (and then Python crashes). So, memory leakage might be the reason for the crashes (although the PC has 8 GB of RAM). I tried to include `gc.collect()` and `del in_shp` and `del in_raster` inside the loop, but nothing changed. What else could I try? PS: I just tried changing `BILINEAR` to `NONE`, and the script didn't crash. However, memory usage still increased in the same way (up to around 1.1 GB). And I would like to use bilinear interpolation, so the question is still relevant. Edit: Cross-posted here to the ESRI support. I'll update this question if they can give a solution.


How to convert shapefile to KML file using ArcPy?

Python script that checks to see if a specific layer file exists in the current workspace and, if it does, converts the layer file to a KML file. Does it work with a shapefile? Code so far:               for file in arcpy.ListFiles("cities.shp"):         desc = arcpy.Describe(file)         #print "Name: " + desc.BaseName         name = desc.baseName              if name == "cities.shp":              arcpy.LayerToKML_conversion("cities.shp", "cities.kmz")              print "Converted"         else:             print ("There are no layers in ",env.workspace,".")


Change python + ogr2ogr.exe to python + ogr

I have written several complicated python scripts that end up using ogr2ogr to load or translate data. I have been converting these scripts to standalone exe files meaning the team do not require Python installed and some of the additional modules I use in other parts of the code. However, I always end up using a subprocess and calling shp2pgsql.exe or ogr2ogr.exe, like this               load_ogr = """ogr2ogr --config PG_USE_COPY YES -a_srs "EPSG:27700" -skipfailures -gt 65536 -f PGDump /vsistdout/ %s -lco GEOMETRY_NAME=geom -lco SCHEMA=data -lco CREATE_SCHEMA=OFF -lco CREATE_TABLE=OFF -lco SPATIAL_INDEX=OFF -nln %s | psql -d multi -U postgres -f -"""%(shapefilename,tablename)          run = subprocess.Popen(load_ogr, shell=True)          run.communicate()      Which iterates through a file list and loads the data in. However, I can not bundle this code effectively into a standalone exe because it calls ogr2ogr found via it being installed on the host machine and found in the PATH How can I change this to use the python ogr bindings (ogr.py)? I have found very little code examples or tutorials on how to use the python ogr version, so any pointers to good resources would be very useful too


Adding a polygon in ArcGlobe via GraphicsContainer.AddElement

I'm trying to add some data to an ArcGlobe; however, it's not showing up and I'm wondering what the issue is. I am doing the following               IGeometry geometry;     Ipolygon polygon = myPolygon;     polygon.SpatialReference=  SetSpatialReference();           geometry = polygon as IGeometry;     IZaware zAware = geometry as IZaware;     zaware.Zaware = false;          IElement element;     IPolygonElement polygonElement = new PolygonElementClass();     element = polygonElement as IElement;     element.Geometry = polygon;          IFillShapeElement fillShapeElement = polygonElement as IFillShapeElement;          ISimpleFillSymbol sfs = new SimpleFillSymbolClass();     sfs.Style = esriSimpleFillStyle.esriSFSSolid;     sfs.Color = myColor;          fillShapeElement.Symbol = sfs;     ((IGraphicsContainer)myGlobeGraphicsLayer).AddElement((IElement)fillShapeElement , 0);      Anyone see any major issues? EDIT 1: Made sure to use code-sample tool.


"dataset does not exist or is not supported" using large GRID raster

I am trying my hand at arcpy for the first time to create a conditional raster from a set of threshold values. I have 3 large GRID format rasters (mos_zb3, mos_zb4, pca_finb2) I am trying to feed into arcpy using the following code: import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension = "Spatial" env.workspace = "C:\final_mosaic_files\for_python" Z3 = Raster("mos_zb3") Z4 = Raster("mos_zb4") PC2 = Raster("pca_finb2") outCon = Con(Z4 < -0.9274,2, Con(Z3 <-0.6223,2, Con(PC2 > 1.13,2, Con(Z3 <-0.05342,2,1)))) outCon.save("C:\classifications\actual_real_deal\CART") I keep getting "dataset does not exist or is not supported" errors in the beginning when python tries to read the rasters in as objects. I know the rasters are in the workspace folder, and I have used them in several other analyses so am confident about their integrity. I have searched the other questions about this error message on the exchange and don't see a direct answer for my problem. Thoughts? Thanks in advance, I appreciate the help.


Query Selected Records Only: Javascript API

For a web application I am working on, I currently have a feature layer with ID 0 (Street Lights) and feature layer with ID 1 (Maintenance Records Table). Multiple records in layer ID 1 are related to ONLY 1 record in layer ID 0 (Street Light have 0 or many maintenance records). I am attempting to perform a query on layer ID 0 (such as, select all of the traffic lights that have a wattage over 400). I then want to perform a query on layer ID 1 and select only the records that are associated with the ones from the first query. Therefore, I want all of **the maintenance records** for lights that have a wattage over 400. I understand how to do this with a Relationship Query. However, the final result is that I then want to perform another query on ONLY those selected records based on the date of maintenance. My problem is that a Query Task only seems to work on a feature layer URL. Is there anyway that anyone knows how to perform a query on another query's results instead of a feature layer URL? Thanks. **UPDATE:** I guess another way to ask this is, If I run the selectFeature function on a feature layer, can I run another selectFeature function on only those previously selected features?


Why is * .tlb not visible?

I've created a Visual Studio 08 Active X - MXCommands dll for a VBA button within ArcMap 9.3.1. I'm able to load and use the .tlb on my computer; however when I try it on my test computer the .tlb file is not visible. The MXCommand is not listed in the Component Category Manager under ESRI MXCommands on the test computer. I used RegAsm (e.g. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe C:\Temp\Mydll.dll) to try and register it on the test computer, but this did not help. Both computers are running MS XP professional. Any suggestions of what I could do or try next would be greatly appreciated. I also tried this command to register it: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe C:\Temp\Mydll.dll/tlb: Mytlb.tlb/codebase And received a RegAsm Error - RA0000 The given path's format is not supported. Thank you!


Slow Labeling in ArcMap 10 (ArcView License)

We recently updated most of our users to ArcGIS10. One of my users is having an issue with incredibly slow labeling in ArcMap. The shapefile geometry displays right away, but the labels take _minutes_ to show up at all. The shapefile is of all the parcels in a county and it seems like maybe ArcMap is labeling _all_ the parcels, not just the ones in the current extent. It works just fine in ArcMap with an ArcInfo license. I don't have access to an ArcView 10 license to troubleshoot myself. Are there any significant changes between ArcMap 9 and 10 for ArcView licenses that might cause this and is there's any way to fix it?


Is PPDM Lite still available as a Geodatabase template?

I have been looking for a Geodatabase template that conforms to the PPDM Lite standard and believe that one was previously available here. However, that page no longer exists and no Geodatabase download is mentioned at the PPDM Lite 1.1 page. Does anyone know if one is still available anywhere?


ARCSDE; creating new geodatabase in database servers in arccatalog

I use arcsde 9.3. I want to access a geodatabase on mobile. when I want to create new geodatabase in the list of database servers in arccatalog the error is "error creating geodatabase no arcsde server license found" . but there is no option to install in the cd of arcsde instead of post installation. what can I do?


arcpy Geometry tools give incorrect results

I'm new to python and arcpy but I've been trying to learn how to run geoprocessing tools using arcpy. I have (for this example) 2 shapefiles, a and b, which are both polygons. From plotting them in arcMap, I know that b is found entirely within a. I would like to write a script that will take these two shapefiles and give me a True/False response about whether or not one polygon contains the other. I was thinking of using the arcpy.Geometry.contains() function. I have the following:               >>> a_shp="C:\\Data\\shapefile_a.shp"     >>> b_shp="C:\\Data\\shapefile_b.shp"          >>> #read in as geometry     >>> a=arcpy.CopyFeatures_management(a_shp, arcpy.Geometry())     >>> b=arcpy.CopyFeatures_management(b_shp, arcpy.Geometry())          >>> arcpy.Geometry.contains(a[0],b[0])     False     >>> arcpy.Geometry.contains(b[0],a[0]) #maybe I got the order wrong? Trying the other order     False          >>> #Maybe I'm getting the syntax wrong, trying something else     >>> a[0].contains(b[0])     False     >>> b[0].contains(a[0])     False      I get no error messages but clearly something isn't working properly. Am I doing this right? Any pointers would be greatly appreciated. Thank you!


create a fishnet using lat/lon table text file

I have a text file with lat/lon table values and want to use this information to generate a fishnet using python. Any heads up would be deeply appreciative. Also please point to if this has been already addressed. Thanks, Ibe


List layers in directory .Net ArcObjects or plain .Net  -- C# preferably

Any code samples to list arcgis layer files from a directory so they can be looped over?


Change MADtedLayer renderer

This question is relative to a past question of mine at Rendering raster layer from DTED based on height color map (that remained unanswered), so if you believe that I should merge those two, let me know. I have a MADtedLayer created from a dted catalog using military analyst. The only way I managed to display the data, was using the UseUniformRenderer property of the layer. I want to be able to change the renderer. To be more precise, I want to display each elevation with a specific color, that is already available from a file. My guess is that I need a RasterDiscreteColorRenderer with a corresponding RasterColormap (although I'been unsuccesful with a StretchRenderer also) Here I provide my un-succesful so far code:               public IRasterRenderer CreateDtedRenderer()     {         IRasterColormap colormap = MakeDefaultColormap();              IRasterDiscreteColorRenderer renderer = new RasterDiscreteColorRenderer();         renderer.Colormap = colormap;         return (IRasterRenderer) renderer;     }          public IRasterColormap MakeDefaultColormap()     {         var clrString = DtmColorTable.GetClrAsString();         var blues = new List<double>();         var reds = new List<double>();         var greens = new List<double>();         using (var reader = new StringReader(clrString))         {             string line;             while ((line = reader.ReadLine()) != null)             {                 var vals = line.Split(' ');                 reds.Add(Int32.Parse(vals[1]) / 255.0);                 blues.Add(Int32.Parse(vals[2]) / 255.0);                 greens.Add(Int32.Parse(vals[3]) / 255.0);             }         }              IRasterColormap colormap = new RasterColormap();         colormap.BlueValues = blues.ToArray();         colormap.RedValues = reds.ToArray();         colormap.GreenValues = greens.ToArray();         return colormap;     }          public static IMADtedLayer CreateMADtedLayer(IWorkspace workspace, string catalogName)     {          var inputDatasetName = System.IO.Path.GetFileName(catalogName);               // Open the raster catalog          var rasterCatalog = ((IRasterWorkspaceEx) workspace).OpenRasterCatalog(inputDatasetName);               // Create the MADtedLayer          IMADtedLayer maDtedLayer = new MADtedLayer();          if (!maDtedLayer.Setup((ITable) rasterCatalog)) return null;               ((IGdbRasterCatalogLayer) maDtedLayer).Renderers.Insert(0, CreateDtedRenderer());          maDtedLayer.UseUniformRenderer = true;          maDtedLayer.DisplayElevation = true;          maDtedLayer.ResamplingType = rstResamplingTypes.RSP_NearestNeighbor;          ((IWireframeDisplayProps) maDtedLayer).DisplayWireframe =                 esriMAWireframeDisplayEnum.esriWireframeDisplayNone;               return maDtedLayer;     }      Has anyone ever changed the rendere of a MADtedLayer (or a IGdbRasterCatalogLayer in general?)


Map scale vs. map extent vs. map canvas size in Print Map Composer

Please help! I am so beyond frustrated. I am using QGIS 2.0 and when I try to create my map in the print composer, I cannot make the scale and the extent the way that I need it. I need my map to be at the scale of 1:10 000. However, the map area is quite large and I need a specific x min and y max in the extent (the x max and y min do not matter). I also need a full A4 size sheet of paper. When I enter the scale in, the map extent is not where I need it. If I change the extent, it either changes the scale of the map or changes the size of the map canvas in the print composer. When I change either one of those back, the scale changes and so on and so forth. Is there some way to lock the scale and then just move the map image inside the map canvas? There must be something that I am missing here!


Changing the geodatabase when using HEC-GeoRAS in ArcMap 10.1?

I'm running into a weird issue with HEC-GeoRAS and I'm hoping someone here might be able to help me out. For some reason the program is saving layers for a new project in the geodatabase for the previous project I worked on, despite the mxds being saved in two completely different locations. Is there a way to specify which geodatabase the program should use, or to tell it to create a new geodatabase? The way I understood it, it's supposed to create a new geodatabase in the same folder where the map is saved, but for some reason that isn't happening. Thanks for any help you can provide!


arcpy export - unable to set exact extent of dataframe

I am trying to use arcpy's ExportToPNG function to produce tiles for Nasa WorldWind, which will require very specific extents of outputted tiles. Pretty simple code - abbreviated below:                mxd = arcpy.mapping.MapDocument(mxdPath)      df = arcpy.mapping.ListDataFrames(mxd)[0]      xmin, ymin, xmax, ymax = getWorldWindTileBounds(tileX, tileY, level)           newExtent = df.extent      newExtent.XMin, newExtent.YMin = xmin,ymin      newExtent.XMax, newExtent.YMax = xmax,ymax      df.extent = newExtent           tileFilePath = '%s/%s/%s/%s_%s.%s' % (cacheDirectory, level, tileY, tileY, tileX, tileFormat)      tileDir = os.path.split(tileFilePath)[0]      if not os.path.exists(tileDir):           os.makedirs(tileDir)           if 'png' in tileFormat:           arcpy.mapping.ExportToPNG(mxd, tileFilePath, df, df_export_width=512, df_export_height=512)      else:           arcpy.mapping.ExportToJPEG(mxd, tileFilePath, df, df_export_width=512, df_export_height=512)      The extent of outputted tiles **_is very close, but not identical_** to the extent set in this block of code. In reviewing the documentation for the arcpy DataFrame extent property, I found this: **_"If the aspect ratio of the extent does not match the shape of the data frame, the final extent will be adjusted to fit the new extent within the shape of the data frame. In other words, if you set explicit X, Y coordinates, you may not get the same values returned if you attempt to read them later."_** Since I am using the dataframe instead of a page layout, I initially didnt think was applicable to my use case. But, I have tried all types of shenanigans to set dataframe elementWidth/elementHeight properties to no avail. Does anyone know how I can force the export to match the extent I set exactly?


ogr2ogr srs options: where is the well known definition determined?

In the ogr2ogr documentation it says that when using `-a_srs srs_def`: > Srs_def can be a full WKT definition (hard to escape properly), or a well > known definition (ie. EPSG:4326) or a file with a WKT definition. Where are the default well-known definitions listed? Do they include ESRI as well as EPSG? If not, why not, and can I add all the ESRI definitions listed at spatialreference.org? Is there an easy way to load an srs definition using an SRID from a PostGIS spatial_ref_sys table, aside from just running some sql to get the text? Thanks!


ESRI/ArcGIS draw protractor

I am using ArcGIS maps and trying to follow JS API. I am trying to understand how can I add a protractor on the map which will help in angles while drawing polygons. I understand I could add a Feature layer but how do I add an image to it? How can I make the protractor movable, without it being scale up/down with the map?? I would appreciate any help.


How to set Eclipse and PyDev for QGIS when ArcGIS is installed?

I have got a lot problems with the configuration of Eclipse with PyDev in order to develop QGIS plugins. The situation is very weird and frustrating. I can import qgis module using Pyscripter without any problems but in the case of Eclipse I have already spend a few hours to find out solution. I check a lot of tutorials from the Internet but I have not get answer to my question yet. This is not a duplicate question because I have checked all solutions form other questions. In my case I have got ArcGIS 10.2 and QGIS 2.2 installed on my machine. I use the script below to run PyScripter               @echo off     call "%~dp0\o4w_env.bat"     call "%OSGEO4W_ROOT%"\apps\grass\grass-6.4.3\etc\env.bat     @echo off     path %OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-6.4.3\lib;%PATH%     set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis     set GDAL_FILENAME_IS_UTF8=YES     rem Set VSI cache to be used as buffer, see #6448     set VSI_CACHE=TRUE     set VSI_CACHE_SIZE=1000000     set PYTHONPATH=C:\OSGeo4W\apps\qgis\python     Set PATH=C:\OSGeo4W\apps\qgis\bin;%PATH%     set QGISHOME=C:\OSGeo4W\apps\qgis\     Start c:\PROGRA~2\PyScripter\pyscripter.exe --python27 --pythondllpath=C:\OSGeo4W\bin      In that case I can import qgis or qgis.core without any problems. When I check paths using :               import sys     for item in sys.path:         print item      I get this result:               C:\OSGeo4W\apps\qgis\python     C:\OSGeo4W\bin\python27.zip     C:\OSGeo4W\apps\Python27\DLLs     C:\OSGeo4W\apps\Python27\lib     C:\OSGeo4W\apps\Python27\lib\plat-win     C:\OSGeo4W\apps\Python27\lib\lib-tk     C:\OSGeo4W\apps\Python27     C:\OSGeo4W\apps\Python27\lib\site-packages     C:\OSGeo4W\apps\Python27\lib\site-packages\PIL     C:\OSGeo4W\apps\Python27\lib\site-packages\win32     C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib     C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin     C:\OSGeo4W\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg     C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode      As the results I get ready working with QGIS Pyscripter but using this software I can not debug my plugin. In the case of Eclipse I use this bat file               @echo off     SET OSGEO4W_ROOT=c:\OSGeo4W     call "%OSGEO4W_ROOT%"\bin\o4w_env.bat     call "%OSGEO4W_ROOT%"\apps\grass\grass-6.4.3\etc\env.bat     @echo off     SET GDAL_DRIVER_PATH=%OSGEO4W_ROOT%\bin\gdalplugins     path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-6.4.3\lib     set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python;     set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\Python27\Lib\site-packages     set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%\apps\qgis     "C:\Progra~2\eclipse\eclipse.exe"      When I use piece of code mentioned above to check paths I get:               C:\Python27\ArcGIS10.2\lib\site-packages\setuptools-2.2-py2.7.egg     C:\Python27\ArcGIS10.2\lib\site-packages\sphinx-1.2.1-py2.7.egg     C:\Python27\ArcGIS10.2\lib\site-packages\jinja2-2.7.2-py2.7.egg     C:\Python27\ArcGIS10.2\lib\site-packages\docutils-0.11-py2.7.egg     C:\Python27\ArcGIS10.2\lib\site-packages\pygments-1.6-py2.7.egg     C:\Python27\ArcGIS10.2\lib\site-packages\markupsafe-0.18-py2.7.egg     c:\OSGeo4W\apps\qgis\python     c:\OSGeo4W\apps\Python27\Lib\site-packages     c:\OSGeo4W\apps\Python27\DLLs     c:\OSGeo4W\apps\Python27\lib     c:\OSGeo4W\apps\Python27\lib\lib-tk     C:\OSGeo4W\bin     c:\OSGeo4W\apps\Python27     c:\OSGeo4W\apps\Python27\lib\site-packages\PIL     c:\OSGeo4W\apps\Python27\lib\site-packages\win32     c:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib     c:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin     c:\OSGeo4W\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg     c:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode     C:\OSGeo4W\bin\python27.zip     C:\Python27\ArcGIS10.2\Lib     C:\Python27\ArcGIS10.2\DLLs     C:\Python27\ArcGIS10.2\Lib\lib-tk     C:\Python27\ArcGIS10.2     C:\Python27\ArcGIS10.2\lib\site-packages     C:\Program Files (x86)\ArcGIS\Desktop10.2\bin     C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy     C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Scripts      Of course I set Forced Builtins for qgis and PyQt4 but still It does not work. When I try to run import qgis I get this error and I get error               from qgis.core import QgsFeature, QgsGeometry     ImportError: DLL load failed The specified module could not be found.      Any idea how to solve this problem?


KML Balloon Not Showing Up In <Folder>

I've created a perl script to create multiple line files from points. It iterates through, creates everything as expected. When you hover over a line, I get a balloon with all of the attribute information that I'm pushing. Only issue, I don't want 300 separate kml files. So, I modified the script to write to a kml "folder". All of the lines display as expected. Looks just like the individual files, but I can open the one file and see everything. EXCEPT, now the attribute information does not show up when I hover over a line/click on a line/even when I go to properties. It's the same exact setup that is in the individual file...Is it impossible to show several balloons in one file, even if they are separate "documents"? Thanks for your help! ![Balloon Tag Snip](http://i.stack.imgur.com/bj5xQ.jpg)


How to manage the osmosis command line?

This refer to this post : Read Here I'm in trouble when using osmosis command line to export data from planet- latest.osm.bz2 directly to osm2pgsql using some criteria to select what to transfer. I think is more easy to export planet-latest.osm.bz2 to an XML with osmosis and then use osm2pgsql to import to Postgre, but I can't go further. So I need help in osmosis parameters to show how can I to export data using filters like               --place='city' --admin_level='2'      and import to Postgre using osm2pgsql. Sorry about this very similar post, but the user was helping me was gived up.


Calculating line direction in MapInfo

I have a large file of a road network. I need to calculate the value of direction (in degrees or radians) of the line segments, and save this value to a new field. I need to use MapInfo. I have found this excellent example using qgis, but need to undertake the work using MapInfo. Does anyone have a solution. I tried the basic idea of using the function listed in the solution and copy and pasting that in, but it does not work. How to add Direction and Distance to attribute table? Hope this all makes sense. To conclude, I need to calculate direction for each line segment and add them to a new field in MapInfo.


How can I calculate Moran's I in 3D?

This may be a question to post on a GIS forum, but I was wondering if among the spatial data experts here, someone could help me calculate the extension of Moran's I to 3D? Our data is about 3D habitat complexity, specificlaly, the 3D complexity of the habitat provided by algae to other marine organisms. The idea is to estimate Moran's I using 3D data we have in which each voxel (3d pixel) is either water or algae. So, the neighbours for each point are distributed in 3d space. Norbert Marwan used this to calculate bone complexity (medical journal) but there is something about how poitns are accounted for in the index calculation avoid repetition of neighbour pairs that I don't understand Any help would be most appreciated. All the best, Ana


Openlayers GetFeatureInfo not working

I installed apache2 and GeoServer, then set up the proxy.cgi. I imported shp based multipolygon file into geoserver. I can access via geoserver openlayers viewer but when I want to do it same in a html file I cant do it, because the getfeatureinfo dont want to work properly. I added to the file:               OpenLayers.ProxyHost = "proxy.cgi?url=";               map.events.register('click', map, function (e) {                         document.getElementById('nodelist').innerHTML = "Loading... please wait...";                         var params = {                             REQUEST: "GetFeatureInfo",                             EXCEPTIONS: "application/vnd.ogc.se_xml",                             BBOX: map.getExtent().toBBOX(),                             SERVICE: "WMS",                             INFO_FORMAT: 'text/html',                             QUERY_LAYERS: map.layers[0].params.LAYERS,                             FEATURE_COUNT: 50,                             Layers: 'csongrad_demo:csongmat',                             WIDTH: map.size.w,                             HEIGHT: map.size.h,                             format: format,                             styles: map.layers[0].params.STYLES,                             srs: map.layers[0].params.SRS};                                   OpenLayers.loadURL("http://xxx.xxx.xxx.xxx:80/geoserver/csongrad_demo/wms", params, this, setHTML, setHTML);                         OpenLayers.Event.stop(e);                     });       after I tried this:               info = new OpenLayers.Control.WMSGetFeatureInfo({                         url: 'http://xx.xx.xx.xx:80/geoserver/wms',                          layerUrls: 'http://xx.xx.xx.xx:80/geoserver/csongrad_demo/wms',                         title: 'Identify features by clicking',                         queryVisible: true,                         eventListeners: {                             getfeatureinfo: function(event) {                                 map.addPopup(new OpenLayers.Popup.FramedCloud(                                     "chicken",                                      map.getLonLatFromPixel(event.xy),                                     null,                                     event.text,                                     null,                                     true                                 ));                             }                         }                     });                     info.activate();                     map.addControl(info);      none of them wanted to work, I always get this error "Loading... please wait..." please help Thanks


QGIS 2.2 saving layer as CSV with GEOMETRY=AS_WKT not working

Just upgraded to QGIS 2.2 and it looks like saving a layer as CSV doesn't support GEOMETRY=AS_WKT anymore. The new Layer Options portion of the save dialog is cool but it looks like GEOMETRY and LINEFORMAT for CSV have some swapped options (CRLF and AS_WKT are in opposite option lists). I tried custom layer options:               GEOMETRY=AS_WKT     SEPARATOR=SEMICOLON     LINEFORMAT=CRLF      Those worked under QGIS 2.0 but don't appear to work with QGIS 2.2.


data defined labeling with postgis layer

How to use the expression based (edit: data defined) labeling with postgis? I'm wondering, whats the best way to use expression based (edit: data defined) labels with postgis (I'm new to postgis). Just by adding new columns for x and y and so on, or by using a relational table with that columns? Or is there a other way? Thanks! EDIT: The image below shows the common way to use data defined labels for shape files: Add a column for x and y position for the label (and/or color, size, etc.) to the attribute table and set the correct field in the layer preferences. Now I would like to know if its possible to store the x and y (etc.) columns into a second relational table (with postgis). Because I would like to use the Data-Defined-Function without modifying the attribute table itself. ![enter image description here](http://i.stack.imgur.com/vwnyT.png)


How do I stop Kernel Density from cutting off symbology?

I need help configuring Kernel Density so that is does not cut off symbology on hot spots. (See pic below) I'm assuming it has something to do with the extent but I could not get it to display the way I want it. Any help would be appreciated. ![enter image description here](http://i.stack.imgur.com/RMmgk.jpg) ![enter image description here](http://i.stack.imgur.com/C8Pq8.jpg) ![enter image description here](http://i.stack.imgur.com/42MDK.jpg)


Is there a bug when creating a relationship class with Python using a GlobalID?

I'm trying to create a relationship class with Python using a GlobalID. When I use Python it gives me the error: > Failed to execute. Parameters are not valid. ERROR 000800: The value is not > a member of GLOBALID. Failed to execute (CreateRelationshipClass). When I try to use the Create Relationship Class tool through the Toolbox, I get the same error. If I select GlobalID as the primary key, it will ONLY let me select a GlobalID as the foreign key. It will not let me select a GUID of my choice. But when I'm in ArcCatalog and right click the Dataset and go to `New > Relationship Class`... It works! What's wrong here? Thanks.


Where can I find GDAL bindings for Python 3.3?

I have been using GDAL 1.9.x on Python 2.7 and took the bindings from here. Is there a place to get GDAL bindings for Python 3.3 or is GDAL not officially supported in Python 3.3 yet?


Calculate maximum and minimum elevation for a polygon layer from a DEM

I have a polygon layer and would like to know the min and max elevation within each polygon. My elevation layer is a digital elevation model. I'm not quite sure how to extract that information. I am using arcMap 10 Any help would be apreciated. thanks!


How to determine aerosol model value for i.atcorr in GRASS?

The `i.atcorr` module in GRASS requires aerosol model data to perform atmospheric correction using the 6S algorithm. It seems like I need **a value from one of these parameters** to continue:   * Estimate of the **meteorological parameter visibility** v [km], or   * The **aerosol optical depth (AOD) at 550nm** **Is there an easy (and free) way to get such data**? * ***EDIT (new findings):** It seems that a NASA website called Space-Based Measurements of Ozone and Air Quality in the Ultraviolet and Visible got the **free aerosol model data**. It is organized by date and by the instruments that collected the data. Basically:   * **OMI (Ozone Monitoring Instrument)** is for data dated July 2004 onward   * **TOMS Earth Probe** is for data dated 7/25/96 - 12/31/05   * **TOMS Nimbus-7** is for data dated 11/1/78 - 5/6/93 I'm processing a Landsat scene dated in year 2000-2001, so Toms Earth Probe data is the way to go. **But as stated by @Tobi in an answer below, TOMS Earth Probe data is actually an index, and unitless** (not really AOD at 550nm which I want in the 6S algorithm). But I've stumbled upon this called A Long-Term Record of Aerosol Optical Depth from TOMS Observations and Comparison to AERONET Measurements, and they _hinted_ how the data in TOMS observation can still be used. I need more time to learn how to do this. Welcome any further input, always..


How to remove/disable a toolbar via python?

How do I remove or disable a toolbar e.g., Raster, programmatically using Python?


What is the difference between EPSG:900913 and EPSG:3857?

I'm using the QGIS google layers plugin to digitize a parcel as a shapefile. Later I want to import it to PostGIS. I know that google maps use a special 'google mercator' projection. What is the correct code of this projection: 900913 or 3857? Or are these two codes describing the identical projection equations?


Postgis geometry type = Geometry

Simply I've got a number of PostGIS layers that have a geometry type of Geometry, as a posed to point, line, polygon.               wkb_geometry geometry(Geometry,27700)      QGIS 2.0+ doesn't like this very much and wants me to set the geometry type and in general makes my PostGIS connect in QGIS slow. How do I change the Geometry type to point for instance? Si


How to rectify polygon shapes in QGIS?

I have some polygon-shapes in qgis-1.7.0 and want to ensure that every polygon is a rectangle. See image below. ![enter image description here](http://i.stack.imgur.com/aEYy8.png) Is there any way I can do this in QGIS (or any other f/oss)? Or how can I improve my polygon-drawing to make sure for example that every building consists of rectangles (all angels = 90°)? Any hints appreciated! Thanks!


how to specify -t critical dowloading raster with raster2pgsql

I'm trying to download a raster into postgres/postgis. So far I wrote:               raster2pgsql -s 3006 -I -C -M -R filename.tif -F -t 463.313x463.313 schema.rastername | psql -h localhost -U postgres -d db      The raster is dowload that way successfully but my problem comes with the fact that the output raster file (once download read in postgres) is smaller than the original one. My raster has 2960rowsx2558columns, each pixel has 463.313x463.313 for dimension, and I have a scale factor of 1. I don't understand how to specify the dimensions. I have read these posts _"Difference in raster size using raster2pgsq"_ and _"Loading a raster into a PostGIS 2.0 database on Windows"_ but I did not get how the conversion is done.


I'd like to accelerate the refresh of a Open Layers vector layer throught a jqueryui slider in Firefox

I want to develop a kind of timemap combining the jquery-ui slider component and the OpenLayer library. I'm simply using the Vector layer of OpenLayers with Rules style.                map = new OpenLayers.Map('map', {maxResolution:'auto'});     var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",                                        "http://vmap0.tiles.osgeo.org/wms/vmap0",                                        {layers: 'basic'} );     map.addLayer(wms);     map.setCenter(new OpenLayers.LonLat(0, 0), 0);          // create 20 random features with a random type attribute. The     // type attribute is a value between 0 and 2.     var features = new Array(20);     for (var i=0; i<20; i++) {         features[i] = new OpenLayers.Feature.Vector(             new OpenLayers.Geometry.Point(Math.random()*360-180, Math.random()*180-90),             {type: parseInt(Math.random()*80)}         );     }            var style = new OpenLayers.Style(         {                                        graphicHeight: 20,             graphicYOffset: -19,             rotation: "${angle}"         },         {             rules: [ new OpenLayers.Rule({                          filter: new OpenLayers.Filter.Comparison({                             type: OpenLayers.Filter.Comparison.LESS_THAN,                             property: "value",                             value: 20                         }),                                                      symbolizer: {                             externalGraphic: "http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-blue.png"                         }                     }),                     new OpenLayers.Rule({                             filter: new OpenLayers.Filter.Comparison({                                 type: OpenLayers.Filter.Comparison.BETWEEN,                                 property: "value",                                 lowerBoundary: 20,                                 upperBoundary: 40                                  }),                                                          symbolizer: {                                 externalGraphic: "http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-green.png"                             }                     }),                     new OpenLayers.Rule({                             filter: new OpenLayers.Filter.Comparison({                                 type: OpenLayers.Filter.Comparison.GREATER_THAN,                                 property: "value",                                 value: 40                             }),                                                          symbolizer: {                                 externalGraphic: "http://dev.openlayers.org/releases/OpenLayers-2.13.1/img/marker-gold.png"                             }                    })             ]         }     );          layer = new OpenLayers.Layer.Vector('Points', {         styleMap: new OpenLayers.StyleMap(style)     });          layer.addFeatures(features);     map.addLayer(layer);      I change the displayed value though the slide event of the jquery-ui slider.                $( "#slider" ).slider({             value:0,             min: 0,             max: 100,             step: 1,             slide: function( event, ui ) {                 var end = false;                 //launched.push(ui.value);                 $( "#value" ).val( ui.value );                      function redraw(){                     //launched.pop();                     for(var i = 0 ; i < features.length; i++){                         features[i].attributes["value"] = Math.random()*60;                                  }                     map.getLayersByName("Points")[0].redraw();                      };                 redraw();                       }         });      It work very well with few elements. But if I set the number of displayed element to 200 and open my script with Firefox, the slider is very slow and do not follow the mouse cursor, although it work well with Chrome. You can find my source code on this jsfiddle : http://jsfiddle.net/jeje/5XPcc/6/ Anybody have an idea of what I did wrong ? Do you think there is a way to improve it ? Already asked in stackoverflow https://stackoverflow.com/questions/21626115/how-to-improve-openlayer-vector- layers-refresh-for-200-elements


Determining gaps in polylines and identifying continuing sections?

Is there a relatively quick way to identify where gaps < a certain size are present between polyline? E.g. would there be an easy way to join line likes the ones in the below image if the gap was <10m? ![enter image description here](http://i.stack.imgur.com/5T6l1.png) I have access to ArcMap, MapInfo and QGIS.


Nearest point on a line ( Spherical / Mercator projection )

I have a **line (Ax,Ay - Bx,By)** over a mercator projection (google maps) and **a random point (Cx,Cy)** nearest to that line, i would to know the closest point (transparent blue on the image) over that line to point (blue in the image) **EDIT: to clarify that this is in a Mercator projection (spherical projection)** ![enter image description here](http://i.stack.imgur.com/ZSpF0.jpg)


Georeferencing CAD Files and Creating Geodatabase

I'm hoping this is an easy question to answer. I have georefrenced a CAD data set to an orthophoto that was projected in NAD 83, and turned it into a GDB. Even though the GDB is not projected, is this still considered to be Georefrenced since its based off of the CAD files? When I bring in a file from the GDB I get a warning saying "The following data sources you added are missing spatial reference information. This data can be drawn in ArcMap, but cannot be projected" In order to put it into a GDB, I used the select by attributes to only take the certain features I was working with, and exported them into their own Polygon or Polyline file. I then created a GDB and imported the files into it.


Running a Focal Mean or Low Pass Filter or 3 by 3 Mean Kernel in GDAL \ gdal_calc

Hi I am looking to run the equivalent of Focal Statistics in gdal_calc. Is it possible? It is a simple focal I require. I need to run a 3 by 3 kernel over the data (mean) and if possible only on NoData (but if on all that is okay as well). I can do this in other software but specifically asking if a GDAL_calc solution exists. This is the exact thing I am trying to do on a singular raster Con(IsNull("C:\temp\SST_Final_C_NoData.tiff"), FocalStatistics("C:\temp\SST_Final_C_NoData.tiff", NbrRectangle(5,5, "CELL"), "MEAN"), "C:\temp\SST_Final_C_NoData.tiff") GDAL 1.11.0 and Python 3.4.1


Latitude & Longitude values from Simple Voyage Data Recorder [SVDR]

I am receiving values in the form of `0113.7276,N,10339.0121,E` from a Ship Data Recorder. I am not a GIS/ GPS expert and am unable to decipher what do these values mean, because they are out of range for standard latitude and longitude values. What could these values mean?


How to get output value from Feature Compare (schema) and append to existing csv?

I am working on a data integration project and am trying to single out feature classes which have a schema that varies from two base feature classes (one for point, one for polyline features). I've played around with the Feature Compare tool to compare schemas, but find it tedious to use this tool, even in batch mode, because it outputs a single text file with a few values for _each comparison performed_. I started writing a script in Python to loop through a list of features in a list and compare their schema based on geometry type. However, the problem of either integrating the output into a single text file persists. Is there a way to obtain this value and append it to an existing text file? (Messy) code so far as follows:               # Import arcpy module     import arcpy          # Import environments; set workspace     from arcpy import env          # Set workspace     env.workspace = "Data_Comparison.gdb"          # List features to be compared     fclist = arcpy.ListFeatureClasses()     print fclist          # Loop through list to separate point and line feature classes     for fc in fclist:         desc = arcpy.Describe(fc)         name = desc.file         geo = desc.shapeType              print ("Feature name: " + name)         print ("Feature geometry: " + geo)              if geo == "Point":             arcpy.FeatureCompare_management("swr_net_nodal", fc, "ENTID", "SCHEMA_ONLY", "", "", "", "", "", "", "CONTINUE_COMPARE", "fc + '_compare'")             output = arcpy.GetMessages()             print output


occasionally empty search cursor looping through a raster list with arcpy

I'm looping through a raster list, to export cell counts (from "Count" field in the table) to a text file, I'm only interested in cases where the field "Value" = 1, so I have included this in my search cursor (inR is from the raster list):               Rows = arcpy.SearchCursor(inR, '"Value" = 1', "", "", "")      However, some rasters in the list do not have value = 1 in the table, in this case, I want to return 0 for this count. I've tried to include this in the following loop through the search cursor               for row in Rows:         countR = row.getValue('Count')         if "countR" not in locals():             countR = 0          #append count to list to export later     value_list.append(countR)     del(countR)      When the search cursor is "empty", the get.Value line does not return any value and the object is not created, however, the following line does not work, the idea is that if countR does not exist, then it will be given the value of 0 for this raster in the list (inR). Edit: this is where I went wrong, the above is not correct, when the search cursor is empty (like an empty list) , there is no loop and none of the statements within that loop take place. Any help would be appreciated, or alternatives. Thanks


How to publish GeoTIFF using a WCS service with QGIS Server

I need to publish some GeoTIFFs using QGIS Server (2.2.0-1+precise1). I already have installed and setup QGIS Server to serve those geotiffs via WMS. But I need to serve rather the raster data to be able to use it in raster calculations. I don't know how to set up or call the service from an URL. I tried with the parameter SERVICE=WCS instead of SERVICE=WMS, to no avail. If QGIS server can't handle WCS yet, what other open source alternatives are there? Thank you for your time and help.


How to determine if an object is a circle

I have a polygon shapefile that consists of many different shaped features. I would like to identify only those shapes that are circles. Is there a way to do this? Is it a calculation I could do in the field calculator? Thanks... ![enter image description here](http://i.stack.imgur.com/xiuWr.jpg)


Make sidebar div active on Marker click (and vice versa)?

What's the best way to change an element to active when you click on a marker. For example, when you click on a marker on a Leaflet map, how to make it so the sidebar element that's related to it will be active? I can write the sudo code but I'm missing pieces.               markers on click     $(#sidebar div)        make (related) li element active      edit: Basically, I'm trying to mimic what a lot of map directory sites like Yelp or Foursquare do. You click on the sidebar list item and the marker becomes active, and vice versa. This makes it so a user and can read info about the marker while seeing where the place is. Mapbox had a cool (now deprecated) Foursquare example. I went through the code for that but barely understood it. That said, the example gets the point across. ![Foursquare Mapbox example](http://i.stack.imgur.com/sT9tz.png) When you mouseover a listitem in yelp, the marker goes black. ![Yelp example](http://i.stack.imgur.com/VY13w.png)


Is "puntal" an accepted and defined geometric term?

There are definitions for the geometric qualities of polygons and lines: >   * **polygonal** : Having many angles; hence characteristic of a polygon. > Ref: http://en.wiktionary.org/wiki/polygonal >   * **lineal** : of, relating to, or consisting of lines; linear. > Ref: http://oxforddictionaries.com/us/definition/american_english/lineal However, I have been unable to find a scholarly reference for " **puntal** ", that is, having the geometric qualities of a point. The only solid references to "puntal" (in English) I have found are in the discussions and source code of projects like GEOS and JTS Topology Suite, where there might be classes or interfaces corresponding to **Polygonal** , **Lineal** , and **Puntal**. Is there a canonical definition of the geometric sense of this term?


Label polygons in MapInfo like QGIS?

I was wondering if there is a way to angle Polygon labels in MapInfo like it's done in QGIS (see image link below). ![enter image description here](http://i.stack.imgur.com/UA368.png) Thanks, Alan


PostGIS is rejecting an srid code for my projection. I've found a nearly identical projection w/ a legit srid. Will it work?

My projection is this: `NAD 1983 StatePlane North Carolina FIPS 3200 Feet`, which has a proj4 string that looks like this:               +proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2199999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs      Its SRID is 102719. I've tried to create a db column in PostGIS with an srid option for this projection, but its rejecting the srid, calling it invalid. I've found a similar projection with a valid srid code, `NAD83 / North Carolina (ftUS)` (srid=2264), which has a proj4 string nearly identical to the above:               +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs       As you can see, the only difference between these two is that the `lat_1` and `lat_2` degrees are swapped. They even use the same three degrees, only the first two are differently ordered. Can I use this second projection? UPDATE: The answer seems to be leaning towards 'yes', I just ran projection- to-projection transformations from a single projection to the NC projection using the "legitimate" and "illegitimate" proj4's and got similar results down to the 7th decimal place


Google route like functionality in Arcmap

Drawing routes in Google Earth or Google Maps looks very cool. As point move along the route with specific speed. I am looking same functionality in Arcmap. Can anyone figure out how?


Split data for OpenLayers

(I gave up. I already spend 10 hours reading internet and I am not any closer to get the job done.) If I start at the beginning:   * I have country map divided into 12 regions.   * I have country map divided into 56 areas.   * I have country map divided into 211 townships.   * I have country map divided into 2700 local areas.   * I have buildings map approx. 500 thousands records. ![enter image description here](http://i.stack.imgur.com/FDjnX.png) I want to build interactive map, but on old computers OpenLayers(geojson) with 211 records is kind of slow. My idea was to show user only regions, then a user select a region and show areas for selected region, user select an area, and then I show user only townships for selected area and so on. I have no problem manually connect townships to areas and areas to regions, just need to split them. My first idea was to split polygons in layer (Areas) into separate files with QGIS and load correct file in OpenLayers. But then when searching the web how to auto split polygons in layer and save them in separate files I asked myself should I use Geoserver or something similar. I hope I described my problem good enough to get some advice, should I use GeoServer or use separate files and how can I save polygons in layer to separate files? How should I approach the problem? Thanks.


Weighted Overlay with "nodata" cells

I´m currently conducting a suitability analysis with the weighted overlay function. One relevant criteria is the proximity to highways. If the wind turbine is located up to 300 m away from the highway, the cell gets 10 points (out of 10). If it is farther away,the cell shouldn´t get a score, because the criteria is not relevant. So I ran the "euclidean distance" function with a maximum distance of 300 m. All cells farther away than 300 m are declared as "nodata". Then I ran the "weighted overlay" function with 3 more criteria (all have the same weights). The problem is that the study area is bigger than the 300 m buffer around the highways, but after I ran the "weighted overlay" function, only the area within the 300 m buffer was weighted. The rest of the study area was declared as "nodata". The goal is that, when conducting the weighted overlay function, a cell farther away than 300m is not influenced by the criteria "proximity to highway". example: There are 4 criteria with equal importance. C4 is the "proximity to highways" criteria. A cell within the 300 m radius should be calculated like this: c1: 8 points (25%), c2: 6 points (25%), c3 4 points (25%) and C4: 10 points (25%) --> weight: (8+6+4+10)/4 = 7 points A cell outside of the 300m radius should be calculated like this: c1: 8 points (25%), c2: 6 points (25%), c3 4 points (25%) and C4: no input (25%) --> weight: (8+6+4)/3 = 6 points Is this possible? I don´t want to give the "nodata" cells a scale value. Thanks for you help!


How do I use variables from one Python script in other Python scripts?

I want to set up a single python file containing variables that have the locations of all my data sources. This would then be used by all my other scripts, then as a data source changes, I only have to edit the one file. My Data_sources.py would look something like this:               BC_BEC = "Database Connections\\BC.sde\\FOREST_BC.BC_Eco\\BC.BC_BEC"     BC_TFL = "Database Connections\\Forest_BC.sde\\BC.BC_Admin\\BC.TFL_Boundary"      and so on... How do I get all my other scripts to load or access these variables in the Data_sources.py? Thanks,


Can I make tiles with all countries but one transparent?

I would like to have one country in a given style and all other countries in another grayed out one. But styles should be changeable in the production webmap, so I need them to be independent of each other. My idea for this was to render the whole world in the background style, and the desired country as an overlay. By overlay, I mean render all areas outside of this country transparent. How can I do this in TileMill?


How can I get the field index of the new layer in my script using Python?

I am trying to use `layer.changeAttributeValue(fid, fieldIndex, value)` to add values to a field in QGIS Basically, I'm creating a plugin which will, if a checkbox is ticked, create a new field, then iterate through the dataset, filling that field with the x (easting) coordinate of each point (I also have another checkbox for the same for the y coordinate). As such, I cannot set the field index beforehand because I don't know which will be ticked. So - how can I get the field index of the new layer in my script using Python? Also (sorry, I'm new to this), how can I get the `fid` of the current feature as I iterate through the dataset?


customize handlerOptions

when i customize handlerOptions of drawfeature, savestrategy not work. Thats my code :               var handoptions = {             handlerOptions: {                 freehand: true,                 style: {                     fillColor: "yellow",                     fillOpacity: 0.4,                     strokeColor: "green",                     strokeOpacity: 1,                     strokeWidth: 1,                     pointRadius: 6                 }             }         };              draw = new OpenLayers.Control.DrawFeature(            wfs_layer, OpenLayers.Handler.Point,handoptions,            {                //  title: "Draw Feature",                //  displayClass: "olControlDrawFeaturePolygon",                multi: true,            }            );      i dont know why ?


How to migrate a specific workspace, store and layer in Geoserver

Geoserver is running on a development and production environment. I would like to migrate just one workspace, store, layer, style, etc from development to production. How can I do this? I know I can copy the entire data-dir to production and restart geoserver; but than all workspaces, stores, etc are migrated. The point is I want just one workspace, store, etc. In the development environment I have several test workspace, store, and layers, which I do not want on production. In the data-dir I see a directory gwc-layers, with a lot of xml-files. But how do I know which xml is which layer?


How to add a new column in attribute table with attribute with indexes of another max-min ordered attribute field?

I've an attribute column named e.g. `VALUE` with different values I would like to make a column named e.g. `ORDER`such that the greatest value has the attribute `1` the second value `2` etc. etc. so order express the order from the biggest to the smallest value like this:               VALUE   ORDER     12000     1     8000      2     600       3     500       4     200       5      So far I've tried with QGIS 1.8 to order the `VALUE` column (that please note is not in the right order by default) from `max`to `min`simply clicking over the attribute name and than use `$rownum`in field calculator but this seems use the default rows numeration so I don't have the right order. Please edit my question if you think you can explain it better!


Customize search feature

I'm trying to create a map with CartoDB to show the spanish population between...at a municipality level. I can do everything perfectly, but I have just one problem: I would like to know if is there any possibility to customize the "search" feature, connecting it to the geolocalized names that I have in my table. In the way that if I put "Guadalajara" -that I have in my table- it goes directly to Guadalajara, Spain (the one in my table) and not to Guadalajara, México. And, in the same way, If I put "Madrid" right now it goes to the city, just a bit more north than where my point is. Hope I've been clear. Maybe my solution is to add a filter feature to a map, but I still don't know how to do it. Thanks!


How to export a shapefile from ArcGIS 10 into Autodesk Ecotect?

I am trying to export a shapefile from ArcGIS 10 into Autodesk Ecotect Analysis 2011 for solar analysis. I have a shapefile with polygons, and the heights of buildings is stored in the attribute table. I tried saving it as a KML file but Ecotect does not import KML files. Instead, Ecotect would accept any DXF or 3D files (such as 3D Metafile and 3D Studio). Is there a way of saving 3D files from GIS other than KML? I tried importing KML into Sketchup and Autocad without success. Any other idea for exporting shapefiles into a software that can extrude them and save as 3D would help too! Cheers!


Global solar radiation data

I need a solar radiation data in central Asia. Is there any global dataset of solar radiation. If someone know about it, please send to me the link. thanks a lot


ArcGIS Find task performance over SDE

We are having a problem in our Search feature for our app. We are using arcgis published REST services and SDE database. When we try to do our search manually using the REST url, it takes roughly 9 minutes for it to finish. Although it is searching an LSD layer, i don't think it should take that much time. My question is: Is there anything we can do to improve the performance of the find task? We already did the compress, analyze and rebuild indexes in our SDE database. Thanks.