Polygon coordinates Format in Openlayers?

I am new to Openlayers and I am moving my application from Google Map to Openlayers. And also successfully displaying Polygons (coordinates captured via Google Map in Decimal Degrees - default for Google Maps), When I am drawing the polygon on a layer and on `onFeaturesAdded` Event, while getting co-ordinates of added feature like this                var tArr = event.features[0].geometry.getVertices();      output comes out like               [POINT(-919690.32419922 -5068080.7227148),POINT(1780677.0106836 -6868325.6126367),POINT(1819812.7691602 -6868325.6126367)      But, while I am drawing this feature back to OpenLayers displays NOTHING. Questions are : 1). Google Uses **Decimal Degrees** Notions to give points of Geometry, Openlayers give in which GIS notation ? (searched on web found nothing) 2). When I am saving co-ordinates in same Projection and redrawing it back, give nothing to me, why ? thanks for any help.


Raster terrain analysis on QGIS 2.0.1 - No curvature analysis?

I need to perform a curvature analysis on a DEM. I've found this tutorial http://www.gistutor.com/quantum-gis/20-intermediate-quantum-gis- tutorials/48-quantum-gis-qgis-raster-based-terrain-analysis-techniques.html that mentions a "Total curvature analysis" on the Raster terrain analysis plugin. However I've been unable to find that option in the plugin's menu. I am relatively new to QGIS, so I may be missing something, or has that function been discontinued? Thanks in advance


FME Donut Hole Extractor

I am using FME to fill in some small holes within polygons. I have used DonutHoleExtractor to split these out, however I have found the output via the HOLE port also brings existing 'filled' holes (valid polys that have an outershell). How can I differentiate these??


How to handle spatial join 10 chars field name limit?

When I try to perform a spatial join between a point and polygon file, I get a notice saying spatial join will not be performed because following field names exceed 10 Characters. Kindly help to rectify this. Regards.


Can overlays have different resolutions from the base layer?

I am trying to show a regional map on top of base map but without success. While debugging I noticed that my regional map has a different set of resolutions from the base. Is this allowed in OpenLayers? See http://jsfiddle.net/Sq9hE/15/ If you change the map options to use `yorkLayer`'s resolutions array then the regional tiles will load but no the base map's.


Layer misalignment with UK Ordnance Survey data and OpenLayers

I am in the UK and my QGIS projects are based on UK Ordnance Survey mapping data and are set up in EPSG:27700. Whenever I have tried dropping an OpenLayers layer (Google Satellite/Bing Maps Aerial) in via the OpenLayers plugin (v0.90) it is always offset by 10 metres or so from my mapping data (rendering it useless). I have tried turning on 'on the fly' reprojection, reprojecting in Google Mercator (EPSG:900913), starting a new QGIS project in Google Mercator projection, etc etc but the result is always the same. _I don't suppose anyone can **describe a workflow** that would result in a QGIS project containing an OpenLayers layer correctly aligned with (UK Ordnance Survey) mapping data?_ (Apologies if this is the wrong place to post this type of query but I am inclined to think it is a case of me being stupid rather than a bug in the software.) **----Edit----** **Update...** The problem appears to be with QGIS, as an export of a correctly georeferenced vector map to KML as suggested by nhopton below also results in a misalignment with the satellite imagery.


How to open two projects at once in one QGIS window?

is it possible to have open two gis projects at once within QGIS? I want to compare the position of points between two different coordinate refercence systems. nice regards, jörn


Which open source software to create desktop interface for Geo-processing tools?

I want to create an desktop interface to create geo-processing tool and that to using Open source GIS software. I will be using Postgresql and postgis too to save and retrieve data for operations. I want to save resulted geo- processing data with naming conventions in Postgresql. For that i want to know Open sources Software to create interface, geo-processing tool and how tO save and retrieve same. Is it possible?


Is it valid to have a properties element in an geoJSON featureCollection?

Is it valid to have a properties element with a featureCollection-element as parent? This is, according to geojson.org valid:               { "type": "FeatureCollection",       "features": [                   { "type": "Feature",                     "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},                     "properties": {"prop0": "value0"}                   }                   ]     }      But I can't find is it is valid nor if it is in-valid to have this:               { "type": "FeatureCollection",       "properties" : { "description" : "This is the geometry for..." }       "features": [                   { "type": "Feature",                     "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},                     "properties": {"prop0": "value0"}                   }                   ]     }      According to the answer underneath it is not in-valid to put it there, but programs/scripts won't know its there. So, let me rephrase the question: (Where) Is it possible to put some descriptive information about the property as a total??


Error reading database file from: /Applications/QGIS.app/Contents/Resources/resources/srs.db

I've suddenly started getting the following error using QGIS 2.0.1 on Mac:               Error reading database file from:     /Applications/QGIS.app/Contents/MacOS/../Resources/resources/srs.db     Because of this the projection selector will not work...      This results in my map not rending at all and the application frequently crashing. What is causing this and how do I fix it?


Converting coordinates: Feet to Degrees-Minutes-Seconds

I have a point shapefile and I want to get the coordinates for each point in Degrees-Minutes-Seconds format. When I use Add XY Coordinates (Data Management) it gives me the coordinates in Feet format. Any idea/ thought?


Calculate distance to median point for a group of points in ArcGIS 10.1

I have a shapefile called "household_points" of ~2,000 points, which are divided into about 100 sites. The shapefile has a field in the attribute table called "SNAME" and in the field each point is assigned to a site. Using Median Center, I have created a new shapefile, called "household_points_median" for the median point for all the sites. Now, I want to calculate the distance from each point in each site in "household_points" to its corresponding median point in "household_points_median". I know I can select the appropriate records for each site in the two shapefiles and use the Point Distance Tool, but as there are about 100 sites this would be laborious. I feel like it can be done iteratively, using a for loop in python or something, but I'm not really sure how to loop over field in an attribute table. Or maybe there's just a better tool? Thanks in advance!


display a kml on rumsey historical map

i want to diplay a kml (on a public url) on this map http://rumsey.geogarage.com/maps/g2104028.html?lat=44.22158376545796&lon=10.634765625&zoom=8 any hint to start? looking at that page source i see   var map = new geogarage.Maps(document.getElementById("map"), MY_IMAGE, {method:"overlay"}); but i'm not finding anything about geogarage documentation


Question about the TableInfo function in MapBasic

I have a problem I really can't seem to get my head around, MapInfo crashes when I try to run and if statement. I have pretty much exactly the same code in another sub to check for other things and that works perfectly fine. It crashes on the zlRow = TableInfo("zerolengths",TAB_INFO_NROWS), I've tried this with zlRow = TableInfo(0,TAB_INFO_NROWS) as there will only be one TAB file open when this rool is running. I just don't know why it works for other subs and queries but not this!!               Sub LenSub          nMID = FrontWindow()          nLayers = MapperInfo(nMID, MAPPER_INFO_LAYERS)          sLayer = LayerInfo(nMID, nLayers, LAYER_INFO_NAME)          Dim sDir as String           sDir = PathToDirectory$(TableInfo(sLayer,TAB_INFO_TABFILE))              '###Check for blanks          Dim sLen as string          Dialog         Title "Length"         Control statictext             Title "Enter length field"         Control edittext             Value sLen             into sLen         Control OKButton         Control CancelButton          if commandinfo (CMD_INFO_DLG_OK) then          Else     End Program     End if          Run Command "select * from " & sLayer & " where " & sLen & " < 1 into zerolengths"          Dim zlRow as smallint          zlRow = TableInfo("zerolengths",TAB_INFO_NROWS)          if zlRow > 0 then         Export Multipolylines Into sDir & "zerolengths.csv" Type "CSV"          Delimiter ","      Titles              Dialog                 Title "Zero lengths"                 Control statictext                     Title "Sections with zero lengths exported into zerolengths.csv"                 Control OKButton     Else     End If          End Sub      Thanks, Alan


Mosaic Imagery to Tile Grid

I am hoping to come up with a script that would allow me to mosaic imagery into a polygon tile grid. My hopes is to do this with gdal or QGIS. I am wondering if anyone knows of an existing script, before I start. My first thoughts was to use gdal_merge, but I do not see a variable for using a polygon (shapefile) as the boundary. gdal_merge does have the -ul_lr function, so I know that it will work on subsets of images. What I am looking to do is the following: From a source of ortho imagery, transfer any and all pixels that intersect with the tile grid, then move on to the next grid. There may be 10 source images (for example) that are large in size (geographic extent and disks space) that would be used to populate the individual grid tiles (ie: 1km X 1km). Thanks....


Is there Python 3 module to read .dbf files written by ArcGIS for Desktop?

I would like to know whether there are Python 3.x-compatible (preferably Python 3.3) modules to read the kind of .dbf files produced by ArcGIS for Desktop. All the modules I found were only compatible with Python 2.x. I may have missed something, but I really couldn't find any which was compatible with Python 3.x.


Calculate area within Python script in Arcmap

_I am trying to calculate the area of a polygon within my Python script._ I create a new polygon from merging two together, and I'd like to add the area of the resulting polygon to a field in the output file. The polygon is stored in a regular shape file, and is projected. Area preferably in map units. I would have thought this to be a quite common and simple task, but despite a lot of googleing I have been unable to find a working solutions so far. I was planning on using arcpy.updateCursor to insert the value once it's calculated (there's only one feature in the FC at this stage), so easiest is if it can be returned as a variable. Any alternative solution that accomplishes the same task (getting the area value into correct field) will also work. I have also tried the Field calculator from Python. Modified from the help pages I thought the following would work, but so far no luck.               arcpy.AddField_management(tempPgs, "Shape_area", 'DOUBLE')     exp = "float(!SHAPE.AREA!.split())"     arcpy.CalculateField_management(tempPgs, "Shape_area", exp)         Any help would be much appreciated. Running ArcGIS Basic 10.1 SP1 with Python 2.7 on Windows 7. Relevant parts of my current code looks like this:               #/.../     arcpy.Copy_management(inpgs, outpgs)     arcpy.AddField_management(outpgs, 'Shape_area', 'LONG')     fields = AM.FieldLst(outpgs)          #/.../          # Identify and search for shapes smaller than minimum area     where1 = '"' + 'Shape_Area' + '" < ' + str(msz)     polyrows = arcpy.SearchCursor(inpgs, where1)          for prow in polyrows:         grd1 = prow.GridID   # GridID on the current polygon         grd2 = nDD.get(grd1) # GridID on the polygon downstream              # Update features         if grd2             geometry1 = prow.Shape             geometry2 = geometryDictionary[grd2]                  # Update temporary features             arcpy.Merge_management([geometry1, geometry2], tempMerged)             arcpy.Dissolve_management(tempMerged, tempPgs)                  fds = AM.FieldLst(tempPgs)                  for field in fields[2:]:                 arcpy.AddField_management(tempPgs, field, 'DOUBLE')                  for fd in fds[2:]:                 arcpy.DeleteField_management(tempPgs, fd)                  exp = "float(!SHAPE.AREA!.split())"             arcpy.CalculateField_management(tempPgs, "Shape_area", exp)                  # Append them to output FC             try:                 arcpy.Append_management(tempPgs, outpgs, "TEST")             except arcgisscripting.ExecuteError:                 arcpy.Append_management(tempPgs, outpgs, "NO_TEST")              elif ...              else ...


How to call a querytask.execute in a event

My map needs to be updated every 15 minutes. I need to query to get new data time from the update. So i put a query function in "update-end" event. However the display function is never called. please help. Thanks system info: ArcGIS Server 10.2.1 Javascript API 3.9                   var l;                      if (layer.type == 'dynamic')                  {                     l = new esri.layers.ArcGISDynamicMapServiceLayer(layer.url, layer.options);                          l.on("update-end", function (evt)                     {                         refreshcount++;                         var timequery = new query();                         alert("fewsquerytask==" + config.fewsQueryTaskService);                         var queryTask = new QueryTask(config.fewsQueryTaskService);                         timequery.returnGeometry = false;                         timequery.outFields = ["PACKET_DATE_TIME"];                         timequery.where = "PACKET_DATE_TIME is not null";                              queryTask.execute(querytime, showTime);                              function showTime(listfeatures)                         {                             alter("inside showTime");                             var feature = listfeatures.features[0];                             var value = feature.attributes["PACKET_DATE_TIME"];                             alert("packet value==" + value);                                  dom.byId("packettime").innerHTML = "Refresh:  "+refreshcount+"  Packet Time:  " + value;                         }                                                         });


MapInfo Populating Dates in Table

I am opening an Excel spreadsheet in MapInfo. One column of the Excel spreadsheet holds a date per row. Some of the rows dont have an assigned date this is fine. When opening the table in MapInfo, the browser window shows that these blank cells have now been infilled with the date 1899? How can I stop this happening?


Las to bare-earth DEM: average points spacing and cell size

I am using ArcGIS 10.1 to generate a DEM (bare earth) from LAS dataset. To accomplish this, I use 'Las Dataset to Raster' tool as described in Esri website. I have read here and there in the web that the the cell size of the output raster should be set at a value corresponding to the average LAS points spacing; somewhere else, they suggest to use a value that is three times the average point spacing. Now, since I wish to produce a bare earth DEM (i.e., with only ground returns), I am wondering if the cell size has to be set at the average point spacing of the whole LAS dataset (i.e., comprising non-ground, ground, etc), or exclusively of the ground points? On the basis of the ArcGIS's 'point file information', I managed to get statistics for each lidar class. The average spacing (whole dataset) is 1.5 m, while for ground points only is 0.67. Any insight into the issue?


Writing a final output to geodatabase in Model Builder

I wanted to write a Model Builder but I am not sure how to do save the final output as a geodatabase. ![enter image description here](http://i.stack.imgur.com/9keD1.png) I am working on to classify each imagery (about 83 of them) and then sent it to a polygon and then rename it to the same name from the original file to save to the geodatabase. It is working but I could not get the final output to change the pathname to the geodatabase I wanted.


OpenLayers.Layer.Vector and BBOX

i configured this on my client page               var kmlLayer = new OpenLayers.Layer.Vector("KML" ,{         strategies: [new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.BBOX()],         protocol: new OpenLayers.Protocol.HTTP({             url: "http://localhost:8080/geoserver/wms/kml?layers=avl:mobiles",             headers: {'Access-Control-Allow-Origin': '*'},             format: new OpenLayers.Format.GeoKML({                     extractStyles: true,                     extractAttributes: true,                     maxDepth: 2,                     bbox: '11.246,43.777,11.24833,43.833'             })         })     });      but at every refresh I got this error message on GeoServer log               13 giu 16:19:07 INFO [geoserver.wms] -     Request: getServiceInfo     13 giu 16:18:18 INFO [geoserver.wms] -     Request: kml         Filters = null         Tiled = false         Palette = null         SRS = null         FeatureVersion = null         Styles = [StyleImpl[ name=point]]         Layers = [org.geoserver.wms.MapLayerInfo@a1fef13]         MaxFeatures = null         Crs = null         Bbox = null         RemoteOwsType = null         RemoteOwsURL = null         Env = {}         FormatOptions = {}         Angle = 0.0         CQLFilter = null         Elevation = []         FeatureId = null         StartIndex = null         ViewParams = null         BgColor = java.awt.Color[r=255,g=255,b=255]         Transparent = false         SldBody = null         ValidateSchema = false         Sld = null         SldVersion = null         TilesOrigin = null         Exceptions = SE_XML         Height = 0         Width = 0         Filter = null         Time = []         Format = null         Buffer = 0         Request = GetMap         RawKvp = {LAYERS=avl:mobiles}         Get = true         BaseUrl = http://localhost:8080/geoserver/         RequestCharset = UTF-8         Version = null          13 giu 16:18:19 INFO [geoserver.wms] -     Request: getServiceInfo     13 giu 16:18:19 ERROR [geoserver.ows] -     org.geoserver.platform.ServiceException: GetMap requests must include a BBOX parameter.      Any help? Thanks in advance.


Is it possible to have run-time dynamic table updates to visualization using javascript interacting with postgis and geoserver

I have an idea of/have seen implementations, of dynamic map retrieval/updating using wms on openlayers by using updates to a postgis database which was hooked into geoserver and having a refresh policy. I have also seen examples done using cURL with php and python. Is this possible using JavaScript without using openlayers? The reason I don't want to use openlayers is because my "base map" is a google earth plugin and I've heard they don't really get along well. In any case how would I update a postgis database which is connected to geoserver so that I can essentially move a point's coordinates and display this accordingly? And I know that using geowebcache is how geoserver updates the databases it is connected to, but I have heard issues regarding this before as such what was the process for making sure geoserver updates? Preferably I'd like to do this in JavaScript without some kind of wrapper.


OGR FeatureCount returns '-1' with OSM data

I am trying to read in an OSM file with OGR.               import ogr     driverOSM = ogr.GetDriverByName('OSM')     roadsDs = driverOSM.Open('data/map.osm', 0)     roadsLayer = roadsDs.GetLayer()      The feature count returns `-1`               print roadsLayer.GetFeatureCount()      When I loop over the features only points are returned, eventhough I know there are ways too (tested the data in QGIS).               featureStand = roadsLayer.GetNextFeature()     while featureStand:       geomStand = featureStand.GetGeometryRef()       print geomStand       featureStand.Destroy()       featureStand = roadsLayer.GetNextFeature()      Can anybody reproduce that or sees what I am doing wrong? * * * Python 2.7.5, GDAL 1.10.1, did not modify `osmconf.ini`


How to perform euclidean distance analysis with coefficients?

I would like to perform an euclidean distance analysis in ArcGIS 10 for multi- points which represent seaports. The thing is these facilities have different capabilities for handling and i want to take this specialty into consideration in my analysis. Thats why i added a column in my attribute table. How i represent this coefficient in my analysis? Thanks for your helps.


Handle error if geocoding exceed request limit - mapquest geocoding

I use Mapquest's Open Geocoding API for Address Geocoding The Open API has a limit of 5000 requests per day. My question is , how can I get a warning that the limit is exceeded , so I can show a message to the user like "Sorry, service not available" Is there an error coming from the service, so I can catch it and show a message? My code is like that                 $.ajax({           type: "POST",           url: "http://www.mapquestapi.com/geocoding/v1/address?key=hereIsMyKey",           data: { location: userInput, maxResults: 1}               })         .done(function( response ) {            //take lon-lan and show them to map


Why do I get a no module error when I try to batch process in Arc10?

I was trying to batch reproject a set of shapefiles and I kept getting the error `No OS Module` As the set was relatively small I just did it individually, however I want to be able to batch process in the future. How do I correct this problem? Any advice or answers would be greatly appreciated. Thanks, Jason


How to concatenate double with string in field calculator with Python expression?

I'd like to concatenate my lat/lng with a few string fields in ArcGIS. What is the correct expression to use, avoiding VBA. I don't want to convert the lat/lng fields to string either. my 4 fields are category, type, x, y. with x and y being doubles.


PCA on correlation matrix in ArcGIS

I am trying to run a PCA on a set of normalized raster bands within ArcGIS. I would like to calculate the PCA on the correlation, not the covariance, matrix of the PCA, but Arc as far as I can tell only calculates PCs on the covariance matrix of the input bands. It seems the only fix to this is to feed the tool pre-normalized band values in the form of a z-score. I z-scored all of the input raster bands before feeding them into the Principle Components tool in Arc 10.1. The function is completing nicely, but the output is producing bands with mean values of anywhere between 9 and 34, even though they should be producing bands with a mean of 0, due to the nature of a PCA. What am I missing? Has anyone has experience with this issue before? As requested, , here is a snapshot of my study site with a zscore raster overlaid: you can't see it well: ![enter image description here](http://i.stack.imgur.com/8ajfi.png) Here is a zoom-in to a New Jersey site showing PCA bands: ![enter image description here](http://i.stack.imgur.com/Nrcyu.png) Finally, here is a screenshot of the first 2 PCA band output properties:![enter image description here](http://i.stack.imgur.com/wquV9.png)


How to get arcpy.AddMessage() to display a message from a script tool called from another script tool?

I am using a python script tool within an ArcToolbox in ArcGIS 10.2. The script calls another python script tool while running but does not display the messages from the called script when using the arcpy.AddMessage() method. Example: scribtbox (ArcToolbox) two script tools   * script1   * script2 script1:               import arcpy          # output to the screen     arcpy.AddMessage("Doing routine 1...")     routine1()          # call script2     arcpy.script2_scriptbox      script2:               import arcpy          # output to the screen     arcpy.AddMessage("Doing routine 2...")     routine2()      The output model run dialog box in ArcGIS says:               > Doing routine 1...      and then finishes without saying the message from script2. I'd like it to say:               > Doing routine 1...     > Doing routine 2...      and then finish. Is this functionality not built in, am I doing something wrong, or is there some other issue at hand. Thanks.


SAGA-GIS Produces different results in command line than GUI

I have been working on a lidar processing workflow using SAGA-GIS. I determined my workflow on a single tile in the SAGA GUI and now I need to batch the operations on 100 more tiles. I wrote a batch file to call the SAGA Command Line to run all the las files in a folder. I noticed, though, that the out DSM created by the command line process looks much more blurred and interpolated than the DSM I created in the GUI for the same tile. Then, I started to investigate, so I started running each individual process of my workflow in the GUI and in the command line with the same data. The very first step is to import the LAS file. In the GUI, this doesn't save to a .spc file, it just seems to do it in memory. With the command line, it will save a .spc file from the LAS file. These two files are different: ![Pictures of Results and Min/Max Values](http://i.stack.imgur.com/IZVWv.png) The picture in the upper left is the point cloud created when I imported the LAS file in the SAGA GUI. Notice the values circled in the lower left image. Those are the Min/Max values of the upper left point cloud. The picture in the upper right is the SPC file that was created when running the Import LAS module via the command line. Notice the Min/Max values circled in the bottom right. As far as I can tell, all the parameters I used were identical. In fact, I ran the GUI version first and then right-clicked on the module to create the batch file with all the same parameters. Can anyone help me with this? The DSM's created by the batch file are not nearly as clear as the one created by the GUI because they require more interpolation and cannot be used for identifying tree canopy.


How to export QGIS contour attributes in a DXF file?

I'm new to this. I have a .tiff data file that generates contours in QGis. That's super. I save it as .dxf. The contours don't have any attributes or data. That's bad, because I want to make a 3D landscape in Revit using the information. How do a save/export the contour lines from QGis so that they have a Z-elevation attribute or at least some information... Thankful for help!!! * * * I got an answer, but the post was changed so i don't know where it went... Anyhow... I ticked the attributes box when extracting the contours, but the attributes doesn't show in the dxf...


"Error HRESULT E_FAIL has been returned from a call to a COM component." during using geoprocessor by VB.net

I am also get a error shows like "Error HRESULT E_FAIL has been returned from a call to a COM component." And the Exception snapshot shows the "stacktrace" is at "ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute". Can you help me to solve it? The thing is that I can using the geoprocessor by C#, but can't using it by vb.net. Is it something wrong with the setting or .NET framework? Also, the Com Exception is -2147467259! Private Sub RunBuffer()                   Dim gp As IGeoProcessor2 = New GeoProcessor()         gp.OverwriteOutput = True         Dim sev As Object = Nothing              Try             Dim parameters As IVariantArray = New VarArray()             gp.AddToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Data Management Tools.tbx")             gp.SetEnvironmentValue("workspace", "C:\gp\AirportsAndGolf\golf.gdb")                  parameters.Add("C:\gp\AirportsAndGolf\golf.gdb\Airports")             parameters.Add("C:\gp\AirportsAndGolf\golf.gdb\Airports_buff2")             parameters.Add("1000 meters")                  gp.Execute("Buffer_analysis", parameters, Nothing)                 Console.WriteLine(gp.GetMessages(sev))              Catch ex As Exception             ' Print generic exception messages.             Console.WriteLine(ex.Message)             ' Print geoprocessing execution error messages.             Console.WriteLine(gp.GetMessages(sev))         End Try      End Sub


Can't insert AI CS6 files as objects into ArcMap 10.1

In the past I have inserted Adobe Illustrator files into ArcMap as objects. My old version of AI was 8.0 and ArcMap was 9.2. Now I have arcmap 10.1 and AI CS6. When the process doesn't shut down arcmap, it gives the message.."failed to create object. Make sure object is entered in system registry. ???????


geoserver/openlayers: multiple layer geotiff

I have a geotiff file with multiple layers (46 layers), each layer corresponding to a different date (the geotiff layers corresponding to sea surface temperature, 1 layer per year). I imported this geotiff in geoserver, but I can't render it with the geoserver visualisation tool (based on openlayers). 1./ does geoserver support multiple layers > 3 bands? 2./ if yes, when I query the WMS in openlayers, how can I select a given layer?


DEM error when trying to do topographic correction in GRASS

I'm new to GRASS gis and I'm trying to do a topographic correction (i.topo.corr) of 9 ASTER bands using SRTM dem. I keep getting this error message: > ERROR: Illumination model is of CELL type Is this error referring to my elevation raster, and if so how do I change the type to the appropriate one?


Export Web Map Task: Configure HTTP response headers

Is there any way to configure the http headers (response headers) of a geoprossessing task hosted by ArcGIS for Server? I would like to make the export web map task, return an image which would be directly downloaded by my browser.


Using Geoserver

I am new to GIS and interested in using Geoserver. I have had a look at tutorials and read some books on this but still feeling clueless. I intend to use C# to accomplish some tasks eg, plot points on a map, draw polygons from points of interest and show heat maps from such points. Looking forward to getting some pointers. Thank you.


How do I not specify a CustomerWeightField when scripting CustomerDerivedTA_ba?

When you run the Business Analysis toolbox wizard for creating a Customer Derived Trade area, you have the option of weighting each customer by count or for specifying a field (such as sales or number of visits) to use as a weight. You select this with radio buttons and if you select "count", then you don't have to specify a field. However, when scripting this tool, the CustomerWeightField is a required field. Leaving it blank yields a "This field was not found in the customer layer" type error message. In my case, I just want to use the count as the customers I'm analyzing do not have any other valid fields for weighting the results. Is there a magic value to enter for CustomerWeightField that will force it to use count? The documentation says: > The field used to calculate the trade areas. This is based on either the > number of customers (count) or the calculated weighted value assigned to > each customer. A fallback, I guess, would be to add a weight field and set it to 1, but I don't want to have to rely on modifying the input data.


co-registering a vector file to a georeferenced raster image

i would like to co-register a vector file to a raster image by a simple translation in envi. Is it possible to do this in envi? I have tried using the georeferencing tool in arcgis but the vector layer cannot be selected for georeferencing!


Convert String to Integer in QGIS tables

I want it to know how to convert string field values to integer values in QGis Dufour... there are numbers and strings in the same field, when I use toreal(string) it stops and it won´t create the field. Thanks in advance for your help! CIR


What do you think is happening to my QGIS Georeferencer

I'm pretty new with QGis, but have used tools as Openlayers and Geoserver for some years now without never being asked to diplay a georeferenced raster image. Which gets me to use QGis in order to build a Geotiff from a simple scanned PNG or JPEG. I've followed many tutorials, but I'm somehow still struggling to import any image file in my Georeferencer plugin window. Here's what I get when I import a jpeg image: ![enter image description here](http://i.stack.imgur.com/G24ZN.png) It looks like a badly read jpeg. Any idea ? Thanks for your help ! **EDIT** I've tried with a PNG by converting the original jpeg with an image tool (like IrfanView) and the image is now diplayed. It's better, but doesn't answer exactly why the jpegs aren't working ...


OpenLayers LineString: Not displaying the line (array of points)

I'm perplexed as to why tail_path is not drawing the line (can't see anything on the map) but the alert seems to be returning the correct data.               var path_travelled = new Array();     var path = json_coords.path_data;     for (i in path)       {                                    var lat = path[i].LINE_LAT;         var long = path[i].LINE_LONG;         path_travelled.push(new OpenLayers.Geometry.Point(long, lat));         alert(path_travelled);       }     var tail_path = new OpenLayers.Geometry.LineString(path_travelled);     vectors.addFeatures([tail_path]);      The alert for the path_travelled variable returns this (it adds a new POINT every time you click the OK button): ![enter image description here](http://i.stack.imgur.com/cQz1N.jpg) I'm using vectors.addFeatures (I have another variable I also use here but doesn't apply to this question so just removed it to avoid confusion). Any input on the matter is appreciated.


Hit test for dynamic object

I am drawing a dynamic moving vehicle like this:               m_dynamicSymbolProperties.set_DynamicGlyph(esriDynamicSymbolType.esriDSymbolMarker, this.bluePoliceCarGlyph);     m_dynamicSymbolProperties.SetScale(esriDynamicSymbolType.esriDSymbolMarker, .3f, .3f);     currentUnitPosition = getNextPosition();     dynamicDisplay.DrawMarker(currentUnitPosition);      Does anyone know an easy way to do a hit test on my vehicle? I am having trouble with this code example, http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_identify_objects_in_dynamic_display/0001000004s2000000/ * * * One of the issues I have with the example is that ESRI states: _ArcGIS versions 9.2 and later have the following three display systems that use OpenGL as their underlying drawing pipe—ArcGlobe/GlobeControl, ArcScene/SceneControl, and MapControl's dynamic display._ So I am trying to get a hit test for a dynamic display object, but according to the tutorial, part 1 (link above), I have to use the OpenGL display system to give my dynamic display object a watermark in order for the hit test to work. This makes no sense at all.               uint ID = Convert.ToUInt32(r[0]);     OpenGL.GL.glLoadName(ID);      * * * Another issue I have is when this code is called               IArray dynamicHitArray = m_dynamicDisplay.Locate(x, y,         esriDynamicSelectionMode.esriDSMLayers, this as IDynamicLayer);      Another event is fired off to DrawDynamicLayer and I will get a stackoverflow unless I do this               if(!someBool)     {         someBool = true;          IArray dynamicHitArray = m_dynamicDisplay.Locate(x, y,             esriDynamicSelectionMode.esriDSMLayers, this as IDynamicLayer);            someBool = false;      }


Is there a function or tool that will add vertices to polylines where endpoints are snapped to edges? (ArcMap)

My friend and I are creating a walking network, and we have been having issues getting the routing to work. We just realized that the reason why our routes are messed up is because we snapped our routes to edges as well as endpoints. The routing works fine where the lines are snapped at endpoints because they share a common vertex, but when snapped to edges only one line has a vertex at that location, and the network doesn't see them as connected. Is there a tool or function that will automatically create a matching vertex on the other line?


Top-of-atmosphere reflectance conversion with WorldView-2 images

I recently received a set of radiometrically-corrected dynamic range adjusted 8-byte WorldView-2 images. I want to convert to top-of-atmosphere reflectance and would like to use the FLAASH in ENVI 4.8 to do so. However, in reviewing the WorldView-2 radiometric correction information provided by Digital Globe I noted that the report states that "Caution is advised when applying the equations provided here to pan-sharpened products, dynamic range adjusted (DRA) products, or WorldView-2 mosaics with radiometric balancing because the generation of these products may apply non-linear transformations to the pixel DN values." As the images I received were dynamic range adjusted radiometric balanced, my question is what care exactly should be taken when converting to TOA reflectance? Some of my photos are mosaiced with images from separate dates so I assume that I use the spatial subset function in FLAASH to limit the atmospheric correction to each date. What am I missing?


How do I identify and gracefully kill hung Gp service processes?

I've published a gp tool as an asynchronous non-pooled gp service. When the gp tool hangs I would like to allow the user to kill it, without impacting other services. If I put a webservice on the SOM that kills a process based on an ID, will it harm other services? Related questions: Is there a way for a webservice running on the SOM machine to kill a process on a (different) SOC machine? The first thing the gp tool does is write out the hostID and processID to a log file, but I'd like a system to work for any gp service, not just ones that log this info. Is there a request I can make to the gp server that returns a hostID & processID for an arbitrary jobID? **Update:** I've decided to first implement a method to Cancel GP jobs, and then only pursue the process killing strategy if canceling proves ineffective. Since the REST API doesn't currently have a Cancel method, I will be doing this via SOAP. I've also been shown how to log the process IDs, so that way I won't need to rely on my own logging.


Recoloring geotiff for visual presentation

I have a rather big Geotiff. It is the mosaic of four RapidEye satellite images. They are all a bit bland/grayish. When combined I would like to freshen up their colors so that they are more visually appealing. The imagery will be used as a backdrop for other data. I have tried right-clicking on the raster in the layers list and selecting Properties. Using Symbology allows for detailed adjustments. But there is no easy way to auto-adjust the image color balance. Some image software like IrfanView has "auto adjust colors". IrfanView can not open my geotiff image, but this kind of functionality represents what I am looking for. To the extent I am doing analysis on the imagery I will of course not mess with the color balance.


How to download Leaflet vectors in GPX format?

I would like to use the leaflet.draw plugin to allow users to digitize vectors on the map. At the end the data should be downloadable as a GPX-file. Is there any sample that shows how this can be done?


Generating GeoJSON with Python

Hi I want to programatically create a GeoJSON file using polygons from a shapefile but adding attributes from my own application. This is easily done for a shapefile:               def create_data_dayer(self,varlist, data):         """         Creates a new shape to contain data about nodes.         varlist is the list of fields names associated with         the nodes.         data is a list of lists whose first element is the geocode         and the remaining elements are values of the fields, in the         same order as they appear in varlist.         """         if os.path.exists(os.path.join(self.outdir,'Data.shp')):             os.remove(os.path.join(self.outdir,'Data.shp'))             os.remove(os.path.join(self.outdir,'Data.shx'))             os.remove(os.path.join(self.outdir,'Data.dbf'))         # Creates a new shape file to hold the data         if not self.datasource:             dsd = self.driver.CreateDataSource(os.path.join(self.outdir,'Data.shp'))             self.datasource = dsd             dl = dsd.CreateLayer("sim_results",geom_type=ogr.wkbPolygon)         #Create the fields         fi1 = ogr.FieldDefn("geocode",field_type=ogr.OFTInteger)         dl.CreateField(fi1)         for v in varlist:             #print "creating data fields"             fi = ogr.FieldDefn(v,field_type=ogr.OFTString)             fi.SetPrecision(12)             dl.CreateField(fi)              #Add the features (points)         for n,l in enumerate(data):             #Iterate over the lines of the data matrix.             gc = l[0]             try:                 geom = self.geomdict[gc]                 if geom.GetGeometryType() != 3: continue                 #print geom.GetGeometryCount()                 fe = ogr.Feature(dl.GetLayerDefn())                 fe.SetField('geocode',gc)                 for v,d in zip (varlist,l[1:]):                     #print v,d                     fe.SetField(v,str(d))                 #Add the geometry                 #print "cloning geometry"                 clone = geom.Clone()                 #print geom                 #print "setting geometry"                 fe.SetGeometry(clone)                 #print "creating geom"                 dl.CreateFeature(fe)             except: #Geocode not in polygon dictionary                 pass             dl.SyncToDisk()      since I have all the geometries on a dictionary by geocode (self.geomdict) I simply create the features, set the fields and clone the geometries from pre- existing layer (code loading that layer ommited for simplicity). All I need now is a way to generate the GeoJSON from the combination of fields and geometries, naturally with the help of OGR to get the rest of the file right (CRS, etc. as from the source map) How do export the feature collection generated as above?


How to antialiase tiles when seeding a layer from an GeoTiff in GeoServer

I have an GeoServer running that uses GeoWebCache. As a data source I use a 1.5 GB big map for a layer. The outcome of the tiling and scaling are very rough looking tiles. Is there a way to antialiase the tiles, that they are more pleasant to look at?


QGIS: rotatable markers with offset from point

Im wondering, if its possible (in QGIS), to set a rotatable marker with offset from point, like in my example below. Any suggestion? ![enter image description here](http://i.stack.imgur.com/fvOF4.png)


I am looking for a list of mapping libraries?

I am looking for the top APIs that I can use to display maps from a number of map servers/sources. (like openlayers and openscales). So are there any other popular APIs for **other languages than javascript and flex** (C++,Java,C#... ) ? (it doesn't matter if it is free or not)


rpy2 installation ERROR "Tried to guess R's HOME but no R command in the PATH"?

I tried to install rpy2 (pip install rpy2). I want to use the SDAPP4 extension with QGIS (QGIS shows up the message missing rpy2...). The system tells me always the same error: `Tried to guess R's HOME but no R command in the PATH`. What can I do to solve the problem? I'm using:               Windows XP     Python 2.7     R 2.11.0 (directory: C:\Programme\R\R-2.11.0)     QGIS 1.8      Sorry, I'm a beginner. Thanx!


What is the latest version of R that supported gpclib?

Does anyone know what the latest version of R that supported the gpclib package? I was using the latest version but when I tried to install gpclib, it said that it was unable due to my version of R. The gpclib page gives the minimum version and requirements. Do I have to downgrade my version of R?


10.1 Marker Symbol Rotation Problem

I am trying to create a marker symbol (and then save the symbol as a style), but the origin of the items makes them rotate improperly (see pictures). Is there any way to merge all of the layers of the symbol? Or modify the origin of rotation? ![Before rotation](http://i.stack.imgur.com/e4whK.png) ![After Rotation - Incorrect](http://i.stack.imgur.com/2Dmg7.png) EDIT FOR COMMENTS: I am using the simple marker with multiple layers. The circle is the default circle with a second smaller white one added on top to create the label box. The main problem is the triangle should rotate around the origin of the circle, but I don't know how to modify this is the style editor. Thoughts?


Converting geometry_dump to Point geometry vertex

If this was a Point geometry `010100000001DE02098A1B52C090A0F831E62E4640`, is it possible to represent the above geometry_dump Point Vertex. I am trying with `St_collection`...,


Authentication in Geoserver 2.4.x from a web application

I am trying to build a web application using html and javascript from which I want to login to geoserver hosted at: https://weaveprod.ucdp.utah.edu/geoserver/web/ I have written the following code for authentication using javascript.But it is always giving login failed.Kindly help me out.               HTML code:                    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />     <title>Untitled Document</title>          <link rel="stylesheet" type="text/css" href="login.css">
     <form>         Username:         <input type="text" id="username" name="username">         Password:         <input type="password" id="password" name="password">
             <input type="checkbox" id="checkbox" name="checkbox">Keep me logged             in             <input type="submit" value="Login" onclick="login(option)">
              </form>
                           Javascript code:          function login (options) {     // url del servlet del geoserver     var url = options.server;     // parametros para el login     params = "username=" + options["user"] + "&password=" + options["password"];          var contentType = "application/x-www-form-urlencoded";     //se inicializa la petición ajax     var ajax = $.ajax({         data : params,         type : "GET",         crossDomain: true,         dataType: "jsonp",         contentType : contentType,         url : url     });     // se ejecuta cuando la peticion finaliza     ajax.done(function() {              if ($.cookie("JSESSIONID") != null && options && options.success) {             options.success();         }     });     // si ocurrio un error al realizar la peticion     ajax.fail(function() {         if (options && options.failure) {             options.failure();         }     });     // se ejecuta siempre al final de la petición, sin importar que esta     // haya fallado     ajax.always(function() {         if (options && options.always) {             options.always();         }     });     };      NOTE: Earlier in the javascript code, I used a POST request.But it is still giving a login failed message.The webpage and the server are in different domains and I do not have access to the source code of the server. Thanks, Sayan


How to reproject an EVF?

I have an .evf file and it is not opening in QGIS. How can we reproject the vector layer (specifically if we want to convert it from lat/lon to UTM projection)?


How to simply label raster cells?

I think the title says everything but: I want to generate a small sample raster (eg. euclidean distance or cost distance) to explain the method of cost-distance analysis, and I'd like to label the pixels with the corresponding cost-value. I already tried to lay a fish-net over the raster in arcgis, but I didn't find a good way to copy the values into the attribute table. I'd appreciate every hint! :)


Why the modifications I do in QGIS doesn't appear when I save an OSM file I created?

Through QGIS I loaded an OSM file I created and I'm trying to visualize what happens with the file in terms of codes after some modifications like adding points, lines or polygons. But the problem is that when I save the file with the OpenStreetMaps plugin the modifications don't appear as I was expecting... Here you can see the file I created and if you want, feel free to do the same test adding points or whatever, saving and then see if something changes in the new saved file.               <?xml version="1.0" encoding="UTF-8"?>     <osm version="0.6" generator="OpenStreetMap server">     <bounds minlat="52.2615973629" minlon="10.5262132592" maxlat="52.2653605629" maxlon="10.5313793802"/>     <node id="100" lat="52.264859" lon="10.528042" version="1" user="ribe_lu" visible="true" timestamp="2012-09-10T13:47:15Z"/>     <node id="101" lat="52.264859" lon="10.529796" version="1" user="ribe_lu" visible="true" timestamp="2012-09-10T13:47:15Z"/>     <node id="102" lat="52.262619" lon="10.528042" version="1" user="ribe_lu" visible="true" timestamp="2012-09-10T13:47:15Z"/>     <node id="103" lat="52.262619" lon="10.529796" version="1" user="ribe_lu" visible="true" timestamp="2012-09-10T13:47:15Z">         <tag k="made_by" v="Lucas"/>     </node>     <node id="104" lat="52.264186" lon="10.529078" version="1" user="ribe_lu" visible="true" timestamp="2012-09-10T14:20:17Z"/>     <node id="105" lat="52.26326" lon="10.529078" version="1" user="ribe_lu" visible="true" timestamp="2012-09-10T14:20:17Z"/>     <node id="106" lat="52.26326" lon="10.528801" version="1" user="ribe_lu" visible="true" timestamp="2012-09-10T14:20:17Z">         <tag k="made_by" v="Lucas"/>     </node>     <way id="25" visible="true" timestamp="2011-01-09T14:05:48Z" version="1" user="ribe_lu">         <nd ref="100"/>         <nd ref="101"/>         <nd ref="103"/>         <nd ref="102"/>         <nd ref="100"/>         <tag k="area" v="yes"/>         <tag k="Schloss" v="Arkaden"/>         <tag k="Postal_Code" v="38100"/>     </way>     <way id="26" visible="true" timestamp="2011-01-09T14:05:48Z" version="1" user="ribe_lu">         <nd ref="104"/>         <nd ref="105"/>         <nd ref="106"/>         <nd ref="104"/>         <tag k="Test_by" v="Lucas"/>     </way>     <relation id="75" visible="true" timestamp="2012-09-10T14:50:10Z" version="1" user="ribe_lu">         <member type="way" ref="25" role="outer"/>         <member type="way" ref="26" role="inner"/>         <tag k="type" v="multipolygon"/>     </relation>     </osm>      Thank you very much, Best regards, Lucas.


How to exclude outliers from raster using ArcGIS for Desktop?

I calculated terrain curvature from a DEM. The DEM I use is interpolated from point elevation data. Generally, the DEM seems to be good, but some artifacts from interpolation exist. Those artifacts cause extreme values for curvature. Around 90% of the curvature values are between -25 and 25, but the other 10% are between -500 and 500. I can use histogram equalize to properly visualize the curvature raster. For further analysis however I'd like to replace this extreme values. So my question is: How can I exclude this extreme values from the raster? I imagine something like this would work (pseudo-code):               m = median("curvature")     IF("curvature.value") > m * 10 THEN ("curvature.value") = m * 10     IF("curvature.value") < m * 10 THEN ("curvature.value") = m * 10      What tool would I use for this? I tried Raster Calculator, but I couldn't get the syntax right. Software: ArcGIS 10 with spatial and 3D analyst


Which is the correct projection in ArcGIS for EPSG:3857/900913?

I want to publish a mapservice in ArcGIS server, which will be overlayed on Google Maps or Bing Maps. For this, the Map Service needs to be in EPSG:3857/900913. The Google Maps projection is supposed to assume a Spherical Earth Projection. So I went to > Coordinate Systems\Projected Coordinate Systems\World (Sphere-based) There seems to be a _Mercator (sphere).prj_ , but it does not seem to have the proper Projection parameters. I then went to > Coordinate Systems\Projected Coordinate Systems\World & there are 3 WGS84 based mercator projections: ![Coordinate Sytem](http://i.stack.imgur.com/XKfa5.png) I see that in a lot of ESRI literature, they use WGS 1984 Web Mercator (Auxiliary Sphere). Is that the Google Maps Projection? What is the _WGS 1984 Web Mercator.prj_ then? (As a bonus question, this image is from ArcGIS desktop 10.0, but does the answer again change at ArcGIS 10.1?)


GPS and GIS for real time monitoring of an object

How is it possible to store coordinate of object in server in real time using feasible hardware ( can be used by student) GPS into database and retrived in real time??   1. What are the names of equipment ?   2. **Any link to good resource?** The purpose of this experiment is to provide real time location of object through internet(web).


How to show an infowindow on click of an Image symbol marked at specific coordinates in ArcGIS map.

markers(Pushpins) are loaded with values from XML and is displayed on the map.How to enable click events on the markers to display InfoWindow.                       <esri:Map x:Name="MyMap" Style="{StaticResource MyMapStyle}" >             <esri:Map.Layers>                 <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer"                                              Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" />             <esri:GraphicsLayer ID="GraphicLayerMarkers">                      </esri:GraphicsLayer>             </esri:Map.Layers>         </esri:Map>


Error point sampling tool

I'm usig QGIS 1.8.0 and I did some interpolations. Now I want to do some sampling with the point sampling tool but I keep getting this error (I attach a picture of the error message). Does anybody knows why? Any help would be really appreciated. ![enter image description here](http://i.stack.imgur.com/GLZbm.png)


Can i install opengeo suite in VPS windows?

I want to quickly set up a gis server which i can use via internet .i guess opengeo suite is best for newcomer and also it has community edition . but if you think there is option let me know. I need to work with WMS, WFS, WFS-t Services . I am developer i am also looking to build some custom web app in future . so is VPS (windows) good ? shall i concerned with windows server version ? eg 2008 , 2012 ? I think company is good option https://www.arvixe.com/ ? has anyone done this before ? I just want to make sure that my money is not wasted .. thanks for your feedback. Is ubuntu or centOS good option if i don't know about linux ?


Rotating Point feature problem

I am trying to create new symbols for our Stormwater Stream Restoration dept.. Utilizing some of the ESRI came symbols, I have adjusted their size and color and added them to the map. When I click the Rotate tool, it shows the feature rotating in the preview as I turn it, but when I let go of the mouse, the screen blinks, but the symbol never rotated. Also, when I'm in Symbology/Advance/Rotation, the only options in the drop down are: *None, Random, and expression. Btw... I don't know how to code or write any scripts yet. Thanks


How to split a line at point positions?

I am a rooky with QGIS and i am stuck from a basic problems. I have a polyline and i have some points (2) on the polyline. I would like to know if there is a tool or script that i could use to split my original polyline into 3 polylines? (Starting point to point A, Point A to B and B to ending point of the polyline)? I am looking for an automatic process rather splitting the line manually. Thanks a lot for your help Baptwo


Is there a way to properly have GDAL raise exceptions in Python?

I am working with GDAL in Python and have wanted to get GDAL to raise exceptions so that I can do something useful with them. For instance if a file cannot be opened with gdal.Open() I would like to throw an exception instead of gdal returning None. I would just like a way to capture the errors instead of them being dumped to sys.stdout. Currently I have tried using the `gdal.UseExceptions()` function but came across an issue. When `gdal.UseExceptions()` is set it seems to hide certain errors and not raise an exception on them. For instance `ERROR 5: Access window out of range in RasterIO() Requested (1,15) of size 25x3 on raster of 26x17` disappears and no exception is raised. This seems pretty dangerous. Any ideas are appreciated, thanks.


Floodplain generation given river section polylines, flood level elevation points and a DEM of the land surface

I am looking to generate flood plain polygons to represent 20 and 100 year flood zones, in the most accurate and efficient way possible, given the following datasets: 1) River cross section polylines 2) River flow polylines (center lines between opposing shorelines) 3) 20 year and 100 year elevation values for the vertices of each cross section 4) A digital elevation model (raster with an elevation value for each pixel) of the land surface Here is my proposed methodology so far: 1) Form polygons delimiting each section, the river center line and inland areas well beyond the flood plain 2) For each polygon formed in the previous step, extract the intersecting raster surface (Extract by Mask) 3) Isolate the pixels of the DEM that are less than or equal to the flood elevation (20 and 100 year) value for the section using the Reclassify tool 4) Perform a raster (reclassified raster from previous step) to vector (polygons) to form floodplains between each section. 5) Merge the polygons together to form a continuous floodplain I am looking for insight and suggestions to produce the most accurate results possible given the available data. I have access to ArcGIS and the Spatial Analyst and 3D Analyst extensions. Cheers!


ArcObjects 10.1

just updated to 10.1 and I'm having issues moving from 10.1. I get the errors with my ADF reference when trying to create custom tool bars examples:               'BaseToolbar' is ambiguous in the namespace 'ESRI.ArcGIS.ADF.BaseClasses'.        Any suggestions on how to convert? I have the following references imported:               Imports Microsoft.VisualBasic     Imports System     Imports Microsoft.Office.Interop     Imports ESRI.ArcGIS.Geodatabase     Imports ESRI.ArcGIS.ADF     Imports ESRI.ArcGIS.esriSystem     Imports System.Windows.Forms     Imports ESRI.ArcGIS.Carto     Imports ESRI.ArcGIS.ADF.Connection.Local


OpenLayers ModifyFeature and styling

In OpenLayers, I have a Vector layer with a StyleMap and SelectFeature and ModifyFeature controls, like this:               vector_layer = new OpenLayers.Layer.Vector('My Vector Layer', {extractAttributes: true,                 styleMap: new OpenLayers.StyleMap({'default':{                     strokeColor: "${customColor}",                     strokeOpacity: 1,                     strokeWidth: 2,                     fillColor: "${customColor}",                     fillOpacity: 0.5                 }}) });      map.addLayer(vector_layer);               selectControl = new OpenLayers.Control.SelectFeature(vector_layer,                     {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect});     map.addControl(selectControl);     selectControl.activate();     modify_control = new OpenLayers.Control.ModifyFeature(vector_layer);     map.addControl(modify_control);      When I tick a checkbox on the page, the ModifyFeature control is activated:               modify_control.activate();     modify_control.mode |= OpenLayers.Control.ModifyFeature.ROTATE;     modify_control.mode |= OpenLayers.Control.ModifyFeature.DRAG;      The problem is this: when I remove the StyleMap, ModifyFeature shows the handles to drag and rotate the feature. _With_ the StyleMap, they are not visible. Any suggestions how to fix this? Thanks!


pyqgis: How to get features of selected geometries

I wonder if anybody could provide an example how to get the attributes of selected Features? I tried the folowing Code in the python Console - but I'm stuck at the point where I'd like to get the attributes:               qgis.utils.iface     canvas = qgis.utils.iface.mapCanvas()     cLayer = canvas.currentLayer()     selectList = []     if cLayer:         count = cLayer.selectedFeatureCount()         print count         selectedList = layer.selectedFeaturesIds()         for f in selectedList:             # This is where I'm stuck             # As I don't know how to get the Attributes of the features      I would be really glad if anybody could help. Regards


Best Landsat-5 TM band combination for detecting fire scars

I am looking for the best band combination with Landsat 5 imagery to detect fire scars.


Access to the nearest line by clicking on OpenLayers

i need to access to the nearest line by clicking on my Layer how can i do it? for example take a look at this photo.


Matching two point clouds without loss (nearest neighbor, but more complicated)

I have two point clouds, one with demographic and one with electoral data. Points in both clouds represent the same empirical entity (say, a village, or an urban neighbourhood), but are not in the exact same lat/long (different datasources, GPS inaccuracies, etc). Moreover, one village can have several points in each cloud. I am looking for a cluster or nearest neighbor algorithm which allows me to merge both point clouds. I have thought about two strategies: a) do a nearest neighbor matching, starting from the first point cloud and adding a variable to each point that directs me to the respective closest point in the second point cloud. The problem is that no method for nearest neighbor matching which I found (GRASS, SAGA, R) ensures that all points in the second cloud are picked at least once as this "respective closest point" for the first cloud. A neverending circle which could probably approximately be optimized - but I have no idea how. Any suggestions welcome. b) the second strategy sees it as a clustering problem, in which I attempt to recreate the underlying empirical entity "village", which might contain multiple electoral and demographic points, but must contain at least one of each type. In other words, I would need a bottom-up hierarchical cluster algorithm which groups points together based on their spatial proximity, but simultaneously (!) ensures that each cluster contains at least one point from the electoral point cloud and one point from the demographic point cloud. Again: any suggestions welcome. c) there are probably other solutions that I am unaware of - I am truly a beginner here... It would be marvellous if somebody could point me in the right direction. Thank you in advance!


Is the ArcMap style database format available somewhere?

The *.style files are MS Access databases where each style type is a table. The table has one binary column where the actual style is written. Is this binary format available? I would like to import some custom color ramps, but I can't see a way to do it... and I hoped in the style database!


Algorithm to find geohashes which satisfy query condition

I have an application where I need to query geohashes by specifying the bounding rectangle. Since geohashes map 2D to 1D is there a method by which I may find the prefixes of all geohashes which satisfy the query condition (bounding rectangle). I tried to google but I did not find any algorithm. It will be great if there is some library which does that for me efficiently in C/c++. Even if there is no library then too I can can work with an algorithmic solution.


How do I make KML overlays appear in OpenLayers at all zoom levels?

I need to overlay KML polygons on basic map in OpenLayers. I need that KML is visible on every zoom level. I did some coding, but my KML is not showing up. What am I doing wrong? Thanks.               <!DOCTYPE html>                     <title>OpenLayers Tutorial - Basic Map Setup</title>
OpenLayers Testing


VBscript Regular Expression in ArcMap Field Calculator

I'm looking for a regex in VBscript that I can use on a ArcMap table. I know what it would look like in python: `pat =r'[0-9]{3,4}'` This filters all numeric characters from the string which have the length 3 to 4. So from AO123 you'd get 123 and from VO2-324C, 324. What would be the equivalent in VBScript? How do I implement it with the RexExp Object? ArcGIS has a Field calculator that let's you execute VBScript code. But even the most simple regex (see screenshot) fails with the error message object needed: 're'. ![enter image description here](http://i.stack.imgur.com/Ay8bJ.jpg)


Check if field value for selected features is null

My feature class contains two fields: an identifying field `U_ID`, and a descriptive text field `DESC`. This field currently has `<Null>` for all features. I would like to select all the features with the same ID and populate this field with sequential values (using code I have previously used here), only if there are `<Null>` values in `DESC`. My model receives the feature class as input into a `Feature Selection Iterator`, grouping by `U_ID`. I then want to check for null values in the `DESC` field for those `Selected Features`. If a `<Null>` is found in `DESC` for any of the `Selected Features`, return true and populate the field with values. If there are values for all the features, the condition is false. This is what the model looks like: ![enter image description here](http://i.stack.imgur.com/qmhes.png) For example: the iterator selects `U_ID` = AA01. There are ten features in the feature class with that ID, so `Selected Features` contains those 10 features. The `Calculate Value` tool contains the following:               checkIfNull("%DESC%")      * * *               def checkIfNull(f):       return "true" if not f else "false"      Seeing as `DESC` is `<Null>` for those ten features (or even just one of the features), the precondition is true, and `Calculate Field DESC` should be executed. However, the precondition returns false and the model ends. Changing the code to               return "true" if f is None else "false"      yields the same result. I don't think I'm accessing the values in `DESC` correctly, because my test for `<Null>` seems to be right, judging by the answers to other questions here.


Mapping x, y pixel coordinates to latitude and longitudes on the WGS84 datum

_Apologies in advance for the long question, I am fairly confused at this point and I figure if I show my thought process any flaws early on in the piece can be more easily pointed out._ I have a grid of 1000 by 1000 (origin is top left), on which I'm drawing a variety of polygons. I'm trying to convert the x, y locations of each of the vertices of these polygons programmatically to longitude and latitude for use in geojson. Effectively, I want to map my grid around the globe. I have run into a few problems, I suspect largely because I'm fairly inexperienced with GIS. I spent some time reading up on what I could, this explanation of map projections and coordinate systems was particularly helpful, and after reading it and other sources, I had the following plan. With the bounds of -180 degrees to 180 degrees longitude, and 84 to -80 latitude, I should be able to convert arbitrary geographic coordinates to geocentric (x, y) and then scale those values to exist between 0 and 1000, and reverse the process to go the other way. For the tools to do this, I decided upon pyproj, a wrapper around proj4 as **1)** We use python   **2)** It seems fairly specific to the task at hand which is usually a good sign From my reading, the bounds of longitude and latitude (in the utm projection, which is what I plan to use) are -180 to 180, and 84 to -80               from pyproj import proj          p = Proj(proj='utm', zone='56H', ellps='WGS84')          def x_and_y(lon, lat):         x, y = p(lon, lat, errcheck=True)         return (x, y)      I thought i'd use the following code to work out the x, y values of the lat and long boundaries, and use when scaling from 0-1000 to whatever the min and max x and ys would be. This is where I run into a brick wall, effectively. **1)** Using 0, 0 as lat and long gives me `RuntimeError: latitude or longitude exceeded limits`, is this expected?   **2)** Actually, a lot of values give me errors, i.e., if I do the following:               longs = range(-180, 181, 12)     lats = range(84, -81, -4)          #print longs     #print lats          for lon in longs:         for lat in lats:             print '%s  %s' % (lon, lat)             print '%s  %s' % x_and_y(lon, lat)      I get errors from and including -108 degrees longitude through to and including 60 degrees longitude. At this point I realised my understanding must be fundamentally flawed and decided to turn to you. I guess I have the following questions: **1)** Am I travelling down the right path here? If my goal is to map (x, y) coordinates onto a global map, is this the way to go?   **1a)** If I'm not, recommendations?   **2)** Clearly my understanding is flawed, can anyone see and explain where and why?   **3)** Are there any tutorials or code samples around for this kind of thing? The pyproj documentation is fairly limited. Finally, if anyone has recommended reading for this kind of work in general, I'd love a pointer or two on where to start. Thanks for your time! PS: If this is better suited for stack overflow, please let me know.


Add Spatial Database Connection fails?

I created a Database Server (SQL Express 2008.) I created a "New GeoDatabase..." I double-click on "Add Spatial Database Connection." I fill out the dialog and change the transactional version. I press the "Test Connection" button. The "Test Connection" message box says, "Connection succeeded." I press the "OK" button twice and... NO connection is created. I cannot create a new spatial database connection. (I searched for this on the ESRI forum and, of course, the question is there but as usual there is no answer.) Has anyone else come across this problem?


Collapse layers in ArcMap Table of Contents using ArcObjects

Can someone offer up a Christmas present here? I'm stuck on how to collapse all layers in my ArcMap projects (9.3). I've tried a few bits of sample code, but they all seem to fail for some reason or other. Some of the layers might be grouped, and some are imagery or WMS layers if that makes a difference. Here is some code I have tinkered with, but does not work:               Dim pMxdoc As IMxDocument     Set pMxdoc = ThisDocument     Dim pFeatLayer As IFeatureLayer     Dim pEditLayers As IEditLayers     Set pEditLayers = pEditor     Dim pMap As IMap     Set pMap = pMxdoc.FocusMap     Dim pLayer As ILayer          'Collapse any expanded grouplayers     Dim pGroupLayer As IGroupLayer     For i = 0 To pMxdoc.FocusMap.LayerCount - 1     Set pLayer = pMxdoc.FocusMap.Layer(i)     'Check if the reached layer is a group     If TypeOf pLayer Is IGroupLayer Then         Set pGroupLayer = pLayer         if pGroupLayer.Expanded = true Then             pGroupLayer.Expanded = false         End if     End If     Next i     pMxdoc.UpdateContents     pMxdoc.ActiveView.Refresh      ![enter image description here](http://i.stack.imgur.com/rbiys.jpg)


Is there a way to get the map document name/path from a published map service?

I have several map services published to ArcGIS Server 10.0 SP2 and I have layer metadata files exported to HTML that I want to link to the layers in the map service. Currently the metadata HTML files are named based on the data source (eg 'Zip_Code_Poly.htm') but I need to correlate the layer name/ID from the map service to that file. I was thinking that the easiest way to do it would be to run an arcpy script to get all the layer data sources. I've run into an issue though that the client (this is a web app) needs to look up these HTML files by service name and layer name/ID but without hard coding a mapping from service -> MXD I can't figure out what map document to use in arcpy. Is there a way using arcpy or something else that I can look at a published map service and get the map document it was created from?


How do I make geoserver update layers and stores? I've updated the tables in PostGIS used by a data store and layer, but I cannot seem to get it to update. I have the new data running, but I had to create a new Store and Layer just to get it to work. Is there an easier way to refresh stores and/or layers? Thanks


Geoserver image generation error

I'm using Geoserver + PostGIS and I got a image generation error when i test my layer in url: http://localhost:8089/geoserver/pmc/wms?service=WMS&version=1.1.0&request=GetMap&layers=pmc:utbs&styles=&bbox=272206.156,7448903.5,303656.5,7484798.0&width=448&height=512&srs=EPSG:4326&format=image/jpeg this is the image error: ![enter image description here](http://i.stack.imgur.com/kam9A.jpg) http://img695.imageshack.us/img695/9963/layerimage.jpg.


How do I find out the resolution in (centimeters per pixel) of a TIF?

I tried using GDAL and got:               # gdalinfo nicholas_map_2.tif      Driver: GTiff/GeoTIFF     Files: nicholas_map_2.tif            nicholas_map_2.tfw     Size is 28799, 27875     Coordinate System is:     GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4326"]]     Origin = (-122.325695999999994,37.876846000000000)     Pixel Size = (0.000000441883000,-0.000000350276000)     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       COMPRESSION=LZW       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  (-122.3256960,  37.8768460) (122d19'32.51"W, 37d52'36.65"N)     Lower Left  (-122.3256960,  37.8670821) (122d19'32.51"W, 37d52' 1.50"N)     Upper Right (-122.3129702,  37.8768460) (122d18'46.69"W, 37d52'36.65"N)     Lower Right (-122.3129702,  37.8670821) (122d18'46.69"W, 37d52' 1.50"N)     Center      (-122.3193331,  37.8719640) (122d19' 9.60"W, 37d52'19.07"N)     Band 1 Block=28799x32 Type=Byte, ColorInterp=Red       Mask Flags: PER_DATASET ALPHA      Band 2 Block=28799x32 Type=Byte, ColorInterp=Green       Mask Flags: PER_DATASET ALPHA      Band 3 Block=28799x32 Type=Byte, ColorInterp=Blue       Mask Flags: PER_DATASET ALPHA      Band 4 Block=28799x32 Type=Byte, ColorInterp=Alpha      I assume pixel size is what I'm looking for? But is that in degrees?


How to change table name of command raster2pgsql

I am completely newbie with GIS and PostGIS as well I'm trying to load raster into postgreSQL with raster2pgsql. It runs well. However, the table name of the raster is generated automatically. For example, the raster named: landsat.tiff, then the table name is landsat. My question is: Can we change that name of table? and how we can do it? Thanks in advance! **EDIT:** Here's what I typed in Windows Command line:               \raster2pgsql -s 4326 *.TIFF -t 100x100 > demo.sql      and insert into database               \psql -U postgres -d demo -f demo.sql


Is it possible to create MBtiles from a TIF?

I have a geo-referenced tif (it's really big around 1GB) and I'd like to convert it to mbtiles so I can serve them and view the map. What is the best tool to do this conversion?


How to use InsertCursor to add points to a point feature class?

I am struggling with a very simple task of inserting "SHAPE@XY" into a point feature class. Following is what I have:               xy = [(361087.15436001675, 198747.07296730898), (361530.56426259346, 198976.62248019245),           (361692.3015462744, 197815.78617074457), (361845.0959187896, 198297.07296730898),           (362135.3345548634, 197552.7531621556)]          fc = "C:/temp/xy.shp"     cursor = arcpy.da.InsertCursor(fc, ["SHAPE@XY"])     for row in xy:         cursor.insertRow(row)          del cursor      it throws back error:               TypeError: sequence size must match size of the row      I used field calculator to add x and y field into the same shapefile form where I retrieved these points, and it works fine to add above set of co- ordinates to a multiline feature class, but above set of lines fail. Any suggestions?


Videos in CartoDB Infowindows

I need to know how to embed a video (YouTube or Vimeo) into an infowindow in CartoDB in the same way that an image appears as an image header. Potentially more complicated, when there is no video link I'd like an image to appear instead. Can anyone assist me (as a non-programmer) with the code for this and WHERE to insert it in the HTML? I have viewed the "How do you embed iFrame content into a CartoDB infoWindow?" question, but I cannot make that work for either YouTube or Vimeo videos. Also what I am asking for is for it to be a part of the "image header" in CartoDB which is not what that question answers. Thank you!


Can I upload a video file to embed in a custom infowindow in Cartodb?

I want to embed video clips into custom infowindows in Cartodb, and I know how to do this via a youtube link, but is there a way I can embed a video from a file I have saved on my computer? Or does the video need to come from a website?


Need help installing QGIS 2.0 Need GDAL then SQLite3 3.7.16

OSX 10.7.5 I need help installing QGIS 2.0 It says I then need GDAL. When I try to install GDAL it says SQLite3 3.7.16 or newer framework is required. I can't find SQLite3 3.7.16.


Field Calculator extract three last digits from another field

How everyone! I have two fields the on is the cadastral number which is for example 051020213001 and I am trying to fill the other field (label) with the last 3 digits from the cadastral number, in this case 001. Is there any way I can do that automatically and not manually because I have 2800 polygons in which I have to do that. I am using QGIS 2.2.0


Reproduce raster with the same extent, and the same number of columns and rows

I have two raster A and B. A and B have the same grid size but different extent. How can I make A has the same number of columns and rows, as well as the spatial extent of B?


How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane?

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in place in the leaflet-overlay-pane? (For example, how could I put just the SVG into the leaflet-shadow-pane and then turn pointer-events off on the leaflet-shadow- pane... thus making it possible to interact with the GeoJSON?) My apprehension is this: Leaflet map layers are stored in panes: http://leafletjs.com/reference.html#map-panes However, it is not clear to me just exactly how these panes are ordered and what each of them contains. according the Leaflet's css (http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css), the order of these panes makes more sense:   * **.leaflet-map-pane { z-index: <"?">; }** //Pane that contains all other map panes. (presumably all the below map panes)     1. **.leaflet-tile-pane { z-index: 2; }** //Pane for tile layers.     2. **.leaflet-objects-pane { z-index: 3; }** //Pane that contains all the panes except tile pane. (presumably all the below panes)       1. **.leaflet-overlay-pane { z-index: 4; }** //Pane for overlays like polylines and polygons.         * **.leaflet-overlay-pane svg { z-index: <"?">; }**         * **.leaflet-overlay-pane <"?"> { z-index: <"?">; }**       2. **.leaflet-shadow-pane { z-index: 5; }** //Pane for overlay shadows (e.g. marker shadows).       3. **.leaflet-marker-pane { z-index: 6; }** //Pane for marker icons.       4. **.leaflet-popup-pane { z-index: 7; }** //Pane for popups. I am specifically interested in **.leaflet-overlay-pane svg** and any subsequent panes that reside inside **.leaflet-overlay-pane** (i.e. **GeoJSON pane** ). Thanks


Re-registering a GEOTIFF in qgis

I'm working on some images taken from a UAV over the course of a year. They are OSGB 1936 projection as is the whole project. Annoyingly they don't quite line up so I am trying to a few of the images using the georeferencer tool. ![The control points](http://i.stack.imgur.com/0tQ1G.png) ![The settings](http://i.stack.imgur.com/x0Vm0.png) The problem is, is that when I run it, the resulting alignment is miles away. ![Where it ends up](http://i.stack.imgur.com/SlrvT.png) You can see from the georeferencing screen that it doesn't need to move much. Every tutorial I've seen assumes that it's a completely new image, i.e. jpg or something, that needs referencing rather than a previously referenced image. Am I going about this the wrong way?


What is the best method to snap features to road network?

I have a road network with some of my tract centroids and facilities that fall off of it, however I would like to execute my analyses so that all features are part of the road network? My facilities are hospitals and incidents are census tract centroids. I am executing a closest facility analysis for drive time and distance. I would like my output to adjust these features to the network with an output in an attribute table which shows the distance the feature was adjusted to the network. Much like the near analysis, but actually adjusting features so that they fall within the network.


How do I calculate the new shapefile areas after clipping?

I'm working with the WWF ecoregions, which use the GCS_WGS_1984 geographic coordinate system. I have clipped the ecoregions with a species range (consisting of two polygons), but the new attribute table doesn't tell me the new 'clipped' ecoregion areas. From reading around it seems I need a projected coordinate system to calculate these new areas. However the attribute table of the ecoregions contain area (km2) as well as shape area. Would these have been calculated using a projected coordinate system? If so, is there a way of finding out which one they used? Complete beginner here, thanks for any help in advance.


How do I open images georeferenced in ArcMap in QGIS? (.aux.xml)

We have several ArcMap georeferenced images (raster datasets) that we are attempting to open in QGIS without any luck. These are not inside of a geodatabase and are not Arcinfo Binary Grid format or Arcinfo Binary Coverages. QGIS supports GDAL rasters and the ArcMap created .aux.xml file contains the georeference points, but QGIS apparently does not recognize this file as it places my Texas image in a very small area of the Atlantic ocean off the coast of Africa (with a google maps basemap added). (THe only other files in the raster dataset are .tfwx and .ovr) Is there something special I need to do within QGIS to apply the coordinates in the aux.xml created by ArcMap, or something else I'm missing? Thanks in advance, Justin Here are the contents of one such aux.xml file:               <?xml version="1.0"?>          -<PAMDataset>          <Metadata/>               -<Metadata domain="Esri">          <MDI key="PyramidResamplingType">NEAREST</MDI>          </Metadata>               -<Metadata domain="xml:ESRI" format="xml">               -<GeodataXform xmlns:typens="http://www.esri.com/schemas/ArcGIS/10.1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="typens:PolynomialXform">          <PolynomialOrder>1</PolynomialOrder>               -<SpatialReference xsi:type="typens:ProjectedCoordinateSystem">          <WKT>PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",3857]]</WKT>          <XOrigin>-22041259.177065704</XOrigin>          <YOrigin>-33265069.154224794</YOrigin>          <XYScale>135385247.70505452</XYScale>          <ZOrigin>-100000</ZOrigin>          <ZScale>10000</ZScale>          <MOrigin>-100000</MOrigin>          <MScale>10000</MScale>          <XYTolerance>0.001</XYTolerance>          <ZTolerance>0.001</ZTolerance>          <MTolerance>0.001</MTolerance>          <HighPrecision>true</HighPrecision>          <WKID>102100</WKID>          <LatestWKID>3857</LatestWKID>          </SpatialReference>               -<SourceGCPs xsi:type="typens:ArrayOfDouble">          <Double>5.994281757832141</Double>          <Double>5.6742238617780458</Double>          <Double>2.0592992159490677</Double>          <Double>4.5229583592636118</Double>          <Double>2.014907522695573</Double>          <Double>8.8668953443025202</Double>          <Double>2.8272115205686532</Double>          <Double>7.7051733542912189</Double>          </SourceGCPs>               -<TargetGCPs xsi:type="typens:ArrayOfDouble">          <Double>-10752195.345278211</Double>          <Double>3857531.2694506948</Double>          <Double>-10756947.906142347</Double>          <Double>3856205.4206410511</Double>          <Double>-10756935.616529588</Double>          <Double>3861470.3939956115</Double>          <Double>-10755980.997953685</Double>          <Double>3860058.8390891682</Double>          </TargetGCPs>          <Name/>          </GeodataXform>          </Metadata>          </PAMDataset>


How to 'reverse clip' (erase) in R

A reverse clip saves only the part of your spatial object that is _outside_ the bounds of another object, as opposed to a regular clip which saves the parts that are _inside_ the other object. Here's how to do it in ArcMap. The question is: how to do this in R? Reproducible example (on Linux machines):               system("wget 'https://github.com/Robinlovelace/Creating-maps-in-R/archive/master.zip' -P /tmp/")     unzip("/tmp/master.zip", exdir = "/tmp/master")     uk <- readOGR("/tmp/master/Creating-maps-in-R-master/data/", "ukbord")     lnd <- readOGR("/tmp/master/Creating-maps-in-R-master/data/", "LondonBoroughs")     plot(uk)     plot(lnd, add = T, col = "black")      What I want here to do is to save all of the UK _except_ for London. Visually, I want the black shape in the resulting image to be a hole. ![enter image description here](http://i.stack.imgur.com/I2Peb.png)


Show layers TOC in QGIS 2.0.1

I somehow closed the layer TOC in QGIS 2.0.1. How do I get it back? Feeling a bit lost here.


How to filter wrong GPS readings?

I have absolutely no experience with GIS, it just so happens that one of the hobby projects I am doing at the local hackerspace includes tracking a model boat with a GPS... I hope this is the right place to ask! [If not, I would appreciate suggestions on where to turn for help]. Here's my problem: today we went testing the new model boat, but when I processed the log, I noticed that for some strange reason, some of the GPS readings are totally off (see picture below: we never actually sailed on the left of the trees). ![Google Earth screenshot](http://i.stack.imgur.com/V9KXd.png)   1. I was wandering if there is a **standard way to filter a GPS log to spot and eliminate such noisy signals**. The only obvious way I could think of was to tell the filter the a maximum speed for the boat that was tracked, and simply exclude any signal that would imply the boat to have travelled fastest than that maximum speed. Is there a better way?   2. Since our boat is a model one and most of the times it travels at speeds below the knot, I was wondering if there is a **clever way to "rectify" points that are probably wrong**. An example: suppose the boat is travelling east to west and the track looks something like: ...⋅... it is quite possible that the central dot is a glitch in the GPS, but rather than dropping the log signal altogether, I would like to "correct" it [each log record contains information about the electronics too, and this data is always correct]. Again: is there a standard way to "smooth" a GPS track? I thought some sort of solution could pass through the standard deviation, but I am clueless on how to proceed. Additional information: we are using python for processing the log, but while code snippets are always appreciated, I'd be more than pleased with a general explanation of the algorithm that I would implement myself. Many thanks in advance for your time and expertise.


How to select and copy a group of polygons in QGIS?

I'm new to QGIS. I opened a few shapefiles that cover Europe. Now I want to select a smaller area and if possible copy the polygons in this area so I can work with a smaller set. How should I do this in QGIS? I started to choose "toogle to editing", then I choosed the "node tool" and started to make rectangle. But then I get a popup (see screenshot below) telling me to set a "tolerance". I looked in (as suggested in the popup) "Settings" > "Project properties" > "General", but couldn't find and any tolerance value here. From the User Guide (version 1.7.0) in chapter 4.5.1 it was suggested that I should change the tolerance in "Settings" > "Options" > "Digitizing" and I changed from 0.00000 to 1.00000. It was also suggested to edit "Settings" > "Snapping options" so I changed the tolerance to the same value there. Now I tried with the "Node tool" again, but I got the same popup and couldn't select any polygons. How can I select an area of polygons in QGIS? that I later can copy to a new project in QGIS to get a smaller set to work with. ![enter image description here](http://i.stack.imgur.com/lVva9.png)


Connect to ArcSDE geodatabase over LAN?

I am running ArcGIS Server 10, with ArcSDE 10. I have a geodatabase that I would like my colleague to connect to over the LAN at our office. How do I go about doing this? I would prefer a list of simple steps than a link to the ESRI Web Help URL. Thanks in advance! :)


How to create a map of only one state in QGIS?

This is a very simple question but a Google search did not provide an answer. Basically suppose you have a map of the U.S. with states and county layers, as well as other layers like roads, etc. I want to work with a map of only one state, with all layers (e.g. counties, roads, etc) in that state. I remember in ArcGIS it had something to do with taking an intersection, not sure how it works in QGIS.


How to call a DLL file from VBA?

I have a DLL file that I have loaded and registered it in ArcGIS as a command icon. This icon launches a window where the user should do the following selections: an input file, a field name, select between 2 option buttons and an output file name. However, I need to run this DLL file via a VBA and ArcObjects code so as the user will not see the window of the DLL tool and the above selections will be given automatically by the code within a loop so as to take various output files. Is that possible? Please help. Thanks Demetris Eventually I found a function that may be is approprite to call the DLL file. I declare it below and I try to call it via the Calldll() procedure. However, I receive the following message "Run-time error 13- Type mismatch". I think that the arguments have the appropriate data type. Could you please have a look in the code below to find what is going on? Thanks again Demetris                Public Declare Function CreateParcelsShape Lib "C:\Program    Files\ArcGIS\CreatePoly.dll" (Centroids As IFeatureClass, Block As  IPolygon, pFDS As IFeatureDataset)          Public Sub CallDll()          Dim pMxDoc As IMxDocument     Set pMxDoc = ThisDocument          'Get the active map (data frame)     Dim pMap As IMap     Set pMap = pMxDoc.FocusMap          'Get the layers     Dim pLayers As IEnumLayer     Set pLayers = pMap.Layers          Dim pLayer1 As ILayer     Set pLayer1 = pLayers.Next               Do Until pLayer1 Is Nothing            If pLayer1.Name = "Block12" Then         Exit Do            End If          Set pLayer1 = pLayers.Next     Loop               Dim pBlocks As IFeatureLayer     Set pBlocks = pLayer1          Dim pBlocksFC As IFeatureClass     Set pBlocksFC = pBlocks.FeatureClass               Dim pBlocksCursor As IFeatureCursor     Set pBlocksCursor = pBlocksFC.Search(Nothing, False)          Dim pBlockFeature As IFeature     Set pBlockFeature = pBlocksCursor.NextFeature          'Get the shape of the polygon (Block)     Dim polygon As IPolygon     Set polygon = pBlockFeature.Shape          Dim pLayers2 As IEnumLayer     Set pLayers2 = pMap.Layers          Dim pLayer2 As ILayer     Set pLayer2 = pLayers2.Next          Do Until pLayer2 Is Nothing               If pLayer2.Name = "CentroidsBlock12" Then     Exit Do          End If          Set pLayer2 = pLayers2.Next     Loop          Dim pCentroids As IFeatureLayer     Set pCentroids = pLayer2          Get the dataset     Dim pFDataSet As IFeatureDataset     Dim pFWorkspace As IFeatureWorkspace     Dim pAWFactory As IWorkspaceFactory          Set pAWFactory = New AccessWorkspaceFactory     Set pFWorkspace = pAWFactory.OpenFromFile("C:\LACONISS\GAPopulation.mdb", 0)     Set pFDataSet = pFWorkspace.OpenFeatureDataset("Polygons")          'Call the DLL function     CreateParcelsShape pCentroids, polygon, pFDataSet          End Sub


Detecting map changes using Openlayers

Is it possible to delete a vector layer when a user pans or zooms a map? I saw in the documentation that there is a function called onMapResize. Can this also be used to detect a pan change? I want to delete a point if the map is panned or zoomed and tried using it in the following way (which does not work):               map.OpenLayers.vectorLayer.onMapResize(console.log('map was moved'))     //use removeAllFeatures() to remove vector points


User Input in Openlayers Problem

I thought you could give me some advice regarding my problem. I have a working WFS Layer and I want to be able to type in some text which then should be used as the filter value. Afterwards the map should be refreshed, however only with the features selected through my input text. For Example I want to see Restaurants, so I type it in and it refreshes my map. This is my code so far. In advance - thanks for your help.                                 <title>OpenLayers Demo</title>
         <form name="form" id="form">             <input type="text"  name="Search" id="searchText1" value="" />         <input type="submit"  />           </form>


How to import shp2pgsql?

I want to import shape file into PostGIS. There is 1 database `postgres` in it but no table added yet. I am using this command:               shp2pgsql -I -s 4326 districts.shp districts | psql -d postgres -U postgres       and it's giving me some error: > Unable to convert data value to UTF-8 (iconv reports "Invalid or incomplete > multibyte or wide character"). Current encoding is "UTF-8". Try "LATIN1" > (Western European), or one of the values described at > postgresql.org/docs/current/static/multibyte.html Is my command wrong ??


How to offset points along line in QGIS?

I used the "Profile from Line" plugin to create evenly spaced points along a line in QGIS, but I'd like to offset them to either side of the line. I spose I could draw two lines parallel to the existing one and create evenly spaced points along each of them then delete the new lines, but I'm curious if there is a different way to offset points the way I've shown in my MS Paint illustration. ![offset points along line](http://i.stack.imgur.com/C4hoh.jpg)