title: Automating capture of Extent from multiple mxds with multiple dataframes

text: I want to create a single shape file from multiple mxd's that have multiple frame sets with different extents in them. I have found/started a script to do this (attached) but can't figure out how to write the captured X&Y Max/Min into the shape file that is created for this. See output below. I also want it to write the scale and title of the frame as well as the file name of the mxd. Would appreciate your help in completing this script.                import arcpy, glob, os from arcpy      import env from arcpy import mapping      env.overwriteOutput = True           path = r"C:\temp" mxdList =      glob.glob(path + "\*.mxd")           env.workspace = r"C:\temp\Test.gdb"           y = 1           for mxd in mxdList:          mxd2 = mapping.MapDocument(mxd)          dataframe = mapping.ListDataFrames(mxd2, "*")[0]          frameExtent = dataframe.extent          XMAX = frameExtent.XMax          XMIN = frameExtent.XMin          YMAX = frameExtent.YMax          YMIN = frameExtent.YMin          pnt1 = arcpy.Point(XMIN, YMIN)          pnt2 = arcpy.Point(XMIN, YMAX)          pnt3 = arcpy.Point(XMAX, YMAX)          pnt4 = arcpy.Point(XMAX, YMIN)          array = arcpy.Array()          array.add(pnt1)          array.add(pnt2)          array.add(pnt3)          array.add(pnt4)          array.add(pnt1)          polygon = arcpy.Polygon(array)          arcpy.CopyFeatures_management(polygon,      "Polygon_Extent" + "_" + str(y))          y = y + 1                list = []           lstFCs =      arcpy.ListFeatureClasses("Polygon_Extent*")      for fc in lstFCs:          list.append(fc)           arcpy.Merge_management(list, "Extent")           for item in list:          arcpy.Delete_management(item)      Even with this I get errors...               Traceback (most recent call last):       File "P:\2011\Job_031_TownPlanning_SeriesProduction\Working\mxd\extent_creation.py", line 32, in <module>         arcpy.CopyFeatures_management(polygon, "Polygon_Extent" + "_" + str(y))       File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1943, in CopyFeatures         raise e     ExecuteError: ERROR 000210: Cannot create output Polygon_Extent_1     Failed to execute (CopyFeatures).


title: Java Contour Algorithm

text: Does anyone know if there is an open source project in Java that will take a set of (x, y, z) points and create a contour map for Google Maps/Earth? There does not seem to be a good contouring application for Google Maps. Any suggestions? Thx!


title: Can Civil 3D reproject shapefiles?

text: Sorry to ask, but I just don't have time for help menus this week. That said, does anyone know if CAD is capable of re-projecting shapefiles? I find myself in a situation whereby I may have to use spatial data without access to ESRI software. The data are delivered in the GCS_North_American_1983 datum, and my clients site drawing is in NAD83 Z17N. I fully expect problems. Can any of you post any related links that you're aware of? There's no budget to purchase software on this one either (just a heads-up). Alternatively, is there a way to get CAD to project on the fly? Thanks in advance


title: QGIS or Postgis - How to split polylines with a point layer?

text: In QGIS, I would like to split the polylines in a layer loaded in the workspace with the points in another loaded layer. If a point intersects a polyline, this polyline should be transformed into two polylines... I've read that this could be done with grass but i have no idea how to do it with layers (SHP)loaded in the QGIS workspace.


title: How to increase resolution of DEM rasters?

text: Thanks to the fine folks here at the GIS SE, I have managed to batch process a load of ASC files into raster hillshade TIFs. However, while they look fine on screen, when printed they are very pixellated - they are too low a resolution in the printing sense. Is there anyway I can increase the resolution so they print well?


title: Open Layers override class or method in Android 2.3

text: I'm implementing my own image loading mechanism for openlayers, because lack of functions in android 2.3 webview. It will get cached images from android db. I wan't to override OpenLayers.Tile.Image.initImage(). What options I have? I have try Utils for extending TMS layer, but can't extend initImage.


title: QGIS create layer with the points of the beginnings and ends of a polylines layer (without duplicate points)

text: In QGIS, i would like to create a new layer containing the beginning and end points of a polylines layer, but without the duplicate points that would result of adjacent polylines.


title: What affects the kind of date (local vs. UTC vs unspecified) on JTXJobClass.StartedDate?

text: I am accessing the JTXJobClass.StartedDate for a JTX Job (with IJTXJob3). I am getting an unspecified DateTime.Kind value. The value appears to be UTC (iirc, WMX always stores UTC in the database but I'm questioning that since the DateTime.Kind is unspecified). The value comes from the started_date field of the JTX_JOBS table and its values looks like UTC to me. Is there a WMX configuration that would make the DateTime.Kind on the JTXJobClass.StartedDate return as `Utc`? Or `Local`? Or is it safe to _assume_ that the unspecified value is `Utc`? Instinctively, this is my first approach (because it is easy), but then I started to think about what could go wrong if that assumption doesn't hold true.


title: Heat Maps only for feature layer (why not for dynamic layer ?) in ArcGIS Java script API 3.0/3.2

text: I am referring this link to generate the heat map. In this example they used feature layer and I tried using dynamic layer but getting an error (that no map is displaying). I researched on Google regarding this but not able to find such information . So is there any specific requirement/purpose to use feature layer instead of dynamic layer?? If anyone know this please let me know…. Thanks… Software platform : ArcGIS 10.1 (Server & Desktop), ArcGIS JSAPI 3.0/3.2


title: VSIMalloc3() and UnifiedSrcDensity mask errors when running gdal_warp in OSGEO4w shell

text: This is related to gdal.py as part of bat script in windows 7 I am getting > ERROR 2: VSIMalloc3(): Out of memory allocating 854522136 bytes. > > ERROR 2: Out of memory allocating 119813400 bytes for UnifiedSrcDensity > mask. I am running a XEON 3.4GHz. Windows 7, 64-bit with 16GB RAM. 930GB on C and 850gb on D (this is free space off 1TB drives) and network drives with 1.72TB free. The command I am running in a bat file is               gdalwarp -multi --config GDAL_CACHEMAX 500 -wm 500 -r near -co "COMPRESS=DEFLATE" -co "TILED=YES" -co "BIGTIFF=YES" -srcnodata 255 -dstnodata 255 -overwrite %2\%3\%3_translated.tif %2\%3\%3.tif > %2\%3\2_%3_warp_log.txt      where %1=input tif, %2=output directory, %3=file name In this case the input file is > Driver: GTiff/GeoTIFF Files: > P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Creation\4Band_translated_pyramid\z_zones\z_zones_translated.tif > Size is 411096, 298318 Coordinate System is: PROJCS["WGS 84 / Pseudo- > Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS > 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], > AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], > UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]], > PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], > PARAMETER["scale_factor",1], PARAMETER["false_easting",0], > PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], > EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 > +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"], > AUTHORITY["EPSG","3857"]] Origin = > (15825753.321902087000000,-1808723.335397920600000) Pixel Size = > (1.000002861523879,-1.000001022298165) Metadata: AREA_OR_POINT=Area > DataType=Thematic Image Structure Metadata: INTERLEAVE=PIXEL Corner > Coordinates: Upper Left (15825753.322,-1808723.335) (142d 9'54.58"E, 16d 2' > 4.35"S) Lower Left (15825753.322,-2107041.640) (142d 9'54.58"E, > 18d35'33.74"S) Upper Right (16236850.498,-1808723.335) (145d51'29.19"E, 16d > 2' 4.35"S) Lower Right (16236850.498,-2107041.640) (145d51'29.19"E, > 18d35'33.74"S) Center   >  (16031301.910,-1957882.488) (144d 0'41.89"E, 17d19' 5.07"S) Band 1 > Block=256x256 Type=Byte, ColorInterp=Red Mask Flags: PER_DATASET ALPHA Band > 2 Block=256x256 Type=Byte, ColorInterp=Green Mask Flags: PER_DATASET ALPHA > Band 3 Block=256x256 Type=Byte, ColorInterp=Blue   >  Mask Flags: PER_DATASET ALPHA Band 4 Block=256x256 Type=Byte, > ColorInterp=Alpha The pipe of the gdal_warp command gives > Creating output file that is 411096P x 298318L. Processing input file > P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Creation\4Band_translated_pyramid\z_zones\z_zones_translated.tif. > Using band 4 of source image as alpha. Using band 4 of destination image as > alpha. 0 so the process is failing before even 10% is complete and fails about 1h after processing starts. I am just setting up a linux box to try this out on but is there something I can tweak in windows to get this to work? best, --- UPDATE 1 Part of the issue is with the cache and wm switches. Removing these helps but the larger process still crash. http://trac.osgeo.org/gdal/wiki/UserDocs/GdalWarp


title: TIN Interpolation using a vector layer

text: I'm writing a plugin in QGIS and I'd like to generate a TIN surface using a vector layer with x,y and z (interpolation attribute). The idea is to visualize the same result like in the Interpolation plugin but optimize it in my plugin, to facilitate users. Does such a function exist? Can I communicate with the Interpolation plugin to generate the result? Thank you very much! Ciao Steffy


title: QGIS, how do you break segments of a polygon, ie break 1 polygon into 2 or more?

text: I have a polygon but would like it to be in broken up to put into different layers. I can't work out how to do this.


title: OpenLayers XYZ Unable to Load Local Tiles

text:
I have some local tiles that were generated from OpenStreetMaps using Maperitive. I've tried going through the docs and tests but the map is not loading. I'm not getting any errors in chrome's js console either. I think OpenLayers has access to my images because previous errors stated that some tiles could not be found. The solution to that problem was to initialize the OpenLayers.Map.restrictedExtent with bounds. I'm not sure where to go from here.               function initMap() {         var extent = new OpenLayers.Bounds(-80.604570, 43.228173, -79.481697, 43.607333);             extent = extent.transform("EPSG:4326", "EPSG:900913");              var map = new OpenLayers.Map('map',  {restrictedExtent:extent});         //var options = {'layername':'basic', 'type':'png'};         var xyz = new OpenLayers.Layer.XYZ('OpenLayersXYZ', 'http://localhost:8081/maps/tiles/${z}/${x}/${y}.png', {sphericalMercator:true, layers:'basic'});         console.log(xyz);         map.addLayer(xyz);         map.zoomToExtent(extent);     }          <!DOCTYPE html>

                Maperitive log from tile generation: set-geo-bounds Setting the geometry bounds to srid=4326, (-80.604904441331,43.2284165575301,-79.4820319148331,43.6075754238019) set-print-bounds-view Set the printing bounds to '-80.604570253079,43.2281730577825,-79.4816977265812,43.6073334440597' generate-tiles minzoom=0 maxzoom=14


title: Does SQL Server need extensions to do spatial?

text: Does SQL Server need extensions to do spatial like Oracle does? Just wondering if there will be extra costs for implementing a SQL Server backend to SDE. Thanks


title: featureLayer.fields is undefined

text: When working with the javascript API, I have been getting an error in FireBug when trying to execute the following script:               var featLayerURL = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/AssessorsLiveLayers/MapServer/1";     var featLayer = new esri.layers.FeatureLayer(featLayerURL);     alert(featLayer.fields.length);      The error returned is "TypeError: featLayer.fields is undefined". At first I thought it was something wrong with one of my server's layers, but after using that sample server and getting the same error, I'm sure there is something else wrong. Here is a link to the REST response: Layer: Recorded Tax Parcel Sales (ID: 1). I have the feeling it is something really simple I'm forgetting, but for now it's been driving me crazy trying to figure it out.


title: How to solve the problem when buildings are extruded without roof?

text: ![enter image description here](http://i.stack.imgur.com/JWaT7.png)I tried to extrude buildings in ArcScene with Extrusion function in Layer Properties. But most of the buildings seem like only their walls are extruded. Instead of solid blocks, they appear like no roof and ground. Any one knows how to solve this problem? thanks so much!


title: How to Add Values together using FindLabel (VBscript) function of ArcMap Label Expression?

text: I'm wanting to add together values from multiple fields in shp file and display the result as a the label here's what I'm looking at right now: if ( [SwineGesBo] + [SwineSowLt] > 0) then output = output & [SwineGesBo] + [SwineSowLt] & "Sows" Unfortunately what I've wrote here only sticks the two value together and does not sum them together. Is what I'm wanting to do possible? And if so how whould I do it? TIA


title: How to access each raster in a stack with a loop

text: I have a stack of rasters and I want to access each layer, combine each later with another file and finally export the resulting file as a csv file. Is there any way to do this with a loop? So far I have done this but I do not get a file for each raster layer:               for (i in 1:nlayers(sms))       {       x<-sms[[i]]       assign(x,raster(x))       y<-extract(x,zipcoords)       write.table(y,file=paste0("C:home",i,".csv"),sep=",",row.names=F)       }      Thank you all!!!!


title: Visualize feature class with many relationship classes?

text: I have a feature class in a geodatabase that I want to review. It has many relationship classes - possibly a hundred or more. If I load the feature class into ArcMap and identify one of the features, it takes several minutes to expand the relations. What is a good way to visualize this feature class so that I can understand it? Specifically, I want to know if having a relation to a relation will obstruct editing the feature class.


title: How to Convert labels to Annotation

text: I am a beginner in GIS (for graduate school) and am using the GIS Tutorial Basic Workbook 1 for ArcGIS10. In Chapter 1 of this text, there is a "Convert labels to annotation" section which I cannot follow. When I right-click the item, "Convert labels to annotion" is not an option. Please let me know how to implement this process. Thank you for all of your help.


title: Extract number of vertices in each polygon in R

text: Simple question: how best to do this? I've found one way that works, but this is very slow (when x is a SpatialPolygonsDataFrame):               y <- fortify(x)      n.verts <- aggregate(y, by=list(y$id), FUN=length)[,2]     x@data$nverts <- n.verts


title: Geospatial Tools for SketchUp

text: I was wondering if anyone knows of geospatial tools that work in SketchUp? I know if GeoSketch, which allows a user to import ortho imagery, DEMs, shapefiles and GPS enabled photographs into SketchUp for 3D model creation. I am looking for other geospatial tools that are designed for SketchUp, but I am having issues finding any. I am interested in geospatial tools that work within SketchUp. Any help is appreciated. Thanks...


title: What is the best method of visualizing a network on a map?

text: I have several hundred geo-referenced data points, and the relationships from that point, to other points. I'm trying to figure out the best way of visualizing this on an interactive map (possibly using google maps). One idea I had was that when a user clicks on a point, it then displays all the links from that point, to the related points. I would appreciate any suggestions or examples of how best to do this. I have experience using ArcGIS, QGIS, Python and a small amount of javascript.


title: reclass, raster calculator

text: I'm trying to apply seperate equations for different land types. I have created a raster containing only the land type I'm interested in. I then reclassed the values to '0'. My plan was to use the raster calculator with the equation and add + "reclassed raster", which would be +0, thus only returning values that are within the area I'm interested in. However, when I try the calculation, it doesn't work properly, giving me something like values from -3e20 to +3e20 but there are no values or points actually there. If I do the raster calculator without the "+ reclassed raster", it works perfectly, so the equation itself (or other data layers) is not the problem. If I look at the reclassed raster, there is no attribute table, and every time I try to build one it fails. Any ideas on what's going wrong or a better way to do this? Thanks!!! Yes, it's ArcGIS 10.1 with Spatial Analyst. The reclassify doesn't give me an empty raster (only no attribute table), it's only when I use the raster calculator.


title: Are FME2013 and 64bit Background Geoprocessing of ArcGIS 10.1 SP1 compatible?

text: We are running ArcGIS 10.1 sp1 and have installed **64-bit background geoprocessing**. We are also upgrading to FME 2013. I know in the past we have had to install the 32-bit version of FME due to compatibility issues - I think regarding writing to File Geodatabases. Now that ArcGIS has 64-bit background processing available, am I able to install the 64-bit version of FME? Or do I still need to install the 32-bit version in order to have full compatibility? Does the 64-bit background geoprocessing even have anything to do with the compatibility?


title: QGIS Python Labelling

text: i want to label a point layer with those values exceeding a set of variables attribute table as follows               'loc field'(text),'a'(float),'b'(float),'c'(float)      variables as follows               vara = 5, varb = 3, varc=1      basically i want to be able to label `'a' > vara, 'b' > varb, 'c' > varc` on a multi-line label, needs to label if any are true not just all three e.g               Loc: F23     a: 6      ('b' was 2 so not labelled)               c: 1.5      If none are true then loc not labelled at all I am thinking this will be best achieved using the expression based label with a python function but don't know how to go about it, as i haven't found any documentation that deals directly with this. Could someone point me in the right direction on how to write a function that takes in each field to be queried and returns the multi-line label. Cheers


title: How to fix the possible memory leak issue in Openlayers 2.13.1 version?

text: Recently we have upgraded the Openlayers from version 2.12 to 2.13.1. However the performance of the new version is not that promising, infact it has degraded exponentially. I have a draggable model window and once the base map has been loaded if I do the drag and drop operation over the top of the map window, the user experience is not so smooth as for 2.12 version. After some memory leak detection approach three snapshot technique, I found that there is some memory leakage issue in **_OpenLayers.Control.Navigation.OpenLayers.Class.initialize_**. Is there any tuning need to be performed while upgrading to the new OL? Did someone face the similar performance issue as well? Thanks for your answers.


title: converting/parsing geojson into com.vividsolutions.jts geometry

text: Does any has any experience with converting string geojson into com.vividsolutions.jts geometry object (point, polygon, etc). Maybe there is some java library I cannot find. Greets!


title: OpenGeo Explorer connect to geoserver

text: Just a quick and easy question. I have installed OpenGeo Explorer as a plugin to QGis for publishing seamlessly to a web based geoserver (hosted through AcuGIS). I have pointed to the server through the URL in the image below. ![enter image description here](http://i.stack.imgur.com/8HsKx.png) I then try and connect and find the following. Any pointers as to what the url should be? ![enter image description here](http://i.stack.imgur.com/I47Vu.png)


title: In what coordinate systems do true circles appear round?

text: Please excuse what is probably an obvious question from a relative newB to GIS -- this seems like it should be a snap. I've been developing in Gmaps for awhile and am switching to OpenLayers but am stuck on one point: I am drawing vectors that are mostly circular but also involve some custom geometry so I can't use createRegularPolygon. I'm creating an array of points and sending it to a OpenLayers.Layer.Vector object. This works great but the resulting 'circles' are only round near the equator, not at higher latitudes. They are squashed about the same amount as the basemap is at higher latitudes, which seems to makes sense. If I use Google as a base layer then they are the correct shape at all latitudes, but I'm making an offline mobile solution so that won't do. My question is: what do I use for a base layer (or what params to set) so that my geometry remains round at all latitudes without using Google or online maps?


title: Adding additional Grass modules to QGIS Processing toolbox

text: I am very happily using the Processing toolbox (nee Sextante) within QGIS 2.3 but there are a number of Grass modules I use missing which I'l like to add. I followed the guide at: https://github.com/qgis/QGIS/blob/master/python/plugins/processing/grass/grass.txt and have created what I believe is an appropriate description for v.net It wasn't obvious where to install this file so I've dropped it into "C:\Users\XXXXXX.qgis2\python\plugins\processing\grass\description" alongside the other descriptions. v.net now appears in the toolbox but when I click to use it, the paramters don't wholly align with the decription file:               v.net     v.net - Perform network maintenance.     Vector (v.*)     ParameterVector|input|"map" input layer|1|False     ParameterVector|points|"point" input layer|0|False     ParameterSelection|operation|Operation to be performed|nodes;connect;report;nreport|1     ParameterNumericalValue|alayer|Arc layer to be used|None|None|1     ParameterNumericalValue|nlayer|Node layer to be used|None|None|1     ParameterNumericalValue|thresh|Threshold distance|None|None|30.0     OutputVector|output|Output layer      The first three parameters are correct, including my preference to default to "connect" but alayer, nlayer, and thresh have been replaced by a field for the Grass extent. ![enter image description here](http://i.stack.imgur.com/xN9Iu.jpg) It also has an advanced parameters button which adds further paramters that aren't defined like v.in.org snap tolerance. Am I totally missing something?


title: How to convert a CAD 2D section into PolylineM(Z)?

text: Good morning, How do I convert a 2D section drawn in CAD into 3D polyline in ArcGIS. By 3D polyline I mean PolylineM(Z). I have 300 sections. Drafting it manually seems a bit laborious. Any Ideas? Thanks. Cheers.


title: Does File Geodatabase performance degrade as it fills up?

text: I'm having a memory leak issue. Upon investigating this more, it seems the file based geodatabase I write to in a loop, is growing very large, and as it grows, it significantly degrades the performance of the scripts I am running. Any ideas how to optimize the configuration of the fgdb? Or how to speed it all up? I am not writing 'in_memory', I am using aggregatePoints to create a temp featureclass (which I delete), and I buffer this FC, which I keep. However, it seems to get slower, and slower, and slower...               def createGeom1(geom, scratchDB):         filetime = (str(time.time())).split(".")         outfile = "fc" + filetime[0] + filetime[1]         outpath = scratchDB + "tmp1.gdb/Polygon/"         outFeatureAggClass = outpath+outfile + "_Agg"         arcpy.AggregatePoints_cartography(geom, outFeatureAggClass, "124000 meters")      geom is a collection of Points, scratch the scratch area (local gdb I am using). Just looping through a list of files, I call a procedure that creates alist of geoms (and doesn't degrade) and then call this. Doing this, will see this function, createGeom, degrade significantly, and the previous one, not a bit.


title: How to cluster points based on a kernel density?

text: I have a large dataset with 36k points representing commercial land uses, each with a field containing the square footage. I have run a kernel density analysis on this dataset, producing a raster showing the density of commercial square footage over the entire metro area. I need to divide this raster into regions corresponding to local maxima, which I call a "center". I have already determined the locations of the centers, and now I need to do one of two things:   * use a point clustering tool, such as "partitioning around medoids", to group the points into clusters around the centers I've identified. The problem with this method is that it is computationally intense, and even more so if I try to use a dissimilarity matrix to weight the points by size.   * somehow divide the kernel density raster (which roughly resembles a terrain raster) into individual "hills" around each center. But I can't think of any tool for doing this. This problem has plagued me for a while, and I hoped that I'd be able to perform the clustering method in R, but it is time consuming and I'm running out of time. Does anyone know of a simple method for either dividing density rasters into neighborhoods of intensity or for quickly clustering large datasets?


title: Split a layer into a single layer

text: I have two multi-polygon layers, one a map of land uses, the other borders of administrative areas. I am interested in analyzing the amount of land use in each administrative area, but the polygons in the map cross the boundaries, therefore it need to split these polygons into parts along the administrative boundaries. I know I can use the Split Tool but that makes each administrative area a separate layer. Is there a way of splitting up the polygons in the map layer but leaving the whole map as a single layer?


title: Help needed using REGEXP for address string parsing

text: Using JavaScript, my aim is to create an "intelligent" address search function with a single textbox (rather than separate textboxes for house number, street name, street type, suburb, etc). I'm attempting to parse the input string entered by the user, to determine which components of the address have been entered. A complication is that users may enter combinations such as:   * 1 Kent Street Sydney _(number, name, type, suburb)_   * 1 King Georges Road Sydney _(number, 2x name, type, suburb)_   * 1 New South Head Road Rose Bay _(number, 3x name, type, 2x suburb)_   * Kent Street Sydney _(name, type, suburb)_   * Sydney _(suburb)_   * 2000 _(postcode)_   * 275/2/1000 _(lot/section/plan)_ At the moment I'm breaking the input string into tokens using _string.split(" ")_ and iterating through each token to determine which component it represents. Here's a very rough sample. This is working most of the time (it fails on 1 St Georges Road Sydney), but a colleague suggested I try using a REGEXP to improve the process. I can't see any examples of where this has been done for an address search. **Does anyone have any examples where REGEXP has been used for address validation?** (Note that I'm not actually entering this information into a geocoder at this stage - I just need to break the input string into its component parts, and know what each part represents) Thanks, Steve


title: How to connect mapinfo 10 with bing map or other mapping service?

text: Is there way to connect mapinfo with bing or google map. I have done this with mapinfo 10.5 but could not find it with mapinfo 10.


title: How to draw an arc by centerpoint, radius and azimuth in KML

text: The question is how to generate lon/lat coordinates for an arc/sector. Coordinates can be used/filled into a KML file. Pointers to geometric formula or a program applying the formula are much appreciated. Radius is 2 km and location is Europe North East. Accuracy is not a issue at this point.


title: Where is Table Manager in QGIS 1.7.x?

text: I would like to ask you, if is available funcionality like "Table Manager" for **QGIS 1.7.x**? I need to **move fields in attribute table** and then save changes. I don't see "Table Manager" or something like that in available plugins. Thank you, Jaroslav


title: How do I delete specific graphics on the map using arcobjects

text: I am writing a small application that allows the user to click on the map, and it will create 3 buffers (these are graphics using the IElement interface) at specified distances. What I want to do is if there are buffers on the map from the previous click, and the user clicks on the map to create another set of buffers, delete the oldest set of buffers (which are graphics) So in essence at anyone time there should only be 3 buffers on the map. Has anyone got any ideas on the best way to do this? Thanks


title: multispectral images (Band Sequential format)

text: How can I create a multispectral image file (in band sequential (BSQ) format), from several 1-band images, using GDAL libraries? I work with C++ language. Thanks for your attention.


title: How to Rotate Features in ArcGIS for Desktop using ArcPy?

text: I have a series of polygons that I want to rotate. Each polygon has a rotate angle and an anchor point (xy coordinate) stored as field values. As it happens, all anchor points are on a vertex of the polygon. What is the best way to do this using ArcGIS for Desktop and ArcPy? I know we can rotate them when in editing mode, but I don't want to do them all manually since they are all different. I would prefer a Python answer so I can automate it and build it into my work flow. Thanks


title: Background no data areas appearing where raster and vector data meet in Geoserver

text: I'm using Geoserver (2.1) to load raster data with the Imagemosaic plugin and then using Geowebcache to cut this data into tiles across the full coverage of the British National Grid. However the data does not extend to all areas of this extent and in these areas I get black background where there is no data. To resolve this I loaded a vector background which serves as a blue sea background for areas where the raster data does not extend to. However where the vector and raster areas meet I am still seeing sections of black no data background (even though the vector data covers all areas where the raster data does not and is behind it in the layer group). I've tried setting both the InputTransparentColour and the OutputTransparentColour options to black which does make these black areas disappear, however it also causes the black text on the raster mapping to become transparent as well. Does anyone know of any other ways to change this background colour without effecting the raster data itself? Or why these black areas might still be appearing even though there is vector data there that should be displayed? Cheers, Michael


title: What are "M" point locations on the NOAA forcecast cone map?

text: I don't think I've ever noticed M before. H and S are Hurricane and Tropical Storm. ![alt text](http://i.stack.imgur.com/OiyP5.gif)


title: Is it possible to perform a definition query against a Polyline shape field?

text: I have joined two polyline shapefiles together that represent two months worth of data. I'm now trying to find any changes to the shape of the records between the two months (added vertices, deleted vertices). Is this possible to detect these changes with a definition query? If not, is there an efficient way to detect changes in the geometry of the record? I have a "LENGTH" field and I am able to query records that have a different length but that doesn't necessarily give me all of the records who have had their vertices changed.


title: Collapsing the multi-row output of a one-to-many spatial join to single-row (arcmap 10.1)

text: I'm working with TIGER data, looking at the relationships among incorporated places and counties. Not all places are completely contained by counties; some do span multiple counties. In the final output I'm preparing, I need to have a "location reference memo" for each place; for a city like Cleveland that is completely contained, this might say something like **"Incorporated Place in Cuyahoga County"** for a city like Birmingham, AL, this would instead need to say something like **"Incorporated Place in Jefferson County, Shelby County"** or **"Incorporated Place in Jefferson, Shelby Counties"** -- or something like that. I know that I can do a spatial join to get a multirow output like   * Birmingham | Jefferson   * Birmingham | Shelby   * [city in AL] | [County in AL] Is there any facility, perhaps after the fact, for generating a single row equivalent of this? E.g.,   * Birmingham | Jefferson; Shelby Thanks in advance for any ideas you may have!


title: ArcGIS Server simple link with SQL Server database

text: I am using ArcGIS Server 10 to create Rich Internet Application with embeded Maps. Basicaly, I created an Optimized Map Service on ArcGIS Server, from an MXD file (produced with Arc Map). I have different layers of data from shapefile, but what I want is to add XY data from a database (SQL Server). I create a Database Connection through "Add OLE DB Connection" in ArcCatalog, and added my data with "Add XY Data" in ArcMap. (My Table that I am querying is very simple: Id, latitude, longitude) After that I can see my data (dots) on the map within ArcMap. But when I publish the Map Service from the MXD, I have an error saying that the layer's data source is not supported. Is there any way to create a layer from a (Non spatial) table (from database) that just contains basic coordinates (XY data)? I want to directly link the Map Services with the database, to ensure that the map is automatically updated when the table changes.


title: How to do point-to-point near analysis conditional on common attributes of the two layers in Arcgis 10.2 (advanced)

text: I am measuring the closest straight distance from cities of interest (in a layer) to their capital cities (in another layer). Basically, distance between a city and a capital city is calculated if only if their country codes are identical. Arcgis license is advanced. **Solution:** The following solution is based on @dklassen. Modification has been made so that I can loop a list of numerical number.               import arcpy     ctryID = [row.ID_0 for row in arcpy.SearchCursor(countryID_feature_class)]     arcpy.MakeFeatureLayer_management('PATH_TO_CITIES_FC','cityfc')     arcpy.MakeFeatureLayer_management('PATH_TO_CAPITALS_FC','capitalfc')          for grd in ctryID:         arcpy.SelectLayerByAttribute_management('cityfc','NEW_SELECTION',""""ID_0" = {}""".format(grd))         arcpy.SelectLayerByAttribute_management('capitalfc','NEW_SELECTION',""""ID_0" = {}""".format(grd))         arcpy.Near_analysis('cityfc','capitalfc',"#","NO_LOCATION","NO_ANGLE")         arcpy.CopyFeatures_management("cityfc", "c:/temp/ctry{}".format(grd))          arcpy.CreateFeatureclass_management("c:/temp/", "ctryall.shp", "POINT", "c:/temp/ctry1.shp", "DISABLED", "DISABLED")          for grd in ctryID:         arcpy.Append_management("c:/temp/ctry{}.shp".format(grd), "c:/temp/ctryall.shp")         arcpy.Delete_management("c:/temp/ctry{}.shp".format(grd))


title: Creating an installer for an ArcGIS toolbar with Visual Studio 2005

text: I'm working on a small toolbar for ArcGIS 9.2, Windows XP, using Visual Studio .NET 2005. I followed Esri's instructions for creating an installer: http://edndoc.esri.com/arcobjects/9.2/NET/0df20605-b457-42d6-b63c-341a3824474a.htm. I can install the resulting .msi or .exe file on the workstation where the toolbar was developed, without being an admin. When I or our admin. tried to install it on other computers in the office, the install failed with an error code 2869. A web search ('install error 2869') returned mostly vague, unhelpful, and irrelevant results. Has anyone else experienced this error when creating an installer, and how did you resolve it?


title: Creating DEM after converting mapinfo tab files to ARC GIS

text: How do I create DEM for contours after converting map-info tab files to ARC GIS and how do I convert toposheet tab file to ARC GIS.


title: How to change events in the Oncomplete Drag function in Openlayers

text: below is code that works for Openlayers drag function:               drag = new OpenLayers.Control.DragFeature(polygonLayer, {         autoActivate: true,         onComplete: function() {alert('Are you sure this is the right postion?')}     });      Now i,m trying to change my onComplete function:               drag = new OpenLayers.Control.DragFeature(polygonLayer, {         autoActivate: true,         onComplete: function (event){             var bounds = event.features[0].geometry.getBounds();             var answer = "bottom: " + bounds.bottom  + "\n";             answer += "left: " + bounds.left  + "\n";             answer += "right: " + bounds.right  + "\n";             answer += "top: " + bounds.top  + "\n";             alert(answer);         }     });      I must be doing something wrong as this does not work?


title: osm2po errors when converting pbf file

text: I am trying to prepare OpenStreetMap data for routing. I have downloaded version 4.8.8 of _osm2po_. I also downloaded `north-america-latest.osm.pbf` from Geofabrik. The command I am running is:               $ java -Xmx16g -jar osm2po-core-4.8.8-signed.jar \       cmd=tjsg tileSize=x "C:\maps\north-america-latest.osm.pbf"      The process seems to get well on its way, but I keep encountering a fatal error:               FATAL  Exception at Thu May 01 15:16:58 CDT 2014            Message: java.io.FileNotFoundException: osm\tw_raw.2po               (The system cannot find the file specified)            Class: java.lang.RuntimeException            Stacktrace:            de.cm.osm2po.primitives.InStreamDisk.<init>(InStreamDisk.java:30)            de.cm.osm2po.converter.Joiner.run(Joiner.java:206)            de.cm.osm2po.Main.runJoiner(Main.java:196)            de.cm.osm2po.Main.main(Main.java:131)      I am not sure if there is a problem with the command as I have executed it, or if there may be a data problem, or what? - I am using Java version 1.7.0_55. Please let me know if there is any other information which would be helpful in getting to the bottom of this.


title: How do I remove TIR bands from current stacked ASTER

text: How do I remove TIR from already stacked ASTR that has VIS and SWIR bands. I want to do it in ENVI 5.0. Is there a workaround to do this ? The bands I stacked has VIS, SWIR, and TIR.


title: Vector title attribute can't display?

text: var vectormap = new OpenLayers.Layer.Vector('Overlay',         {             styleMap: new OpenLayers.StyleMap(             {                 "default": new OpenLayers.Style({                                externalGraphic: 'girl.png',                                graphicWidth: 50,                                graphicHeight: 50,                                graphicYOffset: -24,                                title: 'marker'}),                 "select": new OpenLayers.Style({                                externalGraphic: 'boy.png',                                graphicWidth: 16,                                graphicHeight: 26,                                graphicYOffset: -24,                                title: 'marker_select'})             })         });     featurearray = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(113.950,33.019));     vectormap.addFeatures([ featurearray ]);       This is my vector layer, but a bit wrong, my png image title attribute can not be displayed when the mouse to move up, I checked the official website the "OSM with Marker and Popup.html" code, exactly the same, you know why, thank you!


title: How to group individual groups of pixels into a single class

text: I have a raster image with certain pixel groups of equal area. Each group represents a single house. I want all the pixels near a group of houses to have the same pixel value, i.e., I want to name that area "residential area". How can I do this? I want something like this done:![enter image description here](http://i.stack.imgur.com/xWbby.png) this image should change to:![enter image description here](http://i.stack.imgur.com/0XKwi.png)


title: Length of forms in ArcPad10

text: I'm trying to create a survey with about 250 questions in ArcPad 10. Normally you would expect that a form you created in any application will be able to scroll in PDA if it is too long. But the custom forms I create in ArcPad 10 just ignores the extra fields and doesn't scroll to them. Did anyone come across this? Thanks


title: How to limit visibility in OpenScales?

text: I use flex and OpenScale and I want to limit visibility just over Morocco using the coordinates, please how can I do that?!                   <os:Map id="fxmap" width="100%" height="100%" zoom="3" center="4.83212,45.75781">         <os:Mapnik name="base"/>         <os:DragHandler/>         <os:ClickHandler/>         <os:WheelHandler/>         <os:PanZoom map="{map}" x="{fxmap.x+10}" y="{fxmap.y+10}"/>     </os:Map>      I can do that on the properties of the map ?


title: It is possible to use satellite map on OpenScales?

text: It is possible to use satellite map on openscales, like that http://api.ign.fr/geoportail/api/doc/examples/geoportalFxMap_minimum.html   I'v seen a exemple :               <os:WMSC name="Nasa"                    url="http://openscales.org/geoserver/gwc/service/wms"                  layers="bluemarble"                  format="image/jpeg"                  maxExtent="-180,-90,180,90"/>        But it's show just an image of earth and when i zoom in, image lose quality !? Is there any other solution !?


title: How to improve the cartographic design of graticules?

text: The attached image shows a conflict between the graticule and the state boundary on a map. I have not found a way to display user-defined lines of latitude, which would solve the 42 degree line conflict. How can I resolve this conflict in Arcmap 10.1 by having better control of where the graticule parallels are placed? ![enter image description here](http://i.stack.imgur.com/OUTdP.jpg)


title: Does multimodal network need a physical intersection between a point (terminal) and a line (rail or road)?

text: I have created a network dataset with rail, road, and intermodal terminals and set up the connectivity so that you can only travel in-between the two at the terminals. Terminals realistically can be hundreds of yards long and wide, and can connect to multiple roads and rails. It makes sense that my points are located between rail and road but none of them are intersected, so I cannot traverse through both segments. I am working with all of North America so manually creating lines is out of the question. I would think to be realistic that I should not have to connect them, and ArcMap would pick up on this (in an ideal world). Any suggestions would be great! Also help with setting parameters for terminals that transfer one way or both ways between rail and road would be beneficial as well. Thank you Ben


title: How can I specify a spatial reference system which has a north pole different than the standard north pole?

text: I have a geographic spatial reference system (i.e., latitude and longitude) which has a north pole that is not the usual north pole: it's the magnetic north pole at approximately 70.30 degrees north, 109 degrees west. Is it possible to write a PROJ.4 string or a WKT spatial reference string describing this coordinate system? If so, what would that string be? At the level of precision of my data, the specific ellipsoid does not matter much. Even a spherical Earth would be fine. (Related: How can I convert geomagnetic coordinates to geographic coordinates without doing the math myself?.)


title: What's the simplest way to style vector data in Geoserver?

text: There seem to be three main options:   1. Manually write the SLD files, based on the SLD cookbook   2. Create the SLD file in QGIS, then import   3. Use the add-on GeoExplorer to create custom styles online Options 2 and 3 are attractive to me, as they avoid writing long SLD files. However, both have failed for me, meaning I still have boring grey polygons being served from my geoserver to a test map. I also wonder if there other options I've not yet tried, such as styling on the client side, or creating styles with a different GIS whose .sld files work better with geoserver. In visual terms, I want to go from this: ![geoserver-polygon- grey](http://i.stack.imgur.com/vKrmb.jpg) To this: ![territories](http://i.stack.imgur.com/AOM7u.png) ASAP (as simply as possible!)


title: API for Real Time World Statistics

text: Does anyone know of an API (preferably free) that can provide real time world statistics such as Crude Birth Rate, Crude Death Rate, world/country population, or emails sent today as on the website http://www.worldometers.info/? I'm looking to connect the data to an iPhone app, and I can work with any sort of return type.


title: Erase within a feature class - Planar enforcement

text: I´m using ArcGIS v10 ArcInfo. I´m working with a feature class that has 5 features which are waterdepths (1 to 5m). These features are overlapping each other. What I need, is that they are not overlapping. To achieve this I used two differend methods that are leading to the same goal:   1. I extracted each feature in a single feature class (1, 2, 3, 4, 5). 1 is the biggest overlapping 2, 3, 4 and 5. So I erased 1 with 2, 2 with 3, 4 with 5, merged them and had the feature class I needed.   2. I ran the union-tool (geoprocessing) on the feature class itself. The problem is, that all overlapping parts are created additionally as new features. Instead of the 5 features I need, I get 10 features more which I have to sort and erase by hand. My question: Is there a tool or method that does this without so many steps by hand? I´m able working with QGIS and ArcGIS v10 ArcINFO.


title: What Open Source (command line/API) method is there to orthorectify and georeference an aerial image given telemetry data?

text: How can I take an image and orthorectify it automatically with open source software? The information associated with each image is:   * camera specs   * latitude, longitude, elevation of the camera   * orientation of the camera: facing down off a UAV, roll pitch and yaw are given I want to output a geotiff file and hopefully end up stitching the images together to create a map.


title: How to populate M values for an existing x,y,m route layer in ArcGIS 10?

text: Very surprised to not find this in docs, I swear this was easy in former versions... Whatever, here we go: Say you have a rivers layer of x,y,m polylines. Each feature is a named river. Each feature was created in the direction of flow, so that the first vertex of each feature is the river's headwater, and the last is its drain (probably where it flows into the next river). I want to assign measures to each vertex of a given feature as the accumulated length of the feature from its drain to that point. I've only found the 'CreateRoutes' ArcToolbox tool, which not only does the unnecessary work to aggregate features and output a new layer, but it has a wonky idea of 'coordinate priority' to define each feature's measures start point, being that closest to a corner of its bounding box... I want to operate on my layer in-place, and I simply want to start the measures from the start (or end, in my case) of each feature. One possibility with that tool might be to use its 'TWO_FIELDS' Measure Source, where I use a pair of columns calc'ed with zeros (first column) and feature length (second column)... I thought I'd check first if anyone else has already been down this path? Thank you, MC


title: OGC webservice engine like geoserver in .NET

text: In java there are a lots of third part libraries which can used to create OGC webserivce like wcs/wfs/wms etc. However I have not found anything similar in .NET. We are currently using ArcGIS Engine, but it ArcGIS Engine does not support web applications. Is there a alternative?


title: Describing a coordinate system in arcpy

text: I have a python script in ArcGIS 10.1 which takes in a few inputs from the user. One of the inputs is a coordinate system. I would like to test whether the coordinate system the user chose was projected or geographic. A sample of the code is:               input1 = arcpy.GetParameterAsText(0)     input2 = arcpy.GetParameterAsText(1)     coordsys = arcpy.GetParameterAsText(2)          desc1 = arcpy.Describe(input1)     desc2 = arcpy.Describe(input2)     descCoordSys = arcpy.Describe(coordsys)      The code runs fine until the last line. I have forced the user to enter a coordinate system in the third line: ![enter image description here](http://i.stack.imgur.com/Tj56S.jpg) What am I missing here? * * * **EDIT:** I've tried to implement the changes proposed by @dmahr but it still doesn't work. It isn't getting to the nested `try` statement. It just quits with the error "There was an error with an input file. Please run again." I'm not sure what I'm doing wrong. I've tried with both projected and geographic coordinate systems.               input1 = arcpy.GetParameterAsText(0)     input2 = arcpy.GetParameterAsText(1)     coordsys = arcpy.GetParameter(2)          try:         desc1 = arcpy.Describe(input1)         desc2 = arcpy.Describe(input2)              try:             coordsys_linearunit = coordsys.linearUnitName         except:             arcpy.AddError("Input coordinate system is not projected.")             sys.exit("Exiting.")          except:         arcpy.AddError("There was an error with an input file.  Please run again.")         sys.exit("Exiting.")


title: What is the state of the art in html5 geospatial applications?

text: I am very interested in the html5 `canvas` element for maps; work like Cartagen from an MIT Media Lab researcher looks very promising, for example. There is some interesting SVG based work at carto.net. `WebSocket` seems like a fantastic API for live geospatial data. I have done a few html5 experiments, for example here, with Flickr and Picasa data. What are people getting up to with these new technologies, or what have you tried?


title: Help simplifying multipolygons in geodjango

text: I have a few multipolygons that have several hundred points in them. I'm looking to create less complex "thumbnails" polygons. Naturally I'm attempting to use the simplify method, which is supposed to apply the Ramer-Douglas-Peucker algorithm. However, it doesn't seem to be working:               >>> m = Multipolygon.objects.get(id=1)     >>> m.geometry.num_points     1007     >>> m.geometry.simplify(0).num_points     1007     >>> m.geometry.simplify(1).num_points     0     >>> m.geometry.simplify(0.5).num_points     0     >>> m.geometry.simplify(10).num_points     0      I'm clearly missing something. When I simplify, I either get the original polygon back or an empty one, depending on the tolerance value that I use. How is the tolerance parameter supposed to work?


title: E_FAIL when calling ESRI.ArcGIS.Carto.IImageServer.Initialize()

text: I am using ArcGIS Engine and Developer Kit 10 on Windows 7. Specifically, I'm writing an ArcObjects console program using Visual C# Express 2008. I am attempting connect to an image server via a URL (e.g. http://server/.../ImageServer), but I get an HRESULT E_FAIL exception when I call IImageServerLayer.Initialize(). The full message is "Error HRESULT E_FAIL has been returned from a call to a COM component." There isn't much information on this error. Any advice on what could be wrong? Here's my code:               using System;     using System.Collections.Generic;     using System.Text;     using ESRI.ArcGIS.esriSystem;     using ESRI.ArcGIS.Geodatabase;     using ESRI.ArcGIS.Carto;     using ESRI.ArcGIS.Geometry;     using ESRI.ArcGIS.DataSourcesRaster;     using ESRI.ArcGIS.GISClient;          namespace EngineConsoleApplication1     {         class Program         {             private static LicenseInitializer m_AOLicenseInitializer = new EngineConsoleApplication1.LicenseInitializer();                  [STAThread()]             static void Main(string[] args)             {                 //ESRI License Initializer generated code.                 m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeEngine },                 new esriLicenseExtensionCode[] { esriLicenseExtensionCode.esriLicenseExtensionCode3DAnalyst, esriLicenseExtensionCode.esriLicenseExtensionCodeNetwork, esriLicenseExtensionCode.esriLicenseExtensionCodeSpatialAnalyst, esriLicenseExtensionCode.esriLicenseExtensionCodeSchematics, esriLicenseExtensionCode.esriLicenseExtensionCodeMLE, esriLicenseExtensionCode.esriLicenseExtensionCodeDataInteroperability, esriLicenseExtensionCode.esriLicenseExtensionCodeTracking });                 //ESRI License Initializer generated code.                 //Do not make any call to ArcObjects after ShutDownApplication()                      //Create an image server layer by passing a URL.                 IImageServerLayer imageserverlayer = new ImageServerLayerClass();                 string URL = "http://vega/ArcGIS/rest/services/grandcanyon/ImageServer";                 imageserverlayer.Initialize(URL); // "Error HRESULT E_FAIL has been returned from a call to a COM component."                      //Get the raster from the image server layer.                 IRaster raster = imageserverlayer.Raster;                      //The raster from an image server is normally large;                  //define the size of the raster.                 IRasterProps rasterProps = (IRasterProps)raster;                 IEnvelope clipEnvelope = new EnvelopeClass();                 clipEnvelope.PutCoords(779000, 9628000, 786000, 9634000);                 rasterProps.Extent = clipEnvelope;                 rasterProps.Width = 256;                 rasterProps.Height = 256;                      //Save the clipped raster to the file geodatabase.                 ISaveAs saveas = (ISaveAs)raster;                 Type factoryType = Type.GetTypeFromProgID(                     "esriDataSourcesGDB.FileGDBWorkspaceFactory");                 IWorkspaceFactory workspaceFact = (IWorkspaceFactory)Activator.CreateInstance                     (factoryType);                 IWorkspace workspace = workspaceFact.OpenFromFile(@"c:\temp\fgdb.gdb", 0);                 saveas.SaveAs("clipfromimageserverlayer", workspace, "gdb");                      m_AOLicenseInitializer.ShutdownApplication();             }         }     }      This code is based on http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//00010000047t000000. Here's the exception detail provided by Visual C#'s error dialog:               System.Runtime.InteropServices.COMException was unhandled       Message="Error HRESULT E_FAIL has been returned from a call to a COM component."       Source="ESRI.ArcGIS.Carto"       ErrorCode=-2147467259       StackTrace:            at ESRI.ArcGIS.Carto.ImageServerLayerClass.Initialize(String ServiceURL)            at EngineConsoleApplication1.Program.Main(String[] args) in C:\Users\brown\AppData\Local\Temporary Projects\EngineConsoleApplication1\Program.cs:line 35            at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)            at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)            at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()            at System.Threading.ThreadHelper.ThreadStart_Context(Object state)            at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)            at System.Threading.ThreadHelper.ThreadStart()       InnerException:


title: Programmatically convert multipart polygon to singlepart in ArcGis 10

text: I have a multipart feature and I need to convert it to a singlepart feature. Couldn't find any code sample. I wonder if i could get some help from you! I'm working with ArcGis10 and c#. Tks


title: Doubts about Manipulation of Layers

text: I'm working with OpenLayers, I created a new plugin to perform a selection feature. But every event I perform in my plugin button it creates a new layers. (Attached is a print). Of the attempts that tried to make the removal of the layer were:               map.layers.remove (0);     map.layers.length;     map.layers.remove;      Can anyone help me ?


title: Why isn't this Python calculation working correctly?

text: I want to label the source files for a unified shapefile, and there are three respective columns for each. If there is no value in the column, there is no data from that source; if there is a value in multiple columns, it is from multiple sources (and therein lies the problem). I have written the following for use in the Codeblock in field calculator:               def srcfind (grcode,grcode2,lur):      if lur == 'Parks and Recreational' and grcode == 0 and grcode2 == 0:       return 'dmti'      elif lur == 'Parks and Recreational' and grcode > 0 and grcode2 > 0:        if grcode <> 0 and grcode2 <> 0:        return 'dmti, land cover, clutter'       elif grcode == 0 and grcode2 > 0:        return 'dmti and land cover'       elif grcode > 0 and grcode2 == 0:        return 'dmti and clutter'      elif lur <> 'Parks and Recreational' and grcode > 0 and grcode2 == 0:       return 'clutter'      elif lur <> 'Parks and Recreational' and grcode == 0 and grcode2 > 0:       return 'land cover'      elif lur <> 'Parks and Recreational' and grcode > 0 and grcode2 > 0:       return 'clutter and land cover'       The first 'if' works correctly; even the 'dmti, land cover, clutter' category works correctly; and the last three elifs work correctly, it's just the middle part to determine 'dmti and land cover' and 'dmti and clutter' which don't work, resulting in the field being labelled 'land cover' or 'clutter' (depending on which column has a value). Essentially, how do I fix this? The image below is the attribute table with the variables labelled. You can see that it doesn't work for the conditions I mentioned. ![The attribute table](http://i.stack.imgur.com/kFlgi.png)


title: Closest Facility Solve Failing

text: I have a problem getting a large number of facilities and incidents to draw upon solving. I have about 380 facilities and incidents, that I am attempting to find routes between. I need the actual network geometry, so and OD Cost Matrix won't work. What happens is I load in everything and attempt to solve and it will get to the very end (99%), and then say it is completed, but there are no actual routes. I have got it to route to 299 incidents and 299 facilities, but with 308, the solve fails. I began creating a model to run it outside of ArcMap, because I thought that too many routes trying to draw might be the issue, but the model is returning an error. I have attached a photo of the model. Any suggestions on how to fix this? Or what the problem might be? Is the memory just insufficient or something? I'm using ArcGIS 10.0, with the Network Analyst Extension. Thanks, Eric![enter image description here](http://i.stack.imgur.com/KILgA.png)


title: How to put 20K points on a map

text: I have an sqlite 3 database with 20K entries each of which has lat long data and I wanted to create a layer from that data. From what I have read I need to import it into a postrgres DB but I'm not sure how to make sure that each item populates the database correctly (ie has all of the correct attributes completed). my plan is to have a series of tiles created from the result of the query which would be a transparent background with the points overlayed and then allow clicking on them I still have a lot to learn to get this done but I want to ensure i put the data in the correct place to start with. * * * Further details. I am planning to do several things. 1. To render some GEOtiffs into tiles to act as base layer along with using OSM as a layer. I then intend to take my SQLite data and create an overlay layer or points that should be clickable. I wanted everything in a SERVER DBMS for several reasons.   1. There could be up to 6,000 users accessing the data at any one time so I really wanted a robust DBMS UNDER THE HOOD.    2. Also if I end up having to do some real time rendering on other data I can still store it in the same repository.   3. I can exclude points based on certain criterion and create multiple layers from the same data.  My current understanding is that it would work as follows:   1. Create a DB of points by importing SQLite data into POSTGRES with postGIS extensions (ensuring the correct GIS fields get populated appropriately)   2. Use that DB and a query to access points and create a layer to render from within tilemill.    3. Export that layer back into Postgres so that it can act as the layer server for my open layers based client app.  I have tilemill, qGIS, OPENGEO, software. Please let me know if I have misunderstood how to do this !!!


title: How to return nearest point to input lat/long with distance?

text: I am trying to write a query with PostGIS that returns one row where the geometry of that row is the closest to an input point. I would also like to include the distance between these points in the result. And of course, I want it to run as quickly as possible. I have scoured the internets, but haven't quite found the solution to this specific problem. Here is what I have so far, the query runs just fine, but the result is definitely not the closest record. (Note that `geom` is the name of the geometry column)               SELECT * FROM table      ORDER BY geom <-> st_setsrid(st_makepoint(-112,33),3857)     LIMIT 1;      I have also tried to use the following `ORDER BY` clause, but I get the same incorrect result:               ORDER BY ST_Distance(geom,ST_GeomFromText('POINT(-112 33)', 3857));      I need to fix this query so:   1. It returns the correct closest geom and associated row, and   2. Include the distance between the points with the result.  Any help is much appreciated!


title: How to sample raster datasets at ALL points?

text: I know it is possible to use tools like ArcGis's 'extract sample' tool to extract values at a given number of points. I would like to sample every pixel in a raster, and drill down through all other rasters (which have the same extent and resolution). How could I do this? I can use QGIS, Arc, or Idrisi. Would the best way be to generate regular points at a spacing of 'RESOLUTION' and an initial offset of 'RESOLUTION/2'?


title: How to create georeferenced and projected data from hand-drawn map?

text: I am preparing datasets for students in a spatial statistics course for a module on spatial autoregressive models. We will use ArcGIS 10.1. The first dataset will correspond to a mythical pre-industrial village in which houses closest to the tannery will be smaller and more tightly packed and as the distance from the tannery increases, houses will become larger and less tightly packed. Likewise, the property values of houses will increase as distance from tannery increases. NB: Tanneries were historically noxious points that smelled dreadfully and often polluted local waterways. This example is purposely designed with multicollinearity between distance from tannery and size of house. I want my students to struggle with the question of what is explaining property values so they can understand what multicollinearity means in a concrete example. Later modules will include larger houses near the tannery, as well as smaller houses further from the tannery, so that my students can then use a spatial autoregressive model to identify the effects of positive externalities impacting a small house's property values when it located in a neighborhood with large houses, and the negative externalities impacting a large house located near a tannery. I currently have a hand-drawn map of this mythical village, and have scanned it as jpg. Each building will have an ID number, a property value, a distance from the tannery and a size in square meters. While I could simply plug these data into Minitab, etc., I want to show my students how to use the spatial autoregressive model function in ArcGIS 10.1 (the proper name from the command escapes me as I type this, but it is under the _Spatial Statistics Toolbar_ ). For this function to work, however, I must also project my data. I plan on doing this by selecting a 300m x 300 m polygon somewhere on the globe and simply add control points that arbitrarily line up with my mythical village map (also scaled to capture a 300m x 300m area). The added benefit of georeference this map is that I can also easily calculate the centers of these structures as well as their areas --- so long as I digitize the buildings. My question is this: does this sound like a reasonable solution in terms of creating georeferenced and projected data to fit an image for an imaginary village?


title: What does Runtime error : 'NoneType' object has no attribute '<field_name>' mean?

text: Here is my code               #arcpy     import arcpy,sys          from arcpy import env          env=r"C:\Users\Jaya\Desktop\python_practice"     totalRec=arcpy.GetCount_management("river")          rows=arcpy.SearchCursor("river")     row=rows.next()          pp=[]          for row in rows:         initialH=row.RASTERVALU         for r in range(1,55):             val=val+1             headav=initialH-row.RASTERVALU             if(headav>=50):                 if(r>=12):                     break             elif(headav<50):                 if(r>=12):                     row=rows.next()                  row=rows.next()         print headav         pp.append((row.POINT_X,row.POINT_Y_1,headav))         row=rows.next()               pt=arcpy.Point()     ptGeoms=[]          for p in pp:         pt.X=p[0]         pt.Y=p[1]         pt.Z=p[2]         ptGeoms.append(arcpy.PointGeometry(pt))          arcpy.CopyFeatures_management(ptGeoms,r"C:\Users\Jaya\Desktop\python_practice\power_plant.shp")      I am getting error message like this: _Runtime error : 'NoneType' object has no attribute 'RASTERVALU'_ Can you help me in this regards


title: What are offline/client geometry capabilities of ArcGIS JavaScript API?

text: Lately I've been going through ArcGIS JS API samples, but from what I've seen, it looks like all geometric functions always go through server, and use server side REST functions. There is no option to even calculate area of polygon using only JS API without server side funcions. Am I right, or is there something I'm missing here? I have a case, where I have feature layer added from JSON file and I want to use some geometric functions un features inside. **Server connection is not an option, everything needs to be done on client side.** Is there a way to do this with ArcGIS JS API only, without using server side tasks? Or maybe some other alternative frameworks, that could use features from JSON file?


title: Need to calculate values for a cell based on surrounding landscape

text: I have a raster file with the urban development of a county mapped out (values: 1=urban 0=not urban). I also have a raster file with several blocks of forested land, each block of land has its own numeric identifier and 2-1000 cells per block. The 2 rasters have the same cell size. I need to calculate, for each individual cell in the forested lands layer, what percentage of the land within 4km is covered by urban development. I'm using ArcGIS 10.1 Thanks in advance!


title: New coordinate system?

text: I just had my mind blown in answer to my previous question. I was going to rework that question, but decided it makes more sense to ask a new one. I had been converting between ECEF and lat/lon, and ran into an issue with Geoid vs Ellipsoid height. I was looking for an easy way to have an intuitive sense of position on the earth as well as elevation without having to worry about MSL, ellipses and imperfect models. I would like to define a `newLatitude` and a `newLongitude` that are based on a tiny, perfect sphere located at the center of the earth. This sphere rotates with the earth just like ECEF does. To define a location in this system you must have a triplet `{newLat, newLon, Radius}`. Using only `{newLat, newLon}` defines a line radiating from the center of the sphere out into space. You have to say how far along that line you are with the `Radius`. A radius of 200 meters is 200 meters from the center of the earth. The radius I'm sitting at right now is 6,499,100 meters, etc. Then we don't have to worry about the average level of the tide for the last 19 years to figure out MSL. We simply use the same reference point for `Radius`. Essentially, this is using spherical coordinates for something that only approximates a sphere, but that's fine, because we always have `Radius`. To me, this seems to simplify a lot of the problems I have with different coordinate systems. Yes, sure, it leaves unanswered how to define the surface of the earth in this system, but that's where DTED information comes in. **Is this a feasible** coordinate system that could be used at all locations on or near the globe without ambiguity? Are there any problems with this scheme (ignoring inertia of existing schemes and reluctance to change... I'm only asking about the validity of the system.)


title: How to show/hide labels with mapserver and openlayers

text: I'd like to have a check/uncheck option like this print checkbox to show/hide labels in my WMS layers served by mapserver 5.6.7 in openlayers 2.11. I have a toolbar where to put this using probably geoext1 or ext3.4, so the questions:   1. Is this possible?   2. If so, how can it be done? I'd appreciate some support with this please, thanks!


title: Editing a vector layer with openlayers

text:
i am trying to develop a webmapping application using openlayers, geoserver, JSF javascript. I published my postgis layers on geoserver and added them to a google basemap on a xhtml page using a javascript code. Now i want to edit one of the layers i published. on the script i added the folowing code :               function  drawpoint(){               //nouveau_risque = new OpenLayers.Layer.Vector("nouveau risque");                map.addLayer(nouveau_risque);                drawControl = new OpenLayers.Control.DrawFeature(nouveau_risque, OpenLayers.Handler.Point);               map.addControl(drawControl);               drawControl.activate();              // drawControl.events.register('featureadded', drawControl, onFeatureAdded);               drawControl.events.register('featureadded', drawControl, function(f) {                          // create a WKT reader/parser/writer                               var wkt = new OpenLayers.Format.WKT();                           // write out the feature's geometry in WKT format                      var out = wkt.write(f.feature);                      console.log(out);                    });                 // drawControl.deactivate();                          }                     function endDraw(){                    drawControl.deactivate();                }      and on the xhtml page i wrote :
                  <input type="button" value="add point" onclick="drawpoint()"> </input>                 <input type="button" value="stop editing" onclick="EndDraw()"> </input>

      so that i can get the geom value of the added point so that i can add it to the database. The problem is when i run the page, the add control is displayed and i can add a pointy however i don't get the feature's geometry in WKT. Than you all for your help


title: Python Script for Select by Attributes taking user input

text: I am trying to write a python script and create a script tool in ArcGIS that will let a user choose the value or values that will be used to extract a shapefile. These selected value(s) will then need to pass through the select tool. I'm sure this involves writing a WHERE clause but I'm new to python and am a little lost on this one. Thanks in advance.


title: calculate coastline at risk

text: I have an idea of what I want to do but I don't know yet what tools will bring me there. I have administrative boundaries in one layer and coastline in another layer. The coastline is categorized in different classes. What I want to find out is how much of each category falls into each administrative boundary. So the outcome would be percentages of the administrative unit's coastline for each class. So say the coastline from unit 1 is 40% class A, 50% class B and 10% class C. Unfortunately, the two shapefiles do not match up exactly because one of them does not have a spatial reference...? (I work with ArcMAP10) Any hints and ideas what tool will bring me there? Any help is greatly appreciated Sandra


title: How to run actions in QGIS web client?

text: In practice the QGIS web client will be a companion to an existing cloud database with a portal and forms. My intent is to run 'actions' (like in QGIS) where clicking on a feature launches the portal and the associated form. Vice versa, clicking on a link in the database form will launch the web client and zoom to the feature. Is this possible? Any hints on how to make this happen in Web Client or the effort involved to make it possible? Thanks!


title: Wrong values in Feature/Point to Raster

text: I've got an XY dataset that I'd like to convert to a raster, based on the ETrel_whol field. The ETrel_whole field includes NaNs and ranges from 0-1. I would like to convert this to a raster, with a color stretched from 0-1, and NaN mapped as no color. The columns of the input data are shown here: ![enter image description here](http://i.stack.imgur.com/J83Wx.png) I convert to a raster using the Feature to Raster tool in the Conversion toolbox: ![enter image description here](http://i.stack.imgur.com/OdO1N.png) Note that I've also tried the Point to Raster, with the same outcome. It looks like ArcMap 10 assigns 102 "unique values" to the ETrel_whol field. 1 for NaN, and then one for each value from 0-1 at 0.01 intervals, based on my input data. The output attribute table is shown here: ![enter image description here](http://i.stack.imgur.com/QFGsx.png) The issue is that the Value field appears to be assigned randomly to my ETrel_whol field, rather than sequentially, and the output raster has the colormap based on the Value field, rather than the ETrel_whol field. If I switch my Symbology to Unique Values, I can define that the value field should be ETrel_whol, and colors are assigned to each value from 0-1, as shown here: ![enter image description here](http://i.stack.imgur.com/ulhLu.png) However, if I want to set the symbology to Stretched, it does not give me a choice of the value field, and simply stretches the Values from 1-102, rather than ETrel_whol from 0-1, as shown here: ![enter image description here](http://i.stack.imgur.com/OZzxI.png) How can I map the colors of this raster to the ETrel_whol field, rather than the Value field? Thanks for your help! -sam


title: Fix broken SDE layers with Arcpy - unexpected error

text: We are in the middle of our ArcGIS 9.3 to 10.1 migration project and we have a lot of custom map documents (from different users) that among others, point to our current 9.3 SDE database. After our migration, we'll disable this database to the users so they can't connect anymore. That means they'll end up with broken links in their MXDs (that's basically what we want) and need to repoint to the new SDE. I prepared a little script that should automatically repoint all broken layers to our new 10.1 SDE (using a connection file), but unfortunately I always run into the same error. I already checked out some other posts on this site (e.g. here and here ), but also on the ESRI forums e.g. here and the ESRI resource center of course. Also tried to repoint to e.g. a file geodatabase, but I'm getting the same error. However, none of the suggestions apply to my case or worked for me, and after playing around almost the whole day now, I thought maybe someone here knows a solution to that problem. The code itself works fine, it finds the MXDs, spits out the broken layers if I ask it to, it's just the actual repointing command(s) that give me a headache.. Below my (simplified) code and the error I get. Thankful for any tips!               # Import system modules     import sys, string, os, arcpy, datetime, shutil          # source folder(s) to look for MXDs     sourcePath = r"D:\scripts\fixBrokenLinks\test"     # new 10.1 SDE connection     sde = r"\\path to *.sde connection file          # loop through folders and find all MXDs (put into a list)     for root, dirs, files in os.walk(sourcePath):         for f in files:             if f.endswith(".mxd"):                 mxdPath = root + "\\" + f                 mxd = arcpy.mapping.MapDocument(mxdPath)                 print "converting " + str(mxdPath)                 brknList = arcpy.mapping.ListBrokenDataSources(mxd)                 for brknItem in brknList:     ##                print brknItem                     brknItem.replaceDataSource(sde, "SDE_WORKSPACE")#, brknItem, True)          ##                # ALTERNATIVE:     ##                find_workspace = brknItem.dataSource     ##                replace_workspace_path = r"\\path to *.sde connection file     ##                print "find_workspace " + str(find_workspace)     ##                brknItem.findAndReplaceWorkspacePath(find_workspace, replace_workspace_path)                      newMXD = mxdPath[:-4] + "_NEW.mxd"                 mxd.saveACopy(newMXD)                 del mxd      And here the error I get:               Traceback (most recent call last):       File "D:\scripts\fixBrokenLinks\fixBrokenLinks_simple.py", line 19, in <module>         brknItem.replaceDataSource(sde, "SDE_WORKSPACE")#, brknItem, True)       File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\utils.py", line 181, in fn_         return fn(*args, **kw)       File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\_mapping.py", line 680, in replaceDataSource         return convertArcObjectToPythonObject(self._arc_object.replaceDataSource(*gp_fixargs((workspace_path, workspace_type, dataset_name, validate), True)))     ValueError: Layer: Unexpected error      I'm using ArcGIS 10.1 SP1 (Build 3143) and Python 2.7.2


title: Replace the data source for several layers in several mxds - from shapefiles to the ARCSDE data source

text: > **Possible Duplicate:**   >  Permanently replace/update SDE server + service in each SDE Layer in an MXD First let me say I have probably read every link regarding changing DATA Sources on the internet from the ARCGIS 10 tool to Python, however none have worked for me. What i'm trying to do is very simple in concept. Please don't recommend the ESRI Replacing data source help.   1. I'm updating to 9.3 to 10.1 - I need to replace my shapefile data source to my ArcSDE files.   2. I have over 4000 mxds with several shapefiles with the data source pointing to: R:\Shapefiles[layer folders*.shp   3. I need to change the shapefile datasource to point to C:\Users\lmuhammad\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\Connection to PGCGIS02.sde[gisdev.layername][gisdev.filename]   4. I need to repeat for over 4000 mxds automatically. easy right.. HELP!!!! ------ UPDATE  This works ok xcept if the shapefile name differs greatly from SDE featureclass, =no connection any fixes? import arcpy, glob newSdePath = r"Database Connections\Connection to sdename.sde" for file in glob.glob(arcpy.GetParameterAsText(0) + r"C:\*.mxd"):               mxd = arcpy.mapping.MapDocument(file)          for df in arcpy.mapping.ListDataFrames(mxd):              for lyr in arcpy.mapping.ListLayers(mxd, ""):                  if lyr.isFeatureLayer== True:                      lyr.replaceDataSource(newSdePath, "SDE_WORKSPACE","", False)          mxd.save()del mxd


title: Override default behavior of double clicking an OpenLayers Popup

text: I would like to change the position of a popup when I double click it. So if it is in the 'tr' position it would move to the 'br' position, so on and so forth. The current Popup.js code stops the 'double click' event propagation as such:               ondblclick: function (evt) {         OpenLayers.Event.stop(evt, true);     },      I would like to do something like:               ondblclick: function (evt) {         myPopup.calculateRelativePosition = function () {return "bl";};         map.removePopup(myPopup);         map.addPopup(myPopup);     },      How do I go about overriding the ondblclick function without actually overwriting the original code?


title: How to change vector attributes values?

text: I want to change vector attributes values. i could not get the command fet.setAttribute indeed, it is mentionned in http://hub.qgis.org/issues/7223 that: > "The QgsFeature instance now must be first initialized with initAttributes() > to know how many attributes it will contain. Then there's setFields() call > that allows doing name-to-index mapping in QgsFeature." however, i could not get fet.initAttributes() and fet.setFields() working. (newbie...) the error message I get is "AttributeError: 'QgsFeature' object has no attribute 'initAttributes'". any help appreciated. qgis version: 1.8.0 gis-python version: 1.8.0-8 python: 2.7.3-7.2 os: fedora17


title: Network Analyst REST service gives error "Routing error: Unable to complete operation unable to find attribute invalid Context"

text: I have created an Network Analyst Routing sample. On Arcmap it works fine when creating a route on the data. However, when I create Network Analyst service through ArcGIS Server, using this REST service Silverlight sample gives this error: `Routing error: Unable to complete operation unable to find attribute invalid Context` Any help please.


title: How to select and shade polygons I am interested based on existing shape file in Arcgis 10.2

text: The shape file already includes polygons I am interested and others. I want to make a map put in my paper showing which regions in the world I am interested. Thanks.


title: Flow accumulation raster loading in QGIS 2.4.0 with null values (but flow direction loading ok!)

text: I have been tasked with creating an open-source hydrology dataset for a community group. To do this I have exported the flow direction and flow accumulation rasters from ArcMap as TIFF files and then imported them into QGIS. However, a number of the flow accumulation rasters fail to import properly giving values of 0 rather than the range in the original ArcMap raster file. Can anyone help?


title: ArcGIS: Create polygon using file containing point coordinates

text: I have a text file containing the projected coordinates of the points that define a single polygon. The X, Y coordinates are separated by Tab Is there a tool in ArcGIS similar to "Add X,Y Data" in ArcMap, that can be used to automatically create polygons FC, not point FC? I use ArcGIS 10.1 for Desktop.


title: Create table with Geometry Column in hadoop Hive

text: Is there a way to add a geometry column in hadoop? Please give me some getting-started tutorial for geoprocessing in hadoop. Like, I have a database which have point values and if I take a random point, I need to check all the values which come under 10km radius of that point.


title: Issue with gdal getprojection and setprojection returning different information

text: I am using Landsat imagery from the USGS. Those who use them may know that the projection attribute is wrong (everything is in the Northern hemisphere). I have a script to process tar.gz files and output a stacklayer with selected bands of interest. I deal with the projection error by modifying the EPSG value and writing a new projection like this:               orgeoproj =  dst.GetProjection() # North projection     osn = osr.SpatialReference()     osn.ImportFromWkt(dst.GetProjection())     nEPSG= int(osn.GetAttrValue("AUTHORITY",1))     sEPSG= nEPSG + 100     print "mudando EPSG Norte a Sur"     osn.SetFromUserInput("EPSG:%d"%sEPSG)     modgeoproj = osn.ExportToWkt()      When I print `orgeoproj` (original geoproject), the output has Authority values like:               PROJCS["WGS 84 / UTM zone 23N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32623"]]      After modifying the EPSG value, the `modgeoproj` is OK now and showing the right EPSG value for the southern hemisphere! The problem rises when I write the `modgeoproj` with `SetProjection`(modgeoproj) to the stacklayer and then load it with another script. After a `GetProjection()`, I only get:               PROJCS["WGS_1984_UTM_Zone_23S",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-45],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["Meter",1]]      There's no Authority Information and I need it! What can possibly be wrong?


title: Choosing projection to use for Least-Cost Path analysis at continental scale?

text: I am trying to find least cost paths from the southern USA to the Great Lakes region (for example). My resistance layers are currently in an equal area projection but I'm wondering if I should convert to an equidistant projection? My understanding is that part of what factors into a least-cost path analysis is distance (all else being equal, the shortest route from A to B is the least-costly) and so to me it would make sense to have the raster layers in an equidistant projection...but maybe I'm missing something? If equidistance does make sense, what is the most appropriate for all of North America?


title: Buffer multiple roads to find points within and compare?

text: What I am trying to do is buffer a main st and a side street and get all of the points that intersect that buffer, however they need to be mutually exclusive. In the example below, my results would give me a duplicate at the intersection of Epping Forest Rd and Point No Point Dr. ![enter image description here](http://i.stack.imgur.com/yzI2K.jpg) Logic: I need to buffer Epping Forst Rd and get all points that intersect that buffer and buffer Point No Point Dr and get all points that intersect that buffer then compare both results and drop any points that are duplicate. So far I have this SQL statement:               SELECT  aa_points.int_id         FROM    aa_points,                  road_ln      WHERE road_ln.st_nam = 'EPPING FOREST'      AND ST_Intersects(aa_points.the_geom_webmercator,     ST_Buffer(road_ln.the_geom_webmercator,10))      That queries one road but I am at a loss on how to do the second road in a nested statement and how to compare/drop records.


title: Unable to save selected layer by attribute for ArcGIS Geoprocessing

text: I am troubles using the SelectLayerByAttribute() function for arcgis geoprocessing. I have a layer and I want to select everything that matches on a particular attribute. I call MakeFeatureLayer() to create a layer, I run SelectLayerByAttribute() to select what I want, and then I run CopyFeatures() to save that layer into the database. However, after the copyfeatures() call, nothing is saved and I have empty layers. Is there something I'm missing? I'm using python and arcgisscripting module for geoprocessing. My code below:                gp.MakeFeatureLayer_management(target_layer, "lyr")       gp.SelectLayerByAttribute_management("lyr", "NEW_SELECTION", "\"my_attribute\" = 5 " )           # Write the selected features to a new featureclass      gp.CopyFeatures_management("lyr", output)


title: Cropping aerial image using Python?

text: How can I crop an area from an aerial image knowing the latitude and longitude of the image's corners and also the cropped section? I have a LiDAR scan and I and want to crop an image overlay to fit over the scanned area.


title: Converting SOSI to ESRI Shape

text: I need a tool for converting norweigan SOSI files to ESRI Shape using a Mac. It could also be a command line tool for Windows. I tried to build GDAL with SOSI support on my Mac following instructions on this page but when I try compiling `fyba` I get this error message: `INQTID.cpp:18:11: fatal error: 'sys/vfs.h' file not found` Any ideas?


title: How to add RGBA color map to single band GeoTIFF using GeoTools 2.x?

text: I am developing a light weight GIS application, and am looking for the simplest way to add an RGBA color map to a single band GeoTIFF using GeoTools 2.x?


title: Geoserver DATA_DIR relative path

text: I am using REST API with curl to populate geoserver with layers on the server. I am not setting GEOSERVER_HOME so Geoserver itself decides what the actual path is. However, when I download the populated geoserver to my laptop and run it with startup.sh script, layers are not published as the datastore location still aims to the server location (/var/www/user/...). How do I make geoserver independent on the environment it is run in? I would like the datastores to use relative paths, so instead of `/var/www/user/...` they should be using `data_dir/datastore_dir`. Is this possible? Thank you.


title: Automating the production of GPS-compatible map tiles from georeferenced raster maps

text: I have a set of TIFF maps that I want to load onto Garmin GPS 62s units. The maximum size for each tile on the GPS is 3Mb and less than 1 million pixels. I manually produced one tile, following this workflow:   1. Convert whole TIFF map to JPG using IrfanView   2. Manually crop the image to be less than 1 million pixels (i.e. 1024X1024) and compress to be less than 3Mb.    3. Add JPG to QGIS and georeference using the georeferencer tool.   4. Add same JPG image to Google Earth as an Image Overlay.    5. Use the Extent information from the georeferenced JPG in QGIS to fill out the extent boxes in Google Earth.   6. Save as KMZ file.    7. Add KMZ file to Garmin Basecamp.   8. Add KMZ to GPS unit with Basecamp. This is obviously a slow and fiddly process which I am reluctant to repeat 100 times to produce all the tiles needed. Is there a way to automate sections of this? Specifically I imagine the follow are possible, but don't know of any tools to do it:   * Automatically divide one georeferenced raster into multiple tiles of given dimensions, retaining geocoded information, in QGIS.   * Export multiple tiles into a KMZ file in QGIS This would make the process a lot quicker. The closest tools I have found is the GarminCustomMaps plugin for QGIS, but this just takes a JPG image of your current map canvas - great for using with multiple vectors etc, but when zoomed out with large raster files, I just get a very pixelated image which is useless for reading on a GPS. Zooming in more to increase the resolution negates the point of it, as you'd have to repeat it multiple times. Any suggestions of tools or methods would be appreciated!


title: How to dissolve geodatabase map across two subdivision levels in Arcgis 10.2

text: The existing polygon database contains attribute table with the following structure, and has three levels; country, state, and city (and many other countries not listed below). I want to dissolve the map at country level, but for some specific countries. I want further dissolve them at state level. Thanks.               ID_0    country ID_1    state   ID_2    city    ID_state    ID_city     48      China   01      Anhui   08      Hefei   4801        480108     48      China   01      Anhui   08      Hefei   4801        480108     48      China   01      Anhui   15      Tongling4801        480115     48      China   02      Jiangsu 14      Suzhou  4802        480214     48      China   03      Fujian  15      Fuzhou  4803        480315     .     .


title: Why 'Transparent' Parameter in OpenLayers is a Server Side Property?

text: There are four parameters for WMS Layers : Name, URL, Server Side Params, OpenLayer Options. And Transparent Parameter comes under Server Side Params. Does it mean that transparent images are pre-cached in the GeoServer and return to browser on request. Can transparency be a OpenLayer Property too? Where can I see all possible server side parameters in OpenLayers?


title: makefile generated using QGIS Plugin builder cannot find pyuic4

text: I have QGIS 2.4 installed using the OSGeo4W installer. I have the bin folder in my path and I can run `pyuic4` successfully on the command line using osgeo4w.bat, but when I try to run the makefile generated by the QGIS plugin builder, I get an error saying:               pyuic4 -o ui_LoginDialog.py ui_LoginDialog.ui     make: pyuic4: Command not found     make: *** [ui_LoginDialog.py] Error 127      I know the syntax is correct because I can run the first line of that command manually in the command line (under osgeo4w.bat). Is it possible that the items I have in my PATH are conflicting with the osgeo4w environment? I don't understand how I can run it manually and then it fails in the makefile, in the same osgeo4w session. My makefile:               UIFILES := $(wildcard *.ui)     PYFILES := $(UIFILES:.ui=.py)              .PHONY: all     all: $(PYFILES)              %.py: %.ui         pyuic4 -o $@ $<


title: Unit testing with postgis 1.5 and django

text: I'm trying to get some unit tests working in Django/PostGis. When the test database is formed, it doesn't have the postgis and postgis_topology extensions installed. Is there a way to issue commands to the database before the creation of tables happens? Or could you somehow mess with the postgres template to inherit from? Or something else that wouldn't require me to either hack the django code or not destroy the database? Thanks!


title: Summarize X, Y Table

text: Here is a table that is a sub-set of the data I am working with, I am trying to use the Summarize Statistics tool to select the X,Y values of the First and Last Addresses. ![enter image description here](http://i.stack.imgur.com/BcGw6.png) I am looking for something like this: ![enter image description here](http://i.stack.imgur.com/XURHs.png) But I would need the Min_X and Min_Y to correspond to 3 Palisade Basin and the Max_X and Max_Y to correspond to 27 Palisade Basin. Thanks for the help!


title: Stopping the automatic snap to locator in Arcgis 10.0 reverse geocode

text: I built a network application using arcgis 10.0 sdk for wpf. The application uses a locator of highway milestones to reverse geocode (and identify) the "flag" the user clicked on the map. My Problem is that the locator somehow has a snapping effect - the "flag" moves to the nearest place the locator recognizes (The correct behavior I'm aiming for is the flag staying in the place where it was clicked and its place returned/not returned as a string based on the nearest place the locator recognizes being in the tolerance zone. How can I disable this snapping behavior ( the automatic moving of the flag)? Thanks in Advance.


title: Hydro-Enforced/surface constraint DEM Creation using GRASS/QGIS

text: I am wondering if there is a way to create a hydro-breakline enforced DEM by means of any open source solution? I am able to create a DEM from Lidar data using GRASS, but would like to enforce some 3D hydro breaklines into the DEM. I am looking for something similar to creating a DEM from a Terrain available from ESRI. Any ideas? -Jeremy


title: Get lon/lat of feature in postgis

text: I'm hava a problem I have a point layer (shapefile) insert to postgis! I'm using MapServer and OpenLayer to display layer on map! Now, i want get lon/lat all feature of layer! Hope somebody can help me! Thanks!


title: Script Tool Problems ArcMap 10.0

text: I Have a scipt tool that runs when input shape files are added from the table of contents (added from drop down menu.) However this tool will not run when they shape files are added using the add file button. ArcGIS 10.0 Workspace settings all seem to be in order...


title: Exit Python script in ArcGIS 10.0

text: I have a script with an bail-out function like so:               def die():           from sys import exit         exit()      Occasionally in the script I check a condition and exit if necessary. This works great in 10.1, but unfortunately our server is still at 10. I had to modify the function as follows to work (per this post):               def die():         from sys import exit         try:             exit()         except SystemExit:             pass      The problem is that it gets to the `except`, `pass`es, and keeps on trucking right to the end of the script. Is there any way to actually make the script stop?


title: Can you insert a marker symbol at a specific scale?

text: I have a map that is consistently used at a 1:500 scale. I want to be able to add structures to the map to view and move them around to get the best fit. The end user is new to GIS and I am trying to limit the amount of editing they need to do and would like to use marker symbols. They can easily be added to the map, rotated and moved. I need the structures to come in at the proper scale. Currently this is being done using a paper copy of the map and scaled paper cut outs of the structures. Is it possible to do this using ArcMap 10 of 10.1? Thanks


title: Skill requirements and resources to run a private GIS consultancy/ GIS service providing firm?

text: I'm planning to make a private GIS service providing firm in the coming years. I just wanted to know what skills and resources are required to set up such a firm? I'm aware that the software, hardware and data collecting equipment would cost me. Can you give me some idea of the things i will be needing? For you information, i am a Geography hons student, and presently doing a diploma course in Geo-Informatics. I also have some knowledge in programming.