Map text is truncated when tiles are created in tilecache

I'm using TileCache between our corporate WMS (Cadcorp Geognosis in this case) and an openlayers map, serving Ordnance Survey data at all levels from OS MiniScale right down to MasterMap Topo. It's all working fine with the Raster tiles, but I get down to the Topo layer (stored in a SQL Server database if that makes a difference) map text is truncated if it goes over the edge of a tile. I know WHY this is happening, when the tile is requested from the WMS, it doesn't have the text point in its bounds, so no text is rendered. Is there a way of fixing this? Can I tell TileCache to pull off a 768x768 tile from the WMS and return the middle 256x256? Is it an issue with my WMS? Should that be handling it better?


QGIS 2.4: plugin changes map tool canvas click behavior from 2.0

I had created a plugin for QGIS 2.0 to add new features more easily. It involves changing extents and updating snapping options along with triggering the default actionAddFeature(). However, I've decided to update to QGIS 2.4 and now notice that it has changed in behavior, but I cannot figure out why. I'd created a mapTool to emit a point:               def __init__(self, iface):     ...         self.canvas = self.iface.mapCanvas()         self.clickTool = QgsMapToolEmitPoint(self.canvas)     ...      I connected the map tool to a function:               def initGui(self):         self.clickTool.canvasClicked.connect(self.zoomTo)      The zoomTo tool zooms into a certain defined rectangle extent and triggers other functions depending on if statements               def zoomTo(self):         ...         box = pntBuff.boundingBox()         self.canvas.setExtent(box)         self.canvas.refresh()         if self.iface.activeLayer() == layer1:             self.addElement1()         if self.iface.activeLayer() == layer2:             self.addElement2()      **_My problem lies here: Using my plugin with QGIS 2.0, the first canvas click zoomed to my desired extent (done by zoomTo()) and required a second canvas click to actually add the feature (triggered by addElement1()). Using the plugin in QGIS 2.4, the first canvas click zooms AND adds the feature at the same time without requiring a second mouse click (this means I can't easily control where exactly I'm placing my elements)._** addElement1() and addElement2() both start editing, set active layers, and trigger actionAddFeature for respective layers.               def addElement1(self):         if not layer1.isEditable():             self.layer1.startEditing()         self.iface.setActiveLayer(self.layer1)         self.iface.actionAddFeature().trigger()      My run method zooms out to my layer's extent and sets my map tool:               def run(self):         #zoomOut() defined to set to layer's extent--different from zoomTo         self.zoomOut()         self.canvas.setMapTool(self.clickTool)      **_UPDATE_** : I'm still trying to target this issue and have created a second map tool to trigger the add feature action (on top of the original click tool). The first click zooms to the area and the second click should simply trigger the feature add action tool (requiring a third click to actually add the feature and open feature form). However, the second click triggers the action AND adds the feature right away (with only one click). While the difficulties of not being zoomed in previously stated is no longer an issue, it is still problematic as 1) the cursor does not change to "add feature" target symbol and 2) the snapping option cross does not show up. When testing qgis.utils.iface.addFeatureAction().trigger() in the python console, the add feature button is simply toggled. It must be some combination of my emit point map tool with the add feature action. **_I wonder how I can access the add feature tool in a more detailed way, keeping it from firing in this unexpected way._**               def __init__(self, iface):     ...         self.canvas = self.iface.mapCanvas()         self.clickTool = QgsMapToolEmitPoint(self.canvas)         self.addFeatureTool = QgsMapToolEmitPoint(self.canvas)     ...          def initGui(self):         self.clickTool.canvasClicked.connect(self.zoomTo)         self.addFeatureTool.canvasClicked.connect(self.addMyFeature)          def zoomTo(self):         ...         box = pntBuff.boundingBox()         self.canvas.setExtent(box)         self.canvas.refresh()         if self.iface.activeLayer() == layer1:             self.setMyMapTool()         ...          def setMyMapTool(self):         self.canvas.setMapTool(self.addVanneTool)          def addMyFeature(self):         self.iface.actionAddFeature().trigger()      **_At this point, I feel like i've tried so many things without success. Just wondering if anyone can tell whether this is some sort of bug, or an error on my part._**


Problem with running Python scripts in ArcMap

I'm having a problem to get my python scripts running in ArcMap. I keep getting this message no matter what script i use. > Executing: Script1 Start Time: Thu Dec 05 15:37:50 2013 Running script > Script1... > > Traceback (most recent call last): File "C:\Users\Flori_000\Documents\Aptana > Studio 3 Workspace\ArcGIS\wk.py", line 11, in import arcpy File "c:\program > files (x86)\arcgis\desktop10.2\arcpy\arcpy__init__.py", line 24, in from > arcpy.toolbox import * File "c:\program files > (x86)\arcgis\desktop10.2\arcpy\arcpy\toolbox.py", line 351, in from > management import Graph, GraphTemplate File "c:\program files > (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 22, in import > _management File "c:\program files > (x86)\arcgis\desktop10.2\arcpy\arcpy_management.py", line 14, in import > _graph File "c:\program files > (x86)\arcgis\desktop10.2\arcpy\arcpy_graph.py", line 27, in import numpy > File "C:\Python27\lib\site-packages\numpy__init__.py", line 142, in import > add_newdocs File "C:\Python27\lib\site-packages\numpy\add_newdocs.py", line > 9, in from numpy.lib import add_newdoc File "C:\Python27\lib\site- > packages\numpy\lib__init__.py", line 13, in from polynomial import * File > "C:\Python27\lib\site-packages\numpy\lib\polynomial.py", line 11, in import > numpy.core.numeric as NX AttributeError: 'module' object has no attribute > 'core' > > Failed to execute (Script1). Failed at Thu Dec 05 15:37:50 2013 (Elapsed > Time: 0,40 seconds) To make sure about my scripts i also converted a tool made with the ModelBuilder to PythonScript but the results were the same. Does someone have any idea what this is all about? Thanks in advance


Why some coordinate systems define x-axis as northings and some as easting?

The definition of north and east are pretty straight forward to grasp but only becomes difficult when used interchangably with x-y coordinates which have varying definitions for the direction of the axes. In Mathematics y was always vertical and x was always horizontal so logically I would assume that "up" == "northing" == "y" and "along" == "easting" == "x". Why is this not the case in GIS?


Using Python in Field Calculator to compare two fields

I'm trying to use field calculator to compare two fields in a table of tax parcel data, Land Value (LAND_VAL) and Improvement Value (IMPRVT_VAL). My goal is to determine (1) Parcels with land value less than the value of improvements, (2)Land value about the same value as improvements, (3) Land value more than improvement value, but less than twice the value, and (4) Land value which is more than twice improvement value. I wrote the following script, and it runs successfully in Field Calculator (doesn't give any errors), but it only returns 4, which is clearly not the case in the data.               LV = " !LAND_VAL! "     IV = " !IMPRVT_VAL! "          def Recode(Val_Analys):         if LV < IV:             return 1         elif LV == IV:             return 2         elif (LV > IV and LV < (IV * 2)):             return 3         elif LV > (IV * 2) :             return 4         else:             return 0          Recode(!Val_Analys!)      Any help would be much appreciated.


Saving kriging information from automap package in the ESRI ASCII raster format

I would like to save the information generated from an ordinary kriging (processed with the function `autoKrige` from the `automap` R package), into a file extension readable in ArcGis for desktop 9.3.1 (more specifically, an .asc file - aka ESRI ASCII raster format). I tried to search for functions inside the `raster` (`raster`) and `rgdal` (`writeOGR`) packages but felt I would need some extra help from GIS SE.               require(gstat)     require(automap)     require(sp)          #Reading data to provide a reproducible example.     data(meuse)     coordinates(meuse) =~ x+y     data(meuse.grid)     gridded(meuse.grid) =~ x+y          #Perform ordinary kriging and store results on object of type "autoKrige" "list"      kriging_result = autoKrige(zinc~1, meuse, meuse.grid)          plot(kriging_result) #I clipped one panel from the entire output plot.      ![enter image description here](http://i.stack.imgur.com/gJW6e.jpg)               #Extract coordinates and variable of interest to object of type "data.frame"     kriging_variable = data.frame(kriging_result[[1]])          head(kriging_variable)          #Example of observations for the variable of interest "var1.pred"     x      y       var1.pred  var1.var   var1.stdev     181180 333740  777.5909   96809.44   311.1421     181140 333700  839.7388   78629.08   280.4088     181180 333700  773.9795   84108.76   290.0151     181220 333700  710.5693   90272.17   300.4533     181100 333660  911.2036   61045.30   247.0735     181140 333660  836.4262   65746.42   256.4107      Does anyone have a clue? Tks.


Function to add layer with button click

I'm working with openlayers and geoserver to create a map and overlay layers. I need to add a layer when a button is clicked, but what I get is that the layer is added ( i can see it through the layer switcher control) but just a second later the map refresh itself and the layer isn't there anymore. Here my code:                             <title>OpenLayers Example</title>

             <form method="POST" id="menu">
QUERY - BOX

                 Seleziona  il parametro <select id="parametro" >                      <option value="uguale">=</option>                      <option value="minore"><</option>                      <option value="maggiore">></option>                      <option value="diverso">!=</option>                  </select>                  Seleziona  il valore <select id="valore"> </select>                                       <input type="submit" value="QUERY" onClick = "que()" >              </form>
                Any advice? Thanks in advance! EDIT: this example should now work.... (and here is the live version: `http://92.245.171.37:8585/new.html`


Customized tab does not show in ArcMap 10 Table of Contents after migration from 9.3?

I'm new to ArcGIS 10, and I have a huge block of code migrated from ArcGIS Desktop 9.3 to 10. Most of them work properly but some classes, which implement the "IContentsView" interface, don't show in the Table of Contents (TOC) of ArcMap 10 even though they work in ArcMap 9.x. Should I have any other interface implemented in my classes? Due to iconic symbols for TOC tabs in ArcMap10, I think I must present an icon for my classes too but IContentsView doesn't have such a property or function. Has anyone experienced this problem?


Google Earth/Maps aerials via arc2earth producing cuts in PDF output

I just purchased a month of arc2earth. They provide Google imagery backgrounds with great resolution and display fine in ArcMap but after exporting to PDF they have these triangular cuts as seen here: ![arc2earth PDF output](http://i.stack.imgur.com/gPLnX.jpg) Anyone ever worked with arc2earth before and seen this? Please don't tell me there is no fixing this and the cuts in the PDF are arc2earth's way around Google's legal issues.


How do you make map styles NOT appear in a legend?

I am using GeoServer to serve up OSM data. I am making use of the GetLegendGraphic command, but I do not want some of my styles to appear in the legend (for example, the styles that are ONLY for text labels should not get a line). Is there any way to specify that a style NOT appear in a legend?


Opening a shapefile with roads, how to display the roadnames?

I am using               ((AxMapControl)myMap.AddShapeFile( directory, shapeFileName)      To display a shape file which has road data. Now the roads display properly, but the road names aren't displaying. How can I turn on the roads? I don't need exact instructions just point me in the right direction please. I'm sorry this is such a novice question. I'm using ArcEngine 2010 and C#.


ESRI ArcGIS Javascript API - any 2.9 beta examples available?

I found the arcgis 2.9 beta at http://servicesbeta.esri.com/jsapi/arcgis/2.9 but cannot find any beta samples. Are they available?


Does anyone have a shapely install for python "dummies" guide?

I have read both questions in regard to installing shapely on a Mac (OS Mountain Lion) and haven't been able to figure it out. I'm not familiar with python syntax and am just trying to get shapely installed so I can use the polygonizer plugin in QGIS. I download and untar shapely to my downloads folder, but then I have no idea where to put it. I tried to put in some of the script from How to install shapely for python 2.6 (Mac) NOT 2.7? and http://tumblr.pauladamsmith.com/post/17663153373/howtoinstallgdalshapely, but all I get is "SyntaxError: invalid syntax" when I paste it into the QGIS python console. Example of something I tried: > > > cd -> '/Users/blablabla/Downloads/Shapely-1.2.17' File "", line 1 cd -> > '/Users/blablabla/Downloads/Shapely-1.2.17' ^ SyntaxError: invalid syntax > LDFLAGS=`/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config > --libs` File "", line 1 > LDFLAGS=`/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config > --libs` ^ SyntaxError: invalid syntax > CFLAGS=`/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config > --cflags` File "", line 1 > CFLAGS=`/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config > --cflags` ^ SyntaxError: invalid syntax python setup.py install File "", > line 1 python setup.py install ^ SyntaxError: invalid syntax If someone has a basic explanation of what I'm supposed to be doing, it would be greatly appreciated.


I cannot start up QGIS and get an error message

When I start up my QGIS, the following appears on the screen and it closes down. Please help me; I really need my files that are there and do my work as well. The message says:               The ordinal 284 could not be located in the dynamic link library SSLEAY32.dll.


Calculate Point Angle in QGIS

I was wondering if there is a plugin, or a field calculation in QGIS to calculate a points rotation angle. ETGeoWizards has a tool that allows you to calculate a point layer rotation angle from a source line layer. Does anyone know of a similar process within QGIS? Thanks...


How to visualize grd files in Quantum GIS?

How to visualize grd files in the software Quantum GIS?


Local Tile Cache in QGIS

I was wondering if there is a way to load a local tile cache (ie: MB Tiles etc.) of imagery that is sitting locally into QGIS? I am hoping to use some tablets for field verification and would like to have ortho imagery to assist with the verification. Where I will be doing the field work I will not have wifi or cell coverage, so I will need local connections. I am hoping to use tiles over source imagery to minimize the large storage requirements needed for the orthos, and to increase the performance on a tablet. Thanks...


Calculation for conversion of Lat/Lon to World Geographic Reference System (GEOREF)

Does any one have a reference to, or the actual code, to convert Lat / Lons to Georef code (http://en.wikipedia.org/wiki/Georef)? I am also interested in finding a conversion from lat/lon to MGRS. Thanks in advance.


Splitting polylines using regions with PostGIS

I was wondering if it is possible to split a polyline on polygon boundaries (regions) in PostGIS, the picture below is of what we have at the moment and showing where I need the polylines split: ![alt text](http://i.stack.imgur.com/rz1D7.png) Lets call the regions `road_blocks` and the lines `road_cl` If you can copy the data from the `road_block` under the newly created polyline to the new polyline that would be a real bonus.


Why is IQueryGeometry crashing when ITextSymbol:Text  contains more then one AMPERSAND (&) symbol?

I have a bit of an issue with my addin which converts annotations (text) to polygons. To do this I use the ITextSymbol obtained from the Annotation Feature which is then implemented by the IQueryGeometry interface. The actual conversion then occurs on this line:               pPolygon = pTextQuery.GetGeometry(pScreenDisplay.WindowDC, pDisplayTransform, pTextPointGeo)      All works good but I noticed it crashes on text strings that contain more then one instance of the **ampersand symbol**. (chr(38) I understand that this is a special character used for concatenation and such but I would like to retain it as a part of the string. I know how to test whether the string contains the ampersand but **what should I do to retain the ampersands without crashing the IQueryGeometry interface?** In label expressions when I often encounter a similar issue I use FindLabel = `Replace(FindLabel ,"&","&")` to remedy this. However when I try this in Visual Studio it still crashes the iQueryGeometry. Strings that contain only one ampersand pass but strings with more then one ampersands crash. By default REPLACE replaces all searched instances so I don't know what's going on here.


Looking for geocoding data for New York State

I have tried the following local data sets:   * TIGER 2010   * TIGER 2006   * www.datasciencetoolkit.org   * http://www.gisgraphy.com They are all very inaccurate for data in New York State. I need the data to work at the street/house level similar to google maps. I have searched all over the place and it does not seem this type of data exists. Any recommendations?


Using PostGIS with Rails

I'm new to postGIS, and am looking to use a spatial database with my Rails app (specifically, to retrieve points from the database that are within the bounding box of a Google Maps viewport). I posted a question on Stack Overflow with a few more details ( http://stackoverflow.com/questions/3555840/constucting-a-postgis-query-with- rails ), before coming across this site. I was following the tutorial at http://railsonpostgresql.com/2009/11/05/intro-to-postgis, but my implementation doesn't really seem to work - when zoomed in, the points don't appear as expected (but some appear when zoomed further out, although not those near the international date line). I'm using the spatial_adapter and GeoRuby gems at the moment - are there any good tutorials out there on how to begin integrating postGIS with Rails? From what I've read, it seems like using the geography type would be a good start for my project, but unfortunately I don't believe GeoRuby supports it. Any help/suggestions would be greatly appreciated!


Programmatic conversion between GML and GeoJSON

I am modifying a .Net (C#, MSSQL) system to add some geography that I'd like to display on a leaflet map. I had originally expected to save GeoJSON directly into text strings in the DB, but after seeing some SQL2008 spatial types, I wonder if I'd be better served by keeping it as WKT or GML so I can run SQL-Spatial queries against it and use C# native objects. But then, I need to get stuff into GeoJSON or some other leaflet-compatible format. I realize there are utilities to do the conversion (Convert GML to GeoJSON), but I can't use that on the fly to serve content. Am I barking up the wrong tree? Any chastisement is welcome. =)


Arcgis Online - public viewers and private editors

In ArcGIS Online For Organizations, how does one publish a hosted feature service that is shared with Everyone for viewing, while restricting editing to specific users or groups, and different kinds of editing for different groups? In the help at the end of Editor permissions for feature services under **Configuring multiple tiers of access** it says > If you need to support multiple tiers of users, each requiring different > operations, the recommended approach is to create one service for each level > of user. For example, you could create a Professors service that might have > all operations allowed. Along with that, you could create a less-privileged > Students service with only Create, Query, and Upload operations allowed. Which is great, that's what I need to do. However what is left out is how to reconcile the multiple Feature Services so that when the Professors create new features the Students see the new records, and vice versa. The web browser management `Create Service` wizard allows you to use one feature service as a source for a new one, but only the data model is used (symbol definitions, field names & types, etc.) while the actual features are left behind, the new service is blank. This is the intended behaviour.


How to use ImagePyramids in Geoserver?

I want a cheaper solution than ESRI ArcGIS server for my online web GIS applications. I want to:   * display multiple SHP files and an aerial image,    * retrieve the SHP attributes,    * all in a web page inside my PHP applications. I tried Geoserver, and got stuck in tiling the aerial images, plus the performance is not that good. When I used ImagePyramid for example, I had the universal problem > Could not list layers for this store, an error occurred retrieving them: > This plugin accepts only File, URL and String pointing to a file I tried to google it, found a lot of other users faced the same problem, no straight online tutorial describes the required steps or how to troubleshoot the mistakes. Any help or suggestion for alternatives? Thank


How to display a PostGIS table on Google maps?

I am attempting to take a shape file and display it on a map: I can do something like this:               SELECT ST_AsText((ST_Dump(the_geom)).geom) as the_geom FROM shapes;      But the problem is I still have to do a lot of parsing of the data to get it to display on a google map. Is there a way to do this easily via google's javascript api?


Saving spatial reference of MapInfo TAB-file to file (like .prj)

I have some MapInfo TAB-file and I'd like to save spatial reference to .prj- file. How it can be done?


Publishing multiple rasters under a single map service

I have a new project in design where I need to publish a web service that will allow access for clients (like ArcGis Server Map Services). The only thing is, I have a big raster database (~300+ Rasters) and I need to allow users to turn each raster On/Off (like in a group layer). I experimented a little in ArcGIS 10 and stumbled upon the Group Layer which gives me a great solution to my problem:   1. I created a Mosaic Dataset for each raster.   2. I created a layer (*.lyr) for each Mosaic DS.   3. I gathered the layers under 1 group layer.   4. I published the group layer to the ArcGIS Server using an MSD file. The service works fine and I can turn each sub layer on/off from the client. Unfortunately, I cant really test it with a large amount of rasters (I tried it with 4 medium sized rasters). Are there any limitations for the group layer? It seems kind of strange putting all rasters under one layer but i'm really excited by the fact that I can publish a single service for all my rasters. Please feel free to suggest any other solutions/ideas you may have for this problem


Is it possible to access geoserver wfs layer from localhost:8080 in to web application?

I want to add a WFS layer. I am trying to get WFS layer from localhost:8080 geoserver. but I am getting eoserver DateLineWrap in Openlayers.js file...


Setting up Raster Calculater for QGIS Python Console: ImportError?

I'm trying to follow the instructions here How to evaluate raster calculator expressions from the console? to set up the python console to to use the raster calculator. I tried:               from qgis.analysis import  QgsRasterCalculator, QgsRasterCalculatorEntry      But that gave               Traceback (most recent call last):       File "<input>", line 1, in <module>     ImportError: cannot import name QgsRasterCalculator      The following seems to work fine, but doesn't get me the raster calculator commands.               from qgis.analysis import *      What is going on, and how do I fix it?


Consuming Forecast.io Radar Data in an API or ArcMap

I want to consume forecast.io's radar data as an ArcGIS Server REST or JSON to use in an API or ESRI's ArcMap GIS Software. MapBox is doing it here. I don't think forecast.io is currently making the radar data service available as REST or JSON, it looks like they are using TileMill to serve out 16-bit grayscale GeoTIFF images of the radar data and applying some MapBox magic. I want to do the same as a service for ArcGIS Server 10.2. I have looked into Cutting Tiles for ArcGIS Server Using TileMill but have not tested. It's rumored that ESRI will build functionality into server to be able to consume MBtiles and that may be a potential solution, but for now I am looking for a workaround.   Forecast for Developers


How can I keep only the maximal value of two overlapping polygon, keeping also the initial value where they don't?

I work with ArcGis 10.2. I want to Combine (Union?) two Polygons FC of waterdepths, both having the same classification but not the same elements. I want to keep all the elements and all the initial values where the elements don't overlap and only the highest value where they do. I want to use a model builder to do this. The issue could be resolved in raster but I have too many datasets of different hydrological orders, meaning the main rivers run across a third of Germany whereas the secondary ones are sometimes just small auxiliaries. Does anyone has already done something like that? How was it solved? I hope that made sense. I will clarify as much as needed.


QGIS raster calculator "not equal"?

Is there a syntax for "not equal" in the QGIS Raster Calculator? If so, what is it?


Does spherical equilateral triangle T contain point P?

I am working on a Python script to:   1. compute the vertex coordinates of a geodesic sphere/icosahedron,    2. project the triangles onto a sphere, then    3. find which spherical triangle contains an arbitrary point.  I would ultimately like to provide my script with a list of sample point coordinates, and the script would indicate which triangles contain points. These characters would then be used for presence-absence data in biological studies. I'm mostly done, but struggling with step 3. Is there a fast algorithm to identify whether a point is contained within a spherical equilateral triangle? In two dimensions for general polygons, you can count how many times a ray crosses a perimeter, but this seems challenging to do in three dimensions since the perimeter is curved. It seems like there should be a clever way to exploit the symmetry of spherical equilateral triangles, but I'm just not seeing it. I don't work with GIS or spherical trigonometry, so just let me know if my question is improperly phrased.


Create interactive map with no server

I have managed to build a great web mapping application using tiles created from GeoWebCache and a custom gridset, but I now need to add an overlay to the base maps. The only interactivity I need is a simple pop-up info window that comes from only one of the attributes. As default the overlay dataset is an ESRI Shapefile which is 180Mb, I have since managed to simplify the dataset using ST_SimplifyPreserverTopology which has dropped the ESRI Shapefile size to 28Mb. However, as a GeoJSON file this is still 78Mb which is just too big. I then tried CartoDB and loaded the data into a table and then added the vectorlayer in openlayers but the volume of data is still too big and the HTML page crashes. I then tried GIS Cloud and an external WMS but that is restricted to WGS84 and has no getfeature info option. I then started looking at Topojson which I think would work really well on my dataset but I dont think there is a way to load a topojson onto a map in OpenLayers 2.12 that I need to use. My other option was UTF-Grid, so I loaded the data into tilemill and exported a MbTiles which I can extract using mbutil. But of course UTF-Grid only supports EPSG:3857 (web mercator) which is different from my projection, EPSG:27700. So all the .json files are named differently from my underlying cached tiles from geowebcache. Is there a way to create a UTF-Grid but in a different projection? So that is the background and feel that I have tried most options that I know about. So simply I need an interactive overlay layer in an OpenLayers 2.12 map but I cannot use any server like GeoServer/Mapserver or TileStache etc and I cannot have any server side scripting like PHP. Can anyone offer any other advice?? Thanks


Convert some UTM coordinates to Lat Long

I have a series of UTM coordinates in an Excel file that I need to convert to Lat/Long. They are listed in the spreadsheet as "LONG(XUTM)" and "LAT(YUTM)". I know the coordinates are located in Bulgaria. Trying to figure out exactly how I can convert these - so far I'm using tools online and I'm getting lat/longs that put me in the ocean or in sudan or something... Here are a selection of the coords:               LONG(XUTM)  LAT(YUTM)     5400054.968 2262690.795     5410764.956 2279927.441     5406759.683 2282320.619     5402952.243 2277883.785     5412539.46  2258225.544     5425763.452 2287138.979     5437312.03  2250401.825      I don't know the zone but from looking at a UTM map I think it would be 35T. Still not getting expected lat/longs when I do the conversion though. Any advice would be greatly appreciated, thanks!


Reconciling vertex modification conflicts in Geodatabase Versioning?

Is it possible to edit the same feature in ArcSDE in two different versions ... and reconcile/post version A's edits to the parent, ... and then reconcile/post version B's edits of same feature, ... and then see which vertex modification conflicts arise, ... and keep all vertex modifications that do not conflict?


storing jpeg in spatialite database

How to store jpeg file in spatialite blob column so that spatialite gui and Qgis can recognise the format and show the image. I have created in memory jpeg from raster bands using jpeglib and stored that in spatialite but spatialite gui can not recognise the format. I also tried converting the whole jpeg to hexwkb format no results. Thanks


Land Classification with Spectral Python (SPy)

Does anyone have experience working with the Spectral Python module for land classification? The following k-means clustering example takes an iterative approach to classification through pixel clustering. Any thoughts, examples and/or visuals from your own work with SPy would be appreciated. Source: SPy               >>> (m, c) = kmeans(img, 20, 50)     Using single-pass cluster algorithm to initialize clusters.     Clustering image...done     Starting iterations.     Iteration 1...done     Iteration 2...done             18743 pixels reassigned.     Iteration 3...done             3387 pixels reassigned.     Iteration 4...done             2512 pixels reassigned.     Iteration 5...done             1960 pixels reassigned.     ---// snip //---     Iteration 28...done             149 pixels reassigned.     Iteration 29...done             135 pixels reassigned.     Iteration 30...done             107 pixels reassigned.     ^CIteration 31... 15.9%KeyboardInterrupt: Returning clusters from previous iteration     >>>      ![enter image description here](http://i.stack.imgur.com/vlh3O.jpg)


Hibernate Spatial - Query within an X kilometer radius?

I am new to Hibernate Spatial, and am trying to perform a simple query of objects within a given radius. I've created a number of entries in my database with properties corresponding to a latitude and longitude, using data from Google Maps and other sources. This property is defined like this in my Entity class:               @Column     @Type(type = "org.hibernate.spatial.GeometryType")     private Point coordinates = null;      I'm now trying to figure out how to do a search of all entity objects that have coordinates that fall within a radius of _x_ kilometers from a given point. For example, I'd like to find objects that fall within a 50 kilometer radius of the point (12.34567, -76.54321). However, I can't find any examples or tutorials that would explain how to do this in Hibernate Spatial. Can anyone give me any information on how a query like this can be constructed?


Need some hints for a draggable POI-map (Leaflet)

I try to make such kind of map: http://www.plotbrowser.com/search.cgi but first, I can´t see, where they saved the coordinates and the text. If you look to the sources, there are no coordinates or otehr datas. I expected that. But they must be anywhere downloaded, because I can click (already visible/downloaded) popUps and get new content even when the internet- connecition is blocked (for sure, offline I can´t drag the map ...). A good lesson to start is http://leafletjs.com/reference.html#draggable ?? or other? I'm working with wampp. Thanx for tips, user j


In arcpy, if I subclass the arcpy Spatial Reference class, what is the object argument I would use in the subclass definition?

I want to do something like the following:               class SubClassOfSpatialReference(arcpy_spatial_reference_object):         def __init__(self, input_data):          ... etc.      **Can I even do this? If so, what exactly is the parent object that I need to provide in the class definition?** If you type() a spatial reference object, you get arcpy.arcobjects.arcobjects.SpatialReference. I tried that and got AttributeError: 'module' object has no attribute 'arcobjects'. No surprise, really. I imagine that there is also a problem with the fact that the arcpy SpatialReference class invocation takes an argument of a WKID, spatial reference name, or feature dataset from which to copy the spatial reference; there isn't any way to create a new, blank spatial reference object. Here's another thought: **can one subclass an instance, as in:**               class SubClassOfSpatialReferenceInstance(arcpy.SpatialReference(54004):      starting in this case with the World_Mercator spatial reference? I am obviously out of my immediate sphere of knowledge about such things, so I thank anyone who can point me in the right direction or give advice. What I am ultimately after is a convenient interface for a modifiable spatial reference. Contrary to ESRI documentation of the arcpy SpatialReference class, a majority of the properties are read-only. I figured that, if I could subclass the arcpy Spatial Reference class, then I could override the name(), standardParallel1(), etc. attributes and use WKT string manipulation to make the spatial reference modifiable. I suppose I could make a generic class that deals only with the WKT and implements a CreateSR() method that uses the loadFromString() method to make a spatial reference after all the properties have been set, but it just wouldn't be as slick.


Postgis: find geometry within multiple polygons

I've got two tables with geometry in it. Table 1:`items` holds items with a point geometry; while the second table `property_zones` holds polygons. **The Items:**               CREATE TABLE public.items     (       id integer NOT NULL DEFAULT nextval('item_id_seq'::regclass),       ....       geom geometry(Point,4326),       ....     )      **The zones**               CREATE TABLE public.property_zones     (       id integer NOT NULL DEFAULT nextval('property_zones_id_seq'::regclass),       prop_id integer NOT NULL,       ....       geom geometry(Polygon,4326)     )      Both tables have GIST indexes on the geom column. I now want to query these tables and find every item within the zones op a particular property (denoted with `prop_id`). I came up with this SQL, which works but has a flaw in it:               SELECT i.id     FROM items AS i     WHERE         ST_Within(i.geom ,                    ( SELECT geom FROM property_zones WHERE prop_id = :propid )                  )      This works perfectly, but some properties have multiple zones, and off course the query within the ST_Within delivers more than 1 tuple. And of course I can return to a php solution where I split the query up in a couple of query's; but I really want a query based solution. (If possible) How can I rewrite this code to find every item within the zones (1 or more) of each property?


Difficult style for the map

There is a task before me of generating images as shown below. The main problem is the signs which must be placed outside the polygon (if they do not fit in it), and the lines should connect the sign with the point on the polygon. Are there any solutions exist in free map renders? Map example: ![enter image description here](http://i.stack.imgur.com/Mo4HJ.png) Thank you in advance.


How to get/set label scale ranges (e.g. minScale) in ArcPy?

For a layer object `lyr`, one can programmatically set the minScale in arcpy as such:               lyr.minScale = 150000      For a _label_ , one can manually set the scale range within a dialog in ArcMap. In arcpy, is there a way to programmatically set the minScale for a layer's _label_ in much the same way one can for the layer itself? I see that it can be done through the JavaScript API, but I haven't yet found a way via arcpy. (I have ArcMap 10.1 SP1.)


qgis ver 2.0 vector layers not visible over raster

This seems like a simple thing, but I cannot get it to work in 2.01. I've done it extensively in 1.8. I have vector line layers and raster layers. I put the vector line layer in order "above" or on top of the raster, but the lines do not display. If I turn off the raster, the line vector layer appears within the raster area. Lines outside of the raster boundary are always seen with the raster layer on. I've tried changing the order of the layers and nothing happens. If I make the raster layer transparent I can see the vector lines. Either I'm doing something wrong or this is a bug.


I've got a Silverlight client that serializes a FeatureSet and sends to an SOE. I'd like for the SOE to deserialize the json into an IRecordSet. ESRI.ArcGIS.SOESupport.Conversion has a method for going from IRecordset to json, but not the reverse. **How can I deserialize json to create an IRecordset?**               {         "displayFieldName": "",         "fieldAliases": {             "OBJECTID": "OBJECTID",             "DissolveID": "DissolveID",             "CatchID": "CatchID",             "Length": "Length",             "Fnode": "Fnode",             "Tnode": "Tnode",             "CatchID2": "CatchID2",             "OrigOID": "OrigOID",             "Shape_Length": "Shape_Length"         },         "geometryType": "esriGeometryPolyline",         "spatialReference": {             "wkid": 102113         },         "fields": [             {                 "name": "OBJECTID",                 "type": "esriFieldTypeOID",                 "alias": "OBJECTID"             },             {                 "name": "DissolveID",                 "type": "esriFieldTypeInteger",                 "alias": "DissolveID"             },             {                 "name": "CatchID",                 "type": "esriFieldTypeDouble",                 "alias": "CatchID"             },             {                 "name": "Length",                 "type": "esriFieldTypeDouble",                 "alias": "Length"             },             {                 "name": "Fnode",                 "type": "esriFieldTypeInteger",                 "alias": "Fnode"             },             {                 "name": "Tnode",                 "type": "esriFieldTypeInteger",                 "alias": "Tnode"             },             {                 "name": "CatchID2",                 "type": "esriFieldTypeInteger",                 "alias": "CatchID2"             },             {                 "name": "OrigOID",                 "type": "esriFieldTypeInteger",                 "alias": "OrigOID"             },             {                 "name": "Shape_Length",                 "type": "esriFieldTypeDouble",                 "alias": "Shape_Length"             }         ],         "features": [             {                 "attributes": {                     "OBJECTID": 1,                     "DissolveID": 27595,                     "CatchID": 27595,                     "Length": 2781.07146565,                     "Fnode": 26156,                     "Tnode": 26157,                     "CatchID2": 27595,                     "OrigOID": 26064,                     "Shape_Length": 3396.52480192211                 },                 "geometry": {                     "paths": [                         [                             [                                 -12199216.57915191,                                 4173685.6358526573                             ],                             [                                 -12201719.387905361,                                 4170671.685971223                             ],     // (snip)                             [                                 -12201768.97746418,                                 4170677.9241078123                             ]                         ]                     ]                 }             }         ]     }


How to use Record Set to prepopulate table in ModelBuilder?

I'm running ArcGIS 10.2.1. and am trying to prepopulate a record set in model builder. The record set is set as a Modeled Parameter. ![Beginning of my model](http://i.stack.imgur.com/WGGif.png) I open the record set enter the information into the table and hit "apply" then hit "OK." ![enter image description here](http://i.stack.imgur.com/C8nFA.jpg) However when I open it again, all the information that was previously enter is gone. The model tool dialog box also shows that there is no information in my record set. What can be done to rectify this?? I need to prepopulate this table but still have it be easily editable from the tool dialog box. This should be working but it isn't.


How can ArcGIS labels use a different expression if attribute is null?

I am using an expression to label features by concatenating two attributes in ArcMap. It works like this:               <attribute_1>+" "+<attribute_2>      Unfortunately when either attribute is Null the whole label is left blank. How do I change my expression so that if one attribute is Null, the other appears on its own?


OpenGeo Suite SDK authenticate

I am using the OpenGeo suite Snapshot 2.2 I have rules in GeoServer that display layers to certain users, and only allow editing to certain layers by certain users. This works fine when using GeoExplorer, the user must login to see the layerrs / edit, but when using the SDK I get no login box, meaning the user stays anonymous which prevents editing. I read HERE, OpenGeo SDK insturctions that in the gxp.viewer I can add `authenticate`? Is this what I need to add to bring the login dialogue up? if so how?


How can I extract data from Oracle Spatial and preserve the spatial data?

My table currently contains an SDO column that I want to export (along with the rest of the data) but all I have at my disposal is PL SQL Developer -- Is there anything I can do to get at that data and put it into a text or xml format? Apologies if this question isn't well framed -- I'm not accustomed to working with Oracle Spatial data. Any insights/suggestions would be greatly appreciated!


Any advice to help troubleshoot failing ArcGIS Server (10.0 sp5) Geoprocesses?

There are a few geoprocesses on a recently restored ArcGIS Server that are behaving strangely. If we turn on 'show messages' and try to run the process from the rest interface, the process will report 'failed due to crash or termination of the server object'. This happens at different points in the script and sometimes it will even return messages after the job has officially failed. Every now and then, the final message is 'the job has succeeded' even though the 'Job status' field has been set to 'failed' half way through. Some information about the setup: Data and server directories are accessed via UNC path Authentication is handled via domain accounts Geoprocesses are backed by Python scripts I've been searching around for file access issues in both the data store and server output directories. Any advice on best practices to narrow down what may be going on?


What is the proper way to do an automatic rollback of a vector layer edit?

I'm trying to rollback automatically the changes in features of a in-memory vector layer that don't meet certain criteria. The code I'm using for testing looks like this:               ...          def some_function()       tmpLayer = QgsVectorLayer("LineString", "Aristas_tmp", "memory")            tmpLayer.geometryChanged.connect(self.onLineGeometryChange)       return          ...          @pyqtSlot(int, QgsGeometry)     def onLineGeometryChange(self, featureId, geom ):       capa_aristas = find_layer("Aristas_tmp")       # Disconects the signal to avoid entering an endless loop       capa_aristas.geometryChanged.disconnect(self.onLineGeometryChange)       capa_aristas.rollBack()       capa_aristas.geometryChanged.connect(self.onLineGeometryChange)       return      (`find_layer` is a function taken from MMQGIS plugin that iterates through the `QgsMapLayerRegistry`) This code has the effect of undoing any change made to the layer, but with some problems:   1. There are inconsitencies in the GUI, i.e.: the layer leaves edit mode (the pencil in the legend disappears and further edits are not allowed), but the buttons in the digitize toolbar are still enabled.   2. If enter edit mode again, the last edited feature appears in the destination location of the previous edit, but if I move it again, the rollback moves it to the right place (the initial position)   3. If I repeat the process 5 or 6 times, QGIS crashes with this message: `Fatal: ASSERT: "mChangedGeometries.isEmpty()" in file /tmp/buildd/qgis-1.9.0+git20121010+dd67935~squeeze1/src/core/qgsvectorlayer.cpp, line 4042` (as you can see, I'm running QGIS 1.9.0-master) I guess I hit some kind of bug, but want to be sure that I'm calling the API in a proper way. Anyone can confirm if this usage of `rollback()` is "legal"?


Custom time slider

Is there someone who made a custom time slider? Or someone knows where I can find examples or scripts for this subject? I need a time slider that would work also for years that are B.C. (e.g. 850 BC) and for which I can define an interval like 800 BC - 800 A.D. I am archaeologist and it would be great to have such a "tool". So, basically, I would need a time slider that I can define the years that would be on the slider and when I drag the slider it would make appear on the screen only what is defined to be from that year- decade-century..... Any clues and ideas working for ArcGIS Desktop 10 are welcomed! Florela


GeoServer: Receive multiple tiles from layer

Using GeoServer you can do a WMS request to receive a single PNG representation of a certain layer using something like this.               http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=spearfish&styles=&bbox=589425.9342365642,4913959.224611808,609518.6719560538,4928082.949945881&width=512&height=359&srs=EPSG:26713&format=image%2Fpng      Is it possible to alter this request to directly request different "zoom levels" or "tiles" of the layer? I assume you need to do a `Web Map Tile Service (WMTS`) request but I can't seem to find any documentation on how to do this. Any guidance would be helpful.


How to extract surface from air photo avoiding trees and buildings?

I am working with Drone air images. These are geotiff images and clearly portray trees and buildings. I need to first classify the image according to land cover distribution, then need to remove the trees, grasses and buildings to get the original terrain model. I have another image of same area with elevation values and I need to reduce the elevation of objects over the surface. ![Aerial Foto collected from Drone](http://i.stack.imgur.com/Jm8I4.png) I used ArcGIS 10.2 Spatial Analyst>Image Classification. I selected the Training Areas against my classification requirement and the generate signature file using automated toolset. I used this signature file for supervised classification and used Maximum likelihood for my classification. The result of classification was awful. I found the big trees are classified as both grass land and trees as well as crops field also classified as big trees. The image is RGB and it shows similar reflectance of big trees, crop fields and grass land. So, it is difficult for me to classify different classes separately to extract actual surface reducing tree height or crop height. I am wondering if anybody has any suggestions regarding this issue.


Why might Python Script be Crashing Inconsistently on ArcPy Batch LayerToKML script?

I put together a script to take a TIGER shapefile of all census tracts in a state, select the census tracts by each county, and export them into individual county-level kml files. The problem is that the script only sometimes runs to completion, but more often, crashes python. The crash happens in the `for county in countyList:` loop, though not at the same spot each time, and does not seem to be dependent on the size of the exported kml file. I don't get any errors, so I'm not sure of the line on which the script crashes. A Windows message pops up and says that "pythonw.exe" has stopped working (I've been running the script from the python win in IDLE). **EDIT: I have tried running the script without a Try/Except block to see if any python errors occur. However, the same issue is still present. That is, the script stops without any type of Python error. Windows simply alerts that the program (pythonw.exe or python.exe) has stopped working. This is the case when running the script in both IDLE and through Powershell.** I searched for possible problems and came up with several possible solutions based on other examples, suggestions, etc., none of which have seemed to make any difference. I attempted deleting some of the intermediate items(i.e. the search cursor variables), using gc.collect() to collect garbage at certain points throughout the script, and setting a timer to wait at certain intervals (the gc and timer are commented out here since they don't seem to make much difference. I also updated to ArcGIS service pack 1 with 64 bit python processing, which doesn't seem to make a difference either. I'm running a computer with 4gb of memory, but the usage stays well below 2gb during the process, so I'm not sure if it's a memory issue. Is there something else in the script that I'm not seeing that might be causing Python to crash? Here's the code:               # Batch Shapefile to kml in Arcmap          '''     This script takes a shapefile, splits the file by its sub-parts, then exports each sub-part as a kml file.      '''          print "importing modules..."     import sys, traceback, arcpy, os, gc, time          try:              # Setting Defaults         workspace = r"C:\Illinois"         stateFIPS = "17"              # Setting the workspace         arcpy.env.workspace = workspace              # Get a list of the feature classes in the directory         # ListFeatureClasses ({wild_card}, {feature_type}, {feature_dataset})         fcList = arcpy.ListFeatureClasses()         print("Feature classes found: " + str(fcList))              for FC in fcList:             # Make a feature layer of the feature class             theOutFL = "temp_FL"             theFeatureLayer = arcpy.MakeFeatureLayer_management(FC, theOutFL)                  print "starting search cursor"                  valuesList = []             srows = arcpy.SearchCursor(FC)             counter = 1             for srow in srows:     ##            if counter >= 11 and counter <= 20:                 if srow.COUNTYFP10 not in valuesList:                     valuesList.append(srow.COUNTYFP10)     ##                    counter += 1             valuesList.sort()             for value in valuesList:                 print value             del srow             del srows             print "Collecting garbage..."             gc.collect()                  countyList = valuesList       ##      theCount = 1             print "\nCreating kml files for counties in 'countyList' ..."             for county in countyList:                 theQuery = "\"COUNTYFP10\" = '" + str(county) + "'"                 # Select rows if the county matches the current query                     # SelectLayerByAttribute_management (in_layer_or_view, {selection_type}, {where_clause})                 arcpy.SelectLayerByAttribute_management(theFeatureLayer, "NEW_SELECTION", theQuery)                      # Specify a name for the out kmz file                 theOutPath = r"C:\temp"                 # theOutFile = the state fips + the county fips .kmz     ##            theOutFile = "kml" + str(theCount) + ".kmz"                 theOutFile = stateFIPS + county + ".kmz"     ##            theCount = theCount + 1                 outKMZ = theOutPath + os.sep + theOutFile                 # Export the selected portions to a KML                 # Check if the file already exists. if it does, delete it                 if arcpy.Exists(outKMZ):                     print "the file" + theOutFile +  " already exists. Deleting the file..."                     arcpy.Delete_management(outKMZ)                 # LayerToKML_conversion (layer, out_kmz_file, layer_output_scale, {is_composite}, {boundary_box_extent}, {image_size}, {dpi_of_client})                 print "Exporting selections to new KML file..."                 arcpy.LayerToKML_conversion(theFeatureLayer, outKMZ, 500000)                 # Clear the selection before the next iteration                 print "Finished " + theOutFile + "\n"     ##            print "Clearing selected features...\n"     ##            arcpy.SelectLayerByAttribute_management(theFeatureLayer, "CLEAR_SELECTION")     ##            theCount = theCount + 1     ##            if theCount %10 == 0:     ##                print "Collecting garbage..."     ##                time.sleep(1)     ##                gc.collect()                       print "Exports complete. Files can be found in the directory: " + theOutPath          except:              tb = sys.exc_info()[2]         tbinfo = traceback.format_tb(tb)[0]         # LAST sys FUNCTIONS DEPRECTATED AFTER 1.5 --> pymsg = "PYTHON ERRORS:\nTraceback Info:\n" + tbinfo + "\nError Info:\n     " +        str(sys.exc_type) + ": " + str(sys.exc_value) + "\n"         pymsg = "PYTHON ERRORS:\nTraceback Info:\n" + tbinfo + "\nError Info:\n     " + str(sys.exc_info()[1])              msgs = "ARCPY ERRORS:\n" + arcpy.GetMessages(2) + "\n"              arcpy.AddError(msgs)         arcpy.AddError(pymsg)              print msgs         print pymsg              arcpy.AddMessage(arcpy.GetMessages(1))         print arcpy.GetMessages(1)


vb.net arcobjects spatial query get fields value of desired layer only

Currently I am using ArcObjects (10.2.1) in vb.net (vs 2012). What I intent to develop is a spatial query tool. There are 2 steps in the function: (1) Use "Select Features" tool in ArcMap to select features in a certain area. (2) List the several fields of features selected of a layer. My question is how to get the field values only for a desired feature layer. My code is listed below. It only works when only the desired layer is enabled on ArcMap.                   Dim pMxDoc As IMxDocument         Dim pMap As IMap         Dim pEnumFeature As IEnumFeature         Dim pEnumFeatureSetup As IEnumFeatureSetup         Dim pFeature As IFeature              pMxDoc = My.ArcMap.Document         pMap = pMxDoc.FocusMap         pEnumFeature = pMap.FeatureSelection         pEnumFeatureSetup = pEnumFeature         pEnumFeatureSetup.AllFields = True         pFeature = pEnumFeature.Next              Dim layerNum = GetIndexNumberFromLayerName(pActiveView, "testdb.DBO.testTable")         pFeatSel = pMap.Layer(layerNum)              Dim tempArr As New List(Of String)         Do While (Not pFeature Is Nothing)             tempArr.Add(pFeature.Value(pFeature.Fields.FindField("Item_ID")).ToString)             pFeature = pEnumFeature.Next         Loop              Dim message = String.Join(Environment.NewLine, tempArr.ToArray())         Dim lstOfString As List(Of String) = New List(Of String)(tempArr)         Dim selectedCount = lstOfString.Count              End If               Public Function GetIndexNumberFromLayerName(ByVal activeView As ESRI.ArcGIS.Carto.IActiveView, ByVal layerName As System.String) As System.Int32              If activeView Is Nothing OrElse layerName Is Nothing Then             Return -1         End If              Dim map As ESRI.ArcGIS.Carto.IMap = activeView.FocusMap         Dim numberOfLayers As System.Int32 = map.LayerCount         Dim i As System.Int32 = 0         Do While i < numberOfLayers             If layerName = map.Layer(i).Name Then                 Return i             End If             i += 1         Loop         Return -1         LayerNumber = i     End Function


Multiple Z point data kriging interpolation?

I asked this question yesterday and is on hold because I was not specific in my question. I have added my trail code for the question. The question is kriging interpolation of many z. To be more specific, my data exactly looks like the question asked by Iterating through z-values in ModelBuilder, and the data for that question was http://imagizer.imageshack.us/a/img849/115/zqkc.png; except my data has more than 1000 columns by which I want to interpolate for each data field. After I complete all the interpolation, I want to extract values of each interpolated results to points. I was trying the following interpolation script;               #! /usr/bin/python          import arcpy     from arcpy import env     from arcpy.sa import *          # Set environment settings     env.workspace = "C:/abraham/krige"          # Set local variables     inFeatures = "data.shp"     fieldList = arcpy.ListFields("C:/abraham/krige/data.shp")     for field in fieldList:          #outVarRaster = "C:/abraham/krige/clust_%value%"     # large size, major range, partial still and nugget: for this run, it is default           #lagSize = 2000     #majorRange = 2.6     #partialSill = 542     #nugget = 0          #set processing extent      snapRaster = "C:/abraham/krige/grid"     # Set complex variables     kModelOrdinary = KrigingModelOrdinary("CIRCULAR", lagSize, majorRange, partialSill, nugget)     #Search radius, in this case optional      #kRadius = Radiusvariable RadiusFixed(20000, 1)               # Check out the ArcGIS Spatial Analyst extension license     arcpy.CheckOutExtension("Spatial")          # Execute Kriging     outKriging = Kriging(inFeatures, field, kModelOrdinary, cellSize, outVarRaster)          # Save the output: I want to save outputs of all the field, if I am right?     outKriging.save("C:/abraham/krige/clust_%value%")      And I tried the Extract multiple values to points script as follow;               # Import system modules     import arcpy     from arcpy import env     from arcpy.sa import *          # Set environment settings     env.workspace = "C:/abraham/krige"          # Set local variables     inPointFeatures = "grid_points.shp"     #I want to add all rasters in the inRasterList C:/abraham/krige/clust_%value%"     inRasterList = []          # Check out the ArcGIS Spatial Analyst extension license     arcpy.CheckOutExtension("Spatial")          # Execute ExtractValuesToPoints     ExtractMultiValuesToPoints(inPointFeatures, inRasterList, "BILINEAR")      I have hard time to link the two codes in one code, but I couldn't handle.


Leaflet WMS GetFeatureInfo gives result only on zoom level 10

I am using GetFeatureInfo with wms layer to get the data behind. The request returns data only after zoom level 10 before that it returns empty features. Does anyone having same issue? I think it is not calculating correct X & Y until zoom level 10. If I look same on the Openlayer demo viwer which comes with Geoserver it gives correct result. Environment: -Leaflet 0.7.2 with Geoserver 2.5.1 serving WMS **Request sent on zoom level 9:**               Request=GetFeatureInfo&EXCEPTIONS=application/vnd.ogc.se_xml&Layers=maps:dataLyr&SRS=EPSG:4326&BBOX=-163.8720703125,70.85998776061674,-159.2578125,71.67057415064292&SERVICE=WMS&width=1680&height=919&QUERY_LAYERS=maps:dataLyr&INFO_FORMAT=application/json&FEATURE_COUNT=50&&version=1.1.1&X=682&Y=388      **Request sent on zoom level 10:**               Request=GetFeatureInfo&EXCEPTIONS=application/vnd.ogc.se_xml&Layers=maps:dataLyr&SRS=EPSG:4326&BBOX=-162.96295166015625,71.09942906866509,-160.65582275390625,71.50400873687697&SERVICE=WMS&width=1680&height=919&QUERY_LAYERS=maps:dataLyr&INFO_FORMAT=application/json&FEATURE_COUNT=50&&version=1.1.1&X=701&Y=390       **Result on zoom level 10:** ![enter image description here](http://i.stack.imgur.com/8VQb6.png)


Can't get osm2po to work

I have downloaded `osm2po 4.7.7` but when trying to follow the instrutions in either the documentation but I'm not able to access the map in my browser on `http://localhost:8888/Osm2poService`. What I have done is:   * to download and extract `osm2po 4.7.7` and the map `denmark-latest.osm.pbf`.   * to run (in cmd.exe) `java -jar osm2po-core-4.7.7-signed.jar prefix=dk "C:\users\mgn.mes\documents\denmark-latest.osm.pbf"` from the directory where i unpacked `osm2po 4.7.7`. Then osm2po starts ad I'm prompted for accepting terms by hitting enter. I hit enter and the program ends. Then I try to enter `http://localhost:8888/Osm2poService` in the browser, but nothing i returned. Do I need to change the `.config` file? Thanks


How to verify a PostGIS installation on OS X?

I am trying to set up GeoDjango and installing PostGIS on my mac and when I am trying to               ./configure      I am getting this error               checking PostgreSQL version... PostgreSQL 8.4.9     checking libpq-fe.h usability... yes     checking libpq-fe.h presence... yes     checking for libpq-fe.h... yes     checking for PQserverVersion in -lpq... no     configure: error: could not find libpq      Is this alright or should i go ahead and execute               make      ?? I have installed GeoServer Suite which has Postgres, should first install Postgres separately as well? **UPDATE:**                PostGIS is now configured for x86_64-apple-darwin10.8.0           -------------- Compiler Info -------------        C compiler:           gcc -g -O2       C++ compiler:         g++ -g -O2           -------------- Dependencies --------------        GEOS config:          /usr/local/bin/geos-config       GEOS version:         3.3.3       PostgreSQL config:    /usr/local/pgsql/bin/pg_config       PostgreSQL version:   PostgreSQL 9.1.3       PROJ4 version:        48       Libxml2 config:       /usr/bin/xml2-config       Libxml2 version:      2.7.3       JSON-C support:       yes       PostGIS debug level:  0       Perl:                 /usr/bin/perl           --------------- Extensions ---------------        PostGIS Raster:       disabled       PostGIS Topology:     enabled           -------- Documentation Generation --------        xsltproc:             /usr/bin/xsltproc       xsl style sheets:            dblatex:                     convert:                     mathml2.dtd:          http://www.w3.org/Math/DTD/mathml2/mathml2.dtd      Does this mean that PostGIS is now installed? Why is the PostGIS Raster disabled? Also when i follow the tutorial I am getting this error               createdb -E UTF8 template_postgis     createdb: could not connect to database postgres: FATAL:  role "root" does not exist      Then i checked for the command               sudo su - postgres      and it returns 1 for `echo $?`


Unable to create spatial database for geodjango

> **Possible Duplicate:**   >  How to verify a PostGIS installation on OS X? I am trying to install PostGIS for MacOS X and uptil now this is what i got               PostGIS is now configured for x86_64-apple-darwin10.8.0           -------------- Compiler Info -------------        C compiler:           gcc -g -O2       C++ compiler:         g++ -g -O2           -------------- Dependencies --------------        GEOS config:          /usr/local/bin/geos-config       GEOS version:         3.3.3       PostgreSQL config:    /usr/local/pgsql/bin/pg_config       PostgreSQL version:   PostgreSQL 9.1.3       PROJ4 version:        48       Libxml2 config:       /usr/bin/xml2-config       Libxml2 version:      2.7.3       JSON-C support:       yes       PostGIS debug level:  0       Perl:                 /usr/bin/perl           --------------- Extensions ---------------        PostGIS Raster:       disabled       PostGIS Topology:     enabled           -------- Documentation Generation --------        xsltproc:             /usr/bin/xsltproc       xsl style sheets:            dblatex:                     convert:                     mathml2.dtd:          http://www.w3.org/Math/DTD/mathml2/mathml2.dtd      Does this mean that PostGIS is now installed? Why is the PostGIS Raster disabled? Also when i follow the tutorial I am getting this error               createdb -E UTF8 template_postgis     createdb: could not connect to database postgres: FATAL:  role "root" does not exist      Then i checked for the command               sudo su - postgres      and it returns 1 for `echo $?`


How can I use the SLD and SLD_body arguments?

How can I use the SLD and SLD_body arguments of a GetMap request with the mapA.overlayMapTypes.ImageMapType object?               var wmsOptions = {     alt: "",     getTileUrl: function (tile, zoom) { return gettileUrl(tile, zoom, TileSources) },     isPng: false,     maxZoom: 17,     minZoom: 1,     name: "",     tileSize: new google.maps.Size(256, 256)     };               var openlayersWMS = new google.maps.ImageMapType(wmsOptions);          mapA.overlayMapTypes.setAt(0, openlayersWMS);


How to perform IDW interpolation and mean estimation on county level using ArcGIS for Desktop?

I am absolutely new to GIS. I have imported a map with information in the counties of Germany. Additionally I have added a layer with information on SO2 concentration at various measuring stations in Germany: ![enter image description here](http://i.stack.imgur.com/POAkn.jpg) Additionally, I have already interpolated the SO2 data using IDW (based on the suggestions from the Federal Environmental Agency, who distributed the data): ![enter image description here](http://i.stack.imgur.com/DwgVg.jpg) I am now struggeling with calculating area means. That is, for my analysis I need one value of SO2 concentration for each county in Germany, which I can export to R. I would very much appreciate your support! Thanks


How to get size of file geodatabase feature class on disk?

Is there a simple way to determine the amount of hard drive space a feature class takes up? I feel like I'm missing something simple, but I don't recall a method that does so. You would think that right-clicking a dataset in ArcCatalog would do it for you. The best I've ever been able to do was get the size of the entire gdb by looking in Windows Explorer. If there isn't a way to do this in the ArcCatalog UI, I'd still be interested in a method to do so in code. Any ideas?


Historical U.S.G.S. Georeferencing

I have downloaded a historical USGS map that is suppose to be a geoPDF. My understanding is that QGIS cannot directly read geoPDF's. I have not had any luck in converting it to a geoTIF in order to bring into QGIS.   1. Has anyone had any success in doing this? Is there another way that someone knows to use the geoPDF with QGIS.   2. I converted the geoPDF to a TIF and attempted to use the georeferencer plug-in. Everytime I try doing it te results are not correct.![Georeferender screenshot](http://i.stack.imgur.com/jHHOf.jpg) ![Georeferencer result](http://i.stack.imgur.com/yfrDf.png)


Use MATLAB mapping toolbox to connect to ArcIMS Server or Geodatabase connection

is there a way to connect to an ArcIMS server or to a Geodatabase connection using the MATLAB mapping toolbox? I see that it allows connection to WMS servers, but don't see how to connect to the ArcIMS server or the geodatabase we have. (The geodatabase claims it's type as 'Oracle Enterprise Geodatabase'.) Thanks.


Lines that intersect vs. Lines that touch - how to distinguish?

How do I distinguish between these cases in ArcGIS 10? I am looking at the Trim Line function but that's not what I want (destructive).   * **Case 1** : Both endpoints of a line touch another line    * **Case 2** : Both endpoints dangle over the lines it intersects The real world use case is to distinguish between service roads connecting both roadways of a freeway, and other cases of roads intersecting with freeways. ![enter image description here](http://i.stack.imgur.com/a4ov9.png) ![enter image description here](http://i.stack.imgur.com/qmWqu.png)


Microsoft Visual C++ Crash when build qgis 1.8.0 Windows 7 64bit

I have a problem building the source of qgis1.8.0 in Windows 7 64bit. i am trying to follow this instructions in this page: http://hub.qgis.org/wiki/17/Building_QGIS_from_Source?version=2#Building-on- Windows the dependencys are all installed succesfully and the generation of qgis1.8.0.sln is succesful too. but in the release solution configuration build, always Microsoft Visual C++ crash without problem report. Anybody know how to fix the problem with Microsoft Visual C++? Thank you.


Is there a "yellow pages" web service for Europe?

I need to put some European businesses on a map, but I only know the country of these businesses. I am looking for a way to obtain a lat/lon position or an address for each. What "yellow pages" web service allowing to do that exist? I am looking for something like yellowapi, but for Europe.


I’m looking for a way to easily trace a transmission line for a certain distance. Here is the scenario that I am working with. We have an issue with our transmission line; our OMS tells us that there is a problem “X” number of miles from substation “Y”. I want to be able to start from that substation and trace that transmission line upstream for the number of miles indicated to the location of the issue so we can dispatch a crew to that location. I was hoping that someone had something that worked similar to the “Utility Network Analyst” tool. Any ideas?


missing tables vertices_tmp and vertices_tmp_id_seq pgrouting workshop

I'm using OSgeo 6.5 dvd and studing pgrouting workshop for get shortest path. I created database call "routing" and used "template_routing" for create tables but only 3 tables created. So then I executed following commands               # become user "user" (or run as user "user")     sudo su user          # create routing database     createdb routing     createlang plpgsql routing          # add PostGIS functions     psql -d routing -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql     psql -d routing -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql          # add pgRouting core functions     psql -d routing -f /usr/share/postlbs/routing_core.sql     psql -d routing -f /usr/share/postlbs/routing_core_wrappers.sql     psql -d routing -f /usr/share/postlbs/routing_topology.sql      then 7 tables created but few tables are missing when compare to workshop.. Workshop output;               List of relations     Schema |        Name         |   Type   |  Owner     --------+---------------------+----------+----------     public | classes             | table    | postgres     public | geometry_columns    | table    | postgres     public | nodes               | table    | postgres     public | spatial_ref_sys     | table    | postgres     public | types               | table    | postgres     public | vertices_tmp        | table    | postgres     public | vertices_tmp_id_seq | sequence | postgres     public | ways                | table    | postgres     (8 rows)       My output;               List of relations     Schema |       Name        | Type  | Owner      --------+-------------------+-------+-------     public | classes           | table | user     public | geography_columns | view  | user     public | geometry_columns  | view  | user     public | nodes             | table | user     public | spatial_ref_sys   | table | user     public | types             | table | user     public | ways              | table | user     (7 rows)      I got error like this               NOTICE:  CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial column "vertices_tmp.id"     CONTEXT:  SQL statement "CREATE TABLE vertices_tmp (id serial)"     PL/pgSQL function "assign_vertex_id" line 15 at EXECUTE statement     #########################     size of streets: 4093     size of splitted ways : 17328     finished      when executing this command               osm2pgrouting -file "data/sampledata.osm" \                           -conf "/usr/share/osm2pgrouting/mapconfig.xml" \                           -dbname routing \                           -user user \                           -clean      how do I get create missing tables


How to use expression in QgsVectorlayer label by using python?

how to show the two field values as a label on features. I have done it for a field called "ErrorDescr" with this i need to show another field values. Other field is "MarkerId"               layer.setCustomProperty("labeling", "pal")         layer.setCustomProperty("labeling/enabled", "true")         layer.setCustomProperty("labeling/fontFamily", "Arial")         layer.setCustomProperty("labeling/fontSize", "10")         layer.setCustomProperty("labeling/fieldName", "ErrorDescr")         layer.setCustomProperty("labeling/placement", "2")      is it possible to bring the output like this: ![enter image description here](http://i.stack.imgur.com/M9jmP.png) ![enter image description here](http://i.stack.imgur.com/0LtcH.png)


How can I distinguish the driving pattern of those two different users?

## ![Places travelled by the first user](http://i.stack.imgur.com/5MTsc.jpg) ![Places travelled by the first user](http://i.stack.imgur.com/HmWob.jpg) I have the places travelled by one user. I do have places travelled by another user in the same vicinity. How can I simplify the map and extract signatures of both the users? I have more or less similar pattern for another user, but I can't post them due to point limit. Anyway here it's. how we can I distinguish the driving pattern of those two different users? Like two different neighbors who lives in a same address and goes to the same office, but they have different patterns of driving and different office schedules. I wanted to find out the probabilty of the two persons who behaves more or less exactly. Depending on the resolution of the map, I wants to figure them, where they are, how often they are.


How can I change the style of marker in leaflet (from GeoJSON)?

I'm serving GeoJSON to leaflet and by default it get a blue icon marker. I'm trying to change the style so I'll be able to use the feature properties as part of the style , but no matter what I do , the maker is the same. What am I doing wrong ? GeoJSON :               {"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[35.1966,31.7825]},"properties":{"GPSId":"2","DateTime":"7/3/2013 4:47:15 PM","GPSUserName":"2","GPSUserColor":"#FF5500"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.2,31.780117]},"properties":{"GPSId":"6","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake1","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.201715,31.779548]},"properties":{"GPSId":"15","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake10","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.200987,31.779606]},"properties":{"GPSId":"16","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake11","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.200987,31.780522]},"properties":{"GPSId":"17","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake12","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.201435,31.780981]},"properties":{"GPSId":"18","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake13","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.200806,31.781145]},"properties":{"GPSId":"19","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake14","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.200856,31.780188]},"properties":{"GPSId":"20","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake15","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.200145,31.780276]},"properties":{"GPSId":"21","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake16","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.201517,31.780699]},"properties":{"GPSId":"22","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake17","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.20321,31.780133]},"properties":{"GPSId":"23","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake18","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.199852,31.78034]},"properties":{"GPSId":"7","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake2","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.200613,31.780117]},"properties":{"GPSId":"8","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake3","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.200613,31.780691]},"properties":{"GPSId":"9","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake4","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.199326,31.780789]},"properties":{"GPSId":"10","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake5","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.19999,31.780965]},"properties":{"GPSId":"11","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake6","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.201142,31.780699]},"properties":{"GPSId":"12","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake7","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.201312,31.780511]},"properties":{"GPSId":"13","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake8","GPSUserColor":"#00FF57"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[35.200642,31.780109]},"properties":{"GPSId":"14","DateTime":"7/12/2013 9:05:00 AM","GPSUserName":"fake9","GPSUserColor":"#00FF57"}}],"name":"Points","keyField":"GPSUserName"}      This is how I add the layer :               function drawData() {     $.ajax({         type: "POST",         contentType: "application/json; charset=utf-8;",         url: 'Service.asmx/GetItemsFromDBGeoJSON',         data: '{}',         dataType: "json",         success: function (data, textStatus, jqXHR) {             var geojson = jQuery.parseJSON(eval(data).d);             map.removeLayer(geojsonLayer);             geojsonLayer = L.geoJson(geojson, {                                 pointToLayer: function (latlng) {                                         return new L.CircleMarker(latlng, {                         radius: 5,                         fillColor: "#A3C990",                         color: "#000",                         weight: 1,                         opacity: 1,                         fillOpacity: 0.4                     });                 },                 onEachFeature: function (feature, layer) {                     layer.bindPopup(feature.properties.GPSUserName);             }             });                  map.addLayer(geojsonLayer);                     },         error: function (jqXHR, textStatus, errorThrown) {             console.log(errorThrown);         }     });      } And I see nothing (console.log confirm I enter the pointToLayer section). If I delete this part :               pointToLayer: function (latlng) {                                         return new L.CircleMarker(latlng, {                         radius: 5,                         fillColor: "#A3C990",                         color: "#000",                         weight: 1,                         opacity: 1,                         fillOpacity: 0.4                     });                 },      I get blue markers on the map (but I don't want that style). What am I doing wrong ? How can I decide which style to use ? Thank you.


Run Python child script using Python Add-In button class?

I have a Python script which I want to execute using Python Add-In button class. Right now, I am using following:               class child(object):         """Implementation for Toolbar_addin.button2 (Button)"""         def __init__(self):             self.enabled = True             self.checked = False         def onClick(self):             os.system('C:/temp/child.py')      but it returns nothing when I click Python Add-In button as part of sub-menu. Is it the right way to fire child scripts using button class? Note: child script works perfectly as a stand alone script


Using PHP with a web application?

I have been working on creating a web mapping application using ArcServer 10 and the JavaScript API. Recently I was told that queries need to be run using PHP due to prior work by another team. The person that worked on the initial PHP coding has been migrated to my team, but has little experience with geospatial work. In contrast, I have more experince with geospatial work, but I have a limited exposure to working with PHP. Is it possible to have the PHP interact with ArcSDE and/or PostgreSQL databases through the JavaScript API? Our end goal is to allow users to query (both through geospatially selecting data and typing queries) via our web mapping application. Users could then click on a "more info" button which retrieves more detailed information about that record in a format that resembles the form it was entered into the database. Any hints and/or resources would be much appreciated.


Make a thumbnail of a raster in PostGIS

I'm fiddling around trying to create a thumbnail of a fairly large (originally 27MB) raster, chunked into 64x64 blocks. I've got the following and it works, quite well, but I'm wondering if there is a way to make it more efficient, or if it is just totally mental and shouldn't be attempted. It suffers from various flaws - that it is not really so reusable, because it is quite specific, for example.               SELECT ST_AsPNG(ST_Reclass(ST_Union(rastnxn), 1, '[0-10]:1-65535', '16BUI', 0))     FROM (             SELECT filename, ST_Resample(rast, 8, 8) as rastnxn             FROM rasters              WHERE filename = 'someraster.tif'     ) as subset     GROUP BY filename;      What do you think? Are there other (better) ways to quickly get the original raster back out in a 'thumbnail' style?


How to merge several google map images into one?

I want to have a high resolution aerial photo of a catchment area. I took some images from google maps and georeferenzed these and saved them as a layer file. but how can I merge them now that I have one image for the whole catchment area? The merge tool didn't work. The images are .png s. I'm sorry, I'm new to ArcGIS and I couldn't find an answer in the web. Also a mosaic layer doesn't seem what I want... Thanks for your help!


Examples of using GIS in outer space

is there any examples or use cases of using GIS in outer space and in no-earth related use ?


viewing GMapCatcher downloaded tiles in ArcGIS Explorer? (as basemap?)

We have a full set of 20 zoom levels of downloaded satellite imagery that we downloaded with (and view in) GMapCatcher - great program! All of these operations are done offline (for a Search and Rescue team in the field). However we'd really like to use this downloaded tile set as a basemap in ArcGIS Explorer, which is a much more capable viewing and editing tool. Can anyone provide a path to get there, ideally a very simple path without having to run a local web server process? Seems like it would just involve rearranging / renaming the downloaded tile sets into a directory and file naming structure that ArcGIS Explorer expects?? I'm new to the concept of tile sets so hopefully there's an easy and 'obvious' solution? Thanks Here's the question where we rooted out the solution to download tiles in the first place: download ESRI World Imagery basemap for offline use? (we initially thought ESRI World Imagery was the way to go - and it would be - but gmapcatcher takes from a different source which appears to be just as good) And here's a question where someone rooted out the gmapcatcher file naming convention: http://stackoverflow.com/questions/3523402/google-maps-and- gmapcatcher-file-directory-naming-system And a (current?) summary of ArcGIS Explorer's caching capabilities on the bottom half of this page: http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#using_a_map_cache.htm


Set bounds based on layer size

I am using GeoServer+OpenLayers and I have a base layer (Google map) and some additional layers (OpenLayers.Layer.WMS); users can show or hide these layers. I would like when user show a layer then the map should zoom to the area where layer has data. I know I have to use map.zoomToExtent(bounds) but I don't know how get this information from the layer. Do you have any suggestion? Thank you bye stefano


How to create random point in according polygon for each dataset entry in a list (with R)

I have an area divided into polygons, and a dataset of observations which has a common field with the polygon layer. I now would like to generate a random point for each dataset entry within the according polygon. R was already a great help in digesting the dataset and even to produce shapefiles with summed values of the dataset, so I dare to post this here in the gis.stackexchange. It would be nice to have a solution in R, cause i have to create multiple subsets which can so easily be done there by a loop, so i do no have to filter the data manually in QGIS all the time. Other solution are welcome as well. ![enter image description here](http://i.stack.imgur.com/fsjpm.png) Polygonlayer: 39 Polygons               Polyid     A1     O19     A13      Datalist: 1360 Data entries               Polyid, value1, value2, value3     A17, ..., ..., ...     O6, ..., ...     A3, ...     A4, ...     O6, ...     A8, ...     A17, ...      Goal: -> Having a point-shape with 1360 random points, which reside in the according polygon and have all attributes of the datalist.


Button that allows project search and zooms to site once executed

I am trying to create a button that will execute a Python script. I have limited Python experience. What we are trying to accomplish is to recreate these steps:   1. Query on project Site and Radius Layers (both in an SDE)   2. Zoom to the site   3. Adjust scale to 10,500 I have pasted the code I wrote while trying to figure this all out, see below:               import arcpy     mxd = arcpy.mapping.MapDocument('CURRENT')     df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]     df.zoomToSelectedFeatures()     df.scale = 10500     arcpy.RefreshActiveView()      This works, but is not anything that I can't do with ArcMap tools.


How to use an ArcGIS Server cache directory with multiple (differently named) map services?

We have a map service named 'X' that created and uses tiles in a cache directory 'Folder_X'. I'd like to create a second map service named 'Y' that uses the same cache directory - that is, it serves up the same tiles by a different service name. So far, I see that when creating a service in ArcCatalog, it insists on using a cache directory named to match the service name, which of course isn't what I want. I see that there is a 'Folder_X'.cfg text file in the ...ArcGIS\server\user\cfg\Folder directory that I can edit to point to a different folder, but it seems to keep getting overwritten with the default value. Ideas?


Rerendering OpenLayers in JSF2

did anyone try rerendering OpenLayers in JSF2? I am using a4j:ajax events, I mark the render atribute with `render="map"` where map is naturally the id of the openlayers div tag, and I use `oncompleate="init()"` method to reload the background data. And it works apart from the fact that the ''old' map stays in place and the 'new' one is displayed belove. If I use the rerender event again (i.e. changing some JSF components like selectOneMenu) than a 3rd map is added to the bottom, and so on and so on... does any one know a ways to fix this?


How should I publish an arcgis toolbox via arcobjects (c#)?

I've been able to create map and image services by creating, adding, and starting configurations through an IServerObjectAdmin interface to a version 10.0 (sp4) ArcGIS server. Now, I'm shifting my focus to publishing toolboxes as GPServer configurations. I'm referring to the existing cfg file (found here ArcGIS\Server10.0\server\user\cfg) and setting properties exactly as found in this file. Regardless, when I try to add the configuration, I get an RPC failure exception and the SOM service on the targeted server has crashed. I'll include some stripped-down sample code to show how I'm going about adding configurations. I'd appreciate any ideas on how I could better go about publishing a geoprocessing toolbox. The underlying goal is to quickly replicate services from a failing (or failed) ArcGIS server onto another server to decrease downtime.                ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);      IGISServerConnection gisServerConnection = new GISServerConnection();      gisServerConnection.Connect(ServerName);      _serverObjectAdmin = gisServerConnection.ServerObjectAdmin;      var config = _serverObjectAdmin.CreateConfiguration();      // set config settings and other properties here      var config2 = (IServerObjectConfiguration2)config;        // set other settings accessible via Configuration2 interface      _serverObjectAdmin.AddConfiguration(config2);      _serverObjectAdmin.StartConfiguration("folder/service", "GPServer");


Generate channel network (rainwater run off) - which algorithm is the best?

I want to compute DEM for a whole country (cca 79 000 sqr. km) and I need to be hydrologically correct as much is possible. After, for this correct DEM I need to compute drainage lines of surface runoff. I can use 4G model, which is a cloud of descrete points 5x5 m. But this is secondary. Which algorithm should I use to solve this? On sample data I tested TauDEM, which appears to be a really good tool, but when it's supposed to make raster with drainage lines, the output raster has only one value (whole black). I tried it on ArcGIS 10.2 and 9.3 (on Win 7). Both were the same, first few steps ok, then black raster. I tried to use TauDEM in QGIS, but there was an error: > "Oooops! The following output layers could not be open".. I checked paths to toolbox and everything was fine. Next tool that I tried was ArcHydro toolbox, but this tool seems to be very inaccurate. Does anyone know a good tool to simulate drainage lines? Or why I cant do it with TauDEM? **EDIT:** As a final result I need shapefile of runoff lines. I already have some, but there are many error like crossing of lines, lines arent snaped to next segment and so on. Now I'm trying to compute them again without these errors. Example of runnof lines: ![enter image description here](http://i.stack.imgur.com/u3OIa.png)


How can I add an arrow to a line?

I want to have arrow heads at the end of a number of lines. I add these through _Line properties --> Line decorations_. It looks nice and all when displayed in the legend: ![enter image description here](http://i.stack.imgur.com/qQ7x5.png) But in my map, due to different angles it looks more like this: ![enter image description here](http://i.stack.imgur.com/wkUOE.png) or this: ![enter image description here](http://i.stack.imgur.com/yPtwn.png) The arrowhead is not centered on the line, it is not even at the end of the line! It looks even worse if I have thicker lines (which I want). I have tried to fix this with adding a displacement, but I can't do that in a direction relative to the line, only relative to the map (x/y directions). What can I do to fix this? Or is there an alternative way of adding arrows to my map, preferably with my lines as starting ground? I have noted this question, which to some degree deals with the same issue. Although it is asked for Arcgis 9.3 and the accepted solution is not solving my problem (I want exactly one arrow head for each line feature).


The names of all the tables created are forced to be converted into lowercase in Pyspatialite 3.0.1

after the update of PYSPATIALITE from 2.3.1-3 to 3.0.1-1 in QGIS, the names of the all the table created by SQLite3 are forced to be converted into lowercase. After fallback to 2.3.1-3, the issue has been recovered. Is this a bug of the 3.0.1-1?


Drawing curved lines in CartoDB?

I am experimenting drawing curved line from Origin to Destination in Cartodb. I was able to do so once, however, failed the second and third time. Could anyone offer me some insights into the following code and help me debug? I am using CartoDB and start with a table of centroid points for all the countries. Step 1:CHANGE THE REFERENCE SYSTEM I used the following code               INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 953027, 'esri', 53027, '+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs ', 'PROJCS["Sphere_Equidistant_Conic",GEOGCS["GCS_Sphere",DATUM["Not_specified_based_on_Authalic_Sphere",SPHEROID["Sphere",6371000,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Equidistant_Conic"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Standard_Parallel_1",60],PARAMETER["Standard_Parallel_2",60],PARAMETER["Latitude_Of_Origin",0],UNIT["Meter",1],AUTHORITY["EPSG","53027"]]');      Step 2:CREATE THE LINES               update world_borders_coarse_2013     set the_geom=     (select st_transform(       st_segmentize(         st_makeline(           st_transform(world_borders_coarse_2013.the_geom,953027),           st_transform(b.the_geom,953027)),100),4326)      from world_borders_coarse_2013 b      where b.name='China'      )      It should give me the curved lines between China to all the other places. However the reality is that I have the "the_geom" column as "line", but nothing shows in the "map view". Would anyone give me some suggestion to change the code?


QGIS 2.0 Can I get panels to display as tabs

I recently got myself very confused by getting the "Layers" panel hidden under the "Layer order" panel and then spent hours wondering why I could no longer right click on the layer to get the menu. I like to have the option of floating or tabbed displays for panels. Is this possible? I have searched the manuals and gone through the setting but I may well have missed something.


Cannot merge several input datasets in ModelBuilder?

I am the new one in ModelBuilder, so have faced some troubles with merging my resulted feature class with my set of input dataset. Could you please help me to find the mistake? ![enter image description here](http://i.stack.imgur.com/WdGD2.png)


Merge two vector layers with different granularity

Beginner at QGIS here. I have two vector layers. One represents country boundaries for the whole world. The other one represents region boundaries, but only for OECD countries. I would like to create a unique layer that would use country boundaries for non-OECD members and region boundaries for OECD members. How could I go about this? Thank you!


How to multiply raster DEM with a linear graph value

I would like to multiply my Raster DEM with a linear graph value y = mx + C. The graph values look as follows: ![enter image description here](http://i.stack.imgur.com/sInsC.png) I want to make a new raster where each cell will represent a damage factor from above graph and by taking into account corresponding cell DEM value. It means, if any particular cell in my DEM raster has a elevation value 10 m, then in my new computed raster this will be damage factor 1. Similarly, any cell of DEM raster has a value of 20 m, the computed new value will be 3 as shown in the graph. I am familiar with the approach called 'Reclassify'. But reclassify requires a certain range of value, for example elevation 10 - 20 m will be damage factor 1.5. I want to compute every pixel of DEM raster and redefine it in the form of damage factor by following the linear equation. Can I write an equation such as y = m*x + c in raster calculator in Qgis /Grass /ArcGIS?


How can I show a interactive map?

I am trying to develop a web app like this. That is, I want to show a map with points and when the users clicks on a point, it should display some information about it. Can I do that with TinyOWS? This app requires WMS, WFS or both services?


Obtain voronoi polygons which extend till the boundary of another polygon

I have certain hubs (coloured yellow) in a district (coloured light blue). I need to find polygons indicating the closest hub to every point in the district. The voronoi polygons that I obtained using QGIS are coloured brown in the image. However, I need the voronoi polygons to fill the outer boundary as I need the polygons to fill the entire district. ![enter image description here](http://i.stack.imgur.com/85Tcw.png) Adding a buffer region while making the voronoi polygons and then using the intersect function to crop the polygons to the district boundary gives me wrong polygons as shown by the following image: ![enter image description here](http://i.stack.imgur.com/GMkvN.png) How do I generate the voronoi polygons that I require?


Given a BBOX and Zoom Range, Return All TMS Addresses

Given a bounding box using WGS84 lat long pairs (represented any way, not important to me) and a range of zoom levels, I'd like to be able to generate a CSV representing all standard z/x/y TMS addresses for a web map in a spherical mercator projection. For example, given the city of Seattle, with a BBOX of: `(47.75, -122.14), (47.53, -122.53)` and desired zoom levels 12-16, i'd like to see a delimited list something like:               z  |  x   |  y     ----------------     12 | 656  | 1429     12 | 655  | 1429     ...     14 | 2626 | 5724      Does anyone know of any way to do this? Preferably in Python? Thanks, Matt