title: Show progress i ArcGIS Engine 10 application

text: I would like to add a progress indicator to our ArcGIS Engine application. Like a progressbar in the statusbar to show when the MapControl is busy getting or drawing the map. I've been trying to find any resources in the documentation on how to do this, but all resources I find is pointing to the MxStatusBar that is only in the ArcGIS Desktop. Does anyone know which events I should be using to create my own progress indicator? Update: It's a standalone ArcGIS Engine Application. Built in VB.Net using WinForms. We've created the graphical animation for our busy indicator. So that we can start and stop the animation when there is progress. This was created using a dialog running in it's own thread because the MapControl block the redrawing of the form during it's draw phase. We've tried to hook up the busy indicator to AxMapControl1_OnBeforeScreenDraw and AxMapControl1_OnAfterScreenDraw events. But these events are thrown even when the map is repainted,for.ex. when a dialog is dragged over the map. We've also tried manually using the IMapControlEvents2 and it gives the same result. We have tried to add the IDisplayEvent but it only get triggered on start up not when we pan and zoom the map. Here is some code I used to test the events with:               'Declarations:           Private m_ActiveViewEventsAfterDraw As ESRI.ArcGIS.Carto.IActiveViewEvents_AfterDrawEventHandler         Private m_DisplayEventsDisplayStarted As ESRI.ArcGIS.Display.IDisplayEvents_DisplayStartedEventHandler         Private m_DisplayEventsDisplayFinished As ESRI.ArcGIS.Display.IDisplayEvents_DisplayFinishedEventHandler         Private m_MapControlEventsOnAfterScreenDraw As ESRI.ArcGIS.Controls.IMapControlEvents2_OnAfterScreenDrawEventHandler         Private m_MapControlEventsOnBeforeScreenDraw As ESRI.ArcGIS.Controls.IMapControlEvents2_OnBeforeScreenDrawEventHandler          'Form_Load          Dim mapControl As IMapControl4 = DirectCast(axMapControl1.Object, IMapControl4)             Dim map As IMap = DirectCast(axMapControl1.ActiveView, IMap)             m_ActiveViewEventsAfterDraw = New ESRI.ArcGIS.Carto.IActiveViewEvents_AfterDrawEventHandler(AddressOf OnActiveViewEventsAfterDraw)             AddHandler CType(map, ESRI.ArcGIS.Carto.IActiveViewEvents_Event).AfterDraw, m_ActiveViewEventsAfterDraw     m_DisplayEventsDisplayStarted = New ESRI.ArcGIS.Display.IDisplayEvents_DisplayStartedEventHandler(AddressOf OnDisplayStarted)             AddHandler CType(axMapControl1.ActiveView.ScreenDisplay, ESRI.ArcGIS.Display.IDisplayEvents_Event).DisplayStarted, m_DisplayEventsDisplayStarted                  m_DisplayEventsDisplayFinished = New ESRI.ArcGIS.Display.IDisplayEvents_DisplayFinishedEventHandler(AddressOf OnDisplayFinished)             AddHandler CType(axMapControl1.ActiveView.ScreenDisplay, ESRI.ArcGIS.Display.IDisplayEvents_Event).DisplayFinished, m_DisplayEventsDisplayFinished             m_MapControlEventsOnAfterScreenDraw = New ESRI.ArcGIS.Controls.IMapControlEvents2_OnAfterScreenDrawEventHandler(AddressOf OnAfterScreenDraw)             AddHandler CType(axMapControl1.Object, ESRI.ArcGIS.Controls.IMapControlEvents2_Event).OnAfterScreenDraw, m_MapControlEventsOnAfterScreenDraw             m_MapControlEventsOnBeforeScreenDraw = New ESRI.ArcGIS.Controls.IMapControlEvents2_OnBeforeScreenDrawEventHandler(AddressOf OnBeforeScreenDraw)             AddHandler CType(axMapControl1.Object, ESRI.ArcGIS.Controls.IMapControlEvents2_Event).OnBeforeScreenDraw, m_MapControlEventsOnBeforeScreenDraw               'Methods               Private Sub OnAfterScreenDraw(ByVal hDc As Integer)             Console.WriteLine("OnAfterScreenDraw")     End Sub                   Private Sub OnBeforeScreenDraw(ByVal hDc As Integer)             Console.WriteLine("OnBeforeScreenDraw")         End Sub              Private Sub OnActiveViewEventsAfterDraw(ByVal Display As ESRI.ArcGIS.Display.IDisplay, ByVal phase As ESRI.ArcGIS.Carto.esriViewDrawPhase)             Console.WriteLine("AfterDraw")         End Sub          Private IntDisplayStarted As Integer         Private Sub OnDisplayStarted(ByVal Display As IDisplay)             IntDisplayStarted = IntDisplayStarted + 1             Console.WriteLine("OnDisplayStarted " & IntDisplayStarted)         End Sub              Private IntDisplayFinished As Integer         Private Sub OnDisplayFinished(ByVal Display As IDisplay)             IntDisplayFinished = IntDisplayFinished + 1             Console.WriteLine("OnDisplayFinished " & IntDisplayFinished)         End Sub      Have also tried using the ILayerStatus by implementing the IStepProgressor callback on the MapServerLayer, but it was also a disapointment, it get triggered after the image has been fetched from the server. Does anyone know if there is an event that we can use that only get triggered when the Map is getting data form its datasource?


title: How to quickly show areas on a map (with openstreetmap?)

text: yesterday I wanted to quickly indicate some areas (lat/lon rectangles) on a map, like openstreetmap. And I couldn't figure out how to do it. Any suggestions? It doesn't have to be interactive, just a bitmap image of the map, with the areas showing as rectangles, would be fine. Thanks for your insight :)


We are developping a C# ArcObjects Class extension assembly. Our development machine was recently updgraded to ArcGIS 10, but when we try to install the assembly on a 9.3.1 machine, we get an R0000 error while registering the assembly with regasm. Is it possible to deploy on a ArcGIS 9.3.1 machine a component created with ArcGIS 10? Edit: We also develop a c++ ArcObjects library and we have no trouble deploying to a 9.3.1 machine Edit2: In our .NET project, the ArcGIS Assembly references where explicitly set to Version Specific : false Edit3: I learned that setting an Assembly reference to Version Specific : false is only relevant to the development environment. It has nothing to do with which assembly is loaded at runtime.


title: Arcgis Server vs Open Source software

text: What do you think what are the advantages and disadvantages (of both)? Of course appart from fact that open source software is free to use. I mean rather somethink like capabilities, functionality, workload to GIS servers, easy to use etc.


title: what is the right way to delete all features from featureLayer

text: I have a `featureLayer` and I don't want to kill it and create another one. I want to delete all features from the current featureLayer. I found that I can use `applyEdits` method but in order to use it I need to have all features I want to delete. Whilst I don't want to store them separately. Do you know a better way to empty my featureLayer when using the ArcGIS Javascript API?


title: Blank Environments Setting Dialogue Box

text: When I right-click inside a clear area of ArcToolbox and select Environments, the Environments Setting dialogue box is blank. The only items available are the buttons on the bottom to close, etc. I am running W7, ArcInfo with SP2 installed, MSMXL 4.0 SP3. I have done a clean uninstall and a reinstall of ArcInfo w/SP2. I have contaced ESRI Tech Support, but no solution yet.


title: WebADF 931 to 10 migration issues

text: I am in process of migating a web ADF 931 application to WEBADF 10. The application uses some samples from ESRI forum/samples. I am curious if there are versions of these files available within WebADF 10 environment. it seems like these are designed to work with 931 web controls. Appreciate any feedback. Thanks Jay # Referenced libraries: <%@ Register Assembly="gridResults, Version=1.3.0.0, Culture=neutral, PublicKeyToken=4117b0729e6ae73a" Namespace="esri_samples" TagPrefix="esri_samples" %> <%@ Register Assembly="PrintTask_VBNet, Version=2.0.0.0, Culture=neutral, PublicKeyToken=2a7e7966c16048d7" Namespace="PrintTask_VBNet" TagPrefix="printTaskVB" %> <%@ Register Assembly="WorldViewSolutions.ArcGISServer.WebControls.FeatureSearch" Namespace="WorldViewSolutions.ArcGISServer.WebControls.FeatureSearch" TagPrefix="wvs2" %> # These are the errors I am getting: Unable to create type 'esri_samples:gridResults'. Could not load file or assembly 'ESRI.ArcGIS.ADF.Web.UI.WebControls, Version=9.3.1.3000, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The system cannot find the file specified. Unable to create type 'wvs2:FeatureSearchTask'. Could not load file or assembly 'ESRI.ArcGIS.ADF.Web.UI.WebControls, Version=9.3.1.3000, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The system cannot find the file specified. Unable to create type 'oat:OpenAttributeTableTask'. Could not load file or assembly 'ESRI.ArcGIS.ADF.Web.UI.WebControls, Version=9.3.1.3000, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The system cannot find the file specified.


title: CartoDB server doesn't show any data on maps

text: I am trying to install a CartoDB server on my computer and I am experiencing several problems. Currently I can access my server with the URL development.localhost.lan:3000, and I can create new tables. But when I want to show the table data (with upper-left Table button), nothing but an error message "Error loading rows, check your SQL query" is displayed. When I want to get the map view, an error message "There is a problem with your connection" appears. I tried to debug it with Firefox extension Firebug, and I can see that HTTP requests to development.localhost.lan:8080 (GET /api/v1/sql?...) and development.localhost.lan:8181 are aborted, but I don't know why. Also, I don't know if it is linked but when I try to execute the commande "bundle exec foreman start -p 3000" I get an error, but when I lauch in separate terminals Redis server, Resque and Rails server, everything seems to be fine. Here is the error I get : 13:54:11 tiler.1 | module.js:356 13:54:11 tiler.1 | Module._extensions[extension](this, filename); 13:54:11 tiler.1 | ^ 13:54:11 tiler.1 | Error: libmapnik2.so.2.0: cannot open shared object file: No such file or directory 13:54:11 tiler.1 | at Module.load (module.js:356:32) 13:54:11 tiler.1 | at Function.Module._load (module.js:312:12) 13:54:11 tiler.1 | at Module.require (module.js:364:17) 13:54:11 tiler.1 | at require (module.js:380:17) 13:54:11 tiler.1 | at Object. (/home/pi19/src/Windshaft- cartodb/node_modules/mapnik/lib/mapnik.js:15:14) 13:54:11 tiler.1 | at Module._compile (module.js:456:26) 13:54:11 tiler.1 | at Object.Module._extensions..js (module.js:474:10) 13:54:11 tiler.1 | at Module.load (module.js:356:32) 13:54:11 tiler.1 | at Function.Module._load (module.js:312:12) 13:54:11 tiler.1 | at Module.require (module.js:364:17) 13:54:11 tiler.1 | process terminated Thank you in advance for your help.


title: Temporal Analysis Tool: Seeking

text: I am looking for an alternative tool (proprietary or FOSS) that matches the functionality of Temporal Analyst for ArcGIS by  DHI Software. The best I could get was the QGIS plugin  Time Manager  whose functionality I perceive is more for visualisation than analytical (similar to esri's Time Slider.) [ _Data Analysis - the Temporal Analyst for ArcGIS offers a suite of tools for data analysis and processing, incl. basic statistics and arithmetics, time step resampling, gapfiling, distribution and CDF plots, duration curves, double mass and double scatter._ ] I am not a statistician nor hardcore developer so the more the "point and click" I can get the better. Thank you for all the pointers.


title: Opening TileMill from Ubuntu launcher after building from source

text: I build TileMill from source following this tutorial. Now I can open it by going to the folder `cd ~/tilemill` and run `node index.js`. This all works fine. But I want to open it using the Ubuntu launcher. What do I have to change to do that? I am on Ubuntu 13.10 and use TileMill Version 0.10.1


title: Geoserver / SLD multiline lables not working?

text: for several hours Im trying to create a multiline label for a line. I use Geoserver 2.5, the line is in postGIS, the style is very simple :               <?xml version="1.0" encoding="UTF-8"?> <sld:StyledLayerDescriptor           xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">   <sld:NamedLayer>             <sld:Name>Borders_1fe760e8</sld:Name>             <sld:UserStyle>               <sld:Name>Borders_1fe760e8</sld:Name>               <sld:Title>Borders</sld:Title>               <sld:IsDefault>1</sld:IsDefault>               <sld:FeatureTypeStyle>                 <sld:Name>name</sld:Name>                 <sld:Rule>                   <sld:Name>rule1</sld:Name>                   <sld:Title>Title 1</sld:Title>                   <sld:Abstract>-</sld:Abstract>                   <sld:LineSymbolizer>                     <sld:Stroke>                       <sld:CssParameter name="stroke">#FF0000</sld:CssParameter>                       <sld:CssParameter name="stroke-width">2</sld:CssParameter>                     </sld:Stroke>                   </sld:LineSymbolizer>                   <sld:TextSymbolizer>                     <Label>                       <ogc:PropertyName>Name_1</ogc:PropertyName><![CDATA[     ]]><ogc:PropertyName>Name_2</ogc:PropertyName>                     </Label>                     <sld:Font>                       <sld:CssParameter name="font-family">Tahoma</sld:CssParameter>                       <sld:CssParameter name="font-size">16</sld:CssParameter>                       <sld:CssParameter name="font-style">normal</sld:CssParameter>                       <sld:CssParameter name="font-weight">normal</sld:CssParameter>                     </sld:Font>                     <sld:LabelPlacement>                       <sld:PointPlacement>                         <sld:AnchorPoint>                           <sld:AnchorPointX>0.0</sld:AnchorPointX>                           <sld:AnchorPointY>0.5</sld:AnchorPointY>                         </sld:AnchorPoint>                         </sld:PointPlacement>                     </sld:LabelPlacement>                     <sld:Fill>                       <sld:CssParameter name="fill">#FF0000</sld:CssParameter>                     </sld:Fill>                     <sld:VendorOption name="followLine">true</sld:VendorOption>                   </sld:TextSymbolizer>                 </sld:Rule>               </sld:FeatureTypeStyle>             </sld:UserStyle>   </sld:NamedLayer> </sld:StyledLayerDescriptor>      yet I am unable to see the lables 1 and 2 on two lines - they always end up on the same line. I tried :   * SLD - CDATA with line break (as seen above)   * SLD - CDATA with `<BR>` tag   * SLD - use only one field, POSTGIS field value with \n (value1\nvalue2)   * SLD - use only one field, POSTGIS field value with `<br>` tag (value1`<br>`value2) and many other permutations of above, i copy-pasted the code, typed it, used geoserver style editor, typed it manually into xml file directly on the server, but I wasnt able to produce two line label. I did try all the tricks I was able to find via google. What am I doing wrong ? Or is it some known Geoserver bug ?


title: geoserver and its layer is pointing(base url) to other server(hosting server) not my domain url

text: 1. i am using Geoserver 2.4.4.my geoserver url is http://links-map.com/geoserver/web/ but when i click to loging button of geoserver its url is changed http://vmx15978.hosting24.com.au:8080/geoserver/web/ means after pressing the loging button geosver pointing to my hosting server url i.e http://vmx15978.hosting24.com.au/ 2.second issue is on layer preview when i see the the source path of layer by inspect element i fount the layer is also pointing to my server url(http://vmx15978.hosting24.com.au/) not my domain url(http://links- map.com/). why my geoserver is pointing to my hosting server(http://vmx15978.hosting24.com.au/) i am using dedicated server Centos 6.4 which url is http://vmx15978.hosting24.com.au/ and Apache tomcat server 7.0.42 i want my geosver on my domain path( http://links-map.com/geoserver/web/) all its thing layer preview ,other on the same url (http://links-map.com). not my hosting server url . So please any body can suggest me where i can fix this problem how can i set GeoServer on http://links-map.com/ I am giving the screen shot url of this please see the screen shot http://links-map.com/error.png Please suggest me. Thanks


title: Singapore postal boundaries

text: does anyone know where to get GIS data for Singapore postal boundaries? I need a shape or KML file which I can then overlay onto google maps to show a neighbourhood break down of Singapore. Any help would be appreciated. Regards


title: fitBounds on points after feature selection

text: I am trying to follow some of the examples I have found here and in Google Groups about fitBounds for points. Most of the examples are for polygons and don't seem to work for points. I think I've tried just about every combo of syntax that generally looks like the following:                var sql = cartodb.SQL({ user: 'username' });           //feature selection buttons:      $('.button').click(function(e, latlon, lat, lng, pxPos, data, layer) {             $('.button').removeClass('selected');        $(this).addClass('selected');             //I think I need to include an sql statement with lat and lon to get bounds, but I could be wrong:        //sql.execute("SELECT cartodb_id, name, ST_X(the_geom) lon, ST_Y(the_geom) lat FROM table_name WHERE name = " + $(this).attr('selected'), function(ret) {             var swLat = map.getBounds().getSouthWest().lat,            swLon = map.getBounds().getSouthWest().lng,            neLat = map.getBounds().getNorthEast().lat,            neLon = map.getBounds().getNorthEast().lng,                 //fitBounds works with manual inputs (below)            southWest = L.latLng(40.56, -112.05),            northEast = L.latLng(40.77, -111.8),                 //...**but not with this part**            //southWest = L.latLng(swLat, swLon),            //northEast = L.latLng(neLat, neLon),                 bounds =  L.latLngBounds(southWest, northEast),             map.fitBounds(bounds);             LayerActions[$(this).attr('id')] ();           });      I would be grateful for any feedback on this, or examples of fitBounds for points and not polygons. Here is the jsbin, annotated to the best of my ability: http://jsbin.com/hunovumu/38/edit


title: Please clarify whether I need a Bing api key for this app

text: In my application I need to use Bing maps as a base map. http://svn.openlayers.org/branches/openlayers/2.11/examples/bing.html(open in IE) I followed this example. For this there is no bing key is added in that example. Only they included below .ashx file... Can I include this .ashx (http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2&mkt=en-us) file ? In that .ashx file ther is credentils="some key is there" , so thats y i got the doubt.. Can I use it legally? Please clarify my doubt ?? Any help is greatly appreciated..


title: Compare line with next line in attribute table shapefile

text: I am making a python code for ArcGis 9.3. The aim is to compare the value of my field "ID_BV" at line l with value of field "ID_BV" at line l+ 1. And depending of the test answer i populate another field or not. The problem look very simple : i don't know how can i acces to line l+1. I try to put twice : rowNext = rows.Next() rowNext = rows.Next() With row my line and rowNext the next line. But it doesn,t work. I also try a lot of other thing like that but it doesn't work. The entire code is as follow :               import sys, string, os, arcgisscripting, glob     gp = arcgisscripting.create()          # Set a toolbox     gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")          MyShape = "C:\Users\marie.kremer\Desktop\Fabrication_Hydrogrammes\CalculMoyenne\\Test_Inter.shp"          gp.addfield (MyShape, "Moyenne", "double")          #Initialisation de variables     Somme = 3     #Position du curseur dans Mysghape     rows = gp.UpdateCursor(MyShape)     row = rows.Next()     rowNext = rows.Next()     rows.updateRow(rowNext)     rowNext = rows.Next()          gp.AddMessage(Somme)          while row:         ID_BV = row.GetValue("ID_BV")          ID_BV_Next = rowNext.GetValue("ID_BV")              gp.AddMessage("ID_BV")         gp.AddMessage(ID_BV)         gp.AddMessage("ID_BV_Next")         gp.AddMessage(ID_BV_Next)              if ID_BV == ID_BV_Next :                  gp.AddMessage("Entrée dans le IF")                  Somme = Somme + row.GetValue("AfoisF10p6")               else :                  gp.AddMessage("Entrée dans le Else")             Somme = Somme + row.GetValue("AfoisF10p6")              row.SetValue("Moyenne", Somme)             Somme = 2              rows.updateRow(row)         rows.updateRow(rowNext)         rowNext = rows.Next()         row = rows.Next()      Thanks a lot ;)


title: gdal2tiles.py generates wrong tiles / MapTiler the right ones

text: I'm trying to generate tiles with gdal2tiles.py and the resulting tiles are stored as `18/132639/164219`. If I do the same thing with MapTiler (the GUI variant of gdal2tiles) the tile result is `18/132639/97923`. I want the results from MapTiler (97923), but just with gdal2tiles, as I want to do this in a batch process and not with a GUI. I tried a lot of things already, warping, translating, whatever, and it's getting very annoying, especially as it says that MapTiler is just a graphical interface for gdal2tiles and does basically the same.               gdal2tiles.py -z 17-19 -s EPSG:900913 -p raster overlay-level1.png     gdal2tiles.py -z 17-20 -s EPSG:3785 overlay-level1.png     gdal2tiles.py -p geodetic -s EPSG:4326 -z 18-21 -w none overlay-level1.png      Most of those result in an `ERROR 5 Access window out of range in RasterIO()` or `ERROR 5: Illegal values for buffer size`. This one works, but results in the wrong Y values:               gdal2tiles.py -s EPSG:4326 -z 16-19 -w none overlay-level1.png      Any ideas what's wrong there?


title: QGIS Render shape when partially of screen

text: I am rendering a census area, a polygon the source of which is kmz file. THe shape only renders when the entire extent is visible on the screen. If I zoom in so some of the polygon extent is off screen, it no longer renders. This is a problem because i'm looking at the edge of the shape when overlayed with other line and shape data. I'm a GIS newbie; any help appreciated. I'm using QGIS on Win7, full details below. OS Win 7 Pro QGIS version 1.8.0-Lisboa QGIS code revision f440b60 Compiled against Qt 4.7.1 Running against Qt 4.7.1 Compiled against GDAL/OGR 1.9.2 Running against GDAL/OGR 1.9.2 GEOS Version 3.3.6 PostgreSQL Client Version 8.3.10 SpatiaLite Version 3.0.1 QWT Version 5.2.1 This copy of QGIS writes debugging output.


title: GIS data backup strategy

text: Is there any backup strategy for GIS data? Say .mxd, shape files, data base connection files, feature layers, geo- database etc. According to ideal methodology: 1.On external hard drive : best to take backup of all folders and sub folders. 2.Working on ArcGIS JSAPI so taking daily backup on CVS Similar fashion what would be the recommended backup strategy for GIS Data? We are using ESRI and open source platform (Desktop and server based + spatial database) Any help would be great!!


title: Converting total station points to cartesian coordinates

text: I have a set of points which have been downloaded from a total station instrument. These data points are already in excel sheets and the issue now is how to convert these points (easting, northing and elevation) to cartesian coordinates in order to use for modeling purposes. Thanks.


title: Export styles from ArcGis to a .map file

text: How to export styles from ArcGis 9.3 (or 10) to a .map file. Is it possible?


title: Converting Longitude and Latitude Coordinates to Square Miles?

text: I have a set of Long and Lat co-ordinates making up a five point polygon which I have converted in excel using the following formula: =((X1*Y2)-(X2*Y1)+(X2*Y3)-(X3*Y2)+(X3*Y4)-(X4*Y3)+(X4*Y5)-(X5*Y4)+(X5*Y1)-(X1*Y5))*0.5 *Replacing X,Y with cell references of course. This gives me a negative number but how do I convert this number to square miles or kilometres?


title: How to use OS Terrain 50 in QGIS

text: I am new to GIS and I wish to perform view shed analysis of wind turbines from a DEM. I have downloaded OS Terrain 50 and the data is contained within numerous zipped folders. I am using a Mac with OS X Mavericks and I would like to know how to unzip all the data and merge them into one file for QGIS? Thanks in advance for any help.


title: Arcmap: transform an image from Web Mercator Projection to Simple Cylindrical (Plate Carree) projection

text: I have an image that is projected using the Web Mercator projection. Does anybody know how to transform (in Arcmap) this image from the Web Mercator projection to the Simple Cylindrical (Plate Carree) projection?


title: Is there an equivalent to ST_Rotate in spatialite?

text: I'd like to do some arbitrary rotation of spatial objects in spatialite (accessed through QGIS). In PostGIS I'd use something like:               ...     SELECT geom AS ST_Rotate(geom, radians, originX, originY)      Is there an equivalent in spatialite? * * * Edit: after the answer and some more research, managed to find a way of mimicing `ST_Rotate` using `ShiftCoords` and `RotateCoords`, rotating by 45° around the centroid in the example below:               SELECT ShiftCoords(RotateCoords(ShiftCoords(GEOMETRY,       -X(Centroid(GEOMETRY)), -Y(Centroid(GEOMETRY))), 45),       X(Centroid(GEOMETRY)), Y(Centroid(GEOMETRY))) AS geom from TABLE


title: Disapearing features after specific zoom degree in ArcGIS 10.2

text: I have faced a Problem during my Analysis. I have some Polygon Features and after up to specific degree they would be disapeared. I have checked all the Setting and no zoom degree in defined. What could be the reason?


title: Distribute Hotel Beds According to Population Density in Buffers using ArcGIS for Desktop?

text: I am running an ArcGIS for Desktop analysis where I am plotting competing hotel facilities and then distributing their beds in a 5-mile buffer around the site. I would like to distribute the beds such that they are distributed according to where the population resides within that 5-mile radius, as opposed to evenly across the buffer. That way, when I run an intersect - if the buffers overlap on top of a densely populated area, it will pick up more beds than if the same area overlapped on top of a sparsely populated area. Any ideas?


title: GeoToolKit conversion from lat/long to UTM

text: What is the proper way to convert lat/longs to a UTM coordinate system using the Java geotoolkit API? I have not worked with GIS software before, so maybe what I am trying to do is not directly possible. I found a few tutorials, but nothing with the full solution.


title: Are there GUI resources for gdal and ogr?

text: For those who are new to the programming side of GIS, I feel that a lot of great tools and resources are inacessible. I am interested in GUI based wizards for handling geoprocessing with libraries like gdal and ogr. Any tips?


title: Saving Interpolation data in a shapefile as an alternate to Raster Output

text: Is there a possibility that we store our interpolation data in a shapefile instead of a raster image, so that the shapefile can be used to display the Interpolation as a replacement to the RASTER OUTPUT. Also I intend to use such a shapefile in a HTML webpage with hover effects, so that if a hovers the mouse over some points, they can see the value at the location in a pop-up.


title: OpenLayer Maps not zooming

text: Initially the map zoom is set to 8, and that's the only place in the code i can change the zoom, any other location doesn't work. I have a function that draws a marker and a route on the map (works just fine) but i can't change the zoom on that part. When i try to change the zoom using `map.zoomTo(n)` it just zooms to maximum and `map.setCenter(new OpenLayers.LonLat(lon, lat), zoom)` also doesn't work. I am trying to zoom the map after i have redrawn poly layer and marker layer. Does anyone have any idea what could be done here?


title: Trial Version ArcEditor 10.0 Maplex question

text: I have the Trial Version for ArcEditor 10.0 with the extensions. Using Maplex/Labeling Manager, after clicking Property, I go to "FITTING STRATEGY". all the lables (stack, overrun, reduce font size, etc..) are all ghosted. I am not given an option to check/uncheck or make changes to anything on that page, nor LABEL POSITION / CONFLICT RESOLUTION pages. While in Trial, are you restricted what you can do? I thought you were able to use the full Maplex extension, or am I mistaken? What are my options, if any to make these areas workable? Thanks, Z ![enter image description here](http://i.stack.imgur.com/Jb3af.jpg) ![enter image description here](http://i.stack.imgur.com/aJEGY.jpg)


title: how to start qgis with --configpath option on windows

text: how can I start QGIS on Windows 7 with the --configpath option? I'm used to work with Linux where this procedure is very very simple (just write in a terminal **qgis --configpath** ) with all the options. Someone knows how to do the same thing on windows?


title: Path Distance calculation limited to downhill only

text: I am trying to calculate a path between two points with a relative elevation difference of about 100m and 3km separation. The points represent the start and end of a gravity fed waste water pipe. Essentially the path should follow the contours and have a consistent gradual fall. I have run the Esri Path Distance tool using Slope and DEM as cost and input surface (respectively) with the DEM as the vertical input as well using default values. The resultant path minimises slope but I also want it to only travel downhill. Can someone explain how to control the vertical factor parameters to only calculate a downhill path. The Esri help has not really described this.


title: Statistical Analysis of Shapefile Proximity within Raster Image - ArcMap10.1

text: I have a raster image that has been reclassified into 15 equally incremented values/levels. This raster represents "sinkhole risk" in a certain county. So level 1 is the lowest risk region and level 15 is the highest risk region. I also have the shapefile data for the actual sinkholes existing in that county. My hope is to come up with some method of statistically analyzing the data by answering the following question: **"What percentage of the sinkholes are in the risk regions 1-3?"** or **"What percentage of the sinkholes are in the risk regions 4-6?"** etc... Any suggestions on a tool to use or a general approach? I just need some guidance in the general right direction! Thank you. PS: I posted a photo below for more clarity if it helps! The photo has been simplified into 3 values/levels, but my real map has 15 values. ![Photo Explanation](http://i.stack.imgur.com/beoOr.jpg)


title: Inline variable substitution in ModelBuilder iteration to Make NetCDF Raster Layers?

text: I'm trying to convert lots of annual NetCDF files into rasters using ModelBuilder. I'm iterating over several years so the filename changes every year which works fine (using the inline substitution like %year%). Unfortunately, the variable name within the NetCDF files changes every year as well. So when I'm changing the variable name inside the "Make NetCDF Raster Layer" tool to "something_%year%" the tool won't accept it. Is there an easy workaround?


title: Create Fantasy Map

text: I'm currently looking to create a Fantasy map and share it with my friends. We have the map designed already in flash to certain degrees of detail and able to export as a vector. We'd like it to be usable as something like Google Maps, able to zoom in to show greater levels of details. Searching for locations...etc would be an added bonus. We've been looking into Leaflet and Open Street Maps, but seem to be a little confused and overwhelmed. Can anyone suggest some simple to use software where we may be able to import our vectors and build upon them? Online or offline.


title: Analysis of positioning polygon on polygon using ArcGIS

text: ![enter image description here](http://i.stack.imgur.com/CmJWI.jpg)This might be a really complex analysis and I'm not entirely sure how possible it is but it is worth a shot. Is it possible to do analysis of positioning between either a "polygon and polygon" or "point and polygon"? Basically I have a polygon that delineates a boundary and I have another polygon that shows a building footprint and I want to know whether or not I can fit another building within this boundary. Of course the position of the existing structure plays a critical role in determining the possibility of adding a second structure. I have my doubts about doing this analysis as there could be any number of complex variables in determining whether or not a second structure would fit (ie. shape and size of the first building, shape and size of the second building, shape and size of the boundary etc...) Complete shot in the dark but wondering if anyone has ever done anything like this?


title: Are there better climate data than Worldclim for Europe?

text: I am looking for the best available climate data in Europe. Worldclim seems to be the best source of information for global data, but I am wondering if there is a higher resolution (better than 1km cell size and/or 1 month temporal resolution) product in Europe. (I've seen on this site that PRISM is great for the USA, but I couldn't find anything similar for Europe). EDIT : my purpose is to use the dataset for ecological modeling. EDIT: if you use another dataset, I am very interested in knowing why it is used instead of worldclim.


title: How to get Network Analyst data from script file back into Model Builder?

text: I am running a script which takes some input parameters and runs some Network Analyst processes. The script is imported into a toolbox and is setup in Model Builder with the necessary input and output parameters. My problem is that I am struggling to understand how to get the resulting Solve operation back out of the script and into Model Builder for subsequent work. Here is my script:               # Import arcpy module     import arcpy          # Check out any necessary licenses     arcpy.CheckOutExtension("Network")          # Script arguments     Network_Dataset = arcpy.GetParameterAsText(0) # Network dataset layer          Input_Locations = arcpy.GetParameterAsText(1) # Layer file          Output_Path = arcpy.GetParameterAsText(2) # Output path          # Local variables:     #Solve_Succeeded = Network_Analyst_Layer__3_     #Output_derived_feature_class = Network_Dataset          arcpy.AddMessage("Creating the Origin Destination layer...")          # Process: Make OD Cost Matrix Layer     arcpy.MakeODCostMatrixLayer_na(Network_Dataset, "odMatrix", "Length", "100", "", "", "ALLOW_UTURNS", "", "", "", "NO_LINES", "")          arcpy.AddMessage("Calculating Locations. This may take a while...")          # Process: Calculate Locations     arcpy.CalculateLocations_na(Input_Locations, Network_Dataset, "500 Meters", [["Streets","SHAPE"],["Streets_ND_Junctions","NONE"]] , "MATCH_TO_CLOSEST", "", "", "", "", "", "", "", "", "", "INCLUDE", "")          arcpy.AddMessage("Adding locations to Origin Destination layer...")          # Process: Add Locations to Origins Sub-Layer     arcpy.AddLocations_na("odMatrix", "Origins", Input_Locations, "", "500 Meters", "", "", "MATCH_TO_CLOSEST", "APPEND", "", "", "INCLUDE", "")          # Process: Add Locations to Destinations Sub-Layer     arcpy.AddLocations_na("odMatrix", "Destinations", Input_Locations, "", "500 Meters", "", "", "MATCH_TO_CLOSEST", "APPEND", "", "", "INCLUDE", "")          arcpy.AddMessage("Starting Network Analysis solve...")          # Process: Solve     arcpy.Solve_na("odMatrix", "SKIP", "TERMINATE", "")          arcpy.AddMessage("Network analysis completed.")          # How to get this out of script???          # Return as model output parameter     arcpy.SetParameterAsText(3, outputTable)


title: cql_filter for fid

text: when i run this code:               http://****/geoserver/Kaski/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Kaski:PIN&maxFeatures=50&outputFormat=json&cql_filter=(fid=97)      i got this error :               <ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">     <ServiceException code="InvalidParameterValue">Illegal property name: fid</ServiceException>     </ServiceExceptionReport>      but i need to filter with fid. How can i do that ?


title: NetCDF file size calculation

text: I'm planning to use the NetCDF file format for storing my time-series observation data on a server. I would like to use the "NetCDF-CF" conventions. Before I start writing any scripts for importing data from my SQL Server database to NetCDF, I'd like to make an estimate of the disk space requirements for the NetCDF file. My data looks like this   * 1000 stations (each station has ID, Latitude, Longitude, Elevation)   * 10 quantities (for example, air temperature, air pressure,   precipitation..)   * 10 years of data with hourly time resolution, that is 10 years*365 days*24 hours = 87600 hours per station and quantity   * the observation data value fits in 4-byte integer (if it's a decimal number then I can scale the value to integer.) So I need 10 years*365 days*24 hours*4 bytes = 350400 bytes per station and quantity.   * I presume that I also need to store the "time" information somewhere in a suitable format. Usually 8 bytes is enough to store a time value, so I need 10 years*365 days*24 hours*8 bytes = 700800 bytes for the time column. Now calculating the NetCDF file size: ( [1000 stations] * [10 quantities] * [87600 hours] * [4 bytes per value]) + [700800 bytes for time] = 3504700800 bytes = 3.264 Gigabytes total Is this roughly correct? Or does NetCDF have any significant "storage overhead" like most relational databases do (for example in Postgres there is a 23 byte overhead per data row or in MSSQL it's 7 extra bytes per data row)?


title: FME - Can I write back into my original file geodatabase

text: I have a gas pipeline network which I have stored in an File Geodatabase as polylines. I've created an FME workspace to split the pipelines at fittings (valves, reducers, tees, etc) which are stored as point features. This effectively creates smaller line segments when a fitting overlaps a pipe. My question is: can I have FME remove my original pipes and replace them with my split lines? Or do I have to write to another geodatabase and then cut/paste back into the original file? Please note, I am using a tester to query out only a certain area, so I don't want to replace all of the pipes, just the area I'm working on. I'm relatively new to FME and appreciate any input. Thanks, Rob


title: How do I save an ArcMap map document using VB.Net?

text: I am trying to save the map document that is currently open. How do I write the code? I have tried many suggestions that I found using Google searches, but nothing works. Currently I have: Dim clickedDoc As IMapDocument = My.ArcMap.Application.Document   clickedDoc.Save(True, False) which causes ArcMap to crash. I did get it to work with some other code, but it wouldn't actually save. Also, this should be a background job. So no save dialog should come up.


title: Interactive geographic region definitions

text: ## Background An organization has regions within a province, but has no list of coordinates that define region boundaries. I would like to draw custom polygon areas on a map using a web-based and user-friendly interface (such as Google My Maps or Scribble Maps). The regions are for data aggregation. ## Technical Maptitude and OpenGeo are being considered for the final GIS application. The database will likely be PostgreSQL running PostGIS. ## Question What open-source tool would you use to define the coordinates by drawing polygons on an interactive map? That is:               Browser -> Map -> Polygons (shared boundaries) -> Export      If the export step (to PostGIS) was performed automatically, so much the better. A cross-browser solution (IE8, FF, Chrome, Safari) with a working demo would be most helpful. ## Related Links   * http://stackoverflow.com/questions/2325670/draw-polygon-using-mouse-on-google-maps Thank you!


title: Issues importing feature class to SDE SQL Server 2012

text: I have received an error indicating there could be issues with my geometry when attempting to import a feature class into SDE. I ran the check geometry tool. No issues.   I have removed all fields except for my lat/lng, which is a double type, my geometry type, which is point, and objectID.   When doing this, the feature class imports without error. What could be the issue? My first guess is having to do with Nulls? When an objectID doesn't allow null values, does this mean that the feature should be free from nulls in other fields also? I am using ArcGIS 10.2 and sql server 2012 for my SDE connection.


title: Why is ArcMap leaving connections "<IDLE> in transaction"?

text: The TL;DR version: When you use ArcMap Query Layers to access a PostgreSQL table, ArcMap's database connections are almost always sitting idle in unclosed transactions. Why would this be? I have PostgreSQL 9.1.x (with PostGIS 2.0.x) with some existing tables and data. I successfully use ArcMap (10.1 SP1) to connect to one of those tables (using a Query Layer) and render dots on my map. The ArcGIS enterprise geodatabase tables are not installed. One day I brought up pgAdmin's server status window while ArcMap was running (and nothing else was accessing the database). As expected, there are two connections whose application name is "`ArcSDE(sv=nnnn;sn={xxx})`". But I was surprised to see that both of those connections are listed as "<IDLE> in transaction" in pgAdmin's "Query" column. That seemed fishy. As a rule of thumb, it's generally bad to leave lingering open transactions. And as a programmer, I've witnessed first-hand the dangers of improper failure handling that leaves unclosed transactions. So I closed everything down, restarted PostgreSQL, then started ArcMap again. Same result: two connections, both of which are "<IDLE> in transaction". I cranked up the PostgreSQL statement logging and watched as ArcMap did its magic. Sure enough, the very last statement in the log (once the ArcMap window finishes rendering) is `BEGIN`, with no corresponding `COMMIT` or `ROLLBACK`. And then every time you pan or zoom, the very first thing it does is `COMMIT`. Then it gets all the data and ends its rendering with an un-closed `BEGIN` again. At first glance, it appears benign. Those two connections hold no locks other than the locks on their own virtual transaction IDs. But it sure seems odd. Any ideas what legitimate reason ArcMap might have for behaving this way?


title: Shapefile to Network xml

text: I have a shapefile representing the US freight highway network available from Oak Ridge National Lab. I'm trying to prepare this as a `.xml` network for processing with MATSim. The output structure is very simple, something like               <?xml version="1.0" encoding="UTF-8"?>     <!DOCTYPE network SYSTEM "http://www.matsim.org/files/dtd/network_v1.dtd">     <network name="VISUM export national network 2007-11-28">          <!-- ====================================================================== -->              <nodes>             <node id="1000" x="730065.3125" y="220415.9531" type="2" origid="1000" />             <node id="1001" x="731010.5" y="220146.2969" type="2" origid="1001" />             .....         </nodes>          <!-- ====================================================================== -->              <links capperiod="01:00:00" effectivecellsize="7.5" effectivelanewidth="3.75">             <link id="100365" from="226" to="227" length="921.0" freespeed="33.3333333333333" capacity="5600.0" permlanes="2.0" oneway="1" modes="car" origid="183" type="10" />         ...         </links>     <!-- ====================================================================== -->          </network>      Most users of MATSim pull data from OpenStreetMap using `osmosis`, but I have to use _this_ network for a variety of reasons. I have seen lots of suggestions in different places as to what I might try. Some of these include:   1. `v.net` in GRASS   2. `shp2pgsql` suggested by pgRouting tutorial   3. manually with pgRouting, though this advice may be outdated?   4. writing code through the `sp` and `rgdal` libraries in R to build a node and link structure.   5. find someone with a TransCAD license to export the network ORNL provides along with the shapefile, though I don't know TransCAD exports to `.xml`. It seems that with options 1 - 3, I'll then have to figure out a way to write the `.xml` from the database. Option 4 seems difficult, but mainly in terms of my time. I'm happy to learn something new, but I don't want to invest a day towards option 1 only to find that option 3 would have been better. Or is there a simpler way? * * * Post-script: Someone asked the MATSim developers if they had a tool to do the `shp -> xml` conversion, but the answer was that shapefiles are too wild to build one.


title: SearchCursor (arcpy.da), accessing data on joined tables

text: Can you access joined tables through a da.SearchCursor? I've found documentation to do this with SearchCursor (arcpy), but nothing for the 10.1 data access module.


title: Geoserver, openlayers and WMS

text: I have millions of seismic lines to publish on a map (3,000,000+) so WFS is not really an option at a large scale. For this reason I will have to use WMS. My question is, is it possible using Geoserver as the engine and OpenLayers (latest versions) to present a map and allow the end user to click on an item and highlight the item? Basic map functionality I would have thought. There is a demo on the OpenLayers website but it appears this is the only example that does not work :( http://openlayers.org/dev/examples/getfeatureinfo-control.html Thanks, Chris


title: Creating perimeter around multiple polygons using ArcGIS for Desktop?

text: This may have a simple answer that I'm just missing. I have multiple polygons in one shapefile I would like to make a larger Polygon around all of them. Is there a tool that is able to do this? Or even a Polyline would work if that is not possible, I can always do the Feature to Polygon tool after. The images below better explain what I am looking to do (second is just a quick polygon I drew in a few seconds). It is in order to show different sales areas for my company. ![Polys](http://i.stack.imgur.com/PwhC9.jpg) ![enter image description here](http://i.stack.imgur.com/vsZTu.jpg)


title: How do I perform a 3 parameter geotransformation and projection in Sql Server 2012?

text: I have a table with latitude longitude (NAD27) columns in it. I compute two other columns, X and Y, representing Web Mercator (WGS84) location. Currently I'm using a Arcmap to do this, by applying the recommended geotransformation for the study area - the 3 parameter (geocentric) geotransformation \- to go from NAD27 to WGS84. I would like to do this entirely within Sql Server 2012. **From what I can tell, Sql Server does not support datum transformations out of the box.** Does anyone know of a Sql library that supports this geotransformation? I would like to simply use the same coefficients in Sql that I'm currently using in Arcmap. I also need to project from WGS84 lat/long into web mercator. I see this formula implemented in javascript, but if someone has a Sql stored procedure that does this, it would be great.


title: varying extent of each data driven page

text: I would like to export data driven pages, each with a different extent. I understand that within the Setup for the data driven pages, there is an option 'Extent' and one can choose 'Data Driven Scale'. I'd expect that if I select this and choose a column from the table of the data driven page layer, the extent would change according to the value. Apparantly this doesn't happen. How does this option work exactly? Or is there an other way for varying the extent of each data driven page?


title: OWSLib and python3

text: Trying to install OWSlib-master (and 0.7.1) from https://github.com/geopython/OWSLib yields problems that ultimately seem to be related to python3               >c:\Python32\python.exe setup.py install     running install     running bdist_egg     running egg_info     writing requirements to OWSLib.egg-info\requires.txt     writing OWSLib.egg-info\PKG-INFO     Traceback (most recent call last):       File "setup.py", line 34, in <module>         packages      = find_packages(),       File "c:\Python32\lib\distutils\core.py", line 148, in setup         dist.run_commands()       File "c:\Python32\lib\distutils\dist.py", line 917, in run_commands         self.run_command(cmd)       [...]         lines = header.split('\n')     TypeError: Type str doesn't support the buffer API      Are those errors errors of my (ActivePython 3.2) installation, or are these errors of OWSLib being incopatible with python 3? Has anyone succeded in running OWSlib on python 3?


title: How do I get a decent easy to use watermark from an image in Quantum?

text: Our users need to be able to put a graphic watermark onto maps they create in the print composer. Currently we get them to georeference the image as a raster and then create a transparency. This is quite complex for some of my beginners. Anybody got any suggestions?


title: MS Access and geocoding in ArcGIS

text: We are a small non-profit. We use a fairly complex MS Access application to track everything. We would very much like to geocode addresses in our application and display the results on a map. In other words, we would like to input an address and have it display on a map. We would need to use the GIS data provided by our municipality. They use ArcGIS and the MXD files contain a fair amount of ancillary data for each point. We have access to ArcGIS 9.x. But I am unable to get the map control working in our Access application, and apparently ESRI is eliminating that control anyway. I tried the following already:   * Google Maps static API. Works pretty well, but I have no way of geocoding against the local municipal data.    * MapWinGIS makes great maps based on ArcGIS file, but I have no way to geocode against the local data, as far as I can tell.   * Export MXD to KML. Works OK, but no labels/other ancillary data.   * Export points in ArcGIS and import to Access table. Sloppy, doesn't bode well for future updates to the GIS data provided by the municipality, and have no way of dealing with intersections. I would be willing to import the ArcGIS data into a different GIS product, if it would help (we could presumably just import new versions of the data in the same way.) Any suggestions greatly appreciated.


title: Strange Behavior for TOCControl PopupMenu

text: The sample "TOCControlContextMenu" demonstrates how to display a context menu from the AxTOCControl. When I run this sample and right-click on the TOC control the context menu pops up and remains displayed until I select a menu item. In my application the right-click displays the context menu but as soon as I release the right-mouse-button the first item in the menu is selected. I can see no substantial differences in the code. Has anyone observered (and possibility overcome) this behavior before?


title: Draw elevation from mouse move

text: I recently tried this example but unfortunately It's not working, I don't know why (I've tried as same as possible) My output is I want to use WMS data from geoserver and applied it in CesiumJs or Openwebglobe (3D platform) Does anyone know how to make a similiar example like this? Thanks Best Regards


title: network based interpolation methods, which one could I use?

text: I need to interpolate traffic data consisting in raw number of vehicles passing across certain points, where counters are. It is evident I haven't a uniform distribution of points and values about traffic. I would like to ask which methods I could use to interpolate this network deducing traffic for each location of the overall network. I tried to look on the most used desktop GIS (QGIS, ArcGIS) but it seems there is not a'ready made' solution at the moment. Is there an algorithm that I can implement in Python to achieve this result? Thanks!


title: Customized PDF Report of Each Manhole from a Database

text: I need a way to generate individual PDF reports for all the data collected for each manhole in a database. I would end up with hundreds of reports, one for each manhole in the feature class. The report needs to selected attribute data such as manhole type in a chart along with 1-3 pictures and possibly a small map. It doesn't look like the reporting tool built into ArcMap can make something this complicated. Any help would be greatly appreciated!


title: Best place to download or purchase shapefiles for Louisiana Parish?

text: I am looking for shapefiles to either download or purchase for the BEAUREGARD Parish in Louisiana. I have been able to find files for the Townships and Sections but I am in desperate need of a shapefile with TRACTS. If anyone know where I could obtain something like this it would be greatly appreciated. Thanks in advance for any help that you can provide.


title: Failed to convert polygon to raster

text: I have two steps here. First select layer by attributes. Second convert polygon to raster. It failed when it goes to second step and kept giving me error 999999: Error executing function. I pasted my codes below. Is there anyone who has the same problem. I am now using Arcgis 10.1 and has SP1 installed.               exec('''     import arcpy     from arcpy import env     arcpy.env.overwriteOutput = True     arcpy.CheckOutExtension("spatial")     import string     env.workspace = "G:\\countoverlap"               # Local variables:     FRAP_Fire111 = "G:\\countoverlap\\FRAP_Fire111.shp"          fldName = 'Year'     fcName = 'FRAP_Fire111.shp'     #set creates a unique value iterator from the value field     yearList = list(set([row.getValue(fldName) for row in arcpy.SearchCursor(fcName)]))     print(yearList)           ''')               env.workspace = "G:\\countoverlap"     env.scratchWorkspace = "G:\\countoverlap\\overlap.gdb"     arcpy.MakeFeatureLayer_management(FRAP_Fire111, "lyr")          for year in yearList[1:len(yearList)]:              print(str(year))              # Process: Select Layer By Attribute         arcpy.SelectLayerByAttribute_management("lyr","NEW_SELECTION", '"Year" = year' )         print('Layer_Seclected')              # Process: Polygon to Raster         # Set local variables         inFeatures = "lyr"         valField = "Year"         outRaster = "str(env.workspace)+'\\'+str(year)+'.tif'"         assignmentType = "MAXIMUM_AREA"         priorityField = "NONE"         cellSize = 1080         # Execute PolygonToRaster         arcpy.PolygonToRaster_conversion(inFeatures, valField, outRaster, assignmentType, priorityField, cellSize)         print('Raster_Created')


title: Georeference to UTM projection using openlayers plugin in QGIS

text: I have some aerial imagery that I need to georeference using QGIS into a UTM projection. In order to do this I need a basemap layer for the reference points. The openlayers plugin could work great for this but it's in the web Mercator projection. I attempted to georeference to the Web Mercator projection and then use the warp tool to transform to NAD 83 UTM but it doesn't seem to transform correctly. Should my process here work and I'm just missing a setting or step, or should I be going about this a different route all together?


title: Transforming WFS Projection

text: I am trying to overlay features from a WFS using OpenLayers, my geometries in database are in EPSG:27700 and my map's projection is EPSG:3857. My mapfile returns data in EPSG:27700. Is there any way I can transform points into the map projection? Here is my code which is not working.               var wfs = new OpenLayers.Layer.Vector(                 'layername',                 {                     strategies : [new OpenLayers.Strategy.BBOX()],                     protocol : new OpenLayers.Protocol.WFS({                         url : 'proxy.php?url=xxx',                         featureType : 'typename',                         "geometryName": "msGeometry",                         "featurePrefix": "ms",                         "srsName": 'EPSG:3857',                         "maxFeatures": 1000,                         "version": "1.0.0"                     })                                     }         );


title: How to create a schematic view of a line feature?

text: DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far… I have a line feature (polyline with curves) in ArcGIS Desktop, and I want to create a linear representation (straigth line) of the feature, furthermore i want to be able to locate events in the linear representation. this is somethig like i want ![enter image description here](http://i.stack.imgur.com/Gtw4A.jpg) Making some research i found something similar called "column view" unluckly my pc reboot an does not saved the history of the browser....so I lost the document. (I have been searching for it again, but i have not been able to find it)


title: Duplication of WMS Imagery

text: I am trying to get a state served Imagery WMS layer on a leaflet example and I am getting duplication of the image itself. Any ideas would be great. Below is the URL of the imagery: http://demac.udel.edu/data/aerial- photography#aerial-mapservices


title: how to create a shapefile containing attributes from a list?

text: I have a list of features and each feature is a dict in that list. following you can see the structure: [ {"FID": 0, "Shape": polyline, "Nodes": [0,1]}, {"FID": 1, "Shape": polyline, "Nodes": [0,2]},...] Now, I want to create an output shapefile containing all the attributes here. I should mention that I can create the shapefile using the below code but it does not add the attributes, which means that afterward, I need to iterate over the features and update them.               geom_list=[]     for feature in list_of_dicts:         geom_list.append(feature[u"Shape"])          outfile = "D:/address/to/the/result_features.shp"     result = arcpy.CopyFeatures_management(geom_list, outfile)      this is a hassle and in huge dataset can be really slow. is there anyway to create a shapefile with a list of attributes?


title: Conflict between ArcPy and GDAL/OGR?

text: # TL;DR I can't get an installation free version of GDAL/OGR to work from within ArcMap 10.0. I get an `ImportError: DLL load failed` on `_mod = imp.load_module('_gdal', fp, pathname, description)`. Below, more details on the context and a procedure on how to reproduce the error. * * * Someone in the comments specified that arcpy and GDAL work fine together on his machine. What could be the differences between our configurations (software installed, environment variables, ...)? # Description of my issue ## What I am trying to do... I want to deploy an ArcMap 10.0 ToolBox with scripts that use external libraries. I would like to avoid having any manipulation done on the user side: ideally, no additional installation/manipulation should be required for the user. For that reason, I embed the libraries files inside the ToolBox. ## What my problem is... When I try to use gdal/ogr from osgeo along with arcpy, I get the following error:               Traceback (most recent call last):       File "path_to_script\debugDepl.py", line 32, in <module>         from osgeo import ogr       File "path_to_script\osgeo\__init__.py", line 30, in <module>         _gdal = swig_import_helper()       File "path_to_script\osgeo\__init__.py", line 26, in swig_import_helper         _mod = imp.load_module('_gdal', fp, pathname, description)     ImportError: DLL load failed: The specified procedure could not be found.      There are some binding errors that I don't understand. It seems that there is a conflict between arcpy and gdal/ogr (more information below) Related:   * GDAL bindings problem with ArcMap 10.1 Python tool   * gdal ImportError in python on Windows   * Conflict arcpy (Arc 10) and gdal?   * Running GDAL and arcpy together   * How to run OGR in ArcGIS Scripts? * * * # How to reproduce the error If you can help me achieve want I want, it might be useful if I explain every step that lead to this error. I tried to detail as much as I could so that you could reproduce it. **1/** On a Windows 7 64bits machine, Install ArcGIS Desktop 10.0 (32 bits) **2/** Download GDAL‑1.11.0.win32‑py2.6.exe Windows binary **3/** Install that library with your Python installation **4/** Move the associated library files (`path_to_python_install\Python26\ArcGIS10.0\Lib\site-packages`) to another new folder (osgeo folder + several Python files) **5/** Create a Python script in that folder and edit it in your favorite Python editor and check that you can import gdal/ogr               from osgeo import gdal     from osgeo import ogr      **6/** Try importing arcpy from the script before and after importing gdal/ogr               from osgeo import ogr     from osgeo import gdal      import arcpy      That should work, now try the other way around               import arcpy     # Maybe some environment variable settings     from osgeo import ogr     from osgeo import gdal      And that version should create the error. **7/** Create a toolbox (or call the script from within ArcMap) with the version that worked standalone. And try to run it within ArcMap (should fail). ## Notes on the steps **1/** I've found some official Python bindings but only for ArcMap 10.1 **2/** This distribution includes a complete GDAL installation. It is a 32bit version for my 32bit version of Python26. **4/** As specified in these recommendations for scripts deployment, I should copy the library files directly. I want to avoid the user to have to install things as much as possible **5/** This may (or may not) require some environment variable settings:               import os     environList = os.environ['PATH'].split(';')     environList.insert(0, r'path_to_folder\osgeo')     os.environ['PATH'] = ';'.join(environList)     os.environ['GDAL_DATA'] = r'path_to_folder\osgeo\data\gdal'      GDAL Documentation specifies that we should:   * Add the installation directory bin folder to your system PATH, remember to put a semicolon in front of it before you add to the existing path.   * Create a new user or system variable with the data folder from your installation. Developers on this blog page seemed to have that error when the environment variables were incorrect. **6/** It seems that for some reason if you import arcpy first and ogr/gdal second, gdal is no longer able to find the dll's that it requires. This could have been due to some environment variable settings but the modification I proposed at step 5) didn’t change anything. **7/** But then my guess is that arcpy is automatically imported (first) so we’re back to the 2nd version of 6) ## Some more information about my attempt to understand what is going on From PyScripter:               >>> from osgeo import gdal     >>> gdal.__file__     'C:\\Python26\\ArcGIS10.0\\lib\\site-packages\\osgeo\\gdal.pyc'     >>> import arcpy     >>> arcpy.__file__     'C:\\Program Files (x86)\\ArcGIS\\Desktop10.0\\arcpy\\arcpy\\__init__.pyc'      Alright, the library files were found where they are supposed to be. But then…               >>> import arcpy     >>> from osgeo import gdal     Traceback (most recent call last):       File "<interactive input>", line 1, in <module>       File "C:\Python26\ArcGIS10.0\lib\site-packages\osgeo\__init__.py", line 29, in <module>         _gdal = swig_import_helper()       File "C:\Python26\ArcGIS10.0\lib\site-packages\osgeo\__init__.py", line 25, in swig_import_helper         _mod = imp.load_module('_gdal', fp, pathname, description)     ImportError: DLL load failed: The specified procedure could not be found.      Maybe something happened to the environment variables or to the python path when importing Arcpy? Well, it doesn't seem like it...               >>> import os     >>> import sys     >>> envBefore = os.environ     >>> pyPathBefore = sys.path     >>> import arcpy     >>> envAfter = os.environ     >>> pyPathAfter = sys.path     >>> envBefore == envAfter     True     >>> pyPathBefore == pyPathAfter     True      Thank you for reaching the end of that long post.


title: Is it possible to use comments in QGIS Query Builder?

text: I am trying different queries in the Query Builder. Is there a way to comment the query? I tried with `/* */` `#` `--` without success : > An error occurred when executing the query. The data provider said: OGR[3] > error 1: SQL Expression Parsing Error: syntax error **EDIT** : Thanks to the answer and comments of @Joseph,   I have made a feature request of this question: http://hub.qgis.org/issues/10914


title: ArcGIS REST vs. SOAP API

text: When is it appropriate to use the ArcGIS Server REST API vs. the SOAP API and vice-versa? What do you see as the advantages of one over the other? For example, the SOAP service can be consumed as a Service Reference to integrate into Visual Studio. Is there anything available that would give you that level of integration with REST? More info: ArcGIS GIS Services


title: Pulling SDE feature classes from current map to fieldmapping as DETable

text: I'm working with SDE layers in arcmap. trying to avoid pointing to the sde file itself. I've tried workspace.Pathname, it was empty for sde remote workspace. I've also tried IName from workspace, empty again. Any ideas on what I should be doing differently? BTW, it works just fine for GDBs.                       Dim gputilities As ESRI.ArcGIS.Geoprocessing.IGPUtilities = New ESRI.ArcGIS.Geoprocessing.GPUtilitiesClass()             'Dim inputTableA As IDETable = CType(gputilities.MakeDataElement(pWorkspace.PathName + "\Weld", Nothing, Nothing), IDETable)             Dim inputtables As IArray = New ArrayClass()             Dim gpValueTableObj As ESRI.ArcGIS.Geoprocessing.GpValueTableObject = New ESRI.ArcGIS.Geoprocessing.GpValueTableObject             gpValueTableObj.SetColumns(1)             Dim pdet As IDETable = New DETable             For Each pLayer In checkedLayers                 Try                     gpValueTableObj.AddRow(pLayer)                     Dim workspaceFactory As SdeWorkspaceFactory = New SdeWorkspaceFactoryClass()                     Dim workspaceName As IWorkspaceName = workspaceFactory.Create(Nothing, pLayer, pWorkspace.ConnectionProperties, 0)                     Dim pName As IName = TryCast(workspaceName, IName)                     inputtables.Add(CType(gputilities.MakeDataElementFromNameObject(pName), IDETable))                      Catch ex As Exception                 End Try                 'inputtables.Add(CType(gputilities.MakeDataElement(weldLayer.Name, Nothing, Nothing), IDETable))             Next             fieldmapping = New ESRI.ArcGIS.Geoprocessing.GPFieldMappingClass()             fieldmapping.Initialize(inputtables, Nothing)


title: ArcGIS 10 Linux experience

text: We have ArcGIS 10 installed on a nice clean Linux box. We have developed scripts to run on the Windows desktop development machines, and modified them to run on Linux. Now, if we run the scripts on the windows boxes, they 'perform' within ioperational tolerances and perform correctlty. However, once we run them on the Linux envronment, they seem to 'cock about'. I am led to believe that ArcPy is synchronous and that calls to various objects have to finish computing, before the next call toprocessing can take place. It seems not. A call to aggregate points to a polygon, then to buffer the polygon, see's an empty buffer returned, when the polygon exists. There is some latency between the Dev box and the ArcSDE instance, but surely if this is truly synchronous, it would only move on if the work had completed? Does anyone have any experience of this?


title: Assigning points to their respective Reaches using Stream Gradient?

text: This is a continuation of the question I initially posed here. Also, I've attached a shapefile on my Drop Box account here. I'm trying to break a stream network up into 100m reaches, assigning elevation values pulled from a DEM, to the start and end of each segment, the goal being to determine gradient for each segment. Process-wise, I'm not approaching this correctly. So far, I haven't been able to those z-values to the start and end nodes. What I've been doing is to segment the stream network, and using XTools, convert Features to Points, again, at 100m intervals. They do line up with the segments, as you can see below. From there, I can easily use XTools to pull raster values, and assign them to the points. What I'm not able to do, is to assign those points back into the reaches. I can get one of them, sure, but not both. Thus, I can't calculate gradient. Again, any help would be MUCH appreciated, particularly any sort of working example. ![enter image description here](http://i.stack.imgur.com/irCsx.png)


title: Is the csv handling in QGIS bugged?

text: I am using QGIS 2.4.0 and sadly it seems that QGIS imported csv files are somewhat bugged. I cannot use imported csv files the same way as shapefiles. It seems that sometimes it is easier to import the file and then just save the csv file inside QGIS as a shapefile and import it again to make it work. The reasons I am saying this are the following:   * I cannot save the style files associates with csv files.   * In properties tab type and typename are always double and the lenght and precision are always 0   * Calculations are not possible since some columns are not seen as containing Real or Natural numbers. Once saved as shapefile I can suddenly do everything I need. So am I missing something or is there no other way to not to have this intermediary saving step?


title: Image classification using google satellite images

text: Currently our expert user classifies locations by viewing the Google earth satellite image of a location. They consider circular areas of a 5km radius at a set zoom level. They evaluate the image for density of buildings or trees in within the circle and assign the location a classification. We get data in the form:               location         | Classification     (lat-long)       |     ----------------------------------     123.123, 12.34   | B     122.123, 12.34   | A     121.123, 12.34   | C     120.123, 12.34   | A     119.123, 12.34   | A      I want to use this as training data to build a system that can automatically classify a location based on the satellite image. To train the system, I would need to extract relevant parameters from the satellite images. I guess the image parameters would need to be rotation independent. Possible parameters:   * total intensity for RGB values,    * histogram   * count of edges   * ?? I plan on using C# and available AI & image processing libraries (e.g. opencv, encog, AForge) to do implement the training and classification stages. Some of the image processing tutorials concentrate on object recognition but that's not really what I'm after (I think). It's more about grouping the images into different categories based on more general properties of the image. Can anyone advise on a) the feasibility of this plan and b) what parameters I should be extracting from the images? Thanks


title: How to display Google Maps as basemap in a Silverlight application?

text: I am writing a web mapping application and I use ArcGIS Server services. I want the application to use Google Maps as a base map. I am new to this job. I have searched a lot on the Internet. But I could not find anything useful. Is there anyone who could help me in this matter. Sample site are shown below. http://esup.qom.ir


title: How can I zoom to extenct according for dynamic WMS (coming from DB)?

text: I have a WMS layer that is coming from SQL View. I want to be able to zoom to extent of layer when clicking a button (view changes because data keep coming to the DB). How can I get the rectangle that currently contains the points and zoom to it ? (or an alternative is to make a polyline from the points and zoomtoexctent of it.. but its kinda overkill I think)


title: Tiles cover Polygon on zoom and move

text: i'm using OpenLayers.Geometry.Polygon.createRegularPolygon to generate some nice circles. After i draw them to the Map i'm Moving them and after some while they where hiding by some tiles. The circle zIndex is higher then the tiles zIndex so there is no problem (hopefully). I'm using Openlayers Version: Release 2.13 Here is some code i'm using:               var circle = OpenLayers.Geometry.Polygon.createRegularPolygon(         point,         rad,         200,         0     );     var style = {         fillColor: '#ea2828',         strokeColor: '#ea2828',         strokeOpacity: 1,         strokeWidth: 4,         graphicZIndex: 1099,         fillOpacity: 0     };     var featureInner = new OpenLayers.Feature.Vector(circle, null, style);     layer.addFeatures(featureInner);      when i want to set the new point im using:               layer.removeAllFeatures();      to remove the old circle and then i put it with the code from above again on the layer. Every time i zoom into the map where i can't see the circle and move to the circle postion i can't see the circle. The Magic at this point is that i can use the controlls hide layer and activate it again and wow the circle is back. I hope you have a idea for a fix. Best regards


title: How add vector style rule filter with different value in table

text: I have a simple wfs layer from geoserver, here is code:                 //wfs-t editable overlay       var wfs_layer = new OpenLayers.Layer.Vector("Vector sample", {       strategies: [new OpenLayers.Strategy.Fixed()],       //projection: new OpenLayers.Projection("EPSG:4326"),       protocol: new OpenLayers.Protocol.WFS({       version: "1.1.0",       // loading data through localhost url path       url: ".....",       featureNS :  ".....",       extractAttributes: true,       // layer name       featureType: "....",       geometryName: "geom",       schema: "localhost:8080/geoserver......"       })       });           //vector style:     var vector_style = new OpenLayers.Style({      'fillColor': '#669933',      'fillOpacity': .8,      'strokeColor': '#aaee77',      'strokeWidth': 3,      'pointRadius': 8      });          var vector_style_select = new OpenLayers.Style({      'fillColor': '#FF0000',      'fillOpacity': .10,     'graphicName': 'circle',      //'label': 'klik',     'pointRadius': 8,      'strokeColor': '#f86633',      'strokeDashstyle': 'solid',      'strokeWidth': 4      });          var vector_style_iz_table = new OpenLayers.Style({     'cursor': 'pointer',      'fillColor': '#669933',      'fillOpacity': .8,      'fontColor': '#343434',      'label': '${table1}',      'pointRadius': '8',      'strokeColor': '#aaee77',     'strokeWidth': 3,      'strokeDashstyle': 'solid',      'strokeWidth': '${4}'      });     var vector_style_map = new OpenLayers.StyleMap({      'default': vector_style_iz_table,     'select': vector_style_select      });     wfs_layer.styleMap = vector_style_map;      I have table from "table1" database, where is three different value: "yes", "no" and "null". Everything works fine, in this style I can view vector layer with green fillcolor with label "yes" or "no" from my "table1". I want 3 different style, for "yes"-> green fillcolor, for "no"-> red fillcolor and "null"-> black fillcolor. Is that posible having 3 styles for one vector layer? I think that I must write rule filter for all three different value? Thanks!


title: How to rotate backgroundgraphic only in openlayer

text: I know how to rotate image but if I want to keep the background image fixed what I should I do , can someone please let me know how to do that? Many thanks any comments is highly appreciated.


title: Removing Places from OSM

text: Doe is exists a way to remove all the places from the OSM map? Also like shops, bars, restorations, hotels etc. I wish to use a maps with a less info. Is it possible to do this from the original OSM server? Maybe like a option in URL or something else? I use Leaflet library for my project, maybe some option in it?


title: QGIS split shp into different layers

text: I'm building my first map, so please forgive me beginners mistakes.   I've downloaded QGIS 2.0.1 and following tutorial I was able to download data from http://sdi.geoportal.gov.pl/wfs_prg/wfservice.aspx?request=getfeature&version=1.1.0&service=wfs&typename=WOJEWODZTWA and present is as one layer in application. My SHP file has 16 objects (Polish provinces).   ![enter image description here](http://i.stack.imgur.com/ibXDV.png) My problem is that right now I have one layer (with one layer style) and I can show/hide all provinces at once, what I want to do is to have all provinces as layers (or groups) so I could show only some provinces and change their color. I know that I can select shape using select tool, then export selection into SHP file and import 16 layers into project.   This is fine when layer has 16 objects, but my second map has over 3000 districts and I must be able to hide/show/change color of them individually. Can this be done better/faster? **EDIT**   I managed to split my SHP into layers, this way I have 16 layers and I can add style to every layer individually. I can also hide layers using layers panel. ![enter image description here](http://i.stack.imgur.com/4Hngy.png) Can I add similar select to layer? So I can choose which object to show/hide?


title: Lambert conformal conic projection - Europa

text: I am trying to calculate map of Europa in Lambert projection. I am using formula from wikipedia (Lambert wiki), but calculation is verřy slow with comparison to Mercator. I know, there are sin, cos, cotg and pow to calculate (mercator has only one tan and ln), but the difference is almost 30 minutes (Mercator is done in about 3 minutes). Is there some kind of speed up, or similar projection, that can be used ? I also need to put result into image with width and hight. For Mercator, I am using this: http://stackoverflow.com/questions/5983099/converting-longitude- latitude-to-x-y-coordinate. Can it be altered to Lambert (or Lambert similar) projection ? Because if I use same approach only witch changed formulas for projection, Lambert is moved to upper part of image and I can see only part of Europe) **EDIT: Added code**               double longitude = lon * (MPI / 180.0);     double latitude = lat * (MPI / 180.0);          double lambertPhi = this->lambertF * pow(cot(0.25 * MPI + 0.5 * latitude), this->lambertN);          lonOut = lambertPhi * sinf(this->lambertN * longitude);     latOut = this->lambertPhi0 - lambertPhi * cosf(this->lambertN * longitude);      All **this->** variables are precomputed only once


title: How to keep track of edited location?

text: With large datasets, how do you guys keep track of where you have edited across the map? For instance, I am editing a city's waterline and water valve data. I estimate using a 1:400 average zoom level. This is a large city, and I can quickly lose track of where I have edited, especially after days of working on it. I'm using ArcMap 10.2 Basic with a file geodatabase. Is there a function to track the location and extent of where my window has been? Or is there a better way to track changes/edited location? If not, I might write script to make an initial polygon, or draw a feature, based on the current window extents, and then merge new extents to it as I pan across the map. Perhaps stop it from drawing if zoom is beyond 1:1000. What do you guys say?


title: How can I apply the same change to multiple map documents?

text: I have several map documents (around 30) that reference all the same files and display them all the same way. I created them by setting one map how I wanted it, then using "save as" to create a new map then adjusting the data frame extents in the layout. Of course now that I have them all created, I need to make the exact same change to all of them. Is there a more efficient process than just manually repeating the same steps in each document? If not, is there a better way I could have set up the project to facilitate changes like this? I'm using ArcMap 10.0 Thanks


title: imposm2 to imposm3

text: I am using imposm2 to import osm data to postgresql database but recently moved to imposm3 which is still in development phase I want to know is there an easy way to convert imposm2 mapping file (python) to imposm3 mapping file(json) ?


title: Run a ArcMap (10.0) Addin Button with VBA from a MS-Access form

text: I need a way to execute an ArcGis-Addin (vb.net) from a MS-Access database form (VBA). The problem is that there is no ESRI.ArcGIS.Desktop.Addin reference in VBA and the "pItem.Execute" method with the "pCmdBars.Find(pUID)" does not work with my Addin-Button. I want to open the ArcMap.mxd file and perform a selection that shows the spatial data of my MS-Access database query. The rest is not a problem (maybe!). Thanks, in advance....


title: How to display a single in a group of nodes with same attributes?

text: In QGIS, if I have some nodes with a name attribute is there a way to display only one node that would be in the middle of this group of nodes having the same name? For example, let's say i have 3 nodes with an attribute "ABC" I would like to display one node what would be in the middle of this group.


title: session id changing ; tomcat and apache web serevr

text: I'm using a WFS protocol on Vector layer. also I'm working on 2 servers, tomcat (to deploy GeoServer) and Apache web server(because i use php) I have an HTML page works on Tomcat and login.php and another php files on Apache web server the problem is the session id changes every request.. so i got the "undefined user id" error but when i put all my files on Apache.. i got the same session id


title: What to do with old GIS books/manuals/etc?

text: We're having an office clear-out and have come across a number of old GIS paper materials. Random examples (to give a taste - there are about 20-30 in all) include:   * Postcodes: The New Geography (Book - 1992)   * Intermap (Product Handbook and Quick Start Guide (2004))   * ARC Macro Language (Self-study Workbook 1993)   * Understanding GIS; The ARC/INFO Method (ESRI Book, 1990)   * Institute of British Geographers; Transactions New Series; Volume 16 Number 1 1991   * arc/info; Computer mapping and geographica information management system (Folder, probably training materials; Nov 1985!) So I'm wondering - what should we do with them? Is there anywhere that would take "historic" GIS materials (museum, library etc)? They're all a bit too specialised for a regular charity shop but it seems a shame to just dump them. (Note: I'm in the UK if that makes any difference)


title: How to get Quantum GIS display a line or polygon feature created by Python package pyshp

text: I am not sure if I have discovered a regression, or if I have not enough sleep. While I manage to create shapefiles with point geometries with pyshp, **line and polygon features don't show up in QGIS**. In ArcMap, however, they show up as expected. **Steps to reproduce**   1. Get pyshp (version 1.1.7)   2. Execute one or both of these example scripts, taken directly from the pyshp documentation: _Polygon_              import shapefile     w = shapefile.Writer(shapefile.POLYGON)     w.poly(parts=[[[1,5],[5,5],[5,1],[3,3],[1,1]]])     w.field('FIRST_FLD','C','40')     w.field('SECOND_FLD','C','40')     w.record('First','Polygon')     w.save('test-polygon')      _Polyline_              import shapefile     w = shapefile.Writer(shapefile.POLYLINE)     w.line(parts=[[[1,5],[5,5],[5,1],[3,3],[1,1]]])     w.field('FIRST_FLD','C','40')     w.field('SECOND_FLD','C','40')     w.record(FIRST_FLD='First', SECOND_FLD='Line')     w.save('test-line')        3. Open the resulting shapefile in an empty QGIS session (tested in 1.7.3, 1.8.0 and 1.9.0 Alpha) **Expected result**   A polygon or a line in the map window (at least after a "zoom to layer extent"). **What I get**   An empty map. Did I miss something? **Update** After contacting the package author, version 1.1.9 was mentioned on the homepage. After an upgrade, the issue vanished. _That's_ good customer support!


title: Convert .osm to .map for mapsforge

text: I have download latest version of osmosis from http://wiki.openstreetmap.org/wiki/Osmosis#Downloading and mapsforge-map- writer-0.3.0-jar-with-dependencies.jar from https://code.google.com/p/mapsforge/downloads/list. I copied mapsforge-map-writer-0.3.0-jar-with-dependencies.jar into 1- osmosis lib directory: osmosis-latest/lib/default 2- C:\Users\username\AppData\Roaming\Openstreetmap\Osmosis\Plugins 3- C:\Users\username\AppData\Local.openstreetmap\osmosis\plugins I downloaded iran.osm file from geofabrik.de and then I created a batch file as below:               osmosis --rx file=iran.osm --mw file=iran.map bbox=35.574683,51.086426,35.833402,51.664581 type=hd      and I got this error:               SEVERE: Execution aborted.     org.openstreetmap.osmosis.core.OsmosisRuntimeException: Cannot load JPF-plugin 'org.mapsforge.MapFileWriter' for extensionpoint 'Task' at org.openstreetmap.osmosis.core.TaskRegistrar.loadJPFPlugins(TaskRegistrar.java:186)         at org.openstreetmap.osmosis.core.TaskRegistrar.initialize(TaskRegistrar.java:88)         at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:81)         at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)         at java.lang.reflect.Method.invoke(Unknown Source)         at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)         at org.codehaus.classworlds.Launcher.main(Launcher.java:47)     Caused by: org.java.plugin.PluginLifecycleException: plug-in org.mapsforge.map.mapfile-writer requires plug-in org.openstreetmap.osmosis.core.plugin.Core which is unknown or has incompatible version at org.java.plugin.standard.StandardPluginManager.checkPrerequisites(StandardPluginManager.java:460) at org.java.plugin.standard.StandardPluginManager.activatePlugin(StandardPluginManager.java:397)         at org.java.plugin.standard.StandardPluginManager.activatePlugin(StandardPluginManager.java:245)         at org.openstreetmap.osmosis.core.TaskRegistrar.loadJPFPlugins(TaskRegistrar.java:182)         ... 12 more      PS: I switched back to osmosis 0.36 and I got this error:               SEVERE: Thread for task 1-rx failed     org.openstreetmap.osmosis.core.OsmosisRuntimeException: Cannot represent 2147487728 as an integer.         at org.openstreetmap.osmosis.core.util.LongAsInt.longToInt(LongAsInt.java:33)         at org.openstreetmap.osmosis.core.domain.v0_6.CommonEntityData.init(CommonEntityData.java:142)         at org.openstreetmap.osmosis.core.domain.v0_6.CommonEntityData.<init>(CommonEntityData.java:74)         at org.openstreetmap.osmosis.core.domain.v0_6.Entity.<init>(Entity.java:61)         at org.openstreetmap.osmosis.core.domain.v0_6.Node.<init>(Node.java:71)         at org.openstreetmap.osmosis.xml.v0_6.impl.NodeElementProcessor.begin(NodeElementProcessor.java:87)         at org.openstreetmap.osmosis.xml.v0_6.impl.OsmHandler.startElement(OsmHandler.java:90)         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)         at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)         at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)         at javax.xml.parsers.SAXParser.parse(Unknown Source)         at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:108)         at java.lang.Thread.run(Unknown Source)


title: How to use SEXTANTE in a script outside QGIS?

text: I´m trying to do some geoprocessing using the QGIS Sextante plugin outside of the QGIS application (and integrate it with different other libraries like arcpy, etc.).               import sys, os     from PyQt4.QtGui import QApplication     QApplication(sys.argv)     from qgis.core import *     import qgis.utils          sys.path.append("C:/Users/.../.qgis/python/plugins")          import sextante     sextante.core.Sextante.Sextante.initialize()     input = "D:/Python_Test/a.shp"     output = "D:/Python_Test/b.shp"          sextante.runalg("qgis:convexhull",input,None,None,output)     print "Finished!"      Unfortunately the process fails with the following error:               Traceback (most recent call last):       File "<interactive input>", line 1, in <module>       File "C:/Users/.../.qgis/python/plugins\sextante\core\Sextante.py", line 376, in runalg         alg = Sextante.runAlgorithm(algOrName, None, *args)       File "C:/Users/.../.qgis/python/plugins\sextante\core\Sextante.py", line 276, in runAlgorithm         if not param.setValue(args[i]):       File "C:/Users/.../.qgis/python/plugins\sextante\parameters\ParameterVector.py", line 59, in setValue         layers = QGisLayers.getVectorLayers(self.shapetype)       File "C:/Users/.../.qgis/python/plugins\sextante\core\QGisLayers.py", line 79, in getVectorLayers         layers = QGisLayers.iface.legendInterface().layers()     AttributeError: 'NoneType' object has no attribute 'legendInterface'      What am I doing wrong? Sextante seems to be initialized correctly because               sextante.alghelp("qgis:convexhull")      gives me               ALGORITHM: Convex hull         INPUT <ParameterVector>         FIELD <ParameterTableField from INPUT>         METHOD <ParameterSelection>         OUTPUT <OutputVector>      I´m using Windows 7 Professional 64Bit and the OsGeo4W installation with QGIS 1.8.0 and python 2.7.4.


title: How to avoid the CRS Dialog when creating a vector layer memory?

text: I am trying to create a vector memory in a plugin. Basing on some examples,I was able to create a memory vector layer and to add it in QGis with : QgsMapLayer.instance().addMapLayer(myLayer,True) But when the layer is added , QGis always displays the crs dialog to specify the crs of the layers :![crs dialog](http://i.stack.imgur.com/qWy7I.png) I tried to specify myself the crs with : layer.setCrs(QgsCoordinateReference(4326)) but it still shows me the crs dialog. Do you have any ideas to how avoid this dialog ? Best regards


title: where I can find the shapefiles for the ecoregion map of the US?

text: I want to find a shapefile for the map at the bottom of http://www.epa.gov/wed/pages/ecoregions/level_iii_iv.htm I would want to create a map showing some data for the 10 forest ecoregions. Thanks.


title: Duplicate source information from esri.tasks.PrintTask

text: We are trying out the PrintTask in ArcGIS Server 10.1 pre-release. When an Esri base map is enabled, we are getting source information in two places in the resulting .pdf. I can confirm that this was not the case with 10.1 beta, and we are using the same .mxd's for the service. Is there any way to remove one of these source references, or change the placement? I didn't see a corresponding parameter in the javascript api. ![Screenshot of duplicate source info](http://i.stack.imgur.com/EecR3.jpg)


title: Representing a TIN in GeoJSON

text: Regarding the GeoJSON representation of a TIN, are there   1. any specifications or    2. existing implementations I may not be aware of?  You could probably hack one together using the multipolygon feature type, but this seems inefficient. Generally speaking, I don't see any surface types (regular or irregular) represented in the GeoJSON world, is there any existing or upcoming work in this area?


title: Live KML Feeds - From the Ground Up, How Would You Build It and Why?

text: I found the "Live KML from PostGIS to Google Earth" post very informative but a bit daunting for someone new to the open source world of products like PostGIS and GeoServer. If I am building the product from scratch, is the PostgreSQL / PostGIS - GeoServer combination the accepted best path to take? What are some alternatives or strengths / weaknesses?


title: arcpy.ListFeatureClasses(wildcard, type, dataset) - Help with grabbing from 2 different feature datasets?

text: I'm trying to join multiple line fcs to their matching named point. (point and lines in same gdb, but separate feature datasets. stand alone python script/arcgis 10.1) My initial line of psuedocode code reasoning was:               point_list = arcpy.ListFeatureClasses()     for point_fc in point_list:         get point_fc name         line_list = arcpy.ListFeatureClasses(point_fc name*, "Polyline", line feature dataset)         for line_fc in line_list:             arcpy.JoinField_management(....)         How can I get two different feature class lists? Even if I declare the line feature dataset as separate from the environment workspace/point feature dataset the resulting list is 0 length whereas, if, in a new script, I set the environment workspace to the line feature dataset, then run the ListFeatureClasses, the correct list is returned. Do I reset the workspace before running the 2nd list? A virtual 2ndcupofcoffeethankyou for your help. @artwork21 had a solution to a previous post solution incorporating dataset list that worked here: ArcGIS 10.1 Python script to snap points to lines


title: How do I copy all feature attributes to a feature in a new layer?

text: I'm trying to create a new layer in QGIS based on an existing layer. The new features should have all the attributes of the corresponding features in the original layer. I've been trying to use `outFeat.setAttributeMap(inFeat.attributeMap() )` similar to what Victor Olaya is doing at http://qgissextante.blogspot.de/2012/11/spliting-vector- layer.html, but all the attributes come out as NULL. Could you tell me where the error is in my code?               def test(outputFilename):      layer = qgis.utils.iface.activeLayer()      provider = layer.dataProvider()      fields = provider.fields()      writer = QgsVectorFileWriter(outputFilename, "CP1250", fields, provider.geometryType(), provider.crs(), "ESRI Shapefile")      inFeat = QgsFeature()      outFeat = QgsFeature()      inGeom = QgsGeometry()      while provider.nextFeature(inFeat):       point = inFeat.geometry().asPoint()       inGeom = inFeat.geometry()       outFeat.setGeometry(inFeat.geometry() )       outFeat.setAttributeMap(inFeat.attributeMap() )       writer.addFeature( outFeat )      del writer      newlayer = QgsVectorLayer(outputFilename, "Output", "ogr")      QgsMapLayerRegistry.instance().addMapLayer(newlayer)


title: How to zoom to wms layer after cql filter on Open layers

text: I created o layer contain points and I added it to a map as WMS layer on OpenLayers I did a CQL filter an it's work but I'd like to zoom to the selected point when I worked with getextent or getdataextent it doesn(t zoom to the right place it missed with a few Km there is my the code of filter function filterNom(){                           var filterType ="cql";                 var filter = document.getElementById('batima').value;                 //var filter = "cité aïn-chock";                 // by default, reset all filters                 var filterParams = {cql_filter: null};                 if (OpenLayers.String.trim(filter) != "") {                     if (filterType == "cql")                          filterParams["cql_filter"] = "batiment='"+filter+"'";                      }                 // merge the new filter definitions                 //mergeNewParams(filterParams);                 wfs_layer.mergeNewParams(filterParams);                 var bounds =  new OpenLayers.Bounds                 bounds = wfs_layer.getExtent()                 //map.zoomToExtent (bounds);                 //var center = new OpenLayers.LonLat( wfs_layer.getExtent() );                 //center.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));                 //alert(center+','+wfs_layer.getExtent());                 map.setCenter(wfs_layer.getExtent(),18);                 var center = map.getCenter();                 center.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));                 alert(center.toString());      } and ther is the code to add the WMS layer                 wfs_layer = new OpenLayers.Layer.WMS("Patrimoines",             "http:// localhost/geoserver/cite/wms",              {layers: 'cite:patrimoine' , transparent: true },             {isBaseLayer: false, opacity: 1, singleTile: true, visibility: true,              projection: 'EPSG:900913'});      Thank you for helping me


title: Esri ArcGIS 10 - using ArcPy to select buffer line by length

text: I created a buffer, then converted polygon to line (around a city block). I want to select the internal line. I'm thinking since there is no uniform way that ArcGIS labels the interior or exterior buffer line, I can use length to select the line I want by using an if/then statement. I have not been able to find the script command that simply selects a feature/line. Anyone know?