title: Change the size of an OpenLayers.Control.OverviewMap

text: I create my OpenLayers.Control.OverviewMap with a given size but I would like to change it when certain conditions are met. I have tried two approaches with no luck... My first try was just changing its width and height via CSS attributes:               $("div.olControlOverviewMapElement>div.olMap").css('width',320);      It does change its visual size but then the overview map doesn't work properly, the "new gained" space in the overviewmap is not usable (can't be used to drag the view rectangle) My second try was simply changing its size property:               ovMap.size = new OpenLayers.Size(320,240);      but it doesn't have any effect to the overview map. Is it possible to change its size once it's been created? Extra information: Using OpenLayers-2.10, and in both cases I have tried calling the update() method of the control.


title: Can't drop table with geography column

text: I imported shp to postgis 2.0.1 with shp2pgsql and chose to use geography instead of geometry. However, now when I try to drop the table, the pgadmin/sql console/phpPgAdmin freezes. I can't neither truncate it or change the columns. Any help would be appreciated :-).


title: Exporting Grid from R to use it in ArcGIS

text: i want to export a grid from R into format readable by ArcGIS. how can i do so? jones


title: How to import selected features from QGIS to PostGIS?

text: I am trying to import selected features from Quantum GIS to postgresql directly. I do not know how to do it. Actually, my problem is, I have full country road network. But, I need to cut road network of a small area. If i import full country road network using Quantum GIS to postgresql, I can do it. But, I can not import small area road network after extracting that small area. Something, has been change after cutting sample area. But, I do not know what it is?? It is very strange. If anyone have the solution. Please let me know.


title: Given long, lat, x and y, how do I find the projection?

text: I am using an app called farsite that outputs shapefiles that show how forest fires will grow. I am getting output in coordinates as X and Y values rather than (lon,lat) and am looking for a conversion routine to (lon, lat). If I knew the name of the coordinate system it might help my search, but I do not even know that. I have gone to google maps and have looked at the expected (lon, lat) so I have a rough translation equation, but I am sure that someone else has a better one (mine is linear with a scale and offset, which I fear is too simplistic) Here is a sample point (X, Y): 162206 386691 (Lon,Lat): -115.326662 47.582952 Can someone please steer me to a reference or conversion routine? Thanks in Advance - Steve Tufty


title: OpenLayers canvas renderer - redraws all features on selecting a single feature

text: I am currently trying to learn more about OpenLayers, and I'm coming up against performance / behaviour issues that I wouldn't expect to see. To elaborate... I have combined this example for generating lots of random points with this example on highlighting / changing the icons of features on selection. The result is available in this JSFiddle. The (very basic) application prioritises the Canvas renderer, so that the points layer is defined like this:               var layer = new OpenLayers.Layer.Vector('points', {renderers: ['Canvas', 'SVG', 'VML'],     styleMap: new OpenLayers.StyleMap({         "default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({             externalGraphic: "img/marker-green.png",             graphicOpacity: 1,             rotation: 0,             pointRadius: 10         }, OpenLayers.Feature.Vector.style["default"])),         "select": new OpenLayers.Style({             externalGraphic: "img/marker-blue.png"         })     })});      The Canvas renderer is nice because zooming and panning works well with thousands of points (unlike SVG) but clicking / feature selection is much slower than SVG. I was surprised to see that all feature icons are redrawn before the selected feature's icon changes (to marker-blue.png). This is especially apparent in Firefox, but less noticeable in Chrome and too fast to see in IE9. This question on SO suggests that there could be an issue with how OpenLayers is interacting with the Canvas, but unfortunately I don't know enough about HTML5 or OpenLayers (yet) to be sure. Does anyone have experience with OpenLayers / Canvas renderer? I am interested in any ways of speeding up feature selection when there are lots of features - whether it's the time taken to figure out which feature was selected, or simply changing the selected feature's icon. Any help much appreciated.


title: How to Run Ad Hoc Database Queries in Open Jump?

text: Which plugin allows you to run ad hoc queries from postgis in Openjump? How do you install it in Ubuntu?


title: Tick boxes for a qgis plugin written in python

text: in a python plugin for qgis I want the user to be able to select one or more of several options via tick boxes. I imagine it to look like e.g. Qgis 2.2 tool "Vector" -> "Data Management Tools" -> "Join attributes by location". In the "Attribute Summary" section of this tool the user is able to tick several functions on and off: ![enter image description here](http://i.stack.imgur.com/eWgEW.jpg) At the moment I use a string input (`##options=string "option1,option2,option3"`). The user has to enter all options separated by a comma. This works but it does not look very pretty. Is this possible with Pyhton? Any suggestions? Thanks in advance.


title: Cache geodjango query with bounding box filter

text: Im using geodjango (postgis) to retrieve points contained inside a bounding box (made by leafletjs), it works so nice, but now I want to cache this query. A tipical query is one like this:               /points?xmax=193.0078125&xmin=-200.7421875&ymax=49.83798245308484&ymin=29.53522956294848      This kind of query will never be cached, is there a way to cache this?, I mean, achieve some cache hits, assuming would appear more/less points in the viewport than would strictly correspond. Some ideas...   1. removing decimal position in the numbers   2. passing zoomlevel as a param should be better/mandatory? Thanks for your thoughts. **Solved** :   1. Use https://pypi.python.org/pypi/django-geojson to make a simple view which uses (x,y,z) as params to do filter your queryset.   2. Use http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Tile_numbers_to_lon..2Flat._5 to make the filter in the view   3. Use https://github.com/glenrobertson/leaflet-tilelayer-geojson/ for making a layer in you map which makes your tile request to the previous view.


title: Create custom raster pyramid using arcpy in ArcGIS 10.2

text: I have a arcpy script that runs the Point Density tool several times for the same extent, using the same number of neighborhood cells, but with cell size increasing at an multiple of 2 with each pass. The purpose of my point density rasters are purely data visualization, and I plan on publishing my point density visualization using ArcGIS Server 10.2. The idea is to make the point density visualization more specific as you zoom in the map, e.g switching to point density raster of ever smaller cell sizes as you zoom deeper in, and the point density rasters become less generalized. This imposes a scale limit for each of my point density raster, much the same way as pyramid levels in a raster pyramid. So my question is; is there a way I can build a custom raster pyramid and input my own point density rasters as the pyramid levels? At the moment I have 7 scales for my rasters, meaning I would need 7 layers in my map service when really only one would be needed if I could generate my own pyramid. I have tried to Google for Build pyramid tools and .ovr file management for arcpy, but so far I haven't found any solutions yet. Any tips would be greatly appreciated!


title: Getting an empty geometry when retrieving the envelope of a GroupElement in ArcObjects: what might be wrong?

text: I am working in ArcGIS 10.0 (ArcMap) and Python 2.6.5 and in the Data View. I have an IGroupElement3 to which I add a TextElement and up to several RectangleElements. I want then to retrieve the envelope of the GroupElement, recenter that envelope, and set the envelope as the new geometry of the GroupElement. The intent is to reposition (translate) the GroupElement. Here is a snippet:               pGrpElem = CType(pGroupElementFull, esriCarto.IElement)     pEnv = pGrpElem.Geometry.Envelope     pEnv.CenterAt(pCtrPoint)     pGrpElem.Geometry = pEnv      When the code runs, I get an error on the CenterAt method, saying I am performing an operation on an empty geometry. I checked, and indeed the pEnv is empty. So I have a few questions: (1) Is this a valid method for moving a GroupElement? (2) If not, how should I be doing it? (3) If so, then I have a problem elsewhere. Do I have to add the component elements - and the GroupElement for that matter - to the display's GraphicsContainer to get them to "gel" and have valid envelopes? I was trying to avoid the GraphicsContainer step, because I really don't want the graphics to draw to the screen. The GroupElement is really for loading into an annotation feature. When I use the GraphicsContainer the screen drawing can get messed up unnecessarily. The graphics draw anyway when they are added to annotation, so I don't need two copies onscreen. (4) If, as described above, I need to do something in addition to simply adding elements to the GroupElement to make their geometries visible to the GroupElement, how might I do that and avoid drawing the graphics to the screen at the same time? Thanks for the help, all.


title: What is the difference between DEM, DSM and DTM?

text: I am listing some of the acronyms used in our work and had to stop to think about whether to list these together or separately. In some circles they are synonymous, in others they have distinct meanings. What do you consider them to mean, or is there an agreed-upon definition for each?


title: Converting ERDAS (*.img) file into headerless binary file?

text: I am having trouble converting an ERDAS (*.img) file into a headerless binary file. I want to use those images in the TIMESAT program. I'm trying to do this in IDRISI 32 but there is an error saying: > minimum values exceeds maximum value during the process. What does the error mean, or how can I achieve this task using another program? For example, ArcGIS, ENVI, ERDAS, but not GDAL (with which I am unfamiliar). It seems I need to write some code to work in GDAL and I am not a coder.


title: Getting "Segmentation fault: 11" with ogr in Python

text: This is the code I'm trying to run:               In [1]: from osgeo import ogr          In [2]: datasource = ogr.Open('testdata.shp')          In [3]: datasource.GetLayerCount()     Out[3]: 1          In [4]: layer = datasource.GetLayerByIndex(0)          In [5]: layer.GetName()     Segmentation fault: 11      It doesn't matter what datasource I use. I've tried with several (even different formats) but I keep getting the same result. Anyone faced this issue before? I've tried reinstalling `gdal` (in my computer) and `GDAL` (Python bindings) but still no luck. The weirdest thing is that it was working fine 2 days ago, and suddently started failing.   * OS X v10.8.5   * GDAL==1.10.0


title: How to automatic reload value map attribute

text: I'm using the 'value map' widget and have allready load data from a layer. However i've changed the data in the layer but the values still remain the same. Is there a way to reload the data without doing it manually? Thank you, Tiago


title: Remove only a subset of cached tiles of a wmsLayer (GeoWebCache)

text: imagine a wmsLayer defined in geowebcache.xml that forwards, for instance, a STYLES parameter to the WMS service by utilizing a regex-based parameterFilter. As https://github.com/GeoWebCache/geowebcache/wiki/Metastore- removal points out, GeoWebCache generates a MetaStore for all the cached tiles generated, arranged in subdirectories (one my case for each wmsLayer-STYLES combination). I know that there is a way to drop all cached data of a specific wmsLayer. My question: Is there also a possibility to drop only the cached data for a specific STYLES value of a wmsLayer? Thanks, Peter.


title: Geofence routes from point A to point B

text: I'm working on a task where given the coordinates of a line from point A to point B, I need to create a geofence around this line (road route). ![Geofenced route from point A to point B](http://i.stack.imgur.com/3zAf0.png) But based on what I read here https://developers.google.com/maps/documentation/tracks/limits, geofence has a limit of 100 vertices per polygon. Is my understanding correct, that its not possible for me to create the polygon for geofence given all the vertices that will be generated to enclose the route above will be more than 100? Is this task achievable in Google Track API? Thank you in advance.


title: Set ArcGIS Tool Parameter to Obtain From it's own Source?

text: I am building a python tool in ArcGIS. When I build the parameters I will have 3:   1. Choose a shapefile (parameter data type = shapefile)   2. Choose an SQL query (parameter data type = SQL Expression)   3. Choose an output folder for a .xls report (parameter data type = Folder) The first 2 parameters are an either/or scenario. The user will either choose a shapefile for the input or they will build an SQL Query on a very specific feature class (I do not want them to choose both parameters). Whichever option the user choose, the parameter will be eventually used as the 'clip feature' in the arcpy.Clip_analysis function. My first question is:   1. Is there a way to limit the user from choosing both (i.e. if they choose the shapefile option, have the SQL query grey out automatically and vice versa). Maybe using the validator class?   2. I want to 'Obtain From' a very specific feature class to be used in the SQL parameter. The parameter property for 'Obtain From' only allows me to obtain from another parameter. Is there any way to 'Obtain From' it's own source? It won't allow me to enter a default datasource and choose that for the 'Obtain From'. Maybe I can also do this through the validator class as well? Any thought/comment would be welcome. Thanks, Mike


title: How to insert a large feature using C# and ST_GEOMETRY in Oracle

text: I am using the st_polyfromtext command to insert features into an Oracle database like this:               INSERT INTO polygon_test VALUES (      sde.st_polyfromtext ('polygon ((10.01 20.03, 10.52 40.11, 30.29 41.56, 31.78 10.74, 10.01 20.03))', 0) ); I am crafting the sql by hand in a C# web service and using OracleConnection and OracleCommand to execute the sql. I am using bind variables (:) and OracleParameter to bind the attribute values i send in with the spatial feature. My issue is that if the feature is very complex and has alot of vertices then i get an Oracle error about literal string too long. How can i send this coordinate string into Oracle and have it recognized as a feature when i keep hitting this cap? I have tried to assign the OracleParameter as a CLOB datatype and then bind the :SHAPE to that but it still balks.


title: Can Cartodb map show only United States?

text: I have made my map with cartodb, showing where certain work is going on throughout the United States. I want to send it out, but would prefer the map to only show the United States--whereas now it shows Canada and Mexico as well. I am using the free cartodb.


title: How to export a set of layers into multiple PDF(orAI)files, one layer at a time?

text: I am completely NEW to PYTHON(only took a 3-hr entry course in ESRI tutorial. I have a dataset contains files named as "1_A, 1_B, 1_C....12_A,12_B, 12_c,....200_A, 200_B, 200_C..etc." I need to export each feature layer, one at a time , to a PDF or AI file through a COMPLETELY AUTOMATED process. I tried to use Addlayer and Removelayer tool in Model Builder but they all run for one single feature layer once at a time. I coudl not connect the add and remove process to each other, nor could I connect the process through Iterator to the script tool anyway. This means although I use model builder or write python script, I have to change the layers (or the name of layers) hundreds of times and save every layer into a new MXD file and export then to pdfs. I was thinking about turning on one of the layers at a time, export a .ai file with that layer visible, then turn that layer off and move on to the next layer in the list. I'm wondering if you have any suggestion about building the model or the scripts? ![Pic1: I know I can iterate feature classes, but the exporting PDF only work with .mxd files, How can I save each shapefile into different mxd through iterator, before I export them to pdfs? will the export pdfs works in batch process for multiple mxd files?](http://i.stack.imgur.com/slpzp.png)


title: How to open, modify and save a QGIS project with PYQGIS

text: I need to create a stand-alone script for opening a QGIS template project, modify a layer data source, export the Composition and finally save the modified .qgs project into a new file. So far I have only found some examples for QGIS plugins, but of course they don't work for the stand-alone uses. Can anybody give me some helpful hints? Thanks!


title: ArcGIS 9.3 geoprocessing service output consideration

text: I'm developing geoprocessing service which do few processes with geographic data. I would like to get somehow geometry of those data and use it in my web aplication (JS ArcGIS API). Now I'm wondering how to (with best performance) return geometry from service to my application? Now I'm trying manually access to feature geometry, and while iterating throught it I'm concatenate it's coordinates to string. It is very slow method, because I've got about 60-90k vertex (avg) on polygon so concatenating it is taking to much of time. Can anyone see other possibilities to return geometry of features from service to JS with better performance?


title: Need python code example - setting a combo listbox to Null

text: I want to be able to set the value of a field to Null using python, but I get an error. I am using arcpy.CalculateField_management Any help would be appreciated. Rob Smith


title: How to mirror two geodatabases on the fly?

text: I'm new to arcgis and its applications. We have the full suite of arcgis solutions (arcgis server, desktop, arcgis sde) We have a requirement...   1. geodatabase (A & B)   2. A & B reside on 2 different server but connected via LAN   3. A will be updated   4. B will be a replica of A May I know what is the best solution to this issue? the geodatabase can be hosted on oracle DB, personal geodatabase or geodatabase file. I know that arcgistools has the functions to replicate and sync but according to my friend. the synchronization has to been done manually. (creeate a script and execute it periodically. Is there a way to mirror those 2 geodatabase on the fly?


title: What are Pros and Cons to ArcGIS Online Organizational Account?

text: Esri is making a big push towards ArcGIS Online as a means for map applications. They pushed it really hard at the recent Southeast User Conference and did a good job at highlighting its advantages. Primarily: Configuration over Customization I'll admit, this seems to be a significant ROI savings with as simple as some of the maps are to create with little or no programming needed. What I'm wondering is, for any of you that might have experience with ArcGIS Online, what the advantages and disadvantages are to moving towards this product? My organization is looking towards a 30 day trial of the product and want to be prepared if we decide to try and sell it to the decision makers.


title: How to add a polygon from PostGIS ST_AsGeoJSON into Leaflet?

text: I try to use the following function to add polygons to my Leaflet map.               function polygon(geojson)     {         alert(geojson); // alert for testing         layer = L.geoJson(geojson);         layer.addTo(map);     }      When I call the above function with the GeoJSON string I fetched from a PostGIS table using `ST_AsGeoJSON()`, the following string is alterted.               {"type":"Polygon","coordinates":[[[10,370],[20,380],[30,410],[-10,395],[10,370]]]}      But no polygon shows up on the map. As far as I can say, there is no error message. And I can definitely say that a polygon with the points `10 370, 20 380, 30 410, 10 395` shows up on the map, if I insert it using `L.polygon`. What's wrong?


title: "Failed to get property: gid" error in geoserver sql view

text: I have a postgis data with 777 features. In geoserver, i created a sql view with another table. In the wms request i can see all features, in qgis also i can see all features. but in wfs output as csv or geojson i only get 55 features. On doing wfs with openlayers it gives error               <ows:ExceptionReport version="1.0.0"       xsi:schemaLocation="http://www.opengis.net/ows http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows">       <ows:Exception exceptionCode="NoApplicableCode">         <ows:ExceptionText>java.lang.RuntimeException: Failed to get property: gid     Failed to get property: gid     java.lang.String cannot be cast to com.vividsolutions.jts.geom.Geometry</ows:ExceptionText>       </ows:Exception>     </ows:ExceptionReport>


title: Is it possible to force uppercase in a geodatabase string field?

text: I have certain string fields in my geodatabase tables with which I would like to enforce an all-uppercase rule. These fields are ones that do not lend themselves to domains (such as address fields). Is it possible to create a geodatabase string field that supports only uppercase characters inherently? I would like to be able to use the built-in ESRI tools within ArcMap to edit my tables and have them converted to uppercase on the fly. I am using ArcSDE and MS SQL-Server. Answers that utilize front end validation on ESRI's stack are preferred, but a generalized SQL solution that parses inputs on the RDBMS side with something like an INSTEAD OF trigger is acceptable as well. * * * **Edit:** As the accepted answer consists of SQL editing on an RDBMS backend of ArcSDE, Devdatta Tengshe has noted that it can be very dangerous to do this if you do not know what you are doing. It could possibly corrupt your data. If your situation is conducive, you should use BradHard's answer instead (creating a database view as your data source). ESRI does not actually discourage the usage of SQL triggers on the backend to maintain data. However, ESRI instructs in their documentation that you should **not** use SQL on your RDBMS to edit the following ArcSDE data: > **Do not use SQL to edit the following:** > >   * ArcSDE geodatabase system tables > >   * ObjectIDs (or row IDs) that are maintained by ArcSDE or the geodatabase > >   * Tables or feature classes that participate in the following geodatabase > functionality: > >     1. Annotation feature classes and feature-linked annotation > >     2. Archived data > >     3. Cadastral or parcel fabrics > >     4. Domains > >     5. Geodatabase replication > >     6. Geometric networks > >     7. Network datasets > >     8. Relationship classes > >     9. Representations > >     10. Schematic datasets > >     11. Subtypes > >     12. Survey datasets > >     13. Terrains > >     14. Topology > > As long as the fields that you want to force uppercase do not fail any of the requirements listed above, then you can safely use Devdatta Tengshe's SQL trigger method below to force uppercase on whatever individual string fields you desire.


title: Adding 'freehand' data to raster mapping in QGIS

text: Having just worked out how to import raster mapping into QGIS at the correct scale, I'd like to now add useful information to the map like marked routes, labels etc. How can I do this in a 'freehand' manner, rather than importing existing datasets?


title: How to remove layers of detail from an osm file?

text: I want to remove some layers from the osm map of an area. It has all the details like POI, offline routing and all. But I just want the map data. How can I remove this extra layer from the map?


title: How to set all pixels with value <= 0 to "nodata" in DEM raster?

text: I have a DEM raster with pixel values between about 3000 and -0.0003. I need to set all pixel with a value of 0 **and smaler** (<=0) to "nodata" (for later raster calculations and to reduce the filesize). It seems for me that this is a task for the raster calculator (set value of pixels <=0 to "nodata") or a reclassification (set value of pixels <=0 to "nodata" and keep all other values) but I dont know how.


title: ST_Distance Webmercator Error

text: I do have one more question pertaining to ST_Distance. I tried to add to my previous post but I made a new post. When applying the following query to my javascript I get this error:               SELECT c.addressno,      ST_Distance(c.the_geom,       (SELECT the_geom FROM test_alignment_poly ORDER BY the_geom <-> c.the_geom LIMIT 1))      as MinDistance FROM address_pt_subset c where c.addressno='8635'      {"error":["column \"the_geom\" does not exist"]} After some research I found cartodb projections tutorial after applying the following information I was able to get the following query to work on the map view of the dash board:               SELECT c.addressno,the_geom_webmercator,cartodb_id,ST_Distance(c.the_geom,(SELECT            the_geom FROM test_alignment_poly ORDER BY the_geom <-> c.the_geom LIMIT 1))as         MinDistance FROM address_pt_subset c where c.addressno='8635'      Though as stated above when applying the same query to the API I still get a geom error. Is the nested geom value causing the error? I have tried many variation of transforming both geom values without success. I feel like I am close but I have run out of ideas and any additional help would be appreciated.


title: Lots of layers in one or multiple services? (and why)

text: I have a conundrum that I am getting mixed advice on how to go about. Therefore id like to put it to GIS-SE for some justified answers. **Scenario:**   * Client has a web mapping application. Does not want to split into multiple smaller applications. _Although this goes against what the modern day approach is for maps on the web, (i.e. lots of focussed web-map apps over one main web-map) I strongly believe that for some users, trying to replicate a GIS application on the web is ok (sometimes)._   * Client has cached as much of his basemap layers into separate services.   * Client still requires an additional **600-700 layers** in a **dynamic** map service...   * The service will be published with all of these layers **turned off**.   * It is not anticipated that users will turn on more than 10-40 layers at a time. I imagine your initial reaction to this is similar to mine (600+?! WTF?!) However - the requirement is set in stone and why not? Their prior ArcIMS application had similar functionality, so why can't this newer ArcGIS Server product do the same? The users potentially need to be able to cross compare and perform analysis on the entire range of layers, even if the layers belong to other departments. Before you jump to conclusions, the client is a clued up ArcGIS Server admin.   They have administered the 600 layers by all of the best practice rules: e.g. scale ranges combined with definition queries; annotation over labelling; generalising complex layers at small scales; publish as MSDs; etc **Problem** : What is the best approach here?   1. Publish all 600 layers into one dynamic map service?    2. Split the layers into logical groupings (hydrology, planning, ecology, utilities, etc) If you go with #1, and you have a few complex layers turned on. If you want to turn on a simple points layer, then ArcGIS Server will still have to render the entire layers being displayed all over again. If you go with #2, each time your making a request, potentially, the web application could have to make several GET requests for ExportMaps from the individual map services (is this bad, or does it create additional load to ArcGIS Server over #1?) And then this leads to configuration & tuning to ensure everything is as quick as possible. We can scale the back end of ArcGIS Server to multiple hosts and have some good hardware to sit it on. If you go with #1, you can throw the maximum # of instances that you AGS can handle. If you go with #2, I assume you evaluate the performance of the map services (load testing and look at wait times) and address the min/max instances accordingly to ensure there is not one service that is a 'weak link'. Im currently leaning towards the #2 approach, as my head is still telling me that having 600 layers in one service is madness, but if they are all turned off by default, there really is no issue. Would love to hear your thoughts. Let me know if you need more info via the comments, but not looking for answers like 'use a desktop application' or 'educate them to do things differently' Cheers! +++EDIT+++ From discussions in comments, I failed to mention another consideration. The application that the service will be consumed within, has the ability for **layer level security** (at the application level). Therefore the group of users (that is fairly large) are assigned to a particular role, and that role will have access to the full 600 layers. Other roles will be limited.


title: How to suppress spaces in labels?

text: I want to label some lines. The labels has spaces like "label 1". I want to suppress all spaces so that the result is like "label2" without changing the attribute table. Is that possible?


title: How to install pgrouting on Postgresql 9.2 located at /opt/PostgreSQL/9.2/ on Ubuntu Server 12.10?

text: I have installed Postgresql 9.2 on Ubuntu Server 12.10 using one-click installer from the EnterpriseDB. Then using the StackBuilder I installed PostGIS. Now I also want to install the pgrouting extension to my database. So far I have found instructions on the following pages:   * http://pgrouting.org/download.html   * http://docs.pgrouting.org/2.0/en/doc/src/installation/index.html#ubuntu-debian   * http://workshop.pgrouting.org/chapters/installation.html#pgrouting              sudo add-apt-repository ppa:georepublic/pgrouting-unstable     sudo apt-get update     sudo apt-get install postgresql-9.1-pgrouting      But the last command try to install postgresql-9.1 from the apt repositories:               # sudo apt-get install postgresql-9.1-pgrouting     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following extra packages will be installed:       libboost-thread1.49.0 libcgal9 libgeos-3.3.3 libgeos-c1 libproj0 libqt4-dbus libqt4-declarative libqt4-designer       libqt4-help libqt4-network libqt4-opengl libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql       libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 postgis       postgresql-9.1 postgresql-9.1-postgis postgresql-common proj-data qdbus     Suggested packages:       proj-bin libqt4-declarative-folderlistmodel libqt4-declarative-gestures libqt4-declarative-particles       libqt4-declarative-shaders qt4-qmlviewer libqt4-dev qt4-qtconfig oidentd ident-server locales-all osm2pgrouting       pgrouting-workshop     The following NEW packages will be installed:       libboost-thread1.49.0 libcgal9 libgeos-3.3.3 libgeos-c1 libproj0 libqt4-opengl postgis postgresql-9.1       postgresql-9.1-pgrouting postgresql-9.1-postgis postgresql-common proj-data     The following packages will be upgraded:       libqt4-dbus libqt4-declarative libqt4-designer libqt4-help libqt4-network libqt4-script libqt4-scripttools       libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtcore4       libqtgui4 qdbus      I want to install pgrouting on my existing Postgresql which is located at:               /opt/PostgreSQL/9.2/      I have also downloaded the source code. Following these instructions:               mkdir build     cd build     cmake -DWITH_DD=ON ..     make     sudo make install      When I run               # cmake -DWITH_DD=ON ..     -- PGROUTING_GIT_TAG: pgrouting-2.0.0     -- PGROUTING_GIT_BUILD: 0     -- PGROUTING_GIT_HASH: f26831f     -- PGROUTING_GIT_BRANCH: master     -- PGROUTING_VERSION_REVISION_NAME: f26831f master     -- PGROUTING_VERSION_REVISION_HASH: f26831f     -- UNIX=1     -- WIN32=     -- POSTGRESQL_EXECUTABLE is POSTGRESQL_EXECUTABLE-NOTFOUND     -- POSTGRESQL_PG_CONFIG is POSTGRESQL_PG_CONFIG-NOTFOUND     -- PostgreSQL not found.     CMake Error at CMakeLists.txt:122 (message):        Please check your PostgreSQL installation.               -- Configuring incomplete, errors occurred!      I cant figure out a way to tell cmake to locate my existing PostgreSQL installation. Any suggestions are very welcome.


title: Copy Domain and Subtype from File Geodatabase

text: Is there a way to copy the domain from one Dataset to another? I have a series of layers in Dataset A and I want to split the layers in to tiles using the Intersect tool; saving them in Dataset B. When I do this, all the domain information is lost. I assume there is an option to do this. Any help would be appreciated. Thanks....


title: How to create a Typographic Map with Mapnik

text: So i am trying to make a typographic map using mapnik. I want the street names along a particular street not to overlap, but I want an intersection between two streets to over lap. Currently![enter image description here](http://i.stack.imgur.com/wTrqf.jpg) some streets don't have repeating labels. see attached image for whats happening. How do I accomplish this?               labelStyle = mapnik.Style()     text = mapnik.TextSymbolizer(mapnik.Expression("[FULL_NAME]"), "DejaVu Sans Book", 2,     mapnik.Color("#171717"))     text.label_placement = mapnik.label_placement.line     text.label_spacing = 2     text.force_odd_labels = True     text.min_distance = 0     #text.max_distance = len((mapnik.Expression("[FULL_NAME]"))     text.character_spacing = 1     text.minimum_path_length = 0     text.label_position_tolerance = 100     text.allow_overlap = 1     text.avoid_edges = 0     r.symbols.append(text)     #labelStyle.rules.append(r)     s.rules.append(r)     m.append_style('Text',s)


title: Creating a openlayers enabled web project in eclipse

text: I'm brand new to creating gis map applications and I am trying to get a web project that uses               function init(){                 map = new OpenLayers.Map( 'map' );                 layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",                          "http://vmap0.tiles.osgeo.org/wms/vmap0",                         {layers: 'basic'} );                 map.addLayer(layer);                 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);                 var featurecollection = {                   "type": "FeatureCollection",                    "features": [                     {"geometry": {                         "type": "GeometryCollection",                          "geometries": [                             {                                 "type": "LineString",                                  "coordinates":                                      [[11.0878902207, 45.1602390564],                                      [15.01953125, 48.1298828125]]                             },                              {                                 "type": "Polygon",                                  "coordinates":                                      [[[11.0878902207, 45.1602390564],                                        [14.931640625, 40.9228515625],                                        [0.8251953125, 41.0986328125],                                        [7.63671875, 48.96484375],                                        [11.0878902207, 45.1602390564]]]                             },                             {                                 "type":"Point",                                  "coordinates":[15.87646484375, 44.1748046875]                             }                         ]                     },                      "type": "Feature",                      "properties": {}}                   ]                };                var geojson_format = new OpenLayers.Format.GeoJSON();                var vector_layer = new OpenLayers.Layer.Vector();                 map.addLayer(vector_layer);                vector_layer.addFeatures(geojson_format.read(featurecollection));                  }      I've included the OpenLayers.js with the img and theme folders under the WEB- IMF. When I run it only the text shows, not the map. Is there something I'm missing.


title: How to count number of polygons inside another polygon layer?

text: I am looking for a tool in arcgis 10.1 Qgis or R that allows me to count the number of polygons that are inside specific areas (defined also as polygons). My data consists in: 1 shape file with multiple polygons with different shapes and sizes 1 shape file with the zone/areas


title: How to Export Datalayer to Access 2010?

text: I'm working with ArcGIS v10.1 and MS Access 2010. Can you export a datalayer directly into Access 2010 (.accdb)? This was possible under using older versions of ArcGIS with Access 2003. I created a DataBase Connection using ArcCatalog to reference the Access 2010 database and I can successfully import a table from Access into ArcGIS. However, when I try to export and point back to the same Access 2010 database using the same DataBase Connection, the .ODC I created is not available. I can work around this by exporting the data into a spreadsheet and then importing the spreadsheet into Access.


title: Python Error in QGIS Ubuntu 13.10 while trying to join .csv tables

text: Using the mqgis plugging in QGIS I cant join my csv file... This is what QGIS returns me: An error has occured while executing Python code: Traceback (most recent call last): File "/home/elisabet/.qgis/python/plugins/mmqgis/mmqgis_dialogs.py", line 217, in run joinattribute, outfilename, notfoundname, 1) File "/home/elisabet/.qgis/python/plugins/mmqgis/mmqgis_library.py", line 516, in mmqgis_attribute_join if duplication[0] != '_': IndexError: string index out of range Python version: 2.7.5+ (default, Sep 19 2013, 13:52:09) [GCC 4.8.1] QGIS version: 1.7.5-Wroclaw Wroclaw, exported Python path: ['/usr/share/qgis/python', '/home/elisabet/.qgis/python', '/home/elisabet/.qgis/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist- packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist- packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist- packages/ubuntuone-storage-protocol', '/home/elisabet/.qgis/python/plugins/mmqgis/forms', '/usr/share/qgis/python/plugins/fTools/tools']


title: How to use variable field name in arcpy.SearchCursor?

text: I have code that says               fld = fieldName      rows = arcpy.SearchCursor(fc)     for row in rows:         x = row.fld      How do I use a variable for my field name in python ArcGIS 10 on windows? Thanks.


title: QGIS 1.7.1 and PyQT4 conflict: what am I doing wrong?

text: I've just started playing with QGIS with a view to eventually developing a few simple plugins in Python. I downloaded `QGIS 1.7.1` for Windows and started working through these workshop notes. If I've understood correctly, developing plugins often uses `QT Designer` and something called `pyuic4`. These don't seem to be included in the QGIS install, so I downloaded PyQT4 separately. This enabled me to finish working through the workshop, but now when I start QGIS I get the following error:               Traceback (most recent call last):       File "", line 1, in      RuntimeError: the PyQt4.QtCore module is version 1 but the qgis.core     module requires version -1      If I uninstall PyQT4, the problem goes away, but then I don't have `QT Designer` or `pyuic4`, so how do I develop plugins? I'm not sure what `version -1` of PyQT4 is. Does anyone have any suggestions, please? I'm obviously doing something daft, but I'm not sure what. Perhaps QT Designer _is_ actually included somewhere with QGIS 1.7.1, but if so I can't find it... Thanks!


title: Adding Python Script to Custom Tool

text: I am probably making a simple mistake but can't seem to figure it out, only a beginner.The Select By Location Script is working and it exports to excel when it is run from Python GUI, it also works in ArcGIS when i use the Pyton Shell but when i try to make a tool out of it in ArcGIS it does not work. The error was ERROR 000714, which the help says there is an error in the script. If it works in Python GUI and in ArcGIS Python Shell (picture below) , why does this error appear when i try to run the custom tool? any ideas? ![enter image description here](http://i.stack.imgur.com/DxTMP.png)               import arcpy          arcpy.env.workspace = "Z:\GIS TEST\Select_by_Location"     BOL='Breakout_Location.shp'     arcpy.MakeFeatureLayer_management('Bld_Locations.shp', 'Bld_Locations_lyr')     arcpy.SelectLayerByLocation_management('Bld_Locations_lyr', "WITHIN_A_DISTANCE", 'Breakout_Location.shp', "2000 Meters", "NEW_SELECTION")     arcpy.SetParameterAsText(0, BOL)          arcpy.MakeFeatureLayer_management('Bld_Locations.shp', 'Bld_Locations2_lyr')       arcpy.SelectLayerByLocation_management('Bld_Locations_lyr', "WITHIN_A_DISTANCE", 'RiversITM.shp', "100 Meters", "ADD_TO_SELECTION")          CSVFile = 'Z:\\Excel.csv'          fields = [f.name for f in arcpy.ListFields('Bld_Locations_lyr')]          for i,f in enumerate(fields):         if f == 'Shape' or f == 'Shape_Length' or f == 'OBJECTID':         del fields[i]          with open(CSVFile, 'w') as f:         f.write(','.join(fields)+'\n') #csv headers         with arcpy.da.SearchCursor('Bld_Locations_lyr', fields) as cursor:             for row in cursor:                 f.write(','.join([str(r) for r in row])+'\n')      There will only be one input into the Custom Tool, that is why i only used one parameter.


title: help writing a python script

text: Hi I need help with writing a script: The task I have a point feature class of graffiti incidents and a polygon feature class of patrol zones with some empty attributes already created for you. I must write a script that updates the attributes of the patrol zones with:   * The number of graffiti incidents falling within the patrol zone. This is an integer that goes in the INCIDENTS field.   * The priority ranking for the patrol zone. This is a string that goes in the PRIORITY field. You will derive this string using some simple math that compares the number of incidents in the zone with the area of the zone. Patrol zone priority rankings I then will calculate a priority ranking for each zone by dividing the number of graffiti incidents in the zone by the area of the zone. My script should then examine the result and assign the appropriate priority ranking (PRIORITY). These are the priority rankings:   * TOP CONCERN—15 or more incidents per square mile   * HIGH CONCERN— At least 12 but less than 15 incidents per square mile   * SOME CONCERN— At least 6 but less than 12 incidents per square mile   * LOW CONCERN—Fewer than 6 incidents per square mile Here's what I have so far:               import arcpy     arcpy.env.overwriteOutput= True          # layer that we are changing     patrolZone= "C:\\...\\PoliceData.gdb\\PatrolZones"     # the layer we are selecting from     graffiti= "C:\\...\\PoliceData.gdb\\GraffitiIncidents"     nameField= "NAME"     graffitiField= "OBJECTID"     incidentsField= "INCIDENTS"               # sits above the first row, starts the cursor     patrolRows= arcpy.UpdateCursor(patrolZone)          # tells it to go to the first row     patrol= patrolRows.next()     # now were in the first row doing looping          while patrol:     arcpy.MakeFeatureLayer_management(graffiti, "GraffitiLayer")          zones= patrol.getValue(nameField)     #print incidents     queryString = '"' + str(nameField) + '" = ' + "'" + str(zones) + "'"     print str(queryString)          arcpy.MakeFeatureLayer_management(patrolZone, "PatrolLayer", queryString)     arcpy.SelectLayerByLocation_management("GraffitiLayer", "CONTAINED_BY", "PatrolLayer")          numGraffiti= arcpy.GetCount_management("GraffitiLayer")     print numGraffiti          patrol= patrolRows.next()      I'm stuck on updating the INCIDENTS field


title: GeoServer users can edit SLD styles in GeoExplorer

text: I have just gone through the Boundless tutorial on creating users in GeoServer (much easier to understand than the official GeoServer Doc). This works I have granted write access to a certain layer and user. However this user can edit the layer SLD if I login via GeoExplorer. Under my **Role Services: Default** there is a role **X-Write**. Under **user group services: default** there is a user **myuser** **Myuser** has the role **X-Write** assigned And I have granted write permission to this role for my selected layer. This link suggests that only users with admin privileges can edit a style. However I have not assigned the admin privileges to that role. The only role linked to my user is **X-Write** , which is under the **default role service**. Any suggestions?


title: What is the best practice for editing feature class?

text: I am working with some feature classes. I create those feature classes using my add-in. User can add/ delete features from these feature classes clicking on "add", "delete" buttons and selecting features. I added features using following code:               void AddFeature(IFeatureClass featureClass, IGeometry geometry)     {         IFeature feature = featureClass.CreateFeature();         feature.Shape = geometry;         feature.Store();     }      And deleted features using following code:               void DeleteFeaturesWithinPolygon(IFeatureClass featureClass, IPolygon polygon)     {         List<IFeature> features = GetFeaturesWithinPolygon(featureClass, polygon);         foreach (var feature in features)             feature.Delete();     }      Thing is, I did not use editor session. And actually, I did not think about it earlier. but today seeing this question, I think about edit session. I know can do these edits, without edit session. Actually I am doing it right now. But I want to know what is the best practice to do these edits.


title: Source for ArcGIS Layout Templates?

text: I am running v10 of ArcGIS for Desktop.   I am aware of the OTB templates provided with ArcGIS.   - However, I would like to supplement these layouts with additional layouts. ![enter image description here](http://i.stack.imgur.com/kkK6x.png) I am also aware of the Map Template Gallery, but this seems to be more around data models and I am after the actual **print layout templates.** In particular I am looking for Local Government style templates, but the only downloads I can find seem to be again around the data model side of things as opposed to the actual print templates. Has anyone seen (perhaps on ArcScripts) a bundle of templates that I can add to ArcGIS Desktop so that I can switch to them in my Layout View?


title: Map doesn't appear with custom CartoDB query

text: I'm trying to use CartoSQL from CartoDB.js to create a layer. Here is the SQL query I am trying to make:               SELECT        rpa_nj_hsip_hospitals_compressed.flood,        rpa_nj_hsip_hospitals_compressed.the_geom      FROM        rpa_nj_hsip_hospitals_compressed       All the columns are in the table –– I checked. This is the query string and you should see the same error I am seeing. What am I doing wrong?


title: How can I edit spatial data automatically on postgis and check for topology errors on said data whitout using shapefiles?

text: So, I have spatial data stored in postgis (points, lines and polygons) and would like to edit and update those in an Open Source software (quantum GIS, grass, etc.) to check for topologic errors, among others stuff, (arc-node- polygon topology) in an automatic way. So when I edit or update this data it would automatically be saved in the geodatabase whithout using the import from DB -> edit -> create shapefile -> import shapefile to DB routine. I know the ArcSDE can do all of this, but I need it done with Open Source software alone. Is there a way to do it? Ps: It would be best if those editions and updates would respect my database relationships between tables, but if not, the problem can be solved using triggers on postgis. Thanks in advance!


title: Qgis - Couldn't load plugin 'processing' - name 'QsciLexerCustom' is not defined - Manjaro

text: UPDATED I receive the following error when I start Qgis:               Couldn't load plugin 'processing' from ['/usr/share/qgis/python', '/home/v/.qgis2/python', '/home/v/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/gst-0.10', '/usr/lib/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages/wx-3.0-gtk2', '/home/v/.qgis2/python/plugins/mmqgis/forms', '/usr/share/qgis/python/plugins/fTools/tools']          Traceback (most recent call last):     File "/usr/share/qgis/python/qgis/utils.py", line 182, in loadPlugin     __import__(packageName)     File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)     File "/usr/share/qgis/python/plugins/processing/__init__.py", line 29, in      from processing.tools.general import *     File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)     File "/usr/share/qgis/python/plugins/processing/tools/general.py", line 29, in      from processing.core.Processing import Processing     File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)     File "/usr/share/qgis/python/plugins/processing/core/Processing.py", line 55, in      from processing.r.RAlgorithmProvider import RAlgorithmProvider     File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)     File "/usr/share/qgis/python/plugins/processing/r/RAlgorithmProvider.py", line 34, in      from processing.gui.EditScriptAction import EditScriptAction     File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)     File "/usr/share/qgis/python/plugins/processing/gui/EditScriptAction.py", line 29, in      from processing.gui.ScriptEditorDialog import ScriptEditorDialog     File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)     File "/usr/share/qgis/python/plugins/processing/gui/ScriptEditorDialog.py", line 42, in      from processing.gui.ScriptEdit import ScriptEdit     File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)     File "/usr/share/qgis/python/plugins/processing/gui/ScriptEdit.py", line 36, in      from processing.gui.LexerR import LexerR     File "/usr/share/qgis/python/qgis/utils.py", line 453, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)     File "/usr/share/qgis/python/plugins/processing/gui/LexerR.py", line 34, in      class LexerR(QsciLexerCustom):     NameError: name 'QsciLexerCustom' is not defined          Python version:     2.7.6 (default, Feb 15 2014, 23:06:13)      [GCC 4.8.2 20140206 (prerelease)]               QGIS version:      2.3.0-Master Master, ccde1d4          Python path: ['/usr/share/qgis/python', u'/home/v/.qgis2/python', u'/home/v/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/gst-0.10', '/usr/lib/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages/wx-3.0-gtk2', '/home/v/.qgis2/python/plugins/mmqgis/forms', '/usr/share/qgis/python/plugins/fTools/tools']      First, I don't know anything about python, so forgive me if the information I provide is a bit random and don't hesitate to ask more. I also do not know how to define something in python but at first sight and from my limited understanding, it seemed pretty well defined: Indeed, in /usr/share/qgis/python/plugins/processing/gui/ the LexerR.py file specifies:   from PyQt4.Qsci import * In /usr/share/sip/PyQt4/Qsci/ there is a qscilexercustom.sip file specifying:   '#include' and the file qscilexercustom.h exists in the /usr/include/qt4/Qsci/ folder. I had Qgis 2.0 before, with the same issue, and installed this development version with the faint hope that it might solve my problem.   Would you have any idea how to solve this issue? Thanks! * * * UPDATE Thanks for the tip!   Here is what I get when I try to import PyQt4.Qsci: RuntimeError: the sip module implements API v11.0 but the PyQt4.Qsci module requires API v10.1 So I guess now I'll try to downgrade sip, though I had to install sipdev to compile Qgis. I'll let you know what comes up.   Thanks, * * * UPDATE 2 Downgrading sip wasn't such a good idea since it is required by PyQt4. Here's is what I get when I try to launch qgis:               Couldn't load PyQt4.     Python support will be disabled.               Traceback (most recent call last):     File "", line 1, in      RuntimeError: the sip module implements API v10.0 to v10.1 but the PyQt4.QtCore module requires API v11.0      Same when I try to import PyQt4.Qsci from python:                 RuntimeError: the sip module implements API v10.0 to v10.1 but the PyQt4.QtCore module requires API v11.0      Note that python-qscintilla, python-qscintilla-common, python2-qscintilla and qscintilla are all installed in version 2.8-1.   Any ideas? Thanks!


title: using SPOT Messengers in a corporate environment

text: We're looking into using SPOT Messenger GPS devices in a corporate setting for our wilderness field staff. GlobalStar, who operates Spot, has a commercial XML data push service which will dump incoming messenger reports to a specified server we own, which we can then process and redirect as we like. Is anyone out there using this service? Perhaps you've built a _spotxml-to- gis_ program or script you can share? (in python?) Any other thoughts on the service and its utility?


title: What Type of GIS Powers Automobile Navigation Systems

text: My sister-in-law was inquiring about where she can buy updated DVD's to load into her car's system. Obviously I know the dealer/OEM would love to rip her off for such data, and I knew of no alternatives off the top of my head. Being a GIS professional, the wheels started turning... Does anyone know anything about: a) the GIS software that is powering automobile navigation systems. Are there any published specs, or are they completely proprietary implementations? b) what is the format of the street/network datasets? I dont have such a fancy contraption in my vehicle, so I can't investigate for myself. Not sure if the specific make/model makes any difference here, but I am specifically asking about a 2009 Toyota Venza.


title: datum conversion with GDAL

text: I run gdaltransform like so:                gdaltransform -s_srs nad27 -t_srs wgs84      -104.5 39.5      -104.5 39.5 0           gdaltransform -s_srs wgs84 -t_srs nad83      -104.5 39.5      -104.5 39.5 0           gdaltransform -s_srs nad27 -t_srs nad83      -104.5 39.5      -104.5 39.5000000009262 4.23276796936989e-005      In other words, if gdaltransform nad27 -> wgs84 -> nad83, the lat/lon do not change. If, however, I transform nad27 -> nad83, my latitude is ever-so-slightly different. Why, please? What is the correct process for transforming coordinates? I have a legacy application that only saves the datum name (e.g. NAD27, WGS84, etc) and the lat/lon. In its processing, when trying to find the lat/lon in NAD83, which is the projection defined in a 1 sec FLT .HDR file, it calls (an old DLL implementation of) CS-Map cs_cnvrt, passing in nothing more than these datum strings, and it gets an output lat/lon that are different than the input lat/lon. When updating this code, I have this crazy idea that I'll keep all coordinate internally in WGS84, and transform them as needed by the output plane. So my code reads the NAD27 coordinates, converts to WGS84 using GDAL. It later asks GDAL to transform WGS84 to the spatial reference system (SRS) in the FLT file (i.e. NAD83). The transform results are exactly the same as the input. This makes sense to me, but I can't understand why the two methods above are so different. Thanks. -reilly.


title: How to download GeoTIFFs using the REST API in GeoServer 2.2?

text: I am using GeoServer (Version 2.2 Git Revision f5b5c35076b52d02eb9cca3fa3232bc17b5f6d80 Build Date 19-Sep-2012 18:33 GeoTools Version 8.2 (rev 704570474295e339c08d1ca140d884f23a8a03a3)) and I've got workspace with name `myTestWorkspace` and store with name `test` and type `GeoTIFF`. This store has URL connection parameters as follows: `file:coverages/test.tif`. I would like to download `*.tif` file by GeoServer REST API. I found in documentation that it is possible using URL `/workspaces/<ws>/coveragestores/<cs>/file[.<extension>]` So in my case it will be `/workspaces/myTestWorkspace/coveragestores/test/file.geotiff` (am I right?). But when I paste this URL I've got `HTTP status 404`. In documentation above is information that in this case (getting 404) are two options:   > Exceptions: > > GET for a data store that does not exist -> 404   > GET for a data store that is not file based -> 404 My data store exists (if for example I paste `/workspaces/myTestWorkspace/coveragestores/test/file.tif` then I've got `Unsupported format: tif` in response - this is ok, because `tif` is not valid format, so it means that GeoServer can see my store).   But is my data store file based? I thought that if data store has type `GeoTIFF`, then he is file based - am I right?      Any ideas why I cannot download TIFF file?   Thanks, Arek


title: Why is pgrouting astar not consistent?

text: I route from 1 end of a circular route to the opposite end. Visually it is obvious that going clockwise is shorter, however shortest_path_astar sometimes picks clockwise and sometimes anti-clockwise. ![astar messing up](http://i.stack.imgur.com/ukmJM.png) I narrowed down the amount of edges it may route on and it seems that the order in which the selected edges appear in the result set make a difference in the outcome of astar (which should not happen in my opinion). Set1:               SELECT e.id, e.source_id::integer as source,    e.target_id::integer as target, (SELECT SUM(n.shape_leng::float) FROM netwerk n    WHERE e.source_id = n.source_id    AND e.target_id = n.target_id) as cost,    ST_X(source.the_geom) as x1, ST_Y(source.the_geom) as y1, ST_X(target.the_geom) as x2, ST_Y(target.the_geom) as y2 FROM edges e JOIN knooppunten source    ON source.gid = e.source_id JOIN knooppunten target ON target.gid = e.target_id where e.id in (127,757,471,286,579,601,760) or not exists (SELECT * FROM netwerk n    WHERE e.source_id = n.source_id    AND e.target_id = n.target_id);      Result1:                id  | source | target |       cost       |        x1        |        y1        |        x2        |        y2              -----+--------+--------+------------------+------------------+------------------+------------------+------------------      127 |    459 |    460 | 1166.62881971498 | 178418.026099999 |      593089.0845 | 179488.144699998 | 592656.112100001      286 |    457 |    373 | 2701.89635124091 | 177301.707899999 |      593119.0339 | 177093.187399998 | 590500.850200001      471 |    457 |    458 | 229.123075139216 | 177301.707899999 |      593119.0339 | 177516.643399999 | 593197.757599998      579 |    371 |    373 | 1291.71083699618 | 178363.840300001 |      590548.6774 | 177093.187399998 | 590500.850200001      601 |    460 |    371 | 2456.81983676712 | 179488.144699998 | 592656.112100001 | 178363.840300001 |      590548.6774      757 |    459 |    458 | 919.539772037522 | 178418.026099999 |      593089.0845 | 177516.643399999 | 593197.757599998      760 |    372 |    373 | 805.921542501888 |      176324.6664 | 590358.514199998 | 177093.187399998 | 590500.850200001      (7 rows)      Set2:               SELECT e.id, e.source_id::integer as source,    e.target_id::integer as target, (SELECT SUM(n.shape_leng::float) FROM netwerk n    WHERE e.source_id = n.source_id    AND e.target_id = n.target_id) as cost,    ST_X(source.the_geom) as x1, ST_Y(source.the_geom) as y1, ST_X(target.the_geom) as x2, ST_Y(target.the_geom) as y2 FROM edges e JOIN knooppunten source    ON source.gid = e.source_id JOIN knooppunten target ON target.gid = e.target_id where e.id in (127,757,471,286,579,601,760);      Result2:                id  | source | target |       cost       |        x1        |        y1        |        x2        |        y2              -----+--------+--------+------------------+------------------+------------------+------------------+------------------      579 |    371 |    373 | 1291.71083699618 | 178363.840300001 |      590548.6774 | 177093.187399998 | 590500.850200001      760 |    372 |    373 | 805.921542501888 |      176324.6664 | 590358.514199998 | 177093.187399998 | 590500.850200001      471 |    457 |    458 | 229.123075139216 | 177301.707899999 |      593119.0339 | 177516.643399999 | 593197.757599998      286 |    457 |    373 | 2701.89635124091 | 177301.707899999 |      593119.0339 | 177093.187399998 | 590500.850200001      127 |    459 |    460 | 1166.62881971498 | 178418.026099999 |      593089.0845 | 179488.144699998 | 592656.112100001      757 |    459 |    458 | 919.539772037522 | 178418.026099999 |      593089.0845 | 177516.643399999 | 593197.757599998      601 |    460 |    371 | 2456.81983676712 | 179488.144699998 | 592656.112100001 | 178363.840300001 |      590548.6774      (7 rows)      Above 2 result sets are identical apart from the ordering of the rows. When i use shortest_path_astar on these 2 result sets i get different results:               select * from shortest_path_astar('<select Set1>', 460, 373, false, false) astar;      vertex_id | edge_id |       cost            -----------+---------+------------------            460 |     127 | 1166.62881971498            459 |     757 | 919.539772037522            458 |     471 | 229.123075139216            457 |     286 | 2701.89635124091            373 |      -1 |                0          select * from shortest_path_astar('<select Set2>', 460, 373, false, false)      vertex_id | edge_id |       cost            -----------+---------+------------------            460 |     601 | 2456.81983676712            371 |     579 | 1291.71083699618            373 |      -1 |                0      In this example Astar gives different results for an identical set of rows. Other things i noticed:   * If i route from endpoint to startpoint (373 -> 460) shortest_path_astar gives the correct answer.   * If i use shortest_path instead of shortest_path_astar this particular problem does not occur.   * If i change the type of x1,x2,y1 and y2 to double precision or float8 (what it should be according to docs) shortest_path_astar still is incorrect   * If i change the type of x1,x2,y1 and y2 to int or bigint shortest_path_astar gives the correct answer My best guess is that the heuristic function in the underlying Boost library is messing up because of how it interprets the incoming x1,x2,y1 and y2. Chances that the boost library is wrong seem slim so it might be the transfer of the data i feed it. Does any of you have experience with this behaviour of shortes_path_astar or knows what/if i am doing wrong? -


title: How to change cursor shape in pyQGIS?

text: I noticed that PyQGis has QgsMapToolPan() and QgsMapToolZoom() functions, and the cursor shape on the canvas will change to a hand (for pan), magnifying- glass(+/-) (for zoomIn / zoomOut). I have a toolbar for Select (arrow icon), Marquee (bounding box icon), besides the Pan, ZoomIn and ZoomOut tool buttons. Currently I created the Select & Marquee tools as QgsMapTool(canvas) and setAction with the appropriately ui widget buttons. How can I change the cursor shape to arrow when the Select tool is activated, and cross when the Marquee tool is activated? (I noted the default cursor shape for QgsMapTool() is Cross icon which I could use for the Marquee tool.)


title: How do I figure out the grid references (Eastings and Northings) necessary to create a circular 1 mile radius around one location?

text: How do I figure out the grid references necessary to create a circular 1 mile radius around one location? For instance: Grid Reference: SO 47904 87484 X (Eastings): 347904 Y (Northings): 287484 I know the approach has something to do with referencing the number of degrees from the original point for instance 10. Then subtracting the output by the number of metres in the radius size (a mile, so 1609.344). But I've forgot the actual approach. What is it, thanks?


title: point of intersection issues

text: I have a table containing a set of points of intersections. Most of the roads intersects whith just one road BUT i have some roads which intersects with two, therefore three different point of intersection has been created. BUT, i want only one point of intersection for all the three distinct roads. Any suggestion how I can merge the 3 points to just one where there is such situation. I am using postgresql with postgis The following is the table where i have the points of intersection ![enter image description here](http://i.stack.imgur.com/beoyh.png) The following is a graphical screenshot of the situation. ![enter image description here](http://i.stack.imgur.com/VGE5G.png)


title: What's the difference between Viewshed and Observer Points?

text: Can someone explain to me in layman's terms the difference between Viewshed and Observer Points? Thanks.


title: How to install PostGIS on Linux Mint 14?

text: I am trying to install PostGIS on Linux Mint 14 KDE. First thing I tried was to install PostgreSQL using "sudo apt-get install postgresql". I was successful doing that. I then did "sudo apt-get install postgis" and it installed something, but when I try to use it, say following the tutorials on the postGIS site, it won't recognize any command I type and the tutorial will refer me back to the installation section. So, I assume the Linux Mint PostGIS package is somehow broken or I am missing some key step. So, I decided to install PostGIS by building from source. After downloading many different dependencies I still can't get it to compile. I can successfully do ./configure. But it fails on 'sudo make' with the following error:               make -C liblwgeom      make[1]: Entering directory `/home/user/Downloads/postgis-1.4.2/liblwgeom'     make[1]: Nothing to be done for `all'.     make[1]: Leaving directory `/home/user/Downloads/postgis-1.4.2/liblwgeom'     make -C postgis      make[1]: Entering directory `/home/user/Downloads/postgis-1.4.2/postgis' gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -pie -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic -I/usr/include  -I../liblwgeom -I. -I. -I/usr/include/postgresql/9.1/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -DLINUX_OOM_ADJ=0 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.5  -c -o lwgeom_accum.o lwgeom_accum.c     lwgeom_accum.c: In function ‘pgis_geometry_accum_transfn’:     lwgeom_accum.c:110:52: error: ‘WindowAggState’ has no member named ‘wincontext’     lwgeom_accum.c: In function ‘PGISDirectFunctionCall1’:     lwgeom_accum.c:304:61: error: macro "InitFunctionCallInfoData" requires 6 arguments, but only 5 given     lwgeom_accum.c:304:9: error: ‘InitFunctionCallInfoData’ undeclared (first use in this function)     lwgeom_accum.c:304:9: note: each undeclared identifier is reported only once for each function it appears in     make[1]: *** [lwgeom_accum.o] Error 1     make[1]: Leaving directory `/home/user/Downloads/postgis-1.4.2/postgis'     make: *** [postgis] Error 2      Is there some easier way to do this or a good and up to date tutorial out there?


title: TIGER Geocoder not matching intersections without ZIP

text: I'm using the TIGER geocoder (2013 data, PostGIS 2.1, Postgres 9.3) to geocode intersections in New York City, but I'm finding that if I omit the zip code, I almost never get a match. So, for example...               ny_tiger=# SELECT pprint_addy(addy), st_astext(geomout), rating FROM       geocode_intersection('Broadway', 'Houston St', 'NY', 'New York', '10012');            pprint_addy            |          st_astext          | rating      ----------------------------------+-----------------------------+--------      607 Broadway, New York, NY 10012 | POINT(-73.996772 40.725432) |      0      604 Broadway, New York, NY 10012 | POINT(-73.996772 40.725432) |      0      609 Broadway, New York, NY 10012 | POINT(-73.996772 40.725432) |      0      606 Broadway, New York, NY 10012 | POINT(-73.996772 40.725432) |      0     (4 rows)      but...               ny_tiger=# SELECT pprint_addy(addy), st_astext(geomout), rating FROM       geocode_intersection('Broadway', 'Houston St', 'NY', 'New York');                                                                                pprint_addy | st_astext | rating      -------------+-----------+--------     (0 rows)      Is there a good way to get these addresses to resolve without the zip code?


title: Gaussian plume model in PostGIS or geocouch

text: Does anyone know of existing code for dispersion modeling using Gaussian Plume or comparable model, that I could plug in / adapt to be used programmatically from PostGIS or alternatively via GeoJSON/geocouch? I'm trying to model something like this: http://ready.arl.noaa.gov/gaussian- bin/dispsrc.pl to calculate dispersion values providing as few inputs as reasonably possible: lat/lon, Wind Speed, Wind Direction (possibly cloud cover maybe elevation, cloud cover, etc) My primary objective is to return computed values for % concentrations at points A, B, C, D downwind from emission point X, assuming 100% at point of release X Secondary objective is visualize it along the lines of something like below ![enter image description here](http://i.stack.imgur.com/Em54O.gif) Thanks in advance!


title: georeference and orthorectification of aerial photos

text: I am trying to process photos taken with a tetracam ADC micro camera placed on a UAV. I have GPS coordinates and mavlink logs providing roll, pitch and yaw of the UAV. I am having a real hard time georeferencing and orthorectifying the pics using tools as ossim or grass. Has anyone done this before?


title: Generating buffers in a automate way

text: I would like to creat buffers in a automate form and no matter the way (e.g. script, batches and etc) I am asking if anybody here knows how to do it or if are there scripts ready to do it. My situation is: I have two vectors layers (a point, representing a station, and roads. From the point I need to creat circular buffers that intersect the roads and after calculate the lengths of intersected roads. No matter the solution I would like the simple, like batch process, or built in scripts.


title: SQL within Python Script to get only part of the expression by GetParameterAsText

text: I was wondering if anybody could help me. Im trying to create a tool within ArcMap using a python script. Within the script i've been trying figure out how to change it so that I only need to get the numerical value from GetParameterAsText. So that for the tool i do not need to include the whole SQL expression just have the user input a value. This the last method that I have used "wf_value = arcpy.GetParameterAsText(4) wf_expression = ' "AGE_18_64"' + ">=" + "'%'" %wf_value arcpy.Select_analysis(counties, workforce, wf_expression)" ERROR MESSAGE: ExecuteError: ERROR 000358: Invalid expression 3000 Failed to execute (Select) As I'm guessing this way doesn't work as the wf_value is a float not a string but I can't seem to get it to work whichever way I've tried. Any help or suggestions would be great! Thanks!


title: How to Clear Parameters from Model Builder - ArcGIS

text: I'm attempting to clear out the parameters from my model so that the parameter locations don't show up in the tool when launched from ArcToolbox. ESRI's resource center has a couple of sentences about clearing parameters, but not how to actually do it. ![enter image description here](http://i.stack.imgur.com/j2Szv.jpg) ESRI's attempt at explaining how to clear out the parameters Does anyone know the steps to clear the parameters of a model built inside Model Builder for ArcMap?


title: PostGIS : I want to use ST_OffsetCurve with MultiLineStrings

text: I need to use the function ST_OffsetCurve for a multilinestring, but PostgreSQL gives me the error that the function is only for Linestrings. Is there a way arround? I want to use the function beceause I need to check if 2 lines (multilinestrings actually) are located at contrary sided of another multilinestring. For example, I need to find 2 lines, 1 on the right and 1 on the left side of the road (and the road is located by a line). I wanted to do this check by performing the ST_OffsetCurve function and the ST_Distance function. (if a line is on the right side of the road an you perform an offset to the right, the distance between the lines gets bigger). I hope this was understandable, so;   * Is there a way to use ST_OffsetCurce for Multilinestrings ?   * Is there maybe another way to achieve what I want ? Thanks!


title: how to add a query layer to a mxd in a python script

text: I want to add a query layer to an arcmap document so that whenever i have a db data update, it is reflected in my ma and I can update my service through python script. This is my script so far...               import arcpy     from arcpy import env     arcpy.env.overWriteOutput = 1          # define local variables     wrkspc = 'C:/ArcGIS_Workspace/'     mxd = arcpy.mapping.MapDocument(wrkspc + 'scripts/Trial.mxd')          input_db_name = "Database Connections/xxx.sde"     outLayer = "DynamicQueryLayer"     out_layer_name = wrkspc +"/shapefiles/DynamicQueryLayer.lyr"     query = "SELECT * FROM TEST_TABLE"          #unique key for the table     oid_field = "schema.TEST_TABLE.TEST_ID"          try:              # Create a query layer         arcpy.MakeQueryLayer_management (input_db_name, outLayer, query, oid_field)              # save the created query layer         arcpy.SaveToLayerFile_management(outLayer, out_layer_name, "ABSOLUTE")              # Get the created layer         lyr = arcpy.mapping.Layer(out_layer_name)              # get the data frame of the given mxd         data_frame = arcpy.mapping.ListDataFrames(mxd)[0]              # Switch to data view         mxd.activeView = data_frame.name              arcpy.mapping.AddLayer(data_frame, lyr, 'TOP')         print "Added layer to the MXD ..."              mxd.save()         print "MXD saved..."         except Exception, e:         # If an error occurred, print line number and error message         import traceback, sys         tb = sys.exc_info()[2]         print "Line %i" % tb.tb_lineno         print e.message      I get this error. ERROR 000732: Input Features: Dataset DynamicQueryLayer does not exist or is not supported. I am sure there is a way to save the created query layer as a layer file.Any help is greatly appreciated.


title: How to use GDAL on Heroku?

text: I have a geospatial python app that I want to use on Heroku. This is my `requirements.txt` file:               Flask==0.10.1     Jinja2==2.7.2     MarkupSafe==0.19     Werkzeug==0.9.4     gunicorn==18.0     itsdangerous==0.23     numpy==1.8.0     requests==2.2.1     wsgiref==0.1.2      I want to use the heroku-buildpack-geodjango to install Python GDAL. I create and do a git push.               heroku create --stack cedar --buildpack http://github.com/dulaccc/heroku-buildpack-geodjango/          git push heroku master      This all works fine. However the app crashes because it doesn't find GDAL. These are my logs:               $ heroku logs     ...     2014-03-23T18:57:08.224720+00:00 app[web.1]: ImportError: No module named osgeo     2014-03-23T18:57:08.348803+00:00 app[web.1]: 2014-03-23 18:57:08 [2] [INFO] Shutting down: Master     2014-03-23T18:57:08.348803+00:00 app[web.1]: 2014-03-23 18:57:08 [2] [INFO] Reason: Worker failed to boot.     ...      How do I set up GDAL in order to work properly?


title: How do you convert a bounding box into the canvas CRS?

text: I need to convert the pixel coordinates of a bounding box to the same CRS being used by an existing layer. Here's the relevant code so far:               # First, get the layer-coords version of the bounding box:     def pixelToCrsBox(self, theClickBox, theCanvas, theLayer):         """         Takes a bbox in pixel coords, converts it to a bbox in layer coords.              Args:             The bbox that needs to be converted.             The current canvas.             The current layer.         Returns:             The converted bbox.         Raises:             None         """         # converts from screen to map canvas crs         myMapToPixel = theCanvas.getCoordinateTransform()         myX1 = theClickBox.xMinimum()         myY1 = theClickBox.yMinimum()         myPoint1 = myMapToPixel.toMapCoordinates(myX1, myY1)              myX2 = theClickBox.xMaximum()         myY2 = theClickBox.yMaximum()         myPoint2 = myMapToPixel.toMapCoordinates(myX2, myY2)              myRectangle = QgsRectangle(myPoint1, myPoint2)              # converts the click box from canvas crs to the layer's CRS         myCanvasCrs = theCanvas.mapRenderer().destinationCrs()         myLayerCrs = theLayer.crs()         myTransform = QgsCoordinateTransform(myCanvasCrs, myLayerCrs)         myExtent = myTransform.transform(myRectangle)         return myExtent          # Next, get the first feature in the layer using the extents computed above     # (returned as myExtent, but fed to this function as theExtent).     def getFirstFeature(self, theLayer, theExtent):         """         Gets the first feature within the bbox in the active layer.              Args:             The current layer.             The converted bbox.         Returns:             A feature.         Raises:             Exception if data could not be loaded.         """              myProvider = theLayer.dataProvider()         if myProvider is None:             msg = ('Could not obtain data provider from '                'layer "%s"' % theLayer.source())             raise Exception(msg)              #myLayerExtent = theLayer.extent()         myAttributes = myProvider.attributeIndexes()         myFetchGeometryFlag = True         myUseIntersectFlag = True              mySelection = myProvider.select(myAttributes,                       theExtent, myFetchGeometryFlag, myUseIntersectFlag)         print ('SELECTED: %s' % mySelection)         myFeature = myProvider.nextFeature(mySelection)         return myFeature      To test this, I have these functions:               def prepareTestCanvas(self):         """         Sets parameters for a test canvas.         """         loadLayers()         setCanvasCrs(4326, True)         canvas.zoomToFullExtent()          def testPixelToCrsBox(self):         """         Tests that a bbox in pixel coords is converted to map coords         """         self.prepareTestCanvas()         myPoint = QgsPoint(40, 15)         myBox = self.bucketFill.getClickBbox(myPoint)         myLayer = self.bucketFill.getActiveVectorLayer()         myRectangle = self.bucketFill.pixelToCrsBox(myBox, canvas, myLayer)         myExpectedBox = QgsRectangle(106.758705784, -6.13591899755,                                      106.761696484, -6.1329282975)         myMessage = ('Bounding box was incorrect.\n'             'Received values %s\n'             'Expected values %s' % (             str('%s, %s, %s, %s' % (                 myRectangle.xMinimum(), myRectangle.yMinimum(),                 myRectangle.xMaximum(), myRectangle.yMaximum()                 )),             str('%s, %s, %s, %s' % (                 myExpectedBox.xMinimum(), myExpectedBox.yMinimum(),                 myExpectedBox.xMaximum(), myExpectedBox.yMaximum()                 )),             ))         assert (             round(myRectangle.xMinimum(), 9) ==             round(myExpectedBox.xMinimum(), 9) and             round(myRectangle.xMaximum(), 9) ==             round(myExpectedBox.xMaximum(), 9) and             round(myRectangle.yMinimum(), 9) ==             round(myExpectedBox.yMinimum(), 9) and             round(myRectangle.yMaximum(), 9) ==             round(myExpectedBox.yMaximum(), 9)), myMessage          def testGetFirstFeature(self):         """         Tests that a feature is returned.         """         self.prepareTestCanvas()         myLayer = self.bucketFill.getActiveVectorLayer()         myTestBox = QgsRectangle(106.758705784, -6.13591899755,                                  106.761696484, -6.1329282975)         myFeature = self.bucketFill.getFirstFeature(myLayer, myTestBox)         print myFeature         myMessage = ('Returned object was not a feature.')         assert myFeature.type() == QgsFeature, myMessage      However, the coordinates are not in the right place when they are returned in the layer CRS. They're supposed to hit the feature I'm trying to select, but they don't. The coordinates that get returned (same as those in the test) are way off base, and it shouldn't be possible to click there if the canvas is zoomed to the layer extents (there are no other features in the test layer). So my theory is that the coordinates are transformed incorrectly. What am I doing wrong?


title: Get Database Table Name From Layer Name in ArcObjects

text: I am using ArcObjects v10.0 with a SQL Server 2008 database. Given the name of a Layer, is there a way for me to extract the corresponding name of the database table that represents that Layer? The Layer name and the Database Table name will often be identical, but they will not in cases where the Layer name contains invalid characters, such as spaces.


title: How to load spatial data into ArcGIS Javascript API application from SQL Server 2008?

text: I have geometry data in SQL Server 2008 R2. How do I load that spatial data using the ArcGIS Javascript API?


title: Options for manually identifying road defects from Terrestrial Lidar

text: I am trying to create a process to identify road defects manually from Lidar. We have Erdas 2013, ArcGIS10.1 and Global Mappper 14.2 as options for paid software. So far Merrick Mars displays the data the best but (the free version) does not allow one to draw polygons. ![enter image description here](http://i.stack.imgur.com/MpLPZ.jpg) With ESRI the best I could get is ![enter image description here](http://i.stack.imgur.com/yaQ9w.jpg) Unfortunately you can't zoom any further to view defects. With ERDAS the best I could get is ![enter image description here](http://i.stack.imgur.com/kcgHc.jpg) With Global Mapper the best I could get is ![enter image description here](http://i.stack.imgur.com/R5fkB.jpg) I can manually assign a color to each range of elevation but this is very cumbersome. So any ideas on what I am doing wrong? how can I get a similar view to Mars in any of the other software? I need to then create a polygon around each road defect.


title: How to extract Latitude and Longitude of Shapefile for importing into Tableau?

text: I'm having a hell of a time so any help would be appreciated. I want to extract the latitude and longitude of the Health Authority boundaries from the zip file below. The ultimate goal is to import these coordinates into Tableau. http://www.bcstats.gov.bc.ca/Files/1d01fdf3-dc2a-4715-ba81-0aef150a49b8/Boundaries- HealthAuthorities.zip Any thoughts would be appreciated!


title: Find nearest neighbours faster in PostGIS

text: I currently have a query that calculates the number of useful amenities within a certain radius of each town, using OSM data:               create table places as     select town.name, place, town.way, (       select count(*)       from planet_osm_point pub       where (pub.amenity in ('pub','cafe','restaurant','supermarket','fuel') or pub.shop in ('bakery','convenience')) and pub.way <-> town.way < 5000     ) + (       select count(*)       from planet_osm_polygon pub       where (pub.amenity in('pub','cafe','restaurant','supermarket','fuel') or pub.shop in ('bakery','convenience')) and pub.way <-> town.way < 5000     ) pubs     from planet_osm_point town where place in ('hamlet','village','town','city');      It works fine, but is very slow, probably because of the high level algorithm: compare every town to every amenity. Are there any easy ways to optimise this? (Both tables have indexes already.) "Explain" returns this:                Seq Scan on planet_osm_point town  (cost=0.00..260497454.31 rows=6490 width=125)        Filter: (place = ANY ('{hamlet,village,town,city}'::text[]))        SubPlan 1          ->  Aggregate  (cost=17614.09..17614.10 rows=1 width=0)                ->  Seq Scan on planet_osm_point pub  (cost=0.00..17612.32 rows=710 width=0)                      Filter: (((amenity = ANY ('{pub,cafe,restaurant,supermarket,fuel}'::text[])) OR (shop = ANY ('{bakery,convenience}'::text[]))) AND (((way)::box <-> (town.way)::box) < 5000::double precision))        SubPlan 2          ->  Aggregate  (cost=22522.32..22522.33 rows=1 width=0)                ->  Seq Scan on planet_osm_polygon pub  (cost=0.00..22521.83 rows=197 width=0)                      Filter: (((amenity = ANY ('{pub,cafe,restaurant,supermarket,fuel}'::text[])) OR (shop = ANY ('{bakery,convenience}'::text[]))) AND (((way)::box <-> (town.way)::box) < 5000::double precision))      ## Answer My new query looks like this:               create table places as     select town.name, place, town.way,        (select count(*)        from planet_osm_point p        where p.amenity = 'pub' and st_dwithin(p.way,town.way,5000) as p1) +        (select count(*)        from planet_osm_polygon p        where p.amenity = 'pub' and st_dwithin(p.way,town.way,5000) as p2) pubs     ...


title: How to write a point-in-polygon query for Postgis?

text: I'm trying to write a query in Postgis which will return all rows where a dynamically changing longitude/latitude point resides within the geometric polygon of that row (in the `geom` column). This is the query I'm trying to use:               SELECT * FROM "geospatial-data" WHERE ST_Contains("geospatial-data".geom,ST_Transform(ST_GeomFromText('POINT(-90.56210 38.60369)',4326), 4269))=true      I'm basing this query off of an older post here: http://codemagician.wordpress.com/2009/09/12/point-in-polygon-in-postgis/ I'm not getting any errors but I can't understand what I'm doing wrong. How should I write/modify the query in order to query for a point-in-polygon?


title: Why are my raster mean and standard deviation -1?

text: I have a set of about 25 rasters whose descriptive statistics I have been examining. The data in the rasters were calculated in Python and the rasters were created using Python-GDAL. In all but one raster, the mean, std. dev., minimum and maximum seem correct. In one raster, however, the minimum and maximum values are correct (4.842 and 9.458 respectively) but the mean and standard deviation are `-1` if I take a look in ArcCatalog and `-1.#IND` in QGIS. I opened the raster in Python via GDAL and calculated the minimum and maximum using `data[data>band.GetNoDataValue()].min()` and `data[data>band.GetNoDataValue()].max()` respectively, and the values these functions returned were correct (as above). But the mean value via `data[data>band.GetNoDataValue()].mean()` was 2.905, which is clearly nonsense as this value does not occur within the minimum and maximum value limits for this raster. Any ideas as to what's going wrong?


title: Enterprise Architect - domains relationship

text: I am not sure if this forum is right place to ask but let me try. I am building an ArcGIS model in Enterprise Architect. I have a couple domains inside. The problem is: I want to make the following realtionship between two of it (domains) that after i import the xml file to ArcGIS i will be able to choose one attribute (from the first domain) and the second one (from the connect- relationship domain) will be filled automatically . Do you know how to make such relationship (connection) ? I hope i make myself clear... Thank's in advance


title: Point clustering only works for part of an area?

text: I am using the 3rd party scripts for point clustering as published by Globoserve, http://globoserve.posterous.com/ . I followed the instructions to the letter - and just replaced the queryTask variable to point to my point features that are projected in the one of the compatible projection systems. But the point cluster alogrithm will only cluster a section of points rather than all of my points - see image below. ![enter image description here](http://i.stack.imgur.com/U1jY9.jpg) Can anyone explain why this is happening? Cheers NOTE - I have tried this with a totally different point layer in US - and it shows a 500 point limit - the same as the pic below!! Why is there a point limit???


title: IE 9 reopen tab if close window while applyedits are executing

text: We load a map in a pop up using window.open but when we execute the applyedits method and immediately after this we close the pop up, on Internet Explorer the parent window "crash" and show the message: "A problem with this webpage caused Internet Explorer to close and reopen the tab" and we don´t know how to prevent this. We try window.onbeforeunload but not fired it while applyedits are running. Any clue will be welcome. Sorry about my bad english.


title: What is the difference between ActiveView, FocusMap and PageLayout in ArcObjects?

text: I see that different starting points are used when interacting with ArcMap IMxDocument                 IMxDocument mxDocument = application.Document as IMxDocument;            IActiveView activeView = mxDocument.ActiveView;         //IActiveView activeView = mxDocument.FocusMap as IActiveView;       //IActiveView activeView = mxDocument.PageLayout as IActiveView;            // Get an envelope corresponding to the view extent.       IEnvelope envelope = activeView.Extent;      What is the difference between mxDocument.ActiveView, mxDocument.FocusMap and mxDocument.PageLayout related their extent? Are they going to be different? In what case each can be used? Thanks


title: How to select GeoJSON vector feature in Leaflet?

text: I've been using OpenLayers for years,instead of comparing OL & Leaflet libraries,I decided to use Leaflet for the job for now. I have a GeoJSON data layer where I show point objects only.Just as I have used in OpenLayers,when user hovers(which is supplied with leaflet) & **toggle click** where I should change style of vector(s) (mostly color).I cannot find this event system in leaflet. Is there any way to do this ?


title: OpenLayers and external CSS

text: I am using geoExt and OpenLayers to plot some map. Everything worked well until I had to add some styling. To display it on the webpage, I need to use the CSS of my university and once I do that, I have some horizontal white lines between each tile (but not vertically though). The lines have always the same height. The problem seems to come only from the CSS, since if I remove it in the html (it is the first thing invoked in `<head>`), everything looks correct. Searching here and on the web, I found than some people proposed to create a CSS after everything else which sets:               .openlayers-map img {max-width: none;}      But it didn't solve anything. Is there a way to tell to a div that it needs to load no styles but the one used by OpenLayers? Here is a sample of the code I have:                var osm = new OpenLayers.Layer.OSM(                 "Open Street Map"         );      bwms = new OpenLayers.Layer.WMS(                         "usa:states - Tiled", "http://128.178.82.176:8080/geoserver/usa/wms",                 {                         layers: "usa:states",                         tiled: true,                         transparent: true                 },{                         singleTile: true,                         projection: new OpenLayers.Projection("EPSG:4326") // specified because it is different than OSM's                 }         );                       mapPanel = new GeoExt.MapPanel({                 renderTo: "mapPanel",                 map: new OpenLayers.Map({                         projection: epsg900913,                         displayProjection: epsg4326,                         units: "m",                         center: new OpenLayers.LonLat(6.59,46.39).transform(epsg4326,epsg900913)                 }),                 layers: [osm,bwms],                 // height/width in pixels                 height: 450,                      zoom: 10,                 border: false         });


title: How to sum area of polygons by values occuring in multiple fields?

text: My data has 2 fields holding landuse types, which both describe what is within the polygon. For example, the polygon may have Type1=Retail, Type2=Leisure Area= 1 but another polygon has Type1=Leisure, Type2=Swimming Pool Area=3 I want to discover the total area of polygons with a Retail attribute, Leisure attribute etc.. to build a table like:               Retail 1     Leisure 4     Swimming Pool  3      etc. Of course some polygons will be counted in multiple categories, but this is ok for what I am working on. In some cases the polygon might have Type1= Retail, Type2= Retail. In this case the area should only be counted once. Can I ask PostGIS to sum the areas for all of the values it finds in the fields, without me having to write/run a query for each of the types (there are a lot)?


title: Implementing day night functionality

text: I want to implement day/night functionality on world map i.e there will be dark layer showing countires having night now. This world map could be creaeted through ESRI or SVG map.I want to understand what is the logic of showing behind implementing this.Any known algorithms/formulas. I have posted this question in stackoverlfow (http://stackoverflow.com/questions/19685010/implementing-day-night- functionality-on-map). But thought this is better forum.


title: String variable substitution in selection expression

text: I'm trying to put a variable into a string used to do a selection. At the moment it's like this...               expression = "'No_Props' > 5 AND %s < 200 AND 'ST_Ori' >60" % metres_field     arcpy.SelectLayerByAttribute_management(streets_table, "NEW_SELECTION", '"' + expression + '"')      Printing the expression gives this....               'No_Props' > 5 AND 'Shape_Le_2' < 200 AND 'ST_Ori' >60      .. which I thought would work. I've tried several things. Originally the expression was in a docstring..               """'No_Props' > 5 AND %s < 200 AND 'ST_Ori' >60""" % metres_field      .. but that didn't work I considered using the **doc** attribute but it only worked on a function (not a variable) Anyone know what I'm doing wrong / how to make it work? The expression looks like it should do the trick when it's printed out.. Anyone have any ideas? Cheers


title: Display a single country with OpenLayers

text: Can I display a single country using Openlayers? I'm not trying to restrict zoom levels or . I want only one single country to be displayed. The rest of the world cannot be displayed. My reasearch shows no information on my specific issue.


title: Is it possible to add to the map a layer containing results from a sql query

text: I'm developping an ArcMap Extension and I need to join an existing feature class with data from a sql query located on another DBMS. I already set up a Workspace with an OleDbWorkspaceFactory. I'm even able to add to the document any table contained in this database. I'm now trying to add a sql query to the document the same way I do it with tables. The query can be complex and include a couple of table with inner/left joins. I looked in the ESRI documentation and I can't find the good object to do this. Thanks


title: Arcpy hanging on Linux

text: I am having issues getting arcpy to run correctly on Linux Red Hat. I solved some earlier problems which appeared to be related to permissions on the init_server file. Now that si resolved, when I 'import arcpy' in Python, it just hangs, not even timing out after 20 minutes. Does anyone have any experience of using arcpy on Linux and did you face any issues setting it up? Thanks in advance for any help/suggestions. **EDIT** AN update. I have rebooted the server and edited the LD_LIBRARY_PATH in init_server.sh and also changed the call to set_pyton_anv.sh (as it didn' appear to be calling it ) and it failed with **Cannot open X display "(not specified)"** I then started an XWindows session on the box in Hummingbird and then, and only then, did import arcpy run correctly. Not really sure what to say other than **What? Why? How?** Does anybody know any reason why this should be?