title: Raster and shp overlap not working with user CRS mercator

text: I created a GeoTiff raster in python, that is projected with the following CRS: *"+proj=merc +lon_0=34.9586601257 +k=1 +x_0=-0 +y_0=1453756.01544 +a=6370997 +b=6370997 +units=m +no_defs"* When I load it in QGIS, I set project CRS from layer and enable on the fly CRS transformation. Then I open a shapefile of the country (Tanzania), but it doesn't overlap, even if I set the same CRS manually. I'm sure that the raster extent is correct. It looks that it is a problem from the shp. Here is a sceenshot: http://imageshack.us/f/193/wrongrastersinqgis.jpg/ It is working if I georeference my raster with decimal degrees WGS84... But not if I use the projection coordinates. That is strange. Screenshot: http://img841.imageshack.us/img841/9500/rastersinqgis.jpg I did the same with another raster I also created in python, that is projected with: *"+proj=lcc +lat_1=51.4259986877 +lat_2=51.4259986877 +lat_0=51.5159492493 +lon_0=2.60400009155 +x_0=163358.880084 +y_0=163358.804499 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"* And with this raster, I can properly overlap the shapefile of the country! I don't understand why it is working with a CRS in lambert and not with a CRS in mercator. Any idea?


title: getting "TypeError :bounds is null" in firebug

text: i've got something error when I run my code in firebug.. here this code :               <script type="text/javascript" src="OpenLayers.js"></script>                  <?php                 mysql_connect("localhost", "root", "") or die("koneksi gagal");                 mysql_select_db("jogja") or die ("database tidak bisa dibuka");                          $query="SELECT * FROM jogja ORDER BY idkab";                     $result= mysql_query($query);                          $value=array();                     $kab=array();                          while($data=mysql_fetch_array($result))                     {                         $value[$data["idkab"]] = $data["value"];                         $kab[$data["idkab"]] = $data["kab"];                     }                          $bataskelas = array(0, 500, 1000, 2000);                     $warnakelas = array("#EEFFFF", "#6DD5FF", "#19A3FF", "#0048FF");         ?>                  <script type="text/javascript">                      var map;                 var jogja;                 var data = <?php echo json_encode($value); ?>;                 var kab = <?php echo json_encode($kab); ?>;                 var batas = <?php echo json_encode($bataskelas); ?>;                 var warna = <?php echo json_encode($warnakelas); ?>;                      function init(){                 map = new OpenLayers.Map('map',{                 controls: [                     new OpenLayers.Control.Navigation(),                     new OpenLayers.Control.PanZoom(),                     new OpenLayers.Control.ScaleLine(),                     new OpenLayers.Control.MousePosition(),                 ]});                      var context = {                     getColor: function(feature){                     var id = feature.attributes.IDKAB;                     var val=data[id];                     var color = "white";                          var i =0;                     while(i < batas.length-1){                         if (val < batas[i+1]){                             color = warna[i];                             break;                         }                         i++;                     }                         if (val !=null && color == "white"){                             color = warna[batas.length-1];                         }                         return color;                     },                          getLabel: function (feature){                         return wilayah[feature.attributes.IDKAB];                     }                 };                      var template = {                     strokeColor: "#808080",                     strokeWidth: 1,                     graphicZIndex: 1,                     fillColor: "${getColor}",                     label: "${getLabel}",                     labelAlign: "cm"                      };                      var style = new OpenLayers.Style(template, {context: context});                 var myStyle = new OpenLayers.StyleMap(style);                      jogja = new OpenLayers.Layer.GML ("GML", "gml/jogja.gml", {                             isBaseLayer: true, styleMap: myStyle});                      jogja.events.on({'loadend': onLoadEnd});                      map.addLayer(jogja);                 map.zoomToMaxExtent();                  }             function onLoadEnd(){                 var ext = jogja.getDataExtent();                 map.zoomToExtent(ext,false);             }                   </script>      and here screenshot error : ![enter image description here](http://i.stack.imgur.com/yPIhA.png) what should I do to avoiding this error?? because of this error the map don't show out.. -thanks for answering-


title: How can I download a feature class from an ArcGIS Online web map?

text: I'm new to ArcGIS Online (or ArcGIS.com as they're calling it now), and I'm confused as to how data is organized, and how it is accessible. I created a new map, chose Add -> Create Editable Layer, and set up an editable layer open to the public for people to submit input. Now I want to download this feature class to my computer. The only option I know of is to go to "My Content" then download the entire web map as a map package, but when I open it up, it only has the basemap and not the editable layer. **Is it possible to download this data as an individual feature class (shapefile), or at all?**


title: I want to georeference jpg map without having any digitizing data?

text: > **Possible Duplicate:**   >  I want to georeference jpg map without any digitizing data? I have only a jpg map but dont have any digital data for georeferencing that jpg.So is there any way for georeferencing my map (like googlemaps). I know only the lat/long of the map.i'm working with arcgis9.3? could you give me some reference as well.


title: Either GeoJson to TopoJson conversion problem, or projection-issue with D3.js

text: My 'handcrafted' cartogram (How to create contiguous area cartograms in QGIS or R?) is ready to embed in code - I want to present it online with D3.js. Therefore I produced a topoJSON file of it - but all I get are weird shapes all around the globe. Here is the (simplified) cartogram in geoJSON _(file:removed)_ - it works perfectly with QGis. Also I checked the geometry in QGis and it doesn't display an error [Vector > Geometry Tools > Check geometry validity]. I tried both: From QGis > geoJSON > topoJSON (with topojson), and QGis > ESRI shapefile > geoJSON (with ogr2ogr) > topoJSON (with topojson). Also I tried reprojection with ogr2ogr:               ogr2ogr "ESRI Shapefile" -t_srs EPSG:4326 outfile.shp infile.shp      And I did the whole thing with UTF-8 flag:               topojson --shapefile-encoding utf8 -o outfile.json infile.shp      Here is the (simplified) cartogram in topoJSON _(file:removed)_ , and it looks ok to me - even the json-validators are happy with it. But my D3.js code just results in weird shapes and lines.               <head>         <meta charset="utf-8">         <script src="http://d3js.org/d3.v3.min.js"></script>         <script src="http://d3js.org/topojson.v0.min.js"></script>         <title></title>         <style>              .unit {             fill: none;             stroke: #111;             stroke-linejoin: round;         }              </style>     </head>     <body>     <script>              var width = 600,             height = 600;              var projection = d3.geo.albers() // also: orthographic & mercator wont work             .rotate([0, 0])             .center([8.43, 46.8]) // Switzerland             .scale(100);              var path = d3.geo.path()             .projection(projection);              var svg = d3.select("body").append("svg")             .attr("width", width)             .attr("height", height);              d3.json("hexmap.json", function(error, hexm) {             var units = topojson.object(hexm, hexm.objects.hexmap).geometries[25];                  svg.append("path")                .datum(units)                .attr("class", "unit")                .attr("d", path);         });          </script>     </body>      I just don't know where I am going wrong... Is it the projection? The conversion? Are the files ok? **EDIT - SOLUTION**   1. use a transferable projection in the first place.   2. the correct ogr2ogr command:               ogr2ogr "GEOJSON" -s_srs infile.prj -t_srs EPSG:4326 outfile.geojson infile.shp      alternative:                    ogr2ogr "GEOJSON" -s_srs EPSG:21781 -t_srs EPSG:4326 outfile.geojson infile.shp


title: Where does the Style Manager store the files in and Why does the Style Manager does not show some edit color ramps?

text: ![enter image description here](http://i.stack.imgur.com/ufMwq.jpg) Where are Color Ramp files saved? Every time I make edits, it does not show up on the Style Manager. Does it save it to the hard drive or in the Style Manager? I need more information. Thanks


title: Problems Refreshing View in Editor Extension code

text: I can't seem to find anyone else with this problem, but I'm hoping maybe I'm missing something obvious! I am writing an Editor Extension add-in using VB.net for ArcMap 10. The feature layer I'm rendering is from an SDE dataset. Once the user starts editing, I use a unique value renderer to display features, omitting some (the client wants features they have classified as 'inactive' to disappear - without being deleted - and my understanding is that a definition query won't work in an edit session, so I have modified the symbology instead). After I set the renderer, I want the display to refresh to show the new symbology. However, ActiveView.Refresh, ActiveView.PartialRefresh, and ScreenDisplay.Invalidate will not work. There is no error, but the screen does not refresh. I have stepped through using the debugger and confirmed that the program execution does reach those lines, but after 'executing' those lines nothing happens. The TOC updates properly, but the view does not. I can manually click the refresh button and it refreshes just fine, but I can't seem to make it work programmatically. I have tried brute forcing it by using ActiveView.Deactivate followed by ActiveView.Activate, and this does cause a screen refresh, but then when I try to draw the point, the mouse pointer and the marker symbol indicating the potential location of the new point are offset by about 4 inches. I'm completely at a loss here. Any ideas? I've included an exerpt from my code below (this is done nearly identically for 4 feature layers, so normally the select case would have 3 more entries, but I simplified it for this post). Thanks!!                   'define the colors to use in the renderers         Dim pOutlineColor As New ESRI.ArcGIS.Display.RgbColor         Dim pStructureColor As New ESRI.ArcGIS.Display.RgbColor              'make the structure outline color black         pOutlineColor.Red = 0         pOutlineColor.Blue = 0         pOutlineColor.Green = 0          'make the structure center color macaw green         pStructureColor.Red = 152         pStructureColor.Blue = 0         pStructureColor.Green = 230              'create the symbols         Dim pStructureSymbol As New ESRI.ArcGIS.Display.SimpleMarkerSymbol              'construct the structures symbol         pStructureSymbol.Style = ESRI.ArcGIS.Display.esriSimpleMarkerStyle.esriSMSCircle         pStructureSymbol.Size = 4         pStructureSymbol.Outline = True         pStructureSymbol.OutlineSize = 1         pStructureSymbol.OutlineColor = pOutlineColor         pStructureSymbol.Color = pStructureColor              'define renderers         Dim pStructureRenderer As New ESRI.ArcGIS.Carto.UniqueValueRenderer              'set the fields used in the renderers - we'll just have one, the 'Active' field         'set usedefaultsymbol to false so that inactive features           'will not draw (i.e., if Active <> 1 or Null)         'structures renderer         With pStructureRenderer             .FieldCount = 1             .Field(0) = "Active"             .UseDefaultSymbol = False             'add "1" to the value list for the renderer - i.e., display "1" values using pStructureSymbol             .AddValue("1", "Active", pStructureSymbol)             .Label("1") = "Active"             'add "<Null>" to the value list for the renderer using the same symbology as "1"             .AddReferenceValue("<Null>", "1")             'tell it we're using our own custom style             .ColorScheme = "Custom"             'tell it the field type for the 'Active' field is not a string (it's an integer)             .FieldType(0) = False         End With                           Dim pLayer As ESRI.ArcGIS.Carto.ILayer         Dim pFeatureLayer As ESRI.ArcGIS.Carto.IFeatureLayer2         Dim pGeoFeatureLayerStructures As ESRI.ArcGIS.Carto.IGeoFeatureLayer              'this makes the layer properties symbology tab show         'the correct interface.         Dim pPropertyPage As ESRI.ArcGIS.CartoUI.IRendererPropertyPage         pPropertyPage = New ESRI.ArcGIS.CartoUI.UniqueValuePropertyPage              Do Until pLayer Is Nothing             If TypeOf (pLayer) Is ESRI.ArcGIS.Carto.IFeatureLayer2 Then                 pFeatureLayer = pLayer                 If pFeatureLayer.FeatureClass.FindField("Active") > 0 Then 'only set the renderer if there is an 'active' field in the layer                     Select Case pFeatureLayer.FeatureClass.AliasName                         Case strStructuresLayerName                             pGeoFeatureLayerStructures = pFeatureLayer                             pGeoFeatureLayerStructures.Renderer = pStructureRenderer                             pGeoFeatureLayerStructures.DisplayField = "Active"                             pGeoFeatureLayerStructures.RendererPropertyPageClassID = pPropertyPage.ClassID                          End Select                 End If                 pFeatureLayer = Nothing             End If             pLayer = pEnumLayers.Next         Loop         My.Document.ActiveView.ContentsChanged()         My.Document.UpdateContents()                     My.Document.ActiveView.Refresh() 'this does nothing              'This also does nothing:         'My.Document.ActiveView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewAll, Nothing, pActiveView.Extent)              'This also does nothing:         'My.ThisApplication.Display.Invalidate(My.Document.ActiveView.Extent, False, ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache)              'this makes the screen go blank:         'Dim pMaps As ESRI.ArcGIS.Carto.IMaps         'pMaps = My.Document.Maps         'My.Document.ActiveView = My.Document.PageLayout         'My.Document.ActiveView = pMaps.Item(0)         'My.Document.ActiveView.Refresh()              'this makes the cursor and the point to be drawn offset by about 4 inches:         'Dim pActiveView As ESRI.ArcGIS.Carto.IActiveView         'pActiveView = My.Document.FocusMap         'pActiveView.Deactivate()         'pActiveView.Activate(My.ThisApplication.Display.hWnd)


title: Building a disconnected web based mapping application

text: I have been tasked with building a disconnected, web-based mapping application. It must run in a browser, but it will run on a disconnected Windows based laptop. It needs to be able to do simple map displays as well as display of objects on map and historical displays of the route of an object. Does anyone have any suggestions about a particular software solution? I am guessing that I will have to install some sort of mapping server software that has all of the mapping information and then also build a web-based client that accesses the local mapping server software. Does that make sense? UPDATE: Here are more detail about the rough system requirements.   * The finished application will be web-based (runs in a browser)   * The entire system will be disconnected from the internet. So it can't rely on any internet-based mapping system like Google Maps.   * The main screen will display a map of the earth. It needs to show basic country boundaries but there is no requirement for any other information.   * The user should be able to zoom in and out. There will be some zoom limits although I don't know exactly what they are. The application is displaying flight paths for airplanes so hopefully that gives you some idea of the zoom needs.   * The default view will keep the icon for the airplane centered and the map will move beneath.   * The user should also be able to pan the map in any direction and then return to having the airplane icon centered.   * The system will need to be able to dynamically load some overlay maps that display some polygon type shapes.   * The main screen will also have text areas that display other types of information such as current airplane location, etc.   * Ideally the mapping software would be easily integrated using C# and ASP.NET These are the basic rough requirements. I have done a LOT of searching on the web for a solution. Most of the mapping software applications that I have found seem to be overkill. They are complex GIS systems that cost lots of money. I just need a simple mapping application like Google Maps that works offline and allows for the integration functions that I have outlined above. Does anyone have any recommendations? (I mistakenly started a new question that is basically the same thing as this. Here is a link to the second question: Looking for web-based mapping software recommendation)


title: arcpy spatial join input parameter problems

text: Using ArcGIS 10 SP4 with all extensions... I have a parent directory (J:\...\spatialjoin) containing two sub-directories of feature classes I want to spatially join. Directory 1 (target features) contains 14 point fc's of mosquito trap locations dispersed around a particular county. Each fc represents one week of trap samples. Fields included: trapname, lat, lon, collection date, # mosquitoes, species. Directory 2 (join features) contains 14 point fc's of rainfall amounts at 219 even-spaced points for a particular county. Each fc represents one week of rainfall. Fields included: point/stationID, lat, lon, weekly sum of rainfall at that point I want to spatially join one week of rainfall to one week of mosquito locations and repeat until all 14 pairs of files have been joined. Filename Example: target directory: traps_2008_week01_7292008.shp, traps_2008_week02_852008.shp, ..., traps_2008_week14_10282008.shp join directory: week_01.shp, week_02.shp, ..., week_14.shp The code below lists multiple workspaces and prints names features in each sub-directory. How can I modify it to input target and join features into the tool? Thanks               import arcpy, os     from arcpy import env          # Allow overwrites     arcpy.env.overwriteOutput = True          dir = r'J:\Spring2012\gis_project\spatialjoin'     arcpy.env.workspace = dir          outWorkspace = r"J:\Spring2012\gis_project\spatialjoinoutput"               try:              targetFeatures = r'J:\Spring2012\gis_project\spatialjoin\collectionweek2008'         joinFeatures = r'J:\Spring2012\gis_project\spatialjoin\weeklysum2008'         outfc = os.path.join(outWorkspace)                   def fcs_in_workspace(workspace):           arcpy.env.workspace = workspace           for fc in arcpy.ListFeatureClasses():               yield os.path.join(workspace, fc)           for ws in arcpy.ListWorkspaces():               for fc in fcs_in_workspace(os.path.join(workspace, ws)):                   yield fc              for fc in fcs_in_workspace(dir):             arcpy.SpatialJoin_analysis(targetFeatures+".shp", joinFeatures+".shp", outfc+".shp", "#", "#", "#", "CLOSEST", "2.392 Kilometers","#")          except:         # If an error occurred while running a tool, then print the messages.         print arcpy.GetMessages()


title: Topology problems with QGIS/GRASS

text: *edited file links below I'm working on several NGO projects at the moment, all of which are reliant on being able to use a district level map with some 490+ features, and I am running into some trouble with my geometries. I spent most of the weekend trying to figure out how to snap the features together in this file (https://dl.dropbox.com/u/49434182/492%20Kabupaten%20Google%20Mercator.zip), to get rid of overlaps and slivers. Running the fTools validation tool, it tells me that I have more than 200 problems with this file. So, being a sensible person, I wanted GRASS to do the work for me. However, no matter how I tweaked the parameters of v.in.ogr, I couldn't eliminate the gaps or slivers when I went to export it again. GRASS would generate one layer of (basically) the geometries I wanted, and two layers of slivers. I was able to get my hands on an official shapefile from the national statistics agency (found here: https://dl.dropbox.com/u/49434182/indokabkot_497_2010.zip), which although way more detailed, also has invalid/overlapping geometry according to fTools. I'm unsure of the right projection with this file, so that's also a bit of an issue. I'm using QGIS 1.8, and am at a bit of a loss as to where I've gone wrong. Can anyone provide pointers before my data is due for a presentation next week? Thanks!


title: Manually edit cell value in DEM in Arcmap10?

text: Is there any chance that I could manually pick a group of cell in DEM, then edit the value of them in Arcmap 10? I know about the Aris Grid Editor for Arcmap but it requires licence and it's too expensive..:( Thanks in advance for your answer!


title: WMS Requests - does 1 request = 1 response tile

text: I'm using Openlayer and GeoServer when I pan or zoom the map - OpenLayers kicks of a series of WMS requests. Does 1 WMS request = 1 tile in response. I'd have thought if you sent a WMS request with the map extents then we'd get multiple responses back to reduce the number of requests - is this possible?


title: Zoomin to Polygon

text: 1) I have a list of records(states) in a table and an Hyperlink, when user clicks on Hyperlink(state hyperlink) I need to zoom in to repective polygon(state) on layer. How can I acheive this? 2)My layer inside the div is not central aligned. How can I make it central align? Srikanth


title: what dictates the drawing order of overlapping features with in the same layer/feature class in ArcGIS?

text: I know that in ArcGIS drawing order is controlled by layers, and if I want to make some features be drawn on top of other features I can use definition queries to separate them into different layers and position one on top of the other. But i was wondering (mostly out of curiosity) what dictates the drawing order of the 1000 overlapping polygons in my feature class, and if there's a way that I can control what features are displayed on top within one layer? Thanks


title: Isolate the largest patch in a raster in GRASS?

text: I have a raster with a series of patches (contiguous areas with same value). How do I isolate the largest patch? I know I could run r.stats, look through the long list of calculated areas, figure out which one is the largest and then use r.reclass to isolate it, but I'm sure there has to be an easier or more efficient way to do this.


title: Line defined by two geographical points crossing circle area with defined radius

text: I'm trying to calculate the amount of lines defined by two geographical points crossing a circle area defined by a center and radius. ![enter image description here](http://i.stack.imgur.com/Wb6es.jpg) I've tried to use algorithm discussed here, but in my case it just counts too many lines. Probably it's because of the fact that I'm trying to calculate it in Cartesian coordinates and points are defined in WGS 1984. Is there any other approach which could help my to calculate the lines crossing the circle?


title: matching up fields in different tables

text: I am going to attempt to explain my problem, and hopefully someone out there will have some insight/solutions/work arounds. I work for a University, and we have some utility/site people go out with their GPS and shoot points pretty often when there are new projects, construction, etc. The data dictionary that they have created has some field names that are longer than 10 characters, so when they export to shapefiles, the fields are being cut off to only contain the allowed limit. Once they bring in the shapefile into our existing base map, they copy and then paste the new items into the existing sde feature class, the data that is contained in the truncated fields won't copy. So, then they have to go in and redo some of the fields that didn't copy over. I know that fields have to match between tables in order to copy/paste data, but is there some kind of script, code, or work around that can match up these fields? I was hoping that there is some kind of field name match. for example, something that i could use to say that create_dat from the gps export file would equal create_date in the existing feature class. I hope that I made some sense in trying to explain this. Any advice or help would be greatly appreciated. I have attached an image of both tables and what data will and won't copy over. ![enter image description here](http://i.stack.imgur.com/5GOWV.jpg)


title: How to specify the pixel depth in model builder?

text: I have a simple model that calculates the NDVI from bands 3 and 4 of a raster dataset. The input bands are 8-bit unsigned, whereas the default output NDVI is signed 32 bit. How can I specify the pixel depth for the output NDVI as 8 bit unsigned? ![enter image description here](http://i.stack.imgur.com/7GDp3.jpg)


title: How to embed a PDF into an Excel spreadsheet?

text: This is what I want to do:   1. Create report using a polygon feature class to output areas of polygons using some logic and the ExportReport() function (This I have accomplished)   2. Create a PDF of the Polygons. Nothing fancy, I just use python to create a map, add a polygon layer to it and label using the OBJECTID and then use the arcpy.mapping.ExportToPDF() function to create a pdf (This I have accomplished)   3. Finally, I would like to embed the PDF created in Step 2 into into the spreadsheet created from the ExportReport() function in Step 1. I basically want to have this labeled PDF'd map embedded into the spreadsheet so that my end user can see which areas in the table are associated to which polygons in the PDF. I'm using ArcGIS 10.1 with Python.


title: How to add links to PDFs in a Shapefile?

text: I have a problem. I want an attribute in a shape file named "Link" to add. The works are all fine. But then I would like to add a link in my directory. This link accesses a PDF. Now, this PDF is not shown. Is there any other solution or there is nothing to be done? Thank you very much


title: Create a hyperlink to a pdf file in the attribute table

text: I want to add a hyperlink to a pdf file into the attribute table of a vector layer. I already read the documentation about evis and the answered questions about this here. It didn't seem difficult, but I still can't create a hyperlink...can someone give me a short step by step information about this? Unfortunately I have no access to youtube... I'm using Qgis (2.0.1) and evis is a plugin that should allow to create such hyperlinks via a event browser. I first added a column "Link" to the attribute table and put the link to the document in this column. this is the link to the documentation for evis: http://www.qgis.org/en/docs/user_manual/plugins/plugins_evis.html#figure- evis-2 Thanks a lot! G.H.


title: How to create stacked bar/column charts in QGIS?

text: I know that conventional bar charts (with the bars adjacent to each other) based on feature attributes can be plotted in QGIS. But can you please tell me if there's any way to plot the bars in the form of stacks, as in stacked bar/column charts, in QGIS? I tried to find an example in the QGIS manual and on the internet but wasn't able to get any information about it. Thank you.


title: Enter 4 Coordinates and get a Polygon QGIS

text: Is it possible to enter 4 Coordinates for getting a Polygon. I have to Clip lots of exact rectangles and i was just wondering wether you know a plugin. Thanks a lot danke! Alex


title: How to reproduce Stamen's Toner PostGIS setup?

text: I'm trying to render Stamen's toner map with Landez which uses Mapnik. The style I'm rendering is from Stamen's toner project. I'm using the one which only renders labels (no lines). I imported the portion of osm (not planet) using osm2pgsql and I've also ran the motorway script. I have not imported the natural earth, because I cannot download the data (https://github.com/Citytracking/toner/issues/53), but I doubt I need it for text labeling only. In the style its asking for map source from table (or perhaps view) such as "admin1_labels_50m_z5", but I have no idea the sources of these tables or views? How to create them?


title: QGIS adding points using decimal degrees

text: As duck blind permits are sold, we need to add the location using lat/long. we are working in ArcView now but would like to move to QGIS- Everything I was able to find seemed to deal with importing delimited text files. I was wondering if there was a tool like the "add a point using x,y" in QGIS like the one in ArcGIS. The user will need to add single point to the layer as the permit is issued, so I guess I'm looking for a way to edit a point file one record at a time using the coordinates.


title: Creating a point layer from lat/long coordinates

text: I have a spreadsheet that lists the lat/long coordinates of several locations I wish to map. I would like to produce a geocoded point layer in QGIS. How do I do this? Thanks!


title: How to put marker on vector layer with lat/lon on QGIS

text: I have a vector layer, and bunch of lat/lon values. I want to put markers on the vector layer for each lat/lon pair. I have never used QGis, would you help with it. thanks.


title: Issue openlayers and tilestream

text: Basically I created a MBtiles using Tilemill and it generates a map with six zooms. I implement it into tilestream. I added a layer on the openlayers module(Drupal) in XYZ:               site:8888/v2/geography-class/${z}/${x}/${y}.png       The problem is this URL sent by openlayers: `site:8888/v2/geography- class/-1/x/x.png` Each time, whatever the zoom I am on the map, the zoom value always stays at -1, the others values are okay. If I try to reach `site:8888/v2/geography-class/1/1/1.png` it works. What did I miss?


title: Change coordinates of a polygon

text: I wanted to know whether it is possible to change the coordinates of a Polygon by typing them in. I don't want to have to manually drag them into the right position.


title: What is the correct spelling: CSW or CS-W?

text: In different publications I read sometimes CSW or sometimes CS-W for the standard of transferring metadata-documents. What is the correct 'official' spelling?


title: How can I conduct Geographically Weighted Principal Component Analysis using ArcGIS, Python and SPSS/R?

text: I am after a description/methodology for conducting a Geographically Weighted Principal Components Analysis (GWPCA). I am happy using Python for any portion of this and I imagine SPSS or R being used to run the PCA on the geographically weighted variables. My dataset is composed of roughly 30 independent variables that are measured throughout ~550 census tracts (vector geometry). I know this is a loaded question. But, as I search and search, there does not seem to be any solutions out there. What I have come across are mathematical equations that explain the fundamental composition of GWPCA (and GWR). What I am after is more applied in a sense, that I am looking for what major steps I need to accomplish to get from raw data to the GWPCA results. * * * **I would like to expand on the first part with this edit due to the comments received below.** To address Paul... I am basing my interest in GWPCA off of the following paper: _Lloyd, C. D., (2010). Analysing population characteristics using geographically weighted principal components analysis: A case study of Northern Ireland in 2001. Computers, Environment and Urban Systems, 34(5), p.389-399._ For those who do not have access to the literature, I have attached screenshots of the particular sections which explain the mathematics below: ![Article](http://i.stack.imgur.com/WTvhw.png) And to address whuber... Without going into detail (confidentiality), we are attempting to reduce the 30 variables, which we believe are all very good indicators (albeit globally), to the set of components with eigenvalues greater than 1. By computing the geographically weighted components, we attempt to understand the local variances explained by these components. I think our primary goal will be to proof the concept of GWPCA, that is, show the spatially explicit nature of our data and that we cannot consider all independent variables to be explanatory on a global scale. Rather, the local scale (neighbourhoods) that each component will identify will aid us in understanding the multi-dimensional nature of our data (how variables can be combined with one another to explain a certain neighbourhoods in our study area). We hope to map the percentage of variance accounted for by each component (separately), to understand the extent of the neighbourhood explained by the component in question (aid us in understanding local spatiality of our components). Perhaps some other mapping examples but none come to mind at the moment. Additionally: The mathematics behind the GWPCA is beyond what I understand given my background in geographic analysis and social statistics. The application of the maths is most important, that is, what do I plug in to these variables/formulas.


title: ArcGIS API for JavaScript - Adding Point(s)

text: I need to add a single point, I am new to JS and ArcGIS API. I was looking for some code examples on how to create a point and/or a few other points (as needed) I can't use any additional pages/external sources, as in the code needs to be in my single page. I found examples like the button add a point, but I don't need a button I just need to place a point or points with their respective coordinates. Then style as necc. Can someone provide either code or a link so I can do this simple task? Thanks


title: Spatial regression

text: I have a question regarding performing spatial regression on data which residuals are spatially correlated.   1. If the residuals are spatially autocorrelated due to the presence of trend, how should I account for the existence of spatial autocorrelation?    2. And what about if there is no trend, but rather spatial autocorrelation in random variation (in residuals left after detrending)?    3. And what about if there are both trend and spatially autocorrelated random variation in my data?    4. Can I in both cases apply this formula to account for spatial autocorrelation no matter if it is the result of trend or random variation correlation: > >     y^*=y-ρ∑(w_ij*y_j) >     x^*=x-ρ∑_(w_ij*x_j) >   Thanks.


title: Leaflet wms offset on zoom out

text: I have Leaflet map with base layer (epsg4326) and wms layer of gps point (also epsg4326). I've noticed when I zoom out , the gps point offset to the left. Any idea why it happens ? Here you can see that when I zoom out the symbol moves left each zoom. ![enter image description here](http://i.stack.imgur.com/AikRV.png) ![enter image description here](http://i.stack.imgur.com/YkOXF.png) ![enter image description here](http://i.stack.imgur.com/AL1w3.png) This is the code:               function initLeaflet() {                 osm = L.tileLayer.wms(geoserver + "/OSM/wms", {             layers: 'OSM',             format: 'image/png',             transparent: true         });              coords = L.tileLayer.wms(geoserver + "/coords/wms", {             layers: 'Roham:DeviceInfo',             format: 'image/png',             transparent: true                 });              var baseLayers = {             "osm": osm         };              var overlays = {             "coords": coords         };              map = new L.Map('map2d', {             center: new L.LatLng(32.05522664582287, 35.05812072269409),             zoom: 9,             layers: [osm, coords],             zoomControl: true         });              L.control.layers(baseLayers, overlays).addTo(map);     }


title: postgis under win 7 "on demand" not as a service

text: how do I install postgis2.0 under win 7 to run just on demand. I dont want to run it permanently as a service. Similary as the (nonspatial) mysql can be run on demand via the xampp-tools (http://www.apachefriends.org/de/xampp.html)


title: Updated instructions for setting up TileCache on IIS 7.5?

text: This article seems great...but it is hard [for me] to follow when setting up for IIS 7.5: http://viswaug.wordpress.com/2008/02/03/setting-up-tilecache-on-iis/ Any updated instructions available with latest versions of TileCache and IIS?


title: Geowebcache REST 404's

text: I'm running Geoserver 2.1.3 (SVN 16668) and am trying to get REST working with GeoWebCache. I've got :8080/geoserver/rest working correctly, and am able to interact with that side of things. However, :8080/geowebcache doesn't exist. I'm told that the only two contexts that exist are /javadocs and /geoserver. I understand that there is such a thing as a REST api for geowebcache. How do I get to it? Is there some additional plugin that I need to download for GeoServer before it becomes accessible, or something of that sort? I haven't been able to find anything on the net about someone just missing the REST section of GeoWebCache. The rest of it works fine. Any ideas? Thanks!


title: Arcpy - How do I specify the precision and scale of a new field?

text: I'm wanting to create a field with a maximum of 1 decimal place and then calculate a value into it: (I know that all my values are < 10)               arcpy.AddField_management('C:/shapefile.shp', 'myField', "FLOAT", 2, 1, "", "", "", "NON_REQUIRED", "")     arcpy.CalculateField_management('C:/shapefile.shp', 'myField', "[MEAN]", "VB", "")      It seems that no matter what I try I can't get the number of decimal places I want - I get the full value from the field I'm calculating from : [0.888889] _and_ when I view the field properties I just see 0 for precision and 0 for scale. The data context is ESRI shapefile. And altering the numeric settings in the field properties is not an option. ![enter image description here](http://i.stack.imgur.com/YXaaq.png) Anyone have any ideas?


title: Add layer from a folder to Map using java script api

text: I know you can add layers to map through map service using javascript api. Can we directly add layers (placed in a folder on ftp) to the map using javascrip api. If so, can please explain it and provide me a sample. Thanks.


title: Are there any simple map data sources like world.dat

text: I recently came across this blog post www.gnuplotting.org/plotting-the-world/ that used a file that holds a basic map of the world. Is there a name for this kind of data. Also is there a repository of similar but higher resolution data. Direct link to data: www.gnuplotting.org/data/world.dat


title: FindTask doesn't work with rest of JavaScript code

text:
I need to add a FindTask to the following code that returns the attributes of the searched in a data grid and selects the data on the map. By modifying the "show find task results in a datagrid" sample from the ArcGIS Javascript API (https://developers.arcgis.com/javascript/jssamples/find_map_datagrid.html) page I am able to get the data grid to return the values I want. However, I cannot implement the whole findtask functionality in my already existing code without either: a) all data disappearing from the map and the data grid returning values or; b) the find task not working and the data staying on the map. Ideally the data searched will be selected on the map, but with all other data still displayed. The question then is: **How would I format such a find task into the existing code below?** Some security-sensitive information had to be removed, but I am hoping that this framework is enough to work with.               <!DOCTYPE html>                     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>                  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>         <title>MN</title>              <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css"/>         <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css"/>         <link rel="stylesheet" href="css/layout.css">         <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dojox/grid/resources/Grid.css">         <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dojox/grid/resources/claroGrid.css">

             MR
              MARKET:
             CLLI: <input type="text" id="C" size="20" value=""/>               <button id="search2" data-dojo-type="dijit.form.Button" type="button" data-dojo-attach-point="button">Search               </button>

               C	               ADDR


title: QGIS Plugin: Show a symbol at coordinates

text: I want to code a plugin for QGIS showing a specifig image (e.g. a .png or .ico file in the file system) at given coordinates. The background is, that I'm receiving coordinates and other information from another application and want to display a symbol whenever new coordinates come in. Maybe someone has an idea how i could do this efficiently or direct me to another project/idea/page implementing such a plugin. Thanks in advance! Kev


Does anyone knows If there is a way to calculate Geary's index of spatial autocorrelation on open source gis?


title: A tutorial for Maxent via QGis

text: Does anyone has an idea where to find a tutorial to prepare data and see results of Maxent with QGis...? Just brand new as QGis user! Thanks for any help. Eric


title: ogr2ogr from MIF to KML including MID generating split kmls

text: I have a set of MIF and MID files that I would like to translate to KML. I used ogr2ogr to transform the MIF into one big KML which worked ok like so: ogr2ogr -f "KML" geo-kml geo-mif I have two questions: 1) Can I incorporate the accompanied MID file into the KML 2) Can I make seperate KMLS for each placemark in the MIF hugo


title: Processing Script: now gives error in QGIS 2.2

text: I recently updated to QGIS version 2.2, and am now getting an error when running Processing scripts that worked previously (in version 2.0.1).               Uncaught error while executing algorithm     Traceback (most recent call last):     Traceback (most recent call last):     File "C:/PROGRA~1/QGISVA~1/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py",    line 202, in execute     self.processAlgorithm(progress)     File "C:/PROGRA~1/QGISVA~1/apps/qgis/./python/plugins\processing\script\ScriptAlgorithm.py", line 252, in processAlgorithm     exec script in ns     File "<string>", line 25, in <module>     AttributeError: 'module' object has no attribute 'getobject'      I believe it's this line of code causing the error, but i'm not sure how to modify it to work with QGIS 2.2:               indivLayer = processing.getobject(Couche_compteurs_individuels)


title: Exporting an ArcGIS model to a script, with a script?

text: I would like to automatically export ArcGIS models to python scripts (and graphics for the model diagram). In order to apply version control to ArcGIS Models my current workflow is to: a) build and refine the model, b) export to script and graphics, c) commit to source code control. Rinse, lather, repeat. Step (b) is a brainless pointy clicky exercise with too much friction which c/should be automated. How?


title: Problem loading the contour plugin

text: I have installed the contour plugin on my kubuntu 13 laptop, but when I am opening qgis (2.0.1) I get the following message: > >     Couldn't load plugin contour due an error when calling its > classFactory() method >   >     Traceback (most recent call last): >       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 204, in > startPlugin >         plugins[packageName] = package.classFactory(iface) >       File "/home/maria/.qgis2/python/plugins/contour/__init__.py", line 47, > in classFactory >         from contour import Contour >       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in > _import >         mod = _builtin_import(name, globals, locals, fromlist, level) >       File "/home/maria/.qgis2/python/plugins/contour/contour.py", line 41, > in >         from shapely.geometry import MultiLineString, MultiPolygon >       File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in > _import >         mod = _builtin_import(name, globals, locals, fromlist, level) >     ImportError: No module named shapely.geometry >   Any ideas how to solve this problem would be much appreciated.


title: JavaScript: FindTask works but no data appears on map

text:
I need to add a FindTask to the following code that returns the attributes of the searched in a data grid and selects the data on the map. By modifying the "show find task results in a datagrid" sample from the ArcGIS Javascript API (https://developers.arcgis.com/javascript/jssamples/find_map_datagrid.html) page I am able to get the data grid to return the values I want, but cannot implement the whole findtask functionality in my already existing code without either a)all data disappearing from the map and the data grid returning values or b) the find task not working and the data staying on the map. The question then is: how would I format such a find task into the existing code below? Some security-sensitive information had to be removed, but I am hoping that this framework is enough to work with. Thanks in advance!               <!DOCTYPE html>                     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>                  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>         <title>MN</title>              <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css"/>         <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css"/>         <link rel="stylesheet" href="css/layout.css">         <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dojox/grid/resources/Grid.css">         <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dojox/grid/resources/claroGrid.css">

             MR
              MARKET:
             CLLI: <input type="text" id="C" size="20" value=""/>               <button id="search2" data-dojo-type="dijit.form.Button" type="button" data-dojo-attach-point="button">Search               </button>

               C	               ADDR


title: Exporting Graphic with transparency in layout to PDF using ArcGIS for Desktop?

text: I'm using ArcGIS 10.1 for Desktop. I am trying to export a pretty simple map to PDF and finding the results are not what I expect. I have inserted two graphics on top in Layout. One is just a rectangle that has a custom user style applied. The style uses a Picture Fill derived from a PNG file that has transparency set to 80% opacity in the original file. The other graphic is a rectangle text box that has a similar Picture Fill Style applied, this one using a 20% grey fill and 80% opacity in the original PNG file. On screen, the boxes look fine. That is, I can see other layer information underneath that looks greyed out with a partially transparent box overlaying. When I export to PDF, the boxes show up as empty of any fill at all. The sample text in the text box shows up, but not the transparency fill. Resolution is set to 300 DPI, Resampling is set to best. Colour space is set to CMYK. There is no compression. Bitmap fills are set to vectorize. I have tried varying every setting that can be changed in Export to PDF and find that nothing really changes with regard to this transparency issue. Any ideas? I have scanned other forum posts and see that it is an issue from several versions back. Has it ever been solved?


title: Gdal2tiles with tif projection failure

text: I downloaded this .tif image of the world (small version) from Natureal Earth and tried to convert it to tiles using Gdal2tiles in OSGeo4W. In the terminal, I used the following commmand:               gdal2tiles -z 0-4 -w none -s EPSG:4326 NE2_50M_SR.tif      and the process went smoothly, except that something appears to have gone wrong the projection. It should be noted that I'm new to both gdal and displaying tiled maps online. When I try to use the tiles in leaflet.js, this is what I end up with. Does anyone have any ideas of what the fault might be? ![](http://i.imgur.com/lOzaa3S.jpg)


title: Can a Python script be executed from a .NET AddIn and also write its standard output and geoprocessor messages to the ArcMap Python Window?

text: Can a Python script be executed from a .NET AddIn and also write its standard output and geoprocessor message to the ArcMap Python Window? I have no problem call python scripts with Process.Start or GeoProcessorClass.Execute. But I have an existing AddIn (10.1) and I want to add a new button that will call the python script and have it behave the same way a right-click `Load...` behaves in the ArcMap python window. Is there a way to do this? I'm currently using **this procedure**. And it does run the script--I'm just after the same out to the python window.


title: How can I split a polygon into its sub polygons?

text: I am trying to define user generated polygons with Esri's ArcGIS Engine 10.1.   Here's how it works at the moment:   * User clicks on the map and creates points    * User connects the points I have a collection of line segments (IPointCollection) in memory. The map looks something like this. ![enter image description here](http://i.stack.imgur.com/o9O8u.jpg) I want to input all my line segments into an object. Then I need the object to tell me that I have 2 polygons, and one of the polygons has 5 sub polygons. I created a ISegmentCollection with all the segments in both polygons, then I cast the ExteriorRingBag into an IGeometryCollection, and I have my 2 main polygons. The bounty goes to whoever can tell me how to take the IPolygon on the left, and get it to return it's 5 sub polygons.


title: How to extract road line pattern from satellite images using Matlab?

text: Firstly we applied canny edge detection to the image, then detected lines using houghlines, then we got start and end points of the lines. Then we applied delaunay triangulation and voronoi diagram for the points. Now we need to get the skeleton of the pattern obtained. Kindly tell me what technique should be used? I am implementing in Matlab. The final output we have obtained so far.https://docs.google.com/file/d/0B7W9pCpzX8fTSnQ3OE5FWlc0VzA/edit


title: How to display drawings from ArcGIS on Google Maps using JavaScript or PHP?

text: my client has ArcGIS installed on his PC and he has designed roads, hospitals, houses, and parks of a specific area in ArcGIS he needs his system online. challenging task for me is how can I get all drawing information from his ArcGIS that I can show that same drawing on google map using javascript or php or whatever I searched it but I am not satisfied yet. there is also a solution of creating ArcGIS Server, but that will be my 2nd priority. I am thinking to somehow export all drawing information from ArcGIS and feed it to google map. bcz there will be no frequent changes in drawing he has. (means drawings are static and not changing frequently.)


title: How to integrate geoserver with external LDAP?

text: I have installed geoserver through geoserver.war file in tomcat7. Geoserver is working fine. I want to integrate geoserver with external ldap. Kindly send a link or explain me how to integrate with external ldap?


title: Calculating spatial lags per year in R

text: At the moment I am having some difficulties with calculating a spatial lag in `R`. I know how to calculate the lag in space-wide format but am unable to do it in long form, i.e. have repeated observations for the unit of analysis. Below is some mock data to illustrate what I am trying to do. Let's start by generating some observations of events that I'm interested in.               # Create observations     pts<-cbind(set.seed(2014),x=runif(30,1,5),y=runif(30,1,5),            time=sample(1:5,30,replace=T))     require(sp)     pts<-SpatialPoints(pts)      `x` and `y` are the coordinates while `time` represents the time period in which the event takes place. The events need to be aggregated to polygons which is the unit of analysis. In this example the polygons are grid-cells and for simplicity the boundaries are fixed over time.               # Observations take place in different areas; create polygons for areas     X<-c(rep(1,5),rep(2,5),rep(3,5),rep(4,5),rep(5,5))      Y<-c(rep(seq(1,5,1),5))     df<-data.frame(X,Y)     df$cell<-1:nrow(df) # Grid-cell identifier     require(raster)     coordinates(df)<-~X+Y      rast<-raster(extent(df),ncol=5,nrow=5)     grid<-rasterize(df,rast,df$cell,FUN=max)     grid<-rasterToPolygons(grid) # Create polygons       We can plot the data just to get an overview of the distribution: ![Event distribution](http://i.stack.imgur.com/0tJgX.png) For space-wide format I would calculate the spatial lag the following way:               pointsincell=over(SpatialPolygons(grid@polygons),SpatialPoints(pts),                   returnList=TRUE)     grid$totalcount<-unlist(lapply(pointsincell,length))     require(spdep)     neigh<-poly2nb(grid) # Create neighbour list     weights<-nb2listw(neigh,style="B",zero.policy=TRUE) # Create weights (binary)     grid$spatial.lag<-lag.listw(weights,                                 grid$totalcount,zero.policy=TRUE) # Add to raster      However, as you can see doing it this way doesn't take into account the fact that the events happen at different moments at time. It just simply aggregates everything to the polygon level. Now I want to calculate this spatial-lag taking into account this temporal dimension so aggregating the data in this case to the polygon-time level. I wonder whether anyone has a useful suggestion on how this could be accomplished? What is the most convenient way of calculating spatial lags in long format? I had a look at the `spacetime` package but was unsuccessful in applying it.


title: Convert KML to shapefile without losing attribute data

text: So I want to convert KML files to SHP shapefiles to load it onto PostGIS. Currently I'm using ogr2ogr to do the conversion for me, but it wipes out all the attribute data. How do i preserve this attribute data in the resulting shapefile? Any better feature out there?


title: Installing QGis such that it will work with the Postgres.app implementation of PostgreSQL on Mac (Lion) (open to alternative implementations)

text: I just got a new mac and am getting everything installed on it (postgres, postgis, qgis, grass, gdal, brew, ruby, etc) and am about to install QGis. QGis is a great tool for me, except for that with my other mac I was never able to get it to connect to PostgreSQL. PGAdmin always worked when connecting, but connecting QGis to the Postgres.app implementation of Postgresql never was able to connect. The error messages were depressingly vague (just recreated): `Connection failed - Check settings and try again.` So my question is this. What are the ideal settings that allow qgis to connect easily to postgresql? I've found Postgres.app an easy to use implementation, but should I abandon it and use the normal brew-installed postgresql instead to get qgis to connect? Or even better, is there a qgis/postgresql co-installation somewhere that would come close to guaranteeing inter-functionality between these two systems? UPDATE: (after temporarily removing the Postgres.app PostgreSQL implementation) When I run this command:               brew install qgis --with-grass --with-postgis      brew starts off by installing postgresql. I'm going with this for now and am hoping the "pipes" between QGis & PostgreSQL will be setup to communicate with one another...


title: How to use ITrackCancel to escape IRubberBand track?

text: I have a `BaseTool` for AX_MapControl and AX_PageLayoutControl that allows to draw a polyline via `IRubberBand`. But once the rubberband is started, you can't cancel it e.g. by hitting escape. I found `ITrackCancel` but unfortunatly no way to use it properly.               ITrackCancel2 esc = new CancelTrackerClass();     esc.CancelOnKeyPress = true;     esc.Reset();          IRubberBand2 rubberBand = new RubberLineClass();     IGeometry geometry = rubberBand.TrackNew(screenDisplay, null);     IPolyline polyline = (IPolyline)geometry;      How do I use ITrackCancel to cancel the rubberband tracking? **Update:** ITrackCancel can be retrieved from `IScreenDisplay` but my `m_hookHelper.ActiveView.ScreenDisplay.CancelTracker` is null. I use the tool with `AX_MapControl` and `AX_PageLayoutControl`. **Update 2:** I found out, that even Esris own tools like `esriControls.ControlsNewLineTool` can't be canceled with escape in my application. Maybe there is a deeper flaw somewhere. Going to dive deeper into it... **Update 3 (Solution):** There is a glitch in my WPF application. It seems, that on startup no key events arrive the MapControl until you change the window size once. So this is not a problem with `ITrackCancel` but with the interaction between WPF and ArcEngine. Thanks anyways for your help.


title: How can I group Points to make polygon via Python

text: I have an array of coordinates Point= [lat,long] ListPoint= [[38.203655,-76.113281],[38.10,-76.12],..] I wanna make a polygon that contains all these points ? There is a project developed by Flicker - The shape of Alpha but the project is not open. Do you have any ideas how can I do that.


title: calculating mean and standard deviation for raster values using whole pixels within a polygon

text: i have a raster image and a corresponding shape file. i would like to calculate the statistics of the values within polygons which have a common attribute but only using pixels which are fully contained in the polygons. i would like to do this in R. however i have so far only managed to load the image and shape file using readGDAl and readOGR respectively!


title: What is cache size measured in?

text: Can anyone tell me what the units are for the Cache Size setting in QGIS please? Is it bytes, KB, Mb, MB? When I look in the directory specified by the path (/Users/.../.qgis/cache/) the cache folder is just 6KB. Any assistance appreciated thanks


title: Is the QGIS cache directory automatically created?

text: This question is directly a result of a question posted earlier about the units of cache size: QGIS - what is cache size measured in I went to the `Options` menu in QGIS, to the `Network` tab. Here is a screenshot of said tab. ![QGIS Network options page](http://i.stack.imgur.com/eag1K.png) As you can see, my cache directory path is set to `C:/Users/Russell/.qgis/cache/`. I went to look at the directory to see how large the directory was or the total size of the files contained within. To my surprise, the `cache` directory does not exist. I have my folder options set to **show any hidden files and folders** , so it is not simply hidden from my view. ![QGIS Cache Directory Location](http://i.stack.imgur.com/NOiqB.png) I've been using QGIS for a number of years now with no problems, and it does not seem slow. This leads me to believe it is being cached in another location. The computer is running Windows 7. I installed QGIS using the **OSGeo4W** installer. Is there a setting somewhere that overrides the QGIS setting? It seems worth putting this out there to see if there are other cases of this happening, or if it is isolated to my machine. As I said, I am not seeing an impact on performance, but that could simply be because the computer is speedy enough. It would be nice to know why the files for my installation don't seem to match what is shown in the program itself. Any insight would be appreciated. Thanks!


title: Conversion from CGIAR GEOTIFFs to SRTM3 like HGTs

text: Im writing a C program for querying height information from SRTM data. Since reading directly GeoTIFF format is tough job, I decided to load HGT format, which serves great for the purpose. Since SRTM3 data contains void areas, I found the CGIAR preprocesed data which looks much better. But they only offer geotiff download for 5×5° altogether saved in continous numbered filenames (thus not compatible with degree number naming). I would like to convert these TIF files (ie srtm_39_03.tif) to HGT and name them properly. Or alternatively please suggest another download site. * * * So far I realised, that I can convert 1° TIF to HGT easily, but 5° fails:               $ gdal_translate -of SRTMHGT srtm_39_02.tif srtm_39_02.hgt     Input file size is 6001, 6001     0Warning 1: The corner coordinates of the source are not properly aligned on plain latitude/longitude boundaries.     ERROR 1: Image dimensions should be 1201x1201 or 3601x3601.      As of the splitting, it could be probably achieved with `gdal_translate -srcwin 0 0 1201 1201 srtm_39_02.tif out.tif`, but Im really confused how to split 6001 in 5 parts each 1201 pixels :-) Thanks,   zbycz * * * Update: according to SRTM manual, HGT files overlap with the 1 upmost/rightmost line, so the splitting is clear now. But still would be happy for consultation.


title: convert geotiff to simple xyz elevation file?

text: I have looked everywhere and can not find a tool to convert a geotiff file to a simple ascii elevation file... did I miss something? thanks for any pointers!


title: How to convert a txt file to shp?

text: I've got a txt/csv file with the utm coordinates and the hights. Now I want to upload this into qgis. This is not a problem so far. The problem is to create a shapefile out of the data with an attribute table for adding other values to work with. Has anyone an idea how to do this?


title: Weighted Average of several raster "zones"

text: thanks for the visit! Suppose I have two rasters, A and B. I want to determine the value of a certain "zone" in raster A by taking the weighted average of several other zones from raster B, that partially overlay onto that zone of raster A. I think its much better if I show you a picture to try to explain: ![enter image description here](http://i.stack.imgur.com/4mBog.png)   * The "certain 'zone' in raster A" is shown as the teal polygon in the border, suppose it is rasterized and is made up of 1000 cells.   * The red grids are the "several other zones from raster B." In this case, there are four denoted by g1, g2, g3, g4 (these are some values).   * The weight will be determined by the number of pixels lying within the respective zones in raster B.   * The value of that certain 'zone' in raster A will be determined by this: **value of zone in A = (50/1000)g1 + (300/1000)g2 + (150/1000)g3 + (500/1000)g4** I've thought of employing the Combine tool in ArcMap and then bringing it into excel.. but it is a fairly manual process. I have a lot of data to get through (like 50+ raster B's that I must aggregate through).. Is there an easier way to do this? Is there a specific function you think may help? I have little experience in writing a python script but if you point me to some packages+functions in arcpy or numpy or whatnot, I'd greatly appreciate it. ==== edit: Similar, previous questions have suggested things like "dasymmetric mapping" like this thread: How to use NASS county level crop data to estimate crop acreage in hydrologic regions?.. which suggests the use of the Intersect tool, but I'd generally prefer to rely on using weights from the counts of defined cell sizes of a raster rather than have arcgis calculate the area proportions from vector data. I also found a helpful tip on this question, Obtain normalized raster average per polygon?, suggesting Zonal Statistics. Is the "mean" of Zonal Statistics the same as what I'm trying to do? I'll try it and report back...


title: Probleme with WFS protocol in OpenLayers

text: Sorry for disturbing. I know my problem look common, but I really don't know what to make. Here is my code for getting a WMS layer in OpenLayers from Geoserver.               var wfs2 = new OpenLayers.Layer.Vector("WFS", {                         strategies: [new OpenLayers.Strategy.Fixed()],                         protocol: new OpenLayers.Protocol.WFS({                                   version: "1.1.0",                         url: "http://localhost:8080/geoserver/wfs",                                     featurePrefix: "topp",                         featureType: "states",                         featureNS: "www.openplans.org/topp",                         srsName: "EPSG:4326",                         geometryName: "position"                       })                        });      So i get this problem in developer tools for chrome :               XMLHttpRequest cannot load http://localhost:8080/geoserver/wfs. Origin null is not allowed by Access-Control-Allow-Origin.       in developer tools for chrome I saw that people recommend to set up a proxy, but my .html is in the geoserver/data_dir/www folder, and don't call external urls. I however tried it, so I created the folder cgi-bin in /usr/local/geoserver/cgi-bin/, where i put the proxy code I found here :http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost And then I added in the cript of my .html this : `OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";` But I then get this error in developer tools :               Failed to load resource file://localhost/cgi-bin/proxy.cgi?url=http%3A%2F%2Flocalhost%3A8080%2Fgeoserver%2Fwfs       Probably the proxy is not in the right place, but I don't think the first problem (without problem) comes from here. Please help ! Thks a lot !


title: Having trouble nesting updatecursors

text: I'm trying unsuccessfully to perform updates on multiple linked tables using updatecursors. The following code works as I would expect:               trackRows = arcpy.SearchCursor("tracks","Key_='b2879561-d751-e111-9e92-0050568e18a0'")     for trackRow in trackRows:         arcpy.management.MakeFeatureLayer("tracks","currentTrack","Key_='" + str(trackRow.Key_) + "'")         grXingRows = arcpy.SearchCursor(GradeCrossings,"LinkKey='" + str(trackRow.Key_) + "'");         for grxrow in grXingRows:             inspectionRows = arcpy.SearchCursor(Inspections,"LinkKey='" + str(grxrow.getValue("Key_")) + "'")             for insprow in inspectionRows:                 grxDefRows = arcpy.UpdateCursor(GradeCrossingDefects,"LinkKey='" + str(insprow.getValue("Key")) + "'")                 for grxdefrow in grxDefRows:                     grxdefrow.LocationVal = 7                     grxDefRows.updateRow(grxdefrow)                 del(grxDefRows)             del(insprow)         del(grXingRows)         arcpy.management.Delete("currentTrack")      However, when I change the 4th line to use `arcpy.UpdateCursor`, the script still runs, but the data rows that are updated in the inner loop don't get updated in the DB. Any ideas? EDIT: Having tested out the suggestions about deleting cursors and rows more thoroughly, I now have the following:               trackRows = arcpy.SearchCursor("tracks","Key_='b2879561-d751-e111-9e92-0050568e18a0'")     for trackRow in trackRows:         arcpy.management.MakeFeatureLayer("tracks","currentTrack","Key_='" + str(trackRow.Key_) + "'")         grXingRows = arcpy.UpdateCursor(GradeCrossings,"LinkKey='" + str(trackRow.Key_) + "'");         for grxrow in grXingRows:             inspectionRows = arcpy.SearchCursor(Inspections,"LinkKey='" + str(grxrow.getValue("Key_")) + "'")             for insprow in inspectionRows:                 grxDefRows = arcpy.UpdateCursor(GradeCrossingDefects,"LinkKey='" + str(insprow.getValue("Key")) + "'")                 for grxdefrow in grxDefRows:                     grxdefrow.LocationVal = 7                     grxDefRows.updateRow(grxdefrow)                     del(grxdefrow)                 del(grxDefRows)                             del(insprow)             del(inspectionRows)             del(grxrow)         del(grXingRows)         arcpy.management.Delete("currentTrack")         del(trackRow)     del(trackRows)      Still no luck! I tried deleting the rows within the loop, and tried deleting the rows outside of the loop. Neither solved my problem. EDIT: Now I feel a little silly. I had a map service running which was maintaining a lock on BOTH of the feature classes I was trying to update. I used arcpy.TestSchemaLock to test, and found that it returned false for both feature classes regardless of whether the first was using a searchcursor or an updatecursor. Stopping the service solved my issue. However there is still some funny behavior here that I'd like to understand:   1. According to the documentation, if the updatecursor can't get an exclusive lock, then it should error out...but my script ran just fine, no errors...why?   2. Even given that not erroring were a valid behavior, I still should not have been successful with the inner update EVER when the service was running, but it worked fine as long as it was the only updatecursor I was using. Why? EDIT: After sleeping on it and trying again, it seems the success from 2 days ago was a fluke. Both yesterday and today I have been unable to get the script to update the database correctly. The script is unchanged, and I have checked to ensure that there are no schemalocks on these feature classes (TestSchemaLock returns true). I'm not sure what stars had aligned which are now misaligned, but I still have no solution to the problem.


title: Where can I go to have a rant about Open GEO Data?

text: Which is the most popular GIS forum or website that's not under the control of our corporate or government overlords? This place is great for questions and answers, but if I want to have a discussion or in this case a rant about the state of open data access in the GIS community, which is the most popular forum for such things? p.s Don't worry, I'll be marking this as a community wiki myself ;-)


title: Applying proper conversion from True to Grid bearing

text: I have a very basic question that will seem very elementary to most who observe this website. The reason I ask is because I have been told to difference answers and I'm now a little confused. So, here I go. Assume that Magnetic North is +14.62e & True North is +13.113e and Grid North is -1.49w. If I wanted to correct gyro surveys (in True North) and then converted them to Grid North, what values would be needed to do so correctly. I'been told to add 1.49 deg to the True North surveys which would convert them to Grid North. But, I've also been told the opposite and subtract the 1.49 deg from the True North. I've also been led to believe that since you are going from True to Grid (in a counterclock wise direction) you would therefore add the -1.49 deg. Perhaps someone can better explain.


title: TKinter to provide variables

text: I've been looking for a way to enter a unique field name into an attribute table for up to 40 feature classes. I need the field names to be meaningful, not just 'field1', 'field2' etc. For example, if the feature class represents wetlands I would like a field called 'Wetland'. I thought the easiest way of doing this would be to use TKinter. I can print the feature class name and then dynamically enter a field name with the TKinter data entry msgbox. Then keep looping through the feature classes until they all have a field with a unique name. I've found some examples but am unsure about how to use data entry text as a variable in Python. If anyone out there had an example script or can make suggestions on this script I'd appreciate it:               import arcpy     from arcpy import env     from Tkinter import *          # Environment Workspace     env.workspace = r'G:\TEST\Python_Test\Test.gdb'          def receive():         text = E1.get()         print (text)     top = Tk()     L1 = Label(top, text="User Name")     L1.pack( side = LEFT)     E1 = Entry(top, bd =5)     E1.pack(side = RIGHT)     b = Button(top, text="OK", width=10, command=receive)     b.pack()     top.mainloop()


title: installing older version of QGIS

text: I recently installed the latest version of QGIS (2.0) on my UBUNTU 12.04. But am not very satisfied with it. I would like to uninstall it and reinstall QGIS 1.8 v on Ubuntu. Am unable to do so. It would be great if anybody could help me with this. thanks


title: How to replace the legacy function "doQueries " to AMD ESRI Javascript format?

text: I'm trying to understand the migration of ESRI API for javascript, from legacy to AMD. In the case of this example, how replace the fucntion doqueries????:               function init() {         map = new esri.Map("map", {           extent: new esri.geometry.Extent(-102.61, 36.2, -93.82, 40.5, new esri.SpatialReference({wkid: 4326})),           slider: false         });         dojo.connect(map, "onLoad", doQueries);         map.addLayer(new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"));       }            function doQueries(map) {         //Query all counties in Kansas         var countyQueryTask = new esri.tasks.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3");         var countyQuery = new esri.tasks.Query();         countyQuery.outFields = ["*"];         countyQuery.returnGeometry = true;         countyQuery.outSpatialReference = map.spatialReference;         countyQuery.where = "STATE_NAME = 'Kansas'";         countyQueryTask.execute(countyQuery, addCountyFeatureSetToMap);              //Query all cities in Kansas         var cityQueryTask = new esri.tasks.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0/");         var cityQuery = new esri.tasks.Query();         cityQuery.outFields = ["*"];         cityQuery.returnGeometry = true;         cityQuery.outSpatialReference = map.spatialReference;         cityQuery.where = "STATE_NAME = 'Kansas'";         cityQueryTask.execute(cityQuery, addCityFeatureSetToMap);       }            function addCountyFeatureSetToMap(featureSet) {         var symbol = new esri.symbol.SimpleFillSymbol();         symbol.setColor(new dojo.Color([150,150,150,0.5]));              //Create graphics layer for counties         var countyLayer = new esri.layers.GraphicsLayer();         map.addLayer(countyLayer);              var infoTemplate = new esri.InfoTemplate("${NAME}","${*}");              //Add counties to the graphics layer         dojo.forEach(featureSet.features, function(feature) {           countyLayer.add(feature.setSymbol(symbol).setInfoTemplate(infoTemplate));         });       }            function addCityFeatureSetToMap(featureSet) {         var symbol = new esri.symbol.SimpleMarkerSymbol();         symbol.setColor(new dojo.Color([0,0,255]));              //Create graphics layer for cities         var cityLayer = new esri.layers.GraphicsLayer();         map.addLayer(cityLayer);         map.reorderLayer(cityLayer,1);              var infoTemplate = new esri.InfoTemplate("${CITY_NAME}","${*}");              //Add cities to the graphics layer         dojo.forEach(featureSet.features, function(feature) {           cityLayer.add(feature.setSymbol(symbol).setInfoTemplate(infoTemplate));         });       }            dojo.addOnLoad(init);


title: Tilemill: set max extent for export

text: Is it possible to set map extent to be displayed on mapbox ? If so could you pls send mss example ? Regards, Jorge Vidinha


title: Connect ESRI Feature Service to Oracle Spatial database

text: I need to display some business and feature data from an Oracle Spatial database on a website. The website will use ESRI's HTML5 map components (https://developers.arcgis.com/en/javascript/jssamples/#search/html5), which would get their features from some kind of Feature web service. So I'm looking for a web service by ESRI which can be hooked on an Oracle Spatial data source. I don't know if I need a WMS, WFS or an OGC service (sorry, no experience with such services), as long as it's compatible with ESRI's HTML5 Javascript libraries. **Is there such a web service component in ESRI's software suite?** Or do I need the full ArcGIS Server (including ArcSDE) to display Features in a website? **What kind of web service (WMS, WFS, OGC, etc.)** would best be suited for such a scenario?


title: How to compute the outline of multiple tracks?

text: I have multiple gps tracks with depth data gathered from the lake. The tracks are overlapping/intersecting. I want to get an outline polygon. I have a multi-line shp. I've tried to diffuse it in qgis and buffer. But buffering amounts of data I have simply stalls the PC, after eight hours of work buffer was still processing data. Is there a simpler and more productive way to get outline from multiple tracks? (Preferably using qgis, gdal, or any other free software) This is what I have: ![enter image description here](http://i.stack.imgur.com/CMcJ9.png) This is what I need to get: ![enter image description here](http://i.stack.imgur.com/OvjhB.png) Another part of the goal is to preserve the precision of vector data. And hopefully the solution should work for large majority of cases automatically. And it probably shouldn't involve rasterizing image to keep memory use as low as possible. It should be noted that simple approach to do some kind of approximation causes the solution to be sensible to data. I.e. each data set will have to be treated individually to remove errors related to approximation.


title: How do I convert longitude & latitude to a 3d (geocentric x,y,z) coordinate?

text: I'm interested in finding the centroid of a point cloud. I understand that to do this I need to convert latitude and longitude values to 3d coordinates, average them and then convert the resulting coordinate back to latitude and longitude (From a previous answer: http://gis.stackexchange.com/a/6026/8891). How would I go about doing this (preferably in either QGIS or R)? Is there an appropriate formula which I can recreate in R or a function already available in QGIS? The main aim of this is to identify the following: If each point in the point cloud was a person, and all the people had to travel (as the crow flies) to a single point, which point would minimise the total distance travelled by the whole group?


title: Opengeo : Add new server dialog doesn't show up

text: While trying to follow the tutorial of Opengeo for creating a new application, I am getting stuck on one of the first steps: namely the addition of a new server dialog. (http://suite.opengeo.org/docs/apps/clientsdkintro/viewer/addnewserver.html) I added the following lines in my app.js and restarted my server application. Unfortunately I cannot get the "Add a New Server ..." line as described in the tutorial when adding new layers. `* @require overrides/override-ext-ajax.js ... proxy="proxy/?url="` The full content of my app.js is available at https://gist.github.com/anonymous/6899291 Note that I am starting my application using the following command on a Linux machine where Opengeo was installed : `suite-sdk debug -g http://localhost:8080/geoserver myapp` Thanks


title: Why do my maps exported in WGS84 have large coordinates?

text: I'm using QGIS to export map layers as GeoJSON for use in Leaflet. The map file CRS is WGS84(EPSG4326) and I'm exporting it as such. The issue is the exported coordinates are still too large:               [ 11558.278564442522, 49021.841560175955 ]...      When I capture a coordinate on QGIS I get: ![enter image description here](http://i.stack.imgur.com/k4eYX.png) The coordinates, highlighted in red, are the ones I want to export. Yet I seem to get the large ones below. I saw a similar problem on here, but I seem to have already followed those recommendations. Edit: Perhaps I'm barking up the wrong tree here. The map is in fact rendered, it just appears to be in an odd spot. If I call: map.setView([44000, 19000]); It results in this map being rendered with zoom capability disabled (bug?): ![enter image description here](http://i.stack.imgur.com/2hglZ.png) I hope my question hasn't become too muddy already. I'm not as familiar as I'd like to be with map systems.


title: Align a polygon to a point in another layer - QGIS

text: I had a rectangle in a polygon layer, and a point in another layer. How can I align the polygon centroid to that point ? I'm doing manually with the move polygon tool, but it would be great if i can automate it. Thanks Juan


title: How to zoom to the extent of a query result

text: Does anyone know how to change the extent on the map in function of a query? in legende I have no problem using the function showResults (featureSet) {... but, can not get any display in AMD. Here I put a piece of script that I want to switch from legend to AMD:                           function showResults(featureSet) {                         //remove all graphics on the maps graphics layer                         map.graphics.clear();                         //QueryTask returns a featureSet.  Loop through features in the featureSet and add them to the map.                              //Performance enhancer - assign featureSet array to a single variable.                         var resultFeatures = featureSet.features;                         var extent;                          for (var i=0, il = resultFeatures.length; i<il; i++) {                         //Get the current feature from the featureSet.                         //Feature is a graphic                         var graphic = resultFeatures[i];                         graphic.setSymbol(symbol);                         geometry = graphic.geometry;                         ext = geometry.getExtent();                         if (extent) {                         extent = extent.union(ext);                         }                         else {                         extent = new esri.geometry.Extent(ext);                         }                              //Set the infoTemplate.                         graphic.setInfoTemplate(infoTemplate);                                  //Add graphic to the map graphics layer.                         //map.addLayer(stateLayer);                         map.graphics.add(graphic);                                    }                                   map.setExtent(extent,true);                              }                         });                 });


title: How to Identify and Delete duplicate vertices?

text: I am trying to figure out how to delete duplicate vertices. I have successfully determined that there are duplicate vertices using PLTS Data Reviewer, but I am confounded as to how I identify and remove individual vertices. I have tried repair geometry to no avail, and I was wondering if anyone had some advice. I am working in a file geodatabase in ArcMap 10.0 with Data Reviewer extension.


title: Is there a way to download more than 13MB of OSM data to QGIS?

text: I'm using QGIS to make maps with OSM streetmaps data. Problem is that with QGIS -> Vector -> OSM -> download data, after about 13MB I get "Download error Operation cancelled". Sometimes I get "Download successful" after 8MB but can't import the .osm because of "XML error, Premature end of document". I reduced the areas of the download to keep the size down and two out of five were incomplete files. With Maperitive I've downloaded bigger files, from rambler.ru. Is there some setting in QGIS to change the source of the data? Or some other way of solving the problem?


title: Error north coordinate not allowed using r.water.outlet in GRASS

text: When I am trying to delineate a basin from this code:               r.water.outlet drainage=drainage1 basin=basin1 \  east=518675.070417019 north=911542.292643082       Coordinate system: UTM-cartesian xy (used by default for the r.water.outlet module), 518675.070417019 m in X and 911542.292643082 m in Y. UTM zone: 18P Degree coordinates: 8° 14' 47.053363'' N, 74° 49' 49.549439'' W               -PROJ_INFO-------------------------------------------------     name       : Lat/Lon     proj       : ll     datum      : wgs84     ellps      : wgs84     no_defs    : defined     towgs84    : 0.000,0.000,0.000     -PROJ_UNITS------------------------------------------------     unit       : degree     units      : degrees     meters     : 1.0      In the GRASS module I obtain the error in the subject (WARNING: North Coordinate <911542.292643082 > not allowed), how can I fix this?


title: "Binning" polygons in QGIS

text: I've got a block-level census dataset that I am attempting to aggregate using a 2-mile grid. Basically, I want each grid cell polygon to have a value equal to the sum of the total population of each census block inside it, plus the fraction of the population of each census block polygon intersecting it that is inside the grid cell (so that if a block is 50% in one cell and 50% in the other, each cell is assigned 50% of its population). Is this something I should be thinking about in terms of a raster conversion? At a bit of a loss here, this type of geoprocessing is outside of my normal QGIS use. Thanks!


title: Openlayers Auto Pan when drawing

text: Is there a way to auto pan the map in the direction of mouse location if it hits the extents of the window when drawing line or polygon? It seems inefficient to have to pan by clicking the pan arrow if the polygon goes outside the map window. Hope this makes sense?


title: How to ensure that only my application has access to ArcGIS Server services

text: I'm making a web map based on the ArcGIS Server JS API. How can I ensure that users must use my front-end to access the ArcGIS Server layers? That is, I want anyone visiting MyDomain.com/index.html to have access to the ArcGIS Server layers referenced on the page, but I don't want users to be able to access the ArcGIS Server layers directly (eg, by using Firebug to detect the URLs then using them in their own applications). I want to allow anonymous users to access the site, so I don't want to provide a prompt for users to log in - it needs to work seamlessly. An idea is to secure the layers with tokens, and have my application automatically fill in the token credentials. Has anyone done this? How would I hide the token credentials so that people couldn't access the information?


title: Store user settings in map document?

text: I have created a custom tool for ArcMap with .NET and would like to know if there is any way to store user defined settings in a MXD. The tool simply draws a graphic circle of a certain radius with the center snapped to the closest vertex in a polyline pointed at by the mouse. Right now, the user has to select the layer and set the radius (with a custom dialog form) every time they open the mxd and use the tool. This layer and radius rarely changes for a project mxd, so it would be convenient to store the name of the layer and radius setting somewhere, so that it can be automatically used by the tool.


title: Zoom further in with leaflet javascirpt API

text: We're using the leaflet JavaScript API with a tile layer which supports zoom level up to 19. I'd like users to be able to zoom further even if the tiles blur as they have to place markers to a high degree of accuracy. Is this possible ? We want the map to zoom not the markers or other elements.


title: Multiline String to Linestring conversion

text: I have road network table which is multilinestring.I was trying to convert this file to Linestring using the following query ALTER TABLE multiline ALTER COLUMN the_geom TYPE geometry(linestring,4030) USING ST_GeometryN(the_geom, 1); But it throw an error ERROR: type modifier is not allowed for type "geometry". I am using the POStgres version 8.4 and postgis vesion is 1.5 Is There any function that convert Multiline string to Linestring. Please Help me Regards Sreesha


title: How to add *.ecw files to QGIS 2.0 on Windows?

text: How do I add and view *.ecw raster images in Qgis 2.0 ?


title: How can I show numbers as percentages in CartoDB?

text: I would like to format numbers as percentages in cartodb. What are the best functions to display numbers with decimals, comma separators or percenteges? Thanks


title: How to cast data types from GeoJSON feed (aka: how to sync when everything is a string)?

text: Just getting started with the CartoDB Way and have run up against first problem. Looks like I'm not alone. We have a GeoJSON feed coming from a Fulcrum data collection app. We want to see current results of that collection on a map, so I have set up a GeoJSON feed from Fulcrum as a starting point. Over in CartoDB, I create a table and provide the GeoJSON URL. The data appears...all as strings, except for the_geom (thankfully). I want to create a sort of "set and forget" transfom process so that the column types are always converted properly and made available to CartoDB as their correct data types. What is the next step? Thanks indeed!


title: Restrict WMSLayer (not map) extent with ArcGIS JavaScript API

text: Is there a way to restrict the rendering of a `WMSLayer` to a specified extent without restricting map panning and zooming? That is, I need the client to be able to pan outside the limits of the `WMSLayer`, in which case only the basemap should be displayed. The WMS Server is external and outside of my control. I would prefer to find a solution, if possible, that does not hide the `WMSLayer` completely. The users should be able to see the extent limits of the WMS Service.


title: Segmentation Image used to classify RGB image in ERDAS and GIS

text: My ERDAS 2013 does not have the advanced Image Objective Extension for feature extraction.. I am using thus the tool Image Segmentation (Unsupervised -> Image Segmentation) to classify my RGB image ... when I try to use the Segmented Image as a base for classification ( the signature combined of unsupervised and supervised, I also tryed a saparate unsupervised and supervised signature) I constantly obtain a message: **Layer count in input image (1) does not match layer count in signatures (3)** should I vectorise the segmentated picture, obtain zonal statistics from the original image based on the segmanted polygons (ARCgis)? I heard many use this method, but how to classify the picture afterwards, since the result will be only in the table? btw. I know SPRING, MONTEVERDI, ORFEO, SAGA, those tools are not able to work on my huge set of data, and I do not have time to split my pictures in tiny elements...but ERDAS was able to segment and classify this size of data....


title: How to increase label size of OpenLayers plugin basemap layers?

text: For QGIS 2.2.0-Valmiera, how does one increase the label size of OpenStreetMap layer or any other basemap layer? Presently the labels are way too small to read. For example, I find that for the same zoom level of a map in www.openstreetmap.com vs the same map in QGIS2.2, the map in QGIS2.2 has labels much smaller than the one from www.openstreetmap.com. For illustration, click here: https://drive.google.com/file/d/0B27Gf4KIu-6-NFVhSV9zUFBDZGM/edit?usp=sharing


title: How can I convert a csv file of WKT data to a shape file using ogr2ogr?

text: This question is related to Shapefiles to Text. I have a csv file, with one column, where all the rows correspond to WKT POLYGON()'s:               WKT     POLYGON(...)     POLYGON(...)     ...      I'm familiar with how to convert from shp file to wkt, but I need to go the other way around. I tried playing around with ogr2ogr's settings/flags, but didn't really get anything useful. I also know I can use QGIS to do this, but it freezes/crashes since the dataset is fairly large. I'd appreciate any suggestions/advice.


title: QGis Print Composer: layer symbology not displayed

text: Exactly the same as this problem from way back, only I've had this from 1.8.0 to present (2.1.0 master). Yay, symbols: ![enter image description here](http://i.stack.imgur.com/jYLdn.png) Boo: no symbols, cue MS Paint: ![enter image description here](http://i.stack.imgur.com/kulku.png) Anyone know why this might be or have the same problem? Happens on Win7 & Ubuntu (& Xubuntu) 13.04. Cheers! EDIT: apologies for not checking, and cross posting. This issue raised on hug.qis.org (and can be subscribed to) here.


title: ArcGIS JavaScript problem with legend to show attributes

text: I'm running a geoprocessing task in my webapplication. When the task generated some results i destroy an existing legend and build up a new one that shows the legend for the resulting layers. That is my code so far               function gpJobComplete(jobinfo){             var mapurl = mapServiceURL + "/" + jobinfo.jobId;             var energy = new ArcGISDynamicMapServiceLayer(mapurl,{                 id:"Beste Energieformen",                 "opacity": 0.85             });                  map.addLayers([energy]);                       layerInfo.destroy();             domConstruct.destroy(dojo.byId("legendDiv"));             var legendDiv = domConstruct.create("div", {                 id: "legendDiv"             }, dom.byId("legendPane"));                       legendLayers.push({layer:energy, title:"Beste Energieformen", slider:true});             map.on("layers-add-result", function(){                 outputInfo = new TOC({                     map: map,                     layerInfos: legendLayers                 }, "outputDiv");             outputInfo.startup();             });         }      Now i want my legend to show me the name of an attribute, because the layer is rendering based on that attribute. But all i get in the legend is the name of the layers and not the corresponding attribute. All the layers use attributes from a field with the same field name to render.


title: Altering the order of attributes in a table

text: I have gone through a sequence of table joins. The resultant table should be with the attributes rearranged in more logical order. I cannot find this functionality within Arc GIS or any mention of it in Python For example, say a TableResultingFromJoins has the following attributes: v1,v2,v3,w1,x1 ... and I want it like this: v1,w1,x1,v2,v3 What do I do, please? Thank you.


title: Manipulating Interpolation Outputs

text: I would like to clip the edges of my interpolation output to cover only a specific Local Study Area and also combine the output with a DEM to create a spatially defined 3D model in ArcGIS 10.1. Two questions:   1. Is there an easy way to clip the study area boundary?   2. Can the interpolation output be combined with a DEM to create a 3D model?


title: Is there a way to automatically populate attribute values in Qgis?

text: We are using a Qgis/PostGis combo, where Qgis is used for adding features with attributes into a PostGis database. Is there a way to automatically fill the attribute data values with some project-specific constant values (Qgis project name, user name)?


title: Grid labels in ArcGIS, overlapping issues

text: I do have 3 grids made by Grids menu in data frame properties. I do need them to display in certain layout and also to behave accordingly to couple of rules (overlapping issues), so I can automate my production workflow. I figured that its not possible in the way I am trying to do now. As per this post. So what are my alternatives? Is there a way to access grid labels in the existing mxd document and modify them according to my needs? Probably its not possible with ArcPy, but maybe someone did it via ArcObjests (preferably in Python :) and would like to share some experience? As I do not have any of Arc's Production extensions, I guess ArcObjects are my only option, right? Any advice appreciated.


title: Iterating over all features in featureclass to intersect them individually with polygon using ArcPy?

text: I've got a point featureclass, and I'm trying to individually intersect each feature with a polygon featureclass to get some information about which polygon each feature is in. I did one intersect with an entire point featureclass against a polygon featureclass, which was straightforward, but I'm not grasping the model for doing the individual intersections. First attempt below:               # -*- coding: utf-8 *-*     # Name: IntersectingPolygon.py     # Description: Find intersecting polygon on a feature by feature basis          # Import arcpy and set path to data     import arcpy     import csv     arcpy.env.workspace = "C:/dev/FGDBs/test.gdb"     intersecting_polygon_layer = 'pg_lyr'     feature_layer = 'feature_lyr'     test_feature = 'some_feature'          # Make a layer of the polygons     arcpy.MakeFeatureLayer_management('polygons', intersecting_polygon_layer)          feature_rows = arcpy.SearchCursor(test_feature)          count_features = 0     for feature_row in feature_rows:         # This line fails, I think because you can't make a layer this way         arcpy.MakeFeatureLayer_management(feature_row, feature_layer)         arcpy.SelectLayerByLocation_management(intersecting_polygon_layer, 'intersect', feature_row)         polygon_rows = arcpy.SearchCursor(intersecting_polygon_layer)         print 'Feature Globalid:',feature_row.getValue('globalid')         for polygon_row in polygon_rows:             print '\tPolygon objectid:',polygon_row.getValue('objectid')              if count_features > 5:             break         count_features = count_features + 1


title: Intersection of two polyline geometries not returning expected coordinates?

text: T2B = arcpy.Array([arcpy.Point(1,2),arcpy.Point(-1, -2)])      L2R = arcpy.Array([arcpy.Point(0, 2), arcpy.Point(1, -2)])      L2R_line = arcpy.Polyline(L2R)      T2B_line = arcpy.Polyline(T2B)      cent = L2R_line.intersect(T2B_line, 1)     arcpy.AddMessage("X co_ordinate "+str(cent.X))      I am trying to find intersection of two polylines.Here is my sample code But this is not printing x cordinate of intersection point.I would like to know how to get x and y cordinates from "cent" object. Thank you In advance


title: How to fix quickly a lot of geometry validity errors in QGIS?

text: I am working on ownership data at a US county level. I have one shapefile per county that contains thousands of tax parcels. I need to dissolve the polygons representing parcels owned by the same individual. When the shapefile is not clean, the "Dissolve" tool in QGIS doesn't seem to work, it freezes. I have to fix the geometry validity issues first using the "Check Geometry Validity" tool. However, I have sometimes hundreds of errors. It takes a lot of time to fix them manually. Is there any other strategies that could save me some time? I am using QGIS 2.4.0.