Exporting large high resolution map to PDF in ArcMap errors?

I am attempting to export a large E size map at 300 DPI in ArcMap 10.2.2 but each time I export there are errors on the map. Once the PDF is generated there are areas where symbols are stretched out in a line across the width of the map. I have tried it on ArcMap 10.1 and 10.2.2 and I get the same errors. I know I can avoid these errors if I export at a lower DPI, but I want a really high resolution print of this particular map to be prominently displayed. All other parameters for the export to PDF are the default values. Here is an example of the errors: ![example of the errors.](http://i.stack.imgur.com/pLsqI.png)


Personal Geodatabase: Access speed up due the use of RelationshipClasses?

I've a special question about the effects of RelationshipClasses. For some reasons I've created a Personal Geodatabase and imported two features from Shape-Files and created an own table. For example we have the following structure feature_I = ID_K, Cnt, Closed feature_II = ID_S, Name, Number Table = ID_X, ID_Y, ID_Z,... The table contains 101046 rows, the ID_K is equal with ID_X, ID_S is equal with ID_Y and ID_Z. The value of ID_K is at least available twice in the table (ID_X). Now I've written some algorithms which use cursors to get through the all entries in feature_I. Then the algorithms will look at the table and filter all rows for which the statement ID_K = ID_X is true. For each of this rows two queries are created. This first query delivers the object of the feature_II (ID_Y = ID_S) and the second query will deliver a 2nd object of the feature_II (ID_Z = ID_S). I've measured the time for the whole operation. The result varies between 80 and 90 min. Now I've created three RelationshipClasses between the Table and the two features. All are one-to-many relations (ID_K with ID_X, ID_S with ID_Y and ID_Y with ID_Z). If I rerun the whole algorithm the execution time drops to 19 min. Now the questions is why? Whats the reason for the increase of performance by accessing the tables in the geodatabase when RelationshipClasses exist? Thanks for the clarification.


How to properly add a Python Module to a Plugin?

I've been trying to use a module that is installed in my local version of python, but whenever I open the plugin itself, it does not manage to locate said module. The module in this case is Noise 1.1.1. The error I get is this, is there somewhere I need to declare the module so it allows its use in qgis?                   Couldn't load plugin PointGenerator due an error when calling its classFactory() method          Traceback (most recent call last):       File "C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python\qgis\utils.py", line 164, in startPlugin         plugins[packageName] = package.classFactory(iface)       File "C:/Users/Chris/.qgis//python/plugins\PointGenerator\__init__.py", line 52, in classFactory         from pointgenerator import PointGenerator       File "C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python\qgis\utils.py", line 309, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "C:/Users/Chris/.qgis//python/plugins\PointGenerator\pointgenerator.py", line 26, in          from noise import snoise2       File "C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python\qgis\utils.py", line 309, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)     ImportError: No module named noise


Remove Shapefile lock

I have an ArcObject Dissolve procedure that creates a shp in a directory. This dissolved layer is a temp layer and is not added into ArcMap. I would like to delete it when the user clicks a button again, however it will not delete because their is a lock file (Dissolved.shp.6H8Z5D1.3448.1520.sr.lock) in the directory that happens after the dissolve gp runs:               pSumTable = pGeoProc.Dissolve(pInputTable, True, "ROUTE", "Dissolve.Shape, Minimum.ROUTE", pdatasetname2)      I looked at Using Scheme Locks, however I'm not using this layer to perform any edits. I also found this post on GIS SE, however it too does not seem to apply for my situation. How do I remove this sr lock file (my entire code below), while keeping the ArcMap session open? Thanks                Try                      'delete all temp files                 Dim s As String                 For Each s In System.IO.Directory.GetFiles("J:\20111030\GIS\Scripts\TempData2")                     System.IO.File.Delete(s)                 Next s                      'dissolve route layer                 Dim pMap As IMap                      pMap = mxdoc.FocusMap                      Dim pInputFeatLayer As IFeatureLayer                      pInputFeatLayer = featurelayer                      If pInputFeatLayer Is Nothing Then                          MessageBox.Show("The testinline layer was not found")                     Exit Sub                      End If                      Dim pInputTable As ITable                 pInputTable = pInputFeatLayer                      If pInputTable Is Nothing Then                          MsgBox("Table QI failed")                     Exit Sub                      End If                      If pInputTable.FindField("ROUTE") = -1 Then                          MsgBox("There must be a field named MUSYM layer ")                     Exit Sub                      End If                      Dim pInputFeatClass As IFeatureClass                 pInputFeatClass = featurelayer.FeatureClass                      Dim pfeatureclassname As IFeatureClassName                 pfeatureclassname = New FeatureClassName                      With pfeatureclassname                          .FeatureType = esriFeatureType.esriFTSimple                     .ShapeFieldName = "Shape"                     .ShapeType = pInputFeatClass.ShapeType                      End With                      Dim pNewWSName As IWorkspaceName                 pNewWSName = New WorkspaceName                      pNewWSName.WorkspaceFactoryProgID = "esriCore.ShapefileWorkspaceFactory.1"                 pNewWSName.PathName = "J:\20111030\GIS\Scripts\TempData2\"                      Dim pdatasetname2 As IDatasetName                      pdatasetname2 = pfeatureclassname                 pdatasetname2.Name = "Dissolved"                      pdatasetname2.WorkspaceName = pNewWSName                      Dim pGeoProc As IBasicGeoprocessor                 Dim pSumTable As ITable                 pGeoProc = New BasicGeoprocessor                 pSumTable = pGeoProc.Dissolve(pInputTable, True, "ROUTE", "Dissolve.Shape, Minimum.ROUTE", pdatasetname2)                 Dim pOutputFeatClass As IFeatureClass                 pOutputFeatClass = pSumTable                      If pOutputFeatClass Is Nothing Then                     MsgBox("FeaturesClass QI Failed")                     Exit Sub                 End If                      Dim pOutputFeatLayer As IFeatureLayer                 pOutputFeatLayer = New FeatureLayer                 pOutputFeatLayer.FeatureClass = pOutputFeatClass                 pOutputFeatLayer.Name = pOutputFeatClass.AliasName                      ' CLEAN UP                 featurelayer = Nothing                 pInputFeatLayer = Nothing                 pInputTable = Nothing                 pInputFeatClass = Nothing                 pfeatureclassname = Nothing                 pNewWSName = Nothing                 pdatasetname2 = Nothing                 pGeoProc = Nothing                 pSumTable = Nothing                 pOutputFeatClass = Nothing                 pOutputFeatLayer = Nothing                      pMap = Nothing                 mxdoc = Nothing                  Catch ex As Exception                 MessageBox.Show("Caught an unspecified error in the calling code: " & vbCrLf & ex.ToString)             End Try


No intersection found between polygons I know intersect!

I'm using two geographies: one is made up of small areas (about 2200), the other large areas (about 70). Both cover all of Australia, and the small areas are not necessarily nested inside large areas. For the large areas, I was given a kml file, and a mapinfo file (both come from the Australian Bureau of Statistics). I converted both into .shp format, for use in R (using rgeos). For each of the small areas, I would like the proportion that fits in each large area. This can be done with gArea(gIntersection(small area, large area))/gArea(small area) Which I execute inside a foreach loop that returns a 2200 by 70 matrix of weights. My problem is that for some of the small regions, this method does not find any intersection (as in it returns zero for all larger areas). I have run it on shape files constructed from both the kml file and the mapinfo files, and areas with no intersection _are different_! What would be the most likely cause of this sort of problem? * * * Edit- Thanks guys for your help. I have put together a little zip file containing my two shape files and the R script I'm using. I'm pretty fresh to this (3 days) so reading up on projections. Thanks again. (The file is about 60 meg) https://dl.dropbox.com/u/63100926/Example.zip * * * Edit 2: Thanks to your advice, I now know that my small regions are in GRS80, and my big regions are in WGS84. So thanks! I am having a bit of difficulty finding out how to change them. Any pointers on where to look? Cheers.


Simulate flood to assess Asset inundation footprints

I am trying to evaluate a number of flood gauges to assess at what levels of river height different flood risks would need to be issued. The gauges are currently set to warn of flood a couple of hundred km downstream but those levels don't affect my AOI. For example a "Major" flood downstream will only result in a "Minor" flood in my area etc. I am trying to work out a workflow for this work which needs to be delivered in the next 3 days. We have Arcgis 10.1 (Advanced with 3D Analyst/Spatial Analyst), Global Mapper and QGIS/GRASS. Datasources are Lidar point clouds (4ppm), 1m DEM, 125mm imagery, gauge locations (3D vector) and streams. What's the best pathway? So far, ArcGlobe lets me easily fly through the terrain and visualize all but the lidar datasets. Is there someway I can add the buildings as 3D surfaces into this? I am evaluating tools such as LP360, Lidar Analyst and E3D3 to do this (will add results as I work through them) ![enter image description here](http://i.stack.imgur.com/uTxjU.jpg) What I am planning to do is create inundation 3D polygons based on the Gauge height plus 1m, plus 2m etc (up to 10m) and then intersect them with the asset vertical profiles to get an idea of what's affected at different flood levels and how this relates to a Minor-Major local flood. Global Mapper does the inundation as below but I can't figure out how to specify what height levels I want or extract a 3D polygon of the inundation zone. ![enter image description here](http://i.stack.imgur.com/UfbOF.jpg) My intention is to use this post as a thread for people to easily compare the real world functionality of the different options so your comments/suggestions/critiques are welcome.


PgRouting Driving Distance crashing postgis server

I haven't used PgRouting much so I'm a little in the dark here. However, I am attempting a driving distance calculation like the one described by Underdark here. My SQL is identical, I have a routable network etc etc. I have also successfully run this in the past on another database. However, when I run the simple piece of sql below, it completely crashes the Postgresql server with no error other than connection to server has been lost:               SELECT * FROM driving_distance('           SELECT gid AS id,               start_id::int4 AS source,               end_id::int4 AS target,               shape_leng::float8 AS cost           FROM network',           494902005,           50000,           false,           false)      I first spotted the crash when trying to run this from Python. I restarted the computer and tried to run the stripped down version above from PGAdmin. It still crashes. BTW the '494902005' value is my node id and I want to limit the search to 50km. Because I am not getting any feed back, I don't know where to start diagnosing the issue. I am using PostGIS 2/PostGreSQL 9.1 on 32bit Windows 7. Any ideas gratefully received!


How to use QGIS Time Manager sample data?

I've downloaded the Time Manager plugin for QGIS for Windows, version 1.7.1. I'm not sure whether I should really be asking a question on here, but since there doesn't seem to be an issue tracker on the new git, I want to post pictures, and I know the developer frequents this list, I figured I may as well. My problem is I can't seem to make it work. Using the test data "tweets.shp", I can get an animation, however it is backwards, i.e. the screen is full at the start of the timeline, and tweets are removed at the time they are posted, leaving nothing at the end of the timeline. Graphics attached: ![Start of timeline](http://i.stack.imgur.com/OA6VS.png) ![End of timeline](http://i.stack.imgur.com/iVujY.png) The settings I am using are: **start** : t **end** : none **index** : tweets20120109101002200 **timeformat** : %Y-%m-%d %H:%M:%S **offset** : 0 I installed it manually (due to firewall issues I think) into " _\Program Files\Quantum GIS Wroclaw\apps\qgis\python\plugins\timemanager_ " - wonder if it's something to do with that. Alternatively, is there a way I could debug the queries it is making to QGIS for each time point?


Exception from HRESULT Error - Update Attributes

I have a form that allows users to update attribute information for selected features...but I'm recieving the error: "Exception from HRESULT: 0x80041051" when it tries to update the data. I'm using VB.net, Visual Studio Express 2008 and ArcGIS 10. Any suggestions on where I went wrong with updating the data?               System.Runtime.InteropServices.COMException was caught       ErrorCode=-2147217327       Message="Exception from HRESULT: 0x80041051"       Source="ESRI.ArcGIS.Geodatabase"       StackTrace:            at ESRI.ArcGIS.Geodatabase.IFeatureCursor.UpdateFeature(IFeature Object)            at ImprovementProjectsLines.ImprovementLines.cmdUpdate_Click(Object sender,     EventArgs e)       InnerException:      CODE:                    Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click         Try          Dim pMxDoc As IMxDocument             pMxDoc = My.ArcMap.Document             Dim pMap As IMap             pMap = pMxDoc.FocusMap             'Dim pFLayer As IFeatureSelection                       'Get a reference to the editor.             Dim editor As IEditor             editor = My.ArcMap.Application.FindExtensionByName("esriEditor.Editor")                  'Get Crossings FeatureLayer             Dim pFeatLyr As IFeatureLayer             pFeatLyr = GetLayerByTOC("TransportationImprovementProjects_Lines")                  'Get Dataset from FeatureLayer             Dim pEditDataset As IDataset             pEditDataset = pFeatLyr                  'If not editing, start editing dataset's Workspace             If editor.EditState <> esriEditState.esriStateEditing Then                 editor.StartEditing(pEditDataset.Workspace)             End If                  'Get SelectionSet             Dim pSelSet As ISelectionSet             pSelSet = GetSelection(pFeatLyr)                  'Get FeatureCursor from SelectionSet             Dim pFCursor As IFeatureCursor = Nothing             pSelSet.Search(Nothing, False, pFCursor)                  'Initialize first (only) feature             Dim pFeat As IFeature             pFeat = pFCursor.NextFeature                  'Update attributes with user input             'Fill in Attributes of selected feature in User Form             Do Until pFeat Is Nothing                 pFeat.Value(pFeat.Fields.FindField("YEAR")) = txtPrjYear.Text                 pFeat.Value(pFeat.Fields.FindField("PROJECTYPE")) = txtPrjType.Text                 pFeat.Value(pFeat.Fields.FindField("LOCATION")) = txtLocation.Text                 pFeat.Value(pFeat.Fields.FindField("AGENCY")) = txtAgency.Text                 pFeat.Value(pFeat.Fields.FindField("DESCRIPTION")) = txtDescrip.Text                 pFeat.Value(pFeat.Fields.FindField("COST")) = txtCost.Text                 pFeat.Value(pFeat.Fields.FindField("DATEEDITED")) = txtDate.Text                 pFeat.Value(pFeat.Fields.FindField("USEREDITED")) = txtUser.Text                 pFCursor.UpdateFeature(pFeat)                      pFeat = pFCursor.NextFeature             Loop                       'Stop editing and save edits             editor.StopEditing(True)                  'Close form             Me.Close()              Catch ex As Exception             Windows.Forms.MessageBox.Show(ex.ToString, "error")                   End Try     End Sub          Public Function GetSelection(ByVal pFeatLyr As IFeatureLayer) As ISelectionSet              'Gets selection of feature layer and returns selection set              'Initialize the required variables         pMxDoc = My.ArcMap.Application.Document         Dim pFeatSel As IFeatureSelection         pFeatSel = pFeatLyr              GetSelection = pFeatSel.SelectionSet          End Function          Public Function GetLayerByTOC(ByVal lyrName As String) As IFeatureLayer              'This function finds a feature layer based on its TOC Name              'Initalize global variables         pMxDoc = My.ArcMap.Application.Document         Dim pMap As IMap         pMap = pMxDoc.FocusMap              Dim lyrCntr As Integer         Dim pFeatLyr As IFeatureLayer              For lyrCntr = 0 To pMap.LayerCount - 1                  'Ensure that the layer is valid             If pMap.Layer(lyrCntr).Valid = True Then                      'Ensure that the layer is a feature layer                 If TypeOf pMap.Layer(lyrCntr) Is IFeatureLayer Then                     pFeatLyr = pMap.Layer(lyrCntr)                          If UCase(pMap.Layer(lyrCntr).Name) = UCase(lyrName) Then                         GetLayerByTOC = pFeatLyr                         Exit Function                     End If                 End If             End If         Next lyrCntr              Return Nothing         'Layer not found. Show a message         MsgBox("Layer " & lyrName & " not found !", vbCritical, "Error")          End Function      End Class


Zipcode overlay on OSM

I have to display an overlay with different colors depending on the zipcode in Europe. Can I get this information from OSM shapefile ? If yes, how exaclty ? Is there a tutorial somewhere ? Thanks


How to access tiles in Tilecache using QGIS?

I've Mapserver set up with a mapfile that points to a tileindex. In QGIS I can call the mapfile and view the rasters dynamically. I've got access to tilecache and I've seeded the same mapfile/rasters that I view in QGIS. My question is, what do I need to do to get QGIS to access the tilecache as opposed the dynamic rasters? I'm guessing that I need to do either something to my mapfile to get it to point to the seeded rasters as opposed to the dynamic rasters or repoint the WMS in QGIS


PyQGIS + PostGis: FATAL: sorry, too many clients already

I searched for questions regarding this problem and hadn't find one. I'm developing a custom application with a map canvas to show some geographic information from a PostGis database. After some testing I began to receive the following error: > FATAL: sorry, too many clients already This error means that the maximum number of database connections was reached. The layers I get with instances of QgsVectorLayer, which does not have any method to close the connection, unlike QgsRasterLayer which has the method closeDataProvider(). Should I assume that after getting the data from the database, the QgsVectorLayer instance automatically closes the connection? Or is there a proper method to do it at the end of an application? Thanks in advance.


How to compute surface of raster or any point using ARCGIS?

I have a raster image whose values are a digital elevation model of terrain. I need to know the surface type (topographic characterization) of particular points along transects of this DEM. How to find it? (In my application I have two points: a transmitter end and receiver end. I find the highest point between the transmitter end and receiver end: see the figure below. I would like to know whether the highest point is smooth or is a knife edge; that is, to within the resolution of the image it appears to be non-differentiable.) ![smooth or knife edge surface calculation](http://i.stack.imgur.com/4uFlj.jpg)


Loading Shapefiles into PostGIS using shapefile import/export manager

I am a complete beginner with PostGIS. I've started learning it using the tutorials provided by Boundless. In section 4 of this tutorial where I want to import shapefile in PostGIS, I do not have the PostGIS shapefile Import/Export Manager tool in the PgAdmin III. I've followed the tutorial step by step. They have never pointed if I need to install such tool or how to activate it, etc. Any idea what the problem could be? and how I can solve this? I've installed Postgresql 9.3, PostGIS 2.1 , pgAdmin3 1.12.3 on Windows Server 2012 R2 Standard. by the way, the relevant page for this issue in the tutorial is at: http://workshops.boundlessgeo.com/postgis-intro/loading_data.html Thanks!


How to translate 1980 US Census Place Code to post 1990 Place FIPS?

US Census PLaces are coded differently pre-1990 and post-1990, after the introduction of FIPS Code. For instance, for Albertville, AL: Pre-1990 : Place Code - PLACEA : 0030 Post-1990: Place FIPS - PLACEFP : 00988 Is there an easy way to find a correspondance between these two codes?


How to prevent symbol displacement when loading graphics on ArcGISDynamicMapServiceLayer?

I have a map with a ArcGISDynamicMapServiceLayer. In response to the user click on a button, some features are loaded on a GraphicsLayer. The GraphicsLayer renderer is set by Renderer.fromJSON(descService.drawingInfo.renderer), using the renderer of the mapService. When the loaded graphics are displayed on the GraphicsLayer, they are not located exactly where they should. They are displaced. In order to place them where they should be, a zoom is necessary. Do you know how to resolve this problem?


How to calculate the incidence angle of a polyline?

How can I calculate the angle of each polyline in ArcGIS?


How to remove coincident points with z values greater than min for Spline

I am trying to run a Spline interpolation on some terrestrial LiDAR data, but it keeps failing (I'm getting error 010235 - returned error from spline process and error 010067 - error executing grid expression). I think it's due to the fact that there may be coincident points (ie. points with the same xy but different z values). Can anyone suggest a way to delete the duplicate points with z values greater than the minimum? I can't do it manually because I think there may be a lot of duplicates (I tried the collect events tool, and there were many coincident points).


How can I find an OSGB six-digit code's bounding box?

How can I convert Ordnance Survey six-digit codes to the latlng bounding box of the related 1km grid square? For example, NH0325: according to Wikipedia this means a 1km square whose south-west corner is 3 km east and 25 km north from the south-west corner of square NH. Could anyone point me at some code for converting this code to its 1km grid square, ideally in Python? I already have Paul Agapow's OSGB library - I think this returns the south- west corner of the grid square, in OSGB36 coordinates. I could potentially use this to find the north-east corner, but I don't know how. I'm displaying the results on an WGS84 map, so it would be better to have the results in WGS84, if possible. This is all far beyond my knowledge of map projections. Any suggestions very much appreciated.


How can I use QGIS to convert points with elevations to DXF?

I'm trying to convert points (with their elevations) into a dxf file for use in AutoCAD LT. I've tried "save as" to dxf for the layer, which appears to almost work...the dxf has x and y location information, but the elevations associated with the points are not present. I also tried the "dxfauth" openware tool, but that did the same as the above. Thanks!


adding WMS service to application ArcGIS JS api

I've got map in projection: 4326 (WGS-84) when I try to add WMS layers which is in different projection I always get `connection timeout` Do you know if I could change WMS projection to set it up compatible with my projection? When I was using JAVA sdk I could connect WMS in different projections and arcgis server changed it projection ad hoc.


GeoServer WFS Row Level Security?

I'm trying to implement row level security with GeoServer. I know out of the box it supports service, layer and REST security and not row level. However I'm sure there must be a work around. Has anyone successfully implemented it?


Get all columns from postgis table when doing a getFeatureInfo request from mapserver's WMS layer

## some background:   * im using openlayers WMSGetFeatureInfo control to get feature info from a WMS layer.   * the data is in postgis (its a table of points).   * im using mapserver, and you need to define a template file for getfeatureinfo request. * * * if i put in the template file: > any string it works. when clicking a feature i get back this string (for any feature of course). if i put in the template file: > [date] it returns the **current** date, (not a column in the table) if i put in the template file: > [id] it returns a number that is not the id column of the feature, though it is different for each feature. * * * how can i request all columns for that feature, as if i would do a "select *" quary ? thanks allot!


Problems converting CSV to Shapefile using pyshp

I have a python script which converts csv data to shapefiles. It converts but won't get angle from csv. Can anyone help me? The CSV data looks like this:               fid_nr;x;y;angle     1;55.474040000;13.020460000;90     2;55.474040000;13.020460000;90      And the Python script is:               import shapefile as shp     import csv     import os     import sys          fileToOpen = open('test.csv', "rb")          #Set up blank lists for data     fid_nr,x,y,angle=[],[],[],[]          #read data from csv file and store in lists     with open(fileToOpen, 'rb') as csvfile:         print "File found and will be now converted"         r = csv.reader(csvfile, delimiter=";")         for i,row in enumerate(r):             print row             if i > 0: #skip header                 fid_nr.append(row[2])                 x.append(float(row[0]))                            y.append(float(row[1]))                          angle.append(row[3])                   #Set up shapefile writer and create empty fields     w = shp.Writer(shp.POINT)     w.autoBalance = 1 #ensures gemoetry and attributes match     w.field("fid_nr","N")     w.field("x","F",10,8)     w.field("y","F",10,8)     w.field("angle","N")              #loop through the data and write the shapefile     for j,k in enumerate(x):         w.point(k,y[j]) #write the geometry         w.record(k,y[j],fid_nr[j],x[j],y[j],angle[j])     #Save shapefile     w.save("Resultat/" + out_file3)     print "Done!"


QGIS 2.2 documentation

I thought I would try to write a plugin for QGIS (some Python code that I hoped I could easily port) I started following http://www.qgisworkshop.org/html/workshop/plugins_tutorial.html but that turned out to be hopelessly out of date. I turned to http://www.qgis.org/en/docs/pyqgis_developer_cookbook/intro.html instead and started going through the intro for the Python console and stumbled at the second query.               layer = qgis.utils.iface.activeLayer()      worked fine but then               layer.getLayerID()      threw up               Traceback (most recent call last):     File "<input>", line 1, in <module>     AttributeError: 'QgsVectorLayer' object has no attribute 'getLayerID'      and sure enough code completion in the console would seem to suggest that this doesn't exist. So my question is "where do I find up to date, usable instructions for developing plugins for QGIS 2.2?" It would seem that unless you are already "in the know" there is no way in. Or am I just being paranoid?


Finding fields in Feature

I have a program that has to loop throug a very large amount of features. I have created a wrapper for the feature. This made me think: How expensive is the Fields.FindField method? Would it be faster - and if so; how much - to store the field index in a static field in the wrapper class. An example:               internal class XFeatureWrapper     {         private static int XColumnIndex =-99;         private string _xValue;               public FeatureWrapper(IFeature xFeature)         {             if (XColumnIndex == -99)             {                 XColumnIndex = xFeature.Fields.FindField("XXX");             }                  _xValue = xFeature.get_Value(XColumnIndex).ToString();              }              public string XValue         {             get { return _xValue; }         }     }      Would this be faster than finding the field index in the feature every time? Morten


Geotriggers multiply when using app

I managed to get the ESRI Geotrigger example running on my Android device. Created a small number of geotriggers (tag, location, boundary and rules) using the Geotrigger Editor. Works great. One thing is weird though: every time a trigger is fired a new geotrigger is created for the same location. Somewhere in the code a part is relevant for this problem, but it seems to contradict:                   // Create the trigger if we haven't done so already.         if (mShouldCreateTrigger) {             // Set create trigger flag here so that we don't create multiple             // triggers if we get a few initial updates in rapid succession.             mShouldCreateTrigger = false;      OK, Done. The next part is causing the problem I guess.                       // The TriggerBuilder helps build JSON parameters for use with the             // 'trigger/create' API route.             JSONObject params = new TriggerBuilder()                     .setTags(TAGS[0]) // make sure to add at least one of the tags we have on the device to this trigger                     .setGeo(loc, 100)                     .setDirection(TriggerBuilder.DIRECTION_LEAVE)                     .setNotificationText("You left the trigger!")                     .build();                  // Send the request to the Geotrigger API.             GeotriggerApiClient.runRequest(this, "trigger/create", params,                     new GeotriggerApiListener() {                 @Override                 public void onSuccess(JSONObject data) {                     Toast.makeText(GeotriggerActivity.this, "Trigger created!",                             Toast.LENGTH_SHORT).show();                     Log.d(TAG, "Trigger Created");                 }      Should I delete this part ?


QGIS Arch Linux compilation error

Just pulled QGIS from git and am trying to compile it, here's the relevant error: ` [ 89%] Building CXX object python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart3.cpp.o In file included from /home/noah/qgis/qgis-git/qgis/Quantum- GIS/python/core/qgsmaplayerregistry.sip:10:0: /home/noah/qgis/qgis- git/qgis/Quantum-GIS/python/../src/core/qgsmaplayerregistry.h: In member function ‘virtual void sipQgsMapLayerRegistry::connectNotify(const char*)’: /home/noah/qgis/qgis-git/qgis/Quantum- GIS/python/../src/core/qgsmaplayerregistry.h:252:10: error: ‘virtual void QgsMapLayerRegistry::connectNotify(const char*)’ is private void connectNotify( const char * signal ); ^ /home/noah/qgis/qgis-git/qgis/Quantum- GIS/build-master/python/core/sipcorepart3.cpp:21714:46: error: within this context return; ^ make[2]: *** [python/CMakeFiles/python_module_qgis_core.dir/core/sipcorepart3.cpp.o] Error 1 make[1]: *** [python/CMakeFiles/python_module_qgis_core.dir/all] Error 2 make: _*_ [all] Error 2 ` I'm currently downgrading python as suggested on the AUR page-- I don't understand the problem, I hope this is the right thing to do.


Installation question: initdb is missing after install of postgis2 via RPMS on RHEL 6.4

I'm attempting to install postgis2 on RHEL 6.4 by using the instructions postgis.net/install, but after the postgis2 install, neither initdb nor /etc/init.d/postgreql92 is present. The same thing happens with the 9.3 beta. Is a source installation my best option? **DETAILS**               [root@pgsrv ~]# cat /etc/issue     Red Hat Enterprise Linux Server release 6.4 (Santiago)          [root@pgsrv ~]# rpm -qa | grep post     postfix-2.6.6-2.2.el6_1.x86_64          [root@pgsrv ~]# rpm -qa | grep pgdg          [root@pgsrv ~]# rpm -ihv pgdg-redhat92-9.2-7.noarch.rpm     Preparing...                ########################################### [100%]        1:pgdg-redhat92          ########################################### [100%]          [root@pgsrv ~]# cd /etc/yum/pluginconf.d/     [root@pgsrv pluginconf.d]# ls     changelog.conf               product-id.conf          security.conf              versionlock.conf     downloadonly.conf            rhnplugin.conf           subscription-manager.conf  versionlock.list     epel-release-6-8.noarch.rpm  rhnplugin.conf-original  verify.conf     [root@pgsrv pluginconf.d]# cat rhnplugin.conf     [main]     enabled = 1     gpgcheck = 1          # Added "exclude=postgresql*" for PostGIS      exclude=postgresql*          # You can specify options per channel, e.g.:     #     #[rhel-i386-server-5]     #enabled = 1     #     #[some-unsigned-custom-channel]     #gpgcheck = 0               [root@pgsrv pluginconf.d]# yum install postgis2*     Loaded plugins: changelog, downloadonly, product-id, rhnplugin, security, verify, versionlock     This system is receiving updates from RHN Classic or RHN Satellite.     Setting up Install Process     Resolving Dependencies     --> Running transaction check     ---> Package postgis2_92.x86_64 0:2.0.3-2.rhel6 will be installed     --> Processing Dependency: postgresql92 for package: postgis2_92-2.0.3-2.rhel6.x86_64     --> Processing Dependency: libpq.so.5()(64bit) for package: postgis2_92-2.0.3-2.rhel6.x86_64     --> Processing Dependency: libgdal.so.1()(64bit) for package: postgis2_92-2.0.3-2.rhel6.x86_64     ---> Package postgis2_92-debuginfo.x86_64 0:2.0.3-2.rhel6 will be installed     ---> Package postgis2_92-devel.x86_64 0:2.0.3-2.rhel6 will be installed     ---> Package postgis2_92-docs.x86_64 0:2.0.3-2.rhel6 will be installed     ---> Package postgis2_92-utils.x86_64 0:2.0.3-2.rhel6 will be installed     --> Processing Dependency: perl-DBD-Pg for package: postgis2_92-utils-2.0.3-2.rhel6.x86_64     --> Running transaction check     ---> Package gdal.x86_64 0:1.7.3-15.el6 will be installed     ---> Package perl-DBD-Pg.x86_64 0:2.15.1-4.el6_3 will be installed     ---> Package postgresql92.x86_64 0:9.2.4-1PGDG.rhel6 will be installed     ---> Package postgresql92-libs.x86_64 0:9.2.4-1PGDG.rhel6 will be installed     --> Finished Dependency Resolution          Dependencies Resolved          ========================================================================================================================      Package                          Arch              Version                       Repository                       Size     ========================================================================================================================     Installing:      postgis2_92                      x86_64            2.0.3-2.rhel6                 pgdg92                          2.5 M      postgis2_92-debuginfo            x86_64            2.0.3-2.rhel6                 pgdg92                          1.5 M      postgis2_92-devel                x86_64            2.0.3-2.rhel6                 pgdg92                          172 k      postgis2_92-docs                 x86_64            2.0.3-2.rhel6                 pgdg92                          3.7 M      postgis2_92-utils                x86_64            2.0.3-2.rhel6                 pgdg92                           31 k     Installing for dependencies:      gdal                             x86_64            1.7.3-15.el6                  epel                            3.0 M      perl-DBD-Pg                      x86_64            2.15.1-4.el6_3                rhel-x86_64-server-6            196 k      postgresql92                     x86_64            9.2.4-1PGDG.rhel6             pgdg92                          970 k      postgresql92-libs                x86_64            9.2.4-1PGDG.rhel6             pgdg92                          185 k          Transaction Summary     ========================================================================================================================     Install       9 Package(s)          Total download size: 12 M     Installed size: 53 M     Is this ok [y/N]: y     Downloading Packages:     (1/9): gdal-1.7.3-15.el6.x86_64.rpm                                                              | 3.0 MB     00:00          (2/9): perl-DBD-Pg-2.15.1-4.el6_3.x86_64.rpm                                                     | 196 kB     00:00          (3/9): postgis2_92-2.0.3-2.rhel6.x86_64.rpm                                                      | 2.5 MB     00:00          (4/9): postgis2_92-debuginfo-2.0.3-2.rhel6.x86_64.rpm                                            | 1.5 MB     00:00          (5/9): postgis2_92-devel-2.0.3-2.rhel6.x86_64.rpm                                                | 172 kB     00:00          (6/9): postgis2_92-docs-2.0.3-2.rhel6.x86_64.rpm                                                 | 3.7 MB     00:00          (7/9): postgis2_92-utils-2.0.3-2.rhel6.x86_64.rpm                                                |  31 kB     00:00          (8/9): postgresql92-9.2.4-1PGDG.rhel6.x86_64.rpm                                                 | 970 kB     00:00          (9/9): postgresql92-libs-9.2.4-1PGDG.rhel6.x86_64.rpm                                            | 185 kB     00:00          ------------------------------------------------------------------------------------------------------------------------     Total                                                                                9.2 MB/s |  12 MB     00:01          Running rpm_check_debug     Running Transaction Test     Transaction Test Succeeded     Running Transaction     Warning: RPMDB altered outside of yum.       Installing : postgresql92-libs-9.2.4-1PGDG.rhel6.x86_64                                                           1/9        Installing : postgresql92-9.2.4-1PGDG.rhel6.x86_64                                                                2/9        Installing : gdal-1.7.3-15.el6.x86_64                                                                             3/9        Installing : postgis2_92-2.0.3-2.rhel6.x86_64                                                                     4/9        Installing : perl-DBD-Pg-2.15.1-4.el6_3.x86_64                                                                    5/9        Installing : postgis2_92-utils-2.0.3-2.rhel6.x86_64                                                               6/9        Installing : postgis2_92-devel-2.0.3-2.rhel6.x86_64                                                               7/9        Installing : postgis2_92-docs-2.0.3-2.rhel6.x86_64                                                                8/9        Installing : postgis2_92-debuginfo-2.0.3-2.rhel6.x86_64                                                           9/9        Verifying  : postgis2_92-debuginfo-2.0.3-2.rhel6.x86_64                                                           1/9        Verifying  : postgis2_92-docs-2.0.3-2.rhel6.x86_64                                                                2/9        Verifying  : postgis2_92-devel-2.0.3-2.rhel6.x86_64                                                               3/9        Verifying  : postgresql92-libs-9.2.4-1PGDG.rhel6.x86_64                                                           4/9        Verifying  : postgis2_92-2.0.3-2.rhel6.x86_64                                                                     5/9        Verifying  : postgresql92-9.2.4-1PGDG.rhel6.x86_64                                                                6/9        Verifying  : postgis2_92-utils-2.0.3-2.rhel6.x86_64                                                               7/9        Verifying  : gdal-1.7.3-15.el6.x86_64                                                                             8/9        Verifying  : perl-DBD-Pg-2.15.1-4.el6_3.x86_64                                                                    9/9           Installed:       postgis2_92.x86_64 0:2.0.3-2.rhel6                       postgis2_92-debuginfo.x86_64 0:2.0.3-2.rhel6                       postgis2_92-devel.x86_64 0:2.0.3-2.rhel6                 postgis2_92-docs.x86_64 0:2.0.3-2.rhel6                            postgis2_92-utils.x86_64 0:2.0.3-2.rhel6                          Dependency Installed:       gdal.x86_64 0:1.7.3-15.el6                               perl-DBD-Pg.x86_64 0:2.15.1-4.el6_3                                 postgresql92.x86_64 0:9.2.4-1PGDG.rhel6                  postgresql92-libs.x86_64 0:9.2.4-1PGDG.rhel6                           Complete!          [root@pgsrv pluginconf.d]# cd /usr/     [root@pgsrv usr]# cd pgsql-9.2     [root@pgsrv pgsql-9.2]# cd bin     [root@pgsrv bin]# ls     clusterdb   createuser  dropuser       pg_dump         pg_restore     psql          shp2pgsql     createdb    dropdb      pg_basebackup  pg_dumpall      pgsql2shp      raster2pgsql  vacuumdb     createlang  droplang    pg_config      pg_receivexlog  pg_test_fsync  reindexdb          [root@pgsrv bin]# cd /etc/init.d     [root@pgsrv init.d]# ls     abrt-ccpp         cgconfig   iptables      network                 postgresql-9.3.rpmsave  rpcsvcgssd      trace-cmd     abrtd             cgred      irqbalance    nfs                     psacct                  rsyslog         tuned     abrt-oops         crond      kdump         nfslock                 qpidd                   sandbox         udev-post     acpid             cups       killall       nscd                    quota_nld               saslauthd       wdaemon     arptables_jf      dbora      ktune         nslcd                   rdisc                   single          winbind     arpwatch          dovecot    lvm2-lvmetad  ntpd                    restorecond             spamassassin    xinetd     atd               firstboot  lvm2-monitor  ntpdate                 rhnsd                   spice-vdagentd     auditd            functions  mcelogd       oddjobd                 rhsmcertd               sshd     autofs            haldaemon  mdmonitor     portreserve             rngd                    svnserve     avahi-daemon      halt       messagebus    postfix                 rpcbind                 sysstat     blk-availability  ip6tables  netconsole    postgresql-9.3-data-pg  rpcgssd                 systemtap     certmonger        ipsec      netfs         postgresql-9.3-orig     rpcidmapd               tcsd          [root@pgsrv init.d]# yum provides */initdb     Loaded plugins: changelog, downloadonly, product-id, rhnplugin, security, verify, versionlock     This system is receiving updates from RHN Classic or RHN Satellite.     elrepo-s6-x86_64/filelists                                                                       | 132 kB     00:00          epel/filelists_db                                                                                | 7.6 MB     00:07          pgdg92/filelists_db                                                                              | 157 kB     00:00          rhel-x86_64-server-6/filelists                                                                   |  25 MB     00:03          rhel-x86_64-server-optional-6/filelists                                                          | 9.3 MB     00:01          rhel-x86_64-server-supplementary-6/filelists                                                     | 1.4 MB     00:00          rhn-tools-rhel-x86_64-server-6/filelists                                                         |  57 kB     00:00          postgresql92-server-9.2.4-1PGDG.rhel6.x86_64 : The programs needed to create and run a PostgreSQL server     Repo        : pgdg92     Matched from:     Filename    : /usr/pgsql-9.2/bin/initdb          postgresql92-debuginfo-9.2.3-2PGDG.rhel6.x86_64 : Debug information for package postgresql92     Repo        : pgdg92     Matched from:     Filename    : /usr/src/debug/postgresql-9.2.3/src/bin/initdb          postgresql92-server-9.2.3-2PGDG.rhel6.x86_64 : The programs needed to create and run a PostgreSQL server     Repo        : pgdg92     Matched from:     Filename    : /usr/pgsql-9.2/bin/initdb          postgresql92-debuginfo-9.2.4-1PGDG.rhel6.x86_64 : Debug information for package postgresql92     Repo        : pgdg92     Matched from:     Filename    : /usr/src/debug/postgresql-9.2.4/src/bin/initdb          [root@pgsrv init.d]# rpm -qa | grep post     postgis2_92-docs-2.0.3-2.rhel6.x86_64     postgresql92-9.2.4-1PGDG.rhel6.x86_64     postgis2_92-utils-2.0.3-2.rhel6.x86_64     postgis2_92-devel-2.0.3-2.rhel6.x86_64     postfix-2.6.6-2.2.el6_1.x86_64     postgis2_92-2.0.3-2.rhel6.x86_64     postgresql92-libs-9.2.4-1PGDG.rhel6.x86_64     postgis2_92-debuginfo-2.0.3-2.rhel6.x86_64          [root@pgsrv init.d]# rpm -ql postgis2_92| grep initdb     [root@pgsrv init.d]# rpm -ql postgis2_92 | wc         239     239   14920     [root@pgsrv init.d]#      [root@pgsrv init.d]# rpm -ql postgresql92 | wc         327     327   15799     [root@pgsrv init.d]# rpm -ql postgresql92 | grep initdb     /usr/pgsql-9.2/share/locale/cs/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/de/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/es/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/fr/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/it/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/ja/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/ko/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/pl/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/pt_BR/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/ro/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/ru/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/sv/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/tr/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/zh_CN/LC_MESSAGES/initdb-9.2.mo     /usr/pgsql-9.2/share/locale/zh_TW/LC_MESSAGES/initdb-9.2.mo


Error message starting gis.m in GRASS

I finally broke down and bought Neteler and Mitasova's book, Open Source GIS: A GRASS GIS Approach, because I need to learn command-line GRASS. On trying to work through the book's examples, I'm finding that there may be a problem with my GRASS installation, or more likely with the installation of the tk framework. Here's the code and the error message that I'm getting: > gregory@Gregorys-MacBook> gis.m   >  ~ gregory@Gregorys-MacBook> /usr/local/bin/wish: line 2: > /usr/local/bin/../../../Library/Frameworks/Tk.framework/Versions/8.5/Resources/Wish.app/Contents/MacOS/Wish: > No such file or directory I installed GRASS and its dependencies using the binary installers from KyngChaos, so I'm pretty confident that the TK framework got installed correctly, but the error message seems to indicate otherwise. Also, I don't know how to interpret the section of the path in the error message that reads "/../../../". Can anyone suggest a fix for this?


Is ArcMap's Fixed Zoom In/Out algorithm documented anywhere?

I only occasionally use the **Fixed Zoom In/Out** buttons on the **Tools** toolbar of **ArcMap** and had always assumed that they zoomed in/out by a set scale factor. However, using **ArcGIS for Desktop 10.2** , I just set my scale to be **1:10,000,000** and then hit the **Fixed Zoom In** button **10 times** while recording the subsequent scale each time and was surprised to see:               10,000,000     8,000,000     6,000,000     5,000,000     4,000,000     3,000,000     2,500,000     2,000,000     1,500,000     1,250,000     1,000,000      Dividing each scale denominator by its successor shows a sequence of: 1.25, 1.33, 1.2, 1.25, 1.33, 1.2, 1.25, 1.33, 1.2 Curious about what happened in between the scales above I experimented a little to discover that the first issuance of the Fixed Zoom In button simply takes the scale to the first of those listed above and then starts following the same pattern. Try starting with 1:8,000,001 to see ...               8,000,001     8,000,000     6,000,000     5,000,000     4,000,000     3,000,000      This seems like quite a neat solution, but not one that I had realised was in place - does anyone know if it has been documented anywhere? I've looked in the Online Help without success. In answer to @DevdataTengshe, the scales currently in my available list (see below) seem to bear no relation to those used by Fixed Zoom In/Out. ![enter image description here](http://i.stack.imgur.com/ue1v1.png) However, when I add 1:7,500,000 into my available list it does seem to insert that as an additional scale step ...               10,000,000     8,000,000     7,500,000     6,000,000     5,000,000     4,000,000      This makes the algorithm being used even more mysterious to me.


Mapping Geocoded addresses onto Census shapefiles in R

I have a list of addresses that I have geocoded to get the corresponding longitude and latitude.               > AddressDetail <- geocode(match_address)     > coordinates(AddressDetail) <- c("lon", "lat")      Now I believe I should assign a projection so that R knows how the lon/lat coords are set up               > proj4string(AddressDetail) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")      Now I read in the shapefile that uses the NZMG projection               > Shape_MB = readOGR("/Work in progress/MB06_LV2/", "MB06_LV2")        Now this is where it starts to go wrong. I try transforming the projection of the lon/lat addresses into NZMG projection.               > AddressDetail <- spTransform(AddressDetail_v2, CRS("+proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +units=m +no_defs")                                                           non finite transformation detected:     lon lat       Error in spTransform(xSP, CRSobj, ...) : failure in points      In addition: Warning message:     In spTransform(xSP, CRSobj, ...) : 9 projected point(s) not finite      So when I continue on to use the over function to find the corresponding census meshblock index of the polygon that the address is within I get the following error.               > temp <- over(AddressDetail_v2,Shape_MB,MB06)     Error: identicalCRS(x, y) is not TRUE      I'm a bit of a novice with geospatial stuff in R so would appreciate any advice!


What do these curly graphics represent on this map?

What do the two curly graphics to the left and right of this map represent? They are the only two on the map and seem to be attached to the border of an area. ![enter image description here](http://i.stack.imgur.com/dVlwD.jpg) I'm sorry I haven't posted the full map, I'm not sure I'm allowed.


How to batch clip to single-part shapefile using ArcGIS 9.3 and Python 2.5?

How do I clip a shapefile to a single-part shapefile using ArcGIS 9.3.1 and Python 2.5? Example: I have a set of lines (lines.shp) I am trying to clip to each record in a shapefile called Grids.shp _In grids.shp there is a field called [NAME] with a record for each grid; grid-1, grid-2, ..._ The grids represent Map extents, and the lines will be roads/streams/other base layers (could not post base layers publicly so have provided Lines.shp as an example). I have been trying to use the **SearchCursor** method but have some trouble defining objects and whatnot as I am new to Python. I got this same process to work in V10 but the V10 syntax is way different/simpler, especially for cursors and uses Python 2.6 EDIT (working script! thank you so much everyone): Clip_wCursor_v2a.py ESRI Forum with python script attached.               # ---------------------------------------------------------------------------     # Clip_wCursor_v2.py     # Created for ArcGIS 9.3.1     #   (clip generated by ArcGIS/ModelBuilder)     # Attempted cursor mods by a newb, Donovan     # ---------------------------------------------------------------------------          # Import system modules     import sys     import string     import os     import arcgisscripting          # Create the Geoprocessor object     gp = arcgisscripting.create(9.3)          # Load required toolboxes...     gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Analysis Tools.tbx")          # Designate a workspace     gp.workspace = r"C:\gis\data"          # Assign variables...     clipto = "grids.shp" # grids to clip to     clipit = "lines.shp" # features to be clipped          # Cursor time...     rows = gp.SearchCursor(grids)     row = rows.Next()     feat = row.Shape # used as the clip_features in the Clip_analysis     while row:         n = str(row.NAME) # assign a variable for the processing message based on a field         print "clipping to: " +n # tells you what grid was clipped         # Clip_analysis <in_features> <clip_features> <out_feature_class> {cluster_tolerance}         # output format, grid_1_c.shp, grid_2_c.shp, etc...         gp.Clip_analysis(clipit, feat, str(row.NAME)+"_c"+".shp", "") #update str if necessary         row=rows.next()          # reset the array...     del rows     del gp          print "...fin..."     print "no error checking happened, examine your workspace..."      appreciate all the input, I could only mark one as the correct answer, and i considered the fact that my original error was because of the lack of a `while` and improper use of `row` in the clip function, although the makefeaturelayer method is definitely valid!


Poor Temporal Raster Performance over REST

When trying to consume temporal rasters (float values) served from ArcGIS Server over a REST endpoint, the results served up are "wonky". One or two time steps will deliver data as expected but in general, it crashes and returns missing data or inverted values, etc. If I consume the data in ArcMap directly from SDE, it behaves correctly. If I consume the data in ArcMap via REST, it is a crap-shoot on what I'll get back, sometimes missing data. The data is symbolized using "Classified" with the data broken into 7 categories with zero values excluded. I am currently in the process of converting to integer-based rasters and also reclassifying to see if the issue is corrected but the end-goal is to put this into a web-viewer that I can also query against to get depth values at the x/y click. The server environment is as follows: **Two Separate Servers**...   * Windows 2008 R2 - ArcGIS Server 10.1 SP1   * Windows 2008 R2 - ArcSDE 10.1 SP1 with Microsoft SQL Server 2012 R2 PS: If I consume the raster using stretched symbology, it returns the data as expected although I can't control the color returned by the server after posting to AGS. I've tried using FGDB's and registered folders but achieved the exact same issues with that setup. Thoughts?


Error assessment of calculation done using unprojected vs. projected data

This question builds off of the one with the subject line "Calculating Flow Direction and Delineating Basins from Projected vs. Unprojected Data.": Calculating Flow Direction and Delineating Basins from Projected vs. Unprojected DEM Data This is an entirely separate question, however, as the aforementioned question has established that there are problems with using algorithms (e.g., ArcGIS Flow Direction) that assume Euclidean distance on data in a spherical/unprpojected geographic coordinate system. We know that map projections are sort of like taking an orange peel and attempting to flatten it out on a desk - you will have some error inherently introduced by the map projection. But, it seems that the benefits of projecting offset any error introduced, particularly when you're running calculations that assume a Cartesian/projected planar surface. In this case, the algorithm I'm interested in is the ArcGIS Flow Direction algorithm which does assume that your data are projected (and this is the assumption taken by most applications based on my research) as it uses a Euclidean approach for calculating distance. **My question is** : how could one quantify the error that might be introduced with calculating flow direction in a given study area using unprojected DEM data (DEM data in a geographic coordinate system) vs. projected data (DEM data in an appropriate projection such as a UTM or something conformal)? Granted, you can derive a flow direction raster using unprojected and then the same DEM data projected. But what then? Since our goal is to model the earth's surface as accurately as we can (and we're not addressing any errors that may be introduced in the process of creating the original DEM etc. - those are a constant as far as I'm concerned)....do we just assume the flow direction data derived from the projected DEM is better, and then compare the individual cell values of the two rasters to identify which cells have different directional values (in the context of the normal D-8 model)? I guess to do this then you'd have to take the flow direction raster derived from unprojected data, and then apply the same projection used with the projected flow direction raster. What would make the most sense, and what should the unprojected DEM be compared to as a benchmark of accuracy? Getting into the nitty details of the mathematical equations might, to those that understand it, give you proof at the ground level and be enough for some, but that as well as something that could convey the error to someone that does not have an in-depth understanding of the math but may just know enough geography/GIS to be dangerous would be great (ideally both levels would be good which would resonate with the hardcore geography geeks and the average GIS dabbler). For the higher level folks, saying that the proof is in the math possibly leaves it somewhat open for argument - I'm looking for something more tangible (e.g., akin to attaching a dollar figure to some sort of inefficiency in government). Any thoughts or ideas on how one might quantify this would be greatly appreciated. Tom


Cannot get areas for polygon layers in ArcMap 10

For an ArcGIS project opened in ArcMap 10, we have added polygon layers representing different geographical features. After all the polygons were created, we opened the attribute tables for those layers, and to our shock/dismay, the cells in the "shape_area" column all showed zero! (The "shape_length" field was correctly filled.) We also tried the Measure tool in the toolbar, but it could only measure distances, and the Area button was greyed out. We checked to make sure that all layers were in the correct geographical coordinate system (WGS 1984). What did we do wrong? Is there any way to obtain the areas of the polygons we created? Thanks! P.S. As Brad suggested, I tried to right click on the "SHAPE_Area" column (both on the column label and in the column), but the "Calculate geometry" (and "Field calculator") options were also greyed out.


Options for displaying PostGIS rasters in OpenLayers

This question is similar to an earlier question about displaying vector data in a web-map. I want to have a basic web interface which uses OpenLayers and can display raster data that is currently in PostGIS, using a basemap such as google. I have installed PostGIS2.0 with the raster library and see from the documentation that there are several options to output data, such as JPEG, GeoTIFF and PNG. Is their a recommend format to use? To display vector data I am currently using javascript to send coordinates from the user's browser to my server, and then performing a query using PHP/SQL on PostGIS. The results are then returned as GeoJSON which can be overlaid on the basemap. I wondered if a similar approach could be applied using rasters but I don't know what raster format is best, or if there are any other constraints I should consider. I have seen a lot of references to GeoServer but I'm not sure if it is necessary for this project (I'm not entirely sure when GeoServer should be used or not).


Reading palsar k&c 50 data in GDAL or other open source application

I posted this inquiry in the grass-user list. JAXA is providing free access to PALSAR 50m Orthorectified K & C Mosaic. According to the website, data are provided in: > Data files (Raw format) and image files (PNG format) However, I can't get GDAL to access the data (Raw format). I've tested other sample PALSAR data and GDAL can easily access them using the PALSAR driver I'm looking for open source apps that can read and export this data to the more common raster formats like geotiff, etc. The header file is described in this pdf: http://www.eorc.jaxa.jp/ALOS/en/kc_mosaic/map/PALSAR_MSC_dsc.pdf **UPDATE:** I found a non-foss application that can directly read the kc_mosaic format. It is called MapReady developed by the Alaska Satellite Facility. It can convert to various image format including geotiff. Another tool is the Next ESA SAR Toolbox (NEST). However testing with NEST4C-1.1, the data format is not recognized.


Server side clusterer for Google Maps

After doing a lot of research on different types of clustering coordinates (server side) I am still having problems with choosing the best approach for my project. My requirements:   1. Ability to work with more than 1.000,000 coordinates.   2. Be able to filter coordinates by point of interest.   3. Support map zooming and dragging.    4. Fast   5. I can't use any third party services. Here is what I found:   1. Region quadtree seems to the most suitable algorithm.   2. Geo hashing coordinates + Solr for quick retrieval/filtering of points (might only work with small set of data since the clustering will have to happen on the fly) I would like to know how to deal with map zooming & dragging while maintaining fast response from the server. How can clusters be cached if the maps is dragged, zoomed? Some clusters can be pre-clustered for large areas (continents) but what if there are 10,000 points within once city? My software stack is postgresql, python, django.


Correct network analysis settings needed for shortest route problem

Ok 1st sorry my English is not very good. What i want to ask is why the route analysis takes long path to reach the point when i click at solve button even though I can see a shorter path with my naked eye? I'm trying to digitize again and make a new network dataset, but it's still same like before. Am I missing any steps during creating the network?


How to create SDE GDB without post installation?

Is there any way to create a SDE sqlserver2008 geodatabase without :   1. SDE post-installation execution on the server   2. having sde service running on the server and using :   1. execution of some DDL scripts to create database on the SQLServer   2. execution of "sdelayer -o register" command to register some tables (containing Geometry type fields) as feature class.


How to create adjacency matrix of topology graph of arc map for shortest path?

I have created a topology graph of a polygon feature and I want to find the individual FIDS of the lines of the polygon. I want to construct an adjacency matrix to create the shortest path. How can I do this with ArcObjects programming with VBA?


call Sql Server stored procedure form arcpy

Is there a way to execute a SQL Server stored procedure with arcpy or Python and retrieve the results returned by the stored procedure? There is a very similar question posted on ArcGIS forum with no answer so far.


How to export Raster to JPEG in Python?

I built a model to import table data, create xy event, kernel density and clip density raster. I would like to export the clipped raster as a JPEG but I am not sure how to write the ExportToJPEG code. Any help would be greatly appreciated. Below is the model exported as a Python script.                   # Import arcpy module     ... import arcpy     ...           ... # Check out any necessary licenses     ... arcpy.CheckOutExtension("spatial")          ... # Local variables:     ... Input_Table = "C:\\Users\\cbriglia\\Desktop\\GIS\\Worksheets\\accidents_jan_2013.xls\\Layer1$"     ... state_border_shp = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\state_border.shp"     ... Layer1_pytest4 = "Layer1_pytest4"     ... Ouput_Feature_Class = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\layer1_pytest4.shp"     ... Hot_Spot_Output = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\pytest5"     ... Clip_Output = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\pytest6"     ...           ... # Process: Make XY Event Layer     ... arcpy.MakeXYEventLayer_management(Input_Table, "longitude", "latitude", Layer1_pytest4, "GEOGCS['GCS_North_American_1983_CSRS',DATUM['D_North_American_1983_CSRS',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision", "")     ...           ... # Process: Copy Features     ... arcpy.CopyFeatures_management(Layer1_pytest4, Ouput_Feature_Class, "", "0", "0", "0")     ...           ... # Process: Kernel Density     ... arcpy.gp.KernelDensity_sa(Ouput_Feature_Class, "NONE", Hot_Spot_Output, "4.10886000000002E-03", "3.42405000000002E-02", "SQUARE_MAP_UNITS")     ...           ... # Process: Clip     ... arcpy.Clip_management(Hot_Spot_Output, "-73.7275781441499 40.9867050023656 -71.7867901391991 42.0506901260974", Clip_Output, state_border_shp, "-3.402823e+038", "NONE")


Simplify by number of points in QGIS

I have a fairly simply question about something I just don't know how to do. I am aware you are able to simplify polygons in QGIS based on distance tolerance but my questions is, is there a way to simplify based on a set maximum number of desired points? For example, if the number 1000 was entered, the polygon would be trimmed to 1000 points regardless of any distance thresholds. Does anyone know of any ways to do this?


Why does export to AI rasterize all my vector layers?

I have no raster layers in my map document and no transparencies. Yet the map is rasterized when exported to AI. (Map frame and coordinate grid are vector graphics but everything in the map itself is a single raster image) I've exported maps to AI before and I did not have this problem. This time the map is quite large (ANSI E @ 34"x44") Perhaps that is the problem? I know that all layers below a raster layer get rasterized in the output, any transparent layers and layers below a transparent layers. What are the other factors that will cause the AI exported to rasterize all the layers?


PRJ file for Stereo70 S-42 projection

I receive lots of Romanian maps with the projection STEREO70 with Datum "S-42 for ROMANIA". I have only found the "Stereo 1970.prj" by ESRI, and when I open the maps with my GIS software the coordinates do not match. As you can see, the PRJ by ESRI does not work with "S-42", but with "Dealul Piscului 1970": `PROJCS["Stereo_70",GEOGCS["GCS_Dealul_Piscului_1970",DATUM["D_Dealul_Piscului_1970",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Double_Stereographic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",500000.0],PARAMETER["Central_Meridian",25.0],PARAMETER["Scale_Factor",0.99975],PARAMETER["Latitude_Of_Origin",46.0],UNIT["Meter",1.0],AUTHORITY["EPSG",31700]]` I don't know if anybody is working with Stereo70 + S42 projection and can share their PRJ. Thank you very much.


Python script - how to avoid exclusive schema lock error?

I have a script for updating some features on my database every night (just for copying and replacing some features). This features are "read-only". My problem is that I can't avoid that these features are opened by users, and my script can show the following error:               ExecuteError: ERROR 000464: Cannot get exclusive schema lock.                    Either being edited or in use by another application.      Can I force the phyton script, via some command, copying the files, even been opened by some user? Can I fall down all the connections on my database before running the script? Thanks!


Topographic correction (for land use classification) with SAGA or GRASS

Is there a module in GRASS or SAGA (or a alternative open program) to do a topographic correction of a landsat image to enhance the land use classification? Thanks! Martin


Convert 32 bit image to 8 bit image in QGIS

I want to convert my images from 32 bits to 8 bits. I'm using otb to calculate texture and the raster output is on 8 bits, I'm going to use this information as a layer stack for my multispectral image at 32 bits! Please tell me how to convert from 8 bits to 32 bits and if it possible in QGIS! Thanks!


Polyline to points ordered in cumulative distance from starting point

I have a problem with converting a line to points, where the points are ordered as the cumulative distance from the start of the line. I originally had 3 individual lines which I merged to make 1 continuous line using the `Dissolve` tool in ArcMap. However, it appears that the new line kept the features of the individual lines, because when I use the `Divide` function in `Editor` to create evenly spaced points along my 'merged' line, the points are ordered hap-hapzardly. I am seeking a way to create points from that 'merged' line so that the points are ordered as incremental distances from the start of the line. It would be rather easy if the line were straight, however it meanders, therefore just ordering the points in ascending order (based on X or Y value) would not suffice. Any ideas?


How to merge points (bus stops) in QGIS manually or programmatically?

**What I have:** I have a large data-set containing links (bus routes( (>2000) and their respective nodes(bus-stops) (>6000). The data set I received from the local bus operator is very messy. It contains multiple variations of names and multiple (nearby) locations for the same stop. There is no clear trend of these variations, so I cannot run a program (say, to merge all points within 50 m radius etc. Example in orange and yellow circle in the picture). **What I want to do:** I want to use QGIS clean the data manually. Is there a method/plugin that lets you select multiple stops and merge their locations either to one of their locations, or even a manually entered location? **Edit:** I now have ArcGIS (10.2) also, so a solution in either QGIS or ArcGIS is fine. Here is the screenshot from ArcGIS. ![enter image description here](http://i.stack.imgur.com/5Tv9W.png) The points highlighted in yellow the circle are actual locations of the bus- stops. I want to merge them into one data-point(consider it as a node), while retaining their attributes. (attributes contain information about which routes pass through the stop and what order is the bus stop in a particular route etc ). **So if these data points are like this:**   1. "Intersection xyz1 (Besides Public School)", lat1, long1, route 23, direction up   2. "Intersection xyz2 (Besides Govt. Hospital)", lat2, long2, route 23, direction down   3. "Intersection xyz3 (Besides General Pharmacy)", lat3, long3, route 87, direction up   4. "Intersection xyz4 (Besides Open Area)", lat4, long4, route 87, direction down **They should be converted to:**   1. "Intersection xyz", lat, long, route 23, direction up   2. "Intersection xyz", lat, long, route 23, direction down   3. "Intersection xyz", lat, long, route 87, direction up   4. "Intersection xyz", lat, long, route 87, direction down


OTB vector segmentation result is flipped

I'm using Monteverdi 2 to perform a mean shift segmentation on an image of an archaeological dig, to test the feasibility of automatic detection of elements. I've loaded the image in Monteverdi and defined the export feature shapefile, with all other parameters as default. The resulting shp polygon features, when viewed in QGIS, are flipped vertically as so: ![original image and flipped shapefile](http://i.stack.imgur.com/5Aloh.png) Why does this happen?


Add points for every 100 m at polyline (QGIS/Mapinfo)

I have a polyline and want to set points for every 100 m. And if possible, with unique values for each point, 100, 200, 300 etc. Can it be done? The QGIS-plugin, Sextante algoritmes "v.to points" and "v.segment" might just do that, but can figure it out. Thanks


Is it possible to convert QGIS QLM to SLD (w/ New Symbology)?

I have a QGIS project where I have created some nice styles using New Symbology. I would like to convert this to either SLD for use in GeoServer or CartoCSS for use in TileMill. I have tried saving the style as SLD directly from QGIS and a number of plugins, but I always get "`New Symbology not supported`" or "`<!--FeatureRendererV2 VectorFieldRenderer not implemented yet-->`". I have also tried a number of plugins to convert the project/layer to tilemill or a mapserver project, but no dice. Any help with this would be appreciated.


In what situations would SpatiaLite be selected over PostGIS, and vice versa?

I know that SpatiaLite is a lightweight solution. Would it be a problem if I put it on a 5K pageview/day site? Is PostGIS too resources-consuming for such usage? The dataset is something like < 100MB. Are there any other factors you would consider in cases like this?


Spatial resolution of Google Earth Imagery

What is the spatial resolution of imagery used in Google Earth? At various places on the web, I have been reading it varies from place to place - 60 cm, 2.5 m, 15 m and so on. I was wondering if there is any way/tool to find out what is the spatial resolution at a place of interest to me?


How to combine MapInfo tab files into one spatialite DB?

I have many folders, each with a collection of MapInfo tab files (each folder has the same table names). For each folder I want to merge the tab files into one spatialite DB. My current method is to use ogr2ogr to convert the tab files into shapefiles, and then use .loadshp to load each one into the DB. This truncates my column names, which is irritating. Is there a way to avoid the shapefile part of this process? ogr2ogr can convert to spatialite, but I do not know how to go about merging multiple spatialite files.


Best book for learning ArcGIS functionality?

I was wondering what the best book(s) for learning how to use most of the ArcGIS functionality were that I could use in conjunction with books on the theory of GIS since even though I can understand the concepts I still have trouble with how to use the more advanced ArcGIS features. I understand there are quite a few online tutorials but although it may sound strange, I do my best learning if I have a book in front of me. Thanks!


Compacting ESRI file geodatabases...good practice?

Is there a way to quantify the effect of compacting your ESRI file geodatabase(s) on editing performance? I currently use ArcInfo(10.0). I have a 769 MB fgdb that holds my most used/edited datalayers either in feature datasets or stand alone feature class(es) and am considering a redesign of how I have things set up for my most common workflows and editing tasks. Other than this link to the pertinent ESRI's help page, I really haven't been able to find anything pertaining to this question.


How to make transparent the background of a topographic map in QGis 1.8.0?

I'm starting to use QGis 1.8.0. I have a raster topographic map, i.e. white background and black contour lines, houses, roads and so on. I want to make transparent the white background, so if I overlap the topographic map to an aerial photo, I see only contour lines, houses and other elements atop the photos. In ArcGIS this operation is trivial. How can I do it on QGis 1.8.0? I explored many forums but I didn't find the answer. The solution is not the command "transparency" on the property window, because that command makes everything transparent. Thanks.


How do I download tracks from the GARMIN GPSMAP 78 usin DNRGarmin?

I have been able to download waypoints to DNRGarmin by accessing the GPX file. However, I have only been able to view waypoints. How can I download tracks?


Are there any open source Python modules compatible with arcpy that will allow complex SQL queries?

I am trying to handle string (non-geometry) duplicates in a large attribute table of a shapefile without having to convert to gdb and back or connect to a postgres db. I need to be able to use a count function for my query. I'd prefer not creating an output file, but rather simply updating the file itself. I've looked at the cursors but I cannot seem to accomplish what I need to with them. I essentially need to get a count for duplicates, do a comparison, and then accordingly append values of one field with the values of another field.


How to create a branch network from several input points to an unique outlet in minimizing the distances?

I am searching a way to "hydrologically" connect upstream points to a unique downstream outlet by creating an optimized stream network as pictured below... ![diagram](http://i.stack.imgur.com/Pq7cP.jpg) The cummulated lenght of the stream lines should be minimized. Otherwise the stream network should remains confined within a defined polygon... I only know the input points (red) and the output (green) and the polygon. There is no other constraints Does anyone know how to do it ?... I searched on the web all the morning but without succeed * * * No I rightly try to do it without considering the topography... Just a flat (or approx flat) surface. That's why I am searching a way for so long time :-) It is an hyopthetical area. Imagine that you are in you bath.. the water level rises up and overflow on a downstream threshold - at a corner of you bath.. Then you add a few particles at different corners of your bath (upstream) and you try now to sketch what will be their circulation to reach the threshold by forming an optimized network.. The stream network (as I draw on the right) should be minimum regarding the particles input. Am I understood ? :-)


Updating Mapbox map to newest API/getting markers to load

I'm new to the Mapbox API (and to Javascript in general), so please bear with me. I am trying to build an interactive map that automatically cycles through map markers as the user scrolls through content in a sidebar. I am basing my map off of this tutorial, and have produced a basic working map. However, Young's map was build with a much earlier version of the Mapbox API (v0.6.7, to be precise, versus the current v1.6.2). I'd like to build my map with the current version of the API so that I can implement some additional features that are only available in the this build. For whatever reason, I cannot get my marker layer to load in this new version, even after removing all of the additional JS that controls the scrolling actions. I've tried defining the GeoJSON in-text (as Young does), as well as reading in an external file, but neither approach has worked for me yet. All of my code is in this github repository, a branch of the original project. You'll find both old, working version of my map (index.html – v0.6.7) and the new, broken version (index2.html – v1.6.2) there. Please help me get my scrolling markers up and running again! Thanks in advance. UPDATE: I've managed to get my markers to load, but I'm not sure how to match their appearances to the .spot and .spot.active rules toward the beginning the program. Similarly, I'm not sure how to link the markers to their corresponding HTML sections so that the map automatically pans to them when each section becomes active (which _should_ happen when the user scrolls through the sidebar).


Is there anything faster than a cursor in ArcGIS to calculate records?

What is the most efficient (fastest) way to calculate records in a layer in ArcGIS? Is there anything faster than the Cursor in ArcGIS?


ArcGIS 9.3 conflict with newer Internet Explorer on Windows XP?

I have been told that ArcGIS 9.3 will not function on a Windows XP computer if its got Internet Explorer newer than version 6?! Is this true? Seems like a huge security hole if you can only have IE 6 on your computer. If so, how can this be fixed? Thanks.


I need an arcPy script for choosing objects from a table at random

I am trying to write an ArcPy script that will select X number of rows from a table with N number of objects in it, then output that selection to a new layer or shapefile. I need to be able to specify the number of selections I need at the time I run the script. I am using ArcGIS 10.2 and working with a point FC. Does anyone have any advice?               #import arcpy and set workspace     import arcpy     arcpy.env.workspace = "G:/583/Final/CRL_WaterSurfaces.gdb"          # set feature class and fields variables     fc = "MnEmbPoints"     fields = ["OID@"]          # list all OIDs in data set     with arcpy.da.SearchCursor(fc, fields) as cursor:         for row in cursor:             print("{0}".format(row[0]))


Remove all default values on multiple feature classes

I would like to remove default values from all fields used by all feature classes in an SDE geodatabase. I do not see a geoprocess for removing the default value, only setting it. So I am trying to set it to "". My approach is to use python to iterate through each feature dataset, then feature class, then field, and set the default value to "". Here's what I have so far:               import arcpy     from arcpy import env          env.workspace = r"Database Connections\mysde.sde"          dsList = arcpy.ListDatasets("*", "Feature")     for dataset in dsList:        fcList = arcpy.ListFeatureClasses("*","",dataset)        for fc in fcList:                     flds = arcpy.ListFields(fc,"*","String")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, "")                flds = arcpy.ListFields(fc,"*","Double")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, None)                flds = arcpy.ListFields(fc,"*","SmallInteger")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, None)                flds = arcpy.ListFields(fc,"*","Integer")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, None)                flds = arcpy.ListFields(fc,"*","Single")           for fld in flds:              arcpy.AssignDefaultToField_management(fc, fld.name, None)                 When I run the script I get an error 000735 which means a default value is required. How do I get around this (if at all possible)? Thanks!


Converting Lambert Conformal (x, y) of spheroid to (lon, lat) of NAD83 with proj/cs2cs?

**Revised Trial: Correct?** According to Andre Joost advice, I tried with "+towgs84=0,0,0", and the both two ways seem to get the same answer that mkennedy posted below. So, just to make sure, anybody can tell me whether this is correct? What would be an easy way to verify my results? And the original two ways were done as follows: The first way:               $ cs2cs -v -f '%.16f' +proj=lcc +no_defs +a=6370000.0m     +b=6370000.0m +lon_0=97w +lat_0=40n +lat_1=33n +lat_2=45n +\ x_0=900000.0m +y_0=1620000.0m +towgs84=0,0,0 +to +proj=lonlat     +datum=NAD83 +no_defs<<EOF     2340000.0 1800000.0 EOF     # ---- From Coordinate System ----     #Lambert Conformal Conic     #       Conic, Sph&Ell     #       lat_1= and lat_2= or lat_0     # +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n     # +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m +towgs84=0,0,0     # ---- To Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0     -79.8022823549574412    40.5818946695673759 869.0948340790346265      The second way step (1):               $ proj -I -v -f '%.16f' +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n +lat_1=33n +lat_2=45n +x_0=900\     000.0m +y_0=1620000.0m +towgs84=0,0,0<<EOF     2340000.0 1800000.0 EOF     #Lambert Conformal Conic     #       Conic, Sph&Ell     #       lat_1= and lat_2= or lat_0     # +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n     # +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m +towgs84=0,0,0     -79.8022823549574412    40.3918791792399077      The second way step (2):               $ cs2cs -v -f '%.16f' +proj=lonlat +a=6370000.0m +b=6370000.0m +towgs84=0,0,0 +no_defs +to +proj=lonlat +datum=NAD83 +no_de\ fs<<EOF     -79.8022823549574412    40.3918791792399077 EOF     # ---- From Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +a=6370000.0m +b=6370000.0m +towgs84=0,0,0 +no_defs     # ---- To Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0     -79.8022823549574554    40.5818946695673759 869.0948340790346265      **Original Question (unmodified)** I want to convert Lambert Conformal (x, y) of a spheroid datum to (lon, lat) of an ellipsoid datum (NAD83). I thought this could be done in two ways. The first one is to use cs2cs in one step:               $ cs2cs -v -f '%.16f' +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m +to +proj=lonlat +datum=NAD83 +no_defs<<EOF     2340000.0 1800000.0     EOF     # ---- From Coordinate System ----     #Lambert Conformal Conic     #       Conic, Sph&Ell     #       lat_1= and lat_2= or lat_0     # +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n     # +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m     # ---- To Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0     -79.8022823549574412    40.3918791792399077 0.0000000000000000      The second is to do in two steps. (1) to use proj to convert (x, y) to (lon, lat):               $ proj -I -v -f '%.16f' +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m<<EOF     2340000.0 1800000.0     EOF     #Lambert Conformal Conic     #       Conic, Sph&Ell     #       lat_1= and lat_2= or lat_0     # +proj=lcc +no_defs +a=6370000.0m +b=6370000.0m +lon_0=97w +lat_0=40n     # +lat_1=33n +lat_2=45n +x_0=900000.0m +y_0=1620000.0m     -79.8022823549574412    40.3918791792399077      (2) to use cs2cs convert its datum.               $ cs2cs -v -f '%.16f' +proj=lonlat +a=6370000.0m +b=6370000.0m +no_defs +to +proj=lonlat +datum=NAD83 +no_defs<<EOF     -79.8022823549574412    40.3918791792399077     EOF     # ---- From Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +a=6370000.0m +b=6370000.0m +no_defs     # ---- To Coordinate System ----     #Lat/long (Geodetic)     #     # +proj=lonlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0     -79.8022823549574554    40.3918791792399148 0.0000000000000000      But as you can see, the first one's results are same with the second one's first step. And, the two ways produce different answers in the end. What is wrong here?


Automate loading a table into SDE

How can I automatically load a table stored on a network share into SDE when the original table is edited? Environment is ESRI 10.1 ArcSDE on SQL Server. Preference for python or existing GP tools. Table would be a csv or xlsx. Any ideas, info, or pointers would be helpful.


How do I georeference a ski map?

![enter image description here](http://i.stack.imgur.com/nMK3Y.jpg) I have a map of a mountainous landscape, http://skimap.org/data/989/60/1218033025.jpg. It contains a number of known points, the lat-longs of which can be easily found out using google maps. I wish to be able to pin any latitude longitude coordinate on the map, of course within the bounds of the landscape. For this, I tried an approach that seems to be largely failing. I assumed the map to be equivalent to an aerial photograph of the Swiss landscape, without any info about the altitude or other coordinates of the camera. So, I assumed the plane perpendicular to the camera lens normal to be `Ax+By+Cz-d=0`. I attempt to find the plane constants, using the known points. I fix my origin at a point, with `z=0` at sea level. I take two known points in the landscape, and using the equation for a line in 3d, I find the length of the projection of this line segment joining the two known points, on the plane. I multiply it by another constant `K` to account for the resizing of this length on a static 2d representation of this 3d image. The length between the two points on a 2d static representation of this image on this screen can be easily found in pixels, and the actual length of the line joining the two points, can be easily found, since I can calculate the distance between the two points with their lat-longs, and their heights above sea level. I end up with an equation directly relating the distance between the two points on the screen 2d representation, lets call it `Ls`, and the actual length in the landscape, `L`. I have many other known points, so plugging them into the equation should give me values of the 4 constants. For this, I needed 8 known points (known parameters being their name, lat-long, and heights above sea level), one being my origin, and the second being a fixed reference point. The remaining 6 points generate a system of 6 linear equations in `A^2,B^2,C^2,AB,BC` and `CA`. Solving the system using a online tool, I get the result that the system has a unique solution with all 6 constants being 0. So, it seems that the assumption that the map is equivalent to an aerial photograph taken from an aircraft, is faulty. Can someone please give me some pointers or any other ideas to get this to work? Do open street maps have a Mercator projection?


Is it possible to import Openlayer data to PostGIS?

I'm struggled with the following problem: I'd like to import an Openlayer Layer to PostGIS in order to have the layer information for each grid point in a table. I know how to create a layer from PostGIS tables to OpenLayers using Geoserver....but not the inverse way. Please any help would be extremely appreciated Many thanks and kind regards, Rafa


Automating batch load of multiple GPX files into PostGIS

I've got 50+ GPX files that I would like to "batch load" into a PostGIS database. All of the track_points data would be loaded into a "track_points" table (with typical GPS fields like lat, long, elevation, time, etc) and the tracks data would be loaded into a similar, appropriately designed "tracks" line geometry table. I'd prefer to automate this process so that when I get my next 50+, I won't have to hand enter the data into the database. I personally prefer to use Python to script these kinds of processes, but any suggestions are welcome. My general thought process is to:   1. Get a list of GPX files to process (easy enough through standard Python tools)   2. Loop through each GPX file and extract/convert the necessary data to PostGIS format   3. Insert the GPS data into PostGIS using the psycopg Python library I think I can manage steps 1 & 3, but am wondering if there is a relatively simple method/library that would convert the data (tracks and track_points) into PostGIS format, or simply the tabular form that I could insert into the already created table. I've already read "Is there a good GPS track analysis library?", "How to build a geographic database of GPS logs?", and "How to extract .gpx data with python", and have looked into the GDAL/OGR and FWTools Python bindings, but don't want to reinvent the wheel is someone already has a good method for this.


How to Create a Version 10 File Geodatabase from an XML from ArcGIS 9.2?

A client has given me an XML document for the schema of an ArcGIS 9.2 Geodatabase. The final goal will be to create a version 10 version of the geodatabase but the client doesn't have version 10 yet. I have been trying to create a new geodatabase using this XML file but am not having any luck. So far, I have tried to create a new 9.2 Geodatabase using the Create File GDB Tool. Once I have created the version 9.2 geodatabase, I tried importing the XML file by right clicking on it in ArcCatalog. Every time I import it, I get the following error: ![enter image description here](http://i.stack.imgur.com/MtyUE.jpg) I've tried importing data as well as schema only. I've also tried importing this xml file into a version 9.3 and 10.0 geodatabase. All with the same result. XML file is about 7MB. Does anyone know why this might be happening? **EDIT:** I tried running the Import XML Workspace Document tool and it displays this error. Is the XML file corrupt? How could this have happened? **EDIT2:** The client has sent me a different XML file (the first one was opened in notepad and she thinks she may have corrupted it). However, I'm getting a seperate error now. I'm getting the following: ![enter image description here](http://i.stack.imgur.com/0R1ft.jpg) I Googled the above error and it may have something to do with the fact that the client is using ArcFM. In answer to the comments, I've opened the xml file in Internet Explorer and Notepad++ and it is definitely an XML Workspace file. It has over 100,000 lines so I wasn't keen to read it all, but wehre it says version it does say "sde.DEFAULT". I don't have SDE set up in my office, could that be the issue? Should the client export the data first to a file geodatabase?


Convert land-based camera image pixel x,y to ground lat/long or x,y,z

I have a number of cameras at various known locations (x,y,z) and directions that are above ground about 20 feet pointed at different ground locations about 100 feet away from each camera, and whose furthest fields of view (FOV) are about 300 feet. None of the cameras are pointing directly N-S or E-W. Because of the relatively short distance, I don't need to take into consideration the curvature of the Earth. I am detecting moving objects within the camera FOV and obtaining their image pixel x,y contours and centroids. How can I convert the pixel x,y locations into (initially 'flat') lat long coordinates or relative ground x,y locations? I am obtaining elevation data, so will be adding the ground height (z). Am trying to do this in Java as much as possible, so any pointers (e.g., algorithms, code libraries, etc) are welcome


Display colour coded road traffic data in QGIS

I would like to colour code a shape file containing road polylines to represent the heaviest flows of traffic. The shape file contains attribute data linked to each section of road where road traffic counts were taken (count points). There are 2 fields that contain Road names and a unique count point ID. The second shape file contains point geometry representing the location of each count point. The attribute data contains various fields including traffic numbers along each section of road, road name and a corresponding count point ID. How do I A) best combine the 2 sets of attributes to then be able to B) colour code the busiest roads in the darkest red? ![Road traffic data](http://i.stack.imgur.com/LU8yJ.png) ![Colour Categories](http://i.stack.imgur.com/VuYdx.png) ![Attribute data](http://i.stack.imgur.com/QKB4W.png)


Deleting duplicates from multiple tables

Using the delete duplicates tool is there a way in Mapbasic to have it run through a large number of tables, or do you have to manually select each table and run the tool? Cheers, Jon


Which plugin can draw topoJson right within Leaflet without conversion?

I already have asked how to reduce file size and increase performance for publishing spatial data on the web using Leaflet, here. A conversion to TopoJSON has reduced the file size by approximately 10x, which is awesome, and I thought that would solve both of my problems and world would come to peace. _Never have I been so wrong. (in the voice of Bilbo Baggins)_ The problem is, when the map is zoomed, I have to wait a while before my polygons come to resolution. Until then, the map freezes and cannot be panned or done anything for about 3-4 seconds. If I overclick the map in this interval, the Chrome tab crashes. This also happened when using GeoJSON, because I am using this client-side API that **converts TopoJSON into GeoJSON** _within the browser_. Thus, using TopoJSON reduces transferred data but does not increase the performance, because basically the browser is still reading data from the bulky GeoJSON, but I just don't see it. It's still taking up 10 times the file size of TopoJSON in the RAM, which explains the freezing. Which Plugin can **draw TopoJSON right within Leaflet without conversion** , so that a lot of space frees up on RAM? Thanks in advance. **EDIT:** Although I upvoted R.K.'s answer, I still am in search for a decent plugin.


How to solve "Error creating GEOS Coordinate Sequence" in Postgis?

When I run this query:               TRUNCATE sertaozinho.apps;          INSERT INTO sertaozinho.apps (id,tipo,the_geom)     VALUES (DEFAULT, 'app' ,(         SELECT st_union(         CASE          WHEN area.cobertura = 'lago' THEN ST_Transform(st_buffer(area.the_geom,15), 32723)         WHEN area.cobertura = 'rio' THEN ST_Transform(st_buffer(area.the_geom,100) , 32723)         WHEN linhas.name = 'corrego' THEN ST_Transform(st_buffer(linhas.the_geom,30) , 32723)         WHEN pontos.tipo = 'nascente' THEN ST_Transform(st_buffer(pontos.the_geom,50) , 32723)         END )         FROM sertaozinho.area, sertaozinho.linhas, sertaozinho.pontos         )         )      I get this output:               ERROR: Error creating GEOS Coordinate Sequence     Estado de SQL:XX000      The query is only a sequence of buffers and then an union. The dataset contains about 1000 polygons and 200 lines. I have already succeeded in running this query, but after some minor edits in the polygons it stopped working. Any clue? EDIT: Sometimes after this query the server stops and needs to be restarted.


Showing OpenStreetMap intersections in ArcMap

I'm trying to carry out a few tests on OpenStreetMap data to test its quality, using ArcGIS. One of the things I'd like to investigate involves checking that all road intersections are represented by a node, rather than two lines crossing over each other, with no node. I've downloaded OSM data from GeoFabrik, but the intersections don't seem to be marked. Does anyone have any ideas? Thank you!