title: Intersect two polylines using ArcObjects

text: I have two polylines and would like to find the intersection(s) using ArcObjects / VB.NET. I'm using the following code:               Dim topoOp As ITopologicalOperator = TryCast(pTestPoly2, ITopologicalOperator)     topoOp.Intersect(TryCast(pTestPoly1, IGeometry), ESRI.ArcGIS.Geometry.esriGeometryDimension.esriGeometry0Dimension)     Dim pOutPointCol As IPointCollection = TryCast(topoOp, IPointCollection)      In the resulting IPointCollection I get all the vertices of the input pTestPoly2, although there should be one intersection of the two polylines. What's wrong with this approach? Any help or sample code would be appreciated.


title: about token based authentication security

text: I am reading the authenticated services with token. I understand that a user have to get a token to using arcgis services. Example: **https://domain.com/arcgis/rest/services/myMap/MapServer** is my service. My server administrator give me a token like this. Token = AJSJK876548sjjs7 And I used this service in my javascript api like this https://domain.com/arcgis/rest/services/myMap/MapServer?token=AJSJK876548sjjs7 A user can view my application source from browser and can get my token. And He/She can access my service. Is this a security problem?


title: ArcObjects - accessing layer data table from C#

text: I've spent all day yesterday trying to trace all my the errors but I'm just completely stuck now. Google isn't helpful either. I'm trying to create a small C# tool which opens my MXD file in background and **reads** data from one of the datasets (layers). I can happily open the file, I an list all the layers inside with no problems. But now matter how hard I try my **FeatureClass** or **DataTable** (tried both techniques) are always **null**. I'm simply trying to get a reference to an ITable or IFeatureClass object to perform a **QueryFilter** on it. **EDIT: Solution** I really don't know why my approach using IMapDocument didn't work. From documentation describes it as the _best_ and _most efficient_ way of accessing your data in background. The final solution involved creating an instance of ArcMap, creating a workspace and opening a feature class within it.                   ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);         m_application = new ESRI.ArcGIS.ArcMapUI.MxDocumentClass().Parent;              IWorkspace2 workspace = FileGdbWorkspaceFromPath(@"F:\Projects\!Water\Sewers.gdb");              IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;                           IFeatureClass featureClass = featureWorkspace.OpenFeatureClass("Sewers_v5");      And               public IWorkspace2 FileGdbWorkspaceFromPath(String path)     {                 IObjectFactory objFactory = m_application as IObjectFactory;         Type shpWkspFactType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBWorkspaceFactory");               string typeClsID = shpWkspFactType.GUID.ToString("B");         IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)objFactory.Create(typeClsID);         return workspaceFactory.OpenFromFile(path, 0) as IWorkspace2;     }      It's probably not the prettiest solution (made up from 5 different source codes) but **works**. I'm really disappointed by the ArcGIS documentation. So detailed and rich, and yet so useless.


title: Can a GeoJSON GeometryCollection contain another Collection?

text: From a reading of the spec it seems that a GeometryCollection is a Geometry and can contain geometry objects? But I want to be sure that this is really allowed before I file a bug report.


title: How to create a raster (topo to raster) with non-rectangular shape?

text: I'm using Arcmap 10, I need to create a raster from contour lines. These contour lines were clipped out with a certain shape with the purpose to modify them only within that shape and then create the raster from these modified contour lines. The problem is that when I come to the TopoToRaster step, the resulting raster is rectangular, while I'd need it with the shape I used for the clipping. How can I do this? Should I change some options in the Spatial Analyst? How?


title: Using the arcpy.UpdateCursor to delete rows doesn't delete based on counter

text: I am trying to delete rows from a shapefile using arcpy.UpdateCursor. The first thing I did was get a unique list of values from the key field "PolyGUID", then I iterate that list doing a arcpy.UpdateCursor. When inside the cursor I set a counter x=0 then for each record I increment +1. The deleteRow doesn't seem to happen after the second record is deleted. Is the object returned by the UpdateCursor not able to operate in this manner? Here's the code..               import arcpy     from arcpy import env          outPointFromPoint = r"C:\Trash\Nov2011\ResFinalC6.shp"     sql = " \"PolyGUID\" <> ''"     ocur = arcpy.SearchCursor(outPointFromPoint, sql)     listDelete = []     for oc in ocur:         if oc.PolyGUID not in listDelete:             listDelete.append(oc.PolyGUID)     print len(listDelete)               del oc, ocur, x, sql     for lD in listDelete:         sql2 = " \"PolyGUID\" = " + "'" + str(lD) + "'"         upcur = arcpy.UpdateCursor(outPointFromPoint, sql2, "", "", "FMEAS2 A")         x=0         for upc in upcur:             x=x+1             print upc.FMEAS2             #print x             if x==1:                 print x             else:                 print "--------------------------" + str(x)                 print "Deleting: " + str(upc.PolyGUID) + str(upc.FMEAS2)                 upcur.deleteRow(upc)     del sql2, upc, upcur, x, lD, listDelete      EDIT: The PolyGUIDs come from a polygon fc. Having the polygon guid in the fc, ResFinalC6.shp, means that during a LocateFeatureAlongARoute operation.. the record from the polygon had one or more than one resultant record. I need to get rid of the any other records if the result was more than one record. A polygon record intersected the route in more than one place (three times for the problem records). The outcome results in a field displaying the m-value where the intersect occurred. So what I did was for each unique value in PolyGUID get a UpdateCursor..sort the field that holds the M-value (because I need the record with the lowest m-value) and use the x counter to delete those PolyGUIDs that resulted in more than one record (all except the one with the lowest m-value..which is why I did the sort on the UpdateCursor) resulting from the query with the UpdateCursor. EDIT: Sorry for the long-winded rabbling..So the issue is that after the cursor has gone through record 1 and set x=1..then to record 2 and set x=2 and then delete record 2..the script gets to those PolyGUIDs that show up three times..my print statement gets hit and x gets set to x=3 but the record doesn't get deleted. I have ran this numerous times and it's always the same PolyGUIDs left and they all show up three times before the delete tries. In the python shell window where the printing happens the record 3 gets cursed but no delete. Thanks all.


title: How do add attributes from shapefile to list of lat/long-coordinates using QGIS?

text: In QGIS I have a csv-file which contains lat/long-coordinates and population data for each coordinate. I also have a shapefile containing certain regional districts, in my case US counties. Now I want to add a column to my csv-file which in addition to the coordinates specifies the county of the coordinate point. Since there are no common attributes to join on, how should I proceed using QGIS? Thanks a bunch, T


title: Load Data to Oracle View (ArcCatalog)

text: Is it possible to load data from a shapefile to an Oracle 11g R2 view (without ArcSDE) in ArcMap 10.2 using ArcCatalog? The shapefile (polygons) was imported from that view, and then edited, but when I use the Load Data command in ArcCatalog, the application crashes


title: Securing AGS output, cache, and jobs folders

text: ArcGIS Server (for .NET) generates images, etc. in **arcgisoutput** , **arcgiscache** , and **arcgisjobs** folders. Can the AGS security system (specifically, token-based) be used to secure these folders in the same manner as the REST API? Or do they require a separate strategy? I've pored over the documentation but have found nothing specific to this aspect of AGS security.


title: Temporary additions to OSM data

text: I'm planning on building a transportation related GIS App. In the app, users will be allowed to add their own links to the network. For example, let's say a user wants to add a "driveway" in front of their house or a trail that's not on the OSM map. Is it possible to do so? Add to that, these additions should only be visible to the user that added those links and to whomever else they give access too.


title: How to project a map with mapguide

text: I am using MapGuide + Fusion for the basic Sheboygan-google example. I need to project the Sheboygan.MapDefinition to SheboyganMercator.MapDefinition so I can correctly display the example over google maps. However the WKT in the example to project it is not validated by maestro. Also maestro does not support projecting to Pseudo-Mercator at this time. How can I create the projection manually?


title: Javascript Table of Contents/Legend Widget

text: I was hoping someone might be able to take a look at my code and point out why this might not be working. I'm trying to use the Table of Contents/layer selector found here I thought at first that I wasn't linking properly to the stylesheet, so I ended up using their online hosted version. I also thought it might be an issue with not calling dijits/functions in the right order. Any help is much appreciated!               <!DOCTYPE html>               <title>Map</title>     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">     <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">     <link rel="stylesheet" href="http://js.arcgis.com/3.8/js/dojo/dijit/themes/claro/claro.css">     <link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">     <link rel="stylesheet" type="text/css" href="http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/latest/build/agsjs" />


title: ArcGIS Silverlight - custom animated composite line symbol?

text: I want a 'marching ants' line symbol with a white background and gray foreground. To make custom symbols, see the API Reference, and for examples see the symbol gallery. I got one in a single color easily enough like this:                   <esri:LineSymbol x:Key="ReferencePointLeaderLineSymbol">             <esri:LineSymbol.ControlTemplate>                 <!-- see the API docs for the Symbol class. A LineSymbol is expected to have a Path element                 with the name Element at the root of the template. A VisualStateGroup called 'CommonStates'                  can use a state called 'Normal' for normal visual states -->                 <ControlTemplate xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows">                     <Grid>                         <vsm:VisualStateManager.VisualStateGroups>                             <vsm:VisualStateGroup x:Name="CommonStates">                                 <vsm:VisualState x:Name="Normal">                                     <Storyboard RepeatBehavior="Forever">                                         <DoubleAnimation BeginTime="0:0:0" Storyboard.TargetName="Element" Storyboard.TargetProperty="StrokeDashOffset" To="1000" Duration="0:3:0" />                                     </Storyboard>                                 </vsm:VisualState>                             </vsm:VisualStateGroup>                         </vsm:VisualStateManager.VisualStateGroups>                         <Path x:Name="Element" StrokeDashArray="2,1" StrokeDashOffset="0" Stroke="Gray" StrokeThickness="2" />                     </Grid>                 </ControlTemplate>             </esri:LineSymbol.ControlTemplate>         </esri:LineSymbol>      And I mocked up a static version of what I want like:                   <Grid HorizontalAlignment="Left" Margin="8,8,0,0" Width="100" Height="100" VerticalAlignment="Top" Background="ForestGreen">              <Line StrokeDashArray="1.6,.4" StrokeDashOffset="0.15" Stroke="White" StrokeThickness="3" X1="10" Y1="10" X2="90" Y2="90" />             <Line StrokeDashArray="2,1" StrokeDashOffset="0" Stroke="Gray"  StrokeThickness="2" X1="10" Y1="10" X2="90" Y2="90" />         </Grid>      Which looks like this: ![example static symbol](http://i.stack.imgur.com/eZDr4.png) **But the problem I am facing** is that by the above docs, a line symbol needs a SINGLE Path element with the name 'Element' at its root. How can I do a 'white background, grey foreground' symbol without using two Paths? And how would I animate them to march as a unit?


title: How do I make my Cartodb info windows wider?

text:
According to my read of andrewxhill (more readable version) I should be able to change the info window size by adding CSS, like so:
       x

Non-valid picture URL

{{description}}

description

{{description}}

{{name}}

                But this has no impact on the width of my info window.


title: Define uphill side of roads and buildings

text: I have a big raster of a mountain region and I need to extract the uphill side of roads and buildings, from these elements to the pick of mountains. For a road I know the uphill side changes in downhill side when you make a hairpin turn. For this reason the processing should start from the lowest road/building and stop to the mountains (the highest points). Is there any possibility to make it? Thank you in advance for your help. PS: I don't have a good knowledge of Python language


title: How to use eVis to launch AutoCAD with a relative path?

text: I found this post, which leads me towards what I need: How to link to external files with relative path in QGIS actions? Now, I'm trying to use the eVis plugin to open .DWG and .DXF by launching AutoCAD from the Event Browser. I've tried to configure the external application as shown in my screen capture. The file name is now highlighted in green under the Display tab, but nothing happens when I double click on the file pathname. I'm using relative paths. I've tried modifying the extension to not include the '.' and it doesn't work either. There are issues with opening the pdfs in Foxit as well. Any insight would be appreciated! ![Configure External Applications eVis](http://i.stack.imgur.com/E7cl0.jpg)


title: How to make WFS layer with GeoExt?

text: Can u help me with WFS on GEOExt? Im read tutorial and see this code.               proxy: new GeoExt.data.ProtocolProxy({             protocol: new OpenLayers.Protocol.WFS({                 url: "/geoserver/ows",                 version: "1.1.0",                 featureType: "parks",                 featureNS: "http://medford.opengeo.org",                 srsName: "EPSG:4326"             })         })      After this i see this `var vectorLayer = new OpenLayers.Layer.Vector("Editable features");` And dont understand how to creating a layer. So i have some questions.   1 How to get URL to wfs? (i use geoserver)   2 Whats mean `featureType` option.   3 And more important. This code is correct? I find it here http://workshops.opengeo.org/geoext/wfs/grid.html


title: Make the acres or sq km field column display permanently?

text: I have an interseting question for you. When I have a polygon and I calcuate acres or square kilometers. I know how to do this but every time I bring the polygon to ArcMap. I had to go to their column and set it up the numbers to display look like this 1594267 rather than 1,594,267 ? I know you can manually set up the column's properties and set it as thousand separators but Is there a way around to make it permanently ? I have screen shot that you can check this out here. ![enter image description here](http://i.stack.imgur.com/CfsFD.jpg) There are two files before and after. Thanks


title: Scale factor (constant not linear stretch) GDAL

text: I need to re-scale a geotiff with gdal. I'm aware that gdal_translate has a -scale function, but i need to actually apply a constant (eg value(x,y) * 100) instead of scale the pixels to within a range. What is the best method to do such?


title: How to rename a file in the output (ArcGIS python)?

text: raslist=arcpy.ListRasters()     for ras in raslist:         arcpy.ProjectRaster_management(ras,outfolder2+ras+'_Albers',spatialref2)         print ras+' has been reprojected'      I was using the above code for batch processing in "Project Raster". I want to add "_Albers" in the output file name for each file. But the third line doesn't work. if I delete the "_Albers" in the third line, it works. But I want to rename the output file. Thanks.


title: Summing time spent on effort from point GPS data tracks in grid cells

text: I have one layer of point data representing GPS tracks collected during vessel surveys (an individual survey is indicated as the time between departing and returning to shore and there can be more than one on a given date i.e. when we returned to shore and then went out again). I also have layers of 1 and 2 kmsq polygon grids. I would like to calculate the time spent 'on survey effort' in each cell to adjust for effort in other analyses. I intend to adjust the weighting of each cell for these other calculations depending on the amount of effort spent in the cell, i.e. adjusted density of whale sightings based on the search effort in that cell. So far I have used a Spatial Join in ArcGIS to give the effort points that fall into a particular grid cell the unique identifier of the grid cell. I then exported the table to Excel to calculate the time spent on effort in each cell using the unique identifier of that cell. This was calculated by summing the times (on a given date and survey) between the points collected along that track in that cell and then using a Pivot Table to sum the total survey effort in each cell by the cell's ID and the survey number. Unfortunately, I realized after doing this that the total time on effort is different at the two different spatial scales of 1 and 2 kmsq. I believe this is because the calculation is missing the times the survey track crossed into a new cell i.e. the points fall in different cells so the time between these points was excluded. I would really appreciate if anybody has a good idea of how I could calculate the sum of these survey effort times without losing the times during crossover from one cell to another. I think I need to make the point data into line data and extract the times when the line crosses into a new grid cell but I'm not sure the best way to do this. Any thoughts? Thanks!


title: nr of cells between cells

text: I want to do the following: I have a set of cells with the value 1, and a set of values with 2. I want to calculate for each cell [2] the distance - ideally number of cells - to the nearest cell 1. Can I somehow do this in GRASS GIS? ![enter image description here](http://i.stack.imgur.com/tjV6s.jpg)


title: ArcPy(10.1) distanceTo using dynamic geometries?

text: I am struggling to get the arcpy point class method `distanceTo` to function with dynamically generated geometries with a Python addin. I have used the default tool addin function and set self.shape (in `__init__`) to shape. Selecting a polyline feature class in a drop down enables it.               class DrawLine(object):         """Implementation for testaddin_addin.drawline (Tool)"""         def __init__(self):             self.enabled = False             self.shape = "Line"      The user is able to draw a line, with a spatial reference automatically set to the data frame SR. I use the line to perform a SelectLayerByLocation query and extract the intersecting geometries to a feature layer (MakeFeatureLayer). For the tool, the order of intersection is important, so I grab the starting point of the drawn line and create a new point geometry:               start = arcpy.PointGeometry(arcpy.Point(line_geometry.firstPoint.X, line_geometry.firstPoint.Y))      Finally I iterate over the intersecting features and attempt to call `distanceTo`:                   while row:             geom = row.getValue(shpfieldname)             print type(start)             print start.distanceTo(geom)             row = rows.Next()      start is type `<class 'arcpy.arcobjects.geometries.PointGeometry'>`, so I know that I am working with a point geometry. I am returning:                File "c:\arcgis\desktop10.1\arcpy\arcpy\arcobjects\arcobjects.py", line 809, in distanceTo         return convertArcObjectToPythonObject(self._arc_object.DistanceTo(*gp_fixargs((other,))))     ValueError: <geoprocessing describe geometry object object at 0x2868B4A0>      Has anyone gotten `distanceTo` to work? How about with a dynamic geometry? Note: The input shapefile is simple polylines, single part, composed of pairs of vertices, i.e. as simple as possible.


title: how to create a dynamic attribute table column measuring distance from center of extent to points in layer?

text: We are developing a property look up tool for environmental hazards/chemical spills. In layout view we have a circular data extent with a graphic of a target house in the center and some proportional circles at increments of .125, .25, .5 and 1 miles from the center of the _fixed_ extent. My environmental hazards/chemical spills are a point layer with 4 different categories, each respectively with requirements to query around the target house at 1/8, 1/4, 1/2, and 1 mile distances to see which, if any, of these points falls within its designated distance from the target house. When exporting data from this layer that is within the view extent... is it possible to have a dynamic attribute table column that would change for each different target house address to tell me how far away the points are from this target house? i.e. whether they fall within those .125, .25, .5 and 1 miles for each category? In short is there a way to query distances (and even directions) from an address and have that data dynamically generated inside an attribute table column that could then be exported?


title: How do I install the las2ogr tool from liblas in Windows using the osgeo4w installer?

text: I was wondering if anyone has used the LAS2OGR tool? I heard about this from a previous post. The webpage gives the usage: http://www.liblas.org/utilities/las2ogr.html               las2ogr -i mydata.las -o points.shp -f "ESRI Shapefile"      But I am wondering what I run it in? I am on a Windows & box with FWTools 2.4.7 and it is coming up as an unrecognized tool. When I open OSG4W (gdal 1.9.2 released 2012/10/08) las2ogr is not listed in the tool set. Where should I be accessing this from? Do I need to download a specific .exe or .dll and save it to the GDAL folder? Any help would be appreciated. Thanks...


title: ESRI JavaScript API - Multiple KML Layers - Internal KML Parser Error

text: I am building a webmap with the ESRI Javascript API. I am trying to add several KML layers, as well as a Legend Toggle and am repeatedly getting "Internal KML Parser Error" and only some of my layers are appearing on my map. All of my KMLs are publicly available, display properly in Google Earth, are under 10MB, and I'm using API 3.1. The layers that do appear work perfectly in the legend. I'm attempting to add upwards of 20 KML layers in total. My code is as follows (I apologize for not having the actual data, but it's proprietary):               var boundLayers = [];          var kml1 = new esri.layers.KMLLayer('publicURL',{id:'kml1'});      boundLayers.push({layer:kml1,title:'Layer 1'});          var kml2 = new esri.layers.KMLLayer('publicURL',{id:'kml2'});      boundLayers.push({layer:kml2,title:'Layer 2'});          var kml3 = new esri.layers.KMLLayer('publicURL',{id:'kml3'});      boundLayers.push({layer:kml3,title:'Layer 3'});          var kml4 = new esri.layers.KMLLayer('http://services.nationalmap.gov/ArcGIS/rest/services/nhd/MapServer',{id:'kml4'});      boundLayers.push({layer:kml4,title:'Layer4'});          dojo.connect(map,'onLoad',function(results){     if(legend){ legend.destroy(); }     var legend = new esri.dijit.Legend({      map:map,      layerInfos:boundLayers      },"legendBOUND");     legend.startup();      });          map.addLayers([kml1,kml2,kml3,kml4]);          dojo.connect(map,'onLoad',function(results){                  //add check boxes              dojo.forEach(boundLayers,function(layer){                        var layerNameB = layer.title;               var checkBoxB = new dijit.form.CheckBox({                 name: "checkBoxB" + layer.layer.id,                 value: layer.layer.id,                 checked: layer.layer.visible,                 onChange: function(evt) {                   var blayer = map.getLayer(this.value);                     if (blayer.visible) {                     blayer.hide();                   } else {                     blayer.show();                   }                                 this.checked = blayer.visible;                 }               });                    //add the check box and label to the toc               dojo.place(checkBoxB.domNode,dojo.byId("bounds"),"after");               var checkLabelB = dojo.create('label',{'for':checkBoxB.name, innerHTML:layerNameB},checkBoxB.domNode,"after");                 dojo.place("<br />",checkLabelB,"after");               });             });      Any thoughts?


title: Create circles using a formula

text: I am doing a project for a telecom company. I have to render circles on the map(assuming the center of the circle as tower and circle as the area covered by that signal), I am using base layers as Google Maps,Yahoo maps(Spherical Mercator) So I have used CreateGeodesicPolygon() successfully to create circles by reading the values from DB. Now Since I have to render lot of circles, it made me switch to geoserver. Since the data is being provided by telecom company , they provide Lat,Lon,Gt,Gr,Pt,Pr,lambda(I think their meaning is irrelevant here) values. These values are stored in the database as they are. Now should use a equation(FRIIS transmission equation) and substitute each row(of a tower) values to find the distance covered by the tower.Then I have to create circles with that distance(considered as radius) and lon/lat and render them on map using geoserver. Please suggest me any ideas of how to carry on this task.... I wud be thankful to your guidance * * * My Idea is to use these steps once I get distance from the equation.Will this work???               CREATE TABLE circles (cid int4,point_circle st_geometry);          INSERT INTO circles       VALUES(1,             ST_BUFFER(ST_GeomFromText('POINT(lon lat)',SRID),radius,'quad-segs=8')      );      Create a POSTGIS store in geoserver and this circles table as a layer.


title: In MapBasic, how do I register a table in XLS format that has a different range from one execution to another?

text: I need my application to be able to register an XLS table that does not have a set range. One time it may be A2:AL10000, the next it may be A2:AL2000, etc. I have not seen this anywhere in the reference manual. Any ideas?


title: How to improve the display of color images?

text: I've found some really nice color ramps for portraying rasters, but in ArcGIS and QGIS, they don't seem to be easily usable for a finished product because their complexity causes obvious steps rather than a smooth gradient. The raster renderer appears to be stuck at an 8-bit palette (only 256 levels), rather than a mathematical transform involving 24-bit standard RGB or deep 48-bit RGB. There's probably an awkward workaround involving splitting up the raster into multiple layers and symbolizing them separately, but I'd like to know which desktop and web GIS systems can present stretched/colorized gradients like this natively in a higher precision format.


title: Retrieving average building height in urban areas?

text: I am looking for a way to collect data on the height profile of some cities over time. I don't need to produce a detailed 3D reconstruction of cities, nor do I need to detect and measure individual buildings. I would simply need a coarse proxy of how "vertical" a city is - for instance, average building height, or maximum height. I have in mind a few possible options but I'm not sure how involved they are and what kind of software can do this:   * look at the difference between a DSM and a DTM - I am still looking into possible sources (ASTER?)   * LiDAR   * stereo imagery (e.g. IKONOS)   * retrieving building height from shadows – I think even an ArcGis extension does this, but this is not automated and would require a building by building process... * * * **_Update_** I was told that software such as Socet Gxp, Leica LPS/XPro, and Pixel Factory can generate height data from satellite imagery automatically. Has anyone heard of those or know of any open source alternatives?


title: CRS is UTM 51, the coordinates are shown in meters, show same coordinates as lat long as well?

text: We are working with a CRS of UTM 51N, the Philippines. The coordinates under cursor are shown as metric values. Clients however like so see the Latitude Longitude values when they move the cursor. Is there a way to display the cursor position in Latitude Longitude as well? Thank you Frederik


title: How to do spatial adjustment of Line features by edge snapping in ArcGIS?

text: I have two polyline features of same area which are prepared based on two different raster imagery. Hence the two features are not exactly matched and has some shift. How can I adjust them to overlay exactly one over the other? I attached the snapshot of the two polyline features. I want Rd2 in the below imagery to adjust with Rd1 while Rd1 remains unchanged. ![enter image description here](http://i.stack.imgur.com/94UDi.jpg)


title: SQL statements on a Geodatabase

text: I have converted a shapefile into a geodatabase which I use for geocoding via the ILocator interface. It has the extension (.mdb) and contains address fields with a point which is stored as a long binary object (I think). I have queried it directory using libraries like OleDB. I'm wondering if there's a way to do a `SELECT * FROM mytable` using the ArcEngine interfaces. I'll provide some context as well. I'm trying to get around the inflexibility of the SoundEx implementation and some limitations with the locator styles. The locator style interace works like this for address search results:               IField addressField = candidateFields.get_Field(fieldIndex);      But the fields returned only match the fields in the locator, so I get "Zone" and not city, state, zip, unit number, owner name, parcel price, etc.


title: What projection system for the entire world should I use to calculate distances ArcGis?

text: I've got two point shapefiles (A and B) that represent features all over the world, and I'm using Near (Analysis Tools-Proximity). I'm trying to calculate the distances between the points in layer A and layer B and I'm not obtaining the correct distance values. What projection system should I use? Thanks.


title: Labeling Issues in ArcEditor 10.0

text: ![enter image description here](http://i.stack.imgur.com/Fzvpy.jpg)ArcEditor 10.0 I am creating a map for a client for a whole state. I finish putting in all the shp files, I label what client requires. The shps I use are town/range/sections (TRS), Cities (point), lakes, rivers/streams and counties. The client wants the full state, last time, we split a different state into 3 parts to cut down on the size. This map is heavy with data and slow to generate when it is populating. **The PROBLEM IS** - The labeling of the Counties ONLY display within holes in the SECTION (of the twn/range/section). Holes meaning the supplied PLSS from geocommunicator has certain parts of the state without the T/R/S. The holes cover a Twn (township) (640ac). The other county names DO NOT appear at all. I've looked into my labeling and everything is normal, or looks normal. When I uncheck the SECTION of the t/r/s, the counties appear like they should... then when I re-check SECTION, the county names disappear except for the the few holes in the T/R/S they appear in. down below, you will see the example and what I am talking about. I watched it generate.. during the generation, the county names were correct, then suddenly, they disappeared and some went into the all-white sections. why? how do I fix it? What may be the cause of this and is there a solution?


title: How to access USGS national map viewer?

text: I know that I can use arcGIS to display the USGS national map viewer (aerial, raster, topographical, etc), but I will be using API for commercial use and it would cost $4,000. 1) Can I use openlayers to display the USGS national map? If so, please provide a link. 2) Does USGS have an API? If so, please provide a link. 3) If there are no free methods of displaying the USGS national map, what is the cheapest method to accomplish this?


title: Converting CIB data to Google Tiles with GDAL

text: I'm trying to convert CIB map data into Google compatible Tiles through the following process (in Linux, GDAL compiled from source):               gdalbuildvrt data.vrt A.TOC     gdal_translate -of VRT -expand rgba data.vrt data2.vrt     mkdir data     gdal2tiles.py data2.vrt data      gdal2tiles.py gives the following error: > Generating Base Tiles: ERROR 1: VRTSourcedRasterBand::IRasterIO() called > recursively on the same band. It looks like the VRT is refe   >  rencing itself. ERROR 1: IReadBlock failed at X offset 0, Y offset 0 ERROR > 1: VRTSourcedRasterBand::IRasterIO() called recursively on the same band. It > looks like the VRT is refe   >  rencing itself. ERROR 1: IReadBlock failed at X offset 0, Y offset 0 > Traceback (most recent call last):   >  File "/usr/local/bin/gdal2tiles.py", line 2241, in ? gdal2tiles.process() > File "/usr/local/bin/gdal2tiles.py", line 478, in process > self.generate_base_tiles() File "/usr/local/bin/gdal2tiles.py", line 1276, > in generate_base_tiles dsquery.WriteRaster(wx, wy, wxsize, wysize, data, > band_list=list(range(1,self.dataBandsCount+1))) File > "/usr/lib/python2.4/site- > packages/GDAL-1.8.0-py2.4-linux-i686.egg/osgeo/gdal.py", line 746, in > WriteRa   >  ster buf_pixel_space, buf_line_space, buf_band_space ) TypeError: not a > string I know my CIB data source is valid, am I missing an obvious step? Is this a user error or a bug in the GDAL software? Thanks so much for any help/opinions.


title: Highway Mile Markers to Lat and Lon?

text: Is there a way to search for highway mile markers on an existing mapping system and find the lat and lon?


title: Grass 6 extension installation in Grass 7 error

text: I am trying to install the extension r.roughness from the Grass 6 repository, but in Grass 7. When trying g.extensions, the error "make: _*_ No rule to make target `/home/peter_s/grass_data/CLB/CLB_June_2013/.tmp/Peter/8657.0/r.roughness/scripts/r.roughness.window.vector', needed by`script'. Stop.". When getting the extension from svn and compiling in the folder with $ make MODULE_TOPDIR=/usr/local/grass-7.0.svn/ I get a similar error: make: _*_ No rule to make target `/usr/local/grass-7.0.svn/scripts/r.roughness.window.vector', needed by`script'. Stop. Any ideas where the bug is? Thanks in advance!! Peter


title: Can ArcMap basemaps be used in figures intended for publication?

text: I'm wondering if the 'imagery' basemap available in ArcMap 10 can be used as part of a figure in a scientific publication? If it can't are there any alternatives, using QGIS for example?


title: How can I export or query all hospitals from Open Street Map?

text: I'd like to extract all the hospital locations in the US from Open Street Map as a reference for my geocoding project. I know how to get all the OSM data for a small area with the QGIS plugin but not sure how to query a larger area?


title: How can I display popup when graphic object is added in map using Arcgis Javascript

text: We have to display callout popup for each graphic object that are available on map. i.e if point is created on map, it should be associated with callout popup which will display information about that point graphic. No need to create on point to show popup. So if 5 point object are on Map, callout for all 5 point should be displayed at once when these are created. My question is how can I display such popup always for all points that are created on map?


title: ogr.GetDriverByName('FileGDB') returns None

text: I installed:   * gdal-110-1600-x64-core.msi   * GDAL-1.10.0.win-amd64-py2.7.msi   * gdal-110-1600-x64-filegdb.msi from www.gisinternals.com I can open my gdb on the command line:               C:\data>ogrinfo --version     GDAL 1.10.0, released 2013/04/24          C:\data>ogrinfo data.gdb     INFO: Open of `data.gdb'       using driver `FileGDB' successful.      In "C:\Program Files\GDAL\gdalplugins" I have a file named ogr_FileGDB.dll However, when I execute the following code:               os.environ['PATH'] = "C:\\Program Files\\GDAL" + ';' + os.environ['PATH']         os.environ['GDAL_DRIVER_PATH'] = "C:\\Program Files\\GDAL\\gdalplugins"     os.environ['GDAL_DATA'] = "C:\\Program Files\\GDAL\\gdal-data"          print os.path.exists(os.environ['PATH'].split(';')[0])     print os.path.exists(os.environ['GDAL_DRIVER_PATH'])     print os.path.exists(os.environ['GDAL_DATA'])          driver = ogr.GetDriverByName('FileGDB')     print driver      I get the following output:               True     True     True     None      It looks like the FileGDB driver does not work with Python. Did I miss something to install? Is it possible to print all available drivers of GDAL in Python? p.s. A similar questions was asked already: "How to Open a File Geodatabase with ogr? [duplicate]". It was marked as duplicate to "How to access feature classes in file geodatabases with Python and GDAL?". However, I think there ogr.GetDriverByName('FileGDB') clearly works.


title: Packaging succeeded but publishing failed. ArcGIS 10.1

text: I am trying to publish a map on server but I am getting this error:               **Packaging succeeded but publishing failed.**      It was all working fine before. I haven't change the IP address of the GIS server or anything. Any idea what might be the problem?


title: How to reduce time for 'Export to PDF' (or any other alternative to print maps) in Python?

text: For my work, I designed a tool to create PDF maps with large amount of data, intersected with 5 buffer rings using ArcPy. The job involves intersecting points, selecting points, generating Elevation for the points and distance from the order location (the centre of the buffers). The job works fine for single map and takes only 2-3 minutes. But some other requirements came up and now I am appending two more PDF to the original PDF but with different extents based on the ring radii. The job is taking as long as 8-9 minutes. If I create mapbook with data driven pages, it is not that slow. I have tried different resolution, it is somewhat efficient with less dpi but project manager is not happy about it. We are using 400 dpi instead of default 300 dpi. Also, Layers and attributes both are required for reports- though that change did not effect time that much. The scaling of tool is unknown too. The original design was meant for 1000 times uses in one month, but business is launching in another jurisdiction, so not sure about the number of uses down the road. And with more uses and longer run time- the tool will be running into 'Execution of job XXX failed because of crash or termination of the server object.' regardless of ArcGIS service time change. Has anyone used another PDF generation tool with in Python to generate maps?               if (country.lower()== 'xy'):                 scale = df.scale * 1.1                 df.scale = ((int(scale)/100)+1)*100                 MainTitleTextElement.text= "Map : "+ Buffer4 + " Mile Radius"                 outputLayoutPDF4 = os.path.join(scratch, 'mapExport4.pdf')                 arcpy.mapping.ExportToPDF(mxd, outputLayoutPDF4, "PAGE_LAYOUT", 640, 480, 400, "FASTER", "RGB", True, "ADAPTIVE", "RASTERIZE_BITMAP", False, True, "LAYERS_AND_ATTRIBUTES", True, 90)                  scale = df.scale * 1.1                 df.scale = ((int(scale)/100)+1)*100                 MainTitleTextElement.text= "Map : "+ Buffer3 + " Mile Radius"                 outputLayoutPDF3 = os.path.join(scratch, 'mapExport3.pdf')                 arcpy.mapping.ExportToPDF(mxd, outputLayoutPDF3, "PAGE_LAYOUT", 640, 480, 400, "FASTER", "RGB", True, "ADAPTIVE", "RASTERIZE_BITMAP", False, True, "LAYERS_AND_ATTRIBUTES", True, 90)                         outputPDF.appendPages(outputLayoutPDF4)                 outputPDF.appendPages(outputLayoutPDF3)


title: Configuration settings for loading a GML data on the browser in WFS Client

text: I try to develop a WFS client which connects a WFS Server listed at the dropdownlist.My development envoirment is .Net platfom and ı am using c# prg language. In additional, for geographical processes I am using MapExtreme development kit. My GML files are saved at the C directory of my computer. Too Small GML files are able to visualized in the browser, but large GML files are not.So,   I get introduced a loading problem for my local file in "C". My code is following like this. I don't know what proxyAddress should be writen ?                <system.serviceModel>         <bindings>           <basicHttpBinding>             <binding name="MyClientBinding" maxBufferSize="65536" maxBufferPoolSize="524288" allowCookies="false"  maxReceivedMessageSize="67108864"  messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered">               <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />                 <security mode="None">                 <transport clientCredentialType="None" proxyCredentialType="None" realm="" />                 <message clientCredentialType="UserName" algorithmSuite="Default" />               </security>             </binding>                </basicHttpBinding>           <customBinding>             <binding name="MyCustomClientBinding">               <binaryMessageEncoding />               <httpTransport proxyAddress="" useDefaultWebProxy="false" />             </binding>                   </customBinding>         </bindings>         <client>          <endpoint address="" binding="basicHttpBinding"               bindingConfiguration="DataServiceSoap" contract="ScsDataTransferService.DataServiceSoap"               name="DataServiceSoap" />         </client>       </system.serviceModel>       <system.net>         <defaultProxy useDefaultCredentials="true">           <proxy bypassonlocal="unspecified" proxyaddress ="" usesystemdefault="False"/>         </defaultProxy>


title: get style item name of one marker symbol

text: i used next code to load a symbol with specific style.. now i need to do the opposite operation.. i mean, i have one symbol and i want to know it's style. ## is it possible?               private ISymbol LoadStyleSymbol()     {         try         {             IStyleGallery styleGallery = new ServerStyleGalleryClass();             IStyleGalleryStorage styleStorage = styleGallery as IStyleGalleryStorage;             styleStorage.TargetFile = @"C:\Program Files\ArcGIS\Engine10.0\Styles\3D Billboards.ServerStyle";             styleStorage.AddFile(@"C:\Program Files\ArcGIS\Engine10.0\Styles\3D Billboards.ServerStyle");             IEnumStyleGalleryItem enumStyleGalleryItem = styleGallery.Items["Marker Symbols", @"C:\Program Files\ArcGIS\Engine10.0\Styles\3D Billboards.ServerStyle", ""];             enumStyleGalleryItem.Reset();             IStyleGalleryItem styleItem = enumStyleGalleryItem.Next();                  while (styleItem != null)             {                 if (styleItem.Name == "Red Pushpin 4") break;                 styleItem = enumStyleGalleryItem.Next();             }                  ISymbol pSymbol = styleItem.Item as ISymbol;                  return pSymbol;         }         catch (Exception ex)         {             MessageBox.Show("error 8, " + ex.Message);             return null;         }     }


title: ArcPad 10 Performance Tips

text: I've encountered some performance issues when developing in ArcPad 10. The first is the loading of the map file. It takes 1 minute with sample data, and once opened each form takes 1 to 2 sec to be displayed, especially when the form contains comboboxes filled from other tables. But it takes 5 sec for some complex geometric calculations including search in all the features. (I think that this delay could increase with data size.) I think that this performance is due to a large geodatabase including 20 layers with just 6 visible layers. The invisible layers are more like related tables. I used related tables in this way to avoid some design limitations in exporting related tables to ArcPad. **The Question:** Can a large number of invisible layers reduce ArcPad performance? What could I do to improve the performance of this ArcPad Application?


title: How to prevent the user from moving the feature?

text: I want to prevent the user from moving the feature in ArcMap when editing. I used `OnChangeFeature` event but it does not work.               void m_editEvents_OnChangeFeature(IObject obj)             {                 m_editor.AbortOperation();             }      The `OnChangeFeature` event fired after moving the faeture.


title: How to convert multiple rasters to new raster (mosaic)?

text: I want to use **Mosaic To New Raster** in ModelBuilder. I want it to give me multiple outputs because I have multiple folders with a different number of images in each. Below is the model that I have already tried. ![enter image description here](http://i.stack.imgur.com/OAywb.png)


title: Unable to create a geometric network in a PostgreSQL Spatial Database Connection

text: I've created in ArcCatalog a Spatial Database Connection to an PostgreSQL database server. I've imported there all my data (from a local hard drive) and now I want to edit them. But apparently I cannot build a geometric network, neither a topology in my Feature Dataset. The error message is like this: > "Cannot create geometric network. The selected feature dataset does not > contain any feature classes which can participate in a new geometric > network" . This usually happens when you have either a topology or a geometric network, but I have neither. I use postgreSQL 8.3 / ArcGIS 10.0 / ArcSDE for PostgreSQL 10


title: Leaflet Draw Popup text unselectable in Chrome

text: I have a map here: http://maps.gcc.tas.gov.au/measure.html I have some simple popups happening, and it's working well. But, I can't select the text for markers when using Chrome or Firefox. This does work in IE, funnily enough. What is going on?


title: How to add a progress bar to an ogr2ogr script

text: Hello GIS Folks, We have started using ogr2ogr to upload MapInfo tables into Microsoft SQL server in my workplace. Some of the tables are massive (>1,20,000 records) and there is no way of knowing how far the script has progressed without a status bar. I was wondering if there is a command that can be used within the ogr2ogr script which actually tells us how much more of the processing is still left/pending (e.g. 50% complete etc.). Any help would be greatly appreciated. Thanks.


title: How to render GPX files in TileMill?

text: I want to show a number of GPX files in a TileMill map. Here's the process that I thought would work:   1. gpsbabel -i gpx -f "$myfile" -o kml,lines=1 -F "$myfile.kml"   2. Add as layer in Tilemill, style with `line-width: 2;` and voila. But no. Only points are being rendered, not the lines between them. The generated .kml files contain `<linestring>` elements, which I would have thought is the key:                   <Placemark>           <name>Path</name>           <styleUrl>#lineStyle</styleUrl>           <LineString>             <tessellate>1</tessellate>             <coordinates>               146.153490,-38.211270      Is the problem a shortcoming at the TileMill end, or something in how I'm converting the files? Unfortunately none of the other formats supported by TileMill (GeoJSON, Shapefiles...) are supported by GPSBabel. Other options? I'm using PostGIS, so a way to load them straight into the database would also be fine.


title: How to create multiple buffers around line at equal intervals without typing in every value?

text: I have a line in ArcMap 10.2, and want to create lines to the right of it at 100 m, 200 m, 300 m etc. up until 1.7 km. Obviously typing in these values under 'multiple ring buffers' will take too much time. Is there a way for ArcMap to compute this automatically across the equal intervals? If you could answer through basic ArcMap methods that would be great. I do not understand the coding language that some of you use!


title: Spatial Precision for Editing in Multiple GIS Clients

text: I have something I'd like to discuss, I'll try to explain it first, why it's important, and I'll explain how ArcGIS handles the issue, which I think is a good way to handle it. Finally I'd like to know what you think. The issue is this: Many GIS editing software packages can edit many data formats. Each data format handles precision differently, for example, SHP format stores a double precision coordinate. SQL Server does the same, a 64 bit double. PostGIS seems to do the same. MapInfo's .TAB format apparently uses a 21 bit int to store a point as a linear interpolation between bounding coordinates. There will obviously be others. Editing software may have internal data structures whilst carrying out operations, and will then write to the end data store e.g., MapInfo linked tables store a value on a (for us, a 1 mm) grid, and push to the database, which stores it as a double precision float. If you edit in mixed environments, then you can start getting inconsistencies where a feature with coordinates that were created off a grid (with doubel precision) are then edited in software that uses a grid (in mm precision). For example, I create a layer in SQL Server, add features in QGIS, then edit one of the vertices of one feature in MapInfo, that feature now gets all its coordinates snapped to the 1 mm grid, which means it doesn't align to neighboring features any more (the errors in my test were ~0.2 mm). ArcGIS handles precision when using a database layer by keeping track of xy_resolution (see here for more on xy_resolution and xy_tolerance) explicitly. This seems the best way of handling it, since the coordinate precision is explicitly controlled (the default is 1 mm). When editing in MapInfo with carefully specified bounds you snap to a 1 mm grid implicitly, so this is sound too. My question is: How do you or your organisation handle editing in order to maintain topology, keeping in mind different sources with different precisions? And as a secondary question, should editing tools, such as QGIS, include an option to use a defined coordinate precision or should we do it on data format, with a database trigger or MapInfo's bounds? Regards, Alex --Further Details follow: I have two images, one of the shape I'm editing, one of the error introduced if editing with different precisions. I also have numbers showing what is being written to SQL Server when you move the central point in two different softwares. QGIS               POLYGON ((520191.61484399455 5259827.5143016046, 521146.0563152277 5259917.96005114, 521015.6907808886 5260649.8136086222, 520329.84600000043 5260729.1830000039, 520191.61484399455 5259827.5143016046))     POLYGON ((521146.0563152277 5259917.96005114, 522006.03708566393 5259775.4479602445, 522021.9278674855 5260443.1099995337, 521015.6907808886 5260649.8136086222, 521146.0563152277 5259917.96005114))     POLYGON ((521938.09510281781 5258959.9356564963, 522006.03708566393 5259775.4479602445, 521146.0563152277 5259917.96005114, 521194.71867216442 5258970.2782813907, 521938.09510281781 5258959.9356564963))     POLYGON ((521194.71867216442 5258970.2782813907, 521146.0563152277 5259917.96005114, 520191.61484399455 5259827.5143016046, 520191.61484399455 5259827.5143016046, 520287.61066861876 5259041.6976504158, 521194.71867216442 5258970.2782813907))      MapInfo               POLYGON ((520191.615 5259827.514, 520842.732 5259437.788, 521015.691 5260649.814, 520329.846 5260729.183, 520191.615 5259827.514))     POLYGON ((520842.732 5259437.788, 522006.037 5259775.448, 522021.928 5260443.11, 521015.691 5260649.814, 520842.732 5259437.788))     POLYGON ((521938.095 5258959.936, 522006.037 5259775.448, 520842.732 5259437.788, 521194.719 5258970.278, 521938.095 5258959.936))     POLYGON ((521194.719 5258970.278, 520842.732 5259437.788, 520191.615 5259827.514, 520287.611 5259041.698, 521194.719 5258970.278))      ![An image of a polygon that demonstrates errors](http://i.stack.imgur.com/Z3IQu.jpg) Polygon that was editied, the central point was moved. ![An example of an error](http://i.stack.imgur.com/R3xHN.jpg) The resulting difference after editing in MapInfo, the dataset is no longer topologically correct.


title: Bring trails onto a Garmin nuvi GPS

text: I seem to be having a lot of trouble uploading Utah Trails onto my nuvi 50 GPS. Is it not possible? The Black hills national forest has a img file that is able to be loaded onto the GPS, but the maps I have for Utah, are in kmz. I have converted them into a gpx, and QGIS tries to upload them, but it seems that the only thing that goes across is way points. Do I need to convert it to an img files? Is there a way to do this in QGIS or something else? Thanks for any help, I am not sure how many hours I have spent spinning my wheels here.


title: How is slope of a surface in an arbitrary direction produced?

text: I am currently developing a program that requires that I calculate the slope for each cell in a DEM. However when I try to understand the algorithm to be used I get stuck trying to understand exactly what is going on. The slope algorithm in question is the one detailed in the article _Hillshading and the reflectance map_ (Horn 1981 p. 20-21). The algorithm is also explained here I understand how the average height factors for the x and y direction gets calculated and I also understand that the factors have to be combined if the slope of the surface in an arbitrary direction is to be established. I dread that the part which keeps troubling me is probably the easiest. The part I do not understand is why the Pythagorean theorem is used When the two factors are combined into a single average value? Both dx and dy will be values rising towards z, so how can the Pythagorean theorem be applied to two lines along the same axis? I've tried to visualize the dx and dy values as three-dimensional vectors with dx being (1, 0, dx) and dy being (0, 1, dy). Adding these two vectors together produces the two sides in a right triangle where the hypotenuse will be equal to the answer the equation is supposed to give me. I am then left with the hypotenuse vector as the rise and that just feels wrong when I attempt to perceive it as the rise. Am I misunderstanding something here?


title: Copying/Projecting featureclass into a database and featuredataset of the same name fails

text: I've written a script in Python for ArcGIS 10.1 in order to migrate from an outdated coordinate system to a newer one while at the same time updating from personal geodatabases (.mdb) to file geodatabases (.gdb)- Everything works fine except: When the tool tries to copy OR reproject (which I guess has to copy data as well) from a database containing a feature class with the same name as the featuredataset it fails, giving a 000171 Error 'Failed to open output workspace. Changing the name of the feature dataset to something else will make it work (i.e. database.gdb\different\same Changing the name of the feature class to something else will make it work (i.e. database.gdb\same\different) I can see an easy workaround by just renaming stuff a couple of times, but I want to get to the bottom of it if possible- It's a very fringe case that doesn't affect many of the databases so I want to avoid more code just to handle this case if possible. It seems OK to create these duplicate names using normal methods (i.e. ArcCatalog won't stop you) and the inbuilt geo- processing tools in ArcToolbox (i.e. Project) don't fail in the same situation....it's just the arcpy library it seems? (edit code added - Thanks to KimOs suggestion, the copy portion under the else statement now works- The projection still doesn't. All data has its projection defined correctly.)                           FCs =arcpy.ListFeatureClasses('*','All',dataset) # list feature classes within this feature dataset                 arcpy.AddMessage("Found these feature classes: " + str(FCs))                 for FC in FCs: # for the feature classes within a feature dataset                     descFC= arcpy.Describe(FC)                     if descFC.spatialReference.name == 'GD_1949_New_Zealand_Map_Grid': # reproject only NZMG data                         arcpy.AddMessage(FC + " is NZMG, reprojecting to: " + newFD + descFC.baseName)                         logging.info(FC + " is NZMG, reprojecting to: " + newFD + descFC.baseName)                         arcpy.Project_management(FC, newFD + descFC.baseName, prjFile, 'New_Zealand_1949_To_NZGD_2000_3_NTv2', descFC.spatialReference)                     else: # else just copy it across                         arcpy.AddMessage(FC + " is in " + str(descFC.spatialReference.name) + " , copying instead: " + newFD+ descFC.baseName)                         logging.info(FC + " is in " + str(descFC.spatialReference.name) + " , copying instead: " + newFD+ descFC.baseName)                         arcpy.Copy_management(FC,newFD + descFC.baseName, "FeatureClass")


title: QGIS - is it possible to write a plugin for xulrunner

text: i want to write a plugin for a xulrunner application, to show a map generated by QGIS. Maybe it's better to describe this a little better ;) Can I write a cpp programm, which allows me to show a QGIS map inside of an iframe? It seems to be able to create a QgsMapCanvas object, but shouldn't I be able in Windows to hang it into a window or something !? Again, this should not end in a plugin for QGIS but for my own application.


title: Download only country and city data from OSM

text: I want to download a list of all countries on this planet from OSM. Also, for selected countries, I would like to have states and cities. How can this easily be achieved? There must be an easier way that to download the whole planet and iterate through all nodes, ways and relation, checking for each whether it maches my criteria, I hope...


title: Wrong Coloramp function in ArcGIS 10.2.1

text: I want make elevation map use new method Learn a new method ![enter image description here](http://i.stack.imgur.com/O3G0N.png) But i have problem with _Coloramp function_ whatever the choice of color ramps. ![enter image description here](http://i.stack.imgur.com/SjbIC.png) What's wrong?


title: Is there a way to make Google Earth only display the outline of continents?

text: I want to do a visualization in Google Earth and I don't want to see all the different colours of the satellite images. Instead I'd like just the outline of the continents/coastlines, maybe a colour distinction between land and water, but that's it. Is there a way to set Google Earth so it doe this? I don't want any textures, just solid colour preferably. Like the ocean floor, I'd like to not see that. Same with land, just one colour would be preferable.


title: Where exactly are qgis.gui and qgis.core located?

text: I'm trying to create a standalone qgis app using pyqgis, i'll be deploying it by copying the install folder of qgis and source folder of my app, and so for the testing purposes i copied qgis install folder (1.8.0) to some other computer without qgis installation to begin with; then i tried to test the qgis.gui and qgis.core imports, but no matter what PYTHONPATH (or PATH) i set, i keep getting ImportError "no module named ...". What's wird is, if i modify qgis.bat to this new location and run it, Qgis opens without a problem and all imports work through console inside qgis. Then i simply duplicated qgis.bat and removed the last line which runs qgis then added the line which runs my application instead. For some reasons, imports are still unavailable, so im wondering where are actual python binding files for qgis_gui.dll and qgis_core.dll because i cant find them anywhere inside qgis install dir. My .bat looks like this:               @echo off     SET OSGEO4W_ROOT=c:\IMS\Qgis     call "%OSGEO4W_ROOT%"\bin\o4w_env.bat     call "%OSGEO4W_ROOT%"\apps\grass\grass-6.4.2\etc\env.bat     @echo on     PATH %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-6.4.2\lib;%OSGEO4W_ROOT%\apps\qgis\python\qgis;     SET PYTHONPATH = c:\IMS\QGis\apps\qgis\bin\     python c:\IMS\IMS\ims.py


title: Comparing table attributes in ArcGIS 10(ArcInfo)

text: I'd like to compare attributes of two point layers . the layers have some similar records and i try to find these . ArcGIS 10.1 has a tool to comparing attributes but i could'nt find any similar tools in ArcGIS 10 . How can i compare two attribute and find similar records?


Is it possible to define a part of a geometry column as the Primary Key in a PostGIS database? For example, when I want to store 3D points in a database, using the x/y coordinate as the primary key. Thanks for helping!


title: Reclassify raster values of 9999 to NoData, leaving all other values alone, in ArcGIS

text: I've got a really stupidly simple question, but I can't seem to work out how to do it. I have a raster in ArcGIS which has a number of cells with the values 9999, showing that the data could not be generated for that cell. I want to convert all of these 9999 values to NoData, so that then I can do statistics on the dataset without getting crazy results. How should I do this? I have tried to use the reclassify tool, just adding one reclassification from 9999 -> No Data, but it seems to change all of the other values as well. Is there a way to do a reclassification which only does the changes you specify, and leaves all other values alone? In case it matters, my dataset is a TIFF, with floating point values in it.


title: How do I use base layer of two different projection Spherical Mercator and WGS84?

text: How do I add baselayer with two different projection? I have added overlayer with a different projection(EPSG:4326), but I need to add base layer with various projection   1. Google Map    2. My vector layer with EPSG:4326 projection I can see everything is fine with google map but when I switch base layer to EPSG:4326 layer everything is white.               window.onload = function init(){                     var lon = 84;                     var lat = 28;                     var zoom = 8;                     var url = "http://10.6.7.6/geoserver/wms";                          var mapControls = [                         new OpenLayers.Control.Navigation(),                         new OpenLayers.Control.PanZoomBar(),                         new OpenLayers.Control.LayerSwitcher({'ascending':false}),                                                new OpenLayers.Control.ScaleLine(),                         new OpenLayers.Control.MousePosition(),                         new OpenLayers.Control.OverviewMap(),                         new OpenLayers.Control.KeyboardDefaults()                     ];                          var map = new OpenLayers.Map(                     'map',                      {                                numZoomLevels: 21,                         projection: new OpenLayers.Projection("EPSG:900913"),                         displayProjection: new OpenLayers.Projection("EPSG:4326"),                         controls: mapControls                      });                               var dsb = new OpenLayers.Layer.WMS(                      "Nepal Border",                     url,                                     {layers: 'GisData:IR'}                                         );                            var gmap_gs = new OpenLayers.Layer.Google(                     "Google Streets",// the default                      {'sphericalMercator': true}                                       );                                         var dG = new OpenLayers.Layer.WMS(                      "2G Down Sites",                     url,                      {layers: 'GisData:dG', transparent: "true",format: "image/png"},                     {                         isBaseLayer: false,                         buffer: 0                     });                               map.addLayers([dsb, dG,gmap_gs]);                     var proj = new OpenLayers.Projection("EPSG:4326");                     var point = new OpenLayers.LonLat(lon,lat);                          point.transform(proj, map.getProjectionObject());                          map.setCenter(point, zoom);                      }


title: Solving flagrant shared object errors when compiling postgis 2.1SVN from source on Ubuntu 12.04

text: I have spent the past few days of my life trying to figure out how to get postgis to function properly with a non-standard directory installation of postgres 9.3, but have been unable to resolve the following obnoxious errors:               ERROR:  could not load library "/pginstall/postgresql93/lib/postgis-2.1.so": libgeos_c.so.1: cannot open shared object file: No such file or directory          ********** Error **********          ERROR: could not load library "/pginstall/postgresql93/lib/postgis-2.1.so": libgeos_c.so.1: cannot open shared object file: No such file or directory     SQL state: 58P01      I installed geos,gdal and postgres into contained directories in order to be able to update components without needing to manually find individual files and remove them. Thus my libraries would be located in the following installation directories:               /pginstall/postgresql93/lib     /pginstall/gdal110/lib     /pginstall/geos34/lib      All other dependencies are installed using standard apt packages and I am using the standard build-essential package. I tried setting various environment variables                   export LD_LIBRARY_PATH=/pginstall/geos34/lib:/pginstall/gdal110/lib         export LDFLAGS="-Wl,-rpath,/pginstall/geos34/lib/,-rpath,/pginstall/postgresql93/lib,-rpath,/pginstall/gdal110/lib"         export LDFLAGS="-Wl,-L,/pginstall/geos34/lib,-L,/pginstall/postgresql93/lib,-L,/pginstall/gdal110/lib"         export LDFLAGS="-L/pginstall/geos34/lib -Wl,-rpath,/pginstall/geos34/lib"         export LDFLAGS="-Wl,-rpath,/pginstall/geos34/lib/,-rpath,/pginstall/gdal110/lib"      But they all failed to work with the configuration below               ./configure \         --prefix=/pginstall/postgresql93 \         --with-pgconfig=/pginstall/postgresql93/bin/pg_config \         --with-geosconfig=/pginstall/geos34/bin/geos-config \         --with-gdalconfig=/pginstall/gdal110/bin/gdal-config \         --with-topology \         --with-raster      I did manage to get this woking by adding the LD_LIBRARY_PATH variable to my upstart configuration for postgres --but this is a crude hack and is clearly not suitable for any kind of pre-production or production environment. I don't want to go the ldconfig route either as that requires root access. I can verify that this issue is that the postgis configure process is ignoring my direct commands to add the paths to the binaries, by running the following command:               chrpath -l /pginstall/postgis/postgis-2.1.0SVN/postgis/postgis-2.1.so      which yields               RPATH=/pginstall/postgresql93/lib      The LDFLAG commands work when compiling GDAL with GEOS and Postgres, so I believe this is a postgis specific issue. I have no idea what else I can do as I am not a c compiler expert, nor should I need to be to perform this simple task on the OS upon which postgis was developed! One would assume that postgis should know where the libraries are given that I set them explicitly in the configure step and after concurrently setting LD_LIBRARY_PATH and LD_FLAGS. This is pretty depressing. What more should one need to specify? Does anyone know of a simple way to fix this issue? As a side note I am glad I program in Java, as properly building from source in C basically seems to follow the steps below: 1) Hope configure/make/make install just miraculously work 2) Upon inevitable failure, set random environment variables that each have 6.022E^23 contradictory explanations for its function on the internet for each operating system --and are sourced from. 3) Upon inevitable failure, Sacrifice a macbook to the gods of C 4) Consign yourself to your grim fate and download a mostly broken and ridiculously out-of-date package from apt instead.


title: OpenLayer and not well formed Json

text: I am learning to use GeoExt and OpenLayers, and I want to reproduce one of the examples given at the geoExt website. The script call a GeoJSON containg the position of Alp summits. I downloaded it via wget and put it in data/summits.json. I copy pasted the javascript file in a local folder, but when I run it in Firefox, I get a not well formed error. I got the same error with several other examples involving a json file. I looked for similar problems on the web, but couldn't find an answer. What am I missing? The part of the script adding the layer from the json file is               var summits = new OpenLayers.Layer.Vector("Summits",{         strategies: [new OpenLayers.Strategy.Fixed()],         protocol: new OpenLayers.Protocol.HTTP({             url: "data/summits.json",             format: new OpenLayers.Format.GeoJSON()         }),         styleMap: new OpenLayers.StyleMap(new OpenLayers.Style({},{rules: rules}))     });      I used the same bit of code in several other examples provided by the website (modulo the styleMap part) with always the same error. Thanks


title: Interactive Gis application

text: I'm developping an interactive web(HTM5) gis application wich the user draw an element(circle for example)and extract data from base map(Open Street Map).The features would be: 1º Base Map like OSM. 2º Control panel to draw a circle (in leaflet.draw). 3º Representation of selected objects within this circle area. 4º Save the selected objects into a variable. The application would focus on census data where the user gets the number of people within that area. Thank you very much.


title: Network trace using attribute as a stop/barrier - ModelBuilder

text: I have two point datasets, one to be used as the flags(starting point) that i'll call dataset A and one as the barriers(stop point) that i'll call dataset B, in the trace(downstream) tool. In each of these datsets, there is an "EventKey" field that correspond between the two datasets. I would like the trace to stop when the two fields correspond. That is to say when a trace is started from a point in dataset A with an EventKey attribute of 100, it should end at the point in dataset B where the EventKey attribute is 100. By default, the trace tool stops at the first barrier it encounters. This can probably be done relatively easily in Python but since I don't have any Python experience, I'm wondering if/how this can be done in ModelBuilder. I have the model already setup but as I said, the trace stops at the first barrier point encountered. Ultimately I need to calculate the distance between each of these traces but I think I've got that figured out. I just need to figure out how to get the trace to stop when the EventKey attributes match.


title: How to adjust QGIS attribute table view column width using Python?

text: I'm programmatically opening the Attribute table via Python through a plugin. All of the columns have a default width, but some of the data that I'm using do not fit. ![Default column width](http://i.stack.imgur.com/2jLK1.png) It's not enough to be able to click the column separator to make the column re-size to fit the data as there are several columns and several layers. Can I, through Python, change this in any way, or is my only option to create my own table in Qt?


title: TabContainer ArcGIS API for JavaScript

text: I am a novice programmer, but I know enough to be dangerous. Here's my issue and hopefully someone knows the answer. I am developing an application with 4 tabs on the left and a map from ArcGIS Online(AGOL) on the right. What I want to do is when tab1 is active (focused), I want the webmap to be webmap1. When the user clicks tab2 I want the webmap to change to webmap2, and so on. This is seemingly a simple task, but I cannot find enough documentation to understand how to make this happen. Here's a bit of code starting the initial map that works correctly: var webmap = "e1cff258e4674ab1985e2303106b0cc8"; arcgisUtils.createMap(webmap,"mapDiv").then(function (response){ map = response.map; }); What if want is to make myvariable webmap dependent upon the active tab: var webmap = (if tab1.active){"e1cff258e4674ab1985e2303106b0cc8"} (else if tab2.active){"3dea9137545e41eb8d4877ac8970294f"} etc. etc. etc.... Does someone have any idea how to do this?


title: Reprojecting basemap in arcgis 10.1

text: Is it possible to reproject a basemap in ArcGIS 10.1 into a customized spatial reference (and if so, how ?) ? I want an OpenStreetMap basemap to fall into my local SR. Done some research on the internet and all can find is reference to this issue. Thanks.


title: Problems converting polygon to point

text: I'm trying to convert polygons to points with ArcGIS 10. My polygon layer has 2 attributes that I want to give to my point layer. I'm using the _Feature to Point_ function from the Arctoolbox, but it always results in certain polygons having two or more points. I tried without and with the _inside_ option. Anyone have a solution? Thanks


title: Automatically assign numbers to point file in various order in QGIS

text: I know how to automatically assign numbers to a new point files using the $rownum function in the field calculator. However it does it from the top-left over and down like reading a book. I could manually add the numbers myself that would be very time consuming in large point features. What I'm wanting to do, as shown in the picture, is the top-left group of points to have them labeled 1 to 33 and the bottom-right group from 34 to the end. Also, if I wanted to label the points vertically and start at the furthest top-left point and go down and then to the right, how would that be accomplished. I'm sure that there is just some "code" I need to put into the field calculator but I do not know how. ![enter image description here](http://i.stack.imgur.com/MNXd2.png)


title: R Raster package: write NetCDF with time dimension

text: I am writing a rasterbrick with multiple layers to a netcdf file using the raster package in R:               writeRaster(gridfile, "Data", "CDF", overwrite=TRUE,          varname="Data",varunit="mm.d-1",longname="Monthly data",          xname="lon",yname="lat", zname="time", zunit="month",bylayer=FALSE,NAflag=-9999)      Is there a way to have the data with time coordinates in the written ncdf file? E.g. in the NetCDF Viewer Panoply I can plot the data in [lon][lat] but not in [time][lat]. Also how can specify the timesteps as specific months in a year instead of the timesteps starting from 1 and increasing?


title: Postgis invalid geometry from shape file

text: I'm having trouble converting a Feature class (shape file) to a DB table (Postgresql 8.4/Postgis 1.5). This is the command in the pg log:               INSERT INTO "public"."distritos" ("Shape" , "DEPARTAMEN" , "DISTRITO" , "CODIGO" , "COD_DPTO" , "COD_DTO" , "Departam_1" , "Codigo_de" , "Codigo_Dis" , "Distrito_1" , "uno" , "dos" , "tres" , "cuatro" , "cinco" , "seis" , "siete" , "ocho" , "nueve" )      VALUES (ST_GeomFromEWKT('SRID=32721;MULTIPOLYGON(((468800,82617047 7197312,28691447,467497,41696333 7195434,36685706,467565,26527912 7195335,31905228,467296,09588678 7194813,80725757,467319,59506391 7194417,01803403,467319,95651934 7194268,2014959,467004,71721878 7194168,22045301,466712,139403 7194018,68218605,466667,50146617 7193844,95114294,467209,8235828 7193226,21075235,467661,31307484 7192880,06289891,467910,40970103 7192359,79788845,468699,92768015 7191964,81222265,468499,24533509 7191071,4368485,468365,76444857 7190351,83660322,468231,1250694 7190128,29180745,468366,4653957 7190054,20220858,469066,98539115 7189113,31955145,468864,42575667 7189038,44226612,469788,59217212 7188767,72054056,469699,21918869 7188445,07983016,469632,99209906 7187849,65727227,469656,97413566 7187204,83207603,469817,5905674 7185890,63104716,469867,52349147 7185319,22773178,468658,38379028 7185473,92740897,468281,64633634 7185334,60849811,467946,03954144 7185518,38747909,467864,29364035 7184664,52165417,468578,10776462 7183974,04907692,468576,84476232 7183964,76873693,467850,72183629 7184116,36272805,466947,26662547 7184528,34839159,466307,65830413 7184671,72000468,465705,79829264 7184753,03027828,464050,58816321 7184997,20364955,460758,35671061 7185629,95806058,459598,39686437 7185756,39088849,459584,64610774 7186449,86186351,459512,1106813 7186726,02330998,459529,6194157 7186864,26621989,459672,31399859 7187101,59313871,459868,61595652 7187398,30309252,459921,98283708 7187536,65250183,459777,56301254 7187871,82433671,459830,45824535 7188168,10380134,459864,60163032 7188740,7062706,459899,22006775 7189155,37865539,459808,68924671 7189451,22853258,459807,68483849 7189786,82870513,459842,48190044 7190142,27717342,459733,95380801 7190457,81384916,459482,03178327 7190753,17659113,459301,94405746 7191009,26976572,459300,98741755 7191325,12827641,459444,14396157 7191424,26771655,459434,89415553 7191479,24185981,459407,62422337 7191641,31205099,459281,73981899 7191759,37921654,459209,59092453 7191897,34972155,459208,51266 7192252,69017678,459405,00121258 7192509,92191899,459565,03627605 7192964,4539174,459563,96787252 7193319,79381075,459509,68905576 7193477,56074018,459402,25978609 7193418,01306848,459312,40766142 7193476,96540262,459347,85936272 7193615,26155219,459490,92206147 7193753,88206627,459723,54561042 7193932,25194962,459776,87924731 7194090,34158007,459758,35330869 7194287,69871478,459703,89574359 7194504,68947562,459451,36363753 7194977,72079297,459486,88043962 7195096,27519058,459508,16711412 7195351,19389149,459716,08581899 7195330,37151154,459859,92260493 7195267,56277112,460289,23283441 7195822,17211768,460746,94183859 7196503,32621195,461264,75648828 7196283,49170009,462458,26481436 7195875,82382738,462571,47391096 7196492,71121886,462585,26895696 7196698,27350941,462999,5015449 7197568,94136003,463629,77909065 7198266,2751827,463945,2384375 7198504,26499931,464174,70859224 7198662,97159595,464332,38354865 7198805,67493153,464389,52329338 7198932,30168348,466710,77963525 7200491,45106002,467417,10391212 7199434,2790907,468426,39704753 7197961,13654758,468800,82617047 7197312,28691447)))') ,      'CENTRAL', 'ITAUGUA', '1106', '11', '06', 'Concepcion', '01', '06', 'San Lázaro', 2, 4, 4, 4, 4, 4, 4, 4, 4)      And the error I'm getting is:               ERROR:  parse error - invalid geometry     HINT:  "SRID=32721;MULTIPOLYGON(((468576," <-- parse error at position 33 within geometry      Any ideas?


title: How to convert SHP into GPX or JSON?

text: I would like to convert the _tree inventory_ shape files of London (Canada) into a **GPX** file and if possible into a **JSON** file. You can download the archive from their Open Data website. It contains the following files.               READ_ME.txt     TREEINV_SPECIES.xml     TREEINV_SPECIES.xsd     TREES.DBF     trees.gpx     trees.sbn     trees.sbx     trees.shp     trees.shp.xml     trees.shx      Today, I stumbled into ogr2ogr and tried the following command.               $ ogr2ogr -f GPX trees.gpx trees.shp      Though, the following error occurs.               ogr2ogr ERROR 1: Latitude is invalid. Valid range is [-90,90].       This warning will not be issued any more      I already found a similar question but cannot figure out what the problem is. Please mind, I am totally new to the topic of converting geographic data. If you know any better tool I am willing to try it out. * * * **EDIT: An initial success story.** According to the answers of Aragon and Brent Edwards I came up with the following commands. I found a webpage stating that data can be ordered in NAD83. So I assume that the dataset I am trying to convert comes as NAD83 as well. However, I cannot understand how I can find out the EPSG resp. SRID myself. With the given information I can lookup EPSG:26917 in the EPSG Geodetic Parameter Registry - but if I have no clue what the number is - how would I do that?               $ ogr2ogr -f GeoJSON -s_srs EPSG:26917 -t_srs EPSG:4326 trees_coordinates.json trees.shp     $ ogr2ogr -f GeoJSON -s_srs EPSG:26917 TREES_properties.json TREES.DBF      The converted GeoJSON files contain the following data.               // Example rows from trees_coordinates.json     {     "type": "FeatureCollection",     "features": [     { "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ -81.233494, 42.994146 ] } }     ,     { "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ -81.232346, 42.994477 ] } }     ,     { "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ -81.232176, 42.994527 ] } }     ,     { "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ -81.245137, 42.971636 ] } }     ,     { "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ -81.189495, 42.996498 ] } }     ,     { "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ -81.189651, 42.996442 ] } }          ]     }      And ..               // Example rows from TREES_properties.json     {     "type": "FeatureCollection",     "features": [     { "type": "Feature", "properties": { "TREEID": 19.000000, "DIAMETER": 53.000000, "SPECIES": "MASU" }, "geometry": null }     ,     { "type": "Feature", "properties": { "TREEID": 23.000000, "DIAMETER": 30.000000, "SPECIES": "MANO" }, "geometry": null }     ,     { "type": "Feature", "properties": { "TREEID": 24.000000, "DIAMETER": 53.000000, "SPECIES": "MASI" }, "geometry": null }     ,     { "type": "Feature", "properties": { "TREEID": 104920.000000, "DIAMETER": 5.000000, "SPECIES": "OAWH" }, "geometry": null }     ,     { "type": "Feature", "properties": { "TREEID": 60358.000000, "DIAMETER": 34.000000, "SPECIES": "MAMA" }, "geometry": null }     ,     { "type": "Feature", "properties": { "TREEID": 60355.000000, "DIAMETER": 51.000000, "SPECIES": "MASU" }, "geometry": null }          ]     }      **Questions:**   1. Are my commands correct?   2. How can I match the rows of both files? Which property set belongs to which GPS position? Is their a way to combine both in one file? I saw another format that includes all information in one file.   3. How can I find out the EPSG/SRID and SRS in general if I have nothing more than those files listed in the beginning of my question?


title: Why do most Area Calculation result in 0?

text: I would like to autocalculate area (acres) for a shape file that is in UTM zone 16 CRS. I have tried the "Vector|Geometry Tools|Add/export geometry columns" and also the field calculator. The first gives me a warning saying               currently QGIS doesn't allow simultaneous access from threads to the same data source.     Make sure your layer's tables are closed. Continue?      When I click `YES`, it creates two new columns `AREA` & `PERIMETER`.   * The AREA column is mostly 0's with a few values such as 2e-06 and so on.    * The PERIMETER column gives mostly values along the lines of .003526 and so on.  **Questions:**   * What is the warning it is giving me and why are the values so sporadic?   * Also when I use the field calculator tool, it seems to give me values close to what the field area should be but when I click SAVE EDITS all the values turn to 0's. What am I doing wrong? Thank you in advance for your help.


title: PROJ4 C++ API: Amersfoort RD New to WGS84

text: I try to convert between dutch RD New (EPSG:28992) and WGS84 (EPSG:4326) via PROJ4 C++ API. On the console this works with:               cs2cs +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs +to +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs     138494.92605 467792.640021     5d8'46.283"E    52d11'56.38"N 0.000      However, doing the same thing in C++ with:               #include <iostream>     #include <proj_api.h>          using namespace std;          int main()     {       double x = 138494.92605;       double y = 467792.640021;            char *srid28992 = "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.04,49.91,465.84,-1.9848,1.7439,-9.0587,4.0772 +units=m +no_defs";       char *srid4326 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";            projPJ source = pj_init_plus(srid28992);       projPJ target = pj_init_plus(srid4326);            if(source==NULL || target==NULL)         return false;            x *= DEG_TO_RAD;       y *= DEG_TO_RAD;            int success = pj_transform(source, target, 1, 1, &x, &y, NULL );            x *= RAD_TO_DEG;       y *= RAD_TO_DEG;            cout << success << endl << x << endl << y << endl;     }      results in wrong numbers:               ./main      0     3.34135     48.0483      I wasn't able to find a working example for this. What am I missing here? PROJ4 Version is 4.6.1


title: How can I add individual geoprocessing tool, for e.g. buffer onto the toolbar in qgis?

text: I am no programmer so I do not understand how to create a plugin to add a button to the toolbar. Is there another simpler way to do so? I only need a few tools from the ftools suite and do not want the whole list to confuse my students, therefore I'm looking for a solution to add only individual buttons to the toolbars.


title: local tiles server for offline access

text: Anyone knows if there is a "lightway" solution to mount a local tile server? Feature I'd to provide is local storage of small sections of maps, not more than small city for example, in order to provide some degree of offline maps navigation by pointing javascript functions to the local server when network is not accessible. I'll appreciate any idea or suggestion!


title: How to convert Autocad lines to Esri polygon shapefiles using FME?

text: I am using FME to transform a dwg file into a polygon shapefile (.shp). The dwg file is an urban plan of a city consisting of building blocks (type: polylines) and the properties within each block (type : line). I used the **GeometryCoercer** transformer to convert type:line to type:polygon but it does not seem to work. I have also tried **AreaBuilder** , no success. For those familiar with the FME software can you suggest Any solutions? **UPDATE** I attach an image of the dwg file (INPUT) ![enter image description here](http://i.stack.imgur.com/tele0.jpg) green closed polylines represent building blocks orange lines represent properties I used the workspace as provided by @Mapperz, but it didnt work out. I set the **geometry coercer** *type : fme_line* , then **2dForcer** and **AREA BUILDER** writing to a .shp with attributed geometry *shape_polygon*. This is what I get. ![enter image description here](http://i.stack.imgur.com/ll1mW.jpg) When I set the output .shp geometry to *shape_polyline* I get the following ![enter image description here](http://i.stack.imgur.com/1TwRj.jpg) I need a shapefile where all buildings and all properties will have a polygon geometry in order to add attributes to each polygon.


title: Code for case change in text field

text: I have a field of street names in all caps. Some of the names begin with numbers i.e. 9TH ST. I need to put the names into proper case. I've tried various versions of code but they haven't worked. I think it's getting tripped up on the leading number thing. I assume I need code that will check for a number and skip over it if it finds one and then continue with case changes, but I don't know how to write it. Any ideas would be appreciated.


title: How to bring Legends of basemaps from ArcGIS online on map layout

text: I have used some base maps from ArcGIS online as background. We use a GP tool to print maps from this MXD online. So, how can I include the Legends of these base maps on my printed map? I did not see any option under properties. Thanks


title: How to add values in X column to dictionary or list using ArcPy?

text: My apologies if this question has been asked before. I've spent some time searching for a similar question with no results. Is it possible to add each value under X column to a list using ArcPy? I think I could brute force it by using cursor and writing each to a list but I'm hoping there is an easier way. I'll admit I'm fairly new to Python (and ArcPy) but I'm trying to explore the possibilities with several ideas I have in mind. Thanks for your time and input! Edited to list, not list/dictionary per suggestion. Thank you for the answers. They do exactly what I'm looking to do. Thanks again.


title: How to find the closest Edge from a Line

text: Currently I'm working on a basic 3D model viewer in MATLAB, which can import .OBJ files (modeled in e.g. Blender). The purpose of this viewer is to test different subdivision schemes (like Catmull-Clark, or Doo-Sabin). A subdivision scheme is basically a method to convert a mesh to a smoother (refined) mesh. In order to do this properly, I would like to implement some functionality to select Vertices and Edges in my viewer. Vertex selection isn't very hard -- the way this works is that when I click somewhere in the viewer, MATLAB provides me with two points, the begin- and end points of the line perpendicular to the screen (by clicking on a 2D screen that depicts a 3D scene, you actually click on a line, not a single point). Using this method it is relatively simple to find the closest Vertex. However, I'm not quite sure how to do the same for an Edge. Imagine that the imported geometry is a simple cube, so 8 Vertices and 12 Edges. If I know click on an arbitrary point in the viewer (i.e. on some line perpendicular to the screen), how can I then determine which of the 12 Edges is the closest one? **[First Edit]** _Just to be clear, I'm not really looking for a piece of (MATLAB) code, but rather for some theoretical explanation (or just a reference to an article/book/website). Thanks!_ **[Second Edit]** _By the way, is this the correct place for such a question? Or might the_ Mathematics _or_ StackOverflow _boards be better suited?_


title: How to export a Raster attribute table into a .txt using Model Builder

text: I'm using ArcGIS 10.1 I need to export a Raster attribute table into a .txt (or any other format Excel can import), using Model Builder. Is it possible?


title: GEOSERVER and Php

text: I want to use a Php script to retrieve information from the **.db** file of a shapefile saved as a layer in Geoserver. I need to retrieve attribute data from the layer and present it at the client side. Is this possible with the functionality provided by the geoserver?


title: How to Split a Concave Polygon Into Convex Polygons in Arcpy?

text: I'm looking for a tool or algorithm to detect concave polygons and split them into convex polygons. Like explained in the picture, the blue polygon is split into A and B polygons I'm using Arcpy under Arcgis 10.1 ![split polygons](http://i.stack.imgur.com/jSDeX.png)


title: How can i add image (Ex. North Arrow) in mapfish layout print with geoserver?

text: > **Possible Duplicate:**   >  How to add image in mapfish print with geoserver? I want add north arrow above the map using in mapfish with geoserver. im looking for your guidance.


title: change content div on layergroup change

text: I have two layers in a LayerGroup that I can toggle between and would like to update a control(bottom left in example) with the grades of the currently selected layer. How can I go about doing this in leaflet? This is what I currently have here


title: Change the symbol scale in ArcMap legends

text: As you can see from the image below, my enormous scale for traffic pattern shadows the other objects in the legend. Are there ways to reduce the size of object portrayed in the scale? ![Image issue](http://i.stack.imgur.com/0yW2q.jpg)


title: C# Microsoft Visual: Setting text box value to null

text: I'm creating an attributes table in ArcObjects to show a bunch of values. They save just fine when I put them in, the problem is reverting them back to null. My text values all get turned into a blank string, where as my numeric values simply do not change. I've narrowed it down, and I'm pretty sure the problem is in this if statement:               if (value == null || value == string.Empty)             {                 return DBNull.Value;             }             return value;      Even when there is no value in the text box, it skips over the if statement. I just added the _value == string.Empty_ to see if it would work with a text box accepting text values, but it still sets them to a blank string. Any ideas as to why the if statement is being skipped over even though the values are being set EDIT: The string values now change to null with this code:               if (value == null)             {                 return DBNull.Value;             }             if(value.GetType() == typeof(String))             {                 string stringValue = value.ToString();                 if (stringValue.Length == 0)                 {                     return DBNull.Value;                 }      only problem now is the numeric values... Anyone know what I'm doing wrong?


title: How to configure GeoServer for web hosting on window xp?

text: I want to access my data (shp, img, kml, tiff file) through IE, Google chrome or Mozilla, via local hosting (then through LAN). How to configure the GeoServer, so that the client (IE, chrome) can access the data and can perform some operations like add, update, delete and store the points, lines and polygons on the map. I have windows xp 32-bit, GeoServer 2.2.2, PostgreSQL 8.4, PostGIS 1.5.   I am new to GIS. I have tried extensive search for the solution, but I am unable to configure my GeoServer. It is requested to please give a step by step solution for the problem. Thanks for your suggestions and comments.


title: Unable to copy text out of MapInfo 12 info tool

text: As the title says, I'm currently unable to copy and paste information out of the info tool box. Is there a way that this can be done normally or do I need to write a new tool/ is there a tool out there currently that allows me do to this? I'm using MapInfo 12 on a Windows 7 machine (if that helps) Thanks in advance Rhodri


title: How to add a pie chart based on all (or some) features in a layer?

text: I have a vector layer in a QGIS project which has about 60 items with various attributes, including a check for if an item is complete. I am trying to get a pie chart showing the percentage of the items that are complete. I can find how to add pie charts for individual records in a layer, but not a pie chart based on statistics for all (or some) features in a layer.


title: CalculateField_management - updating fields with X and Y coordinates for start and end of line

text: I've searched all the help documents and can't see where my script is going wrong. ![enter image description here](http://i.stack.imgur.com/pJ48s.png) I've tried adding the fields as FLOAT, replacing "PYTHON_9_3" with just "PYTHON" but it just doesn't work. The field get created fine.


title: Which map provider offers information about restriction maneuvers for Venezuela?

text: I need to add turn restriction to my application. However, my map provider (Navteq) don't have this one for Venezuela and other countries.What other map provider could have this information?


title: How to do spatial correlation between two variables on ArcGIS 10.1?

text: I have two datasets and I'm trying to determine the extent of their spatial relationship. I suspect they are closely related but I would like to produce a map output to illustrate this relationship. The datasets are: 1 - a kernel density of prevalence of gambling locations (from their point locations) 2 - a deprivation index by Census Output Area converted to raster. I don't know if it's best doing this as polygons or as rasters and which technique will provide me with what I want. Does anyone have any ideas of how I can investigate and represent this relationship in Arc? Many thanks in advance!