How to create multipart line and polygon with interior ring in ArcGIS Python?

My objective is to swap X,Y coordinates of feature classes using Python and arcgisscripting. Based on help examples, I managed to write script which reads and writes all geometry types. The problem is with polyline geometry: for multipart lines, all parts are connected and they should be disjoint. It seems that connection between last vertex of one part is connected with first vertex of next part.   _It's strange especially as script deals well with multipart polygons and polygons with void._ Am I missing something with multipart polyline geometry?               import arcgisscripting     gp = arcgisscripting.create(9.3)          gp.overwriteoutput = True     gp.workspace = r"D:\Work\SwapXY.gdb"     inFC = r"D:\Work\SwapXY.gdb\Line"          desc = gp.Describe(inFC)     shapeField = desc.ShapeFieldName  #SHAPE field name     shapeType = desc.ShapeType          # Create FC for inserting swaped geometries (if not exist)     ...          try:         rows = gp.SearchCursor(inFC) #open SearchCursor on input FC         row = rows.next()         outRows = gp.InsertCursor(outFC) #open InsertCursor on output FC              #create Array object which will contain features vertices (other than points)         vertexArray = gp.CreateObject("Array")              while row:             feature = row.getValue(shapeField) #get the SHAPE field into variable                  ##For point geometry there is another way of reading coordinates than for polyline/polygon             if shapeType.upper() == "POINT" or shapeType.upper() == "MULTIPOINT":                #this part works right                  else:                 #feature can have multiple parts - first goes iteration through parts                 partNum = 0                 partCount = feature.PartCount                 while partNum < partCount:                     part = feature.GetPart(partNum) #the output is Array of points                     pnt = part.next() #take first point from Array of points                          #iterate through all points in array                     while pnt:                         #for each geometry create new POINT obj and assign swapped Y, X. Then add vertices to ARRAY                         vertex = gp.CreateObject("Point")                         vertex.X = pnt.Y                         vertex.Y = pnt.X                         vertexArray.add(vertex)                         pnt = part.next()                              #If pnt is null, either the part is finished or there is an interior ring                         if not pnt:                             pnt = part.next()                             if pnt:                                 print "Interior:"                          partNum += 1                      newFeature = outRows.newRow()                 newFeature.shape = vertexArray       #assign ARRAY filled with points to shape field                 outRows.insertRow(newFeature)                                    vertexArray.RemoveAll() #clear ARRAY before processing new geometry                  row = rows.next()     except:         print gp.GetMessages()      * * * EDIT: In fact script doesn't work for polygons with more than one interior ring. So the problem is wider than I thought.   In polygon case, I've found that null point between exterior and interior rings should be inserted. But when `gp.CreateObject("Point")` is inserted, a point with coordinates (0,0) is added.


why gdaldem is not producing any result?

I have a geotiff file with class values (0, 1, 2, 3, and 4). I want to show each class as different rgb color. So, I created the text file (color_relief.txt) which contans the following:               0 55 78 94     1 98 23 64     2 112 35 99     3 34 67 72     4 78 250 60      Then I run the following code using python:               import subprocess     in_file =  'single_band.tif'     text_file = 'color_relief.txt'     gdaldem = 'C:\\Python27\\Lib\\site-packages\\osgeo\\gdaldem.exe'     out_file =  'result.tif'     subprocess.call([gdaldem ,'color-relif',in_file,text_file,out_file,'-exact_color_entry','-b','1'],shell=True)     in_file, out_file = None, None      Unfortunately, no result file is obtained. What is wrong with my code?


RuntimeError: Field is not editable when using InsertCursor on ArcSDE geodatabase with ArcFM installed?

We are running ArcGIS Desktop 10.1 SP1, and also have ArcFM installed. I have this simple code:               workspace = "C:\\my.sde"     arcpy.env.workspace = workspace          edit = arcpy.da.Editor(arcpy.env.workspace)     edit.startEditing(False, True)     edit.startOperation()          with arcpy.da.InsertCursor("C:\\my.sde\\dataset\\feature", ("Comments")) as icur:         try:             icur.insertRow(["Test comment"])              except Exception as e:             print e          edit.stopOperation()     edit.stopEditing(True)      I receive the very specific (/s) error: > SystemError: error return without exception set I've tried the same code on a different feature class in the same geodatabase and I get: > RuntimeError: Field is not editable. But I can't think of any reason why it's not editable. I can edit the data in ArcMap just fine. Any idea what could be wrong?


Exporting feature class into multiple feature classes based on field?

I have a feature class with over 2000 features, and I need to make them all individual features based on a field. I know there has to be a way to do this, but I just can't figure it out! Any takers?


Technique for splitting raster image into tiles

I have written a standalone application which renders a globe similar to GoogleEarth/WorldWind which is currently able to display raster imagery from WMS servers. The native geodesy of this application for rendering purposes is WGS84. The tiling system employed is similar to this: WorldWind tiling system I now want to add support for importing geo-referenced rasters (supported by GDAL) directly. I can successfully import and render world files which have a direct 1:1 mapping to my tiling scheme. I'm using the GDALBand ReadRaster method to read the raster into memory. The problem I am facing is that I am currently stuck at trying to figure out how to import rasters that do not map nicely to my tiling scheme (e.g a tif that has it's coordinates not match up nicely to any tile corner/boundary). I know WMS can deal with this as I can get it to render rasters with WMS that do not nicely match up to my tile system. It looks like it just pads everything out with a default colour. I'm interested to learn of possible techniques to deal with this problem. Will it require padding out the gaps? Do I need find the level which will result in tiles smaller than my raster and then split up the raster that way? This still results in the same question of what do I do with the corners and edges of the raster which are only partially covered by a tile.


Creating raster or vector raster from DEM point file?

i have a point shape of 75.000 elevation points in a regular 5 m grid. We now want to create a polygon grid with the elevation points as "centroids". Unfortunately, all attempts to do so fail: I first thought to create a raster from the point grid, and then vectorize the raster to get my polygon grid. Bu when i create a raster image from the points, the cells are created with the points representing the corners of this cell. So, how to create a raster image or polygon grid from regular points, where those points represent the centroid ?


Geoserver in LifeRay

Hi i want to use geoserver+openlayers in LifeRay portlet. My main question its how to do this? I mean how to include geoserver in liferay, how to open geoserver's admin panel in liferay. Next question its how to use deafult geoserver's css. When i create simple html page i use               <link href="http://localhost:8080/geoserver/openlayers/theme/default/style.css" type="text/css"/>      But in LifeRay all css gonna be include in file liferay-portlet.xml can someone say how to add this css in this file? Next question: how to use wms? In html i use this               layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",         "http://localhost:8080/geoserver/wms", {layers: 'cite:filedata', transparent: true, format: "image/png"});      I gonna change this link to wms to use this in portlet? And final question: i try add OpenLayers.js in layfray-portlet.xml but after deploy my portlet i dont see any map controls on the page just empty DIV. this is part of liferay-portlet.xml               <portlet>      <portlet-name>MyGreeting</portlet-name>      <icon>/icon.png</icon>      <instanceable>true</instanceable>      <header-portlet-javascript>/js/jquery.min.js</header-portlet-javascript>      <header-portlet-javascript>/js/OpenLayers.js</header-portlet-javascript>      <footer-portlet-css>/css/main.css</footer-portlet-css>      <footer-portlet-javascript>/js/main.js</footer-portlet-javascript>      <css-class-wrapper>MyGreeting-portlet</css-class-wrapper>     </portlet>      That what i get. ![enter image description here](http://i.stack.imgur.com/zWS2I.jpg) Im foget say about one thing. I see a error in firebug with this text:               localhost:8080/poller/receive error 404 Not Found      Anyone have ideas?


How to calculate the bearing of a building (ArcGIS)

How is it possible to get the main bearing of buildings by floor plan? I want to have a building (by ID) and it's main bearing (e.g. E/90° or W/270°). The idea is to change the polygon-feature class into a line-feature class. Then I can calculate the lengths of each side. I can also calculate the bearing of each side. Buildings with a more complex floor plan I planned to cumulate the side's lengths on the bearing. The problem is that one building with four parallel sides get four different bearings because of the starting point for the bearing-calculation (see image). Furthermore the calculation doesn’t always start at the same end of a line. ![Little Sketch](http://i.stack.imgur.com/U2R5u.png)


Are there any "highly customizable" GIS platforms?

I'm new to this site which I find useful and refreshing until now. And to my question ( WARNING: it's a bit long, so you can skip right to the question two paragraphs down). I was educated in GIS using ArcGIS (Desktop and Workstation) and researched with it with (very) short peeks at MapInfo and uDig . During that time, I was satisfied with the program as I used relatively small databases and didn't do a lot of repeat tasks and ArcGIS has a lot of cool tools to analyze scientific data. For two years now, since graduation, I been working in a company which is in a whole different scale. I deal with huge databases, doing relatively "simpler" tasks, but moreover they are composed of repetitive tasks (I do a series of simple tasks once a week to the whole database). During this time, I've used AutoCAD (as a lot of our data is drawn using AutoCAD) a lot and grew to appreciate it a lot – The greatest advantage is that using the LISP Programming language and using system variables you can control a whole lot of the settings – whether it concerns customizing the default value for a tool, eliminating the use of dialog boxes in the program, or options to script the automatic opening and manipulation of drawings. Now, when I get back to the ArcGIS, I get frustrated: Python is a great language, but ArcGIS users can't manipulate default values, can't eliminate the use of certain shortcut keys, can't script the use of MXD's and more and more as I move along (Oh, I'm using ArcGIS 9.3.1, I heard 10.0 is a bit better but still). The Documentation around the Tools is very shallow (The Days of ArcDoc are long gone). I'd say the problem is probably with ArcGIS, except I know that with MapInfo and uDig the situation isn't better (and even worse) **Question:** And now I'm wondering – Are there any GIS platforms out there, free or not, that have this high level of customizing, or am I doomed to frustrated manual work? I prefer platforms with a good UI along the scripting options, but that's not a must. My company will probably stay with ArcGIS, but by answering you'll probably make one GIS analyst very happy and probably a lot less frustrated.


Snapping points to lines in ArcGIS Desktop and automate using VBA?

I use ArcGIS Desktop and I want create a network with a point feature and a line feature. I need my point features to be on the line features so I should do Snap point to line. However, I do not know how do it in ArcGIS, and then automate it with code for this in VBA.


How to unit test ArcObjects with Mocking?

I'm a huge fan of unit testing, but still make use of a FGDB to grab features for running unit tests against when using the ArcObjects framework. Is anyone successfully using mocking against thinks like IFeature, IGeometry, IWorkspace etc. If so, I'd love to see some examples of how you're doing it. I don't really care about what **mocking framework** you use, just seeing how you're doing it would be greatly appreciated. The problem I see is that you're having to slice and dice between so many interfaces on the same object, that the overhead of creating a representative mock object would be huge.


Does ora2pg support the SDO_GEOMETRY spatial type?

I've been searching the net up and down for days now and can't find a definite answer to this question, neither on google nor on the official page (http://ora2pg.darold.net/). Does ora2pg support Oracle's SDO_GEOMETRY spatial type? If I run ora2pg on an Oracle test table I get an output like               CREATE TABLE platzerl2 (             objectid bigint NOT NULL,             name varchar(40),             class varchar(25),             st varchar(2),             stfips varchar(2),             placefip varchar(5),             houseunits bigint,             pop2000 bigint,             pop_class integer,             arealand double precision,             areawater double precision,             shape SDO_GEOMETRY,             se_anno_cad_data bytea     );      Clearly SDO_GEOMETRY should read something like GEOMETRY, Postgres/PostGIS's spatial type. So, is SDO_GEOMETRY unsupported or am I doing something wrong?


Add-in caching in ArcMap? How to clear the cache?

When I install new version of Add-in to ArcMap, it appears correctly in Add-in manager but actual binaries are still the old version. It _mostly_ helps to restart ArcMap. But restarting every time is very slowing for add-id development. I have found this similar question. There is discused some Assembly cache. Is there any faster/simplier way to clear that cache or load new version?


Difference between planet_osm_polygon and planet_osm_point tables

What's the difference between the planet_osm_polygon and planet_osm_point tables? I find similar columns in both tables.


Can X-Ray for ArcCatalog be used without Excel? Our organization went with Libre Office as a budget savings move. Calc in that suite can read/write .xls files, but X-Ray appears to require Excel itself (presumably it's calling Excel.exe). Thanks.


Help with running this ArcGIS AddIn for Parsing AIS Shipping Data to GDB?

I was wondering if someone could try the same Add-In with the same data and see if they have an error. I have downloaded the 'AIS Data Handler Pre- Processor' (ConvertAIDtoFGDB_Installation_20120614.zip) from NOAA here http://marinecadastre.gov/AIS/default.aspx. The input is a file with extension .gnm containing only the following three AIS NMEA code strings (should be two points):               !AIVDM,1,1,,B,177KQJ5000G?tO`K>RA1wUbN0TKH,0*5C     !AIVDM,1,1,,B,15MW3r0000rTqtVFWeuKPTrl28?D,0*2E      I am running ArcMap 10.1 at the Basic license level. Drop the AddIn directory in the ArcMap Bin directory and then open ArcMap. In ArcMap, go to Customize->Commands Tab and look for 'AIS Data Handler'. Drag the 'ConvertAISToFGDB' to a toolbar. Clicking the button prompts for a directory, presumably filled only with the .gnm file described above. Beyond this point I get no response, the program just stops (no errors or prompts, etc.).


set popup widget priority in flex 2.5

I have several objects showing but they are ordered in my config.xml file with the highest priority on top. Still when I pick a point object that is near a line object it always gives the popup for the line.   I am learning that it is not the order in the mxd that has anything to do with the order in the web display or the published service,   The order in the config.xml does determine the order of the layers (not the sublayers).   1\. What determines the order for object selection/mouse pick when there are more than one poup configured?   2\. Has anyone successfully manipulated the order of the layers in the service?


How to add longitude / latitude to a world map in Mapinfo professional?

I am a novice in Mapinfo Professional. I have imported a shape file of the world map into MapInfo. It's projected as Lambert azimuthal equal-area projection (ETRS89). Is it possible to show the longitude / latitude as well? After what I have read in the forums, I am guessing I could do something with Grid maker or grid tools? I can't find any specified steps for this requirement. Please advise, thank you!


Updating matplotlib using OSGeo4W - FOR BEGINNERS

This question has been asked, but I can't seem to find an answer suitable for a non-computer programmer. A link would be great, or a quick 'how-to'. I updated to Dufour (2.0.1) and have run into a problem where the python plugin 'matplotlib' requires 'dateutil'. Message boards have said I can get this by installing 'matplotlib' through OSGeo4w. A) Is this true? and B) If so, how would I do this? Thanks, and sorry for the beginner's question.


GRASS 6.4.3 installed with QGIS not working

I'm new to QGIS and GRASS. I'm trying to do an image classification and it seems that the method I need is not within the GRASS toolbox in the QGIS . So I decided to use the standalone GRASS version that got installed when I installed QGIS. I created a new project mapset and region and I was able to import the images and create an rgb composite using r.composite - However I'm not able to display them. I have the images activated (with the check box) click on the "display map" icon but nothing happens. When I move the cursor over the map display window, the coordinates showing are correct if I use the querying tool the command says d.raster fail. If I check the region parameters with g.region it gives me the correct region of my study area/ image. I re- created the project several times, save it, open it again, and I still have this problem. Even when I click on the Icon next to the image name to check the properties nothing happens...the histogram of the image is empty. If I extract the raster statistics it gives me an output- but with a d.raster fail error as well. I can open the images and do operations with the GRASS tools within QGIS so it seems to be something with the standalone version. Does anyone knows what is going on? Any recommendations? Thanks!


PostGIS 2.0 ST_Split rounding errors when splitting line with point

My apologies for the bad title; I couldn't think of anything more descriptive. I have been testing `ST_Split` with a dataset, and found that even with points that are supposed to be exactly on a line (found by `ST_Line_Interpolate_Point`) often the line doesn't get split.               select ST_AsText(ST_Split(ST_GeomFromText('LINESTRING(0 0, 100 100, 200 200, 400 400)'), ST_Line_Interpolate_Point(ST_GeomFromText('LINESTRING(0 0, 100 100, 200 200, 400 400)'), 0.2)))      Result:               GEOMETRYCOLLECTION(LINESTRING(0 0,80 80),LINESTRING(80 80,100 100,200 200,400 400))      Which is as expected. Now I introduce some decimals:               select ST_AsText(ST_Split(ST_GeomFromText('LINESTRING(0 0, 100.123456789 100.987654321, 200 200, 400 400)'), ST_Line_Interpolate_Point(ST_GeomFromText('LINESTRING(0 0, 100.123456789 100.987654321, 200 200, 400 400)'), 0.2)))      Result:               GEOMETRYCOLLECTION(LINESTRING(0 0,100.123456789 100.987654321,200 200,400 400))      Stripping some decimals:               select ST_AsText(ST_Split(ST_GeomFromText('LINESTRING(0 0, 100.123456 100.987654, 200 200, 400 400)'), ST_Line_Interpolate_Point(ST_GeomFromText('LINESTRING(0 0, 100.123456 100.987654, 200 200, 400 400)'), 0.2)))      Result:               GEOMETRYCOLLECTION(LINESTRING(0 0,79.6558670241487 80.3434026298966),LINESTRING(79.6558670241487 80.3434026298966,100.123456 100.987654,200 200,400 400))      Nearly all records in my dataset have a lot of decimals (which I think the problem is), meaning NONE of my lines get split, even though the point is supposed to be exactly on the line. Is there any way to work around this (quickly; I have to split 300k lines like this)? Preferably without modifying my dataset by using `ST_SnapToGrid`? I'm Using `POSTGIS="2.0.3 r11132" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012"`


How to add ArcObjects SDK into Visual Studio Express 2013?

I have just installed the ESRI SDK from the 10.0 installation Disk and downloaded the Visual Studio Express 2013 and I'm trying to work through the ESRI Walkthrough named "Building custom UI elements using add-ins". ( http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Walkthrough_Building_custom_UI_elements_using_add_ins/0001000001ms000000/ ) I am looking forward to using this new Add-in format of customization, but am struggling to overcome the transition from the easy to use VBA Editor to the visual studio IDE. My hurdle right now is in the walkthough it shows templates in the 'new project' dialog for ArcGIS and various options for ArcMap Add-In and such. In the Visual Studio Express dialog these options aren't showing up. I guess I was expecting that when the SDK was installed they would show up here. Can anyone direct me on how to get those comparable templates to show up in Visual Studio Express 2103? Here is a screenshot showing the differences ( red arrow of the ESRI templates, and blue circle of my current options through VSE2013) ![enter image description here](http://i.stack.imgur.com/Y2tQ2.png)


Open Source Alternatives to Erdas ATCOR

I have been using Erdas ATCOR for atmospheric correction of ASTER imagery. What opensource options exist for atmospheric correction of ASTER Level 1B products? I'm primarily interested in converting registered radiance at the sensor to true reflectance values.


ESRI Raster Remap with Decimals

I have a requirement where the user would like to see the output value in a raster as a decimal. The user will input a series of ranges with a cost associated to them. For instance > 0-5, 1.20 > > 5-10, 2.7 > > 10-15, 5.32 These ranges map to values on existing raster. I want to create a new raster using the ReclassOp (or something else that I haven't found yet) that will map the ranges from the existing raster to the appropriate cost value. For example, anything from the initial raster within the 5-10 range will be mapped to 2.7 in the new raster. So my new raster ideally would have 3 values, 1.20, 2.7 and 5.32. When the user clicks on an area in the raster in ArcMap, he should see one of these 3 values (1.20, 2.7 and 5.32) instead of the integer value (1, 3, 5). This is my current code-               INumberRemap remap = new NumberRemapClass();     remap.MapRange(range.MinValue, range.MaxValue, (int)Math.Round(range.Value));     IReclassOp op = new RasterReclassOpClass();     output = op.ReclassByRemap(_source, remap, _mapNoData);      You can see that I have a value as a **decimal** (it is representing cost to the user), but INumberRemap.MapRange only accepts an int (currently I am rounding the double). I searched the documentation and could not find a good alternative. Is there a way to remap a range to a decimal value? **EDIT - Code with dividing the raster** My current problem is that this outputRaster (the return raster) has equivalent max and min values (equal to the min value). When I look at the Statistics - Band_1 property in ArcMap on that raster I see "Statistics have not been calculated".                   //Create the remap with ranges         INumberRemap remap = new NumberRemapClass();         foreach (NumberRange range in Ranges)         {             int value = maintainDecimals ? (int)Math.Round(range.Value * 100) : (int)Math.Round(range.Value);                  if (range.IsNoData)                 remap.MapRangeToNoData(range.MinValue, range.MaxValue);             else if (range.MinValue == range.MaxValue)                 remap.MapValue(range.MinValue, value);             else                 remap.MapRange(range.MinValue, range.MaxValue, value);                         }         IReclassOp reclassOp = new RasterReclassOpClass();              // Reclassify the geodataset         IGeoDataset reclassDataset= reclassOp.ReclassByRemap(_source, remap, false);              //Create const geodataset         RasterMakerOp rasterMaker = new RasterMakerOpClass();         IGeoDataset constDataset = rasterMaker.MakeConstant(100.0, false);              //Divide the reclassed raster to get decimals         IMathOp mathOp = new RasterMathOpsClass();         return mathOp.Divide(reclassDataset, constDataset);


FME explode cells

I want to ask if anyone knows how to explode a DGNV8 cell in FME workbench so that it is exported out as a single point to a mdb.I have read a little documentation and it seems I need to set the explode cells parameter to yes, the only problem is that I can't find this setting anywhere. I have tried to find the explode cell setting in fme workbench parameters, but have only come across "Expand named cells" and "Preserve Named Cell insert point" which does not give me the desired output. If anyone can help it would be really appreciated. Thanks


ArcGIS JS API: How to get the lat/long of the viewport vertices?

I would like to get the min lat, min long, max lat, max long of my viewport in ArcGIS JS API. Is this possible?


how to process GeoJSON data and create hive table for spatial analysis

i am using the esri-gis tool for hadoop for analyzing json data generated through esri product like argis. But i wanted to analyze spatial data from postgis table for which i made geojson formatted data from qgis. when i tried to create hive table using this data and using the esri gis tool for hadoop. data is not getting loaded. tried all ways but failed. is there any other way that i can follow and proceed.


How to clip Spot Image using shapefile in ENVi 4.7 or 5.0?

I have a Spot image that I would like to clip using the bounds of a town in shapefile format using ENVI 4.7 or ENVI 5.0. How do I do this?


Access all plugin from QGIS Modeler (Sextante)

I read that it is not possible to access to all of the installed QGIS plugins from the Graphical Modeler (QGIS 2.0.1). It would be great, in defining the model in the Graphical Modeler, if the user could also add algorithms from all the QGIS plugins actually installed. Is there a way to do this? For example, I am interested in the use of the following plugins:   * Add delimited text layer   * Point Sampling Tool   * Spatial Query


Finding coordinates of the image corner

I have a .bmp image with a map. For creating image i used a `Ingeo 4.4` and function `MakeImage()` What i know:   1. Height an Width of bmp image   2. dpi   3. Map Scale   4. Image Center's coordinates in meters. What i want:   1. How can i calculate some points of image (for example corners) in meters.   2. Or how can i change a pixel distanse to meters? What i do before: For sure i know image center coordinates in pixels:               CenterXpix = Widht/2;     CenterYpix = Height/2;      But what i gonna do to find another corners coordinates. Don't think that:               metersDistance = pixelDistance*Scale;      is a correct equation. Any advises?


How to get a native srs and declared srs of layer using gsconfig?

How we can get native SRS and declared SRS of existed layer in GeoServer? I'm getting up to layer name available in a particular store and work space. The code as follows               from geoserver.catalog import Catalog       cat=Catalog("http:// localhost:8080/geoserver/rest")       myResource = cat.get_resources(store='storeName', workspace='workspaceName')       layers = cat.get_layers(myResource)     for rss in myResorce:     print rss.name


Tilemill: Re-Export failed tiles after export

My Tilemill exports (MBTiles) tend to fail quite often lately... (Resume Tilemill MBTiles export after crash a bounty is waiting for anybody who helps me there btw ;-) ). We kind of solved the problem (at least a bit) by adding more RAM to our machine... But still... after an export of a quite small sample area I get the following output:               [3h 57m 23s] Part(1/1) 100.0000% 411.9k/411.9k @ 79/s | 0s left | ✓ 411.6k ■ 39 □ 0 fail 225      So I have 255 failed Tiles. I also have my "log" file cause I started the export adding a `--job` parameter. In the `-failed` log file I can see the coordinates of the failed tiles... **Is there a way I can tell Tilemill to redo only those failed tiles?** Any help is so much appreciated! Thank you!


How to generate map tiles with TileStache and a custom projection

I would like to generate my own map tiles using TileStache and a custom projection. I have been struggling with this for quite some time and am hoping I can get some advice to get the tiles to generate correctly. This is what my TileStache configuration looks like:               "carto_proj": {         "provider": {                 "name": "mapnik",                 "mapfile": "/mapnik/carto_proj.xml"         },         "projection": "TileStache.Goodies.Proj4Projection:Proj4Projection('+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', [39135.76, 19567.88, 9783.94, 4891.971, 1], transformation=Transformation(1, 0, 0, 0, -1, 0))",         "preview":         {                 "lat": 0,                 "lon": 0,                 "zoom": 0,                 "ext": "png"         }     }      My Mapnik XML file starts out like this:               <Map srs="+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" background-color="#f0f8ff">          <Parameters>       <Parameter name="estimate_extent">false</Parameter>       <Parameter name="extent">-20037508.342, -10008754.171, 20037508.342, 10008754.171</Parameter>       <Parameter name="center">0,0,0</Parameter>     </Parameters>      When I go to the TileStache preview.html, I get the same tile (South East of 0,0) repeated over and over. ![resulting TileStache map preview](http://i.stack.imgur.com/xYhd6.png) I found this very good resource for generating map tiles: http://blog.kartena.se/local-projections-in-a-world-of-spherical-mercator/ . However, I am still unsure of what my resolutions and transformation should be. I am not sure if these are the only problems I have. I have read various documents on calculating map resolutions and settled on the simple formula of map units divided by pixels. Therefore, if my total X value is 40075016.684, and I want there to be 4x256 pixel tiles, then that's where my resolution in my configuration of 39135.76 came from. Finally, the transformation in the resource I link to above does not seem to have enough parameters for the current TileStache. Therefore, I pulled by transformation straight from the TileStache docs and honestly do not know what the 6 parameter values mean. To try to summarize this into initial questions: Does my calculation for my resolutions make sense? Can anyone help with the transformation? Does anyone have other suggestions? Thank you very much in advance. Scott


Iterating Intersect Between Dates for single and dual shapefiles of multiple polygons

I'm looking at day range overlap for an animal - to do this I'm looking to generate intersection polygons from the animal's range on day 1 to day 2, then day 2 to day 3 etc., from day 1 to the end of the study. I have both individual shapefiles for each date and a merged file where each day range is distinguished by date - whichever is easiest to iterate in modelbuilder would be ideal. When I attempted this iteration in model builder I clearly didn't correctly set up a means of defining the intersection to be between the two dates - as such it kept generating empty polygons. If anyone knows the proper way of setting this up I would be most appreciative. I've attached how I have modelbuilder set to individually calculate the intersects - I'd like to somehow iterate so that after calculating it for the pair shown, it would go on to calculate the intersect for 411-412, 412-413 and so on. I also have these individual features in a combined shapefile, but still have yet to figure out how to designate 2 rows to intersect polygons between and to then iterate it through the table to the last row. ![enter image description here](http://i.stack.imgur.com/iislh.jpg) I'm using ArcGIS 10.1 in case there are major differences between 9.3 and 10.1 with regards to this.


CartoCSS Performance Considerations?

Just wondering if anyone knows how many lines of code CartoCSS can handle before it starts to affect performance? I'm currently using CartoDB and have around 400 lines of code, but haven't noticed any problems yet.


List the tab/shp files properties within folders/sub folders w.r.t relative folder path

Currently i am using this command line **For /R "U:\01 My Proj" %f in (*.tab) do ogrinfo -al -so "%f" >>U:\New.txt** to extract all the tab file related information as a text.Instead of giving the path folder...is it possible to run this command w.r.t to the folder wherein which the bat file has been copied ? (Another thing is the sub folders name will have spaces ) What i am trying to do is..save this command as a bat file using notepad & want to run it different folders (like..i'll copy the bat file to the respective folder & execute it). Will /* in place of Path_folder work ? I've tried that too


passing tif image as input to openlayers code (wps implementation)

how to pass dem(tif) or raster layer as input to the openlayers ... //OpenLayers.ProxyHost = 'proxy.cgi?url='; OpenLayers.ProxyHost = "/cgi- bin/proxy.cgi?url="; //OpenLayers.ProxyHost = ''; var map, client, intersect, buffer; function init() {               map = new OpenLayers.Map('map', {         allOverlays: true,         center: [114, 16],         zoom: 4,         layers: [new OpenLayers.Layer.Vector()]     });          var features = [new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT(         'LINESTRING(117 22,112 18,118 13, 115 8)'     ))];   //here i need to pass my dem details values     var geometry = OpenLayers.Geometry.fromWKT(         'POLYGON((110 20,120 20,120 10,110 10,110 20),(112 17,118 18,118 16,112 15,112 17))'     );    //here i need to pass my dem as input          map.baseLayer.addFeatures(features);     map.baseLayer.addFeatures([new OpenLayers.Feature.Vector(geometry)]);          client = new OpenLayers.WPSClient({         servers: {             opengeo:               }     });          // Create a process and    it     intersect = client.getProcess('opengeo', 'gs:contour');         intersect.configure({         // spatial input can be a feature or a geometry or an array of         // features or geometries         inputs: {             //here i need to pass my dem as input             //we need to pass band,interval,boolean value ....         }     });          // Create another process which chains the previous one and execute it     buffer = client.getProcess('opengeo', 'JTS:buffer');     buffer.execute({         inputs: {             geom: contour.output(),             interval: '1000',             band: 'GRAY_INDEX',             boolean : 'true'         },         success: function(outputs) {             // outputs.result is desired contour interval on map                  map.baseLayer.addFeatures(outputs.result);         }     });      buffer = client.getProcess('opengeo', 'gs:contour'); buffer.execute({ inputs: { band: 'GRAY_INDEX',                   },         success: function(outputs) {             // outputs.result is a feature or an array of features for spatial             // processes.             map.baseLayer.addFeatures(outputs.result);         }     });          // Instead of creating a process and executing it, we could call execute on     // the client directly if we are only dealing with a single process:     /*     client.execute({         server: "opengeo",         process: "",         // spatial input can be a feature or a geometry or an array of         // features or geometries         inputs: {              },         success: function(outputs) {             // outputs.result is a feature or an array of features for spatial             // processes.             map.baseLayer.addFeatures(outputs.result);         }     });     */      }


Road Graph Export Empty QGIS

Exporting the results of a shortest path analysis through the Road Graph plugin in QGIS 2.0.1 results in an "empty" layer. After running teh shortest path calculator, I selected export --> new temporary layer. I select the coordinate system (WGS84 - UTM18N) Note in the photo, that a path on my roads vector layer is selected (red) by Road Graph, but the attribute table is empty. When I save this temporary layer permanently, the layer remains empty as well. Please send instructions on how to make the export work/another way to save shortest paths as separate shapefiles. ![enter image description here](http://i.stack.imgur.com/Dd8U9.jpg)


How to add and join Geodatabase Table to Feature Class in QGIS?

After finally figuring out how to open .gdb files from Arc 10 in QGIS, I need to join some tables to the spatial gdb coverages I've opened in QGIS. According to the colleague who converted the .gdb data to Arc10 for me, these tables are contained in the .gdb but I don't know how to access them - all the non-spatial files in the .gdb are greyed out when I go to open the .gdb in QGIS or in Finder. I get a long list of files contained in the .gdb that looks like: a0000000f.gdbindexes a0000000f.gdbtable a0000000f.gdbtablx a00000001.gdbindexes a00000001.gdbtable a00000001.gdbtablx a0000001b.gdbtable a0000001b.gdbtablx a0000001c.gdbindexes a0000001c.gdbtable a0000001c.gdbtablx a00000002.gdbtable a00000002.gdbtablx a00000003.gdbindexes a00000003.gdbtable a00000003.gdbtablx a00000004.gdbtable a00000004.gdbtablx a00000005.gdbindexes a00000005.gdbtable a00000005.gdbtablx a00000006.gdbindexes a00000006.gdbtable a00000006.gdbtablx a0000006a.gdbindexes a0000006a.gdbtable a0000006a.gdbtablx a0000006a.spx a0000006b.GDB_72_IsRetired.atx a0000006b.gdbindexes a0000006b.gdbtable a0000006b.gdbtablx a0000006b.spx a0000006c.G73multi.DestClassID.atx a0000006c.G73multi.DestID.atx a0000006c.G73multi.OriginClassID.atx a0000006c.G73multi.OriginID.atx a0000006c.G73multi.TopoRuleID.atx a0000006c.G73multi.TopoRuleType.atx a0000006c.GDB_73_IsExcepti.atx a0000006c.gdbindexes a0000006c.gdbtable a0000006c.gdbtablx a0000006c.spx a0000006d.G74multi.DestClassID.atx a0000006d.G74multi.DestID.atx a0000006d.G74multi.OriginClassID.atx a0000006d.G74multi.OriginID.atx a0000006d.G74multi.TopoRuleID.atx a0000006d.G74multi.TopoRuleType.atx a0000006d.GDB_74_IsExcepti.atx a0000006d.gdbindexes a0000006d.gdbtable a0000006d.gdbtablx a0000006d.spx a0000006e.G75multi.DestClassID.atx a0000006e.G75multi.DestID.atx a0000006e.G75multi.OriginClassID.atx a0000006e.G75multi.OriginID.atx a0000006e.G75multi.TopoRuleID.atx a0000006e.G75multi.TopoRuleType.atx a0000006e.GDB_75_IsExcepti.atx a0000006e.gdbindexes a0000006e.gdbtable a0000006e.gdbtablx a0000006e.spx a00000007.gdbtable a00000007.gdbtablx a00000008.gdbtable a00000008.gdbtablx a00000014.freelist a00000014.gdbindexes a00000014.gdbtable a00000014.gdbtablx a00000015.gdbtable a00000015.gdbtablx a00000016.freelist a00000016.gdbtable a00000016.gdbtablx a00000017.gdbtable a00000017.gdbtablx a00000018.gdbindexes a00000018.gdbtable a00000018.gdbtablx a00000019.gdbindexes a00000019.gdbtable a00000019.gdbtablx a00000024.gdbindexes a00000024.gdbtable a00000024.gdbtablx a00000051.freelist a00000051.gdbindexes a00000051.gdbtable a00000051.gdbtablx a00000051.spx a00000069.gdbindexes a00000069.gdbtable a00000069.gdbtablx a00000069.LOTLNK_LOC.atx a00000069.spx gdb timestamps I know in the ESRI world one would use ArcCatalog to access these files, but not sure how to proceed in QGIS. Any help would be greatly appreciated!


Can Bing base layers be used with the Mapfish / Geoserver print plugin?

After being able to solve most of my problems just be lurking, I find I now need to come into the light for this one. The headline is pretty explicit. I have been unable to use the mapfish print utility to generate my PDF's including the Bing base layers. For a live example, please visit http://gis.lhtac.org/safety_print . Steps to reproduce follow:                1.  Select a region.  Click on one of the colored areas.  I suggest district 2.      2.  Select a Jurisdiction.  A panel will pop with a list of road jurisdictions.  I suggest 'Grangeville'.       3.  Please observe the layers, including the Bing base layers, and our in-house WMS layers.  Also, observe the 'Print Map' button is now live in the Crash Statistics panel.      4.  If desired, drag a bounding box to select some of the indicated crashes. This will select some datapoints for a WFS layer derived from the Crash Location WMS layer data.       5.  Click on the 'Print Map' button.       6.  Observe the GeoExt print panel, and that the Bing Layers are shown, but possibly only around the edges.      7.  Zoom in once or twice and observe the Bing layer is now fully represented.       8.  Click the 'Create PDF' anchor in the tbox of the print panel.  Wait for a bit while the server thinks about it.  Presuming nothing has broken, a generated pdf will be offered for download.      9.  Open the pdf, and please observe the following:            A: the Bing base layer is missing.       B: our in-house WMS layers are shown, although at poor resolution.      C: If WFS selections had been made, they are shown, with the known filled polygon rendering bug.       D: Other artifacts are shown, pretty much as might be expected.       My best guess as to the cause of no base layer is that there is some unspecified problem using Bing with the Mapfish utility. I have been unable to find any reference to this, however, either as a bug, or as a terms of service issue. The second most likely problem is my config.yaml is incorrectly referencing the Bing servers. That section of the config.yaml follows: (The SE editor has mangled it slightly) hosts: \- !ipMatch ip: 127.0.0.1 port: 8080 \- !ipMatch ip: gis.lhtac.org \- !ipMatch ip: www.camptocamp.org \- !dnsMatch host: maps.live.com port: 80 \- !dnsMatch host: virtualearth.com port: 80 Thanks for looking.


Calling ArcGIS 10 geoprocessing method in FME 2011

I am trying to create an attribute index in a feature class in FME 2011. I couldn't find any trasnformer that does it. So I'm thinking may be I can use "PythonCaller" transformer to call "Add Attribute Index" geoprocessing method from ArcGIS. Is it possible? Here's the syntax I copied from ArcGIS Help menu: arcpy.AddIndex_management ("counties.shp", "NAME;STATE_FIPS;CNTY_FIPS", "#", "NON_UNIQUE", "NON_ASCENDING") Thank you in advance. Sam Thank you Mark and blah238. So, I intalled FME2012 on my machine and used python26.dll as my custon python interpreter and copied Mark's code. For Entry point, I entered the name of the class "MyIndexingScript". I'm getting the following error: > Python Exception : Object: Error in executing tool Error encountered while > calling method `input' PythonFactory failed to process feature               import fmeobjects     import arcpy          class MyIndexingScript(object):        def __init__(self):              self.featureList = []        def input(self,feature):            self.featureList.append(feature)            arcpy.AddIndex_management (self, "YORK_PARCEL_ID;PARCEL_GIS_ID", "PIndex", "UNIQUE", "ASCENDING")        def close(self):                    self.pyoutput(feature)


How to navigate the REST endpoints and retrieve Field information programatically

I'm adding a Dynamic Map Service to an ArcGIS Server JavaScript API map, and I need to get hold of each component layer and its fields, so I can run a query. See the sample ArcGIS Server services directory at http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer If you open this URL in a browser you can see the list of available **layers** (0,1,2) and each layer's **fields**. How can I retrieve the list of fields programatically, within a JavaScript function? The code snippet below shows how to retrieve the layer endpoints, but I can't see how to get to the fields. (One option is to add the layers as Feature Layers, but I'd prefer to avoid this if possible).               var url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer/";     var dynLayer = new esri.layers.ArcGISDynamicMapServiceLayer(url);     map.addLayer(dynLayer);          dojo.connect(dynLayer, "onLoad", function() {        var infos = dynLayer.layerInfos;        for (var i = 0; i <= infos.length - 1; i++) {            var layerId = infos[i].id;            var restEndPoint = url + layerId;            //restEndPoint is the layer's URL - how can I retrieve its fields?        }     });      Thanks, Steve (cross-posted to the ArcGIS Server forum)


Garmin etrex raster maps support

I currently use an excellent set of printed topographic route maps for mountain biking. I would like to scan the maps, georeference them, and upload the maps to a handheld GPS device. Does the etrex series (10, 20, 30) support raster maps? Can I georeference the JPEG image using open source software?


OpenLayers and GeoJSON - possible to create, modify and delete features?

I wondered if anyone has some OpenLayers GeoJSON code to read, create, modify and delete features (i.e. instead of using WFS-T)? This is how far I've come - I've no problem changing the pop-up to a html form to modify attributes, it's more the linking the create button to a pop-up to enter data and then catch the move feature event, and last a 'delete feature' button                                OpenLayers Example                                        var lon = 11.967;         var lat = 57.7;                    var osm = new OpenLayers.Layer.OSM("Open Street Map");          var trees = new OpenLayers.Layer.Vector(       "Träd",{         protocol: new OpenLayers.Protocol.HTTP({         url: 'postgis2geojson.php?geotable=trad&geomfield=wkb_geometry&fields=ogc_fid,%20plats,%20tr%C3%A4dnummer,%20art',         format: new OpenLayers.Format.GeoJSON({           internalProjection: new OpenLayers.Projection("EPSG:3857"),           externalProjection: new OpenLayers.Projection("EPSG:4326")})         }),         strategies: [new OpenLayers.Strategy.Fixed()]     });                      var toolbar = new OpenLayers.Control.Panel({         displayClass: 'olControlEditingToolbar'     });     toolbar.addControls([         // this control is just there to be able to deactivate the drawing         // tools         new OpenLayers.Control({             displayClass: 'olControlNavigation'         }),         new OpenLayers.Control.ModifyFeature(trees, {              displayClass: 'olControlModifyFeature'         }),         new OpenLayers.Control.DrawFeature(trees, OpenLayers.Handler.Point, {             displayClass: 'olControlDrawFeaturePoint'         })     ]);          var map = new OpenLayers.Map("map", {       projection: new OpenLayers.Projection("EPSG:3857"),       units: "m",       displayProjection: new OpenLayers.Projection("EPSG:4326"),       controls: [         new OpenLayers.Control.Navigation(),         new OpenLayers.Control.KeyboardDefaults(),         new OpenLayers.Control.PanZoomBar(),         new OpenLayers.Control.Scale(),         new OpenLayers.Control.Attribution(),         toolbar       ]     });          map.addLayers([osm, trees]);          map.addControl(new OpenLayers.Control.LayerSwitcher());          select = new OpenLayers.Control.SelectFeature(trees);          trees.events.on({       "featureselected": onFeatureSelect,       "featureunselected": onFeatureUnselect     });          map.addControl(select);     select.activate();          map.setCenter(new OpenLayers.LonLat(lon, lat).transform(       new OpenLayers.Projection("EPSG:4326"),       map.getProjectionObject()     ), 10);          function onPopupClose(evt) {       select.unselectAll();     }          function onFeatureSelect(event) {       var feature = event.feature;       var content = "<strong>" + feature.attributes.art          + "</strong> (Id: " + feature.attributes.trädnummer + ")";       popup = new OpenLayers.Popup.FramedCloud("chicken",          feature.geometry.getBounds().getCenterLonLat(),         new OpenLayers.Size(100,100),         content,         null, true, onPopupClose);         feature.popup = popup;         map.addPopup(popup);     }          function onFeatureUnselect(event) {       var feature = event.feature;       if(feature.popup) {         map.removePopup(feature.popup);         feature.popup.destroy();         delete feature.popup;       }     }      ` Thanks in advance


best practices for exception handling in ArcGIS .NET custom geoprocessing tools

I'm working on a set of C# GP tools for use both in Desktop and Server 10.1. The only soup-to-nuts treatment of writing geoprocessing tools in .NET appears to be Building a custom geoprocessing function tool. It does not cover what to do to handle exceptions. I see a few possibilities and want feedback. 1) In my tool's Execute() method, I can put my code in a try block, and in the catch I can augment the Messages by IGPMessages message.AddError(errorcode, errormessage). 2) I can include among my tool's output parameters an error code parameter and an error message parameter. In the Execute() method's catch block, I populate these parameters if an exception occurs. Then they are available to the client in its Result object. 3) do both. (1) While this seems sensible for Desktop use, it seems to suffer a problem if in Server the GP service is configured not to return messages to the client. (2) seems to suffer a problem in that I don't know of other tools that use this approach. I'm suspicious when I invent things myself... I want to make sure that the tool works correctly with the ArcGIS Silverlight API Geoprocessor task, which raises a Failed event if a task fails. What do I implement in .NET to make the task 'fail' correctly and gracefully? Thoughts or citations are appreciated.


Why is this simple arcpy script so painfully slow?

I have a simple arcpy script to update a field in a point shapefile with info from the polygon feature that it is within. It takes 9 minutes to do 100 points in arcpy but a spatial join in arcmap is instantaneous. I'm sure there is a quick established way to solve this problem. Can someone point me in the right direction?               import took 0:00:07.085000     extent took 0:00:05.991000     one pt loop took 0:00:03.780000     one pt loop took 0:00:03.850000     one pt loop took 0:00:03.791000               import datetime     t1 = datetime.datetime.now()     import arcpy     t2 = datetime.datetime.now()     print "import took %s" %  ( t2-t1)     #set up environment     arcpy.env.workspace = "data\\"     arcpy.env.overwriteOutput = True          desc = arcpy.Describe("parcels.shp")     ext = desc.Extent     extent = (ext.XMin,ext.XMax,ext.YMin,ext.YMax)     t3 = datetime.datetime.now()     print "extent took %s" %  (t3 -t2)     fc = arcpy.CreateRandomPoints_management("", "malls.shp", "", ext, 100, "", "POINT", "")     arcpy.AddField_management("malls.shp", 'ParcelID', 'LONG')          rows = arcpy.UpdateCursor('malls.shp',"","",'ParcelID')     for row in rows:         t4 = datetime.datetime.now()         pt = row.Shape.getPart()         for polyrow in arcpy.SearchCursor('parcels.shp'):             t6 = datetime.datetime.now()             poly = polyrow.getValue('Shape')             if extent[0]<pt.X<extent[1] and extent[2]<pt.Y<extent[3]:                 if poly.contains(pt):                     print "works"                     row.ParcelID = polyrow.Parcels_ID                     rows.updateRow(row)                     break #we can stop looking for matches since             t7 = datetime.datetime.now()             "a full poly loop took %s" % (t7-t6)         t5 = datetime.datetime.now()         print "one pt loop took %s" % (t5-t4)               print datetime.datetime.now() -t1


Multithreading with ArcObjects

I am getting some weird errors while trying to implement multithreading with ArcObjects. I am trying following things on per thread basis: 1) Open SDE Workspace   2) Open Feature class   3) Perform Icursor Eventually, It fails with some errors like: "Memory could not be read or write" or "AccessViolationException".   Looks like there are some memory leaks (though I don't know exactly where). For more details please refer to the code below:               foreach (string featureClassName in settings.FeatureClassNames)       {                   Thread thread = new Thread(new ParameterizedThreadStart(ReadFeatureClass));                   thread.ApartmentState = ApartmentState.STA;                   object[] parameters = CreateParameters(featureClassName);                   thread.Start(parameters);       }           private void ReadFeatureClass(object parameters)           {               Settings settings;               string featureClassName;               ExtractParameters(parameters as object[], out settings, out featureClassName);              IFeatureWorkspace featureWorkspace = OpenFeatureWorkspace(settings);              ITable featureClass = featureWorkspace.OpenTable(featureClassName);               Marshal.ReleaseComObject(featureClass);               Marshal.ReleaseComObject(featureWorkspace);                     }                  private IFeatureWorkspace OpenFeatureWorkspace(Settings settings)           {               IWorkspaceFactory workspaceFactory = new SdeWorkspaceFactory();               IPropertySet connectionProperties = new PropertySet();               connectionProperties.SetProperty("SERVER", settings.Server);               connectionProperties.SetProperty("INSTANCE", settings.Instance);               connectionProperties.SetProperty("USER", settings.User);               connectionProperties.SetProperty("PASSWORD", settings.Password);               connectionProperties.SetProperty("VERSION", settings.Version);                    IFeatureWorkspace featureWorkspace = workspaceFactory.Open(connectionProperties, 0) as IFeatureWorkspace;               return featureWorkspace;           }


Converting huge geotiffs to tilepyramid

I'm trying to convert a 20 GB LZW compressed geotiff to a tilepyramid using gdal2tiles. Unfortunately, gdal2tiles seems not to be able to handle this, after running it for 10 hours it still hasn't reached the first "dot" yet. I tried this with a smaller (1GB) file and it worked fine. My question now is, is there any other software that allows me to do this (commercial or open source)? One can create tiles from GlobalMapper, but I cannot load the 20GB file into memory.


Is it possible to install OpenGeo within Amazon Web Services - Free Tier?

I like to ask if it is possible to install OpenGeo within an instance of the Amazon Web Services - Free Tier.


How can I convert a csv file of WKT data to a shape file using QGIS 2.01

Is it possible to create a Shapefile directly from a csv WKT file in QGIS 2.01?               WKT     POLYGON(...)     POLYGON(...)      Save as shapefile doesn't seem to work. Thanks!


How to create 3D globe view with OpenLayers?

I want to create 3D view. and I am using OpenLayers. Is it Possible?


How to calculate Polyline length in kilometres without changing projection from WGS84 (using ArcObjects)?

I have Road (polyline) feature class and I wish to find those roads whose length are greater than 500 kilometre. The feature class projection is in GCS_WGS_1984 and I do not want to change the projection. Is there anyway to calculate length in kilometre through programming without changing projection?


Field calculator uses wrong fields when working with joined data

I am having an issue in qgis table joins. i have a joined a csv file to a sqlite database and common id is used for join. the join is displays correctly in attribute table. the attributes in sqlite file is **id** and the csv file has **id, building, surveyorid, surveydate**. I want to add the **surveydate** information to the sqlite data permanently. In the field calculator. i created a new field **survey_date**. the expression field is **"surveydate"** (field from csv file), the output preview displays the result correctly. The problem is on clicking ok, the new field( **survey_date** ) gets populated with values of **surveyorid**. I tried other cases and each time, the new field gets populated with values from the field that is before the field in expression, i.e. if i try with surveyorid, i get the building values.


Bulk Geocode 20 million records

Are there any free or reasonably priced databases for the US which can be searched and return latitude and longitude information?


GDALINFO - text output for folder of raster images

I want to compare projection infor for all tif in a folder. Can you use gdalinfo to oputput a txt file with detail for each tif (one File with all the info)


Blank Shapefile output?

When executing the following command string in the active browser, Qgis projects the triangle polygon and associated attribute table correctly. Upon reopening the shapefile in a new browser, the attribute table is lost and no polygon exists. Is the map registry update command incorrect prior to the 'writer' command, or is the writer command itself improper? Thanks for any clues.               from PyQt4.QtCore import *     from PyQt4.QtGui import *     from qgis.core import *          # create layer     layer =  QgsVectorLayer('Polygon?crs=epsq:4326&field=BOTTOM:integer(8)&field=TOP:integer(8)&field=K:integer(10)&field=R:integer(10)&index=yes', 'poly_temp' , "memory")     pr = layer.dataProvider()          # start editing     layer.startEditing()          # add the polygon     base = QgsFeature()     fields = layer.dataProvider().fields()     base.setFields(fields)     base["BOTTOM"] = "50"     base["TOP"] = "100"     base["K"] = "0.003"     base["R"] = "0.00005"          # Draw feature      poly1 = [QgsPoint(50,50), QgsPoint(25,30), QgsPoint(60,30)]     base.setGeometry(QgsGeometry.fromPolygon([poly1]))     ok, of = layer.dataProvider().addFeatures([base])     iface.mapCanvas().refresh()          # update fields     layer.updateFeature(base)     layer.updateFields()          # update extent of the layer     layer.updateExtents()          # finish editing     layer.commitChanges()          # add the layer to the canvas     QgsMapLayerRegistry.instance().addMapLayers([layer])          # write layer to file     writer = QgsVectorFileWriter("C:\Users\...\Base_Layer.shp", "CP1250", pr.fields(), QGis.WKBPolygon, None, "ESRI Shapefile" )


How to get schema locks in oracle spatial direct connect mode?

I have a geodatabase having relation classes, domains ,subtypes etc. When I am trying to open that featureclass in a multithreaded environment it often fails with error like   "Attempting to read proptected memory" or AccessViolationException I wonder if this is because of geodatabase, may be it is getting hold of all the schema locks, I making a direct connect to oracle spatial 10g and no ArcSDE is installed. Any Suggestions?


How do I export metadata to HTML format via ArcGIS 10?

In ArcGIS 9.3, it was easy to export metadata into an HTML format. In ArcGIS 10, it looks like everything is in XML format and that there's no easy way to convert the XML to HTML. Has anyone successfully exported layer metadata into an HTML format using ArcGIS 10?


reprojecting geotiffs to spherical mercator using gdalwarp

I would like to reproject raster images (tiffs+proj+tfw) files too "google's" projection using gdalwarp. From what I understand, google uses epsg:900913/epsg:3785. What I don't know is how to correctly state the source projection. I believe that UTM32N=epsg:32632. If I reproject using gdalwarp -s_srs epsg:32632 -t_srs:epsg:900913, would that be correct? If I open that file in global mapper, how do I adjust project and worldfile then? This is the content of my .proj file: PROJCS["AUT-UTM32N",   GEOGCS["GCS_WGS_1984",   DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],   PRIMEM["Greenwich",0.0],   UNIT["Degree",0.0174532925199433]],   PROJECTION["Transverse_Mercator"],   PARAMETER["false_easting",500000.0],   PARAMETER["false_northing",0.0],   PARAMETER["central_meridian",9.0],   PARAMETER["scale_factor",0.9996],   PARAMETER["latitude_of_origin",0.0], This is the .tfw file: 2.5000000000   0.0000000000   0.0000000000   -2.5000000000   550001.2500000000   5199998.7500000000   UNIT["Meter",1.0]]


Any python script to convert a geoPDF to a KML embedded with a jpg link?

I have many geoPDFs. I want to turn them into KMZ or KML+JPEG using a python script. Any suggestions? SEE CODE BELOW


How to write  code for downloading a file in ArcGIS 10?

I have an offline database which has lat & long coordinates. The functionality I need to provide is to have a (latitude, longitude) point which will have country and city in it. Once the user has selected the location, user shall be able to download the shape file to the user defined location. I am able to design the GUI but don't know how should I do the download. It would be real great if you guys can explain with examples as I am new to python. Or may be simple code. I have to run this on ArcGIS 10. The flow is like this:   * Select the country ,    * then select the city,    * create shapefile,    * then a button which can let the user download the shape file. I did try to implement http://code.activestate.com/recipes/496685-downloading- a-file-from-the-web/ but could not get through. Thanks


What is the the color gradient at borders called?

Many paper maps have an effect around the borders where there is a gradient from the darker color of the borderline to the lighter color of the area fill. What is this effect called? See http://www.wwu.edu/huxley/spatial/tut/cart/adobe_illustrator.htm#inset for an example. ![Image](http://www.wwu.edu/huxley/spatial/tut/cart/ai_files/ai_insetborders.jpg)


Leaflet Drag and drop to change existing markers

I'm working on a project where the user should be able to drag an image to a pre-existing marker and have the marker update color if the value of the marker (a value w/in the geojson) and image (a value w/in the img attributes) are the same. I was thinking I'd use jQuery ui's drag and drop to handle the dragging, but I can't figure out how I'd isolate the specific marker as the droppable area and check the value of that marker. When I inspect the markers in chrome, all I see is the div for marker pane, not any of the individual markers. So I'm lost as to how I'd access the markers w/ jQuery? Any ideas? Basically, I'm trying to replicate this functionality, but with geojson generated markers instead of the card slots.


Creating a New Shapefile from Joined Access Table

I'm dealing with a very large amount of polygons. Once I join the land use access table to the parcel shapefile, it takes forever for Arc to draw the polygons. I'm trying to select all residential polygons in Harris County, TX from the land parcels.shp joined to the residential table. Once the polygons I want are selected, I try to export these polygons to a new shapefile. I will not have to deal with any other from the land parcels. The problem is that Arc will create the residential shapefile I badly need for my project , but all it does is create the fields with no attributes in them. I'm trying to create the Shapefile by right clicking the parcels.shp and trying to export the selected features into a new shapefile. Any suggestions on why this is happening, and how to get a shapefile of the residential areas with the attribute polygons?


Algorithm for finding population for a given center point and radius in US

Here is what I have   1. The population data aggregated by zip code given by US Census. Here is what I am doing right now:   1. Reverse geo code the center point to find the zip code of the center point.   2. Associate a lat-long to each zip-code(by reverse geocoding, I know this will be error prone).   3. Find the lat-longs(zip-codes) which are inside the circle, using Geokit-Rails plugin.   4. Finding the sum of the data for those zip-codes(zip-code=zipcode of the center point or distance(between lat-long of the zip code and center point) < radius) and showing. Am I doing this right? Is there methods efficient than this to find the population? Is there any algorithm already available? I am using geokit-rails plugin for reverse geocoding and for finding the zip- codes(with associated lat-longs) within the circle. The problem with this setup is that the zipcodes cannot be actually represented by the lat-long,it is an area.So, I am not sure the lat-long pair given by Google Map API is actually lies in the center of the zip code or something like that. Also,for radius 0 to almost 2.4 miles radius,the population remains same with this setup. That is, even for a radius of 0.1 miles, it will show the whole population of the zip code.I am looking for a way to approximate this. I have asked same question in SO. Please have a look at this question also.


How do I get the domain from an OGRSpatialReference?

I would like to know what the projected bounds are for a spatial reference using OGRSpatialReference. Is there some way to use the GetProjParm method to get this information? An example of what I'm looking for can be seen as the "projected bounds" and "wgs84 bounds" on the following spatialreference.org page: http://www.spatialreference.org/ref/epsg/3786/


Help excel table not transferring to Arc correctly!

New to GIS and Ive been trying to figure this out for a while. I have an excel sheet with CT names such as 0128.03, 0128.04, starting from 0001.00 and up. Not all CTs have .01, .02 at the end just .00. anyways when I transfer it to a dbf and open it up in arc the field shows with no decimals. I did a custom format for 0000.00 but for some reason 0128.03 shows up twice and I was missing 0128.04. I realized the duplicate of 0128.03 actually was 0128.03999999 and should be 0128.04 theres others doing the same thing as well. I have no clue how to get 128.04 or stop the continous decimal. Do I format the cells a certain way in Excel? I need these values to be correct so i can join the CT field with another table.


How to transform World data from EPSG 4326 to EPSG 3857

I have tryed different opensource tools to transform a world data shapefile from 4326 to 3857 but I always have an error. Im not sure, but is it because of Antartica? I have tryed with GDAL and QGIS and both are unable to do it. Why is it so complicated and how to do it? Thank you. **EDIT: The .prj** GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]


spatial and spatiotemporal analyses

I have a dataset that consists of 247 mosquito traps placed in fixed positions and sampled weekly for 23 weeks. I also have dengue disease incidence data (indexed to home address) during the same time period. I would like to see if there is a spatial and spatiotemporal correlation between mosquito catch rate at each trap location and dengue case incidence. I have already tried Global Moran's I and Local Moran's I in R and SaTScan Multivariate space-time permutation. None of these seem to give me what I want. Am I looking at the right place and just doing it wrong or are there better analyses I can run? Thank you so much for the advice!! Best, Amy Green


How to run a custom Geoprocessing tool using no parameters?

I created a custom geoprocessing tool called "CreateCoverLayer". It has no input or output parameters. I have the following snippet of code, but get an error message due to the fact that the `Execute` method is looking for an array of parameters as the second input argument. Can I use this tool with no parameters, or is that not possible? Thanks!               IGeoProcessor2 gp = new GeoProcessorClass();         gp.AddToolbox(@"C:\TestToolbox.tbx");     gp.Execute("CreateCoverLayer", null, null);


Georeferencing image using QGIS?

I am very new at this and when I georeference an image in qgis, I get the same image georeference but rotate and elongated. I use 3 control points to georeference the image but whatever I do, I get the image with the same errors.


How to stack netcdf format raster layers in to one layer?

I have Cmorph precipitation data in nedcdf format and is 2 thousand in number. I want to stack all these layers in one to extract point values from layers for time series analysis. I tried R, python and GDAL but have not succeeded, please kindly help me thanks.


Assign a particular projection for un-projected raster/vector files in a folder/sub-folders

We are having 1000's of raster images/vector (shp,tab,dxf) files in a folder/sub folders. Is it possible to check the projection of those and if it is an un-projected one? WGS 1984 has to be assigned to all those files (projection of all the other files has to be retained). Yesterday, completed a task somewhat similar (yeah..to some extent) to this one - explained in this thread using the codes given below. I've executed this as a batch file and it worked perfectly. So I knew, by using gdalwarp and ogr2ogr we could achieve this. But don't know how to pass the conditions like check the projection - if there is no projection. Any suggestions ?               CALL "C:\Program Files\FWTools2.4.7\setfw.bat"     CALL "C:\Program Files\FWTools2.4.7\bin\setfwenv.bat"     For  %%f in ("*.shp",".*tab","*.dxf") do ogrinfo -al -so "%%f" >>Vector.xls     For %%f in ("*.tif","*.ecw","*.jpg") do gdalinfo -approx_stats "%%f" >>Raster.xls


Openlayers filter strategy on wfs deactivate problem

I have a filter control which works nicely. However, when I try to reset/remove the filter, I don't get the original features back. The debugger shows my features array as still only being the reduced number of features, yet shows the filter strategy as being inactive. I set up the strategy on layer instantiation like this:               this.strategies = {          bbox: new OpenLayers.Strategy.BBOX(),         filter: new OpenLayers.Strategy.Filter(),     };          // initialisation stuff here ...          layer = new OpenLayers.Layer.Vector(         this.layerName, {             projection: this.projection,             strategies: [                             this.strategies.bbox,                 this.strategies.filter,             ],             protocol: protocol,             styleMap: styleMap,         }     );      I set the filter like this:               filter: function () {              var olLayer = this.olLayer;         var attribute = document.getElementById             ( "layer-search-attribute" ).value;         var value = document.getElementById( "layer-search-value" ).value;         var type = OpenLayers.Filter.Comparison.LIKE;         var filter = new OpenLayers.Filter.Comparison({             type: type,             property: attribute,             value: value,         });              this.strategies.filter.activate();          this.strategies.filter.setFilter( filter );         olLayer.redraw();              // back to the map page         $.mobile.changePage( "#mappage" );     }, // end filter ()      And I remove it like this:               resetFilter: function () {         console.log("Removing filter on:", this.layerName );         var olLayer = this.olLayer;              this.strategies.filter.deactivate();           olLayer.redraw();                     // back to the map page         $.mobile.changePage( "#mappage" );     }, // end resetFilter ()      I've also tried `olLayer.refresh({ force: true })` without success. Can anyone help?


Add rectangle polygon

I have a polygon shapefile layer. I want to add a rectangle polygon (just like in Arcmap), and another one using the previous polygon edge. I need it to be accurate, my hands do not meet this condition. Maybe this draw will explain better: ![rectangle polygon](http://i.stack.imgur.com/BmoJwm.jpg)


How to implement stopovers in pgrouting?

I used to use Dijkstra to find the shortest path between two points. Now I have a shortest route, which uses a street forbidden to use because of internal rules (too slow due to shopping mall). Now I would like to add a stopover on an alternative road and use a two segments Dijkstra. Is this the best way or should I better work with a turn- restriction network? The latter allows to set the costs for the shortest path / the street in question higher as usual. The TSP is currently only implemented with Euclidian distance - this is not accurate enough for European street layouts.


ArcPy select and merge dropping records from table?

I'm working on a python script for ArcGIS using the arcpy module. I have ArcGIS 10.1 and Python 2.7 on Windows 7 machine and using Notepad ++ and IDLE to run it. The script selects specific records out of two large tables (polygon feature classes in a fgdb) based on select by attribute queries and then merges the two tables into one before buffering the polygons and moving on... The select query should return 25 records for schools and 39 records for preschools so that the merged table should contain 64 records. However, the output is inconsistent, although the data remains constant, and this happens whether I use the same lines of code or if I modify it slighty to change the workflow. I always get 39 records in the preschool table but sometimes I get 25 or 18 records in the schools table and sometimes I get 64, or 57, or 58 records in the merged table irrespective of whether there were 25 or 18 records selected into the school table that is being merged. It changes even when I run the script once and then again less than 5 minutes later but the most consistent number of records is 57. The missing records/polygons when they're missing are always the same ones from the schools table and I can't see anything that they have in common such as size or order in list... Also, when I change the workflow order, for example if I buffer the two tables individually and then merge the buffer, I only end up with the preschool buffers in the merged table and no school records. If I run it manually using the arctoolbox it works perfectly every time but I'd like to script it for regular updates in future. Any ideas? Here is my code:               print "Starting SCHOOL Analysis"          # Add feature layer     arcpy.MakeFeatureLayer_management(r"datapath/VW_VALUATION", "Valuation")          # Select School Improvements from VW_VALUATION (our rating database)     arcpy.Select_analysis('Valuation',outDir + "//" + "SchoolLand_py","""Improvement LIKE ('%SCHOOL%') OR Improvement2 LIKE ('%SCHOOL%')      AND NOT Improvement LIKE ('%CHURCH%')""")          # Add feature layer     arcpy.MakeFeatureLayer_management(inDir + "//" + "Schools_py.shp", "Preschool")          # Select Preschools from Schools_py     arcpy.Select_analysis('Preschool',outDir + "//" + "PreschoolLand_py","""TAGS = 'Preschool'""")          # Merge schools layers together keeping the distinction between schools and preschools     arcpy.MakeFeatureLayer_management(outDir + "//" + "SchoolLand_py","SchoolLand")     arcpy.MakeFeatureLayer_management(outDir + "//" + "PreschoolLand_py","PreschoolLand")          # Set local variables     SchoolAddTable = "SchoolLand"     SchoolAddField = "TAGS"          # Execute AddField     arcpy.AddField_management(SchoolAddTable, SchoolAddField, "TEXT")          SchoolAddexpression = "\"SCHOOL\""     arcpy.CalculateField_management(SchoolAddTable, SchoolAddField, SchoolAddexpression, "PYTHON_9.3")          School1 = outDir + "//" + "AllSchools_py"          arcpy.Merge_management(['SchoolLand', 'PreschoolLand'], School1)          # Create 10m Buffer of school land     arcpy.Buffer_analysis(School1,outDir + "//" + "SchoolLandBuffer_py","10 Meters","FULL","ROUND","LIST","TAGS")


delorme gps and delorme X map alternatives

We have a group doing field work and are having issues using delorme gps and delorme X Map![delorme gps pn 40](http://i.stack.imgur.com/8vLuf.gif) and Delorme X Map. Wondering if there is a way to connect the delorme GPS pn 40 to ArcReader / ArcExplorer in the field? All shape files used in the field are polylines ArcGIS 10.


QGIS startup error (symbol lookup error, undefined symbol) after system update

I'm using QGIS 2.4.0 on Linux Mint 16 MATE 64-bit. This afternoon I did a normal system update via apt-get update && apt-get upgrade followed by apt-get autoclean && autoremove. But then suddenly my QGIS stopped working. This is the error message I got               /usr/bin/qgis.bin: symbol lookup error: /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4: undefined symbol: _ZN10QSslSocket16staticMetaObjectE      I tried to uninstall (apt-get purge) & reinstall QGIS but still got the same error message Anybody knows how to fix this?


Editing PostGIS data in ArcGIS Desktop?

Quick question regarding editing PostGIS data in ArcMap 10.0. Far as I can tell, this can only be accomplished through third-party plugins like GISSquirrel or ST-Links. Does anyone know of an alternative way that omits third-party involvement? As an alternative, is it possible to edit remotely-hosted data served up in ArcGIS via a Geoserver WFS? Again, the research I've done indicates you can view the data in ArcGIS, but no edit capabilities. I have my data stored remotely in PostGIS and served through Geoserver. Of course, I'm trying to find a way that allows editing of the data within the ArcGIS environment. Well aware that I can do this in QGIS, just wondering why I can't find a solution for ArcGIS.


Openlayers not displaying WFS layer

First, I realize there are a number of very similar posts on this site and others, but none have resolved the issue I'm having. I have a layer I'm trying to serve via WFS in Geoserver/OpenLayers that simply will not display. The layer displays fine if served through WMS, but not WFS. I can also see that the layer is returned properly from the GET request, but again, will not display on screen. At first, I did have the cross-domain issue, but added the proxy script as a resolution. At that point, I could see the data was being returned accordingly in the XML, however, still wouldn’t display in the screen. My first guess was a projection issue, but no matter what resolution I tried (many), nothing would display the data. Reading the coordinates in the returned XML also indicated that the data should display correctly. Initially, the layer I was working with had a native/declared projection of EPSG:2232 (CO State Plane Central US Ft, NAD83). After many attempts, I finally just tried re-projecting the data to EPSG:900913, as that is what the map frame is projected to, thinking it should remove any issues regarding projection. Still didn’t show anything. I then added a simple point directly in the middle of the map frame which should also occur within the geometry of the layer I’m trying to load. To my surprise, the point loaded and is displayed on screen, but the other WFS layer is not. At this point, not sure what to think, but pretty frustrated. If anyone has any insight on this, please let me know. Code is below; returned XML showing layer loaded is below code. Thanks in advance...               <?xml version="1.0" encoding="iso-8859-1"?>     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">                                    <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.2.1/resources/css/ext-all.css"></link>


How to merge multiple layers to one layer using QGIS?

I've imported several shapefiles which where exported from an Mapinfo .tab. Several tab files are imported resulting in 20+ layers. Afterwards I want to export it to geoJSON; but I'm reluctant for selecting each layer and exporting it. Is there a way to merge all the layers to one using QGIS?


What is the source of horizontal and vertical striping in USGS DEMs?

When processing 30m and 10m DEM data downloaded through the National Map Viewer from the National Elevation Dataset, we noticed horizontal and vertical striping not only in the produced results, but in merely analytical hill shades of the raw DEMs. Does anyone know the source? If not the source, maybe how to remove these artifacts? These artifacts become **very pronounced** when using the DEMs to calculate Topographic Indices. These artifacts remain even after depression filling occurs. Below are images showing the striping in 30m and 10m data from watersheds in both Pennsylvania and Colorado, and a finished Topographic Index calculation showing the artifacts for a watershed in Syracuse, NY. Colorado - HUC8 - 10190004 - 10m ![Colorado - HUC8 - 10190004 - 10m](http://i.stack.imgur.com/fdXVi.png) Colorado - HUC8 - 10190004 - 30m ![Colorado - HUC8 - 10190004 - 30m](http://i.stack.imgur.com/9bIAr.png) Pennsylvania - HUC8 - 02040103 - 10m ![Pennsylvania - HUC8 - 02040103 - 10m](http://i.stack.imgur.com/4Hwc1.png) Pennsylvania - HUC8 - 02040103 - 30m ![Pennsylvania - HUC8 - 02040103 - 30m](http://i.stack.imgur.com/GQ0fF.png) Finished TI calculation for Onondaga Creek watershed in Syracuse, NY ![enter image description here](http://i.stack.imgur.com/vC5Yk.png)


Spatially join points to polygons in arcGIS

I am trying to join a point feature class to a gridded polygon feature class in arcGIS so that all the points are matched to the grid cell that they fall within. I would like to end up with an attributes table that contains the count of points that fall within each grid cell and the average, maximum and stdev value of all the points falling in each grid cell. I have multiple points falling within many of my grid cells. I thought that this could be achieved by using the 'join' tool in the 'joins & relates' option or the 'spatial join' tool in the 'Analysis' toolbox in arcGIS. Unfortunately, these tools do not give me the output that I am looking for. When I use a point layer with 20024 points as the join_feature, the count column in the output joined feature class exceeds this value (20203). This count column should equal the number of rows in the original point layer. I had wondered whether the tool was matching points to multiple grid cells if points spanned >1 cell, but apparently points do not have any width associated with them so this cannot be the problem. My grid was created using the 'create fishnet' tool and the boundaries of grid cells do not overlap. Any suggestions or advise would be much appreciated! Thanks.


Translating grid to USGS .dem in C# via GDAL

I am attempting to translate ArcInfo binary grids to USGS DEM format (.dem). I have installed the GDAL .NET bindings thru this build installer. I can get to GDAL in my C# add-in I am working on. However, it seems that I cannot create a USGS DEM:               Gdal.AllRegister();     GDAL.Dataset originalImage = Gdal.Open("C:\\65587895\\hdr.adf", GDAL.Access.GA_ReadOnly);     Driver demDriver = Gdal.GetDriverByName("USGSDEM");          int x = originalImage.RasterXSize;     int y = originalImage.RasterYSize;          Dataset dsDem = demDriver.Create("C:\\Data\\65587895\\foo.dem", x, y, 1, DataType.GDT_Int16, null);      Gives the error:               System.ApplicationException: GDALDriver::Create() ... no create method implemented for this format.      I thought the USGSDEM format was read/write...am I wrong on that? The formats list says that creation of USGSDEM is supported, but a run of `demDriver.GetMetadata(null)` to get the metadata from the USGSDEM driver results in no return of `DCAP_CREATE=YES`, only `DCAP_CREATECOPY=YES`, which makes me cringe, thinking that indeed the `GDALDriver::Create()` method is **not** implemented for the USGSDEM format. Any thoughts or experience with this? Any other thoughts on translating binary grids to DEMs?


Geoserver Clustering Problems

I have problems setting up a clustered Geoserver. So far got four instances (version 2.2.4) running on a ubuntu linux box with a shared data directory behind HAProxy. I use one of the geoservers to configure the cluster (master) and reload configuration in the other instances (slaves). In practice I often get errors when reloading configuration on the slaves. Only restarting each instance in the cluster distributed the configuration to all instances. It seems that i am doing something wrong. Has anyone made some experiences in clustering geoserver? EDIT: Thank you Brad and sorry for getting back so late. Here I provide you with some details: the cluster was set up according to http://www.tomcatexpert.com/blog/2010/07/20/basic-tomcat-clustering-grails- applications After installation a directory /var/lib/geoserver_data was added and in the startup scripts I set CATALINA_OPTS DGEOSERVER_DATA_DIR=/var/lib/geoserver_data -DGWC_DISKQUOTA_DISABLED=true -DGWC_METASTORE_DISABLED=true So all instances share the same data directory. So far so good. Until additional data is added: For adding data only one of the geoserver instances is used. Adding - lets say a postgis layer - works fine. I can see the layer in the preview and use it as expected. But when i go to the admin interface in of the other instances, hitting 'reload configuration' an error message greets me, saying: > java.lang.IllegalArgumentException: Settings already exist for workspace > 'abc' Removing workspace 'abc' leads to > "Settings already exist for workspace 'def'" and so on.


ESRI Javascript Web Application Hosted on Amazon Web Services

I have just deployed my first web application to Amazon S3. This web application is a simple web mapping app using the ESRI Javascript API and consuming a web map from ArcGIS Online. I have been having issues with this application because of the proxy page. According to the help, in order to use ArcGIS Online web maps, you have to set up a proxy page. I didn't do that and when I was developing the application, most components worked without issues in Chrome and Firefox. Lately though, I have noticed that the application, which supports editing, does not apply edits from Internet Explorer. The console gives an error message explaining that it is trying to reach a url through the proxy page and is not succeeding because the proxy page does not exist. As far as I know, S3 does not support this proxy page because it requires an application like PHP or ASP.Net. Has anyone had any experience with this? I am thinking my next step may be to try and deploy this web application using AWS Elastic Beanstalk instead. Has anyone had any luck with that?


Broken MSSQL provider in recent QGIS versions - has anyone experienced this?

I recently moved from QGIS 2.2 to 2.4.0 and in the process the MSSQL spatial data provider appears to have stopped working properly (behaviour is also the same with 2.5.0). QGIS will still connect to an MSSQL table and will display the geometry, however it is not possible to filter it with a query, the SRID is not being read from the `geometry_columns` table and more importantly it is not possible to commit any edits back to the database. I am running SQL Server 2012 - the `geometry_columns` table is present and populated correctly and all tables have integer primary key columns, etc. Has anyone else encountered this problem? I am a bit perplexed as I have never experienced any problems prior to updating to 2.4.0.


Problem Visualizing 3D Terrain Model - USGS DEM

I recently downloaded a GeoTIFF 1 arc second from the USGS National Map Viewer. I added the raster to ArcScene and attempted to visualize the data in 3D. I set the Base Height to Floating on a Custon Surface, changed the Resolution to that of the Original Surface (3612 rows and columns; 0.000278 cell size). However, when it's done processing, my DEM just looks a mess; there are giant spikes all through the data. I've tried downloading DEMS from other areas and repeating the process but I get the same result. What am I doing wrong? I suspect perhaps there are Null values but I'm not sure. Any help would be greatly appreciated.


How to use SAGA Kriging in Sextante for QGIS?

**Hello, I tried to use SAGA (Ordinary Kriging) via SEXTANTE in QGis. The Sextante log tells me the following problem. Does anyone have a solution for my problem? By the way I'm usually a SAGA user but I wanted to change to QGis.** Grid: [not set] Variance: [not set] Points: MOORHOF_LUFTENBERG_HERBST_Nuptake_Fert120 Attribute: NUPTAKE Create Variance Grid: yes Target Grid: user defined Variogram Model: Spherical Model Block Kriging: yes Block Size: 100.000000 Logarithmic Transformation: yes Nugget: 0.000000 Sill: 10.000000 Range: 100.000000 Linear Regression: 1.000000 Exponential Regression: 0.100000 Power Function - A: 1.000000 Power Function - B: 0.500000 Maximum Search Radius (map units): 1000.000000 Min./Max. Number of m_Points: [4.000000] - [20.000000] error: executing module [Ordinary Kriging] C:\Programme\Quantum GIS Lisboa>saga_cmd io_gdal 1 -GRIDS "C:\Dokumente und Einstellungen\user\sextante\tempdata\test.tif.sgrd" -FORMAT 1 -TYPE 0 -FILE "C:\Dokumente und Einstellungen\user\sextante\tempdata\test.tif" * * * ## ##### ### ### ## ### # ## ## #### # ### ##### ## # # ## ##### # * * * library path: D:\Programme\SAGA_Beta\saga_208\modules library name: io_gdal module name : GDAL: Export Raster author : O.Conrad (c) 2007 * * * go... Load grid: C:\Dokumente und Einstellungen\user\sextante\tempdata\test.tif.sgrd... failed error: Grid file could not be opened.


Map with custom tiles having uncommon EPSG

I've produced with mapnik my own tiles with EPSG:31256 on a shapefile. I've structured the tiles in a OSM-like tree: zoom/x/y.png, with zoom from 0 to 2 and, x y starting from 1:               tiles       ├── 0       │   └── 1       │       └── 1.png       ├── 1       │   ├── 2       │   │   ├── 2.png       │   │   └── 3.png       │   └── 3       │       ├── 2.png       │       └── 3.png       └── 2           ├── 4           │   ├── 4.png           │   ├── 5.png           │   ├── 6.png           │   └── 7.png           ├── 5           │   ├── 4.png           │   ├── 5.png           │   ├── 6.png           │   └── 7.png           ├── 6           │   ├── 4.png           │   ├── 5.png           │   ├── 6.png           │   └── 7.png           └── 7               ├── 4.png               ├── 5.png               ├── 6.png               └── 7.png      Tiles are 256x256 pixels and the tile at zoom 0 covers the entire shape, which is 7500x7500 meters (I used this dimension to set up scales). From zoom 1, tiles are splitted in 2 and so on. Map div element is 512x512 pixels. To display tiles, I would like to use OpenLayers XYZ layer, with my own `get_url` function, as described here:               function create_map () {         Proj4js.defs["EPSG:31256"] = "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs "              var proj = new OpenLayers.Projection("EPSG:31256");         var bounds = OpenLayers.Bounds(5000,216250,12500,223750);         var minZoom = 0;         var maxZoom = 2;              var map = new OpenLayers.Map({             div: "map",             allOverlays: true,             projection: proj,             maxExtent: bounds,             allowSelection: true,             scales: [7500, 3750, 1875],             units: 'm',             controls: [new OpenLayers.Control.PanZoomBar(),                        new OpenLayers.Control.Navigation()]         });              var layer = new OpenLayers.Layer.XYZ(             "my_tile_layer",              '/tiles/',             {                 maxZoomLevel: maxZoom,                 minZoomLevel: minZoom,                 getURL: get_my_url             }         );         map.addLayer(layer);              var center = bounds.getCenterLonLat();         map.setCenter(center, minZoom);     };          function get_my_url (bounds) {         var res = this.map.getResolution();         // Note, I've added +1 because I do not have x and y coordinates equal to 0.         var x = Math.round ((bounds.left - this.maxExtent.left) / (res * this.tileSize.w)+1);         var y = Math.round ((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)+1);         var z = this.map.getZoom();              var path = z + "/" + x + "/" + y + ".png";         var url = this.url;         if (url instanceof Array) {             url = this.selectUrl(path, url);         }         return url + path;     }      My problem is that tile retrieval is wrong: at zoom 0, I correctly load 0/1/1.png, but it is positioned at the extreme right of the map: I had to pan it to make it visible. I do not understand why, because my center variable is correctly set to (8750, 220000). If I zoom in I see nothing and I get not existent tile names such as 1/1/1.png. Could you please help me? Thanks in advance.


What does "Error when writing Schema: A unique destination featuretype name could not be generated for" mean?

I have a bunch of GML datasets which I need to import to Esri featureclasses. I am using the Data Interoperability extension for ArcGIS, which should support this. However when trying to import my features I get the following error: "Error when writing Schema: A unique destination featuretype name could not be generated for """ Thanks Here is a snippet of the code: - - - http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd" gml:id="zones"> - - - - inspireId UK_zone - - eng - - Teesside Urban Area - - - -


making choropleth maps using PostGIS Windows

i read an article on chicago tribune blog about making maps, it consist on "making choropleth maps using PostGIS, TileMill, Mapnik and Google Maps" on Mac environnement, my question is how we can make same thing on windows evironnement. i want to make a Side-by-side map comparisons like this Thx


Migrate in a new programming GIS language

The last five years I have been working with VBA and ArcObjects for developing a specific application within ArcGIS. That project that began around 2008-2009 carried out with VBA and ArcObjects which is not supported by ESRI anymore. So, I need to migrate in a new programming language and I am not sure which is the best for my case: Python, VB.NET, C# or Java? My aim is to develop specific planning applications within ArcGIS platform. What is the most easiest to learn taking into account that I have experience with VBA and ArcObjects? Which is the most powerful for developing complex GIS applications? Which has the best support? May I have your opinions please? Thanks DD


QGIS identify each layer type in legend i.e point polygon line

i am developing a qgis plugin, while i can get the the general type of layer i.e vector or raster using this code                   vectorCount =0     pointCount=0     lineCount=0     polugonCount=0     rasterCount=0     layers = self.iface.legendInterface().layers()     for layer in layers:         if layer.type() == QgsMapLayer.VectorLayer:             QMessageBox.information( self.iface.mainWindow(),"Info", "count %i"%(vectorCount) )             vectorCount=vectorCount+1         if layer.geometryType() == Qgis.Point:             QMessageBox.information( self.iface.mainWindow(),"Info", "count %i"%(pointCount) )             pointCount=pointCount+1     self.iface.mapCanvas().refresh()      how i can get more specific vector layer type such as point polygon line ?


Changing projection does not change map extent

I have a shape file with a UTM projection. I want to save the data to a new shape file with a lat/long projection for a mapping system that only can deal with lat/long projections. I open the UTM shape file in QGIS and then save my layer to a new shape file, specifying the desired projection. When the other mapping system tries to load the new shape file, the extent in the new shape file is still based upon the old projection, not the new projection. Can anyone help me figure out what is going on here?


Efficient raster sampling of billions of polygons (bounding boxes)

How can a raster be computed efficiently (in Python), given a set consisting of billions of bounding boxes (read sequentially from a file), and given that the raster values for each cell should give the number of overlapping bounding boxes? **For a 4000 * 4000 raster** I've timed numpy matrix creation:               $ python -m timeit 'import numpy' 'a = numpy.zeros(shape=(4000,4000))'     10 loops, best of 3: 51.7 msec per loop      Standard python matrix creation:               $ python -m timeit 'a = 4000*[0]' 'for i in range(4000):' ' a[i]=4000*[0]'     10 loops, best of 3: 218 msec per loop      So numpy is faster, but still 50 msec per loop, with one billion iterations, yields running time equal to about a year (0.05msec * 1000000000 / 60 / 60 / 24 / 365 = 1.5 years) So it's not an option to sample each polygon. What is a typical approach for this problem?


Does anyone know a function to determine if a Point exists within a polygon? Edit: I'm using C# with ArcEngine10.