title: How to create a script tool that will create a copy of a feature class and offset it by a given distance? (arcpy)

text: I want to duplicate a polygon feature class and offset all of the polygons by about 10 feet in both the x and y directions. I asked if there was any way to do this last week, and I was informed that I would most likely need to make my own python script using arcpy. I made my own script using arcpy, but it isn't working:               import arcpy     from arcpy import env     import os          env.overwriteOutput = True          # Get arguments:      #   Input polygon feature class     #   Output polygon feature class     #     inputFeatureClass = arcpy.GetParameterAsText(0)     outputFeatureClass = arcpy.GetParameterAsText(1)     xShift = arcpy.GetParameterAsText(2)     yShift = arcpy.GetParameterAsText(3)          shapeName = arcpy.Describe(inputFeatureClass).shapeFieldName          # Create the output feature class with the same fields and spatial reference as the input feature class     arcpy.CreateFeatureclass_management(os.path.dirname(outputFeatureClass), os.path.basename(outputFeatureClass), "POLYGON", inputFeatureClass, "", "", inputFeatureClass)          # Create a search cursor to iterate through each row of the input feature class     inrows = arcpy.SearchCursor(inputFeatureClass)     # Create an insert cursor to insert rows into the output feature class     outrows = arcpy.InsertCursor(outputFeatureClass)          # Create empty Point and Array objects     pntArray = arcpy.Array()     partArray = arcpy.Array()          # Loop through each row/feature     for row in inrows:         # Create the geometry object         feature = row.getValue(shapeName)              partnum = 0              # Count the total number of points in the current multipart feature         partcount = feature.partCount                   while partnum < partcount:             part = feature.getPart(partnum)             pnt = part.next()             pntcount = 0                  # Enter while loop for each vertex             #             while pnt:                      pnt = part.next()                 shiftedPoint = arcpy.Point()                 try:                     shiftedPoint.ID = pnt.ID                     shiftedPoint.X = pnt.X + float(xShift)                     shiftedPoint.Y = pnt.Y + float(yShift)                 except AttributeError:                     continue                 #shiftedPoint = arcpy.Point(float(pnt.X) + float(xShift), float(pnt.Y) + float(yShift))                 pntArray.add(shiftedPoint)                 pntcount += 1                      # If pnt is null, either the part is finished or there is an                  #   interior ring                 #                 if not pnt:                      pnt = part.next()                     if pnt:                         arcpy.AddMessage("Interior Ring:")             # Create a polygon using the array of points             polygon = arcpy.Polygon(pntArray)                  # Empty the array for the next run through the loop             pntArray.removeAll()                  # Add the polygons (or 'parts') to an array. This is necessary for multipart features, or those with holes cut in them             partArray.add(polygon)             arcpy.AddMessage("Added a polygon to the partArray!")             partnum += 1              # Create a new row object that will be inserted into the ouput feature class. Set newRow = row so that it has the same attributes         # Set newRow.shape = partArray so that the only thing different about this new feature is that its geometry is different (shifted)         newRow = row         newRow.shape = partArray              outrows.insertRow(newRow)              # Empy the array for the next run through the loop         partArray.removeAll()          del inrows, outrows      I keep getting this error on line 70               <type 'exceptions.ValueError'>: Array: Add input not point nor array object      I can't figure out why it's giving me this error, since I defined the input as an array. If anyone knows why I'm getting this error, or if there's anything else wrong with my code, I would greatly appreciate it.


title: Snapping two polygons together

text: I have a problem with two vector layers, both polygons. I have been digitising an historical map which contains large areas called townlands, filled by smaller areas called fields. I digitised both as two separate vector layers, both polygons. When digitised the field layers I snapped them to the townland boundaries where the townlands and fields shared a boundary. Unfortunately I managed to shift the field layer by accident so now the fields and the townlands don’t overlap. Is there a topological function to fix this? To snap one layer of polygons back to another? I tried v.clean in the GRASS module but this only appears to work for cleaning within one layer. Thanks for any advice.


title: Test case for geo-distance implementation?

text: I wrote a method, based on this presentation, that filters points based on their proximity to a target point. I would like to write a few test case. What would be good test cases for this method?               // The method returns all points in the database that are     // close enough to the target point     List<Point> findPointsNear(double longitude,                                 double latitude,                                double distanceInKilometers);      **Edit** - I'm more interested in a sanity test or two, to make sure I didn't screw anything while adapting/implementing the algorithm. Do you know of existing test code I could use? I'm ok with the method failing near the actual poles, as long it works in most countries.


title: MATLAB mapping toolbox: write multiple feature mapstruct

text: I have a few hundred road segments, described as lines, which I am trying to write to a single shape file using MATLAB's mapping toolbox. However I can only manage to get one feature per shapefile, which isn't very useful. I have developed a work around which calls GDAL from within MATLAB using system(), but the company I work for can be sensitive about us using software that they don't specifically support, so if I can find an all MATLAB option that would be ideal. I assume that either it's not possible, or more likely that it's really simple and I'm missing something obvious. The shapewrite() function requires a 'mapstruct' structure item, but the documentation on how to write such a thing is not very clear, I've only succeded in writing single featured mapstructs. The shapewrite documentation only shows how to write a multi-feature shapefile from a mapstruct that was just read using shaperead(), but not how to write your own multi-feature mapstruct structure. Here's what I have so far...               % Lines is a structure containing all of the individual features     LineIDs = fieldnames(Lines);         First = 1;     for LineIndex = 1:numel(LineIDs)           LineID = LineIDs{LineIndex};         Line = Lines.(LineID);            % So now Line is a structure for that individual line, it contains         % such fields as the X and Y vertices, the BoundingBox, the Geometry          % type (line in this case), and other attributes. Line is my single          % feature 'mapstruct'. It can be written to a shapefile using shapewrite.         LineFileName = sprintf('TempFiles\%s.shp', LineID);         shapewrite(Line, LineFileName)         % Now use GDAL to merge this file with all the others into one large file.         % These next lines are the ones I would like to replace.         if First             First = 0;             MergedFileName = 'MergedFile'             MergedFileNameF = 'MergedFile.shp'             % If the file already exists, remove it.             if exist(MergedFileNameF, 'file') == 2                 delete(MergedFileNameF)             end             % Write the file to be merged to.             [status, ~] = system(sprintf('ogr2ogr %s %s', MergedFileNameF, LineFileName));         else             % Merge with the file.             [status, ~] = system(sprintf('ogr2ogr -update -append %s %s -nln %s', ...                           MergedFileNameF, TempFile, MergedFileName));         end         if status == 0             % Merge was succesful             % Delete temp files, etc         end     end      My single feature mapstruct structures look like this:               >> Line     ans =                     Class: 'A Road'                  ID: 28841            Geometry: 'Line'                Name: 'Willowbank Road'                   X: [3.9323e+05 3.9335e+05 NaN]                   Y: [8.0548e+05 8.0547e+05 NaN]         BoundingBox: [2x2 double]           DftNumber: 'A93'            FEATCODE: 25729                  CP: 80026      And they are stored within Lines, which looks like this...               >> Lines     ans =              A: [1x1 struct]         B: [1x1 struct]         C: [1x1 struct]         etc etc


title: How to merge rasters with negative extents?

text: I'm trying to form a mosaic from two overlapping images of an old tithe map. I've used the georeferencer plugin using one of the images as canvas to generate a modified version of the other. I then used Raster>Miscellaneous>Merge. This generates the following commandline: gdal_merge.py "/home/ian/Maps/Stubbin/1801 map Stubbin prt 1.JPG" "/home/ian/Maps/Stubbin/1801 map Stubbin prt 2_modified.jpg" This gives an error: ERROR 1: Attempt to create 2768x-1659 dataset is illegal,sizes must be larger than zero. This seems to be related to the fact that image metadata for the original images shows the layer extents as 0.0, -1651.0 : 2339.0, 0.0 and other digital camera images also have -ve extents. How do I work round this? Platform is QGIS 1.8.0 on Debian Squeeze 64-bit.


title: Python loop with address locator

text: I was given a list of addresses without any zip codes, and I'm trying to write a python snippet that will loop through a set of possible zip codes and make a set of geocoded shapefiles that I will later merge. My address table is essentially laid out like this: ("Project_" fields are the possible zip codes)               Address          City        Project_1   Project_2  ...  Project_42       123 Main Street  Birmingham  78954       78953      ...  78961      My python snippet looks like this:               import arcpy       from arcpy import env       env.workspace = "N:\Reference\GIS\State\Project\Address Locator"       geocoder = env.workspace + "\State_Addresses_Create_Addr"       for y in range(1,43):           zippo = "Projects_" + str(y)           outfile = '"N:\Project_Geocode_Results_'+ str(y) + '"'           fncgeo = '"Street Apartment VISIBLE NONE; ZIP ' + zippo + ' VISIBLE"'           arcpy.GeocodeAddresses_geocoding("Geocode_Table", geocoder, fncgeo, outfile)        When I try to run the snippet outside of a loop (i.e., based on a single field), the geocode works fine. When I run it as written above, I get: > ERROR 000010: Geocode addresses failed. Failed to execute (Geocode > Addresses). Does anyone have any ideas as to why the geocode won't work in a loop?


title: Creating table containing all filenames (and possibly metadata) in File Geodatabase?

text: I need to create a metadata-table for all files in a File Geodatabase or Spatial Database. It would be awesome if it were possible to automatically be updated with new filenames, and possibly even metadata (as created in the ArcGIS metadata editor). Even partial solutions would be highly appreciated


title: Are there any efficient methods for processing ArcGIS-based database tables outside of the ArcEtc program library?

text: Let us say, for the sake of argument, that you are working with a table that is over 2 GB in size (so .dbf is automatically ruled out... right?). To even create such a document, ArcGIS requires that you make it a "table" inside a File Geodatabase. Ignoring the hours-long conversion time in such an endeavor, working with the final product can prove to be an even larger nightmare. ArcGIS simply does not work for me when the size of a dataset gets to be several gigabytes. Can anyone suggest alternative programs or methods for processing such large sets of data? I am trying to avoid working with joins between 40-odd million records and the headache-inducing wait times involved there-in. I have been told in passing that using "backend RDBMS" programs can achieve this, but my own research has proven ineffectual. I turn to you, StackExchange. Edit: To further specify the requirements of the data, the table itself will have nothing to truly make it "spatial." There will be fields for X/Y Co- ordinates, but they will be simple double/float fields. I am looking for a proper way to do joins and relates across very large tables, in essence. The data is not spatial in the strictest sense; SDE is not something I need consider, I think. I am hoping that any solution will allow me to host the data locally without creating a server or other such mumbo jumbo. Only I will need to access it, and if it needed to be shared, I would expect a simple export would be possible to a more ubiquitous format than ESRI's geodatabases.


title: Best Approach to display charts on a web map?

text: I have a very basic understanding of GIS through some basic work with openlayers in Drupal CMS. I am trying to understand what is the best approach to display a chart on a map (like the one below)? I want the users to be able to at least control/change the numbers of the charts in the map. I understand that the layer itself and the associated legend can be served through a WMS. But what about the statistics that appear above the city. What would be the best "framework" to manage and display such a data? ![enter image description here](http://i.stack.imgur.com/DZaMU.png)


title: Openlayers Layerswitcher constraints

text: I´m building a kind of webgis with openlayers with a couple of overlay Layers. Is there a possibility to implement some constraints to the layerswitcher? My idea is to have two lists of layers and from both list you can choose only one Layer a time. The result should be that there are maximum two overlays at the map. Thank you for your tipps and ideas.


title: ESRI ArcMap TextSymbol

text: I'm looking to do the following. Create a point on a map at a given coordinate (x,y) and then display text at that point. Right now I can create a shape file but nothing is displayed on the map. Hopefully someone can tell me why Here is my code:               ArcDisplay.IRgbColor color = new RgbColorClass()     {         Red   = 255,         Green = 255,         Blue  = 255     };          IPoint point = new PointClass()     {         X = 0.0,         Y = 0.0,         Z = 0.0,         SpatialReference = myMap.Map.SpatialReference     };          IElement elem = null;     ITextElement txtElement = new TextElementClass();     element = textElement as IElement;          ITextSymbol textSymbol = new TextSymbolClass();     textSymbol.Color = color;     textSymbol.Size = 16;     textSymbol.Font = (stdole.IFontDisp)OLE.GetIFontDispFromFont(new Font("Arial" , 16 , FontStyle.Bold);          element.Geometry = point as IGeometry;          textSymbol.Text = "My Test Text";     txtElement.Symbol = textSymbol;          ((ITextElement)element).Symbol = textSymbol;          IGrpahicsLayer graphicsLayer = new CompositeGraphicsLayerClass();     ((ILayer)graphicsLayer).Name = "Text Layer";     IGraphicsContainer graphicsContainer = graphicsLayer as IGraphicsContainer;     graphicsContainer.AddElement(element , 0);          myMap.AddLayer(graphicsLayer as ILayer);     ((ILayer)graphicsLayer).Draw(esriDrawPhase.esriDPGeography , null , null);      Any ideas?


title: How do I make this into a working CRS in ArcGIS?

text: +proj=tmerc +lat_0=0 +lon_0=-114 +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs I have this text string which I successfully used to project data in QGIS. How do I use this to define a CRS in ArcGIS and project my data correctly? Thanks


title: How do I export sensor records from a Trimble GeoExplorer to a mapping program?

text: So I am fairly new with the GIS world and could use a lot of help!! I am currently surveying with a Trimble Geoexplorer 6000 XH What sort of mapping program can I use to export sensor records to said mapping program. I have GPS Pathfinder office and know the basics of it. What I would like to do is layer the sensor records in some sort of mapping software. Please excuse my inability use the proper terminology used in the GIS world as I am very new to it. Any help would be much appreciated.


title: Create "starburst" table from two point features with 1:N relationship using Spatialite

text: I have a point feature called site_investigation and another point feature called sample_location which are in a Spatialite database. They have a 1:N relationship and the primary key is report_id.               CREATE TABLE site_investigation (             fid         INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,             report_id   TEXT UNIQUE NOT NULL,             geometry    POINT     );     CREATE TABLE sample_location (             fid            INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,             report_id      TEXT NOT NULL,             official_name  TEXT UNIQUE NOT NULL,             geometry    POINT             FOREIGN KEY(report_id) REFERENCES site_investigation(shz_report_id) ON DELETE CASCADE     );      I would like to create a table of lines that connects site_investigation to sample_location to form a "starburst" display. I'm a Spatialite novice and would greatly appreciate any help. Thanks, Bob.


title: Error 000539 - Band_# not defined

text: I'm trying to do an NDVI analysis of a some World View 2 imagery. It seems no matter what if I enter the term Band_# for any of the 8 bands I get the same error. ![enter image description here](http://i.stack.imgur.com/9huWJ.jpg)


title: How do I smooth edges of polygons in QGIS?

text: Is there a built in function or plugin I can use to achieve smooth lines for my polygons instead of the blocky ones I have now? ![enter image description here](http://i.stack.imgur.com/CBf1L.jpg)


title: run a make query table based on a selection

text: I have a feature class of land parcels. I do a select by location to select the land parcels that intersect a line feature. Now I want to use the Make Query Table tool in model builder. I include the Shape field to ensure my output is still a feature class however the table is created with all the data and not just the selected features. How do I run a make query table on a selection and not the whole feature class?


title: Selecting multiple variables by Attribute from different target layers

text: I have a model with species point data as a source layer and a number of different shapefiles as target layers. To start I run a search by location tool to determine where the source and target layers intersect, and then copy features to create a new target layer. Next I want to use the select by attribute tool to determine where in my original target layer are common attributes to my new target layer. My question is: Is there an SQL expression that would allow the search by attribute tool to select from an individual field in the new target layer and compare it to the original layer?


title: Create a polyline buffer with Arcpy

text: I'm trying to write a python script with ArcPy that draws arcs and I've achieved something with creating a buffer and then clipping it with a bounding box so I only keep the length I need (I thought it was easier that way than calculating from my center point and radius, vertex by vertex from my start angle to my end angle). The problem is that the buffer too creates polygon buffers and since I only have ArcVIew (soon ArcEditor) and I can't use the polygon to line tool (licenced to ArcInfo). Is there a way to convert a polygon to a polyline somehow with ArcPy or create directly a polyline buffer? Thanks!


I am trying to execute this code,               import osgeo.ogr          def findPoints(geometry, results):         for i in range(geometry.GetPointCount()):             x,y,z = geometry.GetPoint(i)         if results['north'] == None or results['north'][1] < y:             results['north'] = (x,y)         if results['south'] == None or results['south'][1] > y:             results['south'] = (x,y)         for i in range(geometry.GetGeometryCount()):             findPoints(geometry.GetGeometryRef(i), results)          shapefile = osgeo.ogr.Open("../../Data/tl_2009_us_state/tl_2009_us_state.shp")     layer = shapefile.GetLayer(0)     feature = layer.GetFeature(53)     geometry = feature.GetGeometryRef()          results = {'north' : None,                'south' : None}          findPoints(geometry, results)      and I am constantly receiving this error,               Traceback (most recent call last):       File "identify_northsouth_point.py", line 22, in <module>         findPoints(geometry, results)       File "identify_northsouth_point.py", line 8, in findPoints         results['north'] = (x,y)     UnboundLocalError: local variable 'x' referenced before assignment      I have tried global and nonlocal, but it does not work. Since I am not gettin any input from outside the function, so I anyways would not require global or nonlocal.


title: Dissolve polygons - group to others with touching corners

text: I am working with some data that shows land management. There are many places where corners "touch". I would like to dissolve my dataset so that features are grouped (dissolved) with those that they share a touching corner. Each section (square) is a unique feature (row). In the image below I've circled the features that I would like to group in this dissolve. I am using ArcGIS and have an editor and SA license. ![enter image description here](http://i.stack.imgur.com/mk9YM.jpg)


title: Strange things are afoot with the "Eliminate Polygon Parts' tool

text: I am working with a polygon that is the result of a buffer and has a bunch of internal doughnut holes: ![Polygon with Holes](http://i.stack.imgur.com/zGf5t.png) What I want is this: ![enter image description here](http://i.stack.imgur.com/H7Z3n.png) I am using arcpy.EliminatePolygonParts_management() to fill in the holes but have a question about how this tool functions. When I run the tool using the "PERCENT" condition I cannot get the holes to fill in. Initially I set the percent to 99 thinking that it would delete any part that was smaller than 99 percent of the total area of the polygon. That didn't work. Thinking that perhaps I had my logic backwards I set the percent to 1, that didn't work either. I did get it to work, and produce a polygon that is just the outer boundary but to do so I had to switch to the AREA condition and set the number ridiculously (for my purposes) high, to 1 billion square meters. I am quite confused by this... Can anyone offer an explanation to help clarify my understanding of how this tool works and why I can't get the "PERCENT" condition, which seems to be the more appropriate choice, to work?


title: any good blogs about digital cartography?

text: I´m looking for blogs or good websites about digital/web cartography...i´m not really interested in the deep technical ramblings (i´ve the forum lists for that) but rather inspirational blogs which showcase great digital cartographic techniques or projects and how they are created. If there are such things here in the web, please let me know...I´,m also interested in statistical visualisation blogs like these..http://datavisualization.ch/showcases/, http://flowingdata.com/...but I´ve never seen such blogs which spezialise in digital/web cartography. thanks, Rob


title: ArcGIS Intersect using Geometry Service

text: I am using the intersect service from the ArcGIS Geometry service. referring : http://help.arcgis.com/en/webapi/sil....htm#Intersect   I have modified it to make it work with polylines it works fine to intersect a polyline with a polygon but does not return anything when I try intersecting a polyline with a polyline Please guide I am stuck here...


title: Error 001143 and Error 99999 when using Locate Features Along Routes in ArcGIS10.1

text: Oddly, what I need to do has worked for about half of my data but not the rest. I'm trying to use the Locate Features Along Routes tool in ArcGIS10.1. I have a smaller polyline layer as the input and another larger polyline routes layer as the input routes layer. Where they occupy the same geographic space, the layers overlap exactly. There is an attribute called "reach code" in both feature classes and they match, this tool will allow me to see "to" and "from" on the input layer when done. I was able to execute it once so I know it works. Basically, I've got four large watersheds that I'd like to do this for. The tool ran smoothly for the first one but will not work for the other three. There should not be substantial differences between these datasets. I've obtained the data straight from the USGS NHD website so it is unaltered with fields and properties identical among watersheds. There was a problem at first and the tool did not work until I saved the output events table to the desktop instead of the network or the hard drive. I have disabled Background Processing since I thought that was the issue. When Background Processing is disabled I get the 99999 error. When it is enabled I get the 001143 error, that says I should turn off background processing. I'm stuck in a cyclic zone of zero productivity. Hoping some of the experts out there can shed some light!


title: What is the difference between Leaflet and Mapbox?

text: What is the difference between Leaflet and Mapbox, and how are they used together? Like the API and what exactly are they and is Mapbox using Leaflet?


title: Python Addin Toolbar only works once

text: I am writing Python Addins for ArcGIS. I call a Python Toolbox, the Addin tool only works once in ArcCatalog when picked. If you pick it again nothing happens.               import arcpy     import pythonaddins     import os           class OreconDBtoArcGISTool(object):          def __init__(self):              self.enabled = True              self.checked = False               def onClick(self):                  toolboxName = "OreconDB_Toolbox"             toolName = "OreconDBtoArcGISTool"             relPath = os.path.dirname(__file__)             pyt = relPath + os.sep + toolboxName + ".pyt"             pythonaddins.GPToolDialog(pyt, toolName)      If I close and restart ArcCatalog the tool will work one more time again. Any Ideas on how to fix this would be appreciated.


title: Problems using 2 maps with multiple layers and loadend event

text: I have 2 or more maps with one ore n layers on each map. Now I want zoom to extent for each map, but the `getDataExtent` returns only for the last layer in the last map a bounds. Can you help me? Here is the code               var jekyllMapping = (function () {         return {             mappingInitialize: function() {                 var maps = document.getElementsByClassName("jekyll-mapping");                 for ( var i = 0; i < maps.length; i++ ) {                     var zoom      = maps[i].getAttribute("data-zoom"),                         lat       = maps[i].getAttribute("data-latitude"),                         lon       = maps[i].getAttribute("data-longitude"),                         layers    = maps[i].getAttribute("data-layers"),                         title     = maps[i].getAttribute("data-title"),                         map, markers, center;                          maps[i].setAttribute('id', 'jekyll-mapping' + i);                          markers = new OpenLayers.Layer.Markers("Markers")                     map = new OpenLayers.Map('jekyll-mapping' + i);                     map.addLayer(new OpenLayers.Layer.OSM());                     map.addLayer(markers);                     if (lat && lon) {                         center = new OpenLayers.LonLat(lon, lat).transform(                             new OpenLayers.Projection("EPSG:4326"),                             new OpenLayers.Projection("EPSG:900913"));                         map.setCenter(center, zoom);                         markers.addMarker(new OpenLayers.Marker(center));                     }                          if (layers) {                         // layers are url's to kml files                         layers = layers.split(' ');                         while (layers.length > 0){                             var m = new OpenLayers.Layer.Vector("KML", {                                     strategies: [new OpenLayers.Strategy.Fixed()],                                     protocol: new OpenLayers.Protocol.HTTP({                                                 url: layers.pop(),                                                 format: new OpenLayers.Format.KML({extractStyles: true, extractAttributes: true, maxDepth: 2 })                                     })                             });                             if (m) {                                 m.events.register("loadend", m, function () {                                     // raises for all layers but only the last layer on second map gives me a bound, why???                                     var bounds = m.getDataExtent();                                     if (bounds) {                                         map.zoomToExtent(bounds);                                     }                                 });                                 map.addLayer(m);                             }                         }                     }                 }             }         };     }());          window.onload = function() { jekyllMapping.mappingInitialize(); }


title: Efficiently classify raster with irregular polygons

text: I have a project on my desk to classify an elevation model using different elevation breaks for each polygon in the area of interest. In pseudo code:               FOR each polygon IN layer:         CREATE_MASK FROM this polygon         CLASSIFY elevmod WITH this polygon's LOOKUP_TABLE         SAVE_AS elevmod_classified_this_polygonID          MERGE elevmod_classified*     CONVERT from 16bit float to 256 index colour palette      What is the most efficient way to do this? The workflow I have now is wasteful of processing time and storage. Each `classify` step creates a new raster file for every polygon, and then all are combined into one at the end. The source raster is 650mb compressed and about 30 zone polygons (so 30 times some portion of 650mb for extra storage). This seems rather silly since I can classify a whole raster at run-time in a second using the standard symbology tools. Plus the elevation breaks for each polygon haven't been finalized, so I'll need to run through this exercise a number of times before everyone is satisfied. The classification elevation lookup tables resemble the following. Each number is the upper elevation boundary of that class:               polygonID, class1, class2, class3, ...     169,  850, 1100, 1300, 1450     170, 1000, 1250, 1400, 1600      The final classified raster has cell values of `1,2,3,4,5...` corresponding to class1, class2, ... Though this too is open for change. I have Qgis 1.7 and Arcinfo 10 with Spatial Analyst at my disposal (and Arcview3 for that matter).


title: IFeature.set_Shape The coordinates or measures are out of bounds

text: I'm trying to add a point to my map, but something with the way I used shp2sde create caused me to have a incorrect spatial extent or something. So I'm getting "out of bounds" error. How do I go about fixing this in ArcView 9.3.1? (I'll have to use command prompts probably or recreate). My Map Server Info: Intial Extent:               XMin: -197.114430117841     YMin: -95.6461199683022     XMax: 197.694572740662     YMax: 184.916970645712     Spatial Reference: 4326      Full Extent:               XMin: -198     YMin: -99     XMax: 198     YMax: 99     Spatial Reference: 4326      My Layer info: Extent:               XMin: -180     YMin: -90     XMax: 180     YMax: 90     Spatial Reference: 4326      **Here's my log file from what I'm trying to INSERT into the feature layer:**               Check geometry point type=esriGeometryPoint     about to create feature     Create shape(X=38.9300285250005,Y=-74.9343213739996)     Com_point_spatialreference=GCS_WGS_1984     at ESRI.ArcGIS.Geodatabase.IFeature.set_Shape(IGeometry Shape)      The coordinates or measures are out of bounds.      My sdelayer -o describe_long:               Spatial Column .......: SHAPE     Layer Id .............: 21     SRID .................: 5     Minimum Shape Id .....: 1     Offset ...............:       falsex:          0.000000       falsey:          0.000000     System Units .........:       1000.000000     Z Offset..............:          0.000000     Z Units ..............:          1.000000     Measure Offset .......: <None>     Measure Units ........: <None>     XY Cluster Tolerance .:          0.002     Spatial Index ........:       parameter:    SPIDX_GRID,GRID0=1,FULL       exist:        Yes       array form:   1,0,0     Layer Envelope .......:       minx:      -180.00000,        miny:       -90.00000       maxx:       180.00000,        maxy:        90.00000     Entities .............: np     Layer Type ...........: SDE     Creation Date ........: 03/21/12 11:04:05     I/O Mode .............: LOAD     Autolocking ..........: Enabled     Precision.............: Basic     User Privileges ......: SELECT, UPDATE, INSERT, DELETE     Coordinate System ....: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1     984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.017453292     5199433]]          Layer Configuration ..: DEFAULTS


title: Projecting OpenStreetMap data in PostGIS

text: I've loaded an extract of Openstreetmap data into a Postgresql database with PostGIS 1.5 using the following command with`osm2pgsql.exe`:               C:\Program Files (x86)\HOTOSM\bin>osm2pgsql.exe -c -s -H localhost -d osm_cloudmade -b -122.0,18.03,-64.85,46.05 -E EPSG:900913 -U postgres -P 5432 J:\DATA\OSM\usa.osm.bz2 -S J:\DATA\OSM\default.style      I understand that the Openstreetmap data is in Lat/Long WGS 84. If I inspect my table `planet_osm_roads` I see `way geometry` but no SRID. Is there a way that I can project this to another system? Or do I first need to specify what the SRID is of this data?


title: zero-kb pdf file from arcmap

text: I have been having this problem too often.   My only fix is to shut down arcmap and restart.   I can't find why it is happening.   Anyone else see this? export to pdf watch it go all the way through and when it should show the file progress (processsing) bar it just goes away and says export complete, but the file is 0kb. arcmap 10.0 sp 2 Not only have I tried refresh, restart, shutdown. I have tried to open the file. the message is... ![0kbfile](http://i.stack.imgur.com/RqFef.gif)   It seems there is something to do with either the original file or arcmap.   I tried to create a jpg "export" from arcmap and get the "can't map metafile to memory" error.   But another document will export both pdf and jpg.   Then a coworker opened it and exported immediately. It also occurs on other machines though.   I cnan't nail down any consistent behavior except that it always doesn't show the file status bar after processing the data and successfully writes a file (0kb).


title: Cleaning up OpenStreetMap data, building polygons and trying to improve appearance

text: I'm currently going through my first project with OpenStreetMap data and I'm struggling to see how certain features can be made to look anywhere near as good as in OpenStreetMap.org. I downloaded a pre-built Shp from Cloudmade for Ontario and many of the big lakes in the south are terrible - a polygon might cover a fraction of a lake's actual area and makes for poor visualisation. I think this is a result of OSM data only containing points and lines, and someone having to build polygons from these lines. Furthermore, I looked at the administrative boundaries lines layer and there were 100,000s of line features for all kinds of administrative entities but apparently no attributes that could help me build a single polygon for the province's full border. Now, I know that the Cloudmade Shps have been through some post-processing to whittle the many feature types in the .osm XML down to 7 or 8 layers, so perhaps the way they collate administrative boundaries is not perfect for my area. Also, as the Ontario Shps don't cover the US states that also border the big lakes perhaps this explains why the lake polygons were not well formed, but if I have to download the .osm XML for such a large area and process it all myself this causes other issues - it will take a lot of time and many iterations and I don't know if the end result will be worth the effort (e.g. what if the lines that make up a lake's border don't properly meet up, and snapping introduces unwanted artifacts - or maybe none of the lakes are actually 'closed' because they all have rivers connected to them, so building a polygon is just impossible?) I'm guessing that to make the map in OpenStreetMap.org someone must have processed all the data to build polygons where necessary. Presumably all country / state / province borders were created as polygons and shaded, and either the same was done for all lakes / oceans or the map simply has a blue background and everything else is layered on top? If this polygon data was created for the OpenStreetMap.org map, why can't I access it anywhere? It seems like there should be an additional resource between the raw XML and the state / province-specific Shps that have been processed according a particular rule-set If anyone has come across similar issues and has any kind of advice I'd really appreciate it!


title: Is it possible to run qgis through python?

text: I need to build an app to analyze some raster layers in qgis. I thought it was possible to just write code in python (2.7.6) (IDLE) and let it automatically open QGIS, load some layers, do a distance matrix, export that and load this file with python and use that information in the app. Is something like this possible? I have a mac running OSX10.9.1, using python 2.7.6 because I constantly got errors when using python 3.


title: ArcGIS: Extracting data from large intersect dataset

text: I have a big dataset imported into ArcMap. For each point, I created a buffers of 200m. And I apply Intersect to all the buffers, resulting in a huge dataset of around 2183962 objects. Previously, I have similar sets of data which are all significantly smaller than this, I export them to shapefile and by using the shapefile module, I created a Python script to extract each polygon (to be precise, each "Intersection") based on an attribute called bbox (in the Python shapefile module) and then do some other operations. Now, because the dataset is too big, I wasn't able to export the dataset to shapefile since the limitation is 2GB although I manage to export to XML workspace of a file size around 13 GB. Is there anyway around this?


title: Add Attribute and merge .shp's from multiple folders/directories

text: I would like to run a process to: 1) find all shapefiles in muliple folders/directories (i.e., the directory for each differen folder is "G:\Projects\"variable project #"\GIS\Shapefiles) 2) Add a field for inserting "variable project #" from the file path name(i.e., truncate the file path name to only include "variable project #") 3)Then export and merge these features into a temporary folder. ...if I could even do stpes 1-2 above, it would be a tremendous help. This files are in a couple hundred folders and, due to the length of the file path, it is a bit onerous to try to batch process these manually... Any help would be greatly apprecited, Thanks!


title: GeoServer 2.2 and KML with multiple layers

text: I would like to be able to create a single URL that allows the download of three layers in a single KML file. Here's two ways to do that:   * WMS KML Plain   * GeoServer Application Link Both fail. The first complains of un-matched tags in the KML. The other doesn't load any points from one of the layers. The broken layer in the KML works in Open Layers fine... Any ideas on how to fix this, what's going wrong and why? Upgrading GeoServer may happen later but isn't a fix.


title: How to split a shapefile feature?

text: The world map that I am using from NaturalEarth.com has France and French Guyana as one feature. I want to split these into two separate shapes. I'm sure there is a quick fix for this, and the others I'm sure to soon encounter. I am using ArcMap 10.2 and need to use a feature that will make it so that when I click on Guyana, France isn't also selected.


title: .svg georeference?

text: How would I go about taking a layer from AI or Inkscape and importing it into Arc? I've got a vector drawing I want to use and I know I need to georeference it but I'm lost as to how. I also can't seem to import it as a shapefile. Do I create a geodatabase for it? I've taken basic GIS classes but I'm clueless here!


title: How to use GROUP BY with arcpy.da.SearchCursor in file geodatabase?

text: fc = "C:\Users\AuxS3-4\Documents\ArcGIS/Default.gdb\Malla"          fields = ('OBJECTID','Sentido','Carriles','idMalla')          sqlclause=(None, "GROUP BY Sentido")     cursor = arcpy.da.SearchCursor(fc, fields,sql_clause=sqlclause)      **not working** > RuntimeError: An invalid SQL statement was used. [SELECT OBJECTID, Sentido, > idMalla FROM Malla GROUP BY Sentido **arcgis 10.1!!!**


title: How do I open personal geodatabase in QGIS 2.0?

text: Good afternoon. I am trying to use an ArcGIS (10.2) personal database MDB as a container for data to pass to a QGIS user. I formerly used QGIS 1.8 for Mac OSX, and after some fiddling around, I was able to open a personal geodatabase and load one or more features from it. I just upgraded to QGIS 2.0 and upon trying to check my MDB test file before sending to my colleague, I am unable to load the geodatabase. In fact, personal geodatabase as a file type no longer appears in the available types QGIS is prepared to open in the File Type drop down box in the load vector data operation. Is there some setting I need to tweak or an additional plugin I need to install in order to regain this functionality? Thanks, Russell


title: Count points within a given distance of a border

text: I have a vector layer of counties in Florida and a layer of points. I want to count the number of points that lie within 10km of the boundary for each county pair. This is what this looks like in QGIS -- any ideas on an efficient way to do this? ![points](http://i.stack.imgur.com/dn2UJ.png)


title: Background Processing Error with Mosaic to New Raster

text: I get a "Background Processing Error" with Mosaic to New Raster when trying to mosaic two DEMs that are in GRID. I am pretty sure I am inputting things correctly. The two input rasters are in FGDBR format, if that makes any difference. Thank you. I am adding this to my above message about one hour later. I want to add that I am using ArcGIS Desktop 10 (the student version if that matters). I installed all five service packs, and performed Mosaic to New Raster again, and still got a "Background Processing Error", although the geoprocessing ran longer than when I performed it before installing the service packs. Does someone have any suggestions? Thank you.


title: Problems in making CLM files with DIVA-GIS

text: I am fairly new to GIS softwares and this will be my first post here. I'm working with DIVA-GIS and was redirected here. I hope this is the correct place. I am doing a research which involves ecological niche modeling for present and future climate scenarios. However, i am having some urgent problems with creating the .clm files for the predicted future climate. I have downloaded the necessary data from WorldClim. I have followed the instructions from "Ramirez & Bueno, 2009, Working with climate data and niche modeling: Creation of bioclimatic variables", but DIVA GIS doesnt seem to want to create the files. Basically, i open up the "Make CLM files" window in DIVA GIS, and have all the necessary 36 .grd files + the alt.grd required for the operation. I have correctly inserted the prefixes and ticked their boxes. As soon as i press "OK", these boxes automatically uncheck, the 36 files are not split into the "selected files" spaces present in the window, and the program only creates the single climate.cli files. I have found this question being asked on the internet but with no answer. I have no idea how to solve the issue as everything seems to have been done correctly. Does anybody have an idea?


title: Using Field Calculator to Calculate a Mean for Multiple Rows

text: I am trying to calculate a mean across a multiple number of attribute rows and have this value added to a new field that I have entered in the attribute table. I have an attribute table which has a number of different ecoregion types associated with them. For example: If I select "Arid Canyonlands" there are 3 attribute rows that are selected, each with their own "mean". I am trying to add a new field to the attribute table which will take the "mean" of these three and populate that value in the new field created. I could manually do it through an editing session and using a calculator but just wanted to know if there is an easier way to actually do it through field calculator? Thanks so much for any help.


title: Joining csv file to vector layer in Processing modeler?

text: I am trying to join a simple csv file of values to a vector layer within Processing modeler. The match would be on an id held by both files. The csv file has no geometry. I can do this easily in qgis, but want to automate the process in Processing modeler. Is this possible? I have looked through (and tried) a number of the functions but have not found anything that works. I am using qgis 2.0.1


title: How do I use QGIS 2.2 to plot some locations on a map (of the US by zip code)?

text: I am a newbie to QGIS. I just installed it on my MAC Airbook with Mavericks. How do I simply plot a few locations on a map of the US? All of the tutorials I can find on the web are for older versions. Version 2.2 seems to be entirely different in terms of look and feel. For example, one tutorial tells me to load the plugin "edit any layer". Under 2.2 no such plugin seems to exist. I simply need to know how to get map loaded and then how to plot some excel or CSV data. Thank you for any help you can provide.


title: Raster vs. Raster Scatter Plot in ArcGIS

text: I created two raster datasets from the same world view 2 image. One dataset is NDVI, the other is a normalized surface water index (NDSWI). I would like to create a scatter plot for a pixel by pixel comparison. I've seen a few options for how to do this but they involve running a combination function in raster calculator which only allows for integers. I need the float data. I also have access to ENVI if there is a way to do it in that software. Running ArcGIS 10.2 and ENVI 4.4


title: How can I make ArcGIS 10.2 overwrite folders instead of pasting a new/copy folder (with a (1) suffix?)

text: Just upgraded to 10.2 from 10.0 and I have always edited data on the C: drive then pasted this updated folder onto the "work" server. In 10.0 the folder is overwritten. In 10.2 the folder is copied and given the (1) suffix giving me two folders. How can I fix this? Thanks!


title: How to change Curve Numbers for Measured Effects using HEC-GeoHMS?

text: Good afternoon everyone. I'm working on a theoretical project of a proposed watershed for a final project, and am using an extension ( **HEC-GeoHMS** ) which I've never used before. I'm dealing with some curve numbers, relating to soils in the proposed watershed. I'm trying to increase the curve numbers to show the measured effects, but when I increase these numbers I do not see any change. The tool I'm using is Generate CN Grid, and between have a soil land use polygon and and a CN Look Up (NCLookUp) Table. I thought that by increasing the Land Use numbers (LUValue) Field in CNLookUp would do the trick but it doesnt. These LUValue numbers correspond to the Land Use field in a soils polygon. I've also tried to increase the curve numbers for "B" field soils, and that did not work either. The "B" field corresponds to the curve numbers in the soils polygon. I'm not sure which number need to be increased to change the curve numbers by 10%. I've attached some pics of the attribute table below... If someone knows how to increase the curve please let me know, and thank you in advance! Sorry for the bad tags.... it wont let me write the best ones because I do not have a high enough Rep Level. ![enter image description here](http://i.stack.imgur.com/AwpIQ.jpg) ![enter image description here](http://i.stack.imgur.com/6GjTC.jpg) ![enter image description here](http://i.stack.imgur.com/h0jeq.jpg)


title: Where can I find historic aerials for some areas in Dona Ana County, New Mexico?

text: How do I find several historic aerials from the mid-1970's or early 1980's and where can I download them and I would like them to be free of charge. Cheers, ![Dona Ana County](http://i.stack.imgur.com/9DYJZ.jpg) ![Near Anthony, Texas](http://i.stack.imgur.com/dUHZR.jpg) ![Near Hatch, New Mexico](http://i.stack.imgur.com/k5Riz.jpg)


title: Get LatLng coordinates from SIRGAS2000 UTM 21s coords

text: I have a bunch of locations (36k) and they are represented using SIRGAS2000 (UTM 21s) coordinates. I need some way of converting them to traditional LatLng format so I can upload them to my database and use those coords with Google Maps API. I could use either a formula to translate them to LatLng before uploading, or some kind of API to convert them before using them in my app (after uploading them as they are to my database). Any clues?


title: Customizing CartoDB infoWindow HTML removes 'header' text

text:
Trying to change the HTML of the 'click' infoWindow causes the header text to disappear. I've got an infoWindow configured to display correctly. I'd like to use the 'email' field in my table as a hyperlink on the 'email' text. However, whenever I add the `<a href="mailto:{{email}}">{{email}}</a>` tag, then click 'apply' (or CTRL+S) to save the changes, the header in the infoWindow disappears. (the email link works just fine...) My full 'custom' HTML is below:
       x

city

{{city}}

email

{{email}}


title: How to create a TIN from UAV images or Google Earth images

text: I'm starting using ArcGis and I would like to create a TIN from UAV images. What are the steps that I have to follow? I think:   * Mosaic the images, merge o join. (I have 40 aereal pictures in .JPG)   * Georeference the big joined picture with GPS points (I may have these points, but in other cases not).   * Do something else.   * Create the TIN or xyz cloud points to export to AutoCAD. How can I do this? Do I need other tools? Thanks your support.


title: ArcMap/ArcObjects - Drawing graphics onscreen: Explanation or tutorial for Draw/Refresh/PartialRefresh methods?

text: I find myself woefully lacking in understanding of when, why, and how (which type) to do screen draw/refresh/partial refresh. For instance, in a standalone Python script outside the application boundary, I have a function that is trying to draw graphic elements in the data view. Specifically, the elements will be a TextElement on top of a RectangleElement. The function loads the two elements into a GroupElement, which is in turn added to the ActiveView's GraphicsContainer for drawing on the screen. (As far as I can tell the graphic elements are valid.) I am really not understanding what Draw/Refresh/ParitalRefresh methods to put where. If anyone can give/point to a good explanation or tutorial about screen drawing/refreshing I would appreciate it. Below is a bit of selected code from my function. I have a PartialRefresh in the last line, but I don't know if that is correct or not.               pGroupElement = NewObj(esriCarto.GroupElement, esriCarto.IGroupElement3)     pTextElement = NewObj(esriCarto.TextElement, esriCarto.ITextElement)     pRectElement = NewObj(esriCarto.RectangleElement, esriCarto.IElement)     .     .     (configure TextElement)  [tedious code removed]     .     .     (configure RectElement)     .     .     ptxtElem = CType(pTextElement, esriCarto.IElement)          pGroupElement.AddElement(ptxtElem)     pGroupElement.AddElement(pRectElement)          pContainer = mxDoc.ActiveView.GraphicsContainer          pGrpElem = CType(pGroupElement, esriCarto.IElement)          pContainer.AddElement(pGrpElem, 0)          mxDoc.ActiveView.PartialRefresh(esriCarto.esriViewGraphics, None, None)      **Added:** So, is creating objects with the following code - as I do now - not creating them in process?               def NewObj(MyClass, MyInterface):         """Creates a new comtypes POINTER object where\n\         MyClass is the class to be instantiated,\n\         MyInterface is the interface to be assigned"""         from comtypes.client import CreateObject         try:             ptr = CreateObject(MyClass, interface=MyInterface)             return ptr         except:             return None      If not, I gather I must use IObjectFactory. Assuming that my current objects are not in process, I must say I haven't seen any great performance hit, but I guess I'm just asking for trouble forcing lots of interprocess calls. Thank you, all, for the help. I shall experiment when next I get the chance and let you know the results.


title: Comparing 2 vector files

text: I'm looking for a tool which compares two vector files (eg shapefiles). Eg 2 versions of a river network. Quite a lot of the records are equal, but some are different. A possible output would be eg a shapefile with every geometry and 2 columns which refer to the id of the 2 original files, which can be missing if that geometry is not present in one of the files. I'm thinking about a strategy to program this myself (basically creating a hashed version of the geometry of each part and compare those), but before rushing into programming (I even have a fancy name 'shapediff') I was wondering if such a tool already exists.


title: GeoServer layers containing cities in each country, given that all the cities reside in the same table

text: Using GeoServer, I need to provide a graphical representation of the distribution of some metrics on a geographical basis. The geographical regions will be coloured and labelled according to the value of that metric. I would like to have a "world" layer (containing all the continents and only continents), a "Europe" layer (containing only countries from Europe) and a "France" layer (containing all the cities in France). So to speak, "a tree of layers containing the immediate children", given that these entities (continents/countries/cities) reside in three distinct tables with one-to-many relationships defined. I haven't found any "filtering" option when defining a layer from a PostGIS store, so a "cities" layer can only be based on the whole cities table (not on the cities in country X). Is there something I missed ? P.S. I would rather have distinct layers than having one big layer and filtering with every request, because I think the caching feature can only refer to layers. Is this assumption correct ?


title: Opacity control for KmlLayer in Google Maps V3 API?

text: Using a KmlLayer object within the Google Maps API, is it possible to control the opacity of a KML's image overlay features ?


title: Reading BSQ file format

text: is there a way to open BSQ file format in IDL? thanks in advance.


title: Upgrading GeoTools

text: Currently we are using geotools release version **2.7.5**. I checked the versioning of geotools and found that, there is a stable release version 8.* directly after 2.7.*. Do the new release version(accoring to current date **10.4** GeoTools Blog) means always the up-to-date version or different release versions serve different purpose? Thanks in advance!


title: Are there asset management systems for PostGIS?

text: Are there asset management systems that use PostGIS for asset storage?


title: automated georeferencing

text: I am attempting to fully automate the process of georeferencing a load of .png files - i have xml file containing the co-ordinates - but how can i use them? Does anyone have any advice?


title: OpenLayers SelectFeature control not working after de- and re-activation of NavigationControl

text: I have a problem with OpenLayers Control.SelectFeature and Control.Navigation: I have a map with a Control.Navigation object. And I have a Layer.Vector with a number of features. On this layer I register a Control.SelectFeature. For a specific function on touch devices, I'm trying to implement the following behavior: If a feature is selected by touch and the finger is touch-moved from the feature through the map, certain values are calculated on touchmove and displayed/updated. As soon, as the touch-select-touch-move sequence is finished (on touchend), normal map-drag-pan behavior shall be enabled again. Therefore, on the touch-select of a feature, I deactivate the Control.Navigation of the map and re-activate it on touchend. If I just do as shown in the code below, Control.Navigation is re-activated on touchend, but then SelectFeature is disabled. I had a look on the OpenLayers.Control.Navigation code. It does (de-)activates its handlers but I wasn't able to find any interference with SelectFeature-related code. If I re-create the Control.SelectFeature object, remove the old one, add the new one, and newly register the events, the map is broken after some pan/drag/move events. The Vector-Layer is jumping around and the colors of the map are messed up. Does anybody have any clue on this? I wasn't able to find anything similar documented, neither on stackoverflow, nor here, nor anywhere else. Many thanks in advance for any help! Some code: (Let me know, if you need to see more)               function createMap() {         var epsg4326 = new OpenLayers.Projection("EPSG:4326");                    navigationControl = new OpenLayers.Control.Navigation();              var mapOptions =          {              controls: [navigationControl],             minScale: 498276.5625,              projection: new OpenLayers.Projection(epsg4326),             units: 'km'         };                    map = new OpenLayers.Map('mapContainer', mapOptions);                         var customPanZoomBar = new OpenLayers.Control.PanZoomBar({'div':OpenLayers.Util.getElement('panzoombar')});         customPanZoomBar.position=new OpenLayers.Pixel(4, 50);         map.addControl(customPanZoomBar);     }                 function registerEvents() {             featureLayer.events.on({                              "beforefeatureadded":    beforeFeatureAdded,                         "featureselected":       onFeatureSelect,                         "featureunselected":     onTrackFeatureUnselected,                         "loadstart":             onFeatureLayerLoadStart,                         "loadend":               onFeatureLayerLoadEnd                          });                  featureSelector = new OpenLayers.Control.SelectFeature([kmlTrackLayer, referenceLayer]);             featureSelector.handlers['feature'].stopDown = false;             featureSelector.handlers['feature'].stopUp = false;             map.addControl(featureSelector);             featureSelector.activate();                  map.events.register('click', map, onMapMouseClick);             map.events.register('mousemove', map, onMapMouseMove);             map.events.register('zoomend', map, onMapZoomEnd);             map.events.register('movestart', map, onMapMoveStart);             map.events.register('touchmove', map, onTouchMove);             map.events.register('touchend', map, onTouchEnd);            }               function onFeatureSelect(event) {         // ...         if(controller.getIsTouchDevice()) {             navigationControl.deactivate();         }     }          function onTouchMove(e) {         // TODO: Calculate and update stuff     }                  function onTouchEnd(e) {         if(controller.getIsTouchDevice()) {             navigationControl.activate();         }        }


I have registered the postgresql database with arcgis desktop 10.1. In ArcMap, When I try to drag and drop one of the tables to the map I get this error:               Could not add the specified data object to the map      I want to Add data as a layer to the map using the data tables in postgresql database rather than using add layer plugin and import .csv file form another location. How can I solve this?


title: Automate data entry into Access from ArcMap

text: I have an Access 2007-2010 database that I'm currently working on by manually searching for roads in a defined set of areas in ArcMap 10.1 and then filling in the area's ID in an empty column in the DB. Is there a way to automate this process using Python to select the features by overlap and export the area IDs to the empty column in the DB?


title: How to generate evenly sized polygons within a boundary

text: I have an area and need to create evenly sized polygons within the area. It doesn't matter where the polygons fall, only that they don't overlap and each area is the same. They needn't be squares/rectangles or any specific shape. Can this be done in ArcGIS?


title: Listing Printer names in a Python Toolbox in Arcgis 10.1?

text: Here's my code for my third parameter in my Python Toolbox. When I run the toolbox and look at the list of printers, it only shows one of them. My print command of 'printerName' lists all of them in a seperate script. How can i get printerName to loop through all of the printers and put them in the list? Is there a way to make a loop on one line? Thanks                   # Third Parameter         printer = arcpy.Parameter(             displayName="Select a Printer",             name="printer",             datatype="String",             parameterType="Required",             direction="Input")              for printerName in arcpy.mapping.ListPrinterNames():             print printerName              # Set a value list of Add or Remove         printer.filter.type = "ValueList"         printer.filter.list = [printerName]      * * * Update 2 Here's the code for the third parameter that list the local printers:                   # Third Parameter         printer = arcpy.Parameter(             displayName="Select a Printer",             name="printer",             datatype="String",             parameterType="Required",             direction="Input")         # Set a value list for the available local printers         printer.filter.type = "ValueList"         printer.filter.list = arcpy.mapping.ListPrinterNames()      This works and lists all of my local printers. The problem is it can't print the looped MXDs. It looks like python can't find them in the loop according to my arcpy.AddMessage(). Here's the code:                   # Get inputs         InputMXD = parameters[0].valueAsText         PDF_Folder = parameters[1].valueAsText         printer = parameters[2].valueAsText              # Set workspace as defined by user         #env.workspace = PDF_Folder         arcpy.env.workspace = r"c:/temp"              #List Names for Inputs         arcpy.AddMessage("PDF_Output: "+PDF_Folder)         arcpy.AddMessage("Printer Name: "+printer)         arcpy.AddMessage("MXDs before Loop: "+InputMXD)                   MXDList = arcpy.ListFiles(InputMXD)         arcpy.AddMessage("After MXDList")         arcpy.AddMessage(MXDList)         for MXDPath in MXDList:             arcpy.AddMessage("MXD Path: " + MXDPath)             MXD = arcpy.mapping.MapDocument(MXDPath)             arcpy.AddMessage("MXD: " + MXD)             arcpy.mapping.PrintMap(MXD, printer)      ![ArcMessage](http://i.stack.imgur.com/hSOCB.png) It's showing the mxds before the loop, but it isn't printing them once the loop hits. Any ideas? It's showing "[]" when it should be showing what's in the "MXDList".


title: Prevent user from sliding the map to the right or left

text: Is there anyway to prevent user from sliding the map to the extreme right or left? something like setting a maximum/minimum zoom level in arcgis maps.


title: ListRasters not recognizing raster files in python

text: I have 2 rasters in my workspace, one in TIFF Format and the other in GRID format: "C:\ExampleFolder" When I use the python script:               import arcpy     >>> rasl=arcpy.ListRasters("C:\ExampleFolder")     >>> print rasl     None      Python does not recognize my raster files. I'm attempting to use the script in this previous question: Clip a raster using a shapefile into multiple rasters? I keep receiving error: ERROR 000732: Input Rasters: Dataset does not exist or is not supported. Any reason why Python does not recognize my raster?


title: How to inserting script into ArcGIS ModelBuilder?

text: I am looking for some tips about inserting a script in the ModelBuilder... I am actually building a model in the ArcGIS ModelBuilder. At one point I would like to insert a script that crosses information from two layers at one point of the model with a output layer, that will be used further along. In ArcMap, I added the script with a right-click in My Toolbox > Add Script... After loading my script, I applied the following parameters:   * Two inputs, referring my layers that I use in the script (raster layer type)   * One output, for the result (raster layer type) I then go to my model and drag my script into it. I connect my two layers as inputs with the arrow and specify the output file name. All seems ok as the boxes appear with the correct colors. I have to specify that I am working with a variable folder %folder% so I added that in my script. When I validate my model it goes all blank, because it cannot find the input layers, as they are created in the model. Can anybody help me please? PS: Here is my script:               # ---------------------------------------------------------------------------     # calculator.py     # Created on: 2012-11-15 16:59:11.00000     #   (generated by ArcGIS/ModelBuilder)     # Description:      # ---------------------------------------------------------------------------          # Import arcpy module     import arcpy          # Check out any necessary licenses     arcpy.CheckOutExtension("spatial")               # Local variables:     raster = "%Dossier%\Erosion.gdb\raster"          # Process: Calculatrice raster     arcpy.gp.RasterCalculator_sa("Con((\"%Surf_Drainee%\" > 12) & (\"%Surf_Drainee%\" <= 80) & (\"%Pente_Rclass%\" <= 24), \"%Pente_Rclass%\" + 1, Con((\"%Surf_Drainee%\" > 80) & (\"%Pente_Rclass%\" < 24), \"%Pente_Rclass%\" + 2, Con((\"%Surf_Drainee%\" > 80) & (\"%Pente_Rclass%\" == 24), \"%Pente_Rclass%\" + 1, \"%Pente_Rclass%\")))", raster)


title: How to get the "absolute value" of a raster cell in QGIS?

text: I have a raster map (-100 to +100) and I need to get all the minus values as absulute values (-100=100; -99=99...). How can I do this? Is it something like reclassify?


title: Geocodin process in open source GIS tools

text: I want to do geocoding with open source gis tools , is it possible? if then tell me the solution? I have my village attribute data with me like addresses and contact information of persons in every house. Now I want to do a small project with all details by using google imagery with open source gis tool? Let me explain?


title: How to aggregate point measurements in areas?

text: I have a shapefile with the geographical boundaries of towns in a specific region; then i have a csv file (with xy coords) with a lot of measurements about pollution in this region. I'd like to have the mean value of pollution for town, obviously averaging over the measurements inside each town. How can i do it? I'm new to QGIS.


title: ArcGIS 10.1 - Using Polygon Neighbors with dissolved polygons

text: I've used polygon neighbors to find all neighbors of a polygon layer, which I then use to look up all possible neighbor combinations and dissolve the polygons into all possible combinations of two polygons. I'd then like to run this again and build all possible three-polygon combinations. However, when I run the tool again on the dissolved polygons layer it creates an empty table. I know the data is fine - is there another step i need to take, or is there another tool I could use to achieve this? Thanks in advance. EDIT: This is the script that i use after running the polygon neighbors tool to create the dissolves and then append them to 'Sites'. I then manually run polygon neighbors again on 'Sites', but get an empty table:               arcpy.env.workspace = "C:\Users\Ant\Documents\ArcGIS\ITN.gdb"     FC = "BLPUs"     TABLE = "BLPUs_PolygonNeighbors"     DISSOLVED = "Sites"     FIELDS = ["src_OBJECTID", "nbr_OBJECTID"]     with arcpy.da.SearchCursor(TABLE, FIELDS) as cursor:         for row in cursor:             OID1 = str(int(row[0]))             OID2 = str(int(row[1]))             arcpy.MakeFeatureLayer_management(DISSOLVED, "DISS_LYR")             OUTPUT_NAME = "Dissolved_%s_%s"%(OID1, OID2)             SQL = "OBJECTID = %s OR OBJECTID = %s"%(OID1, OID2)             arcpy.SelectLayerByAttribute_management("DISS_LYR", "NEW_SELECTION", SQL)             arcpy.Dissolve_management("DISS_LYR", "DISS_OUT")             expression1 = arcpy.GetCount_management("DISS_LYR")             fieldName1 = "BLPUCount"             fieldName2 = "OID1"             fieldName3 = "OID2"             fieldName4 = "OID3"             fieldName5 = "OID4"             fieldName6 = "OID5"             arcpy.AddField_management("DISS_OUT", fieldName1, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName2, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName3, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName4, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName5, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName6, "LONG")             arcpy.CalculateField_management("DISS_OUT", "BLPUCount", expression1)             arcpy.CalculateField_management("DISS_OUT", "OID1", OID1)             arcpy.CalculateField_management("DISS_OUT", "OID2", OID2)             arcpy.CopyFeatures_management("DISS_OUT", OUTPUT_NAME)             arcpy.Delete_management("DISS_OUT", "DISS_LYR")          fcList = arcpy.ListFeatureClasses("Dissolved*")     for fc in fcList:         arcpy.Append_management(fc, DISSOLVED, "", "", "")


title: QGIS Installation - Oracle Link

text: Trying to connect an oracle 10g database to QGIS. I'm getting the error below: _ORA - 12154: TNS:Could not resolve the connect identifier specified_ Anybody ever seen this error, or could provide some guidance?


title: Create Contours From a DEM without 3D or Spatial Analyst

text: I'm wondering if there is a way to create contours from a DEM using ArcGIS without 3D or Spatial Analyst Extensions. I know that there are a few questions out there pertaining to this (How to create DEM from contours without ArcGIS Spatial Analyst licence?), but I'd like to specifically ask if there is a workaround for this. Like I said this is more of a curiosity type question. My organization is looking to cut budget and I personally would like to cut down on some of the ArcGIS licensing cost. Major projects that we do here are elevation related and we need this functionality. Like I said, QGIS can complete it, but some clients request the work be done in ArcGIS. Currently I'm trying a mix of DEM to points to contours, but with no luck so far. Crunching a DEM to points is a long resource trying task so it's not optimal, but I think it may work. But after that I really need to find a way to go from point to contour. Is there a free ArcGIS add-in with a functionality like this?


title: How to compare values from a column in attribute table with values in Dictionary{}?

text: I am just entering to the python world, hence the level of my question. Can anyone tell me what Python function should I use to compare values stored in one column in an attribute table with values stored within a script's dictionary{}. Format of the values in table is as follow: "2000, 5000", next row "3000, 6000"... etc. - this is a string. Format of my dictionary: dictio = {"NW": ["1000, 5000"], "NX": ["2000, 5000"], ...} How to take value from the table compare with dictionary and get dictionary Key ('NX') as an output. Many thanks PS. I am working on ArcGis 10.0 To clarify, I will try to give more details that I have been asked for in comments below: I am trying to create a simplified(!) tool that converts XY coordinates to BrithishNatioanlGrid. The dictionary contains fixed number of items, where keys and values are always the same. Format of the table will be always the same but number of rows in a table may be different each time as they represent polygons in the table (attribute table of polygon shapefile). Field name in the table is "XY". Once I got a list of keys I am doing to concatenate it with other text value, stored in gis table. Extract from dictionary: Dictio = {"NA": ["0, 9000"], "NB": ["1000, 9000"], "NC": ["2000, 9000"], "ND": ["3000, 9000"],"NF": ["0, 8000"], "NG": ["1000, 8000"], "NH": ["2000, 8000"], "NJ": ["3000, 8000"], "NK": ["4000, 8000"],"NL": ["0, 7000"], "NM": ["1000, 7000"], "NN": ["2000, 7000"], "NO": ["3000, 7000"], "NR": ["1000, 6000"], "NS": ["2000, 6000"], "NT": ["3000, 6000"], "NU": ["4000, 6000"], "NW": ["1000, 5000"]} Extract from attribute table: ![enter image description here](http://i.stack.imgur.com/3wDiw.jpg) What I want to do is: take value from ‘XY’ ->check against dictionary, and find the same value -> take key of the value -> stick it in front of “coord” value -> save it in “NGR” column (in brackets you can see desired output). I hope it is a little bit clearer now.


title: Custom Metadata Stylesheet

text: I am looking to create my own custom metadata stylesheet using the metadata toolkit in 10.1. Has anyone been successful in doing this or has another suggestion on how I can create my own custom stylesheet in 10.1?


title: Apply QGIS Style to osm-File like in Open Cycle Map, Landscape Base-Layer

text: I try to mimick a rendering style like in Open Cycle Map (landscape base layer) in QGIS. However, I'm not able to find certain elements (i.e., wood and rivers) that are used in Open Cycle Map but seem to be missing in the extract. Does someone know why this is and how I could procede? # Edit: For specification of the issue: I have an extract taken directly from OpenStreetMap (see here) (saved to my dropbox here). And another extract from an API call (http://open.mapquestapi.com/xapi/api/0.6/*[bbox=10.7,47.200,10.875,47.350]), covering about the same area (in fact the one from the API is a bit larger). The extract from OpenStreetMap shows, i.e. feature 199333058 (a large forested area), which I can't find in the extract that comes from the API (I opened the files in Notepad and searched for the ID in both osm-files). Also searching for the feature after opening the API-extract in QGIS was to no evail..


title: How can I do multiple snapping of vector layers in QGIS?

text: I have a network of a transport system that I created from 1970-2013. However, the accuracy is letting me down as I used different snapping settings throughout the process. Is there a plugin or a way that I can correct each line (and align each method of transport which uses the same stretch of road) without using the node tool? I have attempted to use the traceDIGITISE plugin but it didnt work for me.


title: PostGIS intersection function

text: I have a problem with intersection function. I built my query following http://manual.linfiniti.com/en/postgis/geometry.html, 5.7 section. I made my clip object, a red linestring frame: ![enter image description here](http://i.stack.imgur.com/8fDOq.jpg) But after the clip(intersect) operation, something is wrong: ![enter image description here](http://i.stack.imgur.com/jsfO1.jpg) query:               create table roads_clip as     select st_intersection(a.geom, b.geom), b.*     from clip as a, roads as b     where not st_isempty(st_intersection(st_setsrid(a.geom,23700),       b.geom));      Roads layer contains multiline object and intersection cut roads where intersects the red frame. I would like a result similar to this: ![enter image description here](http://i.stack.imgur.com/VRxlC.png) Please help, thanks


title: How to create an Isopleth map?

text: I'm looking for a plugin for QGIS that would allow me to create an effective isopleth map. Does one exist? I haven't been able to find any, only independent software that would allow this type of mapping. Any help would be appreciated!


title: Can you customize the editor widget for a feature layer?

text: Here is the code for the editor widget:               <esri:EditorWidget x:Name="MyEditorWidget" Map="{Binding ElementName=MyMap}"                                            Width="300"                                            AutoSelect="False"                                           GeometryServiceUrl="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"                                           ShowAttributesOnAdd="True"  />      This is **provided by Esri**. Some of these buttons have no use for our clients. Is there any possible way to get rid of them? Also, can I use some of the features from the editor without actually having the widget, such as the Add. I have not seen any documentation for this. Any help would be appreciated. Here is a picture of what the editor widget looks like: ![enter image description here](http://i.stack.imgur.com/2we4a.png) The only buttons I am interested in are the Save Edits, Add, and Clear Selection.


title: Why do existing map services run slow after updating to ArcGIS 10.2.1 for Server?

text: Has anyone had any issues with existing map services after updating to ArcGIS Server 10.2.1? After updating they are running slow and causing my ArcGIS Javascript app to crash. All of our GIS services are on 10.2.1 now (Desktop, Server, SDE). Any ideas? I can provide more information if necessary.


title: What class/types of smartphone chipsets support GPS, A-GPS, GLONASS AND have extended kalman filtering?

text: I've been testing several Android phones (all running Android 4+) Sony Xperia T, Moto G, Nexus and HTC 1 which are all giving decent tracks (all of which use GPS/GLONASS) However we are also using the new Mi-Fone (Ai350) running android 4+ and we are seeing lots of noise. Specs are hard to come by for this phone but it looks like basic GPS. This is a sub $80 android phone Question 1: What low end to mid-tier phones use GPS-GLONASS for better tracks? We are using Google's 'My Tracks' app to record the data' Question 2: Do GPS chips have extended kalman filtering on them? Some experts say yes while others say no. Would appreciate some clarification on this. Thanks N


title: How to georeference Tiffs after manipulation in Photoshop?

text: I am exporting very high-res (7000x7000px) hillshades from ArcMap as tiff files. I am then doing some work in photoshop to the images. How can I easily georeference these tiffs after working on them in PS? Is there a way I can simply define the coordinate system and the bounds of the tiff without using ArcMap. I am trying to avoid ArcMap because I seem to loose all me edits from PS and ArcMap just has a tenancy to foul things up once I reimport. I have QGIS installed if that might be a better approach.


title: Am I misunderstanding "Equal Interval"?

text: After reading Choropleth Mapping Using Quantile Method in CartoDB I decided that it was time for me to understand CartoDB's quantification methods. As I understand it, _quantiles_ should contain an equal number of rows, _equal intervals_ should place the cutoffs at ... equal intervals, and _jenks_ should do some math and come up with groups that have the smallest standard deviation, more or less. I'm skipping heads/tails for now. I created a slightly goofball map with 18 points, each with an age value from this list:               [11, 11, 12, 13, 14, 16, 19, 20, 20, 20, 23, 25, 26, 26, 31, 37, 38, 38]      I mapped them and then used the choropleth wizard to look at the implication of the various quantification methods. I expect the _Quantile_ method to break the list into groups of six, which it does:               [11, 11, 12, 13, 14, 16]      [19, 20, 20, 20, 23, 25]     [26, 26, 31, 37, 38, 38]      I do not expect to see the logic in the Jenks method at a glance, but indeed, the Jenks groups each have a smaller standard deviation than the quantile groupings.               [11, 11, 12, 13, 14, 16, 19] SD = 2.928     [20, 20, 20, 23, 25, 26, 26] SD = 2.854     [31, 37, 38, 38] SD = 3.367      The SD for the quantile groups is 1.9, 2.3, 5.8 (At least per Calc's `=STDEV` function.) So far so good. When I select _Equal Intervals_ I was expecting cutoffs 8 or 9 years apart (so 19 and 28 or 20 and 30 but the CSS places the cutoffs exactly where the quantile cutoffs were, giving groups that are 5, 8, and 12 years long -- not very equal:               #interval_new [ age <= 38] {        marker-fill: #F03B20;     }     #interval_new [ age <= 25] {        marker-fill: #FEB24C;     }     #interval_new [ age <= 16] {        marker-fill: #FFEDA0;     }      Am I misunderstanding how equal intervals work? Or is this a bug?


title: How to change raster cell values within a polygon using QGIS GUI?

text: I would like to know how to change the values of raster cells which are within a polygon, leaving all cell values outside the polygon unchanged. I would like to subtract 1.5m from each raster cell value within the polygon, rather than make them all the same value. I don't know how to use GRASS so I'm hoping there is a way to do it using the tools within the QGIS GUI, raster calculator, or processing toolbox. I'm using QGIS 2.0. Thanks.


title: Accessing Attributes of Individual FeatureLayer Points with ArcGIS

text: I have been struggling for some time with selecting points from a featureLayer which is stored on an ArcGIS webserver. Each of these point graphics contains information such as an ObjectID, SiteName, City, County, etc. I have created an infoTemplate for the points and all of this data is shown when each graphic point is clicked. However, when trying to access the values of the graphic, such as the value of ObjectID, I cannot seem to find anything other than an empty object. Here is what I have tried:                             The console output is simply an empty array [] I know that information exists about the feature since it is stored and displayed in the infoTemplate. Any help is greatly appreciated!


title: Why is the SQL included in the URL of CartoDB visualizations?

text: I noticed that the URL of CartoDB visualizations include the parameter `sql=` with the SQL statement for that visualization:               http://lifewatch-inbo.cartodb.com/viz/b43fa5a6-7dd0-11e3-ba2a-5f9e077d1162/embed_map?title=true&description=true&search=false&shareable=true&cartodb_logo=true&layer_selector=false&legends=true&scrollwheel=true&sublayer_options=1&sql=SELECT%20%0AST_MakeLine(the_geom_webmercator%20ORDER%20BY%20date_time%20ASC)%20AS%20the_geom_webmercator,%20%0ACASE%0AWHEN%20date_time%20%3E%3D%20'2013-05-28'%20AND%20date_time%20%3C%20'2013-06-25'%20THEN%20'1.%20Egg%20incubation'%0AWHEN%20date_time%20%3E%3D%20'2013-06-25'%20AND%20date_time%20%3C%20'2013-07-24'%20THEN%20'2.%20Chick%20rearing'%0AELSE%20'3.%20Postfledging'%0AEND%20as%20behaviour%0AFROM%20three_gulls%0AWHERE%20bird_name%20%3D%20'Eric'%0AAND%20outlier%20IS%20NULL%0AGROUP%20BY%20behaviour%0AORDER%20BY%20behaviour&sw_lat=50.790527850939384&sw_lon=2.2449874877929688&ne_lat=51.76975203254081&ne_lon=5.587577819824219      However, these parameter seems optional, as the visualization works fine without the parameter:               http://lifewatch-inbo.cartodb.com/viz/b43fa5a6-7dd0-11e3-ba2a-5f9e077d1162/embed_map?title=true&description=true&search=false&shareable=true&cartodb_logo=true&layer_selector=false&legends=true&scrollwheel=true&sublayer_options=1&sw_lat=50.790527850939384&sw_lon=2.2449874877929688&ne_lat=51.76975203254081&ne_lon=5.587577819824219      Changing the SQL on CartoDB will update the existing visualization and render the value of `SQL=` outdated, so I was wondering why it is included at all?


title: In mapbasic,how to register a table in xlsx,not in xls?

text: I have tow files that only differ in extention name, one xls ,the other xlsx.both contained the same things,same structure.there's no problem when I registered a table in xls,but when in xlsx,an error occured. ![enter image description here](http://i.stack.imgur.com/rQPBF.png) code list: Include "mapbasic.def" Include "menu.def" Include "icons.def" Declare Sub main Declare Sub Combine Sub main Register Table "C:\Documents and Settings\Administrator\desktop\test\fdd.xlsx" TYPE xls End Sub


title: Can I achieve one-to-many relationship in QGIS custom forms?

text: My PostgreSQL database has **ElectricLine** geometry table which has one-to- many relationship with **ElectricLineMaterial** non-geometry (attribute only) table. This PostgreSQL table added as layer in QGIS 2.0.1. When the user add/edit an ElectricLine, he should have ability to add one or more ElectricLineMaterial records against to that geometry. Can I achieve this requirement via **Custom QGIS Forms**? In other words, I want to have an "Add Electric Line Material" button in the form to add many materials against the current adding/editing electric-line. _Note: I am new to QGIS and learning QT Designer._


title: convert data.frame with no lat-long info to a raster

text: coders, I need to read in a .txt file into R and later do some spatial analyses on it.   I’m working in R. 3.0.2 on a Windows server.   I load the following libraries (probably more than I need): > library(raster)   >  library(rgdal)   >  library(rgeos)   >  library(sp)   >  I then read in the text file:   > > v2<-read.delim("E:\GIT\GEO_04_Research\03_Fire\03_FireIASI\Data\fire\GigGFEDRedownload\GFED3.1_199902_BA.txt", > header=FALSE, sep = "", dec = ".", strip.white=TRUE)   >  This works fine and   >  str(v2) #tells me 'data.frame': 360 obs. of 720 variables. Great. However there is no xy information. The documentation on this data layer states this data runs from a top-left of 179.75W, 89.75N to the lower right corner at 179.75E, 89.75S, with each reading in this regular ‘grid’ occurring at 0.5 degrees. So I created a raster to match these specifications: > gfed<-raster(ncol=720,nrow=360,xmn=-89.75,xmx=89.75,ymn=-179.75,ymx=179.75)   >  gfed… # tells me:   >  class : RasterLayer   >  dimensions : 360, 720, 259200 (nrow, ncol, ncell)   >  resolution : 0.2493056, 0 (x, y)   >  extent : -89.75, 89.75, -179.75, 179.75 (xmin, xmax, ymin, ymax)   >  coord. ref. : NA   >  Great. But now how do I get the xy information from the ‘gfed’ raster onto the values in the data ‘v2’? I tried ‘stack’ hoping it would take the ‘square’ data.frame onto to the gfed raster, but I get 0 layers. I’m new to coding and I suspect that this requires some loop that reads row 1 from 1-720 and then goes to the next row until it reads all 360 rows. I think part of the problem is that the data.frame ‘v2’ doesn’t have any spatial information associated with it, so SpatialPixels and SpatialDataFrame options don’t work – or at least, I can’t get them to work. Any help would be really appreciated. I just can’t get passed this point.   Many thanks, Helen. * * * thank you _so_ much for your solution! I've been meaning to thank you for another post you made on someone else's question last year that really helped me too. I'm almost there with your solution of using 'scan' into a newly created raster. It is a bit embarrassing to admit – I understood that my co- author on this was sending ‘world-wide’ files at half-degree scale, and previous data have been just that, and so I accepted that even though I looked at the data and saw co-ordinates that didn’t start at -180, +90. The study area is actually southern Africa (approximately xmn=13, xmx=36, ymn=-36, ymx=-18) and it is at a quarter-degree (0.25) scale!   I thought I’d be very clever and apply your solution (make grid and then scan the data in to the new grid) with these southern Africa parameters. I couldn’t get it to work and after spending time staring at the data, I realised two things: 1. The points don’t start neatly at round numbers. I applied shifts separately to the x and y. 2. Then I realised that the data that has been sent to me is an irregular grid. It is not consistently 0.25-degrees. It is in general has a 0.3-degree sized grid cell followed by a 0.2- degree sized grid cell followed by another 0.3- degree sized grid cell. Any idea how I read/scan data from an irregular ‘grid’ into a nice neat 0.25 grid that I have made. I have now made > southernA<-raster(nrow=72, ncol=92, xmn=13, xmx=36, ymn=-36, ymx=-18) I guess I would like R to ‘resample’ the ‘nearest-neighbour’ grid from the irregular grid into my newly created, regular grid called southernA. Someone asked what the data is all about: we are looking to see how much biomass burning contributes to CO in the atmosphere. I used to do a lot of fire ecology work for a conservation agency that I worked for. I still dabble in the field  I’d be happy to post a copy of the irregular grid data if that would help find the solution. Thanks again for the assistance – it is making a big difference!


title: How to add Domain using ArcGIS Diagramer?

text: Is it possible to add domain to XML Schema of GDB using ArcGIS Diagramer ?


title: can I install GIS on mackbok?

text: I am trying to install arcgis 10 on apple macbok. But I could not. My question is that whether arcgis 10 is supported by macbook or not?


title: How to calculate the grid point precipitation from the station data?

text: I have a problem to convert my hourly station precipitation data to the surrounding grid points. I need to convert 4 station hourly rainfall data to 18, 60, and 240 grid points for 0.0625,0.03125, and 0.015625 respectively. I know how to do it in ArcGIS.My problem is I have 20 years hourly precipitation data that need to be interpolated to those grid point. Making 20 years hourly raster data seemed impossible to me to start with. If anyone of you could help me, it is appreciated. Thank you


title: Looking for free DEM and other remote sensing data for Germany

text: Does anyone know of any sources for free DEM and other remote sensing data in Germany? I don´t think Europe is as open as the USA when it comes to free data!


title: What the difference: mapnik and mapnik2?

text: I use Ubuntu 12.04 LTC, postgres 9.1, postgis 2.0. I install mapnik.               $ sudo add-apt-repository ppa:mapnik/nightly-trunk     $ sudo apt-get update     $ sudo apt-get install libmapnik mapnik-utils python-mapnik      Which version of mapnik I install? https://github.com/mapnik/mapnik/wiki/Mapnik2 in this documentation write that mapnik may be 0.7 or 2.1               >>> import mapnik     >>> mapnik.mapnik_version()     300000      In synaptic: 3.0.0+dev20130906.git.f3b8645-1~precise1


title: How to install two versions of Qgis on Ubuntu 12.04?

text: I would like to run multiple versions of QGIS on Ubuntu 12.04. Can I do that, and how if so?


title: 80% of data has a spatial component, says who?

text: This quote about how 80% of all data has a spatial component has been bandied around everywhere. Introduction to GIS classes, product descriptions, talks, etc. Would anybody know who first said it? Or A link to original article would be nice.


title: How to rubberband zoom w/o the shift key: arcgis api for javascript

text: I want to enable the rubberband zoom effect without users having to hold the shift key down. This behavior is found is Esri navigation bar dijit. I don't want to use the dijit. How can I get a zoom in/out bounding box to draw without forcing users to use shift key?


title: How to programatically set default Geodatabase and Workspaces for a map document?

text: I have a QC process that has a bunch of models that need to be sequentially run, and then the results manually inspected between each model. I know how to manually set the default GDB for the Map Document (`File-->Map Document Properties-->Default Geodatabase`). I also know how to manually set the default Geoprocessing Workspaces (`Geoprocessing-->Environments-->Workspace`). I already have a "setup script" that generate a GDB, Feature Datasets, define the spatial reference, etc, and I would like to be able to integrate these steps into the setup procedure as well. Can these settings be automatically set? For example, I have tried `arcpy.env.workspace`, but that only appears to work within a script, not setting it at the "application" level. Is this possible? I know it seems like a small thing, but I have many "areas of interest" that we have to look at, and each one gets placed in its own MXD and GDB (so yes, I could do it by hand... over & over again).


title: How to serve local maps for an offline HTML5 webmapping app?

text: How could one **serve maps** (tiles in wherever format possible) within a Android device to be consumed by an **offline webmapping app** also accessed within the device's browser?


title: How can I move diagrams?

text: Is there a way to locate diagrams and move them wherever you want in QGIS 1.7.4/ 1.8.0? I created a pie chart under the tab "diagram". I can mark those diagrams with a green box and move them via the label-tool, but they won't change their position in the end. When I create diagrams with the "diagram overlay" tab they cannot even be marked. Also, what is the difference between "diagram" and "diagram overlay"? Best, Mario


title: Shapefile Arribute Table to Datagridview

text: Can you please let me know how to display a shapefile attribute table in C# DataGridView? Thanks


title: Programatically split a polygon with a line

text: In looking at this question, it occurred to me that I am not sure how one would go about using geoprocessing tools in ArcGIS to split a polygon with a line programatically. Manually, you would use the Cut Polygons tool or the Split Polygons tool on the Topology toolbar, but how would you accomplish the same task using modelbuilder or python groprocessing scripting tools? Right off the bat I think of all of the tools in the Analysis toobox like Union, Identity, etc, but those are all Polygon-Polygon tools, **_NOT_** Polygon-Line tools. Even the Split tool is Polygon-Polygon. Any ideas? Accepted answers will be for ArcGIS, but for completeness sake, other platform answers are encouraged as well.


title: How to batch open and export to PDF folder of map packages (*.mpk)?

text: I have a directory full of ArcGIS map package files (mpk) that I need to export to pdf. Is it possible to automate it so I don't have to open and export each one manually? I need to open each map package, switch to layout view, export to pdf, close it, and repeat with the next map package file.


title: How to reduce Polygon to Raster (Conversion) bit depth?

text: I have a polygon featureclass that I am trying to convert to raster format at a low bit depth (i.e. <8 bit unsigned). The FC contains 50,000 polygons which have five values: 1,3,5,7,9. I have set the value field to record the previously described values. I have also tried adding a field populated with 1's and setting the Value Field to that. The output raster is an 8-bit unsigned raster dataset with a NoData value of 255 every time. I have tried changing the Environment setting > Raster Storage > NoData to every one of the options from NONE to PROMOTION. I have even tried entering "0" as a NoData value in the environment setting. I am pretty sure the tool does not honor that Environment setting. How can I control the bit depth of the Polygon to Raster output? Preferably I would like a 1, 2 or 4 bit raster output. Work-arounds welcome too. Edit: Unfortunately, Copy Raster is not an option because the Polygon to Raster conversion is an intermediate step in a larger processing workflow. Creating a new raster dataset would only add more time to the workflow.


title: How do I activate a custom ITool from a form without having to add it to a toolbar? (ArcGIS 10 add-in development)

text: I'm working on an add-in for ArcMap 10.0 that adds a toolbar to ArcMap. One command (`OpenModelessDialogCommand`) button on that toolbar opens a modeless WinForms dialog, from which a tool (`MyTool`) can be activated in order to e.g. select a feature on the map. My `Config.esriaddinx` contains these command and toolbar declarations:               <Commands>       <!-- this is the command that opens the modeless WinForms form, from where            MyTool is available: -->       <Button id="OpenModelessFormCommand" ... />       <!-- MyTool is not directly referenced in any toolbar defined in this file: -->       <Tool id="MyTool" class="MyTool" ... />     </Commands>     <Toolbars>       <Toolbar ...>         <Items>           <Button refID="OpenModelessFormCommand" />         </Items>       </Toolbar>     </Toolbars>      What I'm having problems with is activating `MyTool` in the form. All I've found on the internet is code samples along the lines of:               // get a reference to an instance of MyTool:     ICommandItem myTool = ArcMap.Application.Document.CommandBars.Find("MyTool");      // activate MyTool:      ArcMap.Application.CurrentTool = myTool;      However, this apparently requires that `MyTool` actually appears in a command bar (e.g. toolbar) of my add-in. But that's not the case. So, I've tried this next:               ITool myTool = new MyTool();     ArcMap.Application.CurrentTool = myTool;  // Type mismatch! An ICommandItem is expected.      I've even looked into adding an invisible `AxToolbarControl` to my form and adding a button for `MyTool` there; but then I'm running into problems on how to connect that toolbar (via `SetBuddyControl`) to the opened document's map. I don't want the tool to function in a separate `AxMapControl`, I want it to work directly with the main map shown in ArcMap. **Question:**   How do I activate a custom tool that is not added to any toolbar (or other command bar, for that matter)?


title: Free MobileGIS like ArcPAD

text: I'm looking for open-source program like ArcPAD. I have read all questions and answers, but i find nothing. I need the program for PDA (Dell axim x51v + GPS modul) and I want mapping points (trees or buildings), lines (roads) and polygons (forests).Then I want to do a simple web-mapping project. Thanks for sharing your knowledge. Regards Brtko