Is there a function like XY-to-Line that calculates distance along a network for many XY pairs?

So:   I have a set of XY origins and a set of destinations. I know that XY to Line will give me the Euclidian distance between a given set of origins and destinations, and that an ODS cost matrix can return the distance to a given set of destinations for a given set of origins along a network. Unfortunately, an ODS cost matrix seems like a bad decision given the size of the data set I'm working with. So, I'm looking for a function that is exactly like XY to Line, but that will give me distance along a network between many sets of two points, instead of outputting Euclidian distance. Any ideas?    PS   Why does the size of my file factor into this? It seems to me that:   I am calculating the distance between (households of people on food stamps) to (retailers that accept food stamps). If I calculated the distance between every food stamp recipient in our sample (~55,000) to every retailer in our sample (700) for every month that we are concerned with (17), the calculations start to add up (~655 million). But if I only calculate the distance between the recipients (55,000) and the stores they actually shop at (about 5 per household), it gets a lot more managable, processing time-wise (~4.7 million).


How to implent a "maketrans" python function on field calculator

i'm traying to implent python string translate function at field calculatore http://www.tutorialspoint.com/python/string_translate.htm in order to fix hebrew imported from cad. here is the code -               def Ttxt (RefName):       from string import maketrans          intab = "asdfghjkl"       outtab = "שדגכעיחלך"       return trantab = maketrans(intab, outtab)          Ttxt( !RefName! )      Any sugestion about how to right this function ?


Failed to seed layer in GWC of GeoServer when Zoom Start is selected greater than 4 using a user-defined Grid Set

Everybody, I'm undergoing development on a application which is constructed by GeoServer and OpenLayers. Considering that there is a large set of layers (8 layer groupS and totally 121 layers) to display, we decided that user access the map in the cache way rather than dynamic generating. Because there are only 2 optional Grid Set in GeoWebCache from, I searched from google to create a new user-defined Grid Set 'EPSG:2326' which is aimed for HongKong, following are steps I did: 1, Newly added a Grid Set in 'geowebcache.xml' which is under path 'data_dir/gwc':                 <gridSets>         <gridSet>           <name>EPSG:2326</name>           <srs>             <number>2326</number>           </srs>           <extent>             <coords>               <double>806677.9759</double>               <double>802420.9858</double>               <double>8876817.5647</double>               <double>853384.7903</double>             </coords>           </extent>           <scaleDenominators>             <double>25000000</double>             <double>1000000</double>             <double>100000</double>             <double>25000</double>           </scaleDenominators>           <tileHeight>256</tileHeight>           <tileWidth>256</tileWidth>         </gridSet>       </gridSets>       <layers>      2, Added new optional Grid Set into layer group's XML config file which is under the path 'data_dir/sample_group' and named for 'sample_group.xml':               <entry key="GWC.gridSets">EPSG:4326,EPSG:900913,EPSG:2326</entry>      Finally, I go to the GWC Seed Form page to generate cache png, and seeding task can done successfully only on the condition that Stop Zoom is lower 4, otherwise will be failed and below is the related error message:               java.lang.IllegalStateException: Found no range bounds for z level 4: {0=[J@16a4cf2, 1=[J@1e1b0e7, 2=[J@2516dc, 3=[J@1000323}             at org.geowebcache.storage.TileRange.rangeBounds(TileRange.java:169)             at org.geowebcache.seed.SeedTask.tileCount(SeedTask.java:217)             at org.geowebcache.seed.SeedTask.doActionInternal(SeedTask.java:107)             at org.geowebcache.seed.GWCTask.doAction(GWCTask.java:76)             at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:36)             at org.geowebcache.seed.MTSeeder.call(MTSeeder.java:25)             at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)             at java.util.concurrent.FutureTask.run(FutureTask.java:138)             at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)             at java.lang.Thread.run(Thread.java:619)      I guess that means no Bound Box for Zoom Level 4, I'm now confused and hope anybody out there give me some ideas? Thanks a lot.


How to Display Pie Chart when clicking on point feature in map?

I want to display pie charts from MS SQL Server database data. When I click on a point in the map, I wish to see a pie chart over the point. Can you please tell me how to implement such pie charts? Do you know any map site that using charts?


Problems configuring geoext tree

I am facing some difficulties configuring properly my geoext tree. I'll appreciate if anybody can help me. When I try to open the "images" folder, the node stays rounding, trying to load something forever. Here is my code:               var DNI2008_dec = new OpenLayers.Layer.WMS("2008_DNI_dec",             "http://localhost:8080/geoserver/wms", {                 layers: "personal:2008_DNI_dec",                 transparent: true,                 format: format,                 tiled: true,                 tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom             }, {                 buffer: 0,                 displayOutsideMaxExtent: true,                 ratio: 1,                 opacity: 1,                 visibility: false             }         );          map.addLayers([DNI2008_dec]);              var LayerTree = new Ext.tree.TreePanel({         title: 'Map Layers',         renderTo: 'layers',         loader: new Ext.tree.TreeLoader({                         applyLoader: false                     }),         root: {             nodeType: "async",             text: "Layers",             leaf: false,             expanded: true,             children: [                 new Ext.tree.TreeNode({                     nodeType: "folder",                     text: "images",                     leaf: false,                     children: [                            new GeoExt.tree.LayerNode({                                text: "test",                                nodetype: "gx_layer",                                layerStore: mapPanel.layers,                                layer: "2008_DNI_dec",                                leaf: true                            })                     ]                 })             ]         }     });      (CORRECTING A MIS-EDIT)


Openlayers Vector Event Popup with Textbox

The Openlayers map here: http://www.dassh.ac.uk/demonstrations/valmer/demo5.html has an event to add a vector layer, plus creates a textbox on the page below. Ideally I'd like the click event to add the marker, plus display a popup with a textbox/textarea where the user can fill in information on the location. This would then be submitted to the textbox below. Can anyone help? Thanks Dan


Connecting line features and determining the length of the longest line

I have a line feature (see image) representing a river that I created using the Stream_to_Feature tool. The attribute table contains several records representing different lines - the problem is the longest line (easily distinguishable visually) is not represented as a single line in the table, it is actually made up of many smaller lines. The lines appear to be touching, although they do not cross through each other. How can I merge these lines and then determine the length of the longest line using ArcObjects or manual methods that I can convert to ArcObjects? An even better solution would involve getting rid of all of the tributaries and leaving me with just the river channel as a line. ![Line feature - river](http://i.stack.imgur.com/YYZVV.png)


Question about quantum gis, and importing csv point data

I'm trying to add some point data from a csv file (it's in decimal degree lat lon) and overlay over road data that I already have added. The problem is that I can't get it to line up. I'm sure I'm making some kind of mistake with the coordinate system, but I can't figure out what it is. The data appears to the left and down miles away from my road data. When I import the same data in arcgis, I have to choose GCS_North_American_1983_HARN as my geographic coordinate system to make it line up, but that does not seem to be an option in quantum gis. Any suggestions?


How can I access second (or even third) level attributes in a vector layer and add them to the attribute table?

I got some .dxf file containing buildings I need for my map. The file loads nicely into QGIS and I converted sucessfully to shape. I still can find the Information I need (the buildings height) in the element identify box. However, it is organized as some kind of second level attribute and I'm running out of ideas how to access the information (screenshot below). ![Object Identifier box showing how the attributes are organized](http://i.stack.imgur.com/FhSnC.png) In this example the only entry in the attribute table is "myid". How can I access second (or even third) level attributes in a vector layer and add them to the attribute table, so I can work with them? Best regards! EDIT: The structure with the sub attributes (a... and (A... already exists in the .dxf. EDIT2: The Attribute table currently only consists of one single field named "myid". ![AttributeTable](http://i.stack.imgur.com/Q6N0d.png) EDIT3: Hm… The categorys (a… and (A… are shown in the Identify box when querying the .dxf. This is what I wanted to say. But of course, you may be right… ![Identify results for the original .dxf](http://i.stack.imgur.com/efSOC.png) If this is rather the perimiter than a height field, it is useless to me anyway. Bad luck. Do you by any means know of a better way to convert .dxf to .shp creating a height field?


Relationships in ArcGIS Server 9.3.1

I am working on a viewer in which I would like to show two related feature classes. If I select a feature of the first one, the related features of the second one should be selected too. I found a script on the Esri Resource Center: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/fl_query_related.html My problem is that I can't get the relationship in de Mapserver. We run ArcGIS Server 9.3.1. I created a "Relationship class" in the database. This relation works fine in ArcMap but when I make a service of it, it disappears. Secondly I created a "Relate" in ArcMap, which worked fine there, but disappeared in the service. What is the solution to this problem? Is it possible to create a relationship with ArcGIS Server 9.3.1? The example server from the Resource Center uses ArcGIS SErver 10.


How many service instances is optimal?

What is the best number of instances? When I increase the number of instances the services will run faster?


`gdalbuildvrt` and selecting individual bands

I want to produce a set of VRTs (GDAL's internal virtual rasters) that comprise a re-arrangement of bands of a number of individual GeoTIFF files. Say I have my initial set of GeTIFF files, all having 4 bands:               file_01: band_01...band_04     file_02: band_01...band_04     file_03: band_01...band_04     file_04: band_01...band_04     file_05: band_01...band_04      And what I want to have is               vrt_01: file_01:band_01 file_02:band_01 file_03:band_01 file_04:band_01 file_05:band_01     vrt_02: file_01:band_02 file_02:band_02 file_03:band_02 file_04:band_02 file_05:band_02     vrt_03: file_01:band_03 file_03:band_03 file_03:band_04 file_04:band_03 file_05:band_03     vrt_04: file_01:band_04 file_04:band_04 file_03:band_04 file_04:band_04 file_05:band_04      My initial thoughts were:   1. Use `gdalbuildvrt`, creating an "file of files", but I don't think you can specify a particular band, just filenames   2. Use `gdal_translate` to create VRTs of the individual bands for each file, then proceed as in (1) above, but that looks like far too much effort. I'd like to avoid creating the XML file myself because I find that that is quite error prone and requires quite a bit of debugging (they can all have different extents, etc etc etc)


Labels on the QGIS WMS layers are not drawn according to the style definition

I have an issue regarding the styling of labels of WMS layers using QGIS server. I can't seem to get them to display how I want. What I did:   * create a QGIS project (2.2 on Mac) with a layer from a database   * style the layer, including the labels on QGIS desktop   * save project on the server (Ubuntu) to create the WMS What I get:   * my WMS layer, nicely showing up   * except for the labels that seem to use a default symbolization, whatever the changes I make in the project (understand big black labels) What I wished:   * control the size and maybe also the font of the labels. Is there a nifty parameter that I forgot somewhere or is the labeling engine not working propoperly with WMS? Any hints or similar experiences welcome.


gdal_rasterize -at function still won't capture covered pixels properly

I'm currently using the gdal_rasterize tool in bash. My code looks like this:               gdal_rasterize -l $(basename $file .shp) -burn 1  -a_nodata 0 -te -180 -90 180 90 -tr 0.1 0.01 -at -ot Byte $file $OUTPUT/rast_2.tif      I was hoping that the `-at` function would give a '1' burn value to any pixel touched by the input shapefile. However, this is what the comparison looks like: ![Areas not rasterized properly](http://i.stack.imgur.com/kEQ0Z.png) Is this the a problem with the -at ALL_TOUCHED function or should I be doing something differently to ensure that all areas are accounted for? Any help much appreciated


How to create lines from points pair coordinates with arcpy?

I've got some points pair coordinates (start and end points) which I have to transform into lines. Until now, I used an append of both the coordinates in a `pippo.Point()`, a `pippo.CalculateGeometry()` to define the geometry of each piont, and `pippo.append(defined geometry)` to identify the pair of points, and then PointsToLine to obtain my line. Because this is quite time expensive to do for hundreds of lines, I'd really like to know if there's a shorter way to do this, e.g. place starting and ending point of each line in different fields of a single table and import lines directly without passing for points geometry.


How to configure Proxy.cgi file for Geoserver On Tomcat?

I have a web map application in my local machine(windows xp and dont have IIS) and I have postgis data in Geoserver on Tomcat (Ubuntu). To get the WMSgetfeatureInfo, I have configured the proxy.cgi file in Geoserver (usr/lip/cgi-bin/proxy.cgi) and added my local ip address in allowedHosts = ['xxx.xxx.x.xxx', 'www.openlayers.org', 'openlayers.org', 'labs.metacarta.com', 'world.freemap.in', 'prototype.openmnnd.org', 'geo.openplans.org', 'sigma.openplans.org', 'demo.opengeo.org', 'www.openstreetmap.org', 'sample.azavea.com', 'v2.suite.opengeo.org', 'v-swe.uni-muenster.de:8080', 'vmap0.tiles.osgeo.org','www.openrouteservice.org'] and added the below line in my script.               OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";      but it throws an error in chrome console:               GET localhost:3890/usr/lib/cgi-bin/….…T%3Dapplication%252Fvnd.ogc.gml%26SRS%3DEPSG%253A27700%26X%3D682%26Y%3D284 404 (Not Found)       I dont know whether its right or wrong. Proxy.cgi should be copied in Geoserver or my machine? in which path? added my IP into allowedhosts is correct? Please anyone suggest me to fix this issue


What is proper bearing for plat ties to monuments?

I had a 'discussion' with an engineer about the proper way to describe a bearing on a plat (survey of land) that ties the plat to a known survey monument. He stated that it should be from the point of beginning (POB) of the plat to the monument, while I argued that you should start from the known point and go to the POB. His argument was that the POB is a known point. It may be to the surveyor, but the rest of us don't know the location of the nail or rod the surveyor found. I know it's just a matter of reversing directions, not a big deal, but is there a standard for this? Thanks.


Intersection of multi-polygons in postgis

How can I get the intersection of 3 multi-polygons in postgis? I have three geometry collection and I want a fourth with the result of intersection of the other three.               GEOMETRYCOLLECTION(MULTIPOLYGON(((-49.64435197 -29.23896786187647,-49.68688498 -29.290587315131337, etc etc)))          GEOMETRYCOLLECTION(MULTIPOLYGON(((-38.7333 -15.635996265940811,-38.706199999999995 -15.699596252308577,-38.6708 -15.749496241625828,-38.650999999999996 -15.790396232878372,etc)))          GEOMETRYCOLLECTION(MULTIPOLYGON(((-38.7333 -15.635996265940811,-38.706199999999995 -15.699596252308577,etc)))          GEOMETRYCOLLECTION(MULTIPOLYGON(((result)))      Thanks


Converting WKT to WKB

How can I convert a WKT string to a WKB byte[] in Java using postgis functions? I need to save that WKT string in a postgis database (geometry column. Thanks


export from .shp to .gpx and .kml fails

I've just upgraded to QGIS Dufour and I am having some problems with the exportation of a simple track from .shp to .gpx and .kml format. I imported from mi smartphone a .gpx track (SR WGS84 EPSG:4326), i converted it into .shp (EPSG:3857 in order to have it correctly projected over the google maps layer); I modified it and I finally need it to be exported into .gpx and .kml formats. For .gpx: I did the "Save as", chose GPX format, set the RS to EPSG:4326, wrote "GPX_USE_EXTENSIONS=YES" in the Data Source field and "FORCE_GPX_TRACK=YES" in the Layer field. Qgis says it all went ok (and it loads the track in the viewer and it looks fine), but when I load the .gpx track into my gps device I only see a straight line into the sea. For .kml: I did the "Save as", chose KML format, set the RS to EPSG:4326. Qgis says it all went ok, but when I load it in the viewer it looks just empty and in google earth I can see a huge red cross over Africa... and I was looking for a road in Sardinia. Can anyone help me, please? Thanks a lot!


How can I cache reverse-geocode results?

I'm implementing an Android application that needs to do some reverse- geocoding to resolve a geocoordinate to a city. What is the best way to cache this information on the smartphone so that I don't have to always call an online server to perform this reverse-geocoding?


How to copy table in ArcGIS for Desktop and keep same feature ID (objectID)?

What geoprocessing tool I can use to copy a table from SDE geodatabase to personal geodatabase, keeping the feature ID (objectID)?


How can I make a point buffer map on the web?

I am looking for a tool like Google Maps Engine Lite or Mapbox where I can draw a simple (buffer) circle around a point with a known diameter. **Are there any quick and easy web mapping tools to draw a single circle and share?** For example, someone on a forums says, "Show me what a 10 mile ban on kite-flying would look like?"


Euclidean Distance Function performed on unprojected data

I am looking to perform a simple multi-criteria analysis on a data set comprised of two criterion: occurence of wildfires and road accessibility. First, the project CRS was enabled with "on the fly" projection selected, as well as "meters" selected as the distance measure. Second the data was rasterized, then the euclidean distance was calculated using r.grow.distance in the GRASS functionality. The results show distance in distance degrees as opposed to meters, even though the project properties have been specified in meters. Is there anyway to perform this analysis so that the results are in meters?.


NoData Value = 0, problem when creating NDVI, Erdas

I try to create an NDVI from Landsat and ASTER satellite images using Erdas Imagine. In Erdas, the satellite images have a nodata value of 0. After creating an NDVI, the nodata value is still 0, but obviously there are also file pixels with the value 0 now (NDVI ranges from -1 to +1). So if I reset the NoData value to 0 (it is not done automatically), some pixels in my raster are missing since they are now classified as "nodata" Any suggestions?


List index out of bounds [-1] when making bioclimatic variables in DIVA GIS

I am working with climate data and I would like to make 19 bioclimatic variables which I can use for ecolgical niche modeling in Maxent. I am following this tutorial http://www.ccafs- climate.org/downloads/docs/Ramirez_Bueno- Cabrera_2009_tutorial_bcvars_creation.pdf (google: bioclimatic variables + Maxent) After I create the CLM files in DIVA-GIS, I go to data>climate>map and I receive this error: "List index out of bounds [-1]". Has anyone run into such an error and do you know the solution?


Save As in QGIS 2.4

I am trying to save edits to a raster file in QGIS, but;   1. When you edit a raster file and select "Save As"; no output file is generated.    2. My version is in Spanish; however "Save as raster layer" is displayed. Just as "Output" How do I properly save/export a raster in QGIS?


Census data 5-year estimate for the United States

I am looking to download demographic data 5-year estimate based on census tract for the whole United States. The census website has the information, however, it does not let me to select the whole country based on census tracts along with the variables. Could you please advise?


Error executing tool.: Layer "layer1" Unable to connect to map server

I am using the Configurable Javascript Viewer, and have only changed a couple of the configuration settings. One change I made was to use my own Export Web Map Task. In viewer.js, I changed:               printTaskURL: 'http://maps.evansvillegis.com/arcgis_server/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task'      I then saw this note in the readme.md in the proxy directory: > You will more than likely need a proxy page for printing and other large > cross domain requests. So, I set that up using the provided proxypage_net.zip files, proxy.ashx and proxy.config. In proxy.config, I added:               <serverUrl url="http://maps.evansvillegis.com"                matchAll="true"></serverUrl>      Then I made sure my viewer.js file pointed to the current proxyUrl:               esriConfig.defaults.io.proxyUrl = 'proxypage_net/proxy.ashx';      However, when I try to print, I am getting the following error in the response:               {"error":{"code":400,"message":"Unable to complete operation.","details":["Error executing tool.: Layer \"layer1\": Unable to connect to map server at http://maps.evansvillegis.com/arcgis_server/rest/services/BASEMAPS/BASEMAP_GOOGLE_WGS84_NO_FOOTPRINTS_BW/MapServer.\nFailed to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]}}      I have seen related posts: Secure Print Service Failed to Execute ArcGIS Online printing Unable to connect to map server? However, the provided information (mind you, limited) was not much help. **The 400 error - is this because my proxy is not setup correctly, or is there something wrong with my PrintTask service?** This is the default PrintTask that is configured with ArcGIS Server 10.2.1. The only other change I have made, is ensuring IIS users and the ArcGIS Server Account can access the ArcGIS Server directories. Any help appreciated! Viewer: http://maps.evansvillegis.com/viewer


Converting ASCII grid/NTF to SRTM/DEM

I want to use the Ordnance Survey Land-Form Panorama product in some software called Maperitive, which can read custom SRTM DEM files. The data is provided in the following formats: DXF [Contours] ASCII grid [DTM] NTF [DTM] https://www.ordnancesurvey.co.uk/opendatadownload/products.html (search for land-form) Can anyone recommend a free tool or toolchain (runs on Linux or Windows) that I can use?


Anyone built a custom GPFunction in ArcGIS10 and having closing issues?

I have a custom GP function in ArcGIS 10 written in C#. When the tool is run it takes ArcGIS about 5 minutes to close (as in the application closes but in Task manager ArcMap.exe and ArcSOCP.exe are still running). When closed ArcMap.exe will increase memory too about 170 - 250 MB. To ensure it wasn't my code I created a blank GP Function with no code in the Execute function and return and empty paramarray value. Ran the tool and ArcMap still took ages too close. I then opened ArcMap again and launched the tool but this time pressed cancel instead of go. ArcMap closed fine. So as soon the tool enters the execute method it seems to then take ages to close when the Execute method finishes. If I run one of the out of the box GP tools ArcMap closes fine. Anyone encountered the same problem?


Cannot replicate gdaltransform example

In the description of gdaltransform this example is given: > gdaltransform -s_srs EPSG:28992 -t_srs EPSG:31370 177502 311865   >  Produces the following output in meters in the "Belge 1972 / Belgian > Lambert 72" projection:   >  244510.77404604 166154.532871342 -1046.79270555763 If I try this I get               gdaltransform -s_srs EPSG:28992 -t_srs EPSG:31370 177502 311865       244422.238366377 165970.245450285 0      If I write the coordinates into a single point-shape, same result when applying ogr2ogr               ogr2ogr -s_srs EPSG:28992 -t_srs EPSG:31370 out31370.shp in28992.shp      Any ideas what I'm doing wrong?


What is the best way to mosaic 2 million files?

Trying to create 1 mosaic dataset from 2 million files. Would it be better to break the files into regions and then create regional mosaic datasets and then make a mosaic dataset of the mosaic datasets (does that make any sense?)? Or just slug it out and do one dataset of 2 million files? BTW the datatype is CIB


What are some examples of model-based upscaling of raster data?

Remotely-sensed raster data may be too fine-grained for many purposes. A typical approach to coarsen the grain is to upscale by reducing the resolution. If the data are continuous (e.g elevation, surface temperature) cells on the raster can be aggregated (and therefore reduced in number) by using a mean function. Or if they are discrete (e.g. vegetation) they may be aggregated using the mode of adjacent cells. Moving windows are a second example of upscaling. Here a "window" is slid across the raster and the cells under the window are replaced using some function of their values (e.g. using a mean or mode). I believe that _model-based_ approaches to upscaling will simplify a raster by adopting a more complex model of the raster (i.e. the cells and their adjacencies). Can anyone clarify my definition of _model-based_ approaches, and provide an example? Do the resulting "cells" even need to be regular, could they vary in shape and size? EDIT: To be more specific about what I mean by model-based upscaling. Here is an example of what I think _may_ be considered a model-based approach. Consider using a mathematical graph to represent discrete features on a raster. Then use some method to identify components of these features (i.e. groups of vertices). A Voronoi tessellation, for example, using the components as generators, could then be used to produce an irregular tiling that represents an upscaling of the original raster. ... I could give more detail here, but opt not to, as I am interested in mostly whether or not this would be considered a model-based approach to upscaling ... or alternatively how such operations could be described in generic terms. Is this merely a way of doing interpolation (as defined in an answer below)?


How to reproject shapefile using ogr2ogr

I have shapefile in EPSG:2834 and I want to reproject it into EPSG:4326. I am trying to use `ogr2ogr` in Windows; however, I get this failure output:               C:\Users\Nik\Desktop\Logan_Lines>ogr2ogr -t_srs epsg:4326 spans_4326 spans     FAILURE:     Unable to open datasource `spans' with the following drivers.       -> ESRI Shapefile       -> MapInfo File       -> UK .NTF       -> SDTS       -> TIGER       -> S57       -> DGN       -> VRT       -> REC       -> Memory       -> BNA       -> CSV       -> NAS       -> GML       -> GPX       -> KML       -> GeoJSON       -> Interlis 1       -> Interlis 2       -> GMT       -> SQLite       -> ODBC       -> PGeo       -> OGDI       -> PostgreSQL       -> MySQL       -> XPlane       -> AVCBin       -> AVCE00       -> DXF       -> Geoconcept       -> GeoRSS       -> GPSTrackMaker       -> VFK          C:\Users\Nik\Desktop\Logan_Lines>      I am hoping someone can tell me what I am doing wrong; I have little experience with this tool.


Rounded Grid - Is it possible?

I was wondering if it's possible to make a layout, with rounded measured grids, in zoom maps. I'm using ArcMap and rounding the corners of data frame on layout mode to give a magnifying glass effect over the map. Here's a picture example of what I've already got. ![enter image description here](http://i.stack.imgur.com/WKLD5.png) Thanks.! Rounded dataframe ArcMap


Intermediate Data in Python Code

Is there a way to incorporate intermediate data (so that I do not have to select an output save location) in a python script that I turned into a tool?               import arcpy, os     from arcpy import env     env.overwriteOutput = True     arcpy.CheckOutExtension("Spatial")          # Local variables:     DPM = arcpy.GetParameterAsText (0)     Footprints = arcpy.GetParameterAsText (1)      NewFP = arcpy.GetParameterAsText (2)      DPM_lyr = arcpy.GetParameterAsText (3)      Selected_DPM_fc = arcpy.GetParameterAsText (4)      Selected_DPM_lyr = arcpy.GetParameterAsText (5)      FP_DPM_kmz = arcpy.GetParameterAsText (6)     print "variables set"          #Turn DPM to layer     # Make Feature Layer again, export glitch     arcpy.MakeFeatureLayer_management(DPM, DPM_lyr, "", "", "FID FID VISIBLE NONE;Shape Shape VISIBLE NONE;Id Id VISIBLE NONE;Shape_Leng Shape_Leng VISIBLE NONE;Shape_Area Shape_Area VISIBLE NONE")     print "layer created"          #Step 1: if the coor system is right, then:          #projection stuff     desc = arcpy.Describe(Footprints)     type = desc.spatialReference          sr = arcpy.SpatialReference(4326)     out_coordinate_system = sr          if type.name == "GCS_WGS_1984":         # Process: Select Layer By Location         arcpy.SelectLayerByLocation_management(DPM_lyr, "INTERSECT", Footprints, "", "NEW_SELECTION")         print "t select layer by location complete"              # Process: Copy Features         arcpy.CopyFeatures_management(DPM_lyr, Selected_DPM_fc, "", "0", "0", "0")         print "t features copied"              # Process: Make Feature Layer         arcpy.MakeFeatureLayer_management(Selected_DPM_fc, Selected_DPM_lyr, "", "", "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;Id Id VISIBLE NONE;Shape_Leng Shape_Leng VISIBLE NONE;Shape_Length Shape_Length VISIBLE NONE;Shape_Area Shape_Area VISIBLE NONE")         print "t layer created"              # Process: Layer To KML         arcpy.LayerToKML_conversion(Selected_DPM_lyr, FP_DPM_kmz, "0", "false", "DEFAULT", "1024", "96", "CLAMPED_TO_GROUND")         print "t kml complete"          else:         print "Need to reproject"         arcpy.Project_management(Footprints, NewFP, out_coordinate_system)         print "reprojected"         # Process: Select Layer By Location         arcpy.SelectLayerByLocation_management(DPM_lyr, "INTERSECT", NewFP, "", "NEW_SELECTION")         print "f select layer by location complete"              # Process: Copy Features         arcpy.CopyFeatures_management(DPM_lyr, Selected_DPM_fc, "", "0", "0", "0")         print "f features copied"              # Process: Make Feature Layer         arcpy.MakeFeatureLayer_management(Selected_DPM_fc, Selected_DPM_lyr, "", "", "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;Id Id VISIBLE NONE;Shape_Leng Shape_Leng VISIBLE NONE;Shape_Length Shape_Length VISIBLE NONE;Shape_Area Shape_Area VISIBLE NONE")         print "f layer created"              # Process: Layer To KML         arcpy.LayerToKML_conversion(Selected_DPM_lyr, FP_DPM_kmz, "0", "false", "DEFAULT", "1024", "96", "CLAMPED_TO_GROUND")         print "f kml complete"      So if the projection is GCS_WGS_1984, the model will do XYZ. If it is not, then it will reproject it, then do the same XYZ. How do I make the GetParameterAsText 2-5 to be intermediate data much like in modelbuilder? I don't need those files...just the output kmz. * * * Thanks for the suggestions. I tried using the in_memory and it worked for the first two processes:               arcpy.MakeFeatureLayer_management(DPM, "in_memory\temp1", "", "", "FID FID VISIBLE NONE;Shape Shape VISIBLE NONE;Id Id VISIBLE NONE;Shape_Leng Shape_Leng VISIBLE NONE;Shape_Area Shape_Area VISIBLE NONE")          arcpy.SelectLayerByLocation_management("in_memory\temp1", "INTERSECT", Footprints, "", "NEW_SELECTION")      but when I try to copy the selected features to a new feature class (in_memory\temp2) i get an error               arcpy.CopyFeatures_management("in_memory\temp1", "in_memory\temp2", "", "0", "0", "0")          Traceback (most recent call last):      File "C:\Users\In_Memory.py", line 40, in arcpy.CopyFeatures_management("in_memory\temp1", "in_memory\temp2", "", "0", "0", "0") File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\management.py", line 2281, in CopyFeatures raise e ExecuteError: ERROR 000210: Cannot create output C:\Users\ScriptTestData.gdb\in_memory emp2 Failed to execute (CopyFeatures). Any clue as to why? Another edit: Instead of using in_memory\temp2 for the copy features, I named it directly, ran the rest of the code (using other temp 2, 3, etc) and it worked.


How to create scattered points in polygon

I have few polygons and I want to create few scattered well distributed point within the polygon. I am used to with ArcGIS and QGIS platform. How can I make it?


Align & Sum Grids in Python

I have two grids. One, call it **A** , is 4320x2160 cells and spans the whole globe. The other, call it **B** is 8640x3432 and spans the circumference of the globe, but is clipped toward mid-latitudes. Both files are in ArcGrid ASCII format. The clipped file has a header of:               ncols         8640     nrows         3432     xllcorner     -180     yllcorner     -58     cellsize      0.0416666666667      Looking at the grids in QGis, I see that the **B** contains four cells for every cell of **A**. I would like to sum each group of four cells in **B** to create a new grid that overlays directly with **A** and has a one-to-one correspondence of cells. Is there a way to do this in Linux using either Python or command line only tools?


Apply lyr file to Arcpy

I am new to ArcPy, and don't know how to assign different layers to the same `lyr` file. The layers have "pol" in common. Replacement is a single layer, and so must be walked through the entire document.               import arcpy.mapping as mapping     ... mxd = mapping.MapDocument ("CURRENT")     ... df = mapping.ListDataFrames (mxd, "Layers") [0]     ... updateLayer = mapping.ListLayers (mxd, "Pol_01_002", df) [0]     ... sourceLayer = mapping.Layer (r "g: \ Pol01_001.lyr")     ... mapping.UpdateLayer (df, updateLayer, sourceLayer, False)      How can I assign a single layer style file to all layers?


within using Hibernate Spatial

I'm doing this query using postgis and working properly SELECT "public".zona."id", "public".zona.zts FROM "public".zona WHERE ST_Within (                   Geometry (             st_GeographyFromText (                 'POINT(-51.19758760000002 -30.0514225)'             )         ),         "zona".geom     );      But I need to do using the spatial and hibernate bug:               Unable to perform consultajavax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: ERROR: ST_Within (unknown) function does not exist         Hint: No function matches the given name and type of the actual arguments. You need to add explicit type casts.      I can use in postgis               Geometry (     st_GeographyFromText (     'POINT (-30.0514225 -51.19758760000002)'      )      To convert the geographical point to geometry but how do I do that in hibernate? My query:               public Zona findByWKT(String wktFilter){            WKTReader fromText = new WKTReader();             Geometry filter = null;                 try{                filter =  fromText.read(wktFilter);                Zona zon = (Zona) this.entityManager.createQuery("select id,zts from Zona z where within("+filter+",+z.geom) = true").getSingleResult();                 System.out.println(zon.toString());                return zon;             } catch(Exception e){                throw new RuntimeException("Não foi possível realizar a consulta" + e);        }             }


Error exporting attribute table in ArcMap to Excel

I try to export an attribute (and dbf) table from ArcMap10 to txt file, but the program gives "An error occurred exporting the table" I checked all others types of exporting - all give the same, except only dbf (so I can export attribute table only in dbf format). What I did wrong? My main goal now – find how to export the attribute table to Excel. Now I can’t do it. Also I can’t copy my table from ArcMap and put it to Excel (I read this way as an advice), I don’t know the reason, but it doesn’t work. Maybe this problem relates with this error that gives ArcMap? Could you help me, why ArcMap doesn't export attribute and dbf table to others format, except dbf format?


ArcGIS - Python - Extend XY Line to Z Value

Long time reader, first time poster. So here's my goal: Working in ArcGIS, trying to work with Model Builder and Python Scripts. I have a series of lines and a single raster DEM. I'd like to extend my line segments until their Z-component has changed by at least 20 metres. My initial thoughts on this were:   1. Write Z_Min and Z_Max for the line   2. Calculate Z_Diff = Z_Max - Z_Min, for a check   3. If not, extend the line 30m (random number), check, if not, extend, check, etc. I've managed to get some code that will run through the process but only stops once ALL features are satisfied (not each individually). I'd like to iterate through each feature and do the check (or check all, extend those that don't satisfy, etc.) My attempts at querying the datasets via using a Where statement within UpdateCursor function statement were unsucessful - I'm fairly certain I was messing with the created tuples of coordinates (the tuple of OID@ and SHAPE@XY) but I'm not certain. Current Code - loops through just once and despite my best efforts - more or less resembles some sample script already posted. If anybody has suggestions/samples, that would VERY much be appreciated. Is this a simple "While" Loop?               #Code from <http://gis.stackexchange.com/questions/71645/a-tool-or-way-to-extend-line-by-specified-distance> by Paul.          from math import hypot     import collections     from operator import add     import arcpy          # Check out any necessary licenses     arcpy.CheckOutExtension("3D")          #Local variables:     DEM = "DEM"          #Need to set these as imported Script for ArcGIS     layer = arcpy.GetParameterAsText(0)     distance = float(arcpy.GetParameterAsText(1))          # Process: Add Surface Information     arcpy.AddSurfaceInformation_3d(layer, EnfDEM_Bird, "Z_MIN;Z_MAX;SURFACE_LENGTH", "BILINEAR", "", "1", "0", "NO_FILTER")     # Process: Calculate Field     arcpy.CalculateField_management(layer, "Z_Diff", "[Z_Max] - [Z_Min]", "VB", "")          #Computes new coordinates x3,y3 at a specified distance     #along the prolongation of the line from x1,y1 to x2,y2     def newcoord(coords, dist):         (x1,y1),(x2,y2) = coords         dx = x2 - x1         dy = y2 - y1         linelen = hypot(dx, dy)              x3 = x2 + dx/linelen * dist         y3 = y2 + dy/linelen * dist             return x3, y3          #accumulate([1,2,3,4,5]) --> 1 3 6 10 15     #Equivalent to itertools.accumulate() which isn't present in Python 2.7     def accumulate(iterable):             it = iter(iterable)         total = next(it)         yield total         for element in it:             total = add(total, element)             yield total          #OID is needed to determine how to break up flat list of data by feature.     coordinates = [[row[0], row[1]] for row in                arcpy.da.SearchCursor(layer, ["OID@", "SHAPE@XY"], explode_to_points=True)]          oid,vert = zip(*coordinates)          #Construct list of numbers that mark the start of a new feature class.     #This is created by counting OIDS and then accumulating the values.     vertcounts = list(accumulate(collections.Counter(oid).values()))          #Grab the last two vertices of each feature     lastpoint = [point for x,point in enumerate(vert) if x+1 in vertcounts or x+2 in vertcounts]          #Convert flat list of tuples to list of lists of tuples.     #Obtain list of tuples of new end coordinates.     newvert = [newcoord(y, distance) for y in zip(*[iter(lastpoint)]*2)]              j = 0          with arcpy.da.UpdateCursor(layer, ["SHAPE@XY"], explode_to_points=True) as rows:         for i,row in enumerate(rows):             if i+1 in vertcounts:                     row[0] = newvert[j]                 j+=1                 rows.updateRow(row)                 # Process: Add Surface Information                 arcpy.AddSurfaceInformation_3d(layer, EnfDEM_Bird, "Z_MIN;Z_MAX;SURFACE_LENGTH", "BILINEAR", "", "1", "0", "NO_FILTER")                 # Process: Calculate Field                 arcpy.CalculateField_management(layer, "Z_Diff", "[Z_Max] - [Z_Min]", "VB", "")


Is there a way to export labels in QGIS?

I've used the v2 labeling engine to place some nice looking road labels. Now I'd like to export those labels as a point shapefile for use in another program. Is there any way to accomplish this?


Warning 000405 when trying to calculate field

I am trying to create a model but am getting hung up on my first step. I need to calculate an ID field from an FID field so that I can join it to another table based on the ID field. So I have a table:               FID  Shape     ID     0    Polyline  0     1    Polyline  0     2    Polyline  0      Through the calculation, I was hoping to get something like this:               FID  Shape     ID     0    Polyline  1     1    Polyline  2     2    Polyline  3      Easy expression: `[FID]+1`. When I run the calculation though, I get the error 000405: No records within table. Since there won't be any data in the table until I join it to the other table, I'm not sure what to do here. Even trying to create a new field and running the same calculation returns the same warning.


creating 2 dragable layers at the same time in OpenLayers?

I have been been working with this for a while now. Whenever you add 2 seperate draggable layers, openlayers will only activate the last one added. I wish it could be as simple as the code below. But that doesn't work **var dragFeatureend = new OpenLayers.Control.DragFeature([vectorLayer1, vectorLayer2], {autoActivate: true, onDrag: onCompleteMove});** I found a solution by making the layers selectable and calling events when each is clicked. But is there any work around other than making them selectable? Thanks!


How to avoid holes in polygons from lines?

I am trying to convert a dataset of lines that contains the coast of New Zealand into a big polygon. However using the vector -> geometry tools -> lines to polygon command in Quantum GIS results in a mess with lots of holes and lines outside of the coast. How can I do the conversion successfully? It worked on the 1:500k data, the 1:250k data, but not the 1:50k data. I have a screenshot of the problem here - before and after: ![before](http://i.stack.imgur.com/V1o3E.png) ![after](http://i.stack.imgur.com/TT4fH.png) The dataset is from here.


Programmatically modify attributes for vector layer in QGIS

I am trying to programmatically modify attributes for a vector layer, using calculated values currently stocked in a dictionary. Any pointers on where i'm going wrong? my dictionary has the feature ID as keys and a value to be stocked in the corresponding feature. Mahalo in advance.               dict = {0.0: 27400.0, 1.0: 32900.0, 2.0: 42200.0, 3.0: 40600.0}          for feature in Gros_Feat:         if caps & QgsVectorDataProvider.ChangeAttributeValues:             attrs = {'SUM_Conso' : sumdict.values()[feature.id()]}             grosLayer.dataProvider().changeAttributeValues({feature.id() : attrs})             grosLayer.updateFields()


Adding Field to Raster

Good day! I have a shapefile which contains X-specific field. I want to add this X-specific field (integer) to a raster dataset. I am using ArcGIS 10. How can I do this? Thanks.


Is there any way to speed up the script I wrote?

I have a pretty simple script which gets 2 parameters from the user: 1)Geodatabase location 2)Spatial reference It then creates a dataset with 6 feature classes. It also adds a large amount of fields to each each feature class, and by large I mean no more than 20. It also adds defaults to certain fields. My question is: Could I speed up the running of the tool by organizing the code differently? Right now I have it so it creates the dataset, then creates the first feature class and then the fields it needs and any defaults for those fields. Could it be quicker to have it make all the features classes at once, then all the fields, then all the defaults? Or would it make no difference? Currently, it's taking about 4 minutes to do everything. Thanks for any help.


GeoEncoding Fails : latitude or longitude exceeded limits (-14)

Module Installation fails in OpenERP 6.1: Im using OpenERP 6.1 with **CamptoCamp GeoEngine** (Without GeoEngine it get installed). Trying to install module throws Error:                 ERROR openerp_trunk_geoengine openerp.sql_db: bad query: UPDATE res_partner_address  SET geo_point = ST_Transform(st_SetSRID(geo_point, 4326), '900913')  WHERE id = 72     Traceback (most recent call last):        File "openerp_trunk_geoengine60/server/openerp/sql_db.py", line 212, in execute        res = self._obj.execute(query, params)       InternalError: transform: couldn't project point (-9.23515e+06 5.2544e+06 0): latitude or longitude exceeded limits (-14)      How do i resolve.


How to connect to Postgres with QGIS?

Oddly, it should be simple, but I can't connect to a local PostGIS database. My installation is with Mac OS X (10.8), Postgres.app (in doc it's said to have PostGIS included) and Quantum GIS 1.8. When I want to add a connection to Postgres, I'm specifying name, host (localhost), port (5432), database name, user name and password (service field left empty). I can connect to a database with Navicat, so database server seems to run correctly. With the exact information in QGIS used in Navicat, it can't connect... why? Thank you!


How do you convert OSM XML to geojson?

I want to take the XML output of a Xapi query and display it using leaflet or polymaps. How can I do that? Is there an easy way to convert XML to geojson


Where can I find Specifications for Canadian National Topographic Map series?

At one time the Natural Resources Canada had the specifications for the National Topographic Series (NTS) maps online at http://www.nrcan.gc.ca/earth- sciences/cartospecs. It included things like the exact CMYK colour numbers, size and width of every symbol in points and so on. Web.archive.org has a record of it here (be patient, time travel is slow), but it only has the text. The image examples are missing. Before that I remember having a pdf document of the same, but I can't locate it now. I do have a hardcopy from 1988, but that is hard to search and a little long in the tooth... Does anyone know of another place for this useful resource? (And yes, I've already asked NRCAN, but I've yet to get an answer other than "someone will get back to you". I'm sure I will eventually get some kind of answer, but I'm getting impatient P:-)


How to exclude missing values from raster layer?

In my raster layers the value -999 means "missing". Those points completely mess up any colormap in qgis because qgis treats them as normal values and includes them in the classification. I would like to ask 1) is there any raster format that allows for missing values ? (I mostly use geotiff) 2) how can I replace -999 with for example 0 in every raster-cell? QGIS raster-calculator does not seem to do this. I did not find anything like an inline if-function like if(val=-999,0,val)


QGIS layers don't overlay after trying 'enable on the fly' and CRS settings

I know there are already many questions about this topic, but none of the answers helped me so far. I have two layers I want to overlay in QGIS. One of them is an Excell file with the coordinates of households in it. I changed it to .csv and projected it in QGIS with 'add deliminate text layer'. The other one are the outlines of the provinces of Dhulikhel municipality, Nepal. I got these from my colleague. I want to project the households in the provinces. I would like to project these layers in WGS84 UTM zone 45N EPSG 32645. The first layer is in this projection, the second one isn't, it is in a for me unknown 'Generated CRS'. I tried enable on the fly projection and than the save as option for the second layer. This however did not work. It seems to be something with the spatial reference system units. I hope someone can help me. These are the properties of my layers: Households:               General:     Storage type of this layer: Delimited text file     Source for this layer: file:///C:/Documents%20and%20Settings/Administrator/Desktop/GIS/Household_survey_results%20(6).csv?delimiter=,&delimiterType=plain&xField=Longitude&yField=Latitude     Geometry type of the features in this layer: Point     The number of features in this layer: 1681     Editing capabilities of this layer:      Extents:     In layer spatial reference system units : xMin,yMin 85.5281,27.6066 : xMax,yMax 85.5771,27.6372     Layer Spatial Reference System:     +proj=utm +zone=45 +datum=WGS84 +units=m +no_defs      Provinces:               General:     Storage type of this layer: PGeo     Source for this layer: C:/Documents and Settings/Administrator/Desktop/GIS/Dhulikhel_Digital_Data/Administrative.mdb|layername=Ward_line     Geometry type of the features in this layer: Line     The number of features in this layer: 34     Editing capabilities of this layer: Fast Access to Features at ID     Extents:     In layer spatial reference system units : xMin,yMin 353921.13,3054982.59 : xMax,yMax 360199.97,3058637.05     Layer Spatial Reference System:     +proj=tmerc +lat_0=0 +lon_0=87 +k=0.9999 +x_0=500000 +y_0=0 +a=6377299.36559538 +b=6356098.359005156 +units=m +no_defs


Postgis identify points on the polygon border

I have points geom in `gid,pt_geom` and polygon geom in `gid,pl_geom`. Some of the points are inside polygon and some are outside polygon, others are on the polygon boundary. ![enter image description here](http://i.stack.imgur.com/6JpU6.jpg) Is there any way to identify those points on the polygon by using PostGIS functions (`e.g. ST_contains() or ST_Distance()`)? Maybe `Select points.gid from points inner join polygon on st_contains(polygon.the_geom,points.the_geom)`.


Sorting a table on multiple fields using ArcPy

I'm trying to sort a table based on three fields with ArcPy (which should be only one line of code), and I had a "tool is not license" error. I just saw that sorting with multiple fields as parameters is an ArcInfo feature only. I have ArcView (soon ArcEditor). Any ideas how I could code this to bypass that limitation with ArcPy? Thanks!


How to reset the length of the control of scaleLine in OpenLayers?

I want to change the style of the control of the ScaleLine,but I have no idea where to change it,anybody can give me some advice? map.addControl(new OpenLayers.Control.ScaleLine());


Are there limitations using a PostGIS out-db raster?

I have been trying to import a large raster into a PostGIS 2.0 database and hit a few stumbling blocks. Initially when I tried to import the raster using raster2pgsql, I would receive the following error: **rt_band_set_pixel_line: Coordinates out of range** After finding this page, and using gdalinfo I found that the raster exceeded the maximum allowed size of 65535 x 65535. gdalinfo output: > $ gdalinfo ari100.tif   >  Driver: GTiff/GeoTIFF   >  ... Size is **42971, 77138**   >  Coordinate System is:   >  GEOGCS["WGS 84",   >  ...   >  AUTHORITY["EPSG","4326"]] Origin = > (152.741676637167842,-26.215302802012008)   >  Pixel Size = (0.000009239757419,-0.000009239757419)   >  Metadata:   >  AREA_OR_POINT=Area   >  Image Structure Metadata:   >  INTERLEAVE=BAND   >  Corner Coordinates:   >  Upper Left ( 152.7416766, -26.2153028) (152d44'30.04"E, 26d12'55.09"S)   >  Lower Left ( 152.7416766, -26.9280392) (152d44'30.04"E, 26d55'40.94"S)   >  Upper Right ( 153.1387183, -26.2153028) (153d 8'19.39"E, 26d12'55.09"S)   >  Lower Right ( 153.1387183, -26.9280392) (153d 8'19.39"E, 26d55'40.94"S)   >  Center ( 152.9401974, -26.5716710) (152d56'24.71"E, 26d34'18.02"S)   >  Band 1 Block=42971x1 Type=Float32, ColorInterp=Gray   >  ... So I decided to use the out-db functionality by using the -R flag in raster2pgsql. From the documentation: _Register the raster as a filesystem (out-db) raster, Only the metadata of the raster and path location to the raster is stored in the database (not the pixels)._ I imported the raster using the following command:               raster2pgsql /gis/Flood/ari100.tif -R | psql -U username database      But when I tried a query:               SELECT ST_Value(rast, ST_PointFromText('POINT(152.9632 -26.4878)')) FROM ari100      I get the following error:               NOTICE:  Attempting to get pixel value with out of range raster coordinates: (23975, 29491)       CONTEXT:  PL/pgSQL function "st_value" line 13 at RETURN        However, if I use GDAL (through Python) to query the raster directly using this script               python val_at_coord.py 152.9632 -26.4878      I can retrieve the value correctly. I decided to find the extents of the raster in the database:               SELECT ST_Height(rast) As rastheight, ST_Width(rast) As rastwidth from ari100;          rastheight | rastwidth       11602      | 42971        The height is completely incorrect (should be 77138). So my question is: did I do something wrong (in using raster2pgsql) or is there a limitation in using out-db rasters with PostGIS? Thanks


Yum Install QGIS on CentOS 6

I was trying to install qgis on centos 6.3 and follow the instruction here. However after running `yum install qgis qgis-python qgis-grass qgis-mapserver` I got below errors:                   ---> Package libvpx.x86_64 0:0.9.0-8.el6_0 will be installed         ---> Package python-setuptools.noarch 0:0.6.10-3.el6 will be installed         --> Finished Dependency Resolution         Error: Package: grass-6.4.2-8.el6.x86_64 (elgis)                    Requires: libgeos-3.3.8.so()(64bit)                    Available: geos-3.3.8-2.el6.x86_64 (elgis)                        libgeos-3.3.8.so()(64bit)                    Installed: geos-3.4.1-1.el6.x86_64 (@opengeo)                        Not found                    Available: geos-3.2.2-1.el6.rf.x86_64 (rpmforge)                        Not found                    Available: geos-3.2.2-2.el6.x86_64 (elgis)                        Not found                    Available: geos-3.3.0-1.el6.x86_64 (elgis)                        Not found                    Available: geos-3.3.1-2.el6.x86_64 (elgis)                        Not found                    Available: geos-3.3.2-1.el6.i686 (epel)                        Not found                    Available: geos-3.3.6-1_0.el6.x86_64 (elgis)                        Not found         Error: Package: grass-libs-6.4.2-8.el6.x86_64 (elgis)                    Requires: libgeos-3.3.8.so()(64bit)                    Available: geos-3.3.8-2.el6.x86_64 (elgis)                        libgeos-3.3.8.so()(64bit)                    Installed: geos-3.4.1-1.el6.x86_64 (@opengeo)                        Not found                    Available: geos-3.2.2-1.el6.rf.x86_64 (rpmforge)                        Not found                    Available: geos-3.2.2-2.el6.x86_64 (elgis)                        Not found                    Available: geos-3.3.0-1.el6.x86_64 (elgis)                        Not found                    Available: geos-3.3.1-2.el6.x86_64 (elgis)                        Not found                    Available: geos-3.3.2-1.el6.i686 (epel)                        Not found                    Available: geos-3.3.6-1_0.el6.x86_64 (elgis)                        Not found          You could try using --skip-broken to work around the problem          You could try running: rpm -Va --nofiles --nodigest      my `yum repolist` shows:                   yum repolist         Loaded plugins: fastestmirror, refresh-packagekit, security         Loading mirror speeds from cached hostfile          * epel: ftp.jaist.ac.jp          * rpmforge: ftp.heanet.ie         repo id                                                      repo name                                                                                status         base                                                         CentOS-6 - Base                                                                                6,381         elgis                                                        EL GIS 6 - x86_64                                                                                198         epel                                                         Extra Packages for Enterprise Linux 6 - x86_64                                                     9,757         extras                                                       CentOS-6 - Extras                                                                                13         opengeo                                                      opengeo                                                                                52         rpmforge                                                     RHEL 6 - RPMforge.net - dag                                                                        4,638         updates                                                      CentOS-6 - Updates                                                                                1,326         repolist: 22,365      How can I proceed to install the qigs? I tried the `--skip-broken` method but qgis cannot be loaded.


Is it possible to change the plugin folder location?

Sorry for the vague header but i found no better one. This is the situation: I am teaching a GIS course in a local collage using QGIS (qgis4w). The way our lab pc's work is that they delete all added material every start up from the C:\ drive. They also have a D:\ drive where data can be saved. My question is, is there a way to enable plugin installation in this configuration. I thought of something like moving the plugin definition file and the plugin folder to D:\ thanks for any idea yair


How do I edit shape file attribute tables so they all have the same information?

I am trying to merge several pipeline shapefiles using GEOMERGE but it cannot complete the function because they have different column definitions. So I need to edit the attribute tables so that they all have the same data/layout. For e.g one pipeline has the following columns in the attribute table: ID REF TYPE and in another pipeline attribute table it has: Leg-No From To Length_Km What is the best way for me to overcome this? If it is relevant some of the shapefiles have been coverted from KML to shapefiles using GQIS. Thanks for your time!


When I finish drawing a polygon, it disappears again (although appearing in my attribute table)

I'm working with Quantum GIS at this moment. And as the title says, when I finish drawing a polygon, it disappears again. The new object does appear in my attribute table and in the legend/'filling of the polygon' should not be the problem. Before this never happend, so I supposed it was some change I made in the options. But even after reinstalling the program the problem stays. After searching for a while I discovered that on a new project it works correctly till the moment I import a vector-file I made before with line objects. How can importing a file have such an influence? Thanks in advance!


How to efficiently determine if a collection of coordinates (polygon) is an ellipse?

I'm attempting to determine a geometry type based on a collection of coordinates and have come across a situation where I'd like to differentiate between what is a "polygon" and what is an "ellipse". This question is specific to ESRI's ArcGIS Runtime for WPF 10.1.1 SDK, but I imagine this is generic enough to have bearing in any GIS. I'll use ESRI's API for the examples in this sample. Given the following code sample to generate an ellipse's point collection:               double slice = 2 * Math.PI / 360;     double radiusX = 50;     double radiusY = 20;             ESRI.ArcGIS.Client.GeometryMapPoint center = new ESRI.ArcGIS.Client.Geometry.MapPoint(0,0);             ESRI.ArcGIS.Client.Geometry.PointCollection pointCollection = new ESRI.ArcGIS.Client.Geometry.PointCollection();             for (int angle = 0; angle <= 360; angle += 6)             {                 double rad = slice * angle;                 double px = center.X + radiusX * Math.Cos(rad);                 double py = center.Y + radiusY * Math.Sin(rad);                 pointCollection.Add(new ESRI.ArcGIS.Client.Geometry.MapPoint(px, py));             }      And then, given this sample to generate a polygon's point collection (obviously the polygon could be much more complex than this):               ESRI.ArcGIS.Client.Geometry.PointCollection pointCollection = new ESRI.ArcGIS.Client.Geometry.PointCollection();             pointCollection.Add(new MapPoint(0, 0));             pointCollection.Add(new MapPoint(0, 10));             pointCollection.Add(new MapPoint(10, 10));             pointCollection.Add(new MapPoint(10, 0));     //Close the polygon     pointCollection.Add(pointCollection[0]);      Is there an effective, efficient, and generic way to determine which of these two shapes is an ellipse and which is not? The impetus behind this is that the ESRI WPF API does not differentiate between Polygons and Ellipses. EDIT: Perhaps I can make this question more clear, what I would like to discern is whether the given points constitute what could be considered a 2-Dimensional ellipse (perhaps already making this too subjective). The ellipse could have any number of radial points comprising it, and I would like to ideally determine if it meets some test of "roundness" or curvature. The x-radius and y-radius of the sample ellipse could also be varied. I've edited my sample to include this.


create geotiff from shapefiles

I need to colorized geometries from shapefiles and convert them to raster image (geotiff). I tried to use geotools's VectorToRasterProcess and ImageWorker ("d:\gis\tmp\32 27 25 w4.shp" is path to my test shapefile):               URL url =  new File("d:\\gis\\tmp\\32 27 25 w4.shp").toURI().toURL();     ShapefileDataStore ds = new ShapefileDataStore(url);     FeatureSource fs = ds.getFeatureSource("32%2027%2025%20w4");          GridCoverage2D raster = VectorToRasterProcess.process(fs.getFeatures(),          "ID", new Dimension(400, 400), fs.getBounds(),"test", null);          ImageWorker imageWorker = new ImageWorker(raster.getRenderedImage());     imageWorker = imageWorker.rescaleToBytes();     imageWorker.makeColorTransparent(Color.BLACK);     imageWorker.forceComponentColorModel();          raster = new GridCoverageFactory().create("one", imageWorker.getRenderedImage(),  fs.getBounds());          GeoTiffWriter writer = new GeoTiffWriter(output);     GeoTiffWriteParams params = new GeoTiffWriteParams();     ParameterValue<GeoToolsWriteParams> value = GeoTiffFormat.GEOTOOLS_WRITE_PARAMS.createValue();     value.setValue(params);     writer.write(raster, new GeneralParameterValue[]{value});     writer.dispose();      The result geotiff is here What is not right in my configuration of ImageWorker? Give, please, some advices. Regards, Dmitry


QGIS 2.0 64bit Orfeo Toolbox Installation Failure

I am trying to install OTB in with QGIS 2.0.1 (Dufour) in Windows 7, 64bit. I have no problem installing QGIS either the QGIS installer or OSGeo4W, but I have no luck with the OTB tools such as pansharpening etc. Are the otb-gin etc. tools only available on the 32bit version? Does anyone know if it is possible to install on the 64bit? Thanks!


How to identify gaps in linear point data in FME?

I have been given a spreadsheet which contains coordinates of welds along a pipeline. I'm using FME to create points from the coordinates. On average, the points are roughly 11 metres from each other, with some exceptions. See below image: ![enter image description here](http://i.stack.imgur.com/fwStu.jpg) What I would like to do is identify when the gaps are larger than about 15 or 20 metres apart. For example, the image below shows a gap of about 90m. ![enter image description here](http://i.stack.imgur.com/qIjD5.jpg) As this pipeline is not yet fully built, there will be many such gaps along its length. Here's an example of a couple of gaps which are several kilometres long (this image is zoomed out so the points look like lines): ![enter image description here](http://i.stack.imgur.com/bbWoR.jpg) One idea I had was to connect the points that are within 15 or 20 metres of each other. Or perhaps group them together somehow by giving each group a unique ID. Any change in that ID, will identify a gap in the points. However, I'm not really sure how I could do either of those in FME. Any ideas?


How does "Show only visible features" work in Map Composer?

If I tick show only visible, I get no features. I have created an attribute table in the Map Composer in QGIS trunk QGIS version 1.9.90-Alpha QGIS code revision 4d6cc6d I note recent feature update http://hub.qgis.org/issues/4496 but this doesn't explain my experience. I suspect it is misuse on my part. **I would like to select a feature in the main attribute table in QGIS, then have it show only the label for that feature and show only that row in the attribute table in Print Composer.** I explored the options considerably I think, when I uncheck the box I get as many rows as the setting will allow, no relationship to visible. I have checked the Map 1 in the dropdown. * * * I have written this much, maybe it will help someone else... I am going to explore reloading the layer, it is in fact a delimited text layer since I am using the read only status of that layer to provide some versioning control. Will see what happens when I reload it as a shapefile. This is cutting edge cartography as far as my skillset is concerned....


Excel/Google Docs > Plss Map

Is there a way to map out PLSS (Public Land Survey System) TWP (township),RNG (range) and Section based off a field in google docs? I was thinking if you had your first column with the PLSS area in it then it would be able to read the PLSS shapefile in ArcMap to adjust what section needs to be highlighted. I want to be able to track my company's projects on map. Right now they are all on a spreadsheet. Any ideas to go about doing this?


How to generate polygons upto the edge of other polygons?

I am doing some work on a pipe network (blue lines) and I am trying to attribute the information about the street to the pipes. I have 2 polygon layers one of the blocks (green hatch) and one of intersections (yellow hatch). I am trying to create a set of buffers/polygons around the street segments (dark gray lines) that fill the space not already covered by either of the 2 other layers(white space). It would be nice to get the double wide streets to have their polygons meet at the mid point between the 2 segments. I have tried creating a buffer and erase what falls underneath the other two layers and with an over sized buffer but I end up with spill over into the cross streets. I need to do this for an entire city, so I can’t just make an undersized buffer and snaping to the other layers never gets far enough and then manually adjust the vertices takes too long. Plus with both methods I end up with overlapping polygons when it buffers around a double street segment which causes problems assigning the street information to the pipe segments. What would be the best way to accomplish this? Let me know if you would like more clarification. ![Example of two intersections](http://i.stack.imgur.com/qcmYg.jpg)


Converting 2D shapefile to Equal Area Projection?

I have thousands of shapefiles with coordinates in lat/long (-180 to +180 x, -90 to +90 y), that contain polygons of which I wish to calculate the area. I'm using the Python GEOS/OGR/GDAL API. If I call the Area() function for each geometry, I'll get the 2D area, or the area on a Mercator projection (basically). Since the polygons are really on a sphere, I want to convert them to an equal area projection before I calculate the area. I was wondering if anyone had any experience with this on here. Some reading of the documentation suggested there were functions somewhere in OSRSpatialReference to transform a point or geometry from one projection to another, but it wasn't quite clear to me exactly how to use this or what projection to use. Any help would be greatly appreciated. Thanks much!


how to apply adress-geotags

hello dear linux experts what i am trying to do now is .....a little task   * i wanted to run a osmconvert & filter with the following goal - to get the following tags out of the datas: addr:street addr:housenumber addr:city cf http://wiki.openstreetmap.org/wiki/Key:addr so i decided to do the following command               ./osmconvert hamburg-latest.osm.pbf --all-to-nodes -o=hamburgrestaurants_2.o5m     ./osmfilter hamburgrestaurants_2.o5m --keep="amenity=restaurant" -o=restaurant_2.o5m     ./osmconvert  restaurant_2.o5m --csv="@id @lon @lat shop name  addr:street  addr:housenumber addr:city website email" --csv-headline  -o=restaurant_2.csv      but i failed - there were no streets no housenumbers and cities what is wrong with this? i really love to hear from you many many greetings


Convert Shp to KML error org2org Error4

I am attempting to convert Shp file to Kml using command line org2org application. I have used this in the past to convert more simple shp files and was sucessful. However I get an error message when I attempt to perform this action.               C:\Users\Darren\Desktop\Projects\GIS\ShapeFiles>ogr2ogr -f "KML" property     .kml property.shp     ERROR 4: Unable to open property.shx or property.SHX.     FAILURE:     Unable to open datasource `property.shp' with the following drivers.       -> ESRI Shapefile       -> MapInfo File       -> UK .NTF       -> SDTS       -> TIGER       -> S57       -> DGN       -> VRT       -> REC       -> Memory       -> BNA       -> CSV       -> NAS       -> GML       -> GPX       -> LIBKML       -> KML       -> GeoJSON       -> Interlis 1       -> Interlis 2       -> GMT       -> SQLite       -> ODBC       -> PGeo       -> MSSQLSpatial       -> PostgreSQL       -> MySQL       -> PCIDSK       -> XPlane       -> AVCBin       -> AVCE00       -> DXF       -> Geoconcept       -> GeoRSS       -> GPSTrackMaker       -> VFK       -> PGDump       -> OSM       -> GPSBabel       -> SUA       -> OpenAir       -> PDS       -> WFS       -> HTF       -> AeronavFAA       -> Geomedia       -> EDIGEO       -> GFT       -> SVG       -> CouchDB       -> Idrisi       -> ARCGEN       -> SEGUKOOA       -> SEGY       -> ODS       -> XLSX       -> ElasticSearch       -> PDF


How to create Fire Run Book street index and export it to *.doc/*.csv rather than *.pdf?

I am using **Fire Run Book** toolbox through **ArcGIS for Local Government** but it exports the the street index into a PDF document. ![enter image description here](http://i.stack.imgur.com/FQrdx.png) Any idea on how to create a street index and export it to an excel doc/csv file?


Split polygon into four with respect to single point

Some days ago one of my colleague came to ask me a query related to Geometries.   The situation is as....   There is one Polygon(suppose a city polygon) and there is one point(suppose user's current location) inside that polygon. Now, what I have to achieve is to split polygon into four quadrant so as the lines which splits polygon into four should be perpendicular to each other and should pass from point.(please see image for understanding). In other words this processing will generate four section of polygon as NE,SE,SW and NW with respect to point(user's location).![Here is how this will do.](http://i.stack.imgur.com/Ymulw.png) So, how to achieve it? One immediate thought in my mind was to   **1]Compute the bounds of polygon   2]Get distance by max-min/2   3]Use this as a radius of buffer which will drawn from point.   4]Then get the intersection of this buffer and original polygon   5]From these intersection to point draw a lines to split the polygon.**      But unfortunately its need not be always right (simply bcoz point could be anywhere inside polygon).   So it would be great if anyone find a way to solve this problem.      Thanks in advance. P.S.:- I'm trying to solve this problem using opensource Geospatial libraries and software's.


Where can I find the finest granularity of 2010 US census population information?

I am writing a re-districting application where I want to be able to create US voting districts based on geographic coordinate population data. In a perfect world, I would have the population for each house and the house's geographic coordinates. I am guessing that per house data is not likely to be available. What is the lowest level available? Blocks? Block groups? I located a US census website which contains population data for block groups. Is this the finest granularity available for 2010 census data? Update: To clarify, my end goal is to implement the shortest splitline algorithm for districting with 2010 census data. My intention is to slice up polygons using the shortest splitline according to the best population numbers relating to latitude/longitude coordinates I can find for people in the polygon.


How to setup PostGIS JDBC with Hibernate?

I try to setup an Java Application with Hibernate and PostGIS but I always get nasty exceptions like :               java.lang.NoSuchMethodError: org.hibernate.type.CustomType.<init>       (Lorg/hibernate/usertype/UserType;[Ljava/lang/String;)V ....      After looking around I got the impression that the PostGIS JDBC driver is not compatible with Hibernate, which would be strange. I'm using :   * hibernate-spatial 1.1.1   * PostGIS JDBC 2.0 (the link for 2.1 is dead ...)   * postgresql-8.4-702.jdbc4    * Hibernate 3.2.5 The table I try to map is               CREATE TABLE "cRef" (         "id" SERIAL NOT NULL,         "contenttype" varchar(200),         "contentid" varchar(200) NOT NULL,       PRIMARY KEY("id")     );     SELECT AddGeometryColumn ('cRef','geom',4326,'POINT',2);      from my hibernate.cfg.xml:               <hibernate-configuration>         <session-factory>             <property name="hibernate.dialect">org.hibernatespatial.postgis.PostgisDialect             </property>      and my classpath contains:               hibernate-spatial-1.1.1.jar and      hibernate-spatial-postgis-1.1.1.jar      Can anyone recommend me a working setup? Or give me some hints, how to get this setup running? Best Regards Andreas The complete stacktrace:               java.lang.NoSuchMethodError: org.hibernate.type.CustomType.<init>(Lorg/hibernate/usertype/UserType;[Ljava/lang/String;)V         at org.hibernatespatial.postgis.PostgisDialect.<clinit>(PostgisDialect.java:51)         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)         at java.lang.reflect.Constructor.newInstance(Constructor.java:525)         at java.lang.Class.newInstance0(Class.java:372)         at java.lang.Class.newInstance(Class.java:325)         at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:78)         at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:42)         at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2005)         at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)         at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizard.generateClasses(HibernateCodeGenWizard.java:338)         at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizard.instantiate(HibernateCodeGenWizard.java:442)         at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1022)         at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:589)         at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:432)         at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:253)         at org.openide.loaders.TemplateWizardIteratorWrapper$ProgressInstantiatingIterator.instantiate(TemplateWizardIteratorWrapper.java:180)         at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1597)         at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1541)         at org.openide.WizardDescriptor.access$2000(WizardDescriptor.java:139)         at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2165)         at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1452)         at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2032)     Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to         at org.openide.util.RequestProcessor.post(RequestProcessor.java:424)         at org.openide.WizardDescriptor$Listener$2.run(WizardDescriptor.java:2211)         at org.openide.WizardDescriptor.lazyValidate(WizardDescriptor.java:1516)         at org.openide.WizardDescriptor.access$1600(WizardDescriptor.java:139)         at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:2229)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         at java.lang.reflect.Method.invoke(Method.java:601)         at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:457)         at $Proxy48.actionPerformed(Unknown Source)         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)         at java.awt.Component.processMouseEvent(Component.java:6504)         at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)         at java.awt.Component.processEvent(Component.java:6269)         at java.awt.Container.processEvent(Container.java:2229)         at java.awt.Component.dispatchEventImpl(Component.java:4860)         at java.awt.Container.dispatchEventImpl(Container.java:2287)         at java.awt.Component.dispatchEvent(Component.java:4686)         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)         at java.awt.Container.dispatchEventImpl(Container.java:2273)         at java.awt.Window.dispatchEventImpl(Window.java:2713)         at java.awt.Component.dispatchEvent(Component.java:4686)         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)         at java.awt.EventQueue.access$000(EventQueue.java:101)         at java.awt.EventQueue$3.run(EventQueue.java:666)         at java.awt.EventQueue$3.run(EventQueue.java:664)         at java.security.AccessController.doPrivileged(Native Method)         at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)         at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)         at java.awt.EventQueue$4.run(EventQueue.java:680)         at java.awt.EventQueue$4.run(EventQueue.java:678)         at java.security.AccessController.doPrivileged(Native Method)         at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)         at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)         at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:121)         at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)         at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)         at java.security.AccessController.doPrivileged(Native Method)         at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)         at java.awt.Dialog.show(Dialog.java:1072)         at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1072)         at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1106)         at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1094)         at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:126)         at org.openide.util.Mutex.doEventAccess(Mutex.java:1363)         at org.openide.util.Mutex.readAccess(Mutex.java:273)         at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1079)         at java.awt.Component.show(Component.java:1650)         at java.awt.Component.setVisible(Component.java:1602)         at java.awt.Window.setVisible(Window.java:1013)         at java.awt.Dialog.setVisible(Dialog.java:1003)         at org.netbeans.core.windows.services.DialogDisplayerImpl$1AWTQuery.showDialog(DialogDisplayerImpl.java:260)         at org.netbeans.core.windows.services.DialogDisplayerImpl$1AWTQuery.run(DialogDisplayerImpl.java:186)         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)         at java.awt.EventQueue.access$000(EventQueue.java:101)         at java.awt.EventQueue$3.run(EventQueue.java:666)         at java.awt.EventQueue$3.run(EventQueue.java:664)         at java.security.AccessController.doPrivileged(Native Method)         at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)         at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)         at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)     [catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)


How to reference a specific layer in a dataframe with Arcpy

I am trying to reference a Layer named "Tim" in the dataframe "Layers" in my .mxd. It is not working. I have looked at the ArcGIS online help and all else in this forum. Can't get rid of this Runtime Error!               >>> mxd = arcpy.mapping.MapDocument("CURRENT")     >>> df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]     >>> layer = arcpy.mapping.ListLayers(mxd,"Tim",df)[0]     Runtime error <type 'exceptions.IndexError'>: list index out of range      Any insight would be greatly appreciated!! So this is my entire script:               import arcpy     mxd = arcpy.mapping.MapDocument("CURRENT")     df = arcpy.mapping.ListDataFrames(mxd, "layers")[0]     targetGroupLayer = arcpy.mapping.ListLayers(mxd, "Tim", df)[0]     addLayer = arcpy.mapping.Layer(r"MyLayer.lyr")     arcpy.mapping.AddLayerToGroup(df, targetGroupLayer, addLayer, "BOTTOM")      this also give me the error. When i change               targetGroupLayer = arcpy.mapping.ListLayers(mxd, "Tim", df)[0]      to this               targetGroupLayer = arcpy.mapping.ListLayers(mxd, "", df)[0]      it works but i need it do reference a specific group layer because there will be many of them and eventually i will pass in a variable for the targetGroupLayer so i can bring in certain layers into that group. My most recent as Roy suggested.               import arcpy     mxd = arcpy.mapping.MapDocument("CURRENT")     df = arcpy.mapping.ListDataFrames(mxd)[0]     for lyr in arcpy.mapping.ListLayers(mxd, "",df):         if lyr.name == "Tim":             addLayer = arcpy.mapping.Layer(r"C:\Users\T\Desktop\MyLayer.lyr")             arcpy.mapping.AddLayerToGroup(df, lyr, addLayer, "BOTTOM")      No luck still! Thanks for all the suggestion also!! I will keep trying! ** This script is working now!! _*_ Thanks Roy!


Performing Network Analysis for Emergency Response using ArcGIS Desktop?

I am working on a project using Network Analyst to determine official emergency response zones for fire departments. The shape of each zone will be determined by the network (at least 1 department must arrive at the destination within 4 minutes of drive time), and each zone will be attributed with station numbers in order of most accessible resources. For example, one zone might be attributed with 3, 2, 5, which means Station 3 is the first to respond to that zone, and if they need more resources (or 3 isn't available), Station 2 is dispatched, and the same with Station 5. The end result will be a map showing each zone, labeled with each station number in order. I have found good information on NFPA standards, which are standards that firefighters follow in the United States, such as:   * first vehicle must arrive within a travel time of 4 minutes   * all companies assigned on the first alarm must arrive within an 8 minute travel time But I haven't found any standards on how to perform the **analysis**. This ESRI white paper describes how ArcGIS can be useful for fire response, but doesn't go into too much detail. I have done service area analyses before using Network Analyst, so I am not asking for steps to perform this. What I need to know though, is **are there any standard ways, or common practices, that emergency response network analyses are done?** Or is this typically handled using whatever methodology the customer agrees to or suggests? For example, in this case the customer said that assuming 35 mph in town and 50 mph out of town sounds good, so we'll go with that. Adding global turn delay values makes the analysis more realistic as well. But for these assumptions, I want to be sure that I'm not reinventing the wheel. If there are already standards or best practices for these assumptions (for emergency response), I want to follow them.


Removing small spaces (slivers) between polygons?

I have a set of polygons representing administrative districts. The districts were digitized by hand, and there are small spaces (slivers) between polygons where the polygons should be touching. How can I have the polygons snap together, removing the spaces? QGIS preferred, but ArcGIS and general programming are also options.


ESRI JS API PopupMobile - view attribute page directly

I am using the ESRI Javascript API to write a mobile web application. I have used the `PopupMobile` widget for viewing/editing attributes. This widget creates a popup on the map when a feature(s) is clicked and then provides a button to access the attributes in a new page. I would like to bypass the popup altogether and go directly to the attribute page. Is this possible? **UPDATE:** I created my own `onClick` handler instead of using the `PopupMobile` widget, but I'm getting some very interesting results in my attributes page. Here is a screenshot of the `AttributeInspector` widget as it displays on the page I set up in my application: ![enter image description here](http://i.stack.imgur.com/SBEHd.png) As you can see, the various `dijits` that make up the `AttributeInspector` are not displaying properly on the page. Here is the code I used to set up the `AttributeInspector`:               mapDeferred.addCallback(function(response) {         map = response.map;              currentItem = response.itemInfo;         $("#webmapTitle").html(currentItem.item.title);              resizeMap();              var fl = currentItem.itemData.operationalLayers[3].layerObject              var layerInfo = [{             featureLayer : fl         }];              var attInspector = new AttributeInspector({             layerInfos : layerInfo         }, "attributeInspector");         attInspector.startup();              dojo.connect(map, "onClick", function(evt) {                  var toleranceInPixels = 10;             var pnt = evt.mapPoint;                  var pixelWidth = map.extent.getWidth() / map.width;             var toleranceInMapCoords = toleranceInPixels * pixelWidth;             var ext = new esri.geometry.Extent(pnt.x - toleranceInMapCoords,                 pnt.y - toleranceInMapCoords,                 pnt.x + toleranceInMapCoords,                 pnt.y + toleranceInMapCoords,                 map.spatialReference);                  var q = new esri.tasks.Query();             q.geometry = ext;                  fl.selectFeatures(q)                  $.mobile.changePage($("#attributePage"));                        })     });      And here is the markup:

Attributes
             Map


Problem with reprojecting raster from MGI 6 to WGS

When I reproject a raster from Mgi 6 to WGS 84 using Warp in Quantum gis it makes mistake ( about 380m). Is there any way to avoid this?


'NoneType' object has no attribute

I am new to python geospatial programming. i ran the following script and got the corresponding error message               >>> import osgeo     >>> import osgeo.ogr     >>> shapefile = osgeo.ogr.Open("tl_2009_us_state.shp")     >>> numLayers = shapefile.GetLayerCount()          Traceback (most recent call last):            File "<pyshell#5>", line 1, in <module>         numLayers = shapefile.GetLayerCount() AttributeError: 'NoneType' object has no attribute 'GetLayerCount'


Generating nodes where edges meet, PostGIS, pgRouting

Recently I was doing some research on how to assign nodes (as POINT type geometry) to existing edges of a topology network and store them in a different table. Call it nodes table. I have all the edges, they have source and target fields among some other fields as well. My main idea is, that say, I want to input a location - POINT(lat, lng) - into my routing app. Then what I want my app to do is to find the point closest to my given location in the nodes table in order to start the routing process. In my research, I examined the functions `ST_StartPoint()` and `ST_EndPoint()` as possible functions that could come handy while implementing this. Ideally, I would loop thru the edges and get and record both the start- and the endpoints of each, but that raises another issue of having multiple identical points in the nodes table. Am I on the right track of implementing this right or could you advise a better solution? Any feedbacks or ideas are welcome! Thanks in advance Tamas p.s.: The proximity search feature is fine, I can do that. The only issue is the node generation.


QGIS - WGS84 to BC Albers reprojection no curved lines, any idea why? How to snap a line to a point?

I am trying to learn a bit about QGIS. So I thought I would drop in some layers of my Province and then recreate some points representing the BC Albers Central Meridian, and the two standard parallels. Why when I reproject my straight lines from WGS84 to BC Albers do they not curve like they should? I drew them in WGS84 as the image illustrates. I hope I have outlined my problem clearly, if not please ask for clarification. I would appreciate any input on this, thanks! I could not post my picture illustrating this problem but hopefully it is accessible on my dropshots account: http://www.dropshots.com/stwomey%23date/2012-05-19/11:13:44 Well it looks like the link doesn't go directly to the picture... darn it!


How can I make my data efficient and "light" to do 3D Visualizations in Google Earth?

As a test run, I'd like to visualize population on census blocks for a few states (New England for example). I assume that the kml to do this will be huge, when you factor in the census boundaries and population data. How can I make my data efficient to be able to do such visualizations keeping in mind that I might extend this to having multiple census periods, and doing a time lapse combined with a flythrough? Also note that usage of Google Earth isn't necessary. I'm open to using QGIS


Indoor mapping with floor plans and item(s) to track

Warning: GIS noob here. Essentially I want to be able to create a floor plan for a given room. Consider the following image of a floor plan in image format: ![basic floor plan](http://i.stack.imgur.com/oiQQt.png) I would have the measurements of every wall / door / etc., but not in digital format. I want to be able to place items in certain locations and log their location, and then be able to programmatically update their locations. To keep it simple, I would like the coordinate reference system to be local, i.e., the bottom left of the floor plan is seen as location (0.000, 0.000). I am planning on using QGIS (QuantumGIS) to make the digital map in GIS standard formats, then utilize a PostGreSQL instance with PostGIS to maintain the location history of the items as well as the floor plan. The end goal is to allow an Android application to query a web service for the digital floor plan and the locations of all item(s) to be displayed. I haven't looked much into how this would be done, but I was thinking maybe utilizing OpenLayer. Is using QGIS / PostGIS overkill for what I want to do? Is there a simpler way to do this? I realize I could eliminate the usage of GIS altogether if I was building the application for one specific floor plan, but I would like it to be extensible in the future to support other floor plans. If it isn't overkill, how do I go about using QGIS to digitize a "hand-drawn" floor plan into the appropriate format PostGIS will want? Thanks for any help.


splitting a lines layer using points

I'm looking to accomplish a similar task to this thread: How to split a line at point positions? Using QGIS and the Processing and GRASS toolboxes available, I'm looking to split a vector layer representing a hydrolic network at points which represent junctions. I've been told v.distance exists in Processing as well, but I can't access it. Using GRASS v.distance, I get the error notice that not enough columns are available.


Convert from shapefile to GPX with selected attributes

I have a points shapefile that originally came from a GPX file (imported using QGIS). The original GPX file contained waypoints only and has disappeared. The shapefile has many attributes, but only some have data. Below are these attributes with two example data records (some decimal values discarded to fit onto one row).                 TYPE    IDENT    LAT     LONG      Y_PROJ        X_PROJ          COMMENT     WAYPOINT    JS    -31.6    22.6    -23610488.1    8084542.7    29-AUG-09 13:56     WAYPOINT    PS    -31.6    22.7    -23610333.7    8084487.4    29-AUG-09 14:01      A client of mine would like to convert the shapefile back into GPX, retaining the IDENT attribute as the label for each waypoint; he wants to use the GPX file in Garmin's Basecamp software. I have exported the shapefile sucessfully from both QGIS and ExpertGPS, but when I open the files in Garmin's Basecamp softare, each waypoint has only a sequential number as label. When I look at the GPX files in a text editor, all the atrribute information is there. For example:               <wpt lat="-31.695305019999999" lon="22.647454610000000">       <type>WAYPOINT</type>       <extensions>         <ogr:IDENT>JS</ogr:IDENT>         <ogr:LAT>-31.69530502</ogr:LAT>         <ogr:LONG>22.64745461</ogr:LONG>         <ogr:Y_PROJ>-23610488.11619880</ogr:Y_PROJ>         <ogr:X_PROJ>8084542.75904646</ogr:X_PROJ>         <ogr:COMMENT>29-AUG-09 13:56</ogr:COMMENT>         <ogr:DISPLAY></ogr:DISPLAY>         <ogr:SYMBOL></ogr:SYMBOL>         <ogr:UNUSED1></ogr:UNUSED1>         <ogr:DIST>0.00</ogr:DIST>         <ogr:PROX_INDEX></ogr:PROX_INDEX>         <ogr:COLOR></ogr:COLOR>         <ogr:ALTITUDE>1382.49</ogr:ALTITUDE>         <ogr:DEPTH>0.00</ogr:DEPTH>         <ogr:TEMP>0.00</ogr:TEMP>         <ogr:WPT_CLASS></ogr:WPT_CLASS>         <ogr:SUB_CLASS></ogr:SUB_CLASS>         <ogr:ATTRIB></ogr:ATTRIB>         <ogr:LINK></ogr:LINK>         <ogr:STATE></ogr:STATE>         <ogr:COUNTRY></ogr:COUNTRY>         <ogr:CITY></ogr:CITY>         <ogr:ADDRESS></ogr:ADDRESS>         <ogr:FACILITY></ogr:FACILITY>         <ogr:CROSSROAD></ogr:CROSSROAD>         <ogr:UNUSED2></ogr:UNUSED2>         <ogr:ETE></ogr:ETE>         <ogr:DTYPE></ogr:DTYPE>         <ogr:MODEL></ogr:MODEL>         <ogr:FILENAME></ogr:FILENAME>         <ogr:LTIME></ogr:LTIME>       </extensions>      Does anyone know how I could achieve this? Thanks Hanlie


Does cartodb support arabic text?

I'd like to use Arabic text in my map. I saw this post earlier about Cyrillic text (Does CartoDB support alphabets other than Latin?), but does anyone know about Arabic? Thanks!