title: How do I use actions from ArcGIS SDK for WPF in the latest version of WPF?

text: I understand how to use the `Actions` and `Behaviors` but there is a problem I'm not sure is solvable other than to downgrade the version of .net and WPF I'm using. I installed the latest ArcGIS SDK for WPF, version 10.2 and saw one of their examples illustrating how to use the `MeasureAction`. When I try to implement this in my own WPF program it won't compile and tells me that the version of Blend that MeasureAction was compiled with is different than the one I'm using. I am using the most recent `Microsoft.Expression.Interactions` and `System.Windows.Interactivity` (file version says 4.0; NOT assembly version) but in their examples they are using version 2.0 (again, file version not assembly version). Why would Esri release a new SDK (fairly recently) and not compile it with the most current version of those assemblies? Is there a way to make this work in my project? I can't roll back to a different version of .net because I'm using `Caliburn.Micro` which requires the version I'm using now.


title: How does ModelBuilder compare with Vensim and Stella for environmental modeling?

text: Does anyone have any advice or has anyone experienced any limitations in ArcGIS software when trying to use model builder for any type of environmental phenomenon? I know that Vensim and Stella can be used with more detail for just about anything when modeling an environmental phenomenon. What kind of limitations might there be with ArcGIS software?


title: How to Add North Arrow, Scale to ArcIMS Map JAVA?

text: I am new to ArcIMS , currently i am working on integrating maps to Existing java application. I got a requirement from my lead , He asked me to add NorthArrow, Map Scale to the map. I am using ArcIMS 9.2 which has com.esri.aims.mtier package. I am using java . I was able to add North Arrow using Acetate layer and add to a map. Now my concern is about scale bar. My requirement is to get a bar, But i am getting "0|6241" miles when used Scale Bar class


title: Merge two rasters with no data value

text: I have two rasters: Raster A and B. Raster A has has only values of 0. The white area in Raster B are No Data values. I want to merge them to one raster (Raster C). So basically I want all pixels in Raster B with a No Data value to have a value of 0. I tried to do this with the raster calculator in QGIS by adding Raster A to Raster B, but it only returns again Raster B. I am looking for solutions with QGIS, GDAL, or Grass GIS. ![enter image description here](http://i.stack.imgur.com/a5W9R.png)


title: QGIS 2.0.1 linking table issue, MSSQL 2008 database

text: I'm trying to link tables in QGIS 2.0.1 and MSSQL 2008 database. I can link them but when I try to open the attribute table QGIS throws an error and shuts down creating a *.dmp file. I saw that table joining when using databases that QGIS does not support MSSQL but the funny think is that QGIS 1.8 allows the join and attribute tables to work. Anyone have any information regarding this? I haven't been able to find anyone else having this problem online.


title: How to join data in postgis tables to form layer with subset of attributes

text: In QGIS I am trying to join data from two postgis tables. I can not figure out how to do this at sql because add layer tools seem to allow one to select just one table to filter on. Instead I loaded all tables as separate layers and then used the join layers in the properties of one of the layers. That worked but I end up with a lot of attributes that I don't need or want. How do people handle this? One solution that occurs to me is to construct a view in postgres.


title: The red box that refers to other dataframes will only show part of the box (only show over land but not water, see image)

text: ![the red box refers to other dataframes but it's only showing over land and not over the ocea, ie, the box is an incomplete square](http://i.stack.imgur.com/BEAyd.jpg) the red box refers to other dataframes but it's only showing over land and not over the ocea, ie, the box is an incomplete square


title: Integrated viewshed analysis

text: I need to do integrated viewshed analysis of a target with several observer locations. I am going to use r.viewshed analysis function in GRASS. With this function, it is possible to perform analysis based on single observer location. My aim is to add output of each single observer location into integrated viewshed output. Each output, i am going to flag with -b where o denotes non-visible while 1 denotes visible. Through a loop of observer locations, output of viewshed of each location can be integrated with r.mapcalc function. After integration, values = 0 in the rater map dentoes non-visible areas and value >= 1 denotes visible areas. Python code in GRASS for r.viewshed is ok. Under the loop of observer locations how to use r.mapcalc function with each viewshed adding? After getting the integrated viewshed raster, i need to extract its boundary depicting visible area in vector format. How to do that in GRASS? Any idea for this integrated analysis is highly appreciated. If the integrated output is intoutput, can i use a code like this. in the loop if i=0 -> r.mapcalc 'intoutput = viewshedoutput' if i > 1 -> r.mapcalc 'intoutput = viewshedoutput + intoutput'


title: How to determine the centroid of polygons?

text: I have a polygon vector and I want to quickly attain the centroid of this polygon for insertion in a text document. I am working with QGIS. I searched through other questions and although some are somewhat close they don't quite answer my question. Ideally, the centroid coordinates would be in the attribute table of the polygon and I could just copy and paste the coordinates. I don't want to have to create a separate point vector file that represents the centroid and then find these coordinates and copy and paste them.


title: Describing weather data in ArcMap area solar radiation analysis

text: I am writing up the methodology of the analysis I did on solar radiation availability for a city. I used the tool 'area solar radiation' with ArcMap 10, using the time configuration 'TimeWholeYear(2008)' and latitude 51. Now I want to write a short paragraph about the weather data used in this analysis (i.e. type of data, data source, etc.) but I cannot find anything about it on the GIS help. Does anyone have any ideas of where to find a description of the weather data used in ArcMap? Thanks and happy new year!


title: how to create CF-compliant NetCDF from ESRI Grid?

text: been trying to make a CF-compliant netCDF file from an ESRI Grid. I want to serve it w/the THREDDS server. Been using `gdal_translate`. I know the `netcdf` output option is definitely not CF compliant, so I've been using the `GMT` output option. This doesn't seem to be functioning properly w/in THREDDS, so I'm guessing that's not CF-compliant either. As an aside, I'm trying to validate the CF-compliance of my GMT-type netcdf. Been waiting for a really long time for it to load up to http://puma.nerc.ac.uk/cgi-bin/cf-checker.pl. In the meantime, trying to set up the cf-checker.py script but dependencies on deprecated CDAT libraries is making that a pain. Anybody got a cleaner way to do this? \---EDIT--- ncdump of my GMT-conforming NetCDF file. Seems odd that I have "x_range" and "y_range" but no "x" or "y". Also seems like I'm providing almost no metadata via this process--making CF compliance seem unlikely to me...               netcdf E:/software/apache-tomcat-6.0.39/content/thredds/public/wk_gmt/wk_awc/al.nc {       dimensions:         side = 2;         xysize = 1902411900;       variables:         double x_range(side=2);           :units = "meters";              double y_range(side=2);           :units = "meters";              double z_range(side=2);           :units = "meters";              double spacing(side=2);              int dimension(side=2);              float z(xysize=1902411900);           :scale_factor = 1.0; // double           :add_offset = 0.0; // double           :node_offset = 1; // int            // global attributes:       :title = "";       :source = "";     }      \---EDIT # 2--- Just a little more content to show the difference in the NetCDF files produced by gdal vs. ESRI based on comment from @mdsumner. I totally agree that gdal should be doing it right. Quite possible I'm not using the tool correctly (`gdal_translate -ot Float32 -of NetCDF ${in} ${out}` in my shell script, fwiw). As @signell notes below, the ESRI output ain't perfect, but it seems closer to CF compliance...the following is the ncdump of the file created from a *.nc from the same ESRI Grid. This file was created using ESRI's `Raster to NetCDF`.               netcdf E:/software/apache-tomcat-6.0.39/content/thredds/public/wk_esri/wk_awc/al.nc {       dimensions:         x = 11334;         y = 18650;       variables:         double x(x=11334);           :long_name = "x coordinate of projection";           :standard_name = "projection_x_coordinate";           :units = "Meter";              double y(y=18650);           :long_name = "y coordinate of projection";           :standard_name = "projection_y_coordinate";           :units = "Meter";              float awc(y=18650, x=11334);           :long_name = "awc";           :esri_pe_string = "PROJCS[\"NAD_1983_Albers\",GEOGCS[\"GCS_North_American_1983\",DATUM[\"D_North_American_1983\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Albers\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-96.0],PARAMETER[\"Standard_Parallel_1\",29.5],PARAMETER[\"Standard_Parallel_2\",45.5],PARAMETER[\"Latitude_Of_Origin\",23.0],UNIT[\"Meter\",1.0]]";           :coordinates = "x y";           :grid_mapping = "albers_conical_equal_area";           :units = "Meter";           :missing_value = -3.4028235E38f; // float              int albers_conical_equal_area;           :grid_mapping_name = "albers_conical_equal_area";           :longitude_of_central_meridian = -96.0; // double           :latitude_of_projection_origin = 23.0; // double           :false_easting = 0.0; // double           :false_northing = 0.0; // double           :standard_parallel = 29.5, 45.5; // double            // global attributes:       :Conventions = "CF-1.0";       :Source_Software = "Esri ArcGIS";     }


title: How to Split a vector file into several different files using a Grid in QGIS?

text: I have a shapefile containing contour for a large area, and I want to split it into different shapefiles each covering a 1KM X 1KM area. I have already created the required Grid shapefile in QGIS. How do I now split the contours using the created Grid? I am searching for something equivalent to the Split Tool in ArcGIS.


title: Extract city boundary from TIGER data

text: I'm trying to find the bounding box of US cities but I just can't seem to figure out what to do with the TIGER data I download (not to mention, which data to download!). Could someone experienced with TIGER data (or shapefile) help me with this? How do I read/extract TIGER data to grab bounding box of cities? Trying to find lat/lon points that bound the city. Thanks in advance! EDIT: Sorry for the ambiguous question. Basically, what I want to extract are coordinates of each bounding box for ALL US cities. For example: New York (12.123,34.345),(12.456,34.678),..etc Boston (11.111,22.222),(11.123,22.234),..etc ...etc (for all cities in the US) I'm asking for this because I have a lot of coordinates that needs to be categorized (or reverse-geocoded) into cities, like (A,B) -> City A; (C,D) -> City B; etc. I can't use Google's geocoding feature because they only allow up to 5000ish requests per day per IP address, and I have millions of coordinates. I've tried installing OpenStreetMap data and running reverse- geocoding on my machine, but was turned off by the inaccuracy of results. Hopefully this made sense!


title: What are some ways to put points on a map and information about those points in a sidebar?

text:
I'm trying to figure out the best way to have a sidebar that will have information about points on a map (like you see in something like yelp). I can get the points on the map but I'm struggling to figure out the best way to get information about those points on a sidebar. The idea being that the user would click on a point or a sidebar item and the corresponding point/item would light up or open. This is basically along the lines of what I'm thinking: http://mick.github.io/jekyllmap/ (this uses a ruby framework and I'm trying to do this with just JS) Like I said I'm able to get the leaflet map up. Just trying to get the sidebar items to also append.               // Trying sidebar stuff          /*     var sidebarList = $('div.list-group-container')     $.each(hikes.features, function(i, feature)     {         var li = $('<button>')             .addClass('list-group-item')             .append("Location: " + feature.properties.Location + "
")             .appendTo(sidebarList);              // experiment              var details = $('
')             .addClass('details')             .append("Date: " + feature.properties.Date + "
" +                       "Location: " + feature.properties.Location + "
" +                       "Terrain: " + feature.properties.Terrain + "
" +                        "Difficulty: " + feature.properties.Difficulty + "

")             .appendTo(sidebarList);          });     */               var hikes = L.geoJson(null, {              onEachFeature: function (feature, layer) {             var myLayer = layer;                  myLayer.bindPopup("
Date:
" + feature.properties.Date + "
Location:
" +              feature.properties.Location + "
Terrain:
" + feature.properties.Terrain +              "
Difficulty:
" + feature.properties.Difficulty,             {maxWidth: 300, minWidth: 100, maxHeight: 160, closeButton: true,showOnMouseOver: true});                  return myLayer;         }     });     $.getJSON("data/hikes.geojson", function (data) {         hikes.addData(data);     });           map = L.map("map", {         zoom: 9,         center: new L.LatLng(17.059417, -96.721622),         layers: [mapquestOSM,hikes] //[mapquestOSM, boroughs, subwayLines, churchs]     });      Relevant HTML (just in case):

 Layers

 Help

                                     Hikes

                                             <input checked id="hikes" name=                                             "overlayLayers" type="checkbox">                                             Hikes

                                     Map Type

                                             <input checked id="mapquestOSM"                                             name="basemapLayers" type="radio">                                             Political

                                             <input id="mapquestOAM" name=                                             "basemapLayers" type="radio">                                             Satellite

                                             <input id="mapquestHYB" name=                                             "basemapLayers" type="radio"> Híbrido                                             (Ruas + Satélite)


title: How can I add grid lines to a print composition using pyqgis?

text: I'm writing a qgis plugin to create an image in the print composer of the current map. I can get the map rendered in the proper place with a frame of the right width, and I can get grid annotations rendered in the proper places and orientation, but I can't get the actual grid lines to render. Here is the code I'm using:               def createImage(self):         # Initialize the composition object.         mapRenderer = self.iface.mapCanvas().mapRenderer()         composition = QgsComposition(mapRenderer)         composition.setPlotStyle(QgsComposition.Print)         composition.setPaperSize(483, 330)         composition.setPrintResolution(300)              # Initialize the map object.  Allow a top margin of 10mm, a bottom         # margin of 50mm, a left margin of 10mm, and a right margin of 10mm.         mapOriginXMm = 10         mapOriginYMm = 10         mapWidthMm = 483 - 10 -10         mapHeightMm = 330 - 10 - 50         composerMap = QgsComposerMap(composition, \                                          mapOriginXMm, \                                          mapOriginYMm, \                                          mapWidthMm, \                                          mapHeightMm)         composition.addItem(composerMap)              # Create the frame around the map.         composerMap.setFrameEnabled(1)         pen = QPen()         pen.setWidth(0.2)         pen.setJoinStyle(Qt.MiterJoin)         composerMap.setPen(pen)              # Initialize the image object.         dpi = 300         dpmm = dpi / 25.4         paperWidthPixels = int(dpmm * composition.paperWidth())         paperHeightPixels = int(dpmm * composition.paperHeight())         image = QImage(QSize(paperWidthPixels, paperHeightPixels), \                            QImage.Format_ARGB32)         image.setDotsPerMeterX(dpmm * 1000)         image.setDotsPerMeterY(dpmm * 1000)         image.fill(0)              # Create the map grid.         composerMap.setGridEnabled(True)         composerMap.setGridIntervalX(500)         composerMap.setGridIntervalY(500)         composerMap.setShowGridAnnotation(True)         composerMap.setGridAnnotationPrecision(0)         composerMap.setGridStyle(QgsComposerMap.Solid)              # Top         composerMap.setGridAnnotationPosition(QgsComposerMap.OutsideMapFrame, \                                                   QgsComposerMap.Top)         composerMap.setGridAnnotationDirection(QgsComposerMap.Horizontal, \                                                    QgsComposerMap.Top)         # Bottom         composerMap.setGridAnnotationPosition(QgsComposerMap.OutsideMapFrame, \                                                   QgsComposerMap.Bottom)         composerMap.setGridAnnotationDirection(QgsComposerMap.Horizontal, \                                                    QgsComposerMap.Bottom)              # Left         composerMap.setGridAnnotationPosition(QgsComposerMap.OutsideMapFrame, \                                                   QgsComposerMap.Left)         composerMap.setGridAnnotationDirection(QgsComposerMap.Vertical, \                                                    QgsComposerMap.Left)              # Right         composerMap.setGridAnnotationPosition(QgsComposerMap.OutsideMapFrame, \                                                   QgsComposerMap.Right)         composerMap.setGridAnnotationDirection(QgsComposerMap.Vertical, \                                                    QgsComposerMap.Right)              composerMap.setAnnotationFrameDistance(1)         composerMap.setGridPenWidth(5.0)         composerMap.setGridPenColor(QColor(0, 0, 0))         composerMap.setAnnotationFontColor(QColor(0, 0, 0))         composerMap.setGridBlendMode(QPainter.CompositionMode_DestinationOver)              # Do the rendering.         imagePainter = QPainter(image)         paperRectMm = QRectF(0, \                                  0, \                                  composition.paperWidth(), \                                  composition.paperHeight())         paperRectPixels = QRectF(0, 0, paperWidthPixels, paperHeightPixels)         composition.render(imagePainter, paperRectPixels, paperRectMm)         imagePainter.end()              image.save("/opt/tmpPhotos/test.tif", "tif")      Can anyone tell me what I'm missing?


title: PostGIS interpolation / triangulation options

text: I'm looking for an open source workflow to automate DEM construction. We have a series of sites that fall within a LIDAR dataset. We want to create site specific DEM's for each site, and we're looking to automate the process. So far, we have automated:   * data loading into PostGIS (LIDAR and site points)   * creation of site boundaries (combination of st_buffer and st_envelope) Now we're looking for options to interpolate the data subsets at each site and export them to Surfer7 grid files. Currently, we're querying the data in the PostGIS database using QuantumGIS, exporting to csv files, then manually importing and gridding the data in Surfer7. Hopefully we can automate this as well. So for this use case, we'd like to triangulate our lidar data to a DEM. Other potential cases we can think of involve different interpolation methods - so if there are options for inverse distance and kriging - we're interested! This is very much a learning exercise for us - we're working in baby steps!


title: Openlayers layer hide javascript menu

text: I have java-script menu that is getting behind openlayers OSM layer (only after it loads). I've tried giving z-index:9999 to the menu div but it didn't work. Any idea ? ![enter image description here](http://i.stack.imgur.com/5mmUE.png)


title: Geometry Transformation in Spatialite 4.1.1

text: I am trying to transform a geometry (geo referenced to Australia) > POLYGON((-33.917172 151.110971,-33.916443 151.112495,-33.917637 > 151.113276,-33.917783 151.111512,-33.917253 151.111577,-33.917172 > 151.110971)) from SRID 4326 to 3112 using the following query:               SELECT AsText(Transform(PolygonFromText('POLYGON((-33.917172 151.110971,-33.916443 151.112495,-33.917637 151.113276,-33.917783 151.111512,-33.917253 151.111577,-33.917172 151.110971))',4326),3112)) as result      in SpatiaLite GUI 1.7.1 with SpatiaLite 4.1.1 with all GEOS,PROJ extensions enabled but the resulting geometry is > POLYGON((Inf Inf, Inf Inf, Inf Inf, Inf Inf, Inf Inf, Inf Inf)) Why is this happening?


title: Tool for converting .shp file to .tab file?

text: I am searching for any free tool which can convert ShapeFile (.shp) to MapInfo (.tab) file.


title: Qgis analysis on polygon

text: I have a data table mapped and the table also contains further information of interest, beyond the lat/long of the specific data points.   1. I want to be able to draw a polygon and then simply have a count of records included in the area and also the sum of one of the other columns. This is likely a trivial task, but I'm very new with little time for this project.   2. if get the above figure out, what is the best way to save a 'scenario' (the polygon area drawn and the results) so that I can experiment with differ scenarios?


title: How to add multiple shapefiles with VB.Net

text: I have created a toolbar add in for arc with a button that opens a form with 3 selections that are shapefiles, once the shapefile is selected I click the Add Layer button. Currently I can only get one shapefile at a time, unless I duplicate the code for each shp and once I do add the one shapefile it keeps on adding it. Here's the code I have so far:               Public Function AddLayers()             Dim pMxDoc As IMxDocument             Dim pMap As IMap             Dim pWorkspaceFactory As IWorkspaceFactory             Dim pFeatureWorkspace As IFeatureWorkspace             Dim pFeatureLayer As IFeatureLayer             Dim pFeatureClass As IFeatureClass             ' Specify the workspace and the feature class.             pWorkspaceFactory = New ShapefileWorkspaceFactory             pFeatureWorkspace = pWorkspaceFactory.OpenFromFile("E:\Customization\Data\Cities", 0)             pFeatureClass = pFeatureWorkspace.OpenFeatureClass("Cities")             ' Prepare a feature layer.             pFeatureLayer = New FeatureLayer             pFeatureLayer.FeatureClass = pFeatureClass             pFeatureLayer.Name = pFeatureLayer.FeatureClass.AliasName             ' Add the feature layer to the active map.             pMxDoc = My.ArcMap.Application.Document             pMap = pMxDoc.FocusMap             pMap.AddLayer(pFeatureLayer)             ' Refresh the active view.             pMxDoc.ActiveView.Refresh()             Return AddLayers()     End Function


title: CartoDB Density View

text: Is the Density View for CartoDB no longer working? I have looked at three datasets on multiple accounts, and none of them are working correctly. They show only 1 bucket color, no matter the density. The CSS is only generating one grouping for the point density, so obviously it is not generating the correct CSS. I can manually manipulate it (the CSS), but requires a lot of fine tuning to find the right grouping! If anyone knows something I could be doing wrong, please tell me!


title: overview map with sharpmap

text: I'm using Sharpmap to create a GIS application. I'm trying to get a small overview map on top of my map so it gives an idea what part of the map is being viewed. Is there a simple/implemented way of doing this? Or do I need to add another map and interact with this map on every change? Just need a push in the right direction. Thank you in advanced!


title: Select by Attributes based on SQL wildcard range

text: I want to select all the records from a geodatabase table where the string starts with a letter, so I tried               SELECT *     FROM tbl_names     WHERE "name" LIKE '[A-Z]%'      This returned no records. After some searching, I found that this is SQL Server syntax. I didn't think this would be a problem though, as far as I know all versions of SQL support `%`. After going through the help file on building a query expression, I saw that the correct syntax is               SELECT *     FROM tbl_names     WHERE "name" >= 'A'      As the names are all strings, my first instinct was to try `LIKE`. Why is the `>=` operator used instead of `LIKE`? Are wildcard ranges not supported in ArcMap?


title: Help with ArcObjects language to open or access a shapefile?

text: I am writing a program with a dialog box that when they click on the map button a shapefile will open. I wrote a program that opened a map document is it the same language as that is. Which is the following : Dim pDoc As IDocument Dim pApp As IApplication Set pDoc = New MxDocument Set pApp = pDoc.Parent Please help!


title: WebMap that automatically links to Google Drive Spreadsheet

text: I would like to create a webmap from a contacts spreadsheet stored in Google Drive that will update the map automatically when new data is added to the spreadsheet. I know I can do this with an ArcGIS Online Organisation subscription, but are there any other ways?? Any help, much appreciated! Regards


title: AddJoin_management crashes ArcMap

text: I am going to be using an AddJoin_management command in a python script at the end of several loops. To test, I used the AddJoin tool and use the below command in the Python window and made the parameters identical to what the code is(the parameters are correct for what I want to accomplish). When I run the AddJoin it crunches numbers for a while and then the whole program crashes and asks if I would like to send an error report.               arcpy.AddJoin_management("SignsToFinish", "SignID", "NewSigns", "sid", "KEEP_ALL")      That is the statement that is being used in both the script and in the AddJoin tool. Why does this cause ArcMap to crash? Any ideas?


title: Append operation in ArcGIS

text: I have 250 road shape files, I have to append all the 250 shape file into one single file. I have used ArcGIS append tool for combine layers (if number of shape files are minimum), but these 250 shapes files take time as well as confuse me while selecting in ArcGIS append window, is there any other method in which I can append these 250 shape files easily.


title: Data loads with preset symbology in ArcMap

text: I have a set of points in a file gdb. When I load them in ArcMap or ArcCatalog, the data displays with unique value symbology based on a field rather than "single symbol". How do I get the data to load with single symbol by default?


title: Where did the polygons go after projecting a map in QGIS?

text: I'm fairly new at GIS know-how, but I've run into a problem with a projection of a world map. I have a shapefile of all countries I downloaded from Natural Earth. After projecting it into a orthographic as suggested in this other question, I changed the lat/long so that the Atlantic would be somewhat in the center. However, after changing it, the United States, Mexico and Canada disappear from the map, as you can see here: ![enter image description here](http://i.stack.imgur.com/goqtM.png) When I reproject the map to a long over the US, the polygons appear again. Any suggestions?


title: Python ogr: why is GetFeatureCount() so slow?

text: I did some profiling for a program I wrote and discovered that ogr's layer.GetFeatureCount() is significantly slower than just using python's BIF `len()`. Here are my test results               def test():             import ogr             b_path = r'/../...'             bounds =  r'%s/bounds' % b_path             province =  glob.glob(r'%s/*.shp' % (bounds,))[0]             driver = ogr.GetDriverByName('ESRI Shapefile')             admin_shp = driver.Open(province,0)             l = admin_shp.GetLayer(0)             lc = l.GetFeatureCount() # first round             lc = len(l)              # second round                    if __name__ == '__main__':         import timeit         print(timeit.timeit("test()", setup="from __main__ import test"))      first round               228.255430937      second round               124.03532505      Can somebody explain why this is?


title: How to register onclick handler for *all* KML feaures in OpenLayers?

text: I'm a newbie using OpenLayers with JQuery to display vector data from KML files. I'm creating the layer like this:               newlayer = new OpenLayers.Layer.Vector( layerid, {         projection: MAPVAR.displayProjection,         strategies: [new OpenLayers.Strategy.Fixed()],         protocol: new OpenLayers.Protocol.HTTP({             url: layerurl,             format: new OpenLayers.Format.KML({                 extractStyles: true,                  extractAttributes: true,                 maxDepth: 2             })           })          });      I want to avoid using these vector features with the OpenLayers.Control.SelectFeature control. Instead i would like to have each svg feature respond to a click event and pop open their own individual windows with the attributes. I'm having trouble figuring out how to add the onclick function to **ALL** the vector features loaded. For example, I can attache a function to the KML layer's "loadend" event and add the onclick function doing the following:               $('g[id$=vroot] > *').css("cursor", "pointer")     $('g[id$=vroot] > *').click(function(evt){ $w = $.WM_open(); $w.find('.windowcontent').append("SUCKER"); });      But this will only apply the handler to those vector elements in the view extent and not the ones that are waiting to be rendered in the HTML. I'm not sure how to access the unrendered ones -- they are in the DOM. I've come up with really stupid stupid work around to this problem, but I know there has to be a better way. Is there some way I can dynamically create the "onclick" handler for each svg feature when they are getting parsed? Would that require me to subclass OpenLayers.Layers.Vector or OpenLayers.Formats.KML? Does anyone have an example? Or recommendation on other ways? thx mazery * * * I still have not solved adding the onclick handler to the features. But i was able to override OpenLayers.Format.KML parseData() to add a pointer cursor to the feature styles before the loadend runs on the KML layer (additions demarcated with *** EDITS *** ).               var FormatErmaKml = OpenLayers.Class(OpenLayers.Format.KML, {      parseData: function (data, b) {          typeof data == "string" && (data = OpenLayers.Format.XML.prototype.read.apply(this, [data]));         for (var c = ["Link", "NetworkLink", "Style", "StyleMap", "Placemark"], d = 0, e = c.length; d < e; ++d) {             var f = c[d];             var g = this.getElementsByTagNameNS(data, "*", f);               if (g.length != 0) switch (f.toLowerCase()) {             case "link":             case "networklink":                 this.parseLinks(g, b);                   break;             case "style":                 this.extractStyles && this.parseStyles(g, b);                   break;             case "stylemap":                 this.extractStyles && this.parseStyleMaps(g, b);                   break;             case "placemark":                 this.parseFeatures(g, b)             }                  }             **** EDITS BEGIN ****         for(var count = 0; count < this.features.length; ++count){                 f = this.features[count];                 f.style.cursor = "pointer";         }         **** END EDITS ****         return this.features     },});      Any ideas on adding the onclick handler for each feature are welcomed. thx mazery


title: With ArcObjects, distinguish between Save Edits with and without closing the current edit session

text: Is it possible with ArcObjects to distinguish between the user selecting the Save Edits button and the users selecting the Stop Editing button and then saving edits? The reason for this is that in the IEditEvents.OnStartEditing event I am acquiring references to certain tables based on the current editor workspace. These tables are used to acquire configuration parameters for an ArcMap extension and for other purposes throughout the edit session. When the edit session is closed, I clear the references to those tables and arrays generated from those tables. The issue this has created is that when the user selects "Save Edits", IEditEvents.OnStopEditing is called followed by IEditEvents.OnStartEditing. Essentially, ArcMap is starting a new edit session. Thus, the work done during the OnStartEditing event is rerun, even though the user hasn't ended the current edit session. There is some overhead to that work that I would like to avoid if possible. I have a workaround involving setting a shared property to the current edit workspace on the StopEditing event, and comparing that property to the new edit workspace on the StartEdting event. If they are the same then I know the edit workspace hasn't changed and I don't need to rerun the work to get table references and so forth. It seems a little messy though. I recall reading something about this at one point but can find no discussion regarding it on this forum or ESRI's.


title: How do I install Orfeo toolbox and Qgis 1.9?

text: I'm having a lot of trouble getting Orfeo toolbox and Qgis 2.0 working. I followed the qgis wiki instructios, added the ppa, installed qgis 1.9 (it's beautiful, great work!). But when i tried to install the otblib from the ubuntugis repositories, it forces an uninstall of Qgis. Any ideas ? My system is linux mint 15. Thanks


title: ArcGIS JSAPI - web workers CORS issue

text: In my JS web-application, I'm trying to store the tiles in my localstorage using web workers.   I'm using the code from this Esri sample. I just deleted line 20 in the ioWorker.js file:                url = "/arcgisserver/apis/javascript/proxy/proxy.ashx?" + url;      But when the web worker requests a tile, I get those three errors: ![Error](http://i.stack.imgur.com/Kfm5Y.jpg)   On my side, CORS should be working fine. Is this a problem on Esri's side or have i got something wrong?      edit: Or is it not possible only with CORS, do I need a proxy-page?


title: Understanding the polygon handler function in Openlayers

text: Using openlayers, I want to be able to draw one polygon on a map. After one polygon is drawn, I want an event to fire that stops any more from being drawn until a button is pressed. My current code allows the user to draw more than one polygon and I'm trying to figure out how to limit it. This is my current code:               // Add drawing layer      analysisLayer = new OpenLayers.Layer.Vector("analysisLayer");        map.addLayer(analysisLayer);          // add polygon drawing control     polygon = new OpenLayers.Control.DrawFeature(analysisLayer, OpenLayers.Handler.Polygon);     map.addControl(polygon);      What I tried doing was adding a callback to the `Control.DrawFeature` function as follows:               // add polygon drawing control     polygon = new OpenLayers.Control.DrawFeature(         analysisLayer,          OpenLayers.Handler.Polygon, {callbacks: { "finalize" : function(){alert('poly made')} } } );         map.addControl(polygon);      This does not work, but it does not give me an error. I'm not sure how exactly to structure this function. I did find the function finalize in the documentation which is what I thought I needed, but I'm also not sure how to structure the `callback`. **EDIT:** I'm starting to understand how these callbacks work. For example this detects that a feature has been added (using @Vadim's advice):               // detect polygon events      function newPolygonAdded (evt) {             alert('Polygon completed');             polygon.deactivate(); //stops the drawing         }             // add polygon drawing control     polygon = new OpenLayers.Control.DrawFeature(analysisLayer, OpenLayers.Handler.Polygon,                                  {eventListeners:{"featureadded": newPolygonAdded}});                                                 map.addControl(polygon);      What I still don't understand is how to limit the drawing layer from allowing more polygons to be drawn.


title: How to find and replace all null values in multiple columns?

text: To find and replace all null values in a specific column I am using:               case when "myColumn" is NULL then '99999999' else "myColumn" end      But how can I use the QGIS calculator to find and replace all null values in the multiple columns?


title: How to get a slippy map from OziExplorer .map and .png tiles?

text: I have a bunch of topographic maps in the format of .map files and 4000x4000px png files.I would like to view them as a slippy map and be able to select an area and export that as one big image. I am wondering what my options are. QGis would be nice, or Mobile Atlas Creator, which supports local tiles as source for the following formats: OSMTracker, AndNav, BackCountry Navigator, Maverick and OSMAND. It would be nice if at some time I could convert them to something more standard, like 256px tiles under a coordinate dir structure, or mbtiles so I could view it with tilemill or their server or map on a stick software. So what are my options to getting these files to open in some slippy map way and being able to export specific areas as images. I don't care what formats I have to convert to or which software/servers I have to install.


title: Get coordinates from polygon outline with greatest distance

text: I'm looking into a task in ArcGIS 10.2 of which I need to discover the two points on a polygon outline where they would be at the greatest distance from each other. I have looked at ET Geowizards center-line (then extract end nodes) but it doesn't work as the polygon being so narrow seems to confuse ET so the centerline doesn't reach the "tips". See the image below, the orange dots indicate the points I need. The polygons are always this shape, i.e. long, slim geomtries ![enter image description here](http://i.stack.imgur.com/qGvGP.png) I would need to do this for 500 or so polygons so I need something fairly quick. I looked at using the near tool to loop through a point set for each polygon but it takes too long due to multiple calls of the GP tool. My other thought is, using Python, use the geometery object to go through a point set for each polygon looping through all the possible pairings of vertices to find the pair that are the furthest distance. Any thoughts? I have full licenses of ET, ArcGIS Advanced and Spatial Analyst. Also can do a Python or .NET solution. Many thanks


title: DBF write support in Ruby

text: this is repost of the same question on Stackoverflow where I got no answers so far http://stackoverflow.com/questions/5687130/how-to-write-into-dbase-tables- using-ruby-on-osx So, from OSX(Lion) using Ruby(1.9.x), I am trying to update data from an ESRI Shapefile. I didn't find any gem with dbf write support or at least some ODBC driver that I can use on OSX.


title: Math module VS PostGIS

text: I have a simple (and maybe stupid) question for you today. I have to compute intersection points between GIS polygons and imaginary lines I draw thanks to a script of mine... And I wonder if it would be relevant to use PostGIS instead of a Math module to catch intersection points. Thank you. EDIT: by math module (or library) I think about a mathematic module as I work on a Python script. So that is a "python math module".


title: ArcSDE installation with PostgreSQL (error - 1015)

text: I am trying to install ArcSDE for Postgresql on CentOS 5.5 in i686 architecture. I have successfully installed and configured Postgresql. I did SDE pre-installation and as ArcSDE user, run the ArcSDE 10 installation script that went well without any error. During post-installation, while running $SDEHOME/bin/sdesetup, I am getting error 1015. The log file is showing SDE DBMS Error and is unable to install ST_GEOMETRY. I can see that st_geometry.so is created in /sdeexe100/pg841_st_lib/ directory. I am confused if I missed something during installation/configuration process or if I have to copy st_geometry.so file somewhere else for the installation. I have attached my log file. Any help is highly appreciated! Mukesh


title: .Net Solution Structure for ArcObjects and Geodatabase programming

text: OK - I understand that this is a bit subjective - but you're the best community forum I've got! So, we are talking about starting a fresh customisation for ArcGIS or a Windows app using Engine. I often become a little perplexed when trying to create nice clean layers of abstraction between my GUI, business objects and data access layer (geodatabase access). It often works out like something below: ![enter image description here](http://i.stack.imgur.com/o9fbs.png)   * The **PresentationLayer** makes calls in BusinessLayer to get data from database and give back wrapped up in some form of business object - it is never a ValueObject straight fresh from the database.   * In **BusinessLayer** \- I have all my business logic that accesses DataLayer for data from the geodatabase (it gets back data from the geodatabase via ValueObjects - DataLayer also uses this assembly).   * In **ValueObjects** assembly, this is just a set of objects that map directly to SDE tables and do nothing else.   * **Core** is where the program starts and shows forms etc.   * **Common** is just a place to put things that are useful to use here and there, usually static methods etc. Does this look sane? How do you structure your solutions?


title: Is it possible to retrieve thematic layer information for a Layer in Mapbasic?

text: I found this code                windowinfo(FrontWindow(), WIN_INFO_CLONEWINDOW)      This function gives information (mapbasic) about the front Map window which can be used to regenerate the map. > Is there any function in mapbasic 10.0 function that gives code that can be > used to generate a thematic layer.


title: How to retrieve the value of a cell in RasterLite?

text: Just wanting to know the SQL statement needed to find out the pixel value for a location, when the raster is loaded into SpatialLite as a Raster? I loaded the Raster using rasterlite_load -d db.sqlite -T myRaster -f c:\mytest.tif All seems fine... but how would I find the value for a cell at say (100,400)? Thanks Phil


title: Generating Tiles for Non Geographic Datasets

text: Excuse my ignorance if this exists. I don't think I've seen a website ever using something like this. Have tools been developed that use general tiling methodology to implement non-geographical data sets? A line graph for instance - say, stock price, climate, or, seismographs? If the measurement frequency is high, these data sets can become extremely dense. Which can be bandwidth intensive when transferring to the client. Tools like Mapnik and Tile Map Services have solved this for cartographers. You feed these programs data & styles, and they render and serve thousands (millions) of PNGs, which eventually get stitched together on a web slippy map. This would effectively be a replacement for something like HighCharts, or DyGraphs. What I'd love is a command line tool that I feed SQL, colors, fonts, zoom levels, etc, and it generates all graph tiles at all desired zoom levels.


title: Creating Store in GeoServer using ImageMosaic Plugin gives Error?

text: I am creating a GeoServer 2.4.1 store with GeoTiffs using the Image Mosaic Plugin and I get the following error when pressing the button               Could not list layers for this store, an error occurred retrieving them:      Failed to create reader from file://C:\Geoserver Rasters\GeoTiffs\ and hints null      The Shape File describing the GeoTiffs IS Created in the directory. I have tied with a single GeoTiff as well as multile files, same error. I CAN create a store with the single tif file using the GEOTIFF Raster Data Store successfully but when using the ImageMosaic Plugin, it fails Is there a problem with the file? How to I get these GeoTiff Files to display? GDALINFO Reports the following on the single test file:                       Driver: GTiff/GeoTIFF             Files: originals\200k--e51-32_clip.tif                originals\200k--e51-32_clip.aux                originals\200k--e51-32_Clip.rrd                originals\200k--e51-32_clip.tif.aux.xml             Size is 4203, 2906             Coordinate System is:             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"]]             Origin = (120.999860000000000,16.666795000000000)             Pixel Size = (0.000237994587000,-0.000229480662000)             Metadata:              AREA_OR_POINT=Area              TIFFTAG_RESOLUTIONUNIT=1 (unitless)              TIFFTAG_SOFTWARE=IMAGINE TIFF Support             Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved             @(#)$RCSfile: etif.c $ $Revision: 1.10.1.9.1.9.2.11 $ $Date: 2004/09/15 18:42:01             EDT $              TIFFTAG_XRESOLUTION=1              TIFFTAG_YRESOLUTION=1              Image Structure Metadata:              INTERLEAVE=BAND              Corner Coordinates:             Upper Left  ( 120.9998600,  16.6667950) (120d59'59.50"E, 16d40' 0.46"N)             Lower Left  ( 120.9998600,  15.9999242) (120d59'59.50"E, 15d59'59.73"N)             Upper Right ( 122.0001512,  16.6667950) (122d 0' 0.54"E, 16d40' 0.46"N)             Lower Right ( 122.0001512,  15.9999242) (122d 0' 0.54"E, 15d59'59.73"N)             Center      ( 121.5000056,  16.3333596) (121d30' 0.02"E, 16d20' 0.09"N)             Band 1 Block=64x64 Type=Byte, ColorInterp=Palette               Overviews: 1051x727, 526x364, 263x182, 132x91, 66x46               Color Table (RGB with 256 entries)             0: 212,215,170,255             1: 208,210,150,255             2: 215,181,155,255             3: 185,207,146,255             4: 150,150,153,255             5: 38,102,155,255             6: 113,108,44,255             7: 243,220,212,255             8: 112,78,41,255             9: 143,78,43,255             10: 138,103,44,255             11: 175,112,77,255             12: 240,215,181,255             13: 112,108,74,255             14: 171,136,80,255             15: 28,87,93,255             16: 111,112,111,255             17: 182,211,178,255             18: 187,255,185,255             19: 112,216,248,255             20: 76,77,75,255             21: 110,43,7,255             22: 109,75,13,255             23: 185,251,207,255             24: 177,255,254,255             25: 2,1,0,255             26: 181,153,143,255             27: 90,179,223,255             28: 43,43,41,255             29: 210,112,92,255             30: 151,170,109,255             31: 209,146,116,255             32: 78,43,5,255            33: 32,73,43,255            34: 146,173,145,255            35: 207,172,116,255            36: 248,81,11,255            37: 78,75,43,255            38: 143,119,110,255            39: 157,184,214,255            40: 180,212,209,255            41: 109,6,0,255            42: 79,74,9,255            43: 142,43,9,255            44: 177,116,106,255            45: 77,6,0,255            46: 112,139,111,255            47: 110,83,73,255            48: 177,77,45,255            49: 144,83,71,255            50: 145,178,178,255            51: 148,209,179,255            52: 116,136,74,255            53: 112,142,143,255            54: 77,107,77,255            55: 164,110,144,255            56: 141,73,14,255            57: 142,7,0,255            58: 11,45,91,255            59: 43,39,9,255            60: 113,176,145,255            61: 44,6,0,255            62: 175,107,49,255            63: 77,111,114,255            64: 178,82,72,255            65: 34,134,167,255            66: 139,219,251,255            67: 78,142,111,255            68: 143,48,37,255            69: 111,49,37,255            70: 144,210,214,255            71: 215,221,239,255            72: 241,210,152,255            73: 74,49,40,255            74: 114,178,182,255            75: 43,146,211,255            76: 141,136,50,255            77: 225,44,6,255            78: 180,216,242,255            79: 110,145,180,255            80: 79,141,145,255            81: 146,152,174,255            82: 175,42,9,255            83: 224,186,191,255            84: 80,104,42,255            85: 77,143,184,255            86: 211,238,153,255            87: 41,126,100,255            88: 11,38,10,255            89: 219,206,133,255            90: 109,103,16,255            91: 177,48,39,255            92: 207,141,82,255            93: 10,41,41,255            94: 72,82,109,255            95: 181,204,119,255            96: 146,206,148,255            97: 115,136,50,255            98: 177,7,0,255            99: 112,205,184,255           100: 242,221,239,255           101: 148,170,84,255           102: 178,72,13,255           103: 75,174,186,255           104: 111,172,116,255           105: 175,170,84,255           106: 76,138,81,255           107: 60,51,70,255           108: 241,146,132,255           109: 79,172,145,255           110: 174,152,172,255           111: 13,16,22,255           112: 252,128,26,255           113: 246,238,143,255           114: 82,103,15,255           115: 169,19,116,255           116: 104,85,103,255           117: 245,177,137,255           118: 140,103,16,255           119: 160,238,218,255           120: 185,238,167,255           121: 80,171,114,255           122: 248,134,78,255           123: 34,17,23,255           124: 166,238,186,255           125: 144,83,106,255           126: 207,172,83,255           127: 188,104,20,255           128: 197,82,103,255           129: 255,255,255,255           130: 251,175,74,255           131: 215,51,97,255           132: 143,16,20,255           133: 111,17,19,255           134: 117,170,83,255           135: 178,17,21,255           136: 77,17,19,255           137: 37,121,64,255           138: 221,255,204,255           139: 204,255,187,255           140: 204,255,204,255           141: 238,255,221,255           142: 255,255,238,255           143: 221,255,187,255           144: 238,255,204,255           145: 255,255,221,255           146: 62,171,90,255           147: 111,204,136,255           148: 69,192,236,255           149: 135,238,255,255           150: 221,255,221,255           151: 150,238,151,255           152: 153,238,255,255           153: 238,255,238,255           154: 255,255,204,255           155: 153,255,255,255           156: 44,198,174,255           157: 221,238,187,255           158: 238,255,255,255           159: 238,255,187,255           160: 221,255,238,255           161: 204,255,221,255           162: 194,187,136,255           163: 238,238,238,255           164: 238,238,204,255           165: 238,238,187,255           166: 170,170,119,255           167: 170,153,97,255           168: 187,170,119,255           169: 153,136,85,255           170: 221,238,170,255           171: 136,119,61,255           172: 221,221,221,255           173: 204,238,170,255           174: 153,153,102,255           175: 153,119,64,255           176: 193,170,136,255           177: 170,170,170,255           178: 221,238,204,255           179: 190,187,189,255           180: 204,255,170,255           181: 204,204,198,255           182: 255,238,238,255           183: 238,238,221,255           184: 136,136,68,255           185: 153,153,85,255           186: 202,238,187,255           187: 221,255,255,255           188: 170,170,102,255           189: 170,153,119,255           190: 170,136,102,255           191: 187,187,153,255           192: 153,119,85,255           193: 136,102,68,255           194: 191,187,118,255           195: 192,153,124,255           196: 136,136,85,255           197: 153,102,60,255           198: 187,153,99,255           199: 153,136,102,255           200: 168,187,119,255           201: 154,136,67,255           202: 130,119,85,255           203: 170,170,136,255           204: 168,187,136,255           205: 221,221,192,255           206: 255,238,221,255           207: 187,136,95,255           208: 255,255,0,255           209: 153,153,126,255           210: 134,153,85,255           211: 221,255,170,255           212: 204,255,238,255           213: 136,136,102,255           214: 187,170,102,255           215: 221,238,221,255           216: 255,238,204,255           217: 196,187,170,255           218: 136,102,89,255           219: 153,102,89,255           220: 255,255,186,255           221: 187,170,153,255           222: 238,238,170,255           223: 135,255,255,255           224: 170,170,153,255           225: 170,136,123,255           226: 136,136,131,255           227: 190,136,126,255           228: 225,204,196,255           229: 204,221,193,255           230: 153,136,125,255           231: 204,255,255,255           232: 165,187,153,255           233: 204,238,204,255           234: 133,153,102,255           235: 255,238,184,255           236: 170,187,170,255           237: 221,238,238,255           238: 195,170,170,255           239: 133,153,126,255           240: 199,221,221,255           241: 238,238,255,255           242: 197,238,221,255           243: 204,204,222,255           244: 165,187,187,255           245: 132,153,67,255           246: 170,170,189,255           247: 158,153,67,255           248: 255,238,255,255           249: 221,238,255,255           250: 198,238,238,255           251: 165,187,101,255           252: 238,255,169,255           253: 225,204,222,255           254: 190,169,188,255           255: 198,238,255,255


title: Calculate distance between two coordinates to use in variogram calculations in ordinary kriging

text: I need to calculate distance between two stations in a map in order to calculate empirical variogram in ordinary kriging to interpolate temperature data. Calculating distance in kriging using Euclidean distance formula between two points on XY axes, and I found that not sufficient because I specified Lag_units and Lag_distance in meters when I programmed kriging. Can I use the haversine formula to calculate distance between real coordinates instead of Euclidean distance?


title: Add new value combination to unique values, many fields symbology in Arc

text: We have a zoning layer symbolized with unique values, many fields. We use three layers and get a combination of 50 - 60 symbols, at a guess. How can I add a new symbol for a new combination of values in the three fields without undoing all the existing symbology and starting from scratch. Thanks. ArcGIS 10.0 sp1


title: How to Calculate Field to six digit number from another field concatenated with State Plane code in ArcPy?

text: I'm trying to calculate a field (Unique_ID) in arcpy that will bring in a six digit number from another field (Point_ID) in the table. I want to add the state plane code to the end of the Point_ID and have it calculate in the Unique_ID code. I tried copying it from a python snipped to get what I want and this is what it gave me.                arcpy.CalculateField_management("SMON","Unique_ID","!PointID!","PYTHON","")      I also have a string of all the state plane codes. I need to get the end of the state plane code added to the end of the PointID. ![enter image description here](http://i.stack.imgur.com/saAdl.png) New Code just trying the "!PointID!" ![enter image description here](http://i.stack.imgur.com/sac5a.png) Giving me this error: ERROR 000732: Input Table: Dataset SMON does not exist or is not supported Failed to execute (CalculateField). I set the environment to the database doing the calcs and ended up working for just the !PointID! part of the script. When I try to add ,+ "PointID!" + Con , it kicks back: ExecuteError: ERROR 000539: SyntaxError: unexpected EOF while parsing (, line 1)


title: Escaping spaces in paths for use in batch file

text: I am making a MapInfo program in MapBasic. I am calling OGR2OGR in order to convert some files. To do this I am generating a batch file and then running it. My code looks something like this:               RunStr = "OGR2OGR -f ""ESRI Shapefile"" """ & ExportFolder & "SHP\"" """ & TableFileName & """ -overwrite -skiperrors"     SHPMaker = ExportFolder & "SHPMaker.bat"          Open File SHPMaker       For Output       Access Write       As #1     Print #1, RunStr     Close File #1          Run Program SHPMaker      My problem is that ExportFolder and TableFileName can potentially include spaces. My questions is **how should I go about escaping spaces?** I have tried both adding carets (^) before the spaces and putting double quotes around the paths -neither works. The error I am getting is "Unable to open datasource 'GIS' with the following drivers", followed by a list of available drivers. Obviously it is picking up the "GIS" part from mid-way through the paths and treating it as the data source as you can see below. The generated BAT file looks something like this:               OGR2OGR -f "ESRI Shapefile" "S:\000 GIS Files\TEST WORKSPACE 2\convert test\Converted\SHP\" "S:\000 GIS Files\TEST WORKSPACE\SiteForm.TAB" -overwrite -skiperrors


title: Arcpy's replaceDataSource Error

text: I've checked the other answers here and none of the answers worked for me... It's a "simple" matter of finding a layer by name in a map and changing it's datasource. Here's my script:                   #-- New Source         newSource = os.path.join(currDir, lyrZones + "_Dep" + dirNum + ".shp")              #-- Validation         if arcpy.Exists(newSource):             print "The new source exists!"         else:             print "Not found!"              #-- Find the layer and change its source                     for lyr in arcpy.mapping.ListLayers(mxd):             if lyr.name == lyrZones:                 print "Layer found!"                 print layers.dataSource                 print "  Replacing source..."                 lyr.replaceDataSource(currDir, "SHAPEFILE_WORKSPACE", newSource)                 print lyr.dataSource      I run it from a python script outside ArcGIS. ![enter image description here](http://i.stack.imgur.com/d4LjO.png) You can see that the source exists, the layer is found, I can access it's datasource by printing it, but the lyr.replaceDataSource causes an error (Unexpected error... doesn't help much...) I've been working at it for 4-5 hours now and I'm short of solutions to try. Any idea what can cause the crash? Thanks!!


title: How to create text labels with background boxes?

text: I'm trying to create some custom labels for point features in a QGIS point vector layer, and I want to write a python plugin to do it. We need our labels to be presented with color tinted rectangles behind them (or else!). The labels are long strings, and are created using labeling engine expressions and conditionals. I thought the easiest way would be to let the user set up labels for the active layer the way they want, and then let my plugin can grab the label text from the features in the layer and use the text strings to create boxes. My problem is I can't find a way to access those text strings in the QGIS API. How are label strings generated by the labeling engine stored in QGIS and how can I get to them?


title: Django client install postgresql/postgis on Ubuntu 12.04

text: Does anyone know what apt packages one should install for a postgres(8.4)/postgis(1.5) django (1.4) **client** on ubuntu 12.04? All recipes seem to assume that I want to install the full postgres/postgis database server on the machine, but I have a external database server so I only want the packages that can connect to that. For a full server I use:               apt-get install binutils gdal-bin libproj-dev postgresql-8.4-postgis postgresql-server-dev-8.4 python-psycopg2 python-setuptools


title: Select By Attribute: Between Two Numbers

text: I am trying to select house numbers that are between 200 and 499. I've been using: `"HOUSE_" >= '200' AND "HOUSE_" <= '499'` ... and it's coming up with almost everything else. The numbers it does grab don't make sense at all either. I tried using a BETWEEN operator but that just gives me an error.


title: Why all WFS and WPS are CGI based?

text: Even though we have a lot of web technologies now, why are all WFS and WPS still cgi based? PHP allows tp read from postgres or other db's and HTML5Canvas or SVG can render the maps on the web. C++/Java Web Toolkits are available now which can talk to GDAL. But still, if we need a WPS, it uses cgi. Can anyone answer why?


title: Add memory layer to a preexisting PostGIS table

text: I'm trying to append a memory layer to a preexisting PostGIS table. The DB connection is already established (in this way: How to properly establish a PostgreSQL connection using QgsCredentials) and, based on a check done on a table, I generated a memory shp that can be easily added to the map canvas or "right-clicked and saved as" from the TOC. Here (unable to call shp2pgsql using python) I've found a way to accomplish this using **subprocess.Popen** or more simply, as suggested, using **os.system** to run a command in a subshell.               # Whitout adding it to the map canvas as follow:     # QgsMapLayerRegistry.instance().addMapLayer(mem_layer)     # I wanted to use shp2pgsql to append its records straight to a PostGIS table          os.system("shp2pgsql -a -s 3857 -g the_geom mem_layer SCHEMA.TABLE_NAME")      Can the records of a memory layer be appended to a preexisting PostGIS table? I don't get any error while running the code but no record is appended to the DB Table. What am I doing wrong? Thanks, m. **-EDITS-** I have been doing some testing with shp: I can run a command from shell and add a table (coming from the aforementioned memory file saved as a shp) into the destination schema. The following command works:                shp2pgsql -s 3857 -I /path/table_to_be_added.shp SCHEMA.table_to_be_added | psql -h HOST -d DB -U USER      Using SPIT, I can add the shp to the schema and append it (SQL) to the destination table (not considering the GID field):               INSERT INTO SCHEMA.destination_table (field1, field2, ...) SELECT "field1", "field2", "..." FROM SCHEMA."table_to_be_appended";      When I try to append the shp from cmd using the following command (the one I'd like to use as a parameter for **os.system()**               shp2pgsql -a -s 3857 -I /path/table_to_be_appended.shp SCHEMA.destination_table | psql -h HOST -d DB -U USER      I get the following error:               new row for relation "destination_table" violates check constraint "enforce_geotype_the_geom"      I tried many combinations of flags for that command but nothing worked! I am still wondering if a memory file can be appended to a preexisting PostGIS table (as stated in the title) and how to do so, but if anyone had some clue about all of the above, that would be much appreciated. Thanks again, m.


title: OpenLayers Hide/Show Layers from external checkboxes

text: I'm using OpenLayers with mapserver to display a lot of raster images and queryable wms layers. Everything works fine, the layers can be turned on/off in the OpenLayers layer switcher...But now I want to turn on/off the layers by external checkboxes and I don't know how to do this. I'm little bit new to Javascript-the only thing I know is that I have to pass the checkbox layer value to an OpenLayers function. Till now I tried to call a function with an onClick event `<input type="checkbox" name="ckeckbox_layer1" onClick="layervisibility(this.checked);">` But I don't know how the function 'layervisibility' has to look like so that my layers that are actually placed in the openlayers init() function turn on/off correctly when I check/uncheck the checkboxes.


title: How to fix "No QGIS data provider plugins found" erros in QGIS for Android?

text: I've bought a Samsung galaxy note 10.1 2014 edition, running with android 4.3. I've downloaded several versions of qgis for android (7 and 9). When I start QGIS, the message "No QGIS data provider plugins found in: \data\app-lib\lib no vector layers can be loaded" appears and I am not able to open or create a shapefile What can I do?


title: How do I create attributed line segments between two known points?

text: I have stream survey data that is spatially referenced every 10th habitat unit by a point. There are 10 habitat units between each point along the survey and I need to figure out a way to spatially reference each individual habitat unit. The habitat unit lengths are known from the survey but are not individually referenced. Does anyone know how to complete this task?


title: Alternative way to generate service area in ArcGIS - No Network Analyst License

text: I am working on a project currently that relates to creating service areas for points across California based on streets. I created a python script that can take a point and create a buffer around it, get intersection points of where the buffer intersects streets and then create a smaller buffer around those points. This would continue until the buffer size would be 0. An example is starting with a 5 mile buffer and work down in one mile increments until reaching 0. This was our original make-shift idea of creating service areas without a network analyst license. I realized after doing this though that this does not take into account at all that matter of possible barriers. Such as a river in-between 2 parallel streets – this form of analysis might include that parallel street even if there was not a nearby bridge to actually cross over into the street. I am now trying to find an alternative method that can do something similar but account for possible barriers like that of the service area tool in Network Analyst (I am trying to find a workaround due to licensing limitations). Do you have any possible ideas of a way I can do this type of analysis without having to use Network Analyst? Thanks for any help or suggestions you can provide.


title: Leaflet SVG layer is obscuring the underlying GeoJSON interactivity

text: I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in-place within the leaflet-overlay-pane? (For example, how could I put just the SVG into say the leaflet-shadow-pane and then turn pointer-events off on the leaflet-shadow-pane... thus making it possible to interact with the GeoJSON?) Thus-far, when I set: .leaflet-overlay-pane svg { pointer-events: none; } ...it seems to disable to disable pointer events to both the SVG and GeoJSON, which defeats the purpose.


title: Creating regularly spaced, defined # of points within polygon in QGIS

text: I used the research tool "Regular Points" to produce a certain number of points within a polygon, but it forms a rectangular grid of points rather than only within the shape of the polygon. Since I need a certain number of points within the polygon, is there any way to do so without trial and error? E.g. right now only 8 of the 25 points I want are within the polygon, but I want 25 points, so I could increase to 50 points and see how many then appear within the polygon ![enter image description here](http://i.stack.imgur.com/5blXs.png)


title: How to save label scales?

text: When I open a QGIS file, QGIS 1.8 resets the scale factors for all labels. Is there a way to save the file so that it knows to also save the label scales?


title: ET Geotools Split Lines at Vertices Issue

text: This might seem like a really simple question but for whatever reason I can't figure it out. How do I run the split line tool in ET Geotools on an entire polyline layer? I can do it for a single feature within the layer but I am unsure of how to apply it to the entire layer.


title: add grid to GetFeature Info tool

text: I have added the GetFeatureInfo Tool to my Viewer but the PopUp does not have a grid in it to display the Feature Info neatly. How do I get the grid layout in the Feature Info PopUp, like the one that we are able to see in the popup box in the feature edit tool?


title: how to execute a python tool in ArcGIS 9.3

text: I have a problem executing the code below. The file is not found in split_row_0717.py Please kindly help any modification and thank you. The error said that Traceback (most recent call last): File "C:\Python25\Lib\site- packages\pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in **main**._ _dict_ _ File "H:\python_p\python_code\split_row_0717.py", line 46, in gp.SplitByAttribute_Analysis2(fc, fieldName, outWorkspace, fieldName) AttributeError: Object: Tool or environment not found               ##Script Name: split rows     ##Description: using      ##Created By: Elaine Kuo     ##Date: 12/07/2012               #Import standard library modules     import arcgisscripting     import os          #Create the Geoprocessor object     gp = arcgisscripting.create(9.3)               #Set the workspace.     gp.Workspace= "H:/temp/test"               #Set the workspace. List all of the feature classes in the dataset     outWorkspace= "H:/temp"          # Add a toolbox with a model to the geoprocessor and set the workspace     gp.AddToolbox("C:/Program       Files/ArcGIS/ArcToolBox/Toolboxes/AdditionalAnalysis/Additional Analysis - Generic Tools.tbx")               #Get a list of the featureclasses in the input folder     fcs = gp.ListFeatureClasses()          # Loop through every item in the list that was just generated     for fc in fcs:              # Break out the name, no path or extension, using the describe object.         desc = gp.describe(fc)         featureName = desc.name              # Validate the new feature class name for the output workspace.         OutFeatureClass = outWorkspace + os.sep + gp.ValidateTableName(fc,outWorkspace)              #get file name         fcName, fcExt = os.path.splitext(fc)               #build field name         fieldName = fcName              #### Execute Script Tool ####         gp.SplitByAttribute_Analysis2(fc, fieldName, outWorkspace, fieldName)               gp.AddMessage(gp.GetMessages())     print gp.GetMessages()


title: How to choose the correct WPS platform?

text: I have some shapefiles & I want to implement some known GIS algorithms (buffer, intersection, voronoi, etc) & serve the results using an Openlayers UI through WPS. A minimal setup could be a WPS platform & and a web page having some Openlayers code. I did a quick search in ZOO & 52-north but I am not sure where to start. My feeling is that ZOO intergrates better with Openlayers but even the installation seems too complicated.. Any ideas or even better any success stories (just to avoid re-inventing the wheel)?


title: Extract longitude and latitude from shapefile

text: I want to create a media wiki page with map option where polygon required the following format. What is name of this format and how can it possible to extract this format from shapefile? `polygons=62.103882522897855,5.09765625:58.309488840677645,5.712890625:58.95000823335702,10.8984375:61.68987220046001,12.83203125:63.35212928507874,11.865234375:64.1297836764257,13.974609375` Detailed format can be found here http://semantic-mediawiki.org/wiki/Maps_examples/Google_Maps_shapes


title: Displaying HTML popups for feature service

text: This bit of information caught my eye today as I was reading about Feature Services in the ArcGIS Server .NET help: > Feature services also support HTML pop-ups setup in ArcMap. HTML pop-ups are > a powerful and easy way to share HTML formatted information about features. > They work much like the Identify tool, except that the information display > can be customized HTML. I set up the HTML popup in ArcMap and it worked as expected, and then I published a map service. The REST endpoint of my service now shows esriServerHTMLPopupTypeAsURL as the HTML Popup Type, however, I can't seem to find a sample, etc. that shows how to display the popup in a web application. Does anyone have a link to a sample, or some sample code, that can show me how to do this? I have looked through the JavaScript API samples/reference and didn't find what I was looking for (or what I thought I should be looking for). Thanks, Tim **Edit:** Thanks to those who supplied answers for the links. I think I need to re-phrase the question: I'm not having problems getting the popup to display - that is working fine. My HTML popup type is set as PopupTypeAsURL, so I was expecting the popup to display the contents of the URL, say http://whateversite.com. Essentially I want the popup to display a web page or web form. Is this possible?


title: Android app where i can import image and set waypoints by GPS

text: Hello i'm looking for an application for android where I can upload a large image raster and apply for it `these GPS waypoints. We would like to count the trees in the area, we have the exact raster images from the plane. Because our GPS signal is too small and we cannot add waypoints without this. I found a lot of apps but i in those I can only add shape. I don't have shapes. Thank you for any idea.


title: Handle annotation layers with arcpy

text: I want to access annotation layers using arcpy (the purpose is to verify few text strings in text annotations). By annotation I mean **draw tool annotations** , not dynamic labels. These annotation layers are under a groups layer by the name of 'Default'. The Esri documentation talks of draw annotation as being layers themselves : > There are essentially three categories of layers in a map document: feature > layers, group layers, and raster layers. The isFeatureLayer, isGroupLayer, > and isRasterLayer properties allow you to identify or isolate the majority > of layer types but not all layer types. **_There are a few specialized > layers and datasets that don't fall into one of these three categories: > annotation subclasses, dimension features, network datasets, terrain > datasets, topology datasets, and so on. In these cases you may need to test > other properties to isolate a layer of interest before doing something to > it._** One thing to be aware of is how ArcGIS handles draw annotations, two mean configurations are possible : > ArcGIS fully supports two types of annotation: geodatabase and map document In my case, it's map document. * * * In light of all this documentation, it so appears that draw annotations are mere layers, thus a simple code such as this should be working :               mxd = arcpy.mapping.MapDocument("some\mxdpath\here")     df = arcpy.mapping.ListDataFrames(mxd,"Layers")     lyr = arcpy.mapping.ListLayers(mxd,"current_annotation_layer",df)       But the problem is the annotations do not seem obtainable via dataframe (which is weird considering each of my annotation layers is associated to a feature layer). * * * Any specific arcpy class to access annotations (one comparable to IAnnotationFeature2 of ArcObject SDK)? Any workaround ? Thanks !


title: ERDAS Imagine 2013 NDVI fail

text: i have a problem with NDVI in Erdas Imagine. Instead of NDVI image it makes a mask, which is not suppose to make. Do anyone know where the problem is?


title: Why am I unable to dock Main Menu in ArcCatalog?

text: For some reason the Main Menu dis-attached itself from the ArcCatalog window and I am not able to dock it or even move it when i click the menu title bar. The functions work but it's just stuck in place on screen and I can't do anything with it. The title bar itself appears dimmed. ![enter image description here](http://i.stack.imgur.com/IuEjF.png)


title: Select point with highest value within a buffer

text: I work with ArcMap 10.2.1 and I created buffers around points. Some buffers contain many points and others just one. I would like to select one point for each buffer, but the points can represent different attributes having different values. So when I have for example one buffer with two points, one point could be organism one and the second point could be organism two. Organism one has a value 30% and organism two has value 70%. I would like to select organism two and delete organism one from the buffer (file). Only thing is I have many buffers, with varying amount of points (organisms) and different percentages..So I would like to do it for all the buffers.. I am using modelbuilder as I do not know python. Does anybody have a suggestion? That would be great!


title: I need to configure geoserver proxyHost even standing on my local machine?

text: I'm with geoserver on my local machine running on port 8080 on jetty which is standard in windows installer. I want to use my GetFeatureInfo WMS layers, but I have the following questions: I need to configure proxyHost even being on my local machine? Can I use ProxyHosto GeoServer running with Jetty as the default installation for WindosEstou with geoserver on my local machine running on port 8080 on jetty which is standard in windows installer. I want to use my GetFeatureInfo WMS layers, but I have the following questions: I need to configure proxyHost even being on my local machine? Can I use ProxyHosto with GeoServer running on Jetty as is standard for Windows installation or do I have to install it in Tomcat? This is my code, when I click is carrying too much time and nothing appears: ** EDITED CODE **               <!DOCTYPE html>     <html lang='en'>     <head>      <meta charset='utf-8' />      <title>My OpenLayers Map</title>      <script type='text/javascript' src='OpenLayers.js'></script>      <script type='text/javascript'>           OpenLayers.ProxyHost = "proxy.cgi?url=";           var map;           function init() {               var bounds = new OpenLayers.Bounds(                     -51.280762, -30.241074,                     -51.020828, -29.969619                 );                 var options = {         controls :[new OpenLayers.Control.Navigation(),                 new OpenLayers.Control.PanZoom()],                     maxExtent: bounds,                     maxResolution: 0.00106037109375,                     projection: "EPSG:4326",                     units: 'degrees'                 };         map = new OpenLayers.Map('map_element', options);              var wms = new OpenLayers.Layer.WMS(                 "Paradas de ônibus",                 "http://localhost:8080/geoserver/wms?",                 {                    layers: 'Teste:Stops',                                                    isBaseLayer: false,                    styles : '',                     format :"image/jpeg"                 }                         );              map.addLayers([wms]);              //GetFeatureInfo Simples         info = new OpenLayers.Control.WMSGetFeatureInfo({             url: 'http://localhost:8080/geoserver/wms?',              title: 'Identify features by clicking',             queryVisible: true,             eventListeners: {                 getfeatureinfo: function(event) {                     map.addPopup(new OpenLayers.Popup.FramedCloud(                         "chicken",                          map.getLonLatFromPixel(event.xy),                         null,                         event.text,                         null,                         true                     ));                 }             }         });         map.addControl(info);         info.activate();              var point = new OpenLayers.LonLat(-51.22,-30.08);          point.transform(new OpenLayers.Projection("EPSG:4326"),          map.getProjectionObject());          map.setCenter(point, 3);               map.addControl(new OpenLayers.Control.LayerSwitcher({}));           if(!map.getCenter()){         map.zoomToMaxExtent();      }     }           </script>          </script>     </head>          <body onload='init();'> <!-- Chama a função js init() -->           <!--Elemento HTML onde o mapa é exibido -->      <div id='map_element' style='width: 800px; height: 800px;'>      </div>          </body>     </html>


title: OpenLayers WMS disappears when including OpenStreetMap

text:
Setup:   * ArcSDE 9.3.2    * Oracle 11g   * GeoServer 2.1.4    * OpenLayers (latest build)   * OpenStreetMap    * InternetExplorer 7.0/ Google Chrome  * * * **EDIT: I have updated information just below the screen shots** Problem: I am trying to take some feature classes from our arcsde and overlay them with OSM, originally i was trying to keep them in their native projection of BC_Albers (EPSG:42102) but i couldn't get them to overlay properly. So i consigned my self to having to do a reprojection of my data from 42102 to 4326. I did the reprojection this morning and then modified my openlayers test page to view the data. I can view my featureset by itself just fine, I can view the OSM layer by itself just fine but when I try and combine the two all I get is OSM.                         <title></title>                              <form id="form1" runat="server">

location

     </form>                ![Layers In ArcMap](http://i.stack.imgur.com/3BZmp.png) ![Overlay Layer without OSM](http://i.stack.imgur.com/stdqq.jpg) ![Overlay Layer with OSM](http://i.stack.imgur.com/dKwzv.png) it appears it may have something to do with the way that openlayers is changing the EPSG: without OSM on map: http://wldev1.canfor.ca:8080/geoserver/WIM/wms?LAYERS=WIM%3AFOREST_WIM.WEB_COPI_TRAPPER&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT=256 WITH OSM on map: http://wldev1.canfor.ca:8080/geoserver/WIM/wms?LAYERS=WIM%3AFOREST_WIM.WEB_COPI_TRAPPER&FORMAT=image%2Fgif&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=-180,-90,10018574.17,10018664.17&WIDTH=256&HEIGHT=256


title: ArcEngine 10 Polyline with arrow

text: I was wondering if there is a way to draw a polyline but with an arrow head at the end point? Thanks all               IPolyline line = new PolylineClass();     ((IPointCollection)line).AddPoint((IPoint)sourceFeature.Shape);     ((IPointCollection)line).AddPoint((IPoint)sinkFeature.Shape);


title: how to connect to ArcGIS server with c#

text: I would like connect to ArcGIS server, but I have an error message "la référence d'un objet n'est pas définie à une instance a une objet". I have many examples:               string serverName = "adresse";     string instance = "ArcGIS/services";     // Using the ADF Common API data source implementation of the ArcGIS Server Web Service API         string serviceNameAndType = "nameservice/MapServer";         ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy agsSoapMapServerProxy = new     ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy("http://" + serverName + "/" + instance + "/" + serviceNameAndType);      or                ESRI.ArcGIS.ADF.Identity identity = new ESRI.ArcGIS.ADF.Identity("usernamer", "password", "domain");      ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection agsconnection;     agsconnection = new ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection("nomserver", identity);      agsconnection.Connect();      IServerObjectManager SOM = agsconnection.ServerObjectManager;      or               string mapServiceUrl = "http://servername/ArcGIS/services/servicename/MapServer";          ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy mapServerProxy = new ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy(mapServiceUrl);      I hope that someone can help me :)


title: What are people using LANDSAT data for?

text: Obviously it's potentially a very powerful tool, but I'm curious as to what practical applications people are using it for? Admittedly, this is a very broad question... The reason I ask is because while I personally am aware of a number of applications, I'm sure that others out there have thought of many other novel uses that might be interesting to share, and think about. In addition, if you are using LANDSAT data yourself, what sort of workflow are you going through to get what you need from the data?


title: Walkthrough: Add-In Command Bars root menu

text: I am wanting to create a new ArcMap Add-In project with just a custom root menu. According to the walkthrough, I can access the Add-In Command Bars (which has the Menu element) by adding a new item to a project. What kind of project do I create in the first place given the selection of Add-In Types?


title: Case sensitive query of shapefile in ArcMap 10

text: I am an IT guy, not a GIS guy. What I know about how to use ArcMap 10 I learned from Google. It has served me well so far. Apparently what I'm wanting to do worked in version 9, but no longer does in the same fashion in 10. I'm trying to select by attributes on a shapefile. I know that in one type of database you can ignore case, but you cannot in another. I don't know what category a shapefile fits in. I even tried Googling that particular question and couldn't figure it out. Ultimately, I want to perform a search on a particular column, ignoring case for multiple values. I did have this:               "STRUCSTATE" = 'IL' and ("ENTITY" LIKE '%City%' or "ENTITY" LIKE '%village%' or          "ENTITY" LIKE '%town%' or "ENTITY" LIKE '%county%' or "ENTITY" LIKE '%district%')      but it used the exact case I used. There may be any mix of case (including impROper) and those strings could be anywhere in the field. Help?!


title: Decent Alabama GIS Clearinghouse?

text: Alabama's data portal (portal.gsa.state.al.us) is down and I haven't come across any other GIS clearinghouses for AL that are as good as say, Florida's FGDL. Does anyone know of a decent GIS clearinghouse specific to Alabama?


title: Problems with NAD27 projection in QGIS

text: I have some data that is in NAD27, but I am having a hard time displaying it in QGIS. I think that the problem is with the CRS. I cannot seem to find the correct NAD27 option. The closest one seems to be EPSG:2027 (NAD27(76)/UTM zone 15N), but my data points are still about 25 meters off. This data plots up just fine in ArcGIS, and I have transformed it to NAD83, which I can use with no problem in QGIS, but this is an awkward workaround, and I would like to migrate this project into QGIS entirely. Does anyone have an idea on this?


title: Having issues getting Leaflet "L.tileLayer.wms" to display Geoserver WMS data

text: I've set up Geoserver and WMS capabilities to host some weather data files (satellite data for example). Here's an example file:               http://xxx.xxx.xxx.xxx:8080/geoserver/opengeo/wms?service=WMS&version=1.1.0&request=GetMap&layers=opengeo:met9Qtest&styles=&bbox=-39.550275759,-33.426229830999986,60.91911924099999,67.043165169&width=512&height=512&srs=EPSG:900913&format=image/png      see code below for ip Now, I'd like to be able to use leaflet to display weather data layers. I've been successful in getting example in Leaflet documentation to work: http://leafletjs.com/reference.html#tilelayer-wms But when I try to do this same thing for the data on my Geoserver, the layer never shows up. Here's the snippet from my Leaflet code:               var test = L.tileLayer.wms("http://209.123.242.190:8080/geoserver/opengeo/wms",{     layers: 'opengeo:met9Qtest',     format: 'image/png',     transparent: true,         opacity: 0.7            });      I've tried changing the SRS in geoserver to EPSG:900913, 4326, 102100, 3857... still nothing. Any ideas? I can't tell if the issue I am having is on the Leaflet side or Geoserver? Thanks, Matt


title: How can I avoid reprojection gaps when merging DEM rasters?

text: I have two raster DEMs in same resolution I want to bring together. I was using the merge-function in SAGA, GRASS and QGIS but I always get the following result: ![enter image description here](http://i.stack.imgur.com/XWllu.png) What do I need? Where could the fault be? Thanks!


title: How to create parameter windows for custom geoprocessing tools?

text: I would like to create a geoprocessing tool with a custom GUI for its input data. To put it in other words: imagine that your client works mainly with arcmap documents and he already has an arcpy script which deals with the geoprocessing. Unfortunately he doesn't like building blocks which take parameters for the script (drop-down list, onelineinput etc.) and would like to have a custom input method like let's say a scrollbar (f.e. for selecting time interval instead of typing it manually or selecting from a list). Is it achievable in ArcMap to have custom input GUI elements? I'm pretty sure it's not, but my colleague swears on everything that he's seen something like that. Before I completely cross out that idea I wanted to have a confirmation from people who have spent more time working with ArcGIS. To my understanding the only solution is to create a standalone application using Runtime SDK or ArcObjects/ArcEngine.


title: GDAL Conversion of US Topo GeoPDFs

text: I've used GDAL_translate with "--config GDAL_PDF_LAYERS" option to convert US Topo GeoPDFs to GeoTIFF and it works great for creating collarless topos based on the new format. However, I can't get it to remove the "Images" layer from the US Topo PDFs for North Dakota (Fargo area) no matter what I try, short of flattening the PDF and discarding spatial component, which defeats the purpose of GDAL conversion. The US Topos for MN in the adjacent area convert as expected. It's something to do with the ND topos. Has anyone come across this and how can I get GDAL to remove the "Images" layer from the ND US Topos?


title: Create Geographic Reference for X,Y Coordinates

text: I have a set of x,y data that do not have any sort of geographic reference. I have lat/longs (WGS 84) for a small set of those points. How can I calculate lat/long for the remaining points so I can get them geographically placed? Thanks!


I am trying to publish a map on my server but I am getting this error: > Compressing the service definition failed. I have changed the location of service points, still the Error remains. How can I solve this issue?


title: QGIS 2.2.0 install via OSGeo4W overwrote/lost qGIS ver. 2.0

text: Just installed ver 2.2.0 Valmiera through the OSGeo4W advanced installer for a test drive. It overwrote existing ver 2.0 in the process. Still want to have the previous to work from. How can i get QGIS ver 2.0 back without problems in running the new release?


title: beginner ESRI Javascript API Question

text: So I've just finished the tutorial to at least get a map on the screen, and it already isn't working. Can someone see what I'm missing?![htmlfile](http://i.stack.imgur.com/ndliH.png)![javascriptfile](http://i.stack.imgur.com/vWLBP.png)


title: Solution for android map app with offline use

text: As the title reveals i'm in search of a way to develop an app for android with embedded maps which can work without an internet connection(i.e. can i get the tiles of the open streetmap for offline use?). I have developed web apps before by using the google maps api v3. I need a general answer as a specific one.I'm trying to find the concepts and technologies i need to learn :) (Meanwhile i found osmdroid.Does it work offline?) Cheers


title: "Attribute only valid on v:image" error on popup

text: I'm implementing a script based on the popup on vector layer example into a cognos report. It all works fine in firefox and i dont get no errors. But if i open my script with internet explorer, as soon as I click on a feature, I can't close the popup anymore and internet explorer crashes with the failure notice: "Attribute only valid on v:image". This happens in both IE 8 & 7. When i open the regular example i can open/close the popups without an error. If not for my work i wouldnt care at all that the script can't be used by IE users :) I hope someone can help. EDIT: Yes, i've googled before i posted here.


title: Chart inside pop up window in Javascript

text: How to show a chart inside pop up window? I'm using Leaflet JS, which has support for raphael plugin http://dynmeth.github.com/RaphaelLayer/. Is it possible to create a div inside popup window? I was thinking about http://softwarebyjosh.com/raphy-charts/ If it's not possible with Leaflet, I am opened to only Raphael map solution. Thanks


title: No route results after calling network analyst service

text: I have published a network analyst service and I'm trying to use it from the Flex API 3.1. When I use the service in ArcMap or through the rest GUI in a browser, the service returns the right answer. When I use the service from the Flex API 3.1, my object "routeResult" that contains the route returned by the server is null. I get the error: "Error #1009: Cannot access a property or method of a null object reference." for the object routeResult. Here is my application code:               <s:layout>         <s:BasicLayout/>     </s:layout>          <fx:Script>         <![CDATA[             import com.esri.ags.events.MapMouseEvent;             import com.esri.ags.events.RouteEvent;             import com.esri.ags.FeatureSet;             import com.esri.ags.Graphic;             import com.esri.ags.symbols.CompositeSymbol;             import com.esri.ags.symbols.SimpleMarkerSymbol;             import com.esri.ags.symbols.TextSymbol;             import com.esri.ags.tasks.supportClasses.RouteResult;                  import mx.controls.Alert;             import mx.rpc.events.FaultEvent;                  [Bindable]private var stops:FeatureSet = new FeatureSet([]);                  [Bindable]private var lastRoute:Graphic;                              private function mapClickHandler(event:MapMouseEvent):void             {                 var stopSymbol:CompositeSymbol = new CompositeSymbol();                 var circleSym:SimpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 20, 0x000099);                 var textSym:TextSymbol = new TextSymbol(String(stops.features.length + 1));                 textSym.textFormat = new TextFormat("Verdana", null, null, true);                 textSym.color = 0xFFFFFF;                 stopSymbol.symbols = [ circleSym, textSym ];                                      var stop:Graphic = new Graphic(event.mapPoint, stopSymbol);                 inputsLayer.add(stop);                 stops.features.push(stop);                      if (stops.features.length > 1)                 {                     routeTask.solve(routeParams);                 }             }                  private function solveCompleteHandler(event:RouteEvent):void             {                 var routeResult:RouteResult = event.routeSolveResult.routeResults[0];                 lastRoute = routeResult.route;                 lastRoute.toolTip = routeResult.routeName;                 if (routeResult.route.attributes.Total_Time)                 {                     lastRoute.toolTip += " in " + Math.round(Number(routeResult.route.attributes.Total_Time)) + " minutes.";                 }             }                  private function faultHandler(event:FaultEvent):void             {                 Alert.show(event.fault.faultString + "\n\n" + event.fault.faultDetail, "Routing Error " + event.fault.faultCode);                 // Supprimer le dernier stop ou les deux s'il n'y en a pas plus.                 if (stops.features.length <= 2)                 {                     inputsLayer.clear();                     stops = new FeatureSet([]);                 }                 else                 {                     inputsLayer.remove(stops.features.pop());                 }             }              ]]>     </fx:Script>              <fx:Declarations>                <esri:MapPoint id="mapPoint" x="655672" y="6861079"/>              <esri:RouteTask id="routeTask" concurrency="last" fault="faultHandler(event)"                         requestTimeout="30" showBusyCursor="true"                         solveComplete="solveCompleteHandler(event)"                         url="http://serverIP:8399/arcgis/rest/services/na_service/MapServer/Route"/>              <esri:RouteParameters id="routeParams" stops="{stops}" returnDirections="false"/>              <esri:SimpleLineSymbol id="routeSymbol" width="5" alpha="0.6" color="0x000099"/>     </fx:Declarations>          <s:BorderContainer id="applicationHolder" width="100%" height="100%">                   <s:layout>             <s:VerticalLayout/>         </s:layout>              <s:SkinnableContainer id="headerBar" width="100%" height="50" backgroundColor="0xcccccc">             <s:layout>                 <s:HorizontalLayout verticalAlign="middle"/>             </s:layout>                  <mx:Text id="titleText" fontSize="25" fontWeight="bold"                      text="My application"/>             <mx:Spacer width="75"/>                       </s:SkinnableContainer>              <esri:Map id="mainMap" width="100%" height="100%" center="{mapPoint}"                   crosshairVisible="{crosshairsCheck.selected}" level="16"                   mapClick="mapClickHandler(event)" panArrowsVisible="{panArrowsCheck.selected}">             <esri:ArcGISDynamicMapServiceLayer url="http://serverIP:8399/arcgis/rest/services/myMapService/MapServer"/>                  <esri:GraphicsLayer graphicProvider="{lastRoute}" symbol="{routeSymbol}"/>             <esri:GraphicsLayer id="inputsLayer"/>         </esri:Map>          </s:BorderContainer>      Do you have any advice? Regards


title: Basic PostGIS and PGRouting question

text: I'm using OSX 10.6 and just downloaded and installed `PostgreSQL 9.0.2-1` and `pgRouting 1.0.5-1 for Postgres 9.0` from here. I'm a confused what my next steps are though. I'd like to try loading a simple network into pgRouting and running a few different network routing analyses on it to test it out. However, I don't know where to begin. How do I open PostgreSQL or pgRouting? I'm fairly comfortable with terminal commands and scripting, but as I installed precompiled versions, I don't know where anything is or what to get at. I have looked at the pgRouting documentation, but I didn't see anything similar to my question.