extend line to feature. programatically

![enter image description here](http://i.stack.imgur.com/REa6d.jpg)Thanks in advance for any help. I'm trying to programmatically extend hundreds of lines (blue in image) to a single polyline feature (red in image). Sometimes the lines intersect each other, but I'd like the lines to extend, not to other existing lines, but to the polyline feature mentioned before. Even if i select 1 line and the polyline feature, the 1 line is stopped at the other unselected lines. ~ arcpy.ExtendLine_edit(lines, "2000 Meters", "FEATURE") I can accomplish the process manually in edit mode by selecting the feature, clicking the extend line tool in the advanced editor toolbox, then clicking the line that needs extending. Is there a way to do this part of the selection in python? Thanks so much for any help. Meghan


How do you symbolize a feature class layer in ArcMap 10 based on one attribute's value and then another attribute's value?

I currently have a point feature class that has a couple of attributes that I want to use to symbolize its layer. One of the attributes is called _ExceedsTolerance_ , which either has "Y" or "N" for its value. The other attribute is called _Measure_ , which has the values -2, -1, or anything from 0 and greater. I know that I can create a layer definition that has different symbols for unique values for each attribute. For instance, I can have a black box for _Measure_ when the value is -2, an orange circle for when the value is -1, and a blue circle for when it is greater than or equal to 0. The same idea goes for _ExceedsTolerance_. What I would like, however, is to have it where it shows a certain symbol when _ExceedsTolerance_ is "Y" no matter what the _Measure_ is, but when _ExceedsTolerance_ is "N" to show whatever I have set for _Measure_. I can somewhat do this with the Multiple Attributes section of the Symbology tab in the Layer Properties, but I can't do it with the case where _Measure_ is greater than 0 and _ExceedsTolerance_ is "N". How would this work in ArcMap and is it possible?


Secured ArcGIS Server map service gives 2048 error in FLEX application

I have a FLEX app up and running on a web server. It is accessible externally from the internet and runs perfectly fine if the services in the app are not secured in ArcGIS Server. So the crossdomain file is working fine at that point. If I turn security on for the service the log-in window in the app returns a 2048 error which is a problem with the crossdomain file. From what I've read about crossdomain files the service shouldnt work at all if there is a problem with it. We are using ArcGIS Server 10.2, ArcGIS WebAdapter 10.2, and IIS7. The server site is on a different machine from the WebAdapter (which is in a DMZ) but the REST endpoint and the FLEX apps are running from the same sub domain. Any ideas?


Changing CRS for basemap from OpenLayers plugin

Relatively new to QGIS here and I haven't been able to find this question answered yet. I'm working on plotting data from NYC (Queens, specifically) and I would like to overlay my heatmap on a basemap from the OpenLayers plugin to show the location of streets, parks, etc. Because I'm plotting city level data I want to use an appropriate CRS for NYC: NAD83 / New York Long Island (ftUS) EPSG:2263. However, the base map from OpenLayers comes WGS 84 / Pseudo Mercator EPSG: 3857. Also, I have on the fly reprojection enabled. When I try to change the OpenLayers layer to EPSG: 2263 it plots my data from Queens off of the West coast of Africa. I've tried adjusting the layer crs settings and it seems that I can only get my data to plot correctly on the basemap if my openlayers basemap layer is in EPSG: 3857. Is it possible to project an OpenLayers layer to a CRS other than 3857 without this issue and if so, how? If that is not possible does anyone have recommendations for another plugin which would provide similar basemaps that don't have this issue? Thank You, David


With ArcGIS Server, can you have a dynamic service combined with a map cache?

What I would like is a single ArcGIS Service that caches at the largest levels (state, regional, city) but is then just dynamic at sub city levels. From what I'm reading and understanding -- I think this is not possible -- one would have to have two separate services that display at different levels. And yes, I know you can do the "create tiles on demand", but space, speed issues and the fact that I can't even get it to work at the moment is not ideal. If anyone could confirm that this is not possible, I would appreciate -- thank you!


ArcGIS Server : max-age=0 Select by Rectangle Fails

We are running ArcGIS Server and feeding webmaps. In our Test environment, the application works just fine. We moved to our Dev and the 'Select by Rectangle' doesn't work. In fact, Select by ANYTHING refuses to work. When using this tool we get the following error: > "There was an error in selection. Please redraw the polygon." This error messages has to be dismissed three times. To be clear, you have to click OK on this error window and close the window, for 3 separate instances. I utilized Fiddler2 and see that under the Caching column I get the following: > "max-age=0,must-revalidate" When I go to Inspectors (still in Fiddler2) under the JSON tab I get this: > JSON - error - code = 400, details, message = Invalid or missing input > parameters It doesn't make any sense. We didn't change ANYTHING in the application except for the Dev server pointers (from the test server pointers). It's an ArcGIS API for Javascript app working in CitiSource.


Category colors on torque

I’m trying to create a torque viz on the CartoDB dashboard following this StackExchange post: Using different colors on Torque CartoDB I followed that answer, but my marker colors are still all the same. SQL and CartoCSS are below, and here is a link to the viz: https://pgrasmussen.cartodb.com/viz/c3b82e78-8f4f-11e3-8156-0e625a1c94a6/map Any ideas? Thanks! SQL               SELECT *,     CASE      WHEN type='Theft' THEN 1     WHEN type='Accident' THEN 3     WHEN type='Vandalism' THEN 7     END as type_number     FROM damage_nigeria      CartoCSS               /** torque visualization */     Map {     -torque-frame-count:512;     -torque-animation-duration:30;     -torque-time-attribute:"cartodb_id";     -torque-aggregation-function:"count(cartodb_id)";     -torque-resolution:2;     -torque-data-aggregation:linear;     }          #damage_nigeria_viz{       comp-op: lighter;       marker-opacity: 0.9;       marker-line-color: #FFF;       marker-line-width: 1.5;       marker-line-opacity: 1;       marker-type: ellipse;       marker-width: 6;       marker-fill: green;          }     #damage_nigeria_viz[frame-offset=1] {       marker-width:8;       marker-opacity:0.45;      }     #damage_nigeria_viz[frame-offset=2] {       marker-width:10;       marker-opacity:0.225;      }     #damage_nigeria_viz[value=3] {       marker-fill: red;      }     #damage_nigeria_viz[value=7] {       marker-fill: blue;      }


WMTS from MapProxy in QGIS and/or ArcGIS

My company wants to use imagery from a another company internally for a contract. That company's WMS has a 5+ second latency. Which I'm told is unacceptably slow. So I set up MapProxy and seeded the cache locally. Latency is now about 1-2 seconds. My boss' boss' boss would like to see if WMTS would be faster. So, I turn on the WMTS layer...and nothing. Researching the problem I see that MapProxy defaults it's origin to the lower left corner, but WMTS expects upper left. So I changed that setting, deleted the cache, and made a new one using the new data. Still no WMTS. QGIS seems to be sending requests and MapProxy is reporting 200, but I see nothing rendered. ArcGIS failed to understand the request at all it seems, at least it wasn't able to read the bounds. I know I'm adding the layer correctly in QGIS (2.0.1) because I can add publicly available WMTS services no problem. When I copy the url into the browser it displays the image no problem. I've tried both Restful and KVP versions. Nothing. MapProxy is running on Centos 6 if it matters. I have attached the GetCapabilities.xml documents. (Identifying information has to be removed as per company requirements.) Restful WMTS Service KVP WMTS Service MapProxy Configuration: The WMTS is simply turned on, no special modifications. Cache:               caches:       Imagery_Cache:         meta_size: [5, 5]         meta_buffer: 20         format: image/jpeg         request_format: image/jpeg         grids: [my_grid]         sources: [Imagery_source]         cache:           type: file           directory_layout: tc           directory: /data/mapproxy/folder      sources:               sources:       Imagery_source:         type: wms         supported_srs: ['EPSG:4326']         req:           url: "https://is.this/a/url?"           layers: Imagery         http:           ssl_no_cert_checks: True      grids:               grids:       my_grid:         base: GLOBAL_GEODETIC         bbox: [##.# ##.#,##.# ##.#]         bbox_srs: EPSG:4326         origin: ul      globals:               globals:       cache:         base_dir: './cache_data'         lock_dir: './cache_data/locks'         tile_lock_dir: './cache_data/tile_locks'         meta_size: [4, 4]         meta_buffer: 80            image:         resampling_method: bicubic         stretch_factor: 1.15         max_shrink_factor: 4.0         paletted: false         formats:           custom_format:             format: image/png             mode: P             colors: 32             transparent: true             encoding_options:               quantizer: fastoctree           image/jpeg:             encoding_options:               jpeg_quality: 60      So, any thoughts as to what is wrong and how I can get the WMTS to serve up properly?


using WebTiledLayer function

Using esri javascript api version 3.8, I am trying to use some cached tiles from our server at http://hexe.er.usgs.gov/ifhp/will/tiles/ using WebTiledLayer. I believe that our tiles are set up as ${level}/${row}/${col}.png , however my tiles still aren't showing up. Does this have something to do with setting up an extent parameter? I'd like the tiles to show up with the extent of 'xmin': -88.243751, 'ymin': 41.49263, 'xmax': -88.131789, 'ymax': 41.727235 This sample is the only example I've found that uses a web tile cache and it doesn't use the extent parameter but its a world map whereas mine is a small county in Illinois. I haven't found any examples of using the extent option so maybe I just don't have it set up correctly. Here's my code snippet with the attempt at the extent parameter.               var tiles = new WebTiledLayer("http://hexe.er.usgs.gov/ifhp/will/tiles/overlay10/${level}/${row}/${col}.png", {         "Extent": "'xmin': -88.243751, 'ymin': 41.49263, 'xmax': -88.131789, 'ymax': 41.727235"     });     map.addLayer(tiles);


Spatial ETL comparisons

I am hoping some of you experts out there can list the pro's and con's of various spatial ETL (extract, transform, load) tools. If you have used these items listed here (or add your own), please share your opinions and experiences. In particular I would like to see usability comparisons of:   * Safe Software FME (proprietary)   * ArcGIS Data Interoperability Extension (proprietary, subset of FME features)   * Talend Spatial extension (previously Spatial Data Integrator) (open source)   * GeoKettle (open source)   * ogr2ogr (I don't know that it is truly ETL, but more of a file translation toolset)   * Any additional lot listed Please don't feel like you have to give a review of ALL software's mentioned. You're experience with even one will be very beneficial in making a decision about which direction to go. Thanks! Example: I am looking to create a schema conversion function that will allow me to select the input layer, create a translation, and output to a new, pre- defined schema. Optimally, after creating the translation script, I would like to have an interactive form where I can "map" fields in my input layer to the output layer (ie- The output layer will have a field called "Address", what is it called in the input layer?) Some were mentioned in the discussion at:   * What tools are available for uploading gis data to a database? And here are a couple of related articles that I found.   * http://fuzzytolerance.info/code/open-source-etl-tools/   * http://geobiwiki.spagoworld.org/xwiki/bin/view/Main/Talend+GeoKettle   * http://slashgeo.org/2011/07/25/Open-Source-ETL-Tools-GeoKettle-20-and-Spatial-Data-Integrator-420-Released -


Convert Lambert png images to Mercator projection

> **Possible Duplicate:**   >  How should I use GDAL to perform a transformation? Is there any way of converting the output .png images of a WRF system which are in Lambert projection to Mercator? I tried `osgeo4w` suite using `gdalwarp` tool and because the images are not in .`tiff` format, for the coordinates data i created a `.pgw` with identical name as the image using this tool. The code i am running is this               gdalwarp -t_srs EPSG:3857 -s_srs EPSG:9802 -r cubic -co "TILED=YES" testimage.png output.png      But i am getting errors such as `ERROR 6: EPSG PCS/GCS code 9802 not found in EPSG support files` and `ERROR 1: translating source or target SRS failed:EPSG 9802`


ContourList error

i use ArcGIS Desktop 10.1 in Windows 7 and develop with visual studio 2010, .net v3.5. This is a quite strange problem. I have a Console Application that calls this simple function:               public void ContourList()     {             try             {                 //Debugger.Launch();                 string inputRasterPath = @"E:\temp\DataUpdate\Temp-TEST2\wf3\9448";                 string inputRasterName = @"file0";                 double refereceHeight = 1300;                      RasterSurfaceOp surfaceOp = new RasterSurfaceOp();                 //RasterWorkspaceFactory rasterWkspFactory = new RasterWorkspaceFactory();                 Type factoryType = Type.GetTypeFromProgID("esriDataSourcesRaster.RasterWorkspaceFactory");                 RasterWorkspaceFactory rasterWkspFactory = (RasterWorkspaceFactory)Activator.CreateInstance(factoryType);                      IWorkspace iWorkspace = rasterWkspFactory.OpenFromFile(inputRasterPath, 0);                 IRasterWorkspace rasterWorkspace = (IRasterWorkspace)iWorkspace;                 IRasterDataset rasterDataset = (IRasterDataset)rasterWorkspace.OpenRasterDataset(inputRasterName);                      //IWorkspaceName outRasWkspName = rasterWkspFactory.Create(inputRasterPath, "ProvaOutput", null, 0);                 //IWorkspace outWrkSpace = rasterWkspFactory.Open(outRasWkspName.ConnectionProperties, 0);                      Type factoryType2 = Type.GetTypeFromProgID("esriDataSourcesFile.ShapefileWorkspaceFactory");                 IWorkspaceFactory workSpaceFac = (IWorkspaceFactory)Activator.CreateInstance(factoryType2);                 IWorkspace outWrkSpace = workSpaceFac.OpenFromFile(inputRasterPath + @"\ProvaOutput", 0);                      surfaceOp.OutWorkspace = outWrkSpace;                 surfaceOp.DefaultOutputVectorPrefix = "zor";                      double[] heights = new double[1];                 heights[0] = refereceHeight;                      IGeoDataset contourResult = ((ISurfaceOp2)surfaceOp).ContourList((IGeoDataset)rasterDataset, heights);                 IFeatureClass featureClass = (IFeatureClass)contourResult;             }             catch (Exception e)             {                 Console.WriteLine(e.Message);             }         }      As you can see i use IRasterOp2.ContourList() to create a contour shapefile from a raster. If i execute this program, first time everything works well. But if i execute it many times (about 7-10) i receive a COM Exception with hResult = 0x80040351. This error is throw when ContourList() method is called. Have you some idea what's the problem??


arcgis desktop selection layer

I have Desktop 10.1 that is accessing data from sde geodatabase. I select some features on the map, and try to do "Create layer from selected feature" but nothing happen, and no error message. the operation was successful when I had sde geodatabase 9.3, but since I migrated sde geodatabase to 10.1 and I cannot do that. The RDBMS is oracle. I check for errors in c:\users{my user}\AppData\local\Esri\ and nothing related to any error or this location c:\users{my user}\AppData\roaming\Esri\ Where are the selection layers saved? are they saved in the map document?


Can't select or delete 3D contours - ArcScene

I used the "Create Contour" icon in 3D Analyst on a TIN. But now I can't hide, select, or delete those contours. I even tried deleting the base TIN to no avail. ArcScene 10.0. Any help please? Thanks!


Saving a subset of a database

Here is a complete beginner´s question, maybe someone has time to help: I just downloaded the Corine land cover sqlite file, the whole database has 5.5 GB and takes forever to open. How can I save a geographically defined subset (one country) only, in a new database probably, so that I can actually work with it?


How to create a buffer around a point that takes terrain elevation in account?

In QGIS, I am creating a few different buffer around points to simulate walking distances. For example, 10 minutes walk about 800m at 5km/h. Using population density, I then clip a population layer which gives me the population that is within a 10 min walk from those points. I am working on a hilly city where elevation does matter. How can I adjust the buffer with elevation?


Modify Map Service Symbology via Esri JavaScript API

I have a JavaScript application built on the Esri JavaScript API that is consuming a feature service and a tiled map service from ArcGIS Online. I developed a widget that allows the user to change the symbology of the feature service layer. Is it possible to change the symbology of the tile map service once it has been published? I didn't see a way to do that in the ArcGIS Online Web Map Viewer.


How to add vertices to a polygon on mouse click in OpenLayers

I am pretty new to OpenLayers. I have a polygon drawn on a vector layer, along with ModifyFeature and SelectFeature, I need to implement a functionality when user clicks on the polygon, a new vertex should be added to the polygon at the position where use clicked. With the new vertex the user should be able to reshape the polygon. Is there any existing feature to do this? if not how can we implement this?               function init() {         map = new OpenLayers.Map('map');              var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",             "http://vmap0.tiles.osgeo.org/wms/vmap0?", { layers: 'basic' });              OpenLayers.Feature.Vector.style['default']['strokeWidth'] = '2';              var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;         renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;              vectors = new OpenLayers.Layer.Vector("Vector Layer", {             renderers: renderer         });              map.events.register("mousemove", map, function (e) {             var position = this.events.getMousePosition(e);             OpenLayers.Util.getElement("coords").innerHTML = position;         });              map.addLayers([wms, vectors]);         map.addControl(new OpenLayers.Control.LayerSwitcher());         map.addControl(new OpenLayers.Control.MousePosition());              if (console && console.log) {             function report(event) {                 if (event.type === "beforefeaturemodified")                     controls.polygon.deactivate();                 console.log(event.type, event.feature ? event.feature.id : event.components);             }             vectors.events.on({                 "beforefeaturemodified": report,                 "featuremodified": report,                 "afterfeaturemodified": report,                 "vertexmodified": report,                 "sketchmodified": report,                 "sketchstarted": report,                 "sketchcomplete": report             });         }              controls = {             polygon: new OpenLayers.Control.DrawFeature(vectors,                         OpenLayers.Handler.Polygon),             modify: new OpenLayers.Control.ModifyFeature(vectors),         };              var featureSelect = new OpenLayers.Control.SelectFeature(vectors,         {             hover: false,             clickout: false,             multiple: false,             toggle: true,             //box: true,             eventListeners: {                 featureunhighlighted: function () {                     //Do whatever you want here.                 }             }             //multipleKey: "shiftKey"         });         map.addControl(featureSelect);         featureSelect.activate();              for (var key in controls) {             map.addControl(controls[key]);             controls[key].activate();         }              map.setCenter(new OpenLayers.LonLat(0, 0), 3);              //vectors.events.register('click', vectors, function (e) {         //    console.log(e);         //});              vectors.events.register('sketchcomplete', vectors, function (e) {             controls.polygon.deactivate();         });     }      Thanks in advance


The list of geocodes of villages/cities of India wanted

Any relevant information is welcome. For example, license of the data, where I can find relevant sources, etc.


How to build a website or mobile app with a routing capability?

I want to build a website/mobile app for my school that shows the direction between two points similar to Google's directions API, but not with Google maps. I've got map shapefiles and GPS coordinates of buildings in the school and some programming knowledge (javascript, php, mysql), Please how do i go about it, I'm quite new to GIS programming. Thank You


How to load MapPanel to TabPanel?

I use extjs4.1 with geoext2 in my web app.   I want to load mapPanel to tabPanel via ajax and it fill tabPanel height and width.   If i set mapPanel height and width i can see it in tabPanel but it can't fill tabPanel because i set it height and width.Following code:               mapPanel = Ext.create("GeoExt.panel.Map", {                 renderTo: "mappanel",                 height: 575,                 width: 1124,                 map:map,                 zoom: 11,                 tbar : toolbar             });     var tabs = Ext.create('Ext.tab.Panel', {                 region: 'center', // a center region is ALWAYS required for border layout                 deferredRender: false,                 activeTab: 0,     // first tab initially active                 items: [{                     title: 'History',                     autoScroll: true                 }, {                     title: 'Center Panel',                     autoScroll: true                 }]             });      I insert MapPanel to tabPanel when user click on grid column that has icon via following code.               var grid = Ext.create('Ext.grid.Panel', {             store: store,             columnLines: true,             columns: [                 {                     menuDisabled: true,                     sortable: false,                     xtype: 'actioncolumn',                     width: 20,                     items: [{                         icon   : '<?php echo Yii::app()->baseUrl.'/images/icons/show.png';?>',                         tooltip: 'Show Map',                         handler: function(grid, rowIndex, colIndex) {                             var rec = store.getAt(rowIndex);                             var jsonData = Ext.encode(store.proxy.reader.jsonData);                             tabs.remove(tabs.getComponent(2));                             tabs.insert(2,{                                 title:'Map',                                 layout: 'fit',                                 loader: {                                     scripts: true,                                     autoLoad :true,                                     params:{                                         history:jsonData,                                         index:rowIndex                                     },                                          failure : function(){                                         alert('failed');                                     },                                     url: '<?php echo Yii::app()->createUrl('MapWidget/HistoryMap');?>'                                      }                             });                             tabs.setActiveTab(2);                             tabs.doLayout();                            }                     }]                 },     ...      But when i clean height and width in mapPanel options i can't see it in tabPanel!   How can i load mapPanel to tabPanel to fill it's content?


Cannot set up right CRS in gvSIG

I have a problem in gvSIG. I imported datas from OpenStreetMap using osm2pgsql. I do use them everyday with QGIS, it works perfectly. In QGis, the CRS is set to 32630 (WGS 84 UTM zone 30N) +proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs +towgs84=0,0,0 When I want to connect to the same database with QGIS, if I use the default WGS 84 4326 it works well bit the datas are displayed in oblique which sounds normal, it does the same in QGIS. But here is my problem, when i set up a CRS in 32630 in gvSIG it doesn't work … I will get a crappy animation of big objects all over the map that are slowing down the software … If I change the CRS after, I dot have nothing displayed and using the icon to zoom over the data areas does nothing. here is a screen shot of the result using 32630 CRS. https://www.box.com/s/731pqcpa3szkrzun6i1f https://www.box.com/s/l1to0a36rpqqmk29nm2n


Can I add OpenCycleMap to ArcGIS Explorer Desktop?

I'm using the ArcGIS Explorer Desktop (free viewer) - build 1750 (latest). It comes with several built in base maps, including OpenStreetMap. Is it possible to add to it OpenCycleMap: http://www.opencyclemap.org/ as well ?


How do you create a query that will result with the adjacent parcels?

I have a shapefile with parcel data, and I am trying to create a query that will render a list or something similar that will list adjacent parcels to a specific parcel. I want to be able to select the my parcel and the query to result with all the adjacent property owners. I am using ArcGIS 10.1


How to create accurate indoor maps?

I'm currently developing an indoor positioning system for a college project. I searched for a good mapping platform and I found that openstreetmaps would suit me best, but now I'm stuck in generating an accurate indoor map with real long and lat values. How could I create an accurate indoor map with long and lat values without using GPS? Any idea how to create such a map or any suggestions about accurate indoor mapping?


Looking for MapGuide 2.1.0 web extensions / web studio - where am I going wrong?

I am trying to get to grips with MapGuide Open Source 2.1.0, and the first stumbling block is the Windows installer (!). I got the main binary from the MapGuide download page which has the description 'executable that will install the MapGuide Server and MapGuide Web Extensions'. From what I can gather, previous versions of MapGuide (e.g. 2.0.2) had two separate installers - one for the server and another for the web extensions, but the 2.1.0 installer is supposed to bundle the two. This being the case, why can't I see a web studio directory inside C:\Program Files\OSGeo\MapGuide\Web\www ? It seems like web studio is not installed. I tried installing the 2.0.2 web studio from its separate installer but that seems to be causing problems. Can anyone tell me where I'm going wrong? Any help much appreciated.


What queries can I use to select data?

Which queries can I use to select the following information:   How many towns are within a distance of 3km of both a road and a railway and are within 6km of the coast?   And any towns that have both a railway and a road within 2km of them, i have shape file of road , railway and towns.


How to list all names of tile inside a given polygon?

I'd like to generate a specific set of slippy map tiles to cover certain a certain land mass. Given a polygon shapefile, is there something that will quickly generate a listing of the z/x/y tile names that sit inside that polygon at a specific zoom level? Ideally, it would allow for buffer around the polygon to give some space.


Tool for Creating Polygons

Does anyone know of any tools that exist for creating a polygons. I need to provide some employees with the ability to create shapes that detail the boundary of certain locations. So I just want a simple tool that they will simply be able to use to create polygons. (I'll then let them import the points to my main application). (It wouldn't take a massive amount of work to create this myself in Google Maps, but would love if that could be avoided and something already exists). * * * **Update with more information:** (Sorry for missing out obvious key points). The main application is very basic. It's really just a frontend to a vacation rental portal that allows travellers to search for locations and then return properties within or around that location. I use a mix of tools to do the searching PostGIS and Solr with spatial search depending on the actual module as the backend changes... What happens is, I take a location search string, and then attempt to find the best matching WOEID (using Yahoo GeoPlanet) for that location string. At the moment, we've got about 200k different polygons coords which have been assigned to their respective WOEID. The shapes are then drawn on as a polygon to a single Google Map and it's used to help travellers visualize there search boundaries. Because we have now exhausted of the available shape files that I can find to easily match up against WOEIDs (such as flickr dataset), we are going to start manually creating the polygons and assign them to each WOEID. So I'm just looking for a tool that I can set up our employees with to create the polygons. I realise that they won't be perfect, but this is really only for visualization. So it's not important that they are perfect..


ArcMap line shifted after export

I am working on a map with road layer. I have a dashed line as a symbol for planned highways. It is OK in the ArcMap but after the export to pdf, one of the lines is shifted. Strangely it is happening on one line and the second is OK. See the image with printscreen from ArcMap, Adobe Illustrator and Adobe Reader (from the left).   Does anybody know how to solve it? Thanks for your help. ![Line shift](http://i.stack.imgur.com/3Zd9S.jpg)


Find closest lat long to an input lat long (SQL Server 2008)

I have a point cloud in my database (SQL Server 2008 spatial). That is about 6 million records. There are 3 columns: id, value, geom. What is the optimal way of getting the 'value' at input lat long?? I am new to spatial queries in SQL Server 2008. Can someone post a simple example of finding the point in geom column, matching or closest from the input lat long?


How do you stop ArcGIS setting Gamma on raster load

I often import raster files using GDAL utilities. When those rasters are added to ArcGIS they seem to have a Gamma Stretch applied and a percent Clip stretch for RGB files. Contrast ids also set to 10% by default. Is there any way of creating an RGB geotif that ArcGIS will display with true RGB values instead of using default stretch values?


Is there a standard for oil pipeline symbology?

DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far… To develop a map for specific public is recommended using some special symbology. I am in charge to develop a map for an audience in oil pipeline business, I would like to produce my map using a standard symbology, but so far I have not found any. I just read some post here that led me to the INSPIRE documentation, but it does not fulfill my requirements. Does anyone have information about this topic?


Zonal statistics won't work after re-projecting vector layer

I have qgis 2.0. I want to analyze raster information within a buffer of 30 miles around a vector layer of cities across the world. However, both the raster and the vector are in WGS84. I have no good way of converting the coordinates to miles. My solution was to reproject the vector layer of cities into Lambert Conformal Conic USA Contiguous. However, when I try to run zonal statistics by converting the units (meters) into miles, my attribute table returns "null" values. When I use the original WGS84 vector projection, I can run the statistics just fine. But I need to be accurate about the buffer sizes, and there is no good way to translate coordinates into miles, meters, etc. I need to look at cities across the world, so my reprojections should be able to handle that amount of data. Here is the project and layers: ![enter image description here](http://i.stack.imgur.com/xDV2G.jpg) Here is the attribute table: ![enter image description here](http://i.stack.imgur.com/w3Gns.jpg)


Will ArcGIS 10 run on Windows 8?

I have access to ArcGIS 10 through university, however my laptop runs Windows 8. I have checked the requirements and they have listed the previous operating systems (excluding 8) http://resources.arcgis.com/content/arcgisdesktop/10.0/arcgis-desktop-system- requirements Will it run? If not, are there any ways round this (other than buying Arc 10.1 or installing an older operating system)? Thanks for your help.


How to Remove Dark Bands Where Scenes Overlap in Mosaic Landsat TM5 Image?

I have an image mosaic of 5 Landsat TM5 scenes. Where the scenes overlap there is a dark band, only on the left and right sides, but the top and bottom are seamless. What is the best way to correct this in Erdas 2011?


GeoDjango admin: how to use a WMS background other than the default OSM or VMAP0

The standard GeoDjango admin has a basic VMAP0 background. `OsmGeoAdmin` adds an OSM background. How do I replace the background map with another WMS? In the source code of the admin OpenLayers template there are `{{ wms_url }}` and `{{ wms_name }}` variables but I cannot find where these can be specified to customize it. Or should I just completely override the default admin template?


What packages are needed on CentOS to compile MapServer from source

I'm trying to `configure` MapServer 6.2.0 for compilation on CentOS 6.3, but always run into the same problem, no matter what configure options I supply (also the same with no options at all, just plain configure). It has something to do with g++ (although I do not really understand why it tries to use it). Here is the output: http://pastebin.com/8H5vmrPi What is wrong? **EDIT** : This problem was solved with `yum install gcc-c++`, as suggested by @steko. Now, I have another error, which is weird in my opinion:               configure: checking whether we should include PROJ.4 support...     configure: error: "Could not find proj_api.h or libproj.a/libproj.so in /usr/lib64."      Although `locate proj_api.h` gives `/usr/include/proj_api.h` (I also set `\--with-proj=/usr/include` for configure, not as in the paste bin).


How to export settings for a network dataset

Is there a way to export/save the settings for a network dataset? Setting up the connectivity groups, attributes, evaluators etc can take quite a while, even for a small dataset. If the network dataset needs to be recreated multiple times for whatever reason, it quickly becomes a painful task.


Is there anyway to stack or merge .hdf files in R Studio?

I would like to be able to merge, mosaic, or stack several .hdf files. Does anyone know the package or library i should be looking for the tool to do this?


How to repair paths of an unmanaged raster catalog in file GDB?

I'm using ArcGIS 9.3.1 and I have an unmanaged file geodatabase with raster catalogs in it. Tiles are loaded inside the catalog and each tile has a "Full Path" property which is environment specific. Are there any examples around that show how to batch update the path property perhaps using the Python arcgisscripting API or some tool already built in to ArcGIS ? ![enter image description here](http://i.stack.imgur.com/fupGc.png) **Update 1/13/2012** After I posted yesterday I found a geoprocessing tool to do this: Repair Raster Catalog Paths (Data Management) ![enter image description here](http://i.stack.imgur.com/sovBx.png) ...And to see what the paths change to after this tool runs: Export Raster Catalog Paths (Data Management) ![enter image description here](http://i.stack.imgur.com/Qtuf9.png) This outputs a .DBF file that can be viewed in ArcCatalog. The problem is that my raster catalog paths are different, for example:               \\dgdbimg\EGD\Data\DTED_2\e041\n32.dt2     \\dgdbimg\EGD\Data\DTED_2\e041\n33.dt2     \\dgdbimg\EGD\Data\DTED_2\e042\n32.dt2     \\dgdbimg\EGD\Data\DTED_2\e042\n33.dt2      After running this tools with `*` it changes every path to whatever is specified as the new path:               C:\WorkSpace\Andy3\NgaRaster.gdb\DTED_2     C:\WorkSpace\Andy3\NgaRaster.gdb\DTED_2     C:\WorkSpace\Andy3\NgaRaster.gdb\DTED_2     C:\WorkSpace\Andy3\NgaRaster.gdb\DTED_2      I'm trying to find a way to just change the parent folder path like this:               "\\dgdbimg\EGD\Data\DTED_2" --> "C:\WorkSpace\Andy3\Data\DTED_2"      I'm might have to write some more intricate python to get the current path and do my own string manipulation in order to pass in the needed replacement path to the `repairRasterCatalogPaths_management` function. It would be nice if the `original path` and `new path` parameters accepted regular expressions... I'll give this a try next... Any recommendations? **Update 2 1/13/2012 - Final Solution**               import arcgisscripting     import os.path          gp = arcgisscripting.create()          rasterCatalogPath = r"C:\WorkSpace\Andy\NgaRaster.gdb\DTED_2"     oldBasePath = r"\\server\share\Data"     newBasePath = r"C:\WorkSpace\Andy\Data"          dbfPath = r"C:\BrokenPath.dbf"     dbfXmlPath =  dbfPath + ".xml"          if os.path.exists(dbfPath):         os.remove(dbfPath)          if os.path.exists(dbfXmlPath):         os.remove(dbfXmlPath)          result = gp.exportrastercatalogpaths_management(             rasterCatalogPath,             "BROKEN",             dbfPath)          rows = gp.SearchCursor(dbfPath)     row = rows.Next()     while row:         path = row.GetValue("Path")         fileParentPath = os.path.dirname(path)         newPath = fileParentPath.replace(oldBasePath, newBasePath)              gp.repairRasterCatalogPaths_management(                 rasterCatalogPath,                 "FIX",                 fileParentPath,                 newPath)              row = rows.Next()


In ARCGIS 10.2 can I create a 2 page map document that prints an image on the back side of the page?

From arcgis 10.2 I need to create a pdf file that will print a map on the front side of a page and an image on a back side of the page. How would I do this?


Unable to correctly visualize vector map on Google Map using OpenLayers

I am unbale to draw vector layer on google base layer. Geometry is getting displayed but in wrong place. unable to find out where I am making mistake.                   var map = new OpenLayers.Map({         div: "map",         projection: "EPSG:900913",         displayProjection: "EPSG:4326",         numZoomLevels: 18,         // approximately match Google's zoom animation         zoomDuration: 10         });         var gphy = new OpenLayers.Layer.Google(     "Google Physical",     {         type: google.maps.MapTypeId.TERRAIN     }     );         var gmap = new OpenLayers.Layer.Google(     "Google Streets", // the default     {         numZoomLevels: 20     }     );        var ghyb = new OpenLayers.Layer.Google(     "Google Hybrid",     {         type: google.maps.MapTypeId.HYBRID,          numZoomLevels: 20     }     );        var gsat = new OpenLayers.Layer.Google(     "Google Satellite",     {         type: google.maps.MapTypeId.SATELLITE,          numZoomLevels: 22     }     );             var veroad = new OpenLayers.Layer.Bing({     key: apiKey,     type: "Road",     wrapDateLine: true      });          var veaer = new OpenLayers.Layer.Bing({     key: apiKey,     type: "Aerial",     wrapDateLine: true      });          var vehyb = new OpenLayers.Layer.Bing({     key: apiKey,     type: "AerialWithLabels",     wrapDateLine: true     });     map.addLayers([gphy, gmap, gsat, ghyb, veroad, veaer, vehyb]);              var featurecollection = {         "type":"FeatureCollection",         "features":[{             "type":"Feature",             "id":"Kalamboli_WaterShed.1",             "geometry":{                 "type":"MultiPolygon",                 "coordinates":[[[[300741.34931524785,2106906.049050181],[300800.297410894,2106869.2064904],[300854.82439936633,2106879.522407138],[300894.6143639288,2106923.733478872],[300916.71989979583,2106985.6289793015],[300971.3287606237,2107048.01571386],[301068.26562901965,2106953.698760827],[301073.5054597443,2106854.1419770676],[301159.6965815367,2106888.733047083],[301190.6443317514,2106913.049136536],[301885.00284087984,2106978.9788472815],[301886.5673019919,2106702.0692305285],[301975.74158535345,2106620.7172527253],[302216.66859653953,2106608.201563831],[302847.0406657621,2105080.3918409823],[302834.3537288213,2105033.471545858],[302804.6278275608,2104987.8335445123],[302782.2459724944,2104945.8675662656],[302768.2573130804,2104912.6445001513],[302750.42177232413,2104851.4441152085],[302739.5805612759,2104799.336358886],[302713.7015413577,2104715.7541188705],[302682.22705767123,2104601.396828147],[302669.63726419705,2104559.4308498986],[302652.1514399246,2104522.7106189323],[302620.8518144834,2104473.983455298],[302911.02858657064,2104494.4987160494],[303166.90489282465,2104587.207522663],[303348.61415378656,2104687.3330338066],[303467.28142625175,2104750.3750223033],[303537.7401192787,2104772.6251358897],[303604.4904600406,2104798.5836017416],[303645.2823349485,2104802.291954007],[303674.94915306533,2104780.04184042],[303708.32432344736,2104650.249511162],[303726.8660847687,2104550.124000018],[303752.82455062045,2104461.1235456695],[303721.25547322724,2104332.343132814],[303681.1521592293,2104292.3371697706],[303568.1483750431,2104266.139670791],[303486.2609467144,2104266.387994156],[303399.9845870565,2104164.7430431442],[303310.94429402595,2104151.101824263],[303318.84218235145,2104075.114664294],[303139.73065859167,2103975.6159268403],[302969.370562064,2103971.468935796],[302910.03764158604,2103923.7713569934],[302843.5525206531,2103927.928017655],[302642.73793877766,2103725.1470204643],[302622.9902879295,2103630.7781708725],[302463.65661495016,2103564.3766412735],[302344.7708120131,2103550.991090971],[302410.73991494486,2103601.8569815825],[302402.96563938755,2103735.5879491367],[302215.898252468,2103906.623944966],[302182.7263426876,2103936.9530724357],[302140.67819922237,2103853.633953094],[302109.13706720254,2103791.1346576097],[302063.6416661853,2103642.7365233265],[302048.9304914775,2103577.46374962],[302033.2046446043,2103507.688924383],[301977.0560143081,2103397.946618077],[301855.66263330856,2103262.630732585],[301431.3653230744,2103521.435677794],[301099.47130684555,2103708.791487609],[300733.7662491486,2103902.411464472],[300611.74919466034,2105664.3992876173],[299655.4773569257,2105653.8054204835],[299491.1439516857,2105650.7918029223],[299438.09066560393,2105644.896993356],[298699.76576763735,2105599.2122192313],[298627.5543504696,2105641.9495885745],[298571.9741584952,2105654.543904631],[298676.4228154672,2105854.1154456325],[298740.4597896832,2105971.6201847256],[298805.7402002885,2106079.1774326786],[298837.7586873987,2106123.319424618],[298871.52040198125,2106163.4155547996],[298903.35898980626,2106198.007490709],[298967.400150293,2106246.4793260694],[299031.22988511116,2106289.5851210104],[299090.0398211543,2106326.796106385],[299150.46161919547,2106366.586070948],[299323.13041602453,2106457.955619197],[299475.08550702373,2106562.752233681],[299526.27944528457,2106597.5641116975],[299564.1200038132,2106420.6942082513],[299823.3748386969,2106429.817319579],[299831.43818486616,2106467.9077479634],[299794.38145109516,2106586.407852658],[300180.36001105653,2106613.9735865295],[300122.5429216284,2106804.2326380094],[300323.03748841916,2106795.59721148],[300484.02450328256,2106817.4631620017],[300423.47747612034,2106949.7176301945],[300405.42704242177,2107021.8165602386],[300438.1759844469,2107021.816560241],[300716.29637459974,2107057.840396469],[300698.8575629709,2107003.477152708],[300714.5770551426,2106951.078845466],[300741.34931524785,2106906.049050181]]]]                 },             "geometry_name":"the_geom",             "properties":{                 "Id":0,                 "POLYGID":0,                 "AREA_Sqkm":8.57423854729,                 "PERIMTR_km":17.697620716,                 "xCentroid":301364.654690385,                 "yCentroid":2105318.17434779,                 "bbox":[298571.9741584952,2103262.630732585,303752.82455062045,2107057.840396469]                 }             }],     "crs":{         "type":"EPSG",         "properties":{             "code":"900913"         }     },      "bbox":[298571.9741584952,2103262.630732585,303752.82455062045,2107057.840396469]      };           var geojson_format = new OpenLayers.Format.GeoJSON();       var vector_layer = new OpenLayers.Layer.Vector("GeoJSON",{              format: geojson_format      });            map.addLayer(vector_layer);      vector_layer.addFeatures(geojson_format.read(featurecollection));      The GeoJSON layer is in EPSG:900913 projection.


Looking for ready tools to display real-time positions online

we want to show that in a big city like Palermo, cycling can be the fastest tool (and at the same time the most ecological). We will give 4 smartphones to 4 users, and there will be 4 ways to move: by bicycle, by public transport, by foot and by car. We would like to use some smartphone apps to show in real- time in a webpage, in a single map, the route of each user. I know I can use something like Google Latitude or Glympse to track in real-time user position, but I do not know how to put in a single map 4 real-time different routes. Our goal is to promote the use of bicycle, because we have a high air and noise pollution and the motor vehicle traffic makes mobility very problematic. We will do it voluntarily without any economic budget, then we are looking for some simple mush-up solution that does not force us to produce several hours of development. Something almost ready for "production". Do you some solution? Thank you,


PostGIS Out of Memory during bulk insert

I am attempting to import OSM road data using an SQL file generated by OSM2PO. However I keep getting the following error: > ERROR: out of memory   >  SQL state: 53200   >  Detail: Failed on request of size 1048576. This would suggest there is some memory limit set in the config file to only 1MB. However, I have set my work_mem to 16MB and my shared_mem to 500MB in the config file and reloaded it, plus completely restarted the server. I have also tried manually setting the work_mem for the session. The really annoying thing is that I have used this process to import a much larger dataset into PostGIS on a Netbook computer with considerably less physical memory. I vaguely remember having to tweak some setting to do it but for the life of me I can't remember what it was and the config file looks like the original factory settings! So, if it is not the work_mem that is at fault, which setting should I adjust? (I'm using PostGIS 2 and Postgresql 9.1 on Windows 7 32 bit). Many thanks!


Is city-supplied GIS data sufficient for transit operators or do they need their own set of GIS data?

City GIS data is usually built in a format where streets/avenues/boulevards/etc are modeled as lines that are geographically located in the middle of the streets/avenues/boulevards/etc. Is that sufficiently precise for big transit operators to manage their buses (real- time bus management and real-time information to users) or do they create their own set of GIS data that gives a more accurate model of bus routes? If public (or city) GIS data is not sufficient, and given that more accuracy creates larger data sets, where do you draw the line, figuratively and literally? Do you take the 'middle line' from the public GIS data and just apply an offset on each side to represent both directions of a bus line? And if so, is that offset variable between different segments (since an avenue is wider than a street)? Or do you create 'from scratch' a line that is as close to the actual bus route (and one line per direction)? Not exactly an expert in this field, so I hope my explanation is clear! @ Jason Baker and dassouki : I agree that centerlines are sufficient when you are planning a bus route, my question is more from the operating side. More and more transit operators (and in all but the smallest towns, the operator is a corporation separate from the city itself, albeit with close ties to the city administration) are using real-time bus management systems. Buses are equipped with systems to continuously broadcast their position to the control center which takes that information and projects it on a city map. Controllers can then follow every bus in service and make adjustments in real-time as they are needed. The management system can also send to users real-time information on ETAs at every bus stop in the city. From my understanding of those types of bus management, they take the coordinates of the bus and they match it to the GIS data they have. Obviously, buses don't follow centerlines. On narrow streets, the delta between the centerline and the actual bus position is probably not significant, but most buses take wider boulevards or avenues, where the difference is significant, or at least I expect it is. I'm expecting that difference could create various accuracy issues. For example, when the management system tries to determine if the bus is on-time, late or early, or what information it should send the users about ETA at a bus stop. I'm guessing that transit operators refine the city GIS data to create a new dataset that is more accurate and better answers their needs. I see two ways of refining the data (see original post), I'm wondering which one is most widely used, or if there are other ways to address the accuracy issue of city GIS data. Do not hesitate to point out something that isn't quite clear in my explanation, English is not my native tongue. ;-) @ Brad Nesom : You're correct as far as displaying the information. I'm looking at it from the management system's algorithm level: any information the system calculates and/or provides logically stems from the delta between the actual bus position, given by an onboard GPS, and the expected position. Now, if the expected bus position (the planned bus route if you will) is created by using basic city GIS data (i.e. the planned bus route follows the centerlines of streets/boulevards/avenues/etc) then the delta with the actual bus location can be quite large, which would, I expect, create accuracy issues with the information the management system calculates and/or provides. If I'm correct, how are those accuracy issues addressed? Do transit operator/agencies refine the city GIS data to create a more precise dataset that then allows them to have planned bus routes that are closer to the actual path a real bus would follow in the real world? The more I explain myself (and thanks to all for making me do so), the more I get the feeling that only a GIS expert within a transit agency could give me the answer I'm looking for. But all views and answers are appreciated !


How to create a vector feature drop target?

I would like to create, inside an openLayers map, a drop target for my features. The user should be able to drag a vector feature, drop on the target so that some further action can be triggered (in the specific it would be moving the feature to a new map object.) I have tried to do this by adding a `OpenLayers.Control.Button`to the map, my problem now is that I cannot sort out the z-index issue: when dragged on the target, the feature disappears **behind** the button. Is there any way i can set up properly the CSS of the button so that it stays _above the map tiles but below the features_? I have noticed that the map is on `z-index` 749, the vector features in a nested `div` with `z-index` 330 - I have tried to set the button to `z-index` 749 too but the feature still moves below. Ideas?


I am a beginner with Geoserver. I have started reading the Boundless tutorial: introduction to Geoserver. In the very first step, for installing the OpenGeo Suite and running the welcome page of Geoserver I have faced an error. The error states: 404: Not found The requested URL /geoserver was not found on this server I received no errors during the installation phase. when I try to run               http://localhost:8080/      I receive a logo of EnterpriseDB and some texts as follow: > Apache - version 2.4.7 PHP - version 5.4.23 Server is up and running The > default Apache context is www in the Apache installation folder I've checked the instructions for windows installation from here: http://suite.opengeo.org/docs/installation/windows/misc.html#installation- windows-misc were it is stated that perhaps if the port used by Jetty web server (8080) is already used by another service, we can configure and change the port information. For this they mention to look for a file located at: C:\Program Files\Boundless\OpenGeo\bin\jetty\start.ini Where I don't actually find such a file. I can locate the bin folder in OpenGeo, but there is no "jetty" folder in "bin". I've tried stopping and starting the services, all performed with no error/message. I've tried re- installing OpenGeo Suite (even in different location than Program files path). Still have the same error when trying to load               http://localhost:8080/geoserver      Does anybody have suggestion to fix this? I have installed OpenGeo Suite 4.0.2 on Windows Server 2012 R2 Standard. Thanks


How to update the layers in Geonode with cascading WMS from Geoserver?

We began a project in my office in which we would like to have all our geographical data in a central repository where we can search them, insert and edit metadata and view them on a map, so our choice is Geonode. We have a lot of data around on different machines and servers and on different physical locations so we dont necessarily want to put them on a single drive and / or convert them into PostGIS layers. So what we were thinking was to have a couple geoserver instances locally on the different offices and then have geonode consume WMS services from these geoservers. So what we did was to create cascading WNS on the geoserver instance that runs Geonode. The problem is that we cannot get Geonode to read those new WMS services. We tried to run **geonode updatelayers**. The script runs without any error but only updates the existing shapefile layers and not the cascading WMS. When we run                geonode updatelayers -s Ktimanet2      and the name of the store it gives an error:                FailedRequestError: No store found named: Ktimanet2      This is what my layers look like in Geoserver: ![enter image description here](http://i.stack.imgur.com/DXuSG.png) Any ideas anyone??


QGis draw over simple jpeg image

I'm pretty new to GIS, and since 2 months ago QGIS is a great tool to achieve very simple tasks, such open some shapefiles I find in the web and load that data on my website geoJSON formatted. Now I'm looking forward to produce my own data, since I need the shapes of boroughs and neighbourhoods of my city and it is not available anywhere.. I've tried some things, and In my first very original idea (dream) it looked very simple... Like: open my actual city bounds layer, put and image layer behind it, resize the image to fit it, and click on that yellow pencil to fast have a beautiful hand made map... Now, after lot of hours I realize that it is not that simple... Anyway, after some reading I could place my image on the map... I have a neigh_image_layer on which I see my full scaled beautiful JPG. The 1st problem I faced was that my city_bounds shapefile layer was not showing anymore in the map canvas after adding the image, so.. fixing some CRS matters on image load I could place both visible, but now since my city polygon is in the right place in the middle of Brasil, my image is probably placed over an area that would wrap the hole planet. There is any simple way to redimension the image behind the map layer? And better, am I trying the correct approach? I read tons of stuff, but maybe I don't know the correct name of the procedures I'm doing. ![enter image description here](http://i.stack.imgur.com/iq8JH.jpg)


How do I format tilelayer.wms url properties such that I add an overlay iteratively to my base map in leaflet

My base map was created using hard-coded template variables. I am using the leaflet tilelayer.wms constructor and including the url like so:               url: "http://localhost:8080/geoserver/sf/wmsservice=WMS&version=1.1.0&request=GetMap&layers=sf:archsites&styles=&bbox=589851.4376666048,4914490.882968263,608346.4603107043,4926501.8980334345&width=512&height=332&srs=EPSG:26713",      so I'm grabbing a wms layer from geoserver and I'm trying to make it display in my leaflet base map, but I don't think I have to actually go about creating a feature group. I think the url could possibly be simply:               http://localhost:8080/geoserver/sf/wmsservice=WMS      but then that would mean I need to structure the layer property which I am also unsure how to do so correctly. I think essentially I want to satisfy the GetCapability, GetMap, and GetFeatureInfo requests using leaflet's API. And I think this is possible to do by utilizing only the layer group methods and the tilelayer methods. In addition I don't want to have to utilize onclick to retrieve the GetFeatureInfo because essentially I am adding in data programmatically. I've seen examples utilizing the onClick eventlistener to do this, but I'd like it to be a toggle under the layer controls for visibility as it still is an overlay. So essentially I'd like to have a controls based listener as opposed to onclick.


Accessing fields of particular layer

I am trying to access the fields which I can see in this particular layer. I am able to see that it has fields but fetching the values in those fields is something that I am unable to do. Is there someway to do that?


Can a google calendar go on a map?

Can a google calendar go on a google map? Is there a GeoRSS that can be consumed? Thanks! -mb


Can PHP be used to set the XY, zoom of a Mapbox.js map?

All, Is there a way to set the xy and zoom level of a map using the URL of the site that is calling it? I'm thinking of a site I'm using now, built on php, which has mapbox maps built in javascript and added to a DIV. Could there be a way to use something like: > http: //mysite.com/map.php?x=234.534&y=34323.2343&zoom=5 Does that make sense? -mb


How to set symbology type and color based on data?

I have a point vector layer with several attributes in QGIS Dufour. One of them is satellite name, and the other is date. I want to display different dates with different colors (using some gradient) while the satellite name rules the type of symbol. For example GOES-13 is a square, AQUA a dot, TERRA a triangle. Satellite date goes-13 01/01/2014 goes-13 01/01/2014 aqua 01/01/2014 aqua 01/01/2014 terra 02/01/2014 ... and so on I know how to change the size or rotation of the symbol, but not the type. ![This is what I got](http://i.stack.imgur.com/Gsw8a.jpg) the solution ![enter image description here](http://i.stack.imgur.com/SaiOS.jpg) Any help would be appreciated.


How do I create blocks from a road network?

I have a road network and for every enclosed area within the network I want to create a polygon that represents that area. How does one do this?


Setting the Centroid of a Set of Polygons

I'm trying to shift a set of rectangle polygons over an area of interest (AOI). I thought it would be as easy as setting the SHAPE@TRUECENTROID of the polygon area of interest to the shapefile/featureclass of the rectangles. When multiple polygons are selected in Arcmap, the centroid of the collection of polygons appears. When attempting to pass the shapefile in to an update cursor, each polygon overlaps over the AOI coordinates instead. Is there a simple, Arcpy, way of sifting the entire set of polygons in a shapefile to be centered over said area of interest? Or put another way, maintain the spatial relationship each rectangle has with one another while shifting the entire set over the AOI. I should add that I am first rotating the polygons with Arcpy. When running the script it doesn't keep the rotation expected. I would expect setting the centroid would merely shift, not rotate. **EDIT.**   Here is the rotate code (this was adapted from another post on here dealing with rotating polygons)               def RotateAxis(AnchorX,AnchorY,inputx,inputy, rAngle):             x = inputx - AnchorX             y = inputy - AnchorY             resultx = ((x * math.cos(rAngle)) + (y * math.sin(rAngle))) + AnchorX             resulty = ((x * math.sin(rAngle)) - (y * math.cos(rAngle))) + AnchorY             return (resultx,resulty)      I update the geometry from this then finally after each polygon has been rotated I attempt to perform the shift. XC and YC are the anchor points which are the SHAPE@XY from my AOI. **Updated Code to reflect bottom picture.**               memFC = "in_memory\\dissolvedPoly"     arcpy.Dissolve_management(inFC, memFC,"PageNumber")          with arcpy.da.SearchCursor(memFC, ["SHAPE@XY"]) as oFeature:             for row in oFeature:                 memX, memY = row[0]          xShift = float(XC) - float(memX)     yShift = float(YC) - float(memY)     print "Shift x " + str(xShift) + " ; Shift y " + str(yShift)          with arcpy.da.UpdateCursor(inFC, ["SHAPE@XY"]) as cfeature:                 for row in cfeature:                 print "Shifting polygons..."                 print ""                 print "x = " + str(x), " y = " + str(y)                      cfeature.updateRow([[row[0][0] + (xShift), row[0][1] + (yShift)]])      **Before Shifting Polygons(What I start with)** ![Before Shift](http://i.stack.imgur.com/XxsGo.jpg) **After Shifting Polygons (What I Want)** ![After Shift](http://i.stack.imgur.com/Mebfx.jpg) **What I actually get.** ![What I Get](http://i.stack.imgur.com/u2GzO.jpg) EDIT 2: **What I get with the shift x, shift y code.** ![With Shift Code](http://i.stack.imgur.com/1svd6.jpg)


Open Layers and OSGB 1936 (CRS 27700)

I've been working with loads of shapefiles projected according to OSGB 1936 (CRS 27700). THe project CRS is set to 27700 and "On the fly reprojection" to 27700 is set (I keep this as a default as I work with OSGB 1936 95% of my time). I decided to download OSM layers from the Open Layers pluging. When I load this, the EPSG in the bottom right of the screen goes from 27700 to 3857 (Question 1: should this be happening anyway as it would suggest that the whole project has been re-projected to 3857?). As soon as the OSM layer is loaded it's way out of alignment but a quick pan seems to bring it altogether quiet nicely. WHat I have noted is that (Question 2), if I try to re-specify the CRS to 27700, then the shapefiles "move" by a few tens of meters with respect to the OSM. Does this suggest that QGIS is doing a second re- projection (from what to what?)? Also (Question 3), does it mean that if I import another shapefile that would be originally a dataset digitised with EPSG 27700 it would be re-projected to EPSG 3857 because the CRS in the bottom right of the screen was set to 3857 after the OSM import. THis is all a bit confuising and logic would suggest that the import of a none-ESPG 27700 (project default CRS) should not go and change the EPSG setting in the bottom right of the screen. Anita Graser's book says on pg 34 "Your project CRS will automatically be changed to Pseudo Mercator when you load a background map using the OpenLayers plugin option". DOes that mean there is no way of keeping ESPG 27700 active in the project when importing basemaps from Open Layers? If so, what alternatives are there? What I am trying to bottom out is to understand the correct way of importing basemaps (usually google, bing or OSM through the Open Layers plugin) into my projects (always EPSG 27700) without losing alignment and getting layers to correctly re-project. I'm trying to support greater use of QGIS in my company but don't want to lose credibility by promoting the use of a tool that is misalinging datasets. Don't get me wrong. QGIS is a great tool and I am very fond of it but importing layers with different CRS's is quite common these days and getting this right from the start is half the job done. Thank you for any support you can provide Antonio PS. I did quite an extensive Google search before posting and didn't come up with a recent, clear cut answer to my questions above. There is a bit of content out there on problems with older versions of QGIS, PROJ4, etc. but nothing recent for QGIS 2.0 so worth an update.


Problems with cyrillic

I have feature class settlement in my geodatabase and i have two attributes for them. Name on latin and name on cyrillic. When I use same feature to another computer (export feature class) i cannot see cyrillic letters in tabel, and can't label it. On both computer I have arcgis version 10.0. Do i need some additional settings on second computer?


How to create random points in a polygon in PostGIS

I have a polygon layer, and would like to generate random points in each polygon. An initial searching in Google resulted this website which presents a function for this purpose: http://trac.osgeo.org/postgis/wiki/UserWikiRandomPoint The function I'm interested to use is called _RandomPointsInPolygon()_ When I use this function and execute my query, it doesn't give an error but also never finishes the process. I tried giving a WHERE clause and limiting my query, this time process executed without any error but no points were stored in the relevant field in my table. Does anybody know what the problem is? and/or what could be an easy way to solve my problem? using this function or any other options that you may have know? The code for function:               CREATE OR REPLACE FUNCTION RandomPointsInPolygon(geom geometry, num_points integer)       RETURNS SETOF geometry AS     $BODY$DECLARE       target_proportion numeric;       n_ret integer := 0;       loops integer := 0;       x_min float8;       y_min float8;       x_max float8;       y_max float8;       srid integer;       rpoint geometry;     BEGIN       -- Get envelope and SRID of source polygon       SELECT ST_XMin(geom), ST_YMin(geom), ST_XMax(geom), ST_YMax(geom), ST_SRID(geom)         INTO x_min, y_min, x_max, y_max, srid;       -- Get the area proportion of envelope size to determine if a       -- result can be returned in a reasonable amount of time       SELECT ST_Area(geom)/ST_Area(ST_Envelope(geom)) INTO target_proportion;       RAISE DEBUG 'geom: SRID %, NumGeometries %, NPoints %, area proportion within envelope %',                     srid, ST_NumGeometries(geom), ST_NPoints(geom),                     round(100.0*target_proportion, 2) || '%';       IF target_proportion < 0.0001 THEN         RAISE EXCEPTION 'Target area proportion of geometry is too low (%)',                          100.0*target_proportion || '%';       END IF;       RAISE DEBUG 'bounds: % % % %', x_min, y_min, x_max, y_max;            WHILE n_ret < num_points LOOP         loops := loops + 1;         SELECT ST_SetSRID(ST_MakePoint(random()*(x_max - x_min) + x_min,                                        random()*(y_max - y_min) + y_min),                           srid) INTO rpoint;         IF ST_Contains(geom, rpoint) THEN           n_ret := n_ret + 1;           RETURN NEXT rpoint;         END IF;       END LOOP;       RAISE DEBUG 'determined in % loops (% efficiency)', loops, round(100.0*num_points/loops, 2) || '%';     END$BODY$       LANGUAGE plpgsql VOLATILE       COST 100       ROWS 1000;     ALTER FUNCTION RandomPointsInPolygon(geometry, integer) OWNER TO postgres;      My query: > INSERT INTO grid(point_geom) SELECT RandomPointsInPolygon(h.geom, 1) FROM > grid AS h; Here I have a point geometry column column named **point_geom** to store the result of query, and in the same table I have polygons stored in the _geom_ field. I would like to generate points inside each polygon of this _grid_ table. In the query above I tried to create 1 random point for each polgyon and store it in the relevant field.


can Well Known Text tables be used effectively, stored in Access or Base?

My question is: How do I import WKT text data back into QGIS, and how useful could Base or Access be in storing the data using WKT rather than spatially enabling it within a proper GIS database, like Spatialite? I get an error when I use the "Add Delimited Text Layer" (within the Manage Layers toolbar) in QGIS 1.8 on Windows XP, to add data with multipolygon geometries from a WKT field. I select the WKT[] and Delimiters[] radio buttons. Before I press [OK], I check that the Sample text box shows the columns parsed correctly. A CSV file with commas scrambles the columns together by the tool, even though Excel reads it perfectly (it was created using QGIS, exporting a Spatialite table the OGR LAYER option to add WKT geometries column). And so I used Excel to SAVE AS a TAB delimited .txt file. The txt file, TAB delimited, pre-processing sample text shows that the data is being parsed into the proper columns perfectly. This looks promising, then I hit [OK] to process it and a dialog box pops up reporting it failed, "The layer...is not a valid layer and can not be added to the map [OK]" Currently I'm using Spatialite with great success. But I'm experimentally trying to learn how to create and use WKT text files so that I can perhaps import them into Access or Base, to see how feasible it is to deliver data in alternative, consumer level database formats. The users would have experience with them, but I currently don't know very much about either.


ArcGIS / ArcMap problem with tiff file and projection

I have a raster in ArcMap . The projection is WGS 1984 UTM 22. When I look the details of the projection I can see that the "scale factor" is 0.9996 When I save this raster in a in tif file and the scale factor become 1 When I save this raster in a in img file and the scale factor stay 0.9996. This is anoying me because when I open the file in others softwares they do not recognize the projection. My version is Armap 10.0 Build 2414 Does anyone already has this problem and have a solution ?


Suggestions on Imagery type for ArcGIS for Server (Without Image Extension)

I am exploring the best options to serving raster imagery on ArcGIS for server 10.2.2. As a background, I currently have roughly 200 .jp2 files of about 3mb each. All of these files are currently served locally via the Mosaic Dataset function. However, Mosaic Dataset is not supported in ArcGIS for Server unless you have the Image Extension (which I do not). I have used some techniques in QGIS to merge the .jp2 rasters but the size becomes too massive to serve over ArcGIS for Server (roughly 20 gb). The merge I have run was for .TIFF and .IMG. Any suggestions are appreciated on how to serve multiple .jp2 or the best practices to condense the .jp2.


Where can I find geodata on livestock densities?

I am currently looking for geodata that represents livestocks (cattle, pig, poultry) at most detailed resolution for France. Up to now, the best data I was able to find is the FAO's GLOBAL LIVESTOCK DENSITIES (census data) data (See FAO data). For France, the raster has an resolution that is around 3.6km. Does anyone know a better and free to use/not that expensive source? I would be also willing to geocode a livestock farms dataset or something like that.


Arcmap fills up full image

I have an issue with arcmap. In the layout view and dataview it shows all buildings normal (it's a bit blurry, but it's only for a study not for presentation), but when I export it, all gaps between the buildings get filled. I don't know what the error could be and first thought it would be in some export setting, but it isn't. I made an EMF and inserted the picture in Arcmap and the EMF was filled in too. Then I have been trying to fix or find an answer for 3 hours now, while my Arcmap kept freezing too, but still to no avail. If someone could help me fix this, I would be very grateful :) Probably there is an easy fix to the problem. ![ARCMAP filling full layer](http://i.stack.imgur.com/D0DML.png) Some more background information: All files are shapefiles (vector) When I export just the layer with the building information all works fine.


Openlayer is very slow when using WKT Multipolygon with a large number of Points

I'm showing the boundaries of cyprus regions using openlayers with vector layer, I get the coords from a shapefile which has a lot of points, for instance some regions can have a multipolygon with in total :30000 Points. This is really slow on firefox / IE and in firefox it shows unresponsive script error. Only chrome works well. What's the best way to get it working faster and smoothly ? I read one answer is to create a WMS server with MapServer to generate the images tiles instead to use the OpenLayers directly but I can't implement that solution because I want to change layer style dynamically to the different features in the vector layer i.e to show different colors to the region based on the dynamic value. How can I overcome this issue. Any Insights would be much appreciated.


Model or Code to query all feature classes in geodatabase by selecting by attribute

I have a geodatabase that has 60+ feature classes that each contain records for 60+ locations. I need to export all records from each feature class for a specific location. In each FC there is a common attribute that identifies each location (i.e. instln_id). I would like to do this in ModelBuilder but have not had any luck with iterating feature classes or workspaces and selecting by attributes. Basically I want to scan through every feature class for records with a specific attribute and export records to new feature classes. Does anyone have any ideas or examples of something you've done that is similar?


qgis-web-client Not rendering label fonts

My install of qgis-web-client is not rendering label fonts, each character appears as a black box / square. See screenshot: ![enter image description here](http://i.stack.imgur.com/v7lw9.png) Tested in FF & Chrome, have tried changing from the MS system font to Aerial with no change. Thanks


What's the difference in these two shp files?

I'm trying to plot points on these maps in R, with points from "Coordinates" in the same folder. The WL.shp plots fine with the data, but the NG.shp (which should only be larger and of the same area + surroundings) won't show the dots? I tried different UTM zones and GIS programs (MapInfo and QGIS). Can anyone help to what the issue is, what am I missing to make this work?               ## appropriate library.      library(StatDA)     library(rgdal)     ## load data     setwd("C:\\...")     SS_data <- read.csv2("Coordinates.csv",header=TRUE)     #WL.shp file     shp.greenland<-readOGR("C:\\Users\\Andreas\\SkyDrive\\Speciale\\02. Data\\02. Statistik","WL")     ## NG.shp file     shp.greenland<-readOGR("C:\\Users\\Andreas\\SkyDrive\\Speciale\\02. Data\\02. Statistik","NG")     ## cordinates     Y=SS_data[,"Latitude"]     X=SS_data[,"Longitude"]          el=SS_data[,"Xx"]     ## Create pdf     pdf("Au dot plot.pdf",width=50,height=20,onefile=F)     ## plot map with x,y coordinates     plot(X,Y,frame.plot=FALSE,xaxt="n",yaxt="n",xlab="",ylab="",type="n")     plot(shp.greenland)#, col="grey")          # take symbols continuously growing     q=c(min(el),min(el)+(max(el)-min(el))/2,max(el))          # symbols and size     symb=c(16,16,16)     ssize=c(5,10,20)          # plot symbols:     el01=(el-min(el))/(max(el)-min(el))     el01ssize=el01*(ssize[3]-ssize[1])+ssize[1]     points(X, Y, pch=symb[3], cex=el01ssize, col="red")          #Legend     legn=round(q,2)     leg=rep(NA,length(q))     for (i in 1:length(q)){       leg[i]=roundpretty(legn[i],2)     }     legend("topright",pch=rev(symb),pt.cex=rev(ssize), legend=rev(leg), title=paste("La ppm"),            cex=8, col="red")     dev.off()


Performance Gain Through GIST Index for Point in Polygon Query

I have two tables: locations(id,region_id,the_geom) and regions(id,the_geom). For each location point I want to determine the region it is located in:               UPDATE locations SET region_id =       (SELECT id FROM regions        WHERE ST_Within(locations.the_geom,regions.the_geom)      );      Does it make sense to build a GIST index on the location points? I'll build an index on the region polygons but I'm unsure about the points. Would it speed up the query?


Using Flex to display single rasters from raster catalog in ArcSDE/ArcGIS server

One of the front end develoeprs here is having issues displaying, or working out how to display a single raster held in a raster catalog in ArcSDE using the Flex 2.2 API the Raster Catalog holds about 30 images and he wants to search for one of these images, based on either the name of the raster, or some attribution tied to each raster, but can't figure out how. Has anyone done this before? Thansk in advance.


North America Transit data

As far as I can tell, Google Maps does not release transit data or provide a transit API. Is there a one stop shop for transit Data:   * Transit stops   * Routes   * Fare hierarchy and schedule   * Ridership (optional)   * Routing logic (transfer node, terminator, park n ride, etc)   * Transit type (scheduled / call n ride)   * Transit mode (Bus, shuttle bus, accordion bus, high speed subway, LRT, tram, commuter train, high speed train)   * Transit organization make up (Transit is served by more than one org)


Ob_tran in proj4js

I am trying to implement an OpenLayers/proj4js-based application based on this projection:               +proj=ob_tran +o_proj=eqc +o_lat_p=90.0 +o_lon_p=0.0 +lon_0=180.0 +R=57.2957795131      The aim is to allow the projection to be recentered at an arbitrary point simply by replacing the +o_lat_p and +lon_0 values. The current version of proj4js does not implement the ob_tran (General Oblique Transformation) projection type. Is there an alternative I can use, or an implementation of ob_tran in JavaScript available? Thank you


Annotation in ArcGIS Desktop 10

**Question** : How do I change the display of my annotation feature class from the field titled 'TextString' to 'OBJECTID' or any other field? **Background:** I have produced an extensive set of annotation in ArcMap. I'm working with someone who basically has the need of a spatial database but only understands printed maps, so the text has grown to the point where I can't fit any more on the page. I'd like to export the annotation to a spreadsheet(no problem there) and replace the text shown on the page with an ID#. I'll then be left with a map with a bunch of small callouts which refer to a spreadsheet that my client knows how to work with. This annotation is not feature linked.


How to save a layer file with a relative path

In VBA, how do you save a layer file (.lyr) with a relative path? I have some code that loads a shapefile into ArcMap but I am unsure of how I go about using this shapefile to then save a layer file to disk that has a relative path set. The idea is after I have run my code and output all the layer files I can move the shapefiles and their associated layer files from a local drive which I use for processing my data to another location where other people can use it.


Adding a new Tool (Plugin) to Whitebox GAT - anyone else have trouble?

I am in the midst of adding a new tool to Whitebox GAT, which is merely copy of a current tool with some minor modifications to suppress messages output by the tool upon completion. This tool's messages, which require clicking "OK" after it completes, is preventing the batch processing of thousands of files. Has anyone successfully followed the instructions for adding a new plugin to Whitebox? I have followed the instructions to a 'T', checking the work several times, but the new tool doesn't seem to be loading correctly. In fact, after adding the new .jar file to the correct folder (plugins folder within the resources folder), Whitebox won't load at all. Has anyone had similar problems? Is there a known issue or a way to get this to work?


How to create a printable data sheet when using edit widget "value realtion" in QGIS 2.0?

I created a spatiaLite Database with a point layer (every point is a tree). Additional I created several tables to fill the columns of the spatial layer with attributes using the editing widget “value relations”. I need this because I want to speed up data entry! For some other attribute fields the data entry occurs via “line edit”. I also designed a custom form like Nathan Woodrow describes it in his blog. This works pretty good. Now my problem is not the data entry but the data output. I want to print a custom data sheet with all my attributes that occurs to one point (tree) that I’ve selected before. Can I do this with the print composer (it should also contain a small map with the point an the google satellite layer)? When I tried to realize this I inserted an attribute table by choosing the relevant attributes. For those attributes where I’ve used the edit widget “value relation” the entry in my table is the entry of the key column in my external table. But I need the entries in the value column. Maybe there is a better way to get this work done? Thanks for any help, Patrick


WMS MODIS Data OnEarth

I want to add OnEarth WMS MODIS in Openlayers. Web Map Tile Service (GIBS) does not fit because I want to get the images from 2006 to 2010. But I can not even imagine how code should look for WMS service... http://onearth.jpl.nasa.gov/tiled.html onearth.jpl.nasa.gov/wms.cgi?request=GetCapabilities onearth.jpl.nasa.gov/wms.cgi?request=GetTileService How can I add one layer such as 15 September 2007? Thanks.


how to create Basic DEM file with flat geometry in ArcGIS 9.3?

I want to create a basic DEM file in .ascii format which will just be a rectangular grid and with no slope i.e same elevation at every cell. Please provide information on how to achieve this. I am using ArcGIS 9.3. Thanks.


Defining a line from geographic coordinate points.

On a flat surface we can define any point on **line** which passes from **point1 (x1,y1)** to **point2 (x2,y2)** via simple trigonometry. How can we do that with **latitude** and **longitude** of 2 points? Imagine we have geographic points (54.977614, -103.710937) and (55.973798, -107.929687) on a globe. Using what mathematics can I define any point on the line which passes through these points? Or where can I read about this?


How to correctly install QGIS with plugins and GRASS-integration from source?

I'm running a Sabayon GNU/Linux (based on Gentoo) at my home desktop system and I want to install Quantum-GIS. I'm currently using the qgis-1.7.0-package from the repositories. But this is somehow very minimal. It does not support downloading plugins (`Plugins > Fetch Python Plugins` disabled: I think this is to avoid security risks.) and it doesn't seem to be connected with GRASS in any way (at least in any _visible_ way). The official download guide is not very helpful as it only describes ways to install qgis in major linux distributions (Ubuntu, Debian, etc...). Anyways, this guide suggests to look out for packages like `python-qgis` or `qgis- plugin-grass`. This seems to be what I am looking for, but it is not included in Sabayon/Gentoo-repositories. (This seems to be a major issue with any non- Ubuntu/non-Debian Linux-distribution.) My question is, how to install Quantum-GIS with full python-plugin-support und full GRASS-plugin-integration _from source_ , where to get required source code for everything and how to compile it correctly? The result should look like something I've found in this comment pointing to this video tutorial. **Update 01/01/2013** : Question now focuses on compiling all packages on my own. I found out repositories are not very helpful with this issue [1,2,3,4,5].


Kartograph - "projection not named"

The Kartograph package looks very promising, so I have been trying play around with it. As it turns out, I have been able to get the most basic map to work (the "world.json" example), but I could not get any of the shapefiles I actually needed to work. (I am primarily concerned with Washington DC, at least professionally.) They all throw the same exception:               from kartograph import Kartograph     K = Kartograph()          nbhds={"layers": [{"id":"mylayer",                        "src": "/home/choct155/ora_public/dc_shp/CompPlanPlanningAreas.shp"                        }],            "proj":{"id":"mercator"                    }            }          K.generate(nbhds, outfile='nbhds.svg')      * * *               RuntimeError: projection not named      I tried to follow the world example exactly (changing only the path of the shapefile) and played around with various configurations I saw others use. Further, as you can see above, I also tried explicitly setting the projection. Searching this error returns exactly one hit, identifying the LCC projection as the culprit. All DC shapefiles use the NAD83 datum and Lambert Conformal Conic projection. Even if I build up from Census shapefiles, as soon as I interact with a DC shapefile (when, for example, mapping blocks to DC geographies) this issue crops up. I have been able to circumvent this by converting the base file to a different projection, but LCC is really the best projection for my area (and the addition to the workflow is a bit annoying). Does anyone know of a way around this? Also, I have generally found less resources than I would expect for some pretty common spatial operations. In the interest of providing another resource for those learning to deal with spatial data in Python, here is a rough workflow that may be of some use for _converting shapefiles from one projection to another._


Should I use a discrete or continuous scale for coloring a chloropleth?

I am making a choropleth for an upcoming local race using D3. There are two candidates running for an election. For any given polygon on my map, if the red candidate has more votes, the color should be red. If the blue candidate has more votes, the color should be blue. If the blue candidate is winning by a lot, the color should be a deeper blue. If the red candidate is winning by a lot, the color should be a deeper red. Should I use a discrete or continuous scale for this? Meaning, should I create a color ramp from red to blue for a given saturation or intensity. Or should I create bins such that if red/blue falls in a certain range, the polygon is assigned one of a few colors? From tutorials, it seems like most people make bins.


How do I draw multiple copies of a rectangle in QGIS?

I am trying to create a map of our parish cemetery. I almost have a file with the centre point of each headstone plotted and now want to add a rectangle to each point to lay out the grave positions of both existing and future plots. I understand that GRASS has a module v.mkgrid but this appears to want to create a uniform grid with uniform spacing where my real world cemetery does not have graves in straight lines and equal distances apart. A previous answer to a similar question suggested the CAD Tools plugin or Rectangles ovals digitising plugin neither of which I can find using Plugin Manager I am using QGIS 1.8 Lisboa on a PC. Two question then:- Does QGIS have what I need to do this ? How do I find the 'missing' plugins ?


How to optimize color ramp for terrain

I'm working on a project to highlight LiDAR terrain on the web and part of the idea is to show the detail of the data at large scales. I've already read through the excellent Mapbox guide and I've got the process of mixing color shading, hill shading and slope shading together down. The problem is the certain areas of our county have vastly different terrain and the color ramp that works for the county as a whole doesn't work very well when zoomed in. For example here is the county as a whole: ![Whole of Lake County, IL](http://i.stack.imgur.com/oQV2o.jpg) Zooming into the red box which is part of the Illinois Beach State Park, you can see how little detail is shown: ![IL Beach State Park global stretch](http://i.stack.imgur.com/G0k56.jpg) But if we tweak the ramp for this particular area you can see a great amount of detail: ![IL Beach State Park global stretch](http://i.stack.imgur.com/8Ip0V.jpg) I already have a Flask backend using mapnik to dynamically stretch the color ramp for a given area and return it to the client but it seems like I should be able to do some sort of localized stretch and generate static tiles which would be much easier to maintain. I've tried a few things but I keep coming up with hotspots or blown out areas, does anybody have experience or maybe some ideas I could try?


Remove overlapping buffers

I have put a buffer around points from a point data set. But some buffers overlap each other. Now I would like to remove all the buffers (from the data set) which overlap another buffer. Does somebody have a suggestion, I would like to use the modelbuilder as I dont know how to use python.


ArcGIS Online heatmap

ArcGIS 10.2, ESRI Maps for MS Office Why a heatmap that was created in Excel and looks fine and is still fine on a preview of a map if I publish it it ArcGIS Online but turns into black points if I open it in ArcGIS Online map viewer ? ![It is what I like](http://i.stack.imgur.com/eFmy8.png) ![It's What I have](http://i.stack.imgur.com/Di005.png)


PyQGIS Dialog Plugin not resetting

I have written a PostGIS search plugin that works pretty well, except two things that I just cannot figure out a solution 1) When the dialog closes and then is reopened the previous query is still in the lineEdit and tableView. A tableView only seems to have clearSpans() however this is not clearing out the contents. I have tried .close(), .clear(), clearContents() none of which work or none are valid for a tableView. I think the issue is I am loading the data from the database into a model via QSQLQueryModel. 2) When the user queries the database, selects a point the map moves to the location. If the user then opens the plugin again and queries the database again and selects a record from the tableView a point is added as a new memory layer, however it has the same XY coordinate as the first query. I think the two problems are linked. Because number 1, the dialog isn't resetting properly, then the selected row from the table view gets confused. I am so close and I think it will be a very useful plugin for the QGIS, so I hope someone can help. This might not be the best method to achieve this but having read the cookbook and the PyQGIS Programmers Guide it is the only way that may work Thanks in advance Full code can be seen on the github page here - https://github.com/tjmgis/PostGISSearch This is the important code from the main python script               def cellClicked(self):         iface.mapCanvas().refresh()              index = self.dlg.tableView.currentIndex()              rownumber = index.row()              hmodel = self.dlg.tableView.horizontalHeader().model()         for column in range(hmodel.columnCount()):             if hmodel.headerData(column, Qt.Horizontal) == "x":                 xcolumn = column                  elif hmodel.headerData(column, Qt.Horizontal) == "y":                 ycolumn = column                  elif hmodel.headerData(column, Qt.Horizontal) == self.postgisdisplaycolumn:                 descriptioncolumn = column              self.x = self.projectModel.index(rownumber, xcolumn).data()         self.y = self.projectModel.index(rownumber, ycolumn).data()         self.description = self.projectModel.index(rownumber, descriptioncolumn).data()              self.pinLayer =  QgsVectorLayer(               "Point?field=Description:string(120)&field=X_Coordinate:double&field=Y_Coordinate:double&index=yes",               self.description,               "memory")         self.provider = self.pinLayer.dataProvider()         QgsMapLayerRegistry.instance().addMapLayer(self.pinLayer)              feature = QgsFeature()         feature.setGeometry(QgsGeometry.fromPoint(QgsPoint(self.x,self.y)))         if QGis.QGIS_VERSION_INT > 10800:             feature.setAttributes([self.description, self.x, self.y])             self.pinLayer.startEditing()             self.pinLayer.addFeature(feature, True)             self.pinLayer.commitChanges()         else:             feature.setAttributeMap( {0 : QVariant(self.description),                 1 : QVariant(self.x),                 2 : QVariant(self.y)})             self.provider.addFeatures([feature])             self.pinLayer.updateExtents()         #QMessageBox.information(self.iface.mainWindow(), "Feature/field count", "%s / %s" % (str(self.provider.featureCount()), str(self.provider.fieldCount())))         #self.pinLayer.reload()         #self.pinLayer.setCacheImage(None)         self.pinLayer.triggerRepaint()              iface.mapCanvas().setExtent(QgsRectangle(self.x,self.y,self.x,self.y))         iface.mapCanvas().zoomScale(10000)         iface.mapCanvas().refresh()              self.db.close()         self.db.removeDatabase('QPSQL')              self.dlg.close()               def addPostGISLayer(self, string):              if len(string) > 4:             uri = QgsDataSourceURI()             # set host name, port, database name, username and password             uri.setConnection(self.postgishost, self.postgisport, self.postgisdatabase, self.postgisusername, self.postgispassword)             # set database schema, table name, geometry column and optionaly             # subset (WHERE clause)             if self.searchmethod == 'SQL':                 querystring = ("%" + string + "%")                 sql = "select %s.*, ST_X(%s) as x, ST_Y(%s) as y from %s.%s WHERE LOWER(%s) LIKE LOWER('%s') LIMIT 1000"%(self.postgistable, self.postgisgeomname, self.postgisgeomname, self.postgisschema, self.postgistable, self.postgissearchcolumn, querystring)                  elif self.searchmethod == 'FTS':                 sql = """SELECT %s.*, ST_X(%s) as x, ST_Y(%s) as y FROM %s.%s WHERE %s @@ plainto_tsquery('english', '%s') LIMIT 100"""%(self.postgistable, self.postgisgeomname, self.postgisgeomname, self.postgisschema, self.postgistable, self.postgissearchcolumn, string)                  else:                 iface.messageBar().pushMessage("Error", "Wrong search method declared in config file", level=QgsMessageBar.CRITICAL, duration=5)                  self.db = QSqlDatabase.addDatabase('QPSQL')             # check to see if it is valid             if self.db.isValid():                 #iface.messageBar().pushMessage("Info", "Successfully connected to database", level=QgsMessageBar.INFO, duration=3)                 self.db.setHostName(uri.host())                 self.db.setDatabaseName(uri.database())                 self.db.setPort(int(uri.port()))                 self.db.setUserName(uri.username())                 self.db.setPassword(uri.password())                 # open (create) the connection                 if self.db.open():                     self.projectModel = QSqlQueryModel()                     self.projectModel.setQuery(sql,self.db)                     self.dlg.tableView.setModel(self.projectModel)                     self.dlg.tableView.resizeColumnsToContents()                     self.dlg.tableView.selectionModel().currentChanged.connect(self.cellClicked)                 else:                     iface.messageBar().pushMessage("Error", "Cannot open search on the database", level=QgsMessageBar.CRITICAL, duration=5)                  else:                 iface.messageBar().pushMessage("Error", "DB not valid", level=QgsMessageBar.CRITICAL, duration=5)          # run method that performs all the real work     def run(self):         # show the dialog         self.dlg.show()         # Run the dialog event loop         result = self.dlg.exec_()         # See if OK was pressed         if result == 1:             # do something useful (delete the line containing pass and             # substitute with your code)             pass


Can't get X coordinate of PointM in PostGIS

Here are two queries, and I can't understand how to filter points if `st_x` does not work in WHERE clause.               select st_x(geom_merk), st_asewkt(geom_merk) from road_density limit 5;          5897378.87038246;"SRID=900913;POINTM(5897378.87038246 7132600.62547651 32485.6553961611)"     5897400.98542158;"SRID=900913;POINTM(5897400.98542158 7132618.73022471 32502.5750083466)"     5897423.10046071;"SRID=900913;POINTM(5897423.10046071 7132636.83497292 32519.4946205321)"     5897445.21549983;"SRID=900913;POINTM(5897445.21549983 7132654.93972112 32536.4142327176)"     5897467.33053895;"SRID=900913;POINTM(5897467.33053895 7132673.04446932 32553.3338449031)"               select st_x(geom_merk), st_asewkt(geom_merk) from road_density where st_x(geom_merk) < 0 limit 5;          ERROR: Argument to X() must be a point     SQL state: XX000


Learning classical geography - recommended literature et.c

I've been working in the field of GIS for a few years now, and there are some disciplines of knowledge where I lack a good degree of education. My educational background is that I've studied computer engineering, and completed a bachelor degree, so I'm well at ease with any technical aspect of the job that comes up. Setting up servers, programming/scripting et.c. But what **I lack is a good solid knowledge about cartography, geodesy and similar topics** that fall within the domain of geography, which is of course a central aspect of the job. Some subjects I would like to know more about are, for example, cartography, geodesy, datum, reference ellipsoid, geoid, map projections, spatial reference systems. So **what I would like you to do is to point me to some good literature and other resources where I can learn about these topics**. Don't be afraid of suggesting any authoritative "bibles" that hold Humanity's accumulated knowledge in these fields, I'd rather choose that instead of some beginners- level book that only gives an introductory knowing. Thanks for your answers.