title: How to flash a graphic in JSAPI using AMD

text: With the code below I was hoping to flash the selected polyline, however no success.               function flashResults(featureSet) {     alert("flash");     //remove all graphics on the maps graphics layer     map.graphics.clear();          //assign featureSet array to a single variable.     var resultFeatures = featureSet.features;          //Loop through each feature returned     for (var i = 0, il = resultFeatures.length; i < il; i++) {         //Get the current feature from the featureSet.         //Feature is a graphic         var graphicFlash = resultFeatures[i];              // allow different symbols         markerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 28,         new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,         new dojo.Color([255, 255, 255]), 2),         new dojo.Color([255, 0, 0, 0.85]));         lineSymbol = new esri.symbol.CartographicLineSymbol(esri.symbol.CartographicLineSymbol.STYLE_SOLID,         new dojo.Color([0, 255, 255]), 10, esri.symbol.CartographicLineSymbol.CAP_ROUND,         esri.symbol.CartographicLineSymbol.JOIN_MITER, 5);         fillSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,         new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,         new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.85]));              // figure out which symbol to use                                                                                if (graphicFlash.geometry.type === "point" || graphicFlash.geometry.type === "multipoint") {             symbol = markerSymbol;         } else if (graphicFlash.geometry.type === "line" || graphicFlash.geometry.type === "polyline") {             symbol = lineSymbol;         } else {             symbol = fillSymbol;         }              graphicFlash.setSymbol(symbol);              //Add graphic to the map graphics layer.         map.graphics.add(graphicFlash);              var shape = graphicFlash.getDojoShape();         var animStroke = fx.animateStroke({             shape: shape,             duration: 500,             color: {                 end: new dojo.Color([0, 0, 0, 0])             }         });         var animFill = fx.animateFill({             shape: shape,             duration: 500,             color: {                 end: new dojo.Color([0, 0, 0, 0])             }         });         var anim = dojo.fx.combine([animStroke, animFill]).play();         var animConnect = dojo.connect(anim, "onEnd", function () {             map.graphics.remove(graphicFlash);         });     }      }


title: How to do "random" distribution of certain classes to certain amount of polygons with respect to spatial constraints

text: I have a polygon layer. Now, I would like to assign/allocate/classify these Polygon into 13 different classes respecting spatial constraint, in my case: neighboring polygons (sharing line or nodes) are not allowed to have the some class. How can I do this? (in QGIS, ArcGIS (basic), Python or....) I am grateful for any ideas! Thanks, ulf


title: OpenLayers: Feature edit handles not appearing when addUniqueValueRules applied

text: I have been pulling my hair out over this issue and am now wondering if it is a bug rather than something I am doing wrong. **The Problem:** I have a vector layer that users can edit. Each feature on the vector layer has an attribute called "Status" and I am using a unique values renderer to style the features. The layer can contain point, line, and polygon geometries. I have successfully set the layer styling and features are styled according to their status attribute. However, when a user selects a feature to modify the geometry the editing handles are not displayed which means the user is unable to modify the geometry, but the style clearly changes to the edit style. Here are the relevant parts of my code to create the layer:               // Capture the styles for the default render intents of a Vector layer     var defaultSymboliser = OpenLayers.Util.applyDefaults({}, OpenLayers.Feature.Vector.style["default"]);     var selectSymboliser = OpenLayers.Util.applyDefaults({ strokeColor: "red", fillColor: "blue" }, OpenLayers.Feature.Vector.style["select"]);     var temporarySymboliser = OpenLayers.Util.applyDefaults({ strokeColor: "red", fillColor: "blue" }, OpenLayers.Feature.Vector.style["temporary"]);          var editLayerStyleMap = new OpenLayers.StyleMap(         {             'default': defaultSymboliser,             'select': selectSymboliser,             'temporary': temporarySymboliser         }     );          // Create a symboliser lookup that will be used to stye features in their default intent     var symbolisersLookup = {         'Draft': { fillColor: '#0000ff', fillOpacity: 0.4, strokeColor: '#0000ff', pointRadius: 6 },         'Submitted': { fillColor: '#00ff00', fillOpacity: 0.4, strokeColor: '#00ff00', pointRadius: 6 },         'Review': { fillColor: '#ff0000', fillOpacity: 0.4, strokeColor: '#ff0000', pointRadius: 6 },         'Processed': { fillColor: '#9900ff', fillOpacity: 0.4, strokeColor: '#9900ff', pointRadius: 6 }     };          // Add the symboliser and lookup rules to the StyleMap object, using the default intent     editLayerStyleMap.addUniqueValueRules('default', 'Status', symbolisersLookup);          editLayerRefreshStrategy = new OpenLayers.Strategy.Refresh({force: true});     editLayer = new OpenLayers.Layer.Vector("User Submitted Information", {         strategies: [new OpenLayers.Strategy.BBOX(), editLayerRefreshStrategy],         protocol: new OpenLayers.Protocol.HTTP({             url: "Services/UserSubmittedInformationHandler.ashx",             format: new OpenLayers.Format.GeoJSON()         }),         styleMap: editLayerStyleMap     });     mainMap.addLayer(editLayer);       If I comment out the line:               editLayerStyleMap.addUniqueValueRules('default', 'Status', symbolisersLookup);      Then the features are no longer styled according to their status value but the editing handles do now appear. So, is this an OpenLayers bug or have I not done something important that allows the select render intent to work correctly when a UniqueValueRules is applied?


title: Can I use QGIS 2.0.1 with the National Hydrography Dataset (NHD)?

text: my first post here, and i'm a trying to learn QGIS now that i've graduated and ARC is no longer an option. I am trying to download and open with QGIS state- specific data from the USGS NHD Viewer, and i think i have at least managed to do the downloading correctly. For example, in efforts to gather data for the state of Florida, i ended up finding, downloading & extracting a compressed folder called NHDH_FL_931v210. extracted from it were 244 items of various file-types (ATX, GDBTABLE, GDBINDEXES, FREELIST, SPX, GDBTABLX) which altogether i assume is an ESRI.gdb and would open in ARC like i am used to. I have QGIS 2.0.1 now and am as green as it gets... i have been trying for a few days to open this data but am not sure really where to begin. When i try to open the files, nothing shows up in the QGIS opener because, i imagine, the files are not recognized by the program. Do i have the right file downloaded from NHD to display USGS rivers and lakes with QGIS? Do these files need to be converted? if so, how? Do i have to connect to the source folder within QGIS like i did in ARC? if so, how? Do i need to create a GDB in QGIS or is this thing ive downloaded gonna work? In my research so far i have seen posts from a few years ago (about Wroclaw, an older version of QGIS) that discussed certain steps to take during the installation process in order for ESRI .gdb files to be readable, and if this needs to be done could someone explain this process for 2.0.1 in steps? is the new version coming out going to be able to handle this problem i have easier or better?? sorry for the long post but im kindof an obsessive freak i just want to see my water again, it would make me real happy!


title: Feature To Polygon by Attribute

text: Hey everyone How are things? I am having a problem getting my head around an efficient way to create polygons from polylines using an attribute. I would like to get some pseudo code, suggestions as to how to go about it, sample code, ideas etc, on whether to use Feature Construction, Itopological operator, loop through OID's? I am stumped. When I run the feature to polygon tool from ArcToolbox, the polygons are created, just not correct polygons, I miss bays, small pools etc. I have line data, with names. What I have done is select by name attribute (11000+ Names) from 188000+ Lines in a feature class, convert to a layer, use feature to polygon tool and append to a polygon feature class. This works fine, results are accurate however write times of 6 seconds which takes way too long. Any suggestions are greatly appreciated.


title: Make new Tilemill map match default Mapbox label styles

text: I want to make a map in tilemill that matches the way that labels are displayed in this example, down to the countries that get labels at each zoom level, which country gets abbrev. vs. full title, using lines to connect labels to smaller countries, etc. That seems to be the default Mapbox label style (I notice that this Mozilla map acts exactly the same way), since there are no customizations there. However, when creating a new Tilemill map, there are no labels at all. What do I need to do to add labels in exactly the same way as that Mapbox example (i.e., the Mapbox default label styles)?


title: Character encoding for Oracle DB and Geoserver

text: I have a setup that uses Oracle database->GeoServer->OpenLayers->my JavaScript. I use the UTF-8 character set in GeoServer and the JavaScript layers. The Oracle instance is configured to use `WIN1252 (NLS_CHARACTERSET=WE8MSWIN1252)`. So, when I make a request from the JavaScript with the `CQL_FILTER` with characters such as `ç, à, ..` I get no results from the database because of the encoding. What is the best way to deal with this problem of multiple character sets? My opinion is changing the database charset to UTF-8, but unfortunately is to risky, because I'm not the only one using it. Any suggestions?


title: Near real-time sources of lightning strike data

text: I am wondering if anyone has any suggestions on sources of near real-time lightning strike data available for download? For example, Intellicast.com has a map of strikes, but makes no mention of the source of the data they used. Key attributes would be date/time and lat/long (any additional is just bonus), and strikes that occurred as much as 24 hours previously are logged and available. It could be in a text/table form (which can be converted to a spatial table), but if it is in a GIS ready format, that would be great too. I know of a couple of paid sources:   * Vaisala   * WeatherBank   * USPLN, NAPLN, and GLN. (Update: Apparently Intellicast gets its data from WSI Corp, which runs the USPLN). Other sources I have stumbled across:   * blitzortung.org- I haven't figured out how to get the source strike data from the site   * According to an 2007 blog entry, GuiWeather.com used to supply weather data to Google Earth, but the site is no longer active. Is anyone aware of any other paid/free sources of lightning strike data? **UPDATE** : Someone posted & deleted a good website for many resources of lightning data. The NWA Remote Sensing Committee. It provides a good overview of research and data providers, too.


title: Where are the 'preloaded' images for the composer

text: Hi I am trying to add a North arrow to a map in the composer in QGIS 2.0 on a Mac. Googling tells me to simply add one from the preloaded images. When I click the add image icon I get a dialogue box aksing for a directory to find the images. All the tutorials seem to assume that clicking on the add image button will bring up a bunch of handy images. I am fairly new to QGIS and have not got this far with 1.8. I can't find any docs specific to 2.0 and the print composer manual has not been updated yet. Thanks, Russell


title: How to initialize OpenLayers with no maps?

text: I need to reload my map oftentimes to test my layers and don't want to wait for OSM to load every time. How to avoid the main layer (the OSM map) to load and work only on my feature layers?


title: How to split kml file or extract Placemarks?

text: I have a file of state 2001 assembly districts outlines, from http://goo.gl/dJPyx in Mapinfo MIF format. I've created a kml file from that using ogr2ogr. These are the outlines of each assembly district. In the kml file each assembly district outline is inside a Placemark tag. I want to put the kml outlines in Google Fusion Tables but I need them split up so that each assembly district outline (Placemark) is in a separate kml file. It looks like I might be able to do it with xslt but I was wondering if there is a more direct way to do it. Or perhaps split the mif file first. I'm also worried about splitting the xml file using xslt because there are a bazillion coordinates, as one very very long line, between the coordinates tag down inside the Polygon tag. Thanks


title: Does an earthquake affect GPS?

text: There are news reports saying that the Sendai earthquake a couple days ago has shifted the earth on its axis and moved the island 8 feet. Last year, there were similar reports with the earthquake in Chile. Does this affect GPS devices at all? Is an inaccuracy introduced? How does GPS still work if the earth has shifted on its axis?


title: Calculating difference between bearing values in degrees

text: Suppose I have 3 geographic points, A, B and C. I can calculate the bearing of B from A (in degrees) using this SQL snippet:               degrees(ST_Azimuth(geogA,geogB)) as brg_a_b      ...and the same of C from B:               degrees(ST_Azimuth(geogB,geogC)) as brg_b_c      Now, I'm wanting to check if A, B and C are close to being in a straight line, let's assume I want the B -> C bearing to be within say, 2 degrees different to the A -> B bearing to consider them in a straight line. Azimuth is measured clockwise from north, so North = 0º, East = 90º, South = 180º, West is 270º. Say the A-B bearing is 1º, how do I calculate if B-C is within, say 2º (either way) - IE between the values of 359º and 3º? I need to construct a SQL "WHERE" clause which effectively does this: WHERE brg_b_c within 2º of brg_a_b (but copes with the 360-0 crossover) I'm sure this is really simple but am having a mental block working it out. Thanks for any pointers (or suggestions of achieving the same thing in a different way ?)


title: How to extract list of layers in MXD using ArcGIS Desktop 9.3.1 and Python 2.5?

text: I have been trying to extract a list of all the layers in my mxd (Arc9.3.1), using Python 2.5. If I could have the source of the layers too that would be even better... But as long as I can get a list of all the layers I have in my mxd that would be so handy! I have seen several scripts but they are all "arcpy" , which as far as I understood only Arc10, unfortunately upgrading is not possible right now. there is very little on 9.3.1. I am a somehow new to Python but I am confident we will find a work around for that. Thank you so much for you help!


title: How would you illustrate this in a report to a client?

text: The objectives are simple: They're adding a train station and the goal is to display how far you could get within 30 minutes before and after the new station is built. In this map that I'm working on here the circle size is calculated like this(all attributes with cost above 30 is removed, if there's time life when you get to a station we assume walking at 6 km/h for the remaining time and a limit at 20 minutes to prevent the circles from getting to big at origin. Without the zoom layer the last circle is impossible to see since the size is really small. Any other good suggestions on how to illustrate this?               case when "cost" < 10     then     20*100*2     else     (30-"cost")*100*2     END      Green = Nothing's changed   Yellow = Discontinued public transport zone.   Blue = New public transport zone.   How would you solve this with only one map? Other solutions then mine wanted!    ![enter image description here](http://i.stack.imgur.com/fMDkU.png)


title: Snapping in Esri javascript api does not work on mobile device

text: I have an Esri map loaded using the javascript api. I try to enable snapping, where a point should always snap to a given line. I have a snap point symbol that will trace the line to snap to when I drag the edited point around. When I release the mouse, the edited point should snap to the line. This works perfect on desktop, but when I try on iPhone 5 and HTC One, the snapping is not activated. The snap symbol is never shown when I drag the point, and it is not snapped when I release. This is the code for how I enable the snapping:               map.enableSnapping({         snapPointSymbol: snapSymbol,         tolerance: 20000,         alwaysSnap: true,         layerInfos: [{ layer: map.graphics, snapToPoint: false, snapToVertex: false, snapToEdge: true }]       });      ### Emulation testing: When I try to emulate this in Chrome developer tools, I see the same problem for iOS devices, but not for Android or any other types of device. It seems like the ESRI code is sniffing the user agent string, and if it finds an iOS specific value in the user agent, the snapping is disabled. ### Real device testing: Reproduced on iPhone 5 (iOS 7) and HTC One. # How can I get snapping to work on mobile device?


title: GIS Project Workflow?

text: If you had to teach someone the key stages to a typical GIS Analysis project, what would be the best generic answer? I would like to see diagrams to illustrate this point. Do not think it requires a long-winded answer. I have been looking at ESRI's answer. This is the best I have found so far, but was wondering if **we** (community wiki) could do better. Im thinking, perhaps a nice workflow diagram would be good? Feel free to edit Q, if it could be phrased better.


title: Analyze Datasets (Data Management) - what is the output?

text: I recently completed a Analyze Datasets procedure on my ArcGIS 10.1 SDE. However, I could not find a tangible output to review. Does anyone know where I can find the output?


title: QGIS - Generate QtrQtr Sections using Polygen from Spreadsheet

text: Is it possible to generate quarter-quarter sections from a spreadsheet using Quorum QGIS Polygen capability?


title: Is Javascript/AJAX still supported in ArcGIS 10?

text: A colleague of mine claims that the ArcGIS Javascript web API is not supported for ArcGIS 10+. I searched their website but all the information seemed to indicate that it should still work. Any insights?


title: Is there a way to snap to apparent intersections in ArcGIS 10.1+?

text: Suppose there are two lines in an ArcMap 10.1 or 10.2 editing session that cross but do not intersect, per se. This is the case when new lines a drawn. Is there a way to snap to the point where the lines cross? AutoCAD has this ability, and calls these intersections _apparent intersections_. In the situation below, two new lines ( _Line 1_ & _Line 2_ ) are drawn. In _Example X_ , _Line 2_ was just created and topology has not been checked. The cursor is hollow because the create new feature tool is selected. In _Example X_ , the snapping tip feature indicates there is no node to snap to at _Point A_. However, in _Example Y_ , there is a point to snap to at _Point A_ , because topology was checked in _Example Y_. Example X ![screenshot showing example x](http://i.stack.imgur.com/P9y4P.png) Example Y ![screenshot showing example y](http://i.stack.imgur.com/yMunS.png) **So, short of checking for topology errors, there does not seem to be a way to snap to apparent intersections**. _Conditions notes_   * All snapping options are on:   ![snapping toolbar](http://i.stack.imgur.com/I7P2G.png)   * Classic snapping is not enabled.    * The only relevant topology rules to this layer are:   ![enter image description here](http://i.stack.imgur.com/Yb4Jf.png)   * The system here is running ArcGIS 10.2, with features in 10.1 SDE on Oracle.


title: PostGIS: worldwide area calculation

text: I have a table with polygons in EPSG 4326. These polygons are distributed all over the world, for example:               POLYGON((10.7324632658845 59.9253049236956,10.7331908150806 59.9244876816042,10.7342435821189 59.9247242537529,10.7335237442742 59.9255414900176,10.7324632658845 59.9253049236956))      Now I'd like to get the areas of these polygons in square meters. With `ST_Area(the_geom)` I get the area in square degrees, right? So I have to do something with `ST_Transform`. I got a good result for the above mentioned polygon with the following transformation:               ST_AREA(ST_Transform(ST_GeomFromText(the_geom,4326),31467))      However, the calculation (of course) fails when calculating the area of a polygon outside of the coverage of EPSG 31467 (Fatal error...). Is there a "universal" area accurate projection for this purpose? Or do I have to check the location of every polygon and individually apply a suitable projection to calculate its area properly?


title: API for time and distance between two addresses?

text: The Google TOS appears to limit the use of API for time and distance between two addresses to use in conjunction with a displayed map. Does anyone know of any other mapping data source that offers a similar API without that limitation? I need JUST time and distance, for use in driver scheduling and management, not directions and such.


title: Is there a tool that tells how many features there are within a set distance in ArcView?

text: I'm looking to create a raster, in ArcView, that represents how many features (either points or polygons) are within a certain distance from any given location within a study area. I know there must be a tool or set of tools with which this can be done, but I've yet to find them and figure it out. Suggestions? thanks!


title: Print OpenLayers map with osm as background and all the vectors

text: I looking for an answer for a while, and i could not find a working solution. I am trying to exeport the OpenLayers map to some file - image or pdf, and i need all the background, include OSM and all the vectors and wms layers to be there. is it passable? this what i tried: 1) html2canvas - not showing OSM layer 2) openlayers export control - not showing OSM layer 3) Some version with server side that i cant find now - i didnt find .net version...(i am writing with .net) so there is other way?


title: Cannot populate a Ext GridPanel through GeoExt WMSCapabilitiesStore

text: I've been working through a few tutorial/starter map samples on the OpenGeo and GeoExt websites and have come upon a problem I cannot solve. I'm trying to load a list of layers from my GeoServer into a GridPanel using GeoExt.data.WMSCapabilitiesStore. No matter what I try, I cannot get anything to show in the GridPanel. I thought I had cross domain issues at first, but the problem persists even when the webpage and the GeoServer data are on the same server. Here's a link to my very barren looking web map: http://24.105.210.45/OpenGeoGeoExtMap1.html. Here's the JavaScript that's supposed to access the wms and load the layer list:                   Ext.onReady(function() {     var grid = new Ext.grid.GridPanel({         title: "Available WMS Layers",         region: "north",         height: 150,         viewConfig: {forceFit: true},         store: new GeoExt.data.WMSCapabilitiesStore({             url: "http://24.105.210.45:8080/geoserver/wms?service=wms&version=1.1.1&request=GetCapabilities",             autoLoad: true             }),             columns: [                 {header: "Name", dataIndex: "name", sortable: true},                 {header: "Title", dataIndex: "title", sortable: true},                 {header: "Abstract", dataIndex: "abstract"}                 ],      Any help with this, or just ideas of where to look next would be greatly appreciated.


title: interpolating values within a certain distance of points

text: Let's say I have a set of points representing bridges. I want to create a kind of "heat" map that would highlight areas within my study area that has many bridges in good or bad condition. I have a rating attribute for each bridge point. I've tried the spline interpolation method (in ArcGIS spatial analyst) which seems to work okay but it interpolates values for the entire area. I only want raster values for areas that within a certain distance of a bridge point (say one mile for example). How would I go about doing this?


title: Project geometry features upside down

text: I have shapefiles containing polygons and lines that are used in a mapfile for projecting them through Mapserver. Is there a way in changing the projection of the layers by 180 degrees(i.e. upside down)? Cheers!


title: Clipping multiple layers in QGIS 2.2

text: I have huge amounts of data (multiple country-wide shapefiles) which i have to work with constantly. But working on separate cases i only need a fraction of that data (region, city etc.) Loading the country-wide data and working with it is very slow. The program gets stuck alot, very slow rendering, 20 min. pdf generating time on (600 mm x 1500 mm size map) -- it's really stressful. I can use the clipping tool to clip a single layer to the needed region, but how do i do this to ~80 layers at once? AutoCAD has this tool called query to filter data where you can select the boundaries you need and it sort of clips everything else out. The way i see it it's either some sort of batch clipping or a query of boundaries by coordinates (?) for me. Is this possible and how?


title: GetFeatureInfo doesn't work!

text: I'm new at openlayers and I am having some trouble when trying to display the feature info. I have the map working, with the layers I want to add in, but it seems that when I try to ask for the info just like in the following example: http://openlayers.org/dev/examples/getfeatureinfo-popup.html It shows an error: Uncaught TypeError: Cannot call method 'addControl' of undefined As I said, my map is working perfectly and I am not able to figure out why it shows this error, can someone help me on this?! Here goes the piece of code that is anoying me:                   var info = new OpenLayers.Control.WMSGetFeatureInfo({             url: 'http://localhost/cgi-bin/mapserv.exe      map=/ms4w/apache/htdocs/lixo.map&layers=Edificos',              title: 'Identify features by clicking',             queryVisible: true,             eventListeners: {                 getfeatureinfo: function(event) {                     map.addPopup(new OpenLayers.Popup.FramedCloud(                         "chicken",                          map.getLonLatFromPixel(event.xy),                         null,                         event.text,                         null,                         true                     ));                 }             }         });         map.addControl(info);         info.activate();      Thak you very much! UPDATE_ ** ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __**                       <?xml version="1.0" encoding="utf-8" ?>             <!DOCTYPE html>             <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">               <head>                 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">                 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">                 <meta name="apple-mobile-web-app-capable" content="yes">                 <title>Faculdade de Ciências da Universidade de Lisboa</title>                 <link rel="stylesheet" href="utilitarios.css" type="text/css">                      </style>                           <script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>                 <script src="http://openlayers.org/api/OpenLayers.js"></script>                 <script defer="defer" type="text/javascript">                      OpenLayers.ProxyHost = "proxy.cgi?url=";                       var map, info;                  OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;                  OpenLayers.Util.onImageLoadErrorColor = "transparent";                              function init(){                            var navigation_control = new OpenLayers.Control.Navigation({});                  //DEFINIÇÃO DOS COMANDOS A UTILIZAR NO MAPA                       var controls_array = [                       navigation_control,                       new OpenLayers.Control.PanZoomBar({}),                       new OpenLayers.Control.LayerSwitcher({}),                       new OpenLayers.Control.Permalink({}),                       new OpenLayers.Control.MousePosition({}),                       ];                  //CRIAÇÃO DA VARIÁVEL MAPA COM PROJECÇÃO E LIMITES ASSOCIADOS.                       map = new OpenLayers.Map( 'mapa',{                      controls: controls_array,                       projection: new OpenLayers.Projection("EPSG:900913"),                       displayProjection: new OpenLayers.Projection("EPSG:3763"),                       numZoomLevels: 18,                        maxResolution: 156543.0339,                        maxExtent: new OpenLayers.Bounds(-1019723.067567,  4686569.677227,-1018877.96253, 4687126.173453),                        // maxExtent: new OpenLayers.Bounds(-1021183.067567, 4686569.677227, -1017159.96253, 4687181.173453)                        units: "m"                      } );                       // DEFINIÇÃO DE LAYERS DE INFORMAÇÃO                            var caminhos = new OpenLayers.Layer.WMS(                        'Caminhos',                       "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/lixo.map&layers=Caminhos",                       {layers: 'basic','transparent': true, 'isBaseLayer': false});                       //{'opacity': 0.5, 'isBaseLayer': true, 'visibility': true}  );                            var escadas = new OpenLayers.Layer.WMS(                       "Escadas",                       "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/lixo.map&layers=Escadas",                        {'layers': 'basic','transparent': true }                        );                       // LAYERS DE API's EXTERIORES                            var aerial = new OpenLayers.Layer.Bing({                        type: "Aerial",                        key: "AkDvQXEdeliH2C-JNTFWx_lnoUyIlfbRhdZoucaBHWBvHGIxmF_etkgXGYr0CzXE",                        sphericalMercator: true                         });                              // Bing's Road imagerySet                         var road = new OpenLayers.Layer.Bing({                          key: "AkDvQXEdeliH2C-JNTFWx_lnoUyIlfbRhdZoucaBHWBvHGIxmF_etkgXGYr0CzXE",                          sphericalMercator: true,                         type: "Road"});                           // Bing's AerialWithLabels imagerySet                         var hybrid = new OpenLayers.Layer.Bing({                        key: "AkDvQXEdeliH2C-JNTFWx_lnoUyIlfbRhdZoucaBHWBvHGIxmF_etkgXGYr0CzXE",                         type: "AerialWithLabels",                         sphericalMercator: true,                         name: "Bing Aerial With Labels"                         });                              var osmLayer = new OpenLayers.Layer.OSM("OpenStreetMap");                       //ADIÇÂO DE LAYERS E DETERMINAÇAO DE ORDEM DE APRESENTAÇÂO                             map.addLayers([road, aerial, hybrid, osmLayer]);                       //map.addLayers([hybrid, edificios]);                            map.addLayer(caminhos);                       map.setLayerIndex(caminhos, 1); //set the image overlay to the bottom                            map.addLayer(escadas);                       map.setLayerIndex(escadas, 2);                       // ADIÇÂO DE CONTROLOS AO MAPA                       map.addControl(new OpenLayers.Control.LayerSwitcher({title: 'Switch/add/remove layers'}));                       map.addControl(new OpenLayers.Control.ScaleLine({}));                       //map.zoomToMaxExtent();                            // TENTATIVA - ATRIBUTOS                       var info = new OpenLayers.Control.WMSGetFeatureInfo({                         url: 'http://localhost/cgi-bin/mapserv.exe?',                          title: 'Identify features by clicking',                         queryVisible: true,                         eventListeners: {                             getfeatureinfo: function(event) {                                 map.addPopup(new OpenLayers.Popup.FramedCloud(                                     "chicken",                                      map.getLocalXY(event.xy),                                     null,                                     event.text,                                     null,                                     true                                 ));                             }                         }                     });                     map.addControl(info);                     info.activate();                                var selectCtrl = new OpenLayers.Control.SelectFeature(edificios, {                         clickout: true,                          onSelect: open_infowin,                          //onUnselect: close_infowin                       });                           function open_infowin(event) {                            var mousePos = this.events.getMousePosition(event);                             infowin = new OpenLayers.Popup.FramedCloud(                                  "popup",                                  map.getLonLatFromViewPortPx(mousePos),                                  new OpenLayers.Size(300,150),                                  "Updating<br/>information...",                                  null,                                  true,                                  null                                );                     map.addPopup(infowin);                 }                      */                              var infoControls = {                         click: new OpenLayers.Control.WMSGetFeatureInfo({                             url: 'http://demo.opengeo.org/geoserver/wms',                              title: 'Identify features by clicking',                             layers: [salas],                             queryVisible: true                         })}                  // CENTRAGEM DO MAPA                     var point=(-1019294, 4686862);                       map.setCenter(point, 17);                            }                          var count=0;                           </script>              </head>      Here's a fuller version of the script. it doesn't include all the layers or the body part, but it would be too long, and I beilieve that's not ther source of the problem. I'm using MAPSERVER, can it be a configuration issue?! if so I attached my mapfile:                       MAP               NAME "QGIS-MAP"               # Map image size               SIZE 1000 800               UNITS meters               QUERYMAP                      STATUS ON               END                  EXTENT -89279.355471 -100905.485742 -88614.316404 -100538.256445               FONTSET './fonts/fonts.txt'               SYMBOLSET './symbols/symbols.txt'              PROJECTION                     "init=epsg:3763"                 END #end projection                    # Background color for the map canvas -- change as desired               IMAGECOLOR 255 255 255               Transparent true               IMAGEQUALITY 95               IMAGETYPE png                              SCALEBAR                 IMAGECOLOR 255 255 255                 LABEL                   COLOR 0 0 0                   SIZE TINY                 END                 STYLE 1                 SIZE 100 2                 COLOR 0 0 0                 UNITS MILES                 INTERVALS 2                 TRANSPARENT FALSE                 STATUS ON               END                     # Legend               LEGEND                   IMAGECOLOR 255 255 255                 STATUS ON                 KEYSIZE 18 12                 LABEL                   TYPE BITMAP                   SIZE MEDIUM                   COLOR 0 0 89                 END               END                     WEB                 TEMPLATE temp.html                 IMAGEPATH '/ms4w/tmp/ms_tmp/'                 IMAGEURL '/ms_tmp/'                 METADATA                   'ows_title'           'fcul'                   'ows_onlineresource'  'http://localhost/cgi-bin/mapserv.exe?'                   'ows_srs'             'EPSG:3763 EPSG:900913'                   "ows_enable_request"   "*"                   "ows_include_items" "all"                   "wms_include_items" "all"                 END                    END                  LAYER                 NAME 'Caminhos'                 TYPE POLYGON                 CONNECTIONTYPE postgis                 CONNECTION "dbname='fcul' host=localhost port=5432 user='postgres' password='****'"                 DATA 'geom FROM "campus"."exteriorcaminhos" USING UNIQUE gid USING srid=3763'                 METADATA                   'ows_title' 'Caminhos'                   "ows_include_items" "all"                   "wms_include_items" "all"                 END                 STATUS ON                PROJECTION                     "init=epsg:3763"                 END #end projection                 CLASS                    NAME 'Caminhos'                     STYLE                      WIDTH 0.05                       OUTLINECOLOR 115 63 44                      COLOR 249 239 189                    END                 END               END                    LAYER                 NAME 'Escadas'                 TYPE POLYGON                 CONNECTIONTYPE postgis                 CONNECTION "dbname='fcul' host=localhost port=5432 user='postgres' password='****'"                 DATA 'geom FROM "campus"."edificiosescadas" USING UNIQUE gid USING srid=3763'                 METADATA                   'ows_title' 'Escadas'                 END                 STATUS ON                 TRANSPARENCY 50                 PROJECTION                     "init=epsg:3763"                 END #end projection                 CLASS                    NAME 'Escadas'                     STYLE                      WIDTH 0.91                       OUTLINECOLOR 235 116 255                      COLOR 235 116 255                    END                 END               END                       END


title: Labeling coordinate value at 4 corners of graticule in arcgis

text: Hello all Is it possible to label automatically lat/long values at 4 corners: upper left, upper right, lower left, lower right of the graticule in Arcgis (10)? I have not found the way to do that so far. Thanks in advance


title: Create gdb file from Sql-Server Views using ArcObject in .Net

text: I am able to Create blank .gdb file using arcObjects in .net. e.g for Create blank gdb file i have wrriten this code.                   public IWorkspace CreateFileGdbWorkspace()         {             IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass();             IWorkspaceName workspaceName = workspaceFactory.Create("C:\\SampleGDB\\",               "FileSample.gdb", null, 0);                  IName name = (IName)workspaceName;             IWorkspace workspace = (IWorkspace)name.Open();             return workspace;         }      with above code i am able to create FileSample.gdb file. now how can i create gdb using sqlserver database using arcObjects. and fill with data toi gdb file.


title: Compressing multiple static layers to single layer to make web map loading faster?

text: In our web application there are many layers to be loaded, this cause the loading of map very slow. I am seeking a way to compress multiple static layers to a single layer to make the loading faster. All the layers from an enterprise geodatabase (version 10). Is it possible to compress layers?


title: Using topology to connect nodes <100m apart only

text: I have a bunch of line segments, most of which have gaps that are 100m or less. What I'm trying to do is connect these gaps so I have a series of connected line segments BUT leave nodes that are over 100m distance. Reason for this is each series of lines are to be grouped separately. Here's an example of one section.... ![enter image description here](http://i.stack.imgur.com/J6CdW.jpg) I've been trying to do this through topology editing ( _must not have dangles_ ) but can't seem to find where I can set a max distance of 100m between nodes before connecting. It keeps wanting to connect what all the nodes. Is this possible or is there some other way? I'm using ArcMap10 with Advanced license


title: QGIS create raster from cadastre (property lot data) polygon

text: I have a cadastre (property lots) polygon dataset of a region. Have used rule-base style in QGIS to show different groups of properties in the dataset classified based on their property lot size (ie. all properties 0 - 400sqm size, 401 - 800sqm size... etc). Want to create a raster of this (ie. showing the different groups eg. 0 - 400sqm, 401 - 800sqm...) and then save as this as a kml for viewing in Google earth. Obviously the polygon dataset is just to huge to view in Google earth, further only interested in the classified image output rather than any vectorised data.


title: Leaflet.js - drag marker from popup

text: I am trying to allow markers to be dragged via their popup. On mobile devices the marker position to is hard to see underneath the user's finger. If an area on the popup can be designated as an anchor by which the popup can be dragged from, it will allow for more precise placement of a dragged marker. I have looked at L.Draggable & L.MarkerDrag and can't figure out how to extend it to a div of the popup, while making the icon the target of the drag behavior. I have tried attaching a mousedown event to the div and updating the icon latlng based on cursor position, but it ends up being awkward as the cursor moves down to the latlng of the icon during placement and the popup randomly opens and closes. Is there a simple way to implement the behavior I am looking for?


title: European route E4 in geodata format

text: Good morning, Has anybody locate any kml, shp or gpx file with the complete European trail E4 ? Lots of google search navigates me to nowhere ... Dimitris


title: How to parse data from KML to shapefile with ArcGIS ModelBuilder?

text: In ModelBuilder of ArcGIS 10.2 does there exist a method or routine for parsing data from a KML file and "print" this data in a shapefile or convert this data a to shapefile?


title: NetworkAnalyst seems to solve along straight lines but not intersections

text: I've built a network dataset using a road feature class. All the data I mention is stored in a feature dataset within a file geodatabase. In particular the connectivity is set to Any Vertex, and not Endpoint. After building the network dataset, I was trying to create an OD matrix using a point feature class. This resulted in no distances other than from a point to itself. This pointed to connectivity problems. I decided to troubleshoot by manually adding points and solving for a route. Long story short points that are connected by endpoint to endpoint traversal work, but as soon as I add the next point on an edge that intersects, the route solver chokes and states there is no path between the two points. I'm confused what the problem is since connectivity is set to any vertex. I can verify that it seems the network was built correctly since junctions **do** exist for both endpoint to endpoint connections **as well** as intersections. A similar question is asked here with no clear answer other than a suggestion to make sure that route points be located on the network. I do not believe that is my problem since routes between points are solved in the endpoint case. The properties dialog on the network dataset says I have:               218035 Junctions     586428 Edges     0 Turns      I'm wondering if the network solver knows it can move from endpoint to endpoint since its just a straight line movement, but without turns for the vertex, there is no way to move onto the intersecting edge. How can I fix this? I've read about turn feature classes, but am somewhat confused how they apply in this situation. I had thought GlobalTurns would handle the neccesary traversal between any edge provided it was connected.


title: Creating a new integer field based on text in a different field - ArcGIS 10.1

text: I need to create a new integer field based on another text field. All instances of a the same text string in the existing field should be assigned the same number (starting at number 1). Can I do this in field calculator? If so, how? I'm a beginner code-wise. EDIT: Here's a sample ![enter image description here](http://i.stack.imgur.com/oQp3n.png) Each place name should be assigned a number. The third column shows what I'd like as a result. This is so I can use Hawths tool BATCH FIXED KERNEL DENSITY ESTIMATOR which only works with number categories: http://www.spatialecology.com/htools/bkde.php NOTE: Although I'm using 10.1, I've tried the non-batch kernel density estimator and it works well, no hitches so expect / hope the batch kernel estimator will work too.


title: How to Calculate Area in Raster data in Arcgis 9.3

text: I run Supervised Classification on Spot image and now how to claculate The Area of different classes with out converting To shape file . because converting to polygon create too much polygon which is very impossible to calculate Area from Them ? Please help me and give your Valuable Suggestion Thanks in Advance


title: PostGIS: Faster way to ST_Clip() rasters with a polygon?

text: I want to clip an image with a polygon from postGIS rasters.   **What I do:**   - Import raster into postGIS(raster2pgsql, tile-size: 500x500, each tile contains 12 bands landsat 8)   - Import a shapefile into postGIS with SRID = 4326.   I have 21309 tiles in my raster table, and 60 pylygons in my shape table. Now, I want to clip a polygon:               SELECT oid,        lowrite(lo_open(oid, 131072), png) AS num_bytes     FROM (           VALUES (lo_create(0),                   ST_AsPNG(                              (SELECT ST_Clip(ST_Transform(                                                (                                                SELECT ST_Union(foo.rast)                                                 FROM                                                   (SELECT rast                                                    FROM ldcm15, vnm_adm2                                                    WHERE gid=18                                                      AND ST_Intersects(rast_geom_4326, geom)) AS foo),4326), vnm_adm2.geom,true)                               FROM vnm_adm2                               WHERE gid = 18)))) AS v(oid,png);      `rast_geom_4326` is where I stored rast's polygon. Because, I don't want to use ST_Transform(rast, 4326) in the query, it's pain to wait for re- projection.   However, it still takes a long time to get the result. I'm using PostGIS 2.1 on PostgresSQL 9.3.


title: ArcGIS 9.3.1 on Windows 7 (64 bit) identify tool won't display

text: I have installed the arcgis editor student version 9.3.1, but the identify tool does not display. I tried the options described in the link: http://support.esri.com/en/knowledgebase/techarticles/detail/21485 I change my screen resolution first to a lower one since the settings were in the highest, restarted my computer, opened arcmap, changed to a higher resolution several times and nothing. I also tried to follow the path but I do not have the `Identifyresultsdialog` option either. I can only get to `HKey_Current_User\Software\ESRI\ArcMap\` Any other solutions? Identify is sooo necessary! I am using windows 7 professional version 6.1


title: How to Export multiple selected features to PDFs with Python?

text: I have 77 polygons that mark areas of a satellite image that I want to export as separate PDFs. Each of the PDFs should contain just the polygon (and as much as the surroundings to fill out the data frame, and should be zoomed so that they fill out each A4 page (i.e. the scale are allowed to vary). It is easy to obtain a list of the polygons, but how is the rest accomplished with Python?


title: DEM difference looks like a hillshade

text: I wanted to find the elevation difference between 2 DEMs. When I got the data, I had to georef one image and had to aggregated it too because their cell values do not match. I also tried to resample but I read that aggregating it is better. After much tweaking, I then subtracted them, but the resulting DEM looks like a hillshade. What does that imply?


title: Formula to Check Latitude & Longitude is within Area without Google Maps Api

text: I got this Example Map SampleMap: http://techinfo.co.id/test/map.php I make Boundary Polygon shape ,               -6.875165174925262, 107.56293296813965     -6.882663904407988, 107.66730308532715     -6.980818117491586, 107.67210960388184     -6.97093546084682, 107.54508018493652      And How to check if the given Lat, Lng is -6.935884,107.611592 in those Boundary Area But what i need is without Google Maps Api .. because it's gonna be Offline


title: DEM Elevation Units

text: I'm fairly new to the GIS world, and have a quick question. I'm currently using 10.1. I do not know much about rasters, so does transforming a DEM from one projection to another automatically convert the units of the cell elevations? If anyone could explain if it does or why it doesn't I'd appreciate it very much! Thanks, Max


title: Install node-mapnik on Windows

text: After successfully working with node-mapnik (and the gorgeous vector tiles) on Linux I'm trying to set them up on Windows too, but have come to a dead end. What I've done so far:   * Installed mapnik 2.2.0 SDK and added the bin and lib directories to the PATH.   * Using `npm install mapnik` shows an error about a missing cairo header file.   * Cloning the repository and adding the cairo directory to `binding.gyp` solved the header issue.   * Next error is about the target architecture (32 vs. 64bit), because the generated solution is 64bit only. I solved this by adjusting the gyp config parameters to get a Win32 target.   * Next errors are about missing boost libraries. I followed the tutorial on how to build mapnik dependencies on Windows to the letter and added the `boost-49-vc100\lib` directory to the `AdditionalLibraryDirectories`. Which results in this error: `Creating library C:\dev2\node-mapnik\node-mapnik\build\Release\\_mapnik.lib and object C:\dev2\node-mapnik\node-mapnik\build\Release\\_mapnik.exp LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\dev2\node-mapnik\node-m apnik\build\\_mapnik.vcxproj] mapnik_image_view.obj : error LNK2001: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const & )" (?throw_exception@boost@@YAXABVexception@std@@@Z) [C:\dev2\node-mapnik\ node-mapnik\build\\_mapnik.vcxproj] C:\dev2\node- mapnik\node-mapnik\build\Release\\_mapnik.node : fatal error LNK1120: 1 unresolved externals [C:\dev2\node-mapnik\node- mapnik\ build\\_mapnik.vcxproj]` Any suggestions on how to get node-mapnik (with vector tile support) running on Windows?


title: What other servers can I add to Google Earth's iOS app's "Servers" list aside from "Default"?

text: If you go to Menu > Settings > Servers, Google appears to allow a user to add servers. What other servers are there out there and what functionality would they bring? And what is the "default" URL? Could I make a server? That would be cool. I would be willing to put a lot of effort into that if it really opened up my phone to the kml world a little more.


title: Examples and materials about creating real time web gis application?

text: Nowadays all I see when I explore more about web gis applications are some examples of interactive maps which are actually not so 'dynamic' as they are called. It's usually just simple interactive map with few base layers and overlays with markers and popups on click. If they are little better then they offer you some kind of filtering and querying the data. It's good way to start learning how to develop web gis applications but isn't there something more than that? For example, what about real time web gis applications? It looks like very interesting field and more and more possible with new frameworks and technologies. E.g. let's say that you want to have map which shows you movement of dolphins which are tagged with satellite chip and that chip sends location data to web server (e.g. each 20sec) and then it's display on map in real-time? That's the first thing that come to my mind but there are hundreds of possible examples. I'm really struggling to find good examples of such projects so I'd appreciate if you could show me few. Beside that, I'd like to hear your opinion, what are some of the best way to start learning about developing real time web gis applications? Which open- source technologies could I use for it. I'm really looking forward to hearing your opinions and advices.


title: What is functionality of ArcGIS for Home Use compared to ArcGIS for Desktop?

text: I note that ESRI has available an ArcGIS for Home product (for non-commercial use) for $100 per year. I assume that this is pretty much fully-featured as it seems to have 3D Analyst, Data Interoperability, Data Reviewer, Geostatistical Analyst, Network Analyst, Publisher, Schematics, Spatial Analyst, Tracking Analyst, Workflow . Anybody used this and can comment on the functionality as compared to the usually expensive product? I never assume anything these days.


title: Is it possible to change the default raster style of newly created rasters in QGIS?

text: If I do calculations on rasters with the raster calculator or other tools, the resulting rasters displayed in my canvas are always in the same default style (singleband gray, black to white...) so that I have to change it afterwards to my preferred style. Being able to change that default raster style to my own choice would save me a lot of clicks. @Joseph: > > Traceback (most recent call last): File > "C:/Users/Gumbo/.qgis2/python/plugins\multiqml\multiqml.py", line 98, in > on_pbnApplyStyle_clicked self.myPluginMessage( > QCoreApplication.translate("MultiQmlDlg", "Unable to apply vector qml style > \"%1\" to raster layer \"%2\".")\ AttributeError: 'unicode' object has no > attribute 'arg'


title: How do I query OpenStreetMap for a list of US counties?

text: I would like to query OpenStreetMap (remotely) for a list of US counties (and their boundary vectors if possible), in a scriptable automated fashion. Preferred format is CSV. How do I do so? I am new to querying OpenStreetMap


title: Why does my map look stretched out?

text: I've decided to give this map design thing a go - I downloaded the USA counties shapefile from National Atlas, exported them to SQLite from QGIS, and then linked the SQLite file in Tilemill, and this is the result I get: ![Stretched Out Map](http://i.stack.imgur.com/xZoUL.png) I know that something with my SRS string is off, but when I selected WGS84, it still looks too wide. What should I be doing to make sure my map projection remains proper? (The reason I exported to sqlite was that there are like 3000 nodes in that shapefile, and mapbox would only show 500 when I imported the shapefile directly)


title: Can ArcGIS Server WMS display a graphicslayer?

text: I have tried to display a graphics layer with the WMS functionality of ArcGIS Server, but I cannot see the graphics in the image of the getmap response. I have done is manually by publishing a service with a graphics on an annotation layer, associated this annotation layer with a specific feature layer, and published it, but the graphics is not appearing, only the features. And I have done it programmatically by creating a graphicslayer and assign it to a layer, and its the same, graphics are not appearing on the map image returned by WMS. When I do a REST call to the service I can see the graphics in both cases. Are graphics not supported with WMS or am I doing something wrong? I am using ArcGIS Server 9.3.1, Java version. Nicole


title: Leaflet.geojson webpage performance out of hand, how to convert to .png?

text: I exported some countries as a single .geojson file. The file includes every country's vertices and coordinates, as that's what a .geojson is ─ a vector file. Thing is, there are about 20 countries and considering each of them are 100-120 sided polygons, it's not surprising that the file size is +100 MB. Leaflet has a geojson class that performs a geojson overlay for points, polygons etc. that reads the vector file and displays it on the map. Since I want to post this .geojson file on the web using Leaflet, making every user download 100 MB for this is out of the question. Apart from that, when I tested this Leaflet map on my computer using Chrome, it takes about 5 seconds each time I zoom in/out for the map to come to resolution (the map crashes for 5 seconds because the webpage becomes unresponsive due to this vector file workload). I suppose pulling 100 MB from the RAM each time somebody zooms would be hard for just about any computer. Is there any way to create a .png file of each country instead and overlay that onto the Leaflet map? I suppose that would greatly reduce file size and dramatically improve map performance.


title: ArcGIS ModelBuilder Clip Raster by Polygon Error

text: ![outer model](http://i.stack.imgur.com/i3oC5.jpg) ![inner model](http://i.stack.imgur.com/cYEPl.jpg) ![false result](http://i.stack.imgur.com/4an0S.jpg) My task is to derive the hypsometric integral and hypsometric curve for a lot of drainage basins. Since it is very time consuming to do this manually, i have created a model (with help from this website, see pics 1 (outer model) and 2 (inner model), using a tool called "hypsometry tools". The model is supposed to clip each single watershed out of my DEM using watershed FC and use that to calculate the hypsometric integral. The model is working. In pic 3 you can see: 1) three watershed features of Strahler Order 1. (blue, green, red) 2) the DEM which of which each watershed is clipped of. (black and grey) 3) one of the clipped DEM which is used to calculate the hypsometric integral. (the green-yellow-red rectangle) My problem now is: I have three watershed features, containing watersheds of Strahler order 1 of different rivers. (pic 3) The results are good with the blue and green watershed features. But with the red one, the model does not clip the watersheds correctly and because of that, i get the wrong results. Instead of clipping the DEM to the extent of a watershed, the result is mostly this big rectangle DEM (i coloured it for determination). But the problem only occurs with the red coloured watershed FC. When I clip the watersheds manually, there is no problem. Can anyone help me? Update: I solved the problem by constructing a new model. Now the results are good for all watershed FC! Thanks anyway... :-)


title: 'OnStartup()' method in ArcGIS extension no longer running when ArcGIS starts up

text: I have a couple 'large' extensions for ArcGIS that have been in development for a couple of years now. Recently I've found that the "OnStartup()" method in the Extension class is no longer getting hit when ArcGIS is launched. I have a feeling that something has gone with my COM registration. Note that this is an extension, not an add-in. The major issue I have run into is my default workspace for storing temporary files is being setup from this "OnStartup()" method (checks to see if the workspace already exists and has files in it, if not it will create the workspace at a default path). So, when I attempt to run a tool from the extension it crashes as it cannot find the path it expects to store temporary files. Interestingly, if I open the Customize->Extension menu in ArcGIS and un-check/check the extension the "OnStartup()" method runs. So, it's almost as if ArcGIS is treating the extension as if it were "off", even though it is checked in the extension menu. I've gone way back and compared the extension class in source control and cannot find any changes that could have caused this error. This problem may have occurred when I installed the latest service pack, but I can't be sure. Has anyone else encountered this? Any help would be greatly appreciated!


title: Return symbols for geometries from Dynamic Service Layer?

text: I'm using the ESRI Silverlight API and I've got a question regarding tasks such as identifies and queries that return geometry from a Dynamic Service Layer. These tasks return graphic geometry but no symbol, so in order to display that graphic in another GraphicsLayer, I have to have a symbol setup client side and then assign that symbol to the graphic. What I'm wondering is if there is any way to not only pull back the geometry from the Dynamic Service, but also pull back symbols? The only approach I've been able to come up with is to access the FeatureLayer via the REST endpoint and pull back it's renderer to assign it to my GraphicsLayer. This works, but limits me to only the symbols specified in the Dynamic layer (I can't use a single graphics layer for results from multiple Feature Layers). This also seems fairly complicated to get to where I'm wanting to be. I'm thinking there might not be any way to do this, but wanted to ask and see if anyone has any ideas. Thanks!


title: NDVI image value

text: In order to get monthly NDVI image with max value from two 16 day-images, I used mosaick tool in ERDAS8.7 by choosing max function from "set overlap function" tool. But after doing this, when I see the value of output image using inquire curcior, the value is between 0-255. when I saw the layer info, the value of output image is within the range of NDVI image (-1 to 1). So What does it mean? What is the problem with output image? Can this way used to this process? Many thanks


title: How to get first, most current coordinate in GeoCoordinateWatcher?

text: It seems like when I have an app that uses a GeoCoordinateWatcher and I attempt to get the first coordinate, it always pulls the last coordinate that the GPS used first when raising the PositionChanged event. It's not always the first PositionChanged event, but the last time an app used a GeoCoordinateWatcher. Any idea why this would be the case? I understand that it also tracks the GPS entry when the device just sits and looks like its not (due to the sensitivity).


title: Where is the feature cache in ArcMap?

text: It seems that ArcMap keeps a cache for every layer which contains features data and every time wants to refresh layer or apply a change,uses tis cache.As I found,when ArcMap wants to draw a layer from the scratch,sends this query to geodatabase: select ObjectId,Shape from "featureClassName" [where "layer definition query expression"] In editing mode,when using snapping,it seems the features data in this cache are used to determine snapping state while mouse movement.I don't know how ArcMap stores spatial data in this cache,in ESRI shape format or as WKB,But I need to retrive these features data. Is there any way to retrive feature data of a layer using its cache(layer cache) instead of using IFeatureClass::get_Feature method? .....Maybe my idea isn't right and a layer doesn't have any cache(I don't mean cache which is optional for layers and boosts the speed of layer draw),but I'm almost sure spatial data of layers(map) is stored in ArcMap memory somewhere and ArcMap uses it for its operation like snapping during edit operation.Is there any way to access this part of ArcMap data(if really exists)? Thanks and Regards * * * Thanks Kirk,bu I don't want to setup a cache,I want to retrieve data from ArcMap cache.ISpatialCacheManager doesn't offer any method for getting a specific data from it.Let me discuss what I mean in more details. When I put this code inside my program               //C#          IFeature ipF=ipMyFeatureClassObject.GetFeature(10);      ArcMap issues a select command to geodatabase,let's suppose:               select * from MyFeatureClassTableName Where ObjectId=10      and gives back a record of data. In edit mode,ArcMap can't use this method to get spatial data and calculate snapping state for features on the map because of time consuming this method has and snapping calculation needs a high speed data retrieve,also because mouse can moves every where on the map and snapping is enabled for any zoom,all these witnesses shows that spatial data must be available somewhere in memory and I'm looking for a method to access it. If all these consumptions not come true,so there must be a perfect method that ArcMap uses to retrieve spatial data from geodatabase on the fly(for example 4 or 6 level spatial indexing based on the map extent and use the mouse position to retrieve only part of spatial data while mouse movement very fast,in this way only has access to geodatabase when the smallest indexing area of mouse changes). I'm dealing with developing a tool like "Sketch Tool and "Edit tool" for a data source other than ArcObject data source and I don't want to setup a cache parallel with ArcMap.if possible I want to use same data which ArcMap stores in memory for this data source. Now,do you guys think these are true consumptions and if yes is there any way to access ArcMap spatial data in its memory? Best Regards


title: Is it possible to create 3D dxf with OGR?

text: Does anyone know if it's possible to create a 3D dxf with OGR. I would like to assign our contour lines a z value and export them to dxf for some cad work. PS I know FME can do this, however I would like to try and find a free solution and if possible do it in QGIS.


title: Spatial operators in R?

text: How can I do spatial selections or filters in R? I can do this in PostGIS using (e.g.):               SELECT * FROM mypoint, mypoly     WHERE ST_Within(mypoint.geom, mypoly.geom);      and it is similarly a piece of cake in most other GIS software. So I'd expect something in R to look like:               mypoint[within(mypoint, mypoly),]      but I can't find any leads anywhere. I'm looking for something that uses the common spatial predicate terminology used in PostGIS/GEOS/JTS/Shapely (within, contains, intersects, overlaps, touches, etc.; DWithin would be bonus). Does this functionality or library exist for R? If not, is there something that is similar? Note: In R, I use the `sp` class for my objects (`SpatialPointsDataFrame`, etc).


title: Register SDE view and Layer

text: I'm building simple views against an ArcSDE Oracle RAC 10g. My SHAPE columns are of SDO_GEOMETRY datatype. ArcSDE 9.3.1. I have several point tables, with the following outline: ID (Guid) Name (string) Shape (SHAPE) I've built a simple view liek this in Oracle!               CREATE OR REPLACE VIEW VW_POINTS AS              SELECT ID, Name, Shape from TABLE_A                  UNION ALL              SELECT ID, Name, Shape from TABLE_B                  -- etc      The view in Oracle is created just fine. I've registered this view with the command line: sdetable -o create_view -T POINTS -t VW_POINTS -c Id, Name, SHAPE etc The ArcSDE view is created again, just fine. I can use ArcObjects to query it, etc. I need now to create a Layer. I've tried the command line tools, sdelayer -o register, but I had no success. It gives me a message, saying that views are not suported. I will need to do this several times, sometimes using complex syntax for building the view. What is the problem? How can visualize these spatial views as SDE layers (I don't need to edit them, just view them spatially inside ArcMap) Thanks for the input! **EDIT** This is a screenshot in ArcMap, for your deligth :P ArcMap Screenshot for your happiness: As requested, here comes the describe_long // create_view C:\Users\H>sdetable -o create_view -s server -i port -u user -p pass -T view_airspace_points -t vw_airspace_points_oracle -c "*" at this point I altered the view on oracle, including a cast as numeric(38,0) before registration. // register layer C:\Users\H>sdelayer -o register -l view_airspace_points,shape -C OBJECTID,USER - g RTREE -s server -i port -u user -p pass -e p -P HIGH ArcSDE 9.3.1 for Oracle10g Build 2784 Tue Oct 27 10:51:14 2009 ## Layer Administration Utility Layer Description ....: Table Owner ..........: SIGMAGIS2 Table Name ...........: VIEW_AIRSPACE_POINTS Spatial Column .......: SHAPE Layer Id .............: 1398 SRID .................: 79 Minimum Shape Id .....: 1 Offset ...............: falsex: -180.000000 falsey: -90.000000 System Units .........: 994200.000000 Z Offset..............: 0.000000 Z Units ..............: 1.000000 Measure Offset .......: Measure Units ........: XY Cluster Tolerance .: 2.0 Spatial Index ........: parameter: SPIDX_RTREE exist: Yes array form: -2,0,0 Layer Envelope .......: minx: -180.00000, miny: -90.00000 maxx: 180.00000, maxy: 90.00000 Entities .............: p Layer Type ...........: In-Line Spatial Type Creation Date ........: 06/28/11 09:28:45 I/O Mode .............: NORMAL Autolocking ..........: Enabled Precision.............: High User Privileges ......: SELECT, UPDATE, INSERT, DELETE Coordinate System ....: GEOGCS["Longitude / Latitude [WGS 84]",DATUM["WGS 84",SPHEROID["WGS 84",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Decimal Degree",0.0174532925199433]] Layer Configuration ..: DEFAULTS


title: Zoom to see entire MapLayer in Bing Maps

text: If I have a MapLayer that I'm applying to Bing Maps where I have a list of coordinates, how can I zoom to see the full MapLayer (dynamically zoom to the proper size) and toggle between seeing the starting point and ending point?


title: Drawing a polygon with a hole in it using Mapstraction

text: I am using Mapstraction to make a web-based mapping system. The documentation has some serious holes in it. I would like to use Mapstraction to draw polygons with holes in them. Serious holes. Can anybody tell me how I can do this?


title: QGIS Fetch Python Plugins Crash

text: I am using QGIS v1.6 on Ubuntu 10.10. When I use the Fetch Python Plugins menu item QGIS crashes. If I run from the terminal with sudo I get the following error: Segmentation Fault Does anyone know how to fix this? I have this problem on 2 installs of Ubuntu on 2 different computers.


title: Are there any examples of using GIS in Civil Engineering construction field?

text: At the moment I am thinking "How to use GIS when construction HighWays,Buildings,pipe lines etc . Is there any way we can utilize GIS for Civil Engineering construction industry to increase the efficiency of current construction work flows? Or Pls suggest any examples of using GIS in Civil Engineering construction field? Thanks for any assistance.


title: How to add a column in QGIS via python

text: I have a point shapefile and a polygon shapefile in QGIS now I want to use the point shapefile's value add to polygon shapfile(be a column in the end) there are colors with each value and make the color overlay on the polygon how to do it with python??


title: Teaching Python to Land Surveyors

text: Does anyone have any good examples of using Python to automate or simplify common surveying tasks? I'm teaching a Python/ArcPy lab this week for a GIS class. There are a number of surveying students in the class that think GIS is largely a waste of their time, and are only taking the course because it's required. I want to give them something to be excited about. A little context: Most of the students will probably be working for forestry or title companies when they graduate, and we are in Arkansas, so almost everything around here is based on PLSS. So far, my thoughts are showing them the angular math functions and mentioning the couple of free Python-based CAD programs. I've also learned there is a project to write a plugin for AutoCAD that provides a Python interface. Any other suggestions would be greatly appreciated. Edit: I've already taught the class, and as expected, the surveyors weren't too thrilled. I'd still love to hear any good examples of using Python to facilitate surveying.


title: Leaflet offline tiles problem

text: I hate to ask this kind of questions, but i ve been stuck for 2 days now: I rendered some tiles with mapnik which i want to serve in my offline application which will run from a portable disk, but via browser still. I switched openlayers to leaflet for this particular case because of its nice widgets and seemingly easier setup. However, i initialize my map and tile layer like this:               var map = L.map('map_canvas');     map.setView([50, 10.0], 6);                var layer = L.tileLayer('./data/map/${z}/${x}/${y}.png', { maxZoom: 16 , tms: true});         map.addLayer(layer);      But what i get is a blank map. If i inspect whats going on with Firebug it seems that tiles are not even being requested (no other errors either). The map is set up right because i can see leaflet map widgets, i suspect its got something to do with the url of the layer. I copied that directly from my other OpenLayers app which works without a problem. Any ideas, or has anyone else stumbled across this?


title: how to configure WFS layer with openlayer in PHP wampserver with windows?

text: I have a problem to display WFS layer outside the Geoserver. My code working fine in geoserver, but when I tried my code in wampserver(PHP), only WMS layer is being to displayed. I gone through many tutorial and stack overflow queries related to adding WFS layer in openlayer but nothing working in my case...I have also tried proxy.cgi scripts to allow proxy call to geoserver, but it not works. Is CGI proxy script can be used only with Python or it can be used with PHP as well?


title: CartoDB With Fulcrum Webhooks

text: I recently ran across a guide on how to connect fulcrum to cartodb and it seemed relatively straight forward so I decided to give it a try. 3 hours later and this thing is still fighting me. I am using Wamp to host my php script, and it took me forever to realize that I had a bad curl.dll file in Wamp and curl was not activated. Once that was problem was solved I restarted and followed the guide word for word and I still am not getting any results. Apparently if a successful connect is made cartodb sends two files to your server.... and this is not happening as well so I am thinking I still am have a connection issue? Has anyone implemented this yet?


title: Why doesn't LeafletJS complete the conversion when re-projecting to Spherical Mercator?

text: When I use the Mapbox Leaflet pre-packaged Projection class SphericalMercator to project a lat/long coordinate into EPSG:3857 I have to multiply the result Leaflet provides by the earth's radius.               var latlng = L.latLng(45, -120);     var sphericalMercator = L.Projection.SphericalMercator.project(latlng);      The following is what Leaflet returns:               sperhicalMercator.x => -2.0943951023931953     sphericalMercator.y => 0.8813735870195429      But the actual answer is `(-13358338.8952, 5621521.48619)`, which I got by multiplying the results returned by Leaflet by 6,378,137 (earth's radius in meters).               var actualAnswerX = sphericalMercator.x * 6378137;     var actualAnswerY = sphericalMercator.y * 6378137;        Am I missing something?


title: When dealing with rasters of varying resolutions should one resample to the highest or lowest resolution?

text: I'm looking for recommendations on best practices for dealing with raster data layers with different resolutions and projections. The advice I've been given is to always resample to the layer with the lowest resolution before performing any analysis, but this seems like huge waste of precision to me and I've never been given a solid explanation for why it should be done. When is it reasonable to resample to match a higher resolution grid and what are the implications compared to resampling to a lower resolution? I realize that this is likely highly situation dependent. I'm mostly looking for general guidelines, but here's my specific scenario for reference: **Scenario:** I'm looking to construct a spatial regression model predicting land use based on a variety of environmental and socio-economic layers. My land use map is Landsat derived and hence 30m resolution. Examples of explanatory layers include the SRTM DEM (3 arc-seconds, ~90m) and Bioclim climate layers (30 arc-seconds, ~1km).


title: how to create graphs while running python with ArcGIS 10

text: As Matplotlib seem not to work (what a drag it's such a nice tool) I'am looking for alternatives to create graphs while running python with ArcGIS 10. Besides regular pie and column charts I need in particular the possibility to create star plots/ radar charts / amoeba diagram - most likely something like: http://matplotlib.sourceforge.net/examples/pylab_examples/polar_bar.html Most likely with a tool with as less as possible dependencies. Any recommendations are welcome Thanks!


title: ArcGIS 10's Editor and Snapping toolbars question (snapping polyline to another polyline)

text: Have attempted this about 20 different ways using Editor / Snapping Toolbars and ET GeoWizards but still cannot find solution. Screen shot is attached. Need to snap the green polyline to the red polyline at specified location and back to beginning of red polyline. ![snapping polylines question](http://i.stack.imgur.com/iqs7b.jpg)


title: How to create source and target ID columns for a linestring table in PostGIS?

text: I have table paths_3D which has column "the_geom". I need to create a new column source_id which will have starting points from the geom. This statement doesn't work:               ALTER TABLE paths_3d ADD COLUMN source_id AS SELECT *, startpoint(the_geom)FROM paths_3d;


title: Arrowhead in polyline google map v3

text: I would like to create a map, that shows a vehicle traveled path. The map should shows arrowhead for each turning. I need to show the map like this. I can create the map by following code                var flightPlanCoordinates = [             new google.maps.LatLng(10.51178,76.197739),             new google.maps.LatLng(10.512117,76.261253),             new google.maps.LatLng(10.554309,76.322365),             new google.maps.LatLng(10.56646,76.372833)         ];         var flightPath = new google.maps.Polyline({           path: flightPlanCoordinates,           strokeColor: '#04770C',           strokeOpacity: 1.0,           strokeWeight: 2         });              flightPath.setMap(map);      I am using Google Maps API V3.


title: Changing band for greyscale in plugin

text: I am trying to make a qgis plugin to change which band in a multiband data set (netCDF where the band represents time steps) is used for a grey scale rendering. The file works fine with manual changes, but I cannot find how to change it programatically. I have set up a dialog box where I can select which layer to work on:               for layer in self.iface.legendInterface().layers():             # iface.messageBar().pushMessage("Type",layer.name(), level=1, duration=10)             if type(layer) is QgsRasterLayer and layer.bandCount()>1:                 self.layerlist.append(layer)                 self.dlg.comboBoxLayer.addItem(layer.name())      my qgisrelated imports are (as far as I can see)               from qgis.core import *     from qgis.utils import *      I have found the attribute setGrayBandName that should select which band to use for presentation, but when I run (knowing 0<=sldValue <=number of bands)               self.dlg.labelStartTime.setText(str(sldValue))     self.activeLayer.setGrayBandName(self.activeLayer.bandName(sldValue))     self.activeLayer.triggerRepaint()      it crashes with "AttributeError: 'QgsRasterLayer' object has no attribute 'setGrayBandName'" - if setGrayBandName does not exist, what should I use then? And why do I find a number of references to it, but none saying that is has been taken out of use? - or have I just misunderstood something? Do I need to import som more modules? seems like I misunderstood something, I need to set a new grayBand on the renderer, i.e.               self.activeLayer.renderer.setGrayBand(sldValue)      But, this only works if I start in the console by selecting the layer and then doing               layer=qgis.utils.iface.activeLayer()     rndr=layer.renderer()     layer.renderer=rndr      Then I can start playing around. If I try to do the rndr=layer.renderer() in the code in the plugin, I am told something like that type of object is not callable... The present version of the module is available at https://github.com/sickel/TimeStepSelector


title: How can I improve my Georeferencing results?

text: **Background** This is my second question related to georeferencing naked raster maps in order to re-visualize them on different coordinate systems and in conjunction with other data layers. The previous question is at Convert an arbitrary meta-data-free map image into QGIS project **Problem** My goal is to georeference this map: ![Eurasian steppe, Encyc. Brit.?](http://i.stack.imgur.com/HkApE.gif) This does not appear to be Plate-Carrée. So in QGIS, I created several reasonable control points, which for completeness I have attached at the bottom [ref:1]. I provide QGIS Georeferencer the same target SRS as my project file, EPSG:4326. I get exceptionally poor results with Helmert and the polynomial transforms but get a reasonable image with thin plate spline (which makes the resulting geoestimate go through my control points). However, even this result is poor, e.g., at higher latitudes (see the Russian coast north of Japan). This is a screenshot of my QGIS screen using a Natural Earth background. ![QGIS georeference result, thin plate spline](http://i.stack.imgur.com/9R1OQ.jpg) **Alternative path** I tried a similar exercise with the much easier-to-use tool at MapWarper: see the result and control points at http://mapwarper.net/maps/758#Preview_Map_tab where I get poorer results (probably due to the fact that I added fewer control points). **Questions in nutshell**   1. Are there are any tricks I'm missing to getting a good georeference?   2. Is this projection instantly recognizable?   3. At Unknown Coordinate System on old drawing, `gdaltransform` is suggested to transform several coordinate points into a several target SRS, with the goal of actually uncovering the projection parameters used to generate the original map. I tried something like this: after saving my QGIS list of points, I did some string processing to get a list of space-separated long/lats via `cat eurasian-steppe-gcp.points | tail -n+2 | cut -d, -f1-2 | sed 's/,/ /'> tmp.txt` and inputting the resulting file into gdaltransform: `gdaltransform -s_srs EPSG:3785 -t_srs EPSG:4326 < tmp.txt` and switching the `s_srs` and `t_srs` flags (the project uses EPSG:4326). I know I'm shooting in the dark, hoping to get lucky, so I wasn't surprised when I couldn't make sense of the outputs. Can someone expand on how I would use this method to find the best estimate of the source map's projection and projection parameters? My thinking behind this is that rather than messing with placing myriad control points for a good georeference, might it be easier to get a near-perfect georeference with fewer control points, just looping through all the common coordinate systems? Does it involve cross-validation of each point against all the others, for each CRS under test?  I'd like to get an understanding of either this algorithm or of georeferencing so I can automate the process---I run into this issue all the time, and until content creators stop treating their maps as one-off creations never to be integrated with other content, I don't expect to stop. **References** [ref:1] QGIS GCP file:               mapX,mapY,pixelX,pixelY,enable     142.632649100000009,54.453595900000003,505.941176470588232,-95.220588235293974,1     154.934252200000003,59.559921699999997,536.411764705882206,-52.779411764705742,1     80.080158100000006,9.657192300000000,291.558823529411711,-322.661764705882206,1     10.448442600000000,57.819128900000003,21.676470588235190,-103.926470588235134,1     34.007173000000002,27.761438299999998,101.117647058823422,-244.852941176470466,1     50.950890399999999,11.862196600000001,171.852941176470495,-313.955882352941046,1     29.713217199999999,60.024133200000001,90.779411764705799,-92.499999999999829,1     60.000000000000000,0.000000000000000,208.308823529411683,-362.382352941176350,1     69.867506500000005,66.639146199999999,224.088235294117567,-33.191176470588061,1     27.276107100000001,71.049154799999997,89.147058823529306,-21.764705882352814,1     140.000000000000000,0.000000000000000,536.955882352941217,-362.926470588235190,1     20.000000000000000,0.000000000000000,43.441176470588132,-362.926470588235190,1     20.196882700000000,31.243024100000000,47.249999999999901,-231.794117647058698,1     9.171861099999999,42.848309999999998,8.073529411764603,-175.205882352941046,1     131.955786100000012,43.196468600000003,481.999999999999943,-162.691176470588090,1     73.813303700000006,45.169367200000003,256.735294117646959,-161.602941176470438,1     50.602731800000001,44.589102900000000,168.044117647058727,-167.588235294117510,1     121.394975900000006,18.941421099999999,455.882352941176407,-284.029411764705742,1     103.987047000000004,1.417439300000000,389.499999999999943,-357.485294117646959,1     109.325478599999997,55.962283100000001,380.249999999999943,-98.485294117646902,1     31.454010100000001,46.562001500000001,95.132352941176379,-158.882352941176322,1     43.639560299999999,68.844150499999998,137.573529411764611,-40.264705882352814,1      # Non-update **Analysis of van der Grinten** I wrote a Python tool to fit GCPs to any projection that Proj4 supports (via Pyproj) and applied it to the couple of projections suggested in the answers. The source code (somewhat sloppy, I apologize in advance) as well as updated GCPs are available at https://github.com/fasiha/steppe-map The van der Grinten has only 1 parameter to tune, and here's the resulting image (using the latest image from Britannica, many thanks to them for giving such a high-res and updated map (though it still lacks projection data)). ![Van der Grinten fit](http://i.stack.imgur.com/Um1wD.jpg) Van der Grinten has a relative error of 0.035 between the GCPs and best-fit points, which is the worst of the bunch I tried, and the coastline overlay bears that out qualitatively. (It may help if you open this image in its own tab, it's quite high-res. You'll also see green arrows indicating the georeferenced points (they should match significant landmarks on the image) as well as red arrows indicating where those points are fitted to (they should match the same landmarks on the coastline overlay)---the deviation between the two can help the eye see the differences between the image and the fit.) **Analysis of Albers equal-area** Trying the same thing with the Albers equal- area projection (which is the same as "Albers conformal Conic"? sorry for my ignorance). This fit, involving a 4-dimensional parameter fit, is better, with a relative error of 0.025, but looks pretty poor nonetheless. ![Albers equal-area fit](http://i.stack.imgur.com/mZ76P.jpg) **Analysis of Robinson and Eckert V projections** I fit a number of pseudocylindrical projections supported by Pyproj (all that I could find that had one free parameter) and found that the Robinson and the Eckert V projections did the "best" in terms of relative error between the GCPs and the fitted points, both with relative errors of 0.015. Here's the Robinson: ![Robinson fit](http://i.stack.imgur.com/CkXg6.jpg) And here's the Eckert V. ![Eckert V fit](http://i.stack.imgur.com/rHOj7.jpg) Note the deviations of the fitted coastline from the image's coastline. I think with this I can conclude that the map is none of the above? # Winkel tripel: possible solution? After sequentially trying every projection in this Proj manual from 1990 (updated 2003) ftp://ftp.remotesensing.org/proj/OF90-284.pdf I finally came to the Winkel tripel projection. This produces the lowest quantitative errors (0.011) and the coastline is uniformly quite good (or equivalently, uniformly slightly bad). I read that this is the projection of the National Geographic Society, which means it's famous, and this adds weight to the candidacy of this projection for Britannica's map. The fitted SRS: `+units=m +lon_0=47.0257707403 +proj=wintri`. ![Winkel tripel fit](http://i.stack.imgur.com/Femgi.jpg) (Apologies for changing the coastline color to gray. If this offends anyone, I can produce a blue version.) I will try to tweak my GCPs to try and drive the error down lower. In the mean time, can I convince any others that this is the solution? Please post your answers and I will be grateful.


title: Why does On-the-fly reprojection not line up Google layers in UTM?

text: My UTM shapefile lines up with Google layers if the project CRS is set to WGS84 mercator projection (including default 3857 and Google). But if I set the project CRS to UTM Zone11, they are slightly shifted. I've tried loading them and setting the project CRS in various orders - nothing worked.


title: PostGIS installation error

text: Try to install PostGIS 2.0 from svn in Ubuntu 11.04. After running postgis.sql file I get an error:               ERROR:  could not load library "/usr/lib/postgresql/9.0/lib/postgis-2.0.so": /usr/lib/postgresql/9.0/lib/postgis-2.0.so: undefined symbol: DirectFunctionCall3Coll      PostGIS 1.5 installed without any problems.


title: GeoExt and Mapserver

text: > **Possible Duplicate:**   >  Cannot populate a Ext GridPanel through GeoExt WMSCapabilitiesStore I'm using Mapserver + GeoExt, but i can't not recive any data from this request, any one know how to use that?               var grid = new Ext.grid.GridPanel({                         title: "Availables WMS Layers",                         renderTo: document.body,                          width: 800,                         height: 150,                         viewConfig: {forceFit: true},                         store: new GeoExt.data.WMSCapabilitiesStore({                             url: "http://localhost:8085/fcgi-bin/wms.exe?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1",                             autoLoad: true                         }),                         columns: [                             {header: "Name", dataIndex: "name", sortable: true}                         ]                     });


title: Detect map scale from raster dataset

text: Let's suppose you have a raster dataset (in a folder or in a personal database). How can you detect what map scale it represents (assuming of course that all rasters have same dimensions/resolution)? Mind you, I want to have this info WITHOUT having to show the rasters on the map before. EDIT: Based on Matthew Snape's post, I have come to the following code that works satisfactory. The only thing that I have still hard time to get is the raster's dpi. Is there any hope to find this information embedded somewhere in the db?               public void GetDatasetMapScale(string datasetPath, out double scale)     {          var _gp = new Geoprocessor();         _gp.SetEnvironmentValue("workspace", datasetPath);          var rasters = _gp.ListRasters("", "");          var raster = rasters.Next(); // get first raster from dataset               object dt = "";          var rasterElement = (IDERasterBand) _gp.GetDataElement(raster, ref dt);          var meanCellHeight = rasterElement.MeanCellHeight;          var meanCellWidth = rasterElement.MeanCellWidth;               var myCellSize = (meanCellHeight + meanCellWidth) / 2;          var dpi = 300; **// HOW CAN DETECT THIS?????**          var METERS_PER_INCH = 0.0254;               scale = (dpi * myCellSize) / METERS_PER_INCH;     }      Thanks in advance


title: How do I create a thematic map in ArcGIS on a calculated field?

text: Is it possible to create a thematic map in ArcGIS on a calculated field, without changing the DBF file of the SHP file? I know I can do it in MapInfo, but have searched without much luck in ArcGIS.


title: Lack of Options in Gdal Tool "Build Overviews" QGis

text: I am using QGis 1.8 and I want to build overviews (pyramids) for satellite imagery using the Gdal Tool. I would like to use the resampling method "cubic convolution", but the option doesn't exist although it is listed in the online help (http://www.gdal.org/gdaladdo.html). Two other options are in my list that don't show up in the online help however: "nearest" and "mode". Does anybody know why "cubic" isn't there or can recommend me one of the other methods for use with satellite imagery? Thanks a lot in advance, Elena


title: How to show one to many relationships in GML from GeoServer/Postgis?

text: I am just figuring out how to use GeoServer and Postgis. I am using the States.shp example that came with GeoServer, and I have uploaded that into a table into the Postgis database. I have created a new layer, and can make WFS requests to get back GML. For example:               http://localhost:8080/geoserver/mine/ows?service=WFS&version=1.0.0&request=GetFeature&typeName= mine:usa_view&maxFeatures=1      This returns a GML of the top 1 state (which happens to be Illinois). I use a view, and aside from the geometric data, I also get all the fields I have exposed in the view, which happen to be “name” and “abbreviation”. If I add a second table, say a list of cities within each state, is it possible to return this information within the GML? Is there an easy way to do this using the setup I have described? Thanks


title: How to deal with popups for clusters in openlayers?

text: I have an openlayers map which generates points from an array as vector features, with popups for these features, which works fine. Since I have so many points on this map, I have started working with cluster strategy. I can get the popups working fine on the points using the cluster strategy, but only the nonclustered points. I can get the popup to show the info for the first point of the cluster, but what I want to be able to do is have the popup display the info for each feature in the cluster, possibly with pagination or arrows that will allow the user to go through each. I have seen olwidget and i like the way it handles popups, but I can't seem to find any example of how to get it working with an existing map/layer, if possible. Is there a solution? I would prefer to use olwidget because i like the fact that the popups are styled with css


title: Is that possible to use map object ( PHP_MapScript ) instead of map file when using the MapServer?

text: In my previoous code, I am using openlayer WMS to load a raster data through MapServer. As you can see, the mapserv.exe call a local map file to load the raster data. I just heard PHP_MapScript, since it can convert a map file into a map object. Is that possible to use this converted map object directly in openlayer WMS. Since the object can be easily modified such as "styling".               localWMS = new OpenLayers.Layer.WMS( "Local WMS layers",               "http://127.0.0.1/cgi-bin/mapserv.exe?MAP=C:/Users/mapserver.map",               {layers: 'polygon',transparent: true}, {isBaseLayer: false} );     map.addLayer(localWMS);      Someone who is familiar with PHP_MapScript, I am willing to hear from you. THanks


title: database server connection to MSSQL Server with ArcCatalog not possible?

text: I have a MSSQL Server where my geodata is held. In the ArcGIS Docs, it says... "To administer ArcSDE geodatabases for SQL Server Express, you can also connect to these geodatabases by first making a connection to a database server, then connecting to the geodatabase, as shown below." But when I try it fails. Looking carefully again I notice that is applies to "SQL Server Express"....and not MSSQL Server. If I don´t have the express version of MSSQL does that mean I can´t create a database server connection? If I connect to an individual Database it works fine. Thanks for any help, Robert


title: Understanding ArcGIS Server connection types

text: Being relatively new to ESRI ArcGIS Server I have a question regarding the storage of ESRI SDE Databases - AGS 10.0 Enterprise and ArcSDE 9.3. Firstly the naming of the whole structure gets confusing. SDE as far as I know, is only the software which "spatially enables" a Database (in my case MS SQL 2008 R2). So when I create a geodatabase in MSSQL I have to do this through the post install program. Only then will I have the ability to view/update/delete in the geodatabase either with ArcEditor/Info. Im my "inherited" system that I have to now continue using, I have some data coming from MSSQL Server and some from Geodatabases which are on another PC. Question 1: What type of connection is that on the pc? Is that a so called "direct" sde connection? Question 2: Some other colleagues have told me, that Rasters are delivered quicker in AGS Services if they are not in the MSSQL DB. Is this true? Thanks for any help, Robert


title: Where to find a list of geographic 'objects'?

text: Is there an extensive list of geographic "objects", "entities" or "features" that can be discovered in the geographic environment, relatively static and therefore can be geo-located and represented on a map, for example _building_ , _restaurant_ and also _park_ and _lake_ would be part of this hypothetical list, as opposed to, for example _apple_ , _cat_ , and _fun_.


title: Get vector features inside a specific extent

text: The problem: I have a very large vector layer with many features and a much smaller raster layer in a defined region. I want to get only those vector features which are within the raster layers extent (`extent = (xmin,xmax,ymin,ymax)` ). Is there anything like a standard SQL-query (something like `SELECT * FROM layer WHERE EXTENT < extent`) or another command (some test?) i could use to get only those features that are within a given extent? EDIT: Added python code to do a bounding box intersection test for vector features using just gdal and ogr python binding


title: Auto fill second column with predefined names depending on first column (QGIS)

text: I want to create a point layer. In the attribute table I want to have two columns. In the first column I want to type an abbreviation like A. Then I want the second column to be auto filled with Arthur. How can I do that? I am working with QGIS 1.8. on a Mac 10.6