title: How to keep all the unique columns of the shapefiles after merge?

text: Writing a script where the user is asked to select a directory which contains Folder_1 and Folder_2, both containing shapefiles and run various algorithms. The basic logical process of the script is:   1. Create a standard grid   2. Look into Folder_1 and clips a shapefile onto the grid   3. Create a unique column in the attribute table for the newly clipped shapefile and save into the Output folder   4. Loop through any remaining shapefiles and repeat Step 2 & 3   5. Repeat Step 2-4 for Folder_2 I then want to merge everything in the Output folder using **saga:mergeshapeslayers** , however, this only takes the attribute columns from the first selected layer. I would like all the unique attribute columns to appear. Can this be done easily? I've attached the code.               ##Test=name     ##Select_directory=folder     ##Cellsize=number 1000     ##Result=output vector          import os     import glob          #   Folder path of output shapefiles     path_res = "C:\Users\Test\Output\\"          #   Select required directory     os.chdir(Select_directory)               def rank():          #   Create grid with defined parameters         outputs_1=processing.runalg("qgis:creategrid", Cellsize, Cellsize, 24108, 18351.157175, 258293.802316, 665638.226408, 1, 'EPSG:7405', None)         outputs_2=processing.runalg("qgis:fieldcalculator", outputs_1['SAVENAME'], 'ID', 1, 10, 0, True, '$rownum' , None)         outputs_3=processing.runalg("qgis:deletecolumn", outputs_2['OUTPUT_LAYER'], 'longitude', None)         outputs_4=processing.runalg("qgis:deletecolumn", outputs_3['SAVENAME'], 'latitude', None)          #   Set directory and search for all .shp files in Folder_1         os.chdir("C:\Users\Test\Folder_1\\")         for fname in glob.glob("*.shp"):                #   Clip shapefiles files within Folder_1 to Grid and save files to Output folder                  outputs_5=processing.runalg("qgis:clip", outputs_4['SAVENAME'], fname, None)             outputs_6=processing.runalg("qgis:fieldcalculator", outputs_5['OUTPUT'], 'Rank_' + fname, 1, 10, 0, True, 1 , path_res  + "/"+ fname)          #   Set directory and search for all .shp files in Folder_2         os.chdir("C:\Users\Test\Folder_2\\")         for fname in glob.glob("*.shp"):           #   Clip shapefiles files within Folder_2 to Grid and save files to Output folder                 outputs_7=processing.runalg("qgis:clip", outputs_4['SAVENAME'], fname, None)             outputs_8=processing.runalg("qgis:fieldcalculator", outputs_7['OUTPUT'], 'Rank_' + fname, 1, 10, 0, True, 2 , path_res  + "/"+ fname)          #   Paths of the shapefiles in the Output folder with list comprehension         output = [shp for shp in glob.glob(path_res + "*.shp")]          #   Merge the shapefiles         processing.runalg("saga:mergeshapeslayers", output[0], ";".join(output) , Result)               if Select_directory:         rank()     else:         pass


title: Best Way to Get a List of Selected Rows for a Specific Layer using Layer Object in ArcGIS

text: What is the fastest/cleanest way to get a collection of rows that are selected in a certain layer? For some background, I am trying to hide selected features in a specified layer.   * The solution involving the use of **SearchCursor** uses the layer name, but my setup may involve duplicate named layers   * Another solution I found copies the selected rows into a new layer, which may be time costly for my setup. Is there a way to get the selected rows by using a layer object which is provided by a script parameter?


title: ArcGIS Javascript API LabelLayer - when clicking a label is there a way to know which feature is represented by that label?

text: When adding labels via addFeatureLayer it is impossible to know which feature was clicked? The "click" callback for a LabelLayer provides the label graphic but no reference to the FeatureLayer graphic this label represents. Is there a way of determining the graphic from the FeatureLayer that this label graphic represents? https://developers.arcgis.com/javascript/jsapi/labellayer- amd.html#addfeaturelayer


title: Import processing in qgis 2.0

text: I know that this question has already asked but no concrete answer has given!! My environment is Ubuntu 12.04 and I'm using eclipse-pydev as IDE. Thanks in advance for helping me.


title: WFS service Server Error in '/ArcGIS/services' Application

text: I have a SSL secured ArcGIS Server 9.3.1 machine on W2k8. I set up a service with WFS. Every time I try to request the capabilities, I get the error: Server Error in '/ArcGIS/services' Application Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off". Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL. In the IIS log I see a 500 type error (Internal server error).


title: how to create an outline polygon (footprint) from raster data with postgis?

text: how can I create a polygon, containing the actual outlines (aka footprint) of a raster file with postgis? I just need the outlines of the data containing parts of the raster. ST_PixelAsPolygon creates a complex polygons - but I just need the footprint. There is a similar question here How do I create a shapefile showing footprints of Rasters?, but the answers do not cover postgis. D3


title: resampling errors

text: I have to reproject my images, but it contains some resampling errors. Any one has any idea on significance of resampling error. Are they neglectable? Is there any good documentation to refer to? I'll do it by GDAL. In my case source coordinate system is WGS84 Lat,Lon (ESPG=4326) and target is MODIS Sinusoidal.


title: How to color-balance false-composites of pan-sharpened Landsat images in GRASS?

text: Whenever I try to pan-sharpen composites of some Landsat images in GRASS using `i.pansharpen`, `i.fusion.brovey` or the IHS sharpening method, the output will have some or all of the following characteristics:   * the composite color is in a different hue compared to the un-sharpened composite   * the brightness level is messed up   * the entire composite went all-white/all-black (when using images pre-processed to top-of-atmosphere reflectance or surface reflectance corrections in `i.landsat.toar`) I've also tried **all** of the following; but the colors/brightness remained the same or turned even worse:   * Applied `i.landsat.rgb`, before-and-after the pan-sharpening process   * Played with the `-f` or `-p` flag in `i.landsat.rgb`   * Tried `r.colors` to edit the color table to grey/grey255/grey.eq   * Tried `i.pansharpen` using all Brovey/IHS/PCA methods   * Played with the `-l` flag in `i.pansharpen` to rebalance the blue-channel The GRASS GIS manual did explained on how to perform pan-sharpening and color- balancing, but I can't figure out how to combine both processes in a concurrent workflow. I suspected that this is due to my poor understanding of color-tables, color-histogram, etc. in GRASS.. So, can someone explain to me - **how do you tackle color-balancing problems when dealing with Landsat images after image-processing in GRASS?** Can you share with me your favorite workflow/methods? Many thanks for any feedback!


title: How to Create and Rotate Raster Dataset using ArcObjects?

text: I'm following the "How to create a raster dataset" tutorial: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//000100000464000000 The questions are: 1) How can I create the raster in a file geodatabase? (The example given is incomplete.) 2) How can I rotate the newly created raster? (Standalone TIFF or a geodatabase raster.) I know there is IRasterGeometryProc3, but I can't make it work. Any samples / help would be appreciated. Cheers.


title: What are use cases of Esri's CityEngine?

text: I would like to know the use cases of Esri's CityEngine, and what distinguish this tool from the other standard GIS like ArcMap and QGIS? and in which fields could be used ?


title: How can I edit lines containing M values with the ArcGIS JS API?

text: I am working with the ArcGIS JavaScript API and want to move and edit the vertices of a polyline analog to the following sample: http://help.arcgis.com/en/webapi/javascript/arcgis/demos/ed/ed_toolbar.html This works fine as long as the polyline does not contain M Values. If it does contain M Values I get the following error in firebug. Errorcode:-2147221399, description: „Geometry does not have M Value(s), hence cannot update the feature." What am I doing wrong? Here’s my code:               function initEditing(layers) {         var myMap = this;         var firePerimeterFL = myMap.getLayer("firePerimeterFL");              var editToolbar = new esri.toolbars.Edit(myMap);         dojo.connect(editToolbar, "onDeactivate", function(tool,graphic,info) {           if(info.isModified){             firePerimeterFL.applyEdits(null, [graphic], null);           }         });              var editingEnabled = false;         dojo.connect(firePerimeterFL, "onDblClick", function(evt) {           dojo.stopEvent(evt);           if (editingEnabled === false) {             editingEnabled = true;             editToolbar.activate(esri.toolbars.Edit.EDIT_VERTICES , evt.graphic);           } else {             editToolbar.deactivate();             editingEnabled = false;           }         });       }


title: ESRI Flex Viewer 2.4 - How Can I Remove The Header (or UI Component that holds the HeaderController Widget)

text: I am trying to make some modifications to the general layout of the Flex Viewer. As part of these modifications, I am trying to remove the Header altogether. I removed the HeaderControllerWidget from the config.xml - thinking the map should now occupy the entire browser. But now I just get empty white space where the HeaderController was, leading me to believe some UI component must be defined elsewhere to hold the HeaderController widget. I have searched through the code trying to find this component with no luck. Does anyone have any suggestions as to how I can remove Header altogether? I want the map to occupy the entire browser.


title: Problem converting KML file to .lyr

text: I have a problem in converting KML files into lyr ones with ArcGIS 10. I do all the steps perfectly but the conversion fails and the red check mark appears. It is surprising that when I repeat the steps for more than 10 or 20 times eventually it works and the green check mark appears!   I have the same problem with different KML files. what solution do you suggest to overcome this problem? thanks a lot


title: How to find line length in QGIS while editing?

text: I am using QGIS (before, I used ArcView). I would like to know if there is any way during the editing phase of a vector (line or polygon) to know the length of the line (total and partial) that is being created. Thanks.


title: Bring Feature Selection To Top

text: I'm using IFeatureSelection.SelectFeatures() to select parcel polygons in my parcel layer. It works fine until I create a ClassBreaksRenderer to apply a color ramp based on a field in the feature. The selection proceeds without error but does not draw on top of the renderer. Is there a way to ensure that the feature selection draws on top?


title: Properly deal with broken project data source Analyze Errors when publishing Geoprocessing Service (Python / ArcGIS Server 10.2)

text: When publishing a geoprocessing service, I noticed that arcgis does not like to see:               os.path.join(os.path.dirname(__file__), 'projections')      This line seems to throw an **broken project data source** while analyzing the service for publishing to arcgis server. I'm guessing its because the only the main .py file will be copied into the services directory and Esri is giving me a heads up that the data source is going to break because 'projections' folder will NOT be copied over. In my case, I also have some unit test which reference a test_data folder and shouldn't affect the tool when running off the server. Unfortunately I still can't publish. To publish, I:   1. Moved my relative path references to a separate module named service_config.py   2. imported the path constants from service_config.py   3. Added a .pth file to Lib/site-packages to allow the services directory version of the script to still have references to the projection folder without needing it to be copied to the arcgisinput directory. I feel like my solution is a hack. Any suggests on how to improve this tool configuration? My code can be found here: https://github.com/brendancol/esri-extract-data-where


title: Why should I use the AMD style deceleration in ArcGIS JS API?

text: It seems to me like this:               var point;     require(['esri/geometry/Point'], function(Point) {         point = new Point();     }      does the same thing as:               var point = new esri.geometry.Point();      Is there any reason to opt for AMD-loaded constructors?


title: How to tranform a column field into a list using Field Calculator

text: I'm trying to make a simple field calculation with ArcGIS 9.3: New field = Old field - Old field(first value) which in Calculate Field with python code should be Expression: !Old field! - first Code Block: list= [AngOriz] first = list[0] The error is ERROR 000539: Runtime error : name 'AngOriz' is not defined Failed to execute (Calculate Field). How could I tranform a column field into a list? Ivano


title: When should you NOT use a spatial index?

text: I am asking this because I was mainly working with Oracle but for the past year I've been doubling with PostGIS and SQLServer 2008. Most spatial functions in Oracle won't work without a spatial index returning the ORA-13226 error: > 13226, 00000, "interface not supported without a spatial index" //*Cause: > The geometry table does not have a spatial index. // *Action:Verify that the > geometry table referenced in the spatial operator has a spatial index on it. To me this makes sense. You run a spatial query=you must have a spatial index. But as far as I understand, neither PostGIS not SQL Serve require this. PostGIS even seems to have functions (_* e.g. _STContains) that EXPLICITLY won't use the spatial index. So the question is- are there any cases where you should NOT use a spatial index?. Not necessarily whether is a 'take it or leave it' approach i.e. it won't make any difference, but where NOT using the spatial index will impove performance? To me, the last sentence is a contradiction in terms but otherwise why PostGIS would provide these functions?


title: Get features WMS under a polygon in layer-vector

text: I have the buffer of a polygon in a layer-vector, I want to know what features of a WMS layer are covered by the buffer, as the SLDSelect Control but with a polygon drawn. any ideas? thanks in advance


title: Calculate stop times/distances of transport lines - tools and procedure?

text: I need to calculate stop times of bus lines (extrapolation) I have:   1. Shape file with all stops   2. shape file with control points where bus time was taken   3. Shape file with all bus routes   4. csv file with times in first stops on the route, final stops and control points where time was taken. All of shp files have an attribute "route number" which identifies to which transport route they refer. I need to find a tool (and procedure) that helps me extrapolate times in each of the stop on the route, using the departure time, arrival time and times at control points on the route (which are not stops). I suppose I actually need to calculate distances first and then times based on those distances. I am unix user so OS tools would be preferable Any suggestion how to crack this? Attributes described below. Thanks a lot for any hint. Karel * * * **Stops shp file** Description: Locations of bus stops Attributes: Cod_ubic_p - stop location Code_variant - bus line (referenced in _Bus_ shp file) Ordinal - order corresponding to the stop in the journey of the variant (bus line) * * * **control_points shp file** Description: Locations of control points Attributes: Cod_ubic_c - control point code Code_variant - bus line type (referenced in Bus_lines) Ordinal - order of given control point in the path of the variant (bus line) Desc_locat - Description of Control Point location * * * **Bus_lines shp file** Description: Routes of bus lines Attributes: Cod_line - Transportation line code Desc_line - Description of the transport line (eg 112, D16, etc) Ordinal - Correlative number of the sub-line of the line Code_subline - Code of the transportation sub-line Subline Desc - Description of the sub-line Cod_variant - Code of the route (to link with _Stops_ shp) Desc_variant - Type (Variant) description (A = Ascending, D = descending) * * * **csv sheet _Timetables_** Description: Timetables Attributes: COD_LINE - Transportation line code CODE_DAY_TYPE - Code for the day of the week LEAVES_FROM - Origin of the bus route DEPARTURE - Depature time DESTINATION - Destination of bus route ARRIVAL - Arrival time DESC_LOCAT - Description of Control Point (Stop) location COD_UBIC_C - control point code (referenced in *control_points* shp file) TIME - Time at control point location ORDINAL - Correlative number of the sub-line of the line DESC_VARIANT - Type (Variant) description (A = Ascending, D = descending)


title: How to change projection and show latitude / longitude in QGIS?

text: I am new to QGIS and pretty ignorant with the subject, but I want to be able to see the latitude / longitude of a point (with a mouse click) in Quantum GIS. I imported a shapefile (roads of finland from here : http://www.maanmittauslaitos.fi/en/node/6567 ), and there is a box a the bottom that show the current coordinate in unknow units to me : 521636,6947168, same the coordinate capture don't show lat/long. The coordinate system seems to be WGS84 - 4326. I am sure it is a stupid question, but thanks for your help.


title: Performing statistical analysis of buffers?

text: I am doing a buffer analysis of incinerators and looking at the output areas within those buffers, is there a way of doing a statistical analysis of several buffers to see if there is a significant pattern between the data within the buffers?


title: GeoExt Legend Modification To Include Feature Count

text: GeoExt has Legend capability but is is quite basic which shows only feature types like in example http://api.geoext.org/1.0/examples/legendpanel.html. How could it be modified display legend with count(no of values)? ![enter image description here](http://i.stack.imgur.com/ujlye.png) I am using **_geoserver_** to serve map and using **_geoext_**. The solution I am looking for is to add this feature into legend panel (may be through modification of javascript source) and not make my own solution. Any path, direction code for this would be appreciated.


title: Re-enabling a web service API call that has stopped working unexpectedly

text: so we have are running an instance of ArcGis Server, and have a handful of services running. These were set up by someone who is no longer working with the company. Some of them are built into applications that have been functioning just fine. Recently an application we were running though had one of the API calls that the page uses stop working. It was pulling in lat/long from user entry and sending it to the service using GET, to determine what boundary the point fell in. About a week ago and a half ago, this just stopped functioning. I don't think anything has changed, or at least I don't know who could/would have changed anything, and I can't find any evidence of change either. The funny thing is that all of our other services are working fine, including one that does the same kind of point-in-polygon search, but on a different layer. I can't even find the underlying code to access this lookup (if there is any). I have the URL, and I have the service entry in the arcgis server manager, but I don't know what files configure that URL that I could look at. Any thoughts? Generally I could use help figuring out why this may have stopped working unexpectedly, And perhaps how to either turn it on, or whether we need to build this all over again.


title: Is it possible to unique value style a raster in QGIS?

text: In ArcGIS one can load a raster layer and choose an option to style the raster based on unique values. This is helpful if I have a raster of discrete values that are not evenly distributed. For example, I have a land cover map that has values ranging from 1-12, 20-30, and 250. In this case a continuous or equal interval classification will not uniquely classify the raster. Is possible to do in QGIS directly or with a plugin?


title: Does OpenLayers3 support feature editing?

text: For OpenLayers2, there are nice examples which show how to create vector features and edit them (adding vertices, moving them, ...), e.g. http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/modify- feature.html Is it possible to reproduce this functionality in OpenLayers3? On the official website, I was only able to find an example which shows how to create vector features but not how to edit them: http://ol3js.org/en/master/examples/draw- features.html


title: Spatial ETL or some other tools?

text: and, first of all, sorry for my mistakes, my English is not so good. I need to read geographic data from an ORACLE spatial database in Gauss Boaga SRS, convert them in WSG84 (EPSG 32632), e put them in another ORACLE spatial data base. I've tried to use GeoKettle 2.5 but I think that there is some bugs because it seems not set SRID on the new geometries. I need a tool that works on server side and I would not to extract data from the source database, convert them in some intermediate format, to apply the srs conversion and then put the data in the new destination database. There is any other open source ETL or some other tool? Thank you very much in advance Cesare


title: KML file saved from KMZ missing tabular data

text: I saved a KML file in Google Earth from this KMZ ... https://www.rampp- team.com/documents/pennsylvania/watershed/LowerSusquehanna/lancaster_pa/Lancaster_CSLF.zip . Upon opening the KML file in QGIS, all of the tabular data is the same for all of the polygons, even though when the KMZ was loaded into Google Earth, there was color coding based on, apparently, tabular data. Is there any way to preserve the data so that I can work with it in ArcView (shapefiles)? There seems to be missing information in the KML that is present when displayed in Google Earth.


title: ArcGIS - ModelBuilider - Collect Values not working as expected

text: I am trying to iterate through a folder of rasters, reclassify each raster, then combine all of the reclassified rasters using Cell Statistics (to get the overall SUM of the reclassified rasters). I have read countless help forums and my Model should be working, but I am not able to connect the "Cell Statistics" block to the "Output Values" from the "Collect Values." For some reason, the only variables available to be under the "Cell Statistics" input picker box are "Raster" and "Reclassified Rasters" - I would expect "Output Values" to be listed as well, as that is the link I am trying to make. Any help would be greatly appreciated!! ![ModelBuilder](http://i.stack.imgur.com/07BZl.png) ![CellStatsPicker](http://i.stack.imgur.com/wW0vb.png)


title: How do you symbolize "Unique Values, Many Fields" with more than 3 fields?

text: I have data that has 5 fields with unique values that I need to symbolize at one time. Is there a work around to allow me to do this or a python code I can run to use more than three fields?


title: How to fix "Connection failed - Check settings and try again" when connecting to PostGIS?

text: I have Postgres running via Postgres.app on rails already and am trying to connect QGis to the database. PostGIS is working already. (questions already found online deal with this issue only) I do not have a password or username set up for this database, as indicated in my database.yml file for rails:               development:       adapter: postgis       encoding: unicode       postgis_extension: true       schema_search_path: public,postgis     ffsdfsdfsdf  pool: 5       database: gisdatabase       host: localhost      So I've gone into QGis and am trying to set up a new PostGIS connection:               Service:     Host: localhost     Port: 5432     Database: gisdatabase     SSLMode: allow     username:      password:      I've changed the port around and managed to get this error:               "could not connect to server: Connection refused..."      Changing the port back to 5432, I get a different error, thus indicating that the connection is not being refused:               "Connection failed - Check settings and try again."      I'm thinking that perhaps its the blank "Service" form or perhaps an error with the empty username and password fields that are causing the error, but I don't really know. I've tried to find the correct Service name but have been unsuccessful


title: Is it possible to offset lines with the same symbology?

text: I'm working in ArcMap 10 and have been tossed an electrical system map drawn in CAD to recreate in ArcMap. In several sections, different line numbers share the same structures for long stretches. Many times these have the same voltage (which is what they are symbolized on). Is there a way for me to continue symbolizing these lines by voltage while showing 3 separate lines that are not stacked for one section, 2 separate for another, etc. etc? Thanks for your help!


title: How to convert a line to points?

text: I'm working with QGIS and I want to convert a line into many points, does someone know how? Thanks.


title: What is the single most influential book every GIS professional should read?

text: If you could go back in time and tell yourself to read a specific book/text/guide/tutorial at the beginning of your career as a gis-developer, which book would it be? I expect this list to be varied and to cover a wide range of things. * * * This same question was once asked at stackoverflow for programming topics, and it has been considered by some as "one of the most important question ever asked on stackoverflow". So I decided to bring this question to serve our needs here at gis.stackexchange.


title: Reconcile Versioned Geodatabase with only DEFAULT version?

text: Follow up to this: Spatial Database Connection String I am trying to reconcile a versioned geodatabase that has only one version, DEFAULT. I am following the steps from the ESRI documentation: A quick tour of reconciling a version. It seems like there is no reason to have to do this, but the "OLE DB" table and "spatial" table are out of sync until I do this. As per comment from @mwalker in linked question above: > If you're using versioned SDE then you may not see changes right away, since > versions are handled with delta tables and views. The source tables won't > get updated until the version is reconciled.


title: Select vectors overlapping a raster

text: I have a raster layer with travel times from a specified point in my city's downtown. What I'd like to do is select all of the census blocks that lie at least partially within 45 minutes of downtown (i.e. I'd like to select all of the vector features that contain at least one raster pixel with a value of less than 45). I'd like to do this in QGIS if at all possible; suggestions for other FOSS software are also welcome.


title: Nearest Neighbor calculation in PostGIS

text: I'm learning how to use PostGIS and spatial databases for analysis. What I am trying to do is perform a calculation to get the distance for the nearest polygon in a file, using the edge calculation, rather than vertices. Using this answer from Paul Ramsey to a similar question: > CREATE TABLE mytable_distances AS SELECT a.id, b.id, > ST_Distance(a.geom::geography, b.geom::geography) as distance FROM mytable > a, mytable b; I am attempting to apply it to my spatial database. I don't understand the structure of this query though. I think `CREATE TABLE mytable_distances AS` creates a table to store the result but after this part I'm lost. Are `a` and `b` column names? If so, why would I specify two columns to calculate this? My table is called `TestArea` and I have experimented with some basic queries successfully:               SELECT        "TestArea".hgt     FROM        public."TestArea"     WHERE       "TestArea".area > 100      The structure of the database in PGAdmin III is as follows, with my table called `TestArea`. I'm not sure what the nearest neighbor calculation should look like using my column headers (all of these objects are polygons). ![enter image description here](http://i.stack.imgur.com/YXhdk.png)


title: Accurate and fast nearest neighbour, which distance function should I use and how to it speed up?

text: I am solving the following problem: I have a map with many points in it and I need to find the nearest point to given location. Each point carries information about it's latitude and longitude. This is for the routing algorithm to find an origin and destination point closest to the user selected locations. I wanted to use the "<->" operator for finding the nearest neighbour. But when testing I encountered the difficulty. It seems that the <-> is not always working properly for ordering points by distance. When running the following query, for the first two SELECT pairs it seems that point p1 is closer to location L. While from other two query pairs the result shows that in fact p2 is closer to location L. I checked that p1 is closer to p2 using http://www.movable-type.co.uk/scripts/latlong.html. This site return the distance in km similar to the result of the third SELECT pair, which is correct, they are both using spherical model of the Earth. By p1 I mean 14.452601,50.076207. By p2 I mean 14.452789,50.075481. By L I mean 14.451722068277277,50.07564315647511 (longitude,latitude). Is this correct, or am i making some mistake?               SELECT     (SELECT ST_Distance(st_setsrid(st_makepoint(14.452601,50.076207),4326),st_setsrid(st_makepoint(14.451722068277277,50.07564315647511),4326)))AS geometrical_from_p1,     (SELECT ST_Distance(st_setsrid(st_makepoint(14.452789,50.075481),4326),st_setsrid(st_makepoint(14.451722068277277,50.07564315647511),4326)))AS geometrical_from_p2,          (SELECT (st_setsrid(st_makepoint(14.452601,50.076207),4326) <-> st_setsrid(st_makepoint(14.451722068277277,50.07564315647511),4326)))AS geometrical_from_p1,     (SELECT (st_setsrid(st_makepoint(14.452789,50.075481),4326) <-> st_setsrid(st_makepoint(14.451722068277277,50.07564315647511),4326)))AS geometrical_from_p2,          (SELECT ST_Distance_sphere(st_setsrid(st_makepoint(14.452601,50.076207),4326),st_setsrid(st_makepoint(14.451722068277277,50.07564315647511),4326)))AS geomethrical_from_p1,     (SELECT ST_Distance_sphere(st_setsrid(st_makepoint(14.452789,50.075481),4326),st_setsrid(st_makepoint(14.451722068277277,50.07564315647511),4326)))AS geometrical_from_p2,          (SELECT ST_Distance(ST_GeographyFromText('POINT(14.452601 50.076207)'),ST_GeographyFromText('POINT(14.451722068277277 50.07564315647511)')))AS geographical_from_p1,     (SELECT ST_Distance(ST_GeographyFromText('POINT(14.452789 50.075481)'),ST_GeographyFromText('POINT(14.451722068277277 50.07564315647511)')))geographical_from_p2     ;      the 8 results for the 4 query pairs are: 0.00104424158783511; 0.00107918396178276; 0.00104493638333828; 0.00108122276233257; 88.6845186250299; 78.2447351379485; 88.8360501337395; 78.4754154775416 My application is written in java with connection to PostgreSQL 9.2 and PostGIS 2.0.3 . Now I am using simple solution written in java which is fast and accurate enough: I just go through all the points P loaded in RAM, calculate their distance from location L and remember the one with minimal distance. I use following formula:               simple_distance = SQRT[((L.longitude-P.longitude)*LON_DEG_M)^2 + ((L.latitude-P.latitude)*LAT_DEG_M)^2]      LON_DEG_M and LAT_DEG_M represent length(in meters) of one degree of longitude/latitude at a latitude of L. I calculate them only once for L and use these values for all points P. This does not give exact distance but I use it just to find the nearest point. (SQRT is not necessary.) On my laptop it takes about 2 milliseconds to find the nearest node this way. In the future I would like to PostGIS to calculate the nearest neighbour(s). On the internet I found the soulution suggesting using <-> operator and I tried ST_distance(geometry,geometry) function as well. As I described earlier I did not manage to make these work properly. Now I have implemented versions using ST_distance_sphere(geometry,geometry) and ST_distance(geography,geography) which seem to work properly but are slower for me. I am using following queries:               SELECT osmid FROM nearest_node_geom_sphere ORDER BY ST_Distance_sphere(geometry,st_setsrid(st_makepoint(L.longitude,L.latitude),4326)) LIMIT 1;          SELECT osmid FROM nearest_node ORDER BY ST_Distance(geography,ST_GeographyFromText('POINT(L.longitude L.latitude)')) LIMIT 1;      Is there a way to use the <-> operator properly to return the order the distances. If no how can I improve the performance of ST_distance_sphere(geometry,geometry) and ST_distance(geography,geography). Which should be fastest to use? For the current number of nodes I am getting the following times: (2 milliseconds for the simple java algorithm described earlier, 50 ms for St_distance_sphere(geometry,geometry), 90 ms for ST_distance(geography,geography)). I have around 9000 points in db running locally.


title: How to calculate area in square kilometers of a OSM boundary

text: I have tried using measurement plugin in JSON. It does not work if the boundary is made of multiple selected lines. That plugin works when it is a single line for the whole boundary. Is there any way to do this?


title: Where did my points go?

text: I had an excel file marking points on my map. I then added a base map and my points are gone. Even with the base map layer turned off the points do not show. I tried reordering the layers and tried deleting then re-adding the excel file and nothing seems to work. Any ideas?


title: Las 1.2 format displays extremely long thin line of points

text: I am having difficulty properly visualizing aerial LIDAR data from the following source: http://csc.noaa.gov/htdata/lidar1_z/geoid12a/data/1124/ Taking any of the laz files, the point cloud displays as an extremely long thin line of points. Zoomed in, there are cyclic perturbations in the points along that line, which leads me to believe that some sort of transform is necessary to properly visualize the data. For comparison sake, the aerial LIDAR data set found here visualizes as one would expect: http://opentopo.sdsc.edu/gridsphere/gridsphere?gs_action=datasetMetadata&cid=geonlidarframeportlet&otCollectionID=OT.092011.2875.1 Both claim to use NAD83 as the horizontal coordinate system. From what I can tell, the only major difference is one is LAS 1.0 and one is LAS 1.2. That being said, I don't really know what I'm doing. Any help in explaining the difference between the two data sets is greatly appreciated. A little bit of background to help guide an answer. I do not come from a GIS background, but rather am interested in comparing my LIDAR point clouds against a geographically accurate model, say a quality aerial LIDAR collect. For now, while learning, I have been using the free applications LAStools and CloudCompare.


title: Touch up tool for rasters?

text: I was wondering if it were at all possible to manipulate/massage rasters (eg Geotiff) using Qgis plugins or Grass?? By manipulate, I mean manually smooth off interpolation artefacts, blended surface disagreement, etc. Like a photoshop 'touch up tool' if you will. I've had a crack at trying with GIMP, but I lose all my geotiff info. If anyone hasn't already developed it, they should. Update: GIMP Works for 8bit Geotiff files, however, all data below 0m and above 255m are lost. Need to find a software package that deals with float64 Geotiffs.


title: My class using ogr to calculate distance is returning incorrect results away from the equator

text: In an answer to this question ustroetz kindly provided some sample code for use of ogr to do lat/lon distance and point in polygon calculations. I've created a Python class based on his example to do distance calcs but the results aren't correct. I realize that I could simply use haversine but the class is meant to grow to include other ogr functions, this is just the first step. Allowing for the small difference due to the earth not being a perfect sphere, I'd expect the distance between degrees of latitude to be approximately 60 nautical miles anywhere from the equator to the poles, but the code in my class is returning approx 60 nm at the equator and 89 nm at 47 degrees latitude. I'm geo-ignorant so don't know how to go about fixing this. I assume that the problem is in the class **init** where the coordinate transform is set up. Perhaps EPSG 3857 is not the correct projection to convert to from EPSG 4326? Since distance is not calculating correctly I think that a point in polygon method (to be added to the class) will also be inaccurate unless I perform a repair.               #!/usr/bin/python          from __future__ import print_function     from osgeo import ogr     import osr     import sys          class Geo(object):         def __init__(self):             """             Set up coordinate transform             """             inSpatialRef = osr.SpatialReference()             inSpatialRef.ImportFromEPSG(4326)           # WGS 84             outSpatialRef = osr.SpatialReference()             outSpatialRef.ImportFromEPSG(3857)          #Spherical mercator             self.coordTransform = osr.CoordinateTransformation(inSpatialRef, outSpatialRef)              def distance(self, position_1, position_2, units="km"):             """             Returns distance in 'units' (default km) between two Lat Lon point sets                     position_1 and position_2 are dicts containing "lon" and "lat"                          Units (optional) can be "km", "sm", or "nm"             """             point1 = ogr.Geometry(ogr.wkbPoint)             point1.AddPoint(position_1["lon"], position_1["lat"])             point1.Transform(self.coordTransform)                  point2 = ogr.Geometry(ogr.wkbPoint)             point2.AddPoint(position_1["lon"], position_2["lat"])             point2.Transform(self.coordTransform)                  raw_dist = point2.Distance(point1)                  print("Raw distance from ({0:6.2f}, {1:6.2f}) to ({2:6.2f}, {3:6.2f}) is {4:14.6f} km, "                 .format(position_1["lon"], position_1["lat"],                         position_2["lon"], position_2["lat"],                         raw_dist), end="")                  if units.lower() == "km":                 return raw_dist * 0.001             elif units.lower() == "sm":                 #return raw_dist * 0.00062137                 return (raw_dist / 1000) * 0.621371192             elif units.lower() == "nm":                 #return raw_dist * 0.000539956803                 return (raw_dist / 1000) * 0.539956803          if __name__ == "__main__":             g = Geo()             print("{0} {1}".format(g.distance({"lon":147.0, "lat":0}, {"lon":147.0, "lat":1}, "nm"), "nm"))             print("{0} {1}".format(g.distance({"lon":147.0, "lat":47}, {"lon":147.0, "lat":48}, "nm"), "nm"))      The output produced by the code below is:               Raw distance from (147.00,   0.00) to (147.00,   1.00) is  111325.142866 M, 60.1107682357 nm     Raw distance from (147.00,  47.00) to (147.00,  48.00) is  164780.762454 M, 88.9744936905 nm


title: Why might Ordnance Survey codes all be out by 500m?

text: I've been given a set of UK Ordnance Survey geocodes, but I think they're all off by about 500 metres. Here is an example - please could someone confirm to me that the codes are wrong, not my calculations? The OS geocode that I've been given is `SO7567`, for a place called Abberley, in Worcestershire. My script converts this to `52.30136731, -2.36798287` here: http://goo.gl/maps/9a3Yu However, Abberley is here, about 500 metres north: http://goo.gl/maps/OAD9L This conversion site suggests my calculations are correct, and it is indeed the original coders (who looked at Abberley, and decided that its Ordnance Survey code was `SO7567`) who were out of whack. Could anyone suggest why they might all be out by exactly this amount - could it be a projection issue? I'm not an geographer, and the person who gave them to me swears they should be right! Thank you for nay help.


title: postgis error: when adding features geometry has z dimension but column does not

text: I have to define a geometry column in PostGIS for 2D points, but when I try to import points from DXF to postgres I get the following message: > "postgis error: when adding features geometry has z dimension but column > does not" Is there any way to change DXF files to be 2D geometry? I have tried this with the comand `Flatten` in autocad but the same error appears.


title: Help with opentripplanner

text: I have started working with opentripplanner (i am developing a journey planner app). I am following the two & five minute tutorial given on opentripplanner website. but while starting server using "bin\start-server.bat" giving me errors which are shown in picture, i also tried to google for error messages but didn't find any fair solution. kindly help me in this matter.![C:\\apache- tomcat-7.0.33\\otp\\bin>start-server](http://i.stack.imgur.com/fefw5.png)


title: OpenLayers - Get features inside a polygon

text: In my OpenLayers map I allow users to draw an ad-hoc polygon vector. Then I need to get all the features from a WFS vector layer that fall within the ad- hoc polygon. Here is the code I have that allows the user to draw the ad-hoc polygon in the map. This code works fine:               function buildIt() {     //CREATE THE NEW VECTOR      var polygonLayer = new OpenLayers.Layer.Vector("Poly Layer");     //ADD IT TO THE MAP     map.addLayer(polygonLayer);          //CREATE A DRAWFEATURE CONTROL     var polyedit = new OpenLayers.Control.DrawFeature(     polygonLayer,//POINT IT AT THE USER DEFINED POLYGON LAYER     OpenLayers.Handler.Polygon     );          // 'point' is one of the named callbacks specified by OpenLayers.Handler.Polygon     // and is called every time a point is added to the feature being drawn     polyedit.handler.callbacks.point = function (pt) {          console.log(pt)     }     map.addControl(polyedit);//ADD THE DRAWFEATURE CONTROL TO THE MAP     polyedit.activate();//ACTIVATE THE DRAWFEATURE CONTROL      } After this I am clueless. How can I get all the features that fall within the user defined polygon? Specifically, I need to get the attributes from each WFS feature (sometimes points, sometimes polygons) that fall within the user drawn ad-hoc polygon. Any suggestions would be appreciated! Thanks.


title: QGIS UTM zones - TIN interpolation plugin

text: I am trying to add a Z-variable to a vector in order to eventually calculate the volume or the zone using TIN. I was told I first need to set my UTM in order for my Z-variable to be recognized in meters. If my vector spans accross various UTM zones, which ones do I use?


title: Inland / crater watershed delination

text: Even though watershed delineation is a quite popular matter here, I have what seems to be a somewhat unusual demand. I start with a DEM which is constituted of a series of craters, all centered on one point which is the lowest part of the crater. Here is a picture of my DEM What I want to to, is to obtain the drainage basin of each crater. I know how to delineate watersheds using ArcGIS' Hydrology tools, but they are best suited for 'open' hydrological systems (flows try to reach the exterior of the raster). Here is the result I obtain. How comes some of my drainage basins are obviously wrong? Why is Arcgis so lazy that its scope is limited to the rectangle limited by the four most extreme (N-S-W-E) points? Therefore, my question is the following: is it possible to automatically delineate the watershed basin and set the center of my craters as the targets where my flows should go? Thanks in advance for your help! Damien [Edit : added Arcgis output for clarity]


title: GRASS i.landsat.toar returns empty raster

text: I am trying to use the GRASS module i.landsat.toar. Currently the files created are empty and it spits out: ![enter image description here](http://i.stack.imgur.com/SFfDN.png) So it seems that it is not picking up something? The location is set to the extent of the landsat image. Does anyone have an idea where I am going wrong? Becky


title: Making Use Of Railway Route from Google Maps API

text:
I have a specific requirement where in i have to display or highlight only railway stations in the map rather than the whole map. How can this be achieved.?. Please find the below code that i have tried.

                    Any help will be much appreciated.. Thanks in advance..


title: Ogr: How to add layer description to dgn?

text: I have created a dgn-file using Ogr, but can't find a way to fill out the description for this layer programatically. (something like _dgnLayer.Description = "Highways")               opts.Add("SEED=" + seedfile);     opts.Add("COPY_WHOLE_SEED_FILE=YES");          // Prepare     Initialization.PrepareGDAL();          // Initialize output DGN     using (var dgnDriver = Ogr.GetDriverByName("DGN"))     {         _dgnDataSource = dgnDriver.CreateDataSource(filename, opts.ToArray());         _dgnLayer = _dgnDataSource.CreateLayer("", null, wkbGeometryType.wkbUnknown, null);         _dgnFeatureDefinition = _dgnLayer.GetLayerDefn();         _dgnFeatureDefinition.AddFieldDefn(new FieldDefn("ErrorTest", FieldType.OFTString));     }      Regards Lars


title: calibrating vector line in qgis

text: I have loaded GPS points into a QGIS vector layer. I also imported a vector line from a dxf file which doesn't have georeferencing. I would like to fit in line geometry between the GPS points - how can I do this?


title: How to extract numbers from each vectors?

text: I'm trying to create custom legend for a layer where OpenLayers.Rule objects are created dynamically and added to a layer.               new OpenLayers.Rule({                     symbolizer: {                         strokeColor : color,                         fillColor: color                     },                     filter: new OpenLayers.Filter.Comparison({                         type: OpenLayers.Filter.Comparison.BETWEEN,                         property: p,                         lowerBoundary: from,                         upperBoundary: to                     })                 })); and so on ..      I need to extend functionality of legend where for each rule I need to extract how many vectors affected by the rule so that when user changes interval boundaries as above, drawn legend replaced by new numbers. Is there any built-in functionality for this in OpenLayers ?


title: Why is GPS a free service?

text: The Global Positioning System ( **GPS** ) **is a free service** that is owned and operated by the U.S. Government and is always available. When we buy a GPS device, we don't pay a monthly fee or pay a tax for GPS support. We only pay the price of the device. **I don't understand how it's possible**. How does the U.S. make money?


title: How to convert factfinder2.census.gov map data to KML?

text: I've downloaded a map from http://factfinder2.census.gov/faces/tableservices/jsf/pages/productview.xhtml?pid=DEC_10_SF1_P1 (limited to San Francisco census tracts), and I'd like to convert it to KML format. However, after unzipping the shapefile .zip file and running               $ ogr2ogr -f KML pop_by_census_tract.kml 140_00.shp      I get the following error message:               ERROR 6: No translation for Mercator_Auxiliary_Sphere to PROJ.4 format is known.     Warning 1: Failed to create coordinate transformation between the     input coordinate system and WGS84.  This may be because they     are not transformable, or because projection services     (PROJ.4 DLL/.so) could not be loaded.     KML geometries may not render correctly.     This message will not be issued any more.           Source:     PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",         GEOGCS["GCS_WGS_1984",             DATUM["WGS_1984",                 SPHEROID["WGS_1984",6378137.0,298.257223563]],             PRIMEM["Greenwich",0.0],             UNIT["Degree",0.0174532925199433]],         PROJECTION["Mercator_Auxiliary_Sphere"],         PARAMETER["False_Easting",0.0],         PARAMETER["False_Northing",0.0],         PARAMETER["Central_Meridian",0.0],         PARAMETER["Standard_Parallel_1",0.0],         PARAMETER["Auxiliary_Sphere_Type",0.0],         UNIT["Meter",1.0]]          ERROR 1: Latitude 4553026.920500 is invalid. Valid range is [-90,90]. This warning will not be issued any more     Warning 1: Longitude -13627851.842700 has been modified to fit into range [-180,180]. This warning will not be issued any more      When I open the resulting KML file in Google Earth, I get randomly scattered lines across the entire planet. The example at code.google.com/apis/kml/articles/vector.html works fine, so the installation of GDAL (1.8.0 from macports) isn't totally broken. http://trac.osgeo.org/gdal/ticket/3962 seems related, but I'm not sure if it's saying that Mercator_Auxiliary_Sphere is just not supported by GDAL, or if it's implying I should pass another command line option to make it work. Edit: I wound up accomplishing my goal by downloading http://www2.census.gov/geo/tiger/GENZ2010/gz_2010_06_140_00_500k.zip, which contains shapefiles that ogr2ogr and shp2pgsql can understand, and joining it with the pure table data from factfinder2. I'm still curious about the format factfinder2 is using, but it's no longer blocking progress for me.


title: Examples of Google styled Maps? (including JSON)

text: After watching a great video on creating different map styles with Google Maps, I have been having some fun playing around with the Google Maps Style Wizard. I was hoping to find a gallery of user submitted Google Maps Styles, with accompanying JSON code so that I could pinch their hard work & cartography skills, and use on my own applications. Has anyone come across either a collection of styles (+JSON) or at least some great examples of google maps styles, where the JSON is also available? The closest I could find was this.


title: Efficiently querying a region-partitioned PostGIS table

text: I have two PostGIS tables: one of `streets`, and one of `regions`, which, apart from spanning the same spatial extent, are a priori unrelated. The `streets` queries I perform can be restricted to a given region, by supplying a known id. To exploit this, I added a `region_id` column to the `streets` table (using a `st_intersects`-based update query, which was quite expensive, but performed only once). My question: once this is in place, will the use of an index on the `streets.region_id` column be enough to make queries of this type maximally efficient:               select * from streets where region_id = <id> and ...      Or is there an alternative mechanism that would perform better?


title: A formula error in raster calculator with arcgis 10.1

text: help me to solve a problem at a formula to calculate the susceptibility to landslide that gives me errors when computing with "raster calculator" in arcgis 10.1, the formula is exact but errors in the expressions: "(", ")" or "," and here is the formula: Con("aspectU0" < 90,0,"aspectU0" > 90 & "aspectU0" < 180 , ("aspectU0" - 90) / 90,"aspectU0" > 180 & "aspectU0" < 270,(270 - "aspectU0") / 90,0,"aspectU0" > 270 & "aspectU0" < 360,0) or help me to convert the following formula which is executable in arcgis 9.3 to be executable in arcgis 10.1: con([aspectdem] le 90, 0, [aspectdem] gt 90 & [aspectdem] le 180, ([aspectdem] - 90) / 90, [aspectdem] gt 180 & [aspectdem] le 270, (270 - [aspectdem]) / 90, 0, [aspectdemf] gt 270 & [aspectdemf] le 360, 0) Thank you in advance


title: Where can I obtain 3D data for Singapore?

text: I am looking for providers of 3D maps/models of Singapore. This might be either from photogrammetry/laser techniques or based on a DEM + building footprints/landuse with a height attribute. Is any such data available either in public repositories or from specialized companies?


title: OpenLayers 2.13.1 - Google layers

text: I'm following the examples of a free on OpenLayers, in the code below I am calling various layers of google maps api. Have checked with the code book and is correct but nothing appears on the broswer Tested with one at a time and appeared, does anyone know what is wrong in the code? Also I've taken the spec version of the api call to google maps and did not work. Nothing appears.                   <!DOCTYPE html>     <html lang='en'>     <head>      <meta charset='utf-8' />      <title>My OpenLayers Map</title>      <script type='text/javascript' src='OpenLayers.js'></script>           <!-- Chamada a Api Google Maps especificando a versão 3.2 -->      <script src="http://maps.google.com/maps/api/js?sensor=false&v=3.2"></script>           <script type='text/javascript'>           //Variável map      var map;           //Função a ser chamada para criar o mapa na leitura da página      function init() {           // A classe Map espera dois argumentos "map_element" que o ID do elemento HTLML geralmente uma DIV e opções de mapa {key:value}      map = new OpenLayers.Map('map_element', {});            //Função de inicialização  - google.maps.MapTypeId.HYBRID (híbrida)      var google_hybrid = new OpenLayers.Layer.Google(         "Google Hybrid",         {type: google.maps.MapTypeId.HYBRID}         );           //Função de inicialização  - google.maps.MapTypeId.TERRAIN (topológica)      var google_physical = new OpenLayers.Layer.Google(         "Google Physical",         {type: google.maps.MapTypeId.TERRAIN}         );           //Função de inicialização  - google.maps.MapTypeId.TERRAIN (topológica)      var google_satellite = new OpenLayers.Layer.Google(         "Google Satellite",         {type: google.maps.MapTypeId.SATELLITE}         );           //Função de inicialização  - google.maps.MapTypeId.ROADMAP (street layer default)      var google_streets = new OpenLayers.Layer.Google(         "Google Streets",         {             );          //Adiciona as Google Layers ao mapa     map.addLayers([google_hybrid,google_physical,google_satellite,         google_streets]);                //Camada de controle que vai mostrar as camadas no mapa      map.addControl(new OpenLayers.Control.LayerSwitcher());           //Verifica se o mapa tem um ponto central e o extende a sua extensão máxima      if(!map.getCenter()){      map.zoomToMaxExtent();           }      }           </script>     </head>          <body onload='init();'> <!-- Chama a função js init() -->           <!--Elemento HTML onde o mapa é exibido -->      <div id='map_element' style='width: 1000px; height: 900px;'>      </div>          </body>     </html>


title: Where does MapInfo store its error and log files?

text: I am having errors opening a table with spatial co-ordinates in Microsoft SQL and my question in gis.stackexchange is here. I want to know where are the error and log files of Mapinfo stored. I searched over the Mapinfo installation but was unable to find them.


title: Creating Latitude Grid from DEM

text: I am trying to evaluate an equation in the raster calculator and I need latitude values. I have the DEM for the region and am wondering if it is possible to create a latitude raster based on the DEM? Thanks a lot!


title: How to reproject spatial data using free libraries?

text: How can I use free libraries to transform spatial data? For example, I want to change the projection of a Shapefile within the code of my C# web application. How do I do that?


title: How to solve Projection Problem at client side

text: I want to discuss a scenario here to all.   1. I have developed a Web mapping application in OpenLayers and GeoServer. The customer give us shapefiles with native projection SWREFF99_1330 (EPSG:3008). i published this shapefile on Geoserver after changing its native projection from EPSG:3008 to EPSG:4326 by using ogr2ogr tool. The layer displayed perfectly over Google map layer in my OpenLayers Web Page.    2. Again, I publish this shapefile on GeoServer with its native projection (this time, without changing projection using ogr2ogr tool) and then i go to my page and figure out that the layer was not visible over Google map layer.  Now, my question to all members: Is there any way to change the native projection from EPSG:3008 to EPSG:4326 at client side (in my OpenLayers web page code) ? so that the layer should display correctly over google base layer as in case 1.


title: How to select nth row in mapbasic?

text: There are multiple rows in my .tab file in mapinfo. Is there any way to select nth row in mapbasic window of mapinfo?


title: Looking for map calibration software and city database

text: I'm in need of a mapping software which, given a map, lets you calibrate it (choose which geographic coordinates project to which pixels on the map image) and then given a database of cities, you can navigate to the specified city on the map you just calibrated. To reword the question, I need a mapping software that can calibrate my map image and accepts some kind of database format to display cities on that map. Where to find such compatible map software and database? Preferably free and open source software and data. If the question is too broad, I appreciate any points making me near to the answer.


title: Labels not appearing on any layer in ArcMap?

text: Not sure what the issue is, but I'm unable to get labels to display in ArcMap 10. The obvious things are accounted for (as far as I know). Labels are set in Properties, layers are checked to label in the TOC. I've even restarted to see if that would work. **UPDATE: 3/3/2011** After trying all of the mentioned solutions, I was still unable to get labels to display. It wasn't specific to a single layer, but rather to any layer in the .mxd. I opened a new document, added the layer I'd been trying to label, and was able to display labels just fine. What may have caused the initial document to globally make labels not display?


title: SLD for layers present in a table in DB

text: My layers are present in postgis db which are being served to openlayers JS through geoserver. I have my layers corresponding to polygons,lines etc. whose attributes are stored in the same table itself. Like Halls table contain columns (hid, hall_geom,hall_name) etc. I want hall_name of each hall_geom(polygon) to be placed as a label on it in the map. I have tried SLD- styling form geoserver but couldn't make it successful(I think the styles given are for shape files and not tables in db). Please show me a right way


title: Why are some QGIS 2.2 bar graphs not displayed?

text: I created a vector layer containing all European countries and some double information about them. I'd like to show this information for every object in a bar graph. My problem is that the bar graphs of some areawise "big" countries (e.g. Germany, France) are not displayed in normal mode. Strangely all bar graphs are being displayed as soon as I enter the edit-mode or zoom into the countries. I already tried all possible configurations in the bar graph menu but I can't fix it. Has anybody got an idea how to solve this problem? I use QGIS 2.2 Valmiera. ![normal_mode](http://i.stack.imgur.com/D3Gi2.png) ![edit_mode](http://i.stack.imgur.com/hGAjT.png)


title: Multiple Layers+Retrieval of data from DB

text: I have some big & complicated task this time. I have 2 html pages(page1 & page2). Page1 is for viewing tha map. And page2 is for inputing the values(lat-lon) in a form. Any user can input values and any user can view the map(for now there are no security issues). page1 is provided with a text box and a button. text box(mostly a drop down menu) is used to select the layer and button is clicked to view the map. page2 is a simple form with boxes to give layer name,lat-lon values. Many people suggested me to use Geoserver,postgis,postgreSQL... but I dont understand how they can be used for my project Task to be done: 1.whenever any user(lets say user2) inputs layer name and lan-lot values in page2, the values should be stored in a table(with table name as layer name).This storage can be done using PHP into postgreSQL, Is there a better way to do this??? 2.Now any user(say user1) can select the layer name and click on button to view the map, the markers of that layer(of values present in corresponding table) should be projected on the map. I have to give option to the user to view more than one layer at a time(say with different colored markers for layers).Do I need Geoserver for this???? PostGIS is used to get the values in OL accepted format(JSON) from postgreSQL, but why do I need geoserver???? In other words,how does geoserver & postgis help me to fulfill this task???? your explanation in words helps me a lot instead of any links. Any examples(probably with some code) will also help me. Expecting reply in view of my task, thankyou


title: ArcGIS JavaScript API: onAnimate Error

text: I am trying to zoom to a point in ArcGIS JavaScript API ( **3.9** ). I am doing this one of two ways, I am either grabbing a point feature from ArcGIS Server ( **10.1** ), or I am grabbing the center of a polygon and zooming to that. I was getting an error " **exception in animation handler for: onAnimate** " when zooming to any point. I found here that adding a `setTimeout()` around your `map.centerAndZoom()` solves the problem. However, that was only for the point feature being brought back from the server. The problem still persists when I try to get the center point of a polygon: ![zoom to point code](http://i.stack.imgur.com/wLtGT.png) I have tried both _increasing_ and _decreasing_ the timeout time, but I have not had any success. The map will seem to zoom to the location, but then immediate zoom back to its original location and then spit this error: ![onAnimate error screenshot](http://i.stack.imgur.com/UxIeu.png) I have found a little research done on "Cannot read property 'left' of undefined" and the most I could find is something about symbology - So, just to help out, here is the symbology as it is in ArcGIS Server:               Renderer:       Simple Renderer:       Symbol:                Style: esriSFSSolid                 Color: [0, 0, 0, 0]                 Outline:                        Style: esriSLSSolid                         Color: [76, 230, 0, 255]                         Width: 1      Label:       Description:      Transparency: 0       Labeling Info:      If anyone could shed some light on this problem, I would be grateful.


title: Convert a Toolbox (.TBX) to a Python script (.PY)?

text: I have a .tbx tool box, which runs a script that is incredibly slow. So what I want to do is to open the python script that is running below the .tbx and make some changes or perhaps write something similar and faster. Is there someway to convert a .tbx ( and not just the form ) into a .py so I can inspect the code that it runs? to clarify, it is a third party tool created as a .tbx, and specifically here: http://www.arcgis.com/home/item.html?id=c1c649ad439442189547c12685fcc9c3 it is slow in running in arcmap, but that is not the central idea, here. I want to open the python underneath the .tbx. As suggested by others i have tried to right click and export (grayed out) and also i have tried using a .tbx to .pyt converter (only returns the input form) and one more thing i has also right clicked and opened in wordpad, but it was nearly illegible.


title: How to show multiple features selection button/dialog box on the map using .NET?

text: If you use the Edit tool to click a location on the map with overlapping features, a small icon ![button icon](http://resources.arcgis.com/en/help/main/10.2/01m5/GUID-A03F8F8B-2E9A-4FFC- AA04-D1AA27F20934-web.png) Selection chip pops up with a dialog box previewing the selectable features where you clicked, so you can distinguish the correct feature from the overlapping ones. How to get this "selection chip" from code (using .NET)? What interface I should use?


title: Tutorials for geoserver

text: Do you know any sources from where i can learn how to use geoserver? I know this two sites: http://geoserver.org/ - which in fact is not working (at list at the moment) http://workshops.opengeo.org/geoserver-intro/ - not only (tutorials) for geoserver But i am interesting with more complex information (and not to read only documentation)


title: Is there a way to get the X,Y from a feature class?

text: I currently have an instance of a selected feature class, and I want to be able to get the midpoint X,Y (if its polygon) or the X,Y (if its IPoint) of the feature from the layer, is there some build in GIS method that I can achieve that easily? Thanks and Regards,


title: How do I find the intersections of 2 circles on earths surface?

text: I have the circles' center in lat & long, as well as the radius in meters. How do I find the circles intersections? Edit: EXAMPLE:               Circle 1: Center on Earth's surface (43.564627,-116.220524) These values are Latitude and Longitude             Radius: 15 Meters a Length on the surface of the earth          Circle 2:  Center on Earth's surface (43.564736,-116.219741) These values are Latitude and Longitude             Radius: 15 Meters a Length on the surface of the earth      Expressed in Latitude and Longitude, where do these circles intersect? I am unsure of the best method to find the closest results, accuracy within 2 meters should be alright.


title: How to undo ArcGIS "Move Edits to Base" mistake?

text: I'm trying to help a client who mistakenly checked the "Move Edits to Base" option when versioning a feature class in ArcGIS. They would now like to fix this mistake. However, they don't want to lose any of the versioned edits in that feature class, and they cannot reconcile and post everything in it. There are a couple of years of work in there from several thousand long-lived versions. Does anyone know of a way to accomplish this? Thanks!


title: Cache FeatureCursor results so they can be requeried

text: What is the best method for caching features obtained by a featurecuror so they can be requeried without having to round trip to the datasource? I am querying a subset of features using a queryfilter and later in my code want to subset the original subset of features (ie. I don't want to make a round trip as I already queried the features once). Is there an object or something that allows you to use queryfilter on a subset of client cached features? Or is just storing the features in a List of something and do searching via a loop? In an arcuser article (fall 2009) http://www.esri.com/news/arcuser/1009/files/5tips.pdf which has arcobjects optimizations there is a section on the following: Code Listing 4: Don’t Be Too Selective (or Chatty) which offers: Build a where clause containing all items you want to fetch.   * Create a query filter and set the where clause property to the where clause you just created.   * Create a Geodatabase RecordSet and set the source table property.   * Create a new InMemoryWorkspace and save the RecordSet as a table within it. but not much more than that. I can't track down the code samples for the article and the documentation on IRecordSet (assumption that is what this article is referring to) is very light and not much to go on.


title: WMS BBOX in URL vs in params

text: I'm new to OpenLayers and Geoserver and I have a problem (of course :P). I must retrieve a layer from Geoserver's WMS service, and I want to construct the URL to request it. If i try to make this:               map.addLayer(new OpenLayers.Layer.WMS("test",          "http://192.168.0.30:8080/geoserver/dsn/wms?service=WMS&version=1.1.1&request=GetMap&BBOX="+map.getExtent().toBBOX()+"&srs=EPSG:900913",         { layers: "area", transparent: true, format: 'image/png' })     );      all the tiles of the grid of the wms are the same ( i see a sort of periodic repetition of the image) but if i do               map.addLayer(new OpenLayers.Layer.WMS("test",          "http://192.168.0.30:8080/geoserver/dsn/wms?service=WMS&version=1.1.1&request=GetMap",         { bbox:map.getExtent().toBBOX(), srs:"EPSG:900913", layers: "area", transparent: true, format: 'image/png' })     );      everything is working as expected. What am i doing wrong in constructing the URL? Can you help me, please?


title: ArcPy: (SearchCursor/export to tiff ) with no output

text: I'm trying to write a script that uses a search cursor to loop through a field in a .shp file (Incident_Z) find every value that meets a specific condition (zip code=10004) and then at a scale of 1000, the layout at that scale to a pdf. With advice from various folks I've tried two approaches:   1. Using a search cursor. However I've run into problems with it: The problem is that there is no output, and interestingly, no errors. The script runs, and when I include a print "Done" statement at the end, prints correctly.  import arcpy mxd = arcpy.mapping.MapDocument("C:\temp\Graffiti_DM1.mxd") df = arcpy.mapping.ListDataFrames(mxd, "*")[0] expdir= "C:\temp" cursor=arcpy.SearchCursor("C:\temp\itscomplicated.shp",'"Incident_Z" = ' + "'10004'", "", "", "") for cur in cursor: cur.rotation = 0 cur.scale = 1000 outFile = expdir + "\" + cur.name + ".tif" cur.panToExtent(lyr.getSelectedExtent()) arcpy.mapping.ExportToTIFF(mxd, outFile, df) del cursor   2. Additionally, I've tried as per @PolyGeo's suggestion, the definition query method, below, which runs and produces an output, but not exactly what.I'm looking for.![Definition Query code](http://i.stack.imgur.com/aWxUu.jpg). The problem is that the output is a pdf (I'm actually preferential to pdf than tiff) of the current extent of the layout, and only the current layout. What I'm looking to do is to have a page for each instance of the where_clause, i.e. each record where '"Incident_Z" = ' + "'10033'", at a specified scale of 1000. Is it possible to modify the existing definition_query script to achieve that? As always, any advice is greatly apprecaited.


title: Optimizing a nearest neighbor calculation using PostGIS

text: I'm using PostGIS to calculate the nearest neighbors of polygons. What I want to calculate is the minimum distance from each polygon, to the nearest polygon. Thus far I have got great help from Mike Toews' answer (which I quote with a minor change) here:               SELECT        a.hgt AS a_hgt,       b.hgt AS b_hgt,       ST_Distance(a.the_geom, b.the_geom) AS distance_between_a_and_b     FROM        public."TestArea" AS a, public."TestArea" AS b     WHERE       a.hgt !=  b.hgt AND ST_Distance(a.the_geom, b.the_geom) < 400      Then I calculated the minimum:               SELECT a_hgt, MIN(distance_between_a_and_b)     FROM public."lon_TestArea"     GROUP BY a_hgt      However, my challenge is to calculate this for a large number of polygons (1,000,000). As the above calculation compares each polygon to every other polygon, I wondered how I could improve the calculation so that I do not have to perform 10^12 calculations. One thought I had was to buffer each polygon, and then to calculate the nearest neighbors of all values within the buffer for that polygon, and record the minimum. I'm not sure if that is the best approach, or whether there is a function in PostGIS that I should be using. * * * EDIT: Using one of Nicklas' suggestions, I'm experimenting with `ST_Dwithin()`:               CREATE TABLE mytable_withinRange AS SELECT        a.hgt AS a_hgt,       b.hgt AS b_hgt,       ST_DWithin(a.the_geom, b.the_geom, 400)     FROM        public."lon_TestArea" AS a, public."lon_TestArea" AS b      ![enter image description here](http://i.stack.imgur.com/U6GW4.png) This returns a table of the ID of each polygon, and whether it is within a certain distance or not. Is it possible to construct an `IF/ELSE` type statement using SQL? (I read about using the `CASE` condition) Or should I try joining the table I produce to the original table and then running the query again using ST_Distance?


title: ArcMap 10.1 point snap: Unable to snap to a point please help!

text: Very basic question sorry, missing some fundamentals. Outline: I have 4 points as a .shp also converted to .lyr that I brought in as a x/y table and converted. I want to create a polygon as a separate shape file that is defined by the 4 points - I have done this using the other option of entering the actual coordinates of the point in edit menu. Current status: I have added these files to to my geodatabase also in my project folder, tried many different things to make the snap to point work for these imported x,y points. If I create a polygon and save as a shape file, I can snap to that no problem. The problems seems to be just with these imported x/y points. Sure I a missing something very basic, any help would be much appreciated I am going round in circles. Kind regards Trev


title: How to get the last drawn point for a Geometry in openlayers

text: I wonder if I can get the position of the last point for a geometry in openlayers? For example, I have an `OpenLayers.Geometry.LineString`, how to get its last point? _**Clarification in the comments:_**   In fact, what I want is the last drawed point for the polygon. Is is impossible?


title: Issues calculating NDVI from ASTER

text: I'm having an issue with ASTER data. I have two mosaics; one for 2008 and one for 2012. Both are composed of 4 ASTER scenes and the scenes are all from the same two month period (i.e. no seasonal differences). I have converted the values from DN values to _Radiance_ (CORRECTION: reflectance value was calculated after radiance) and calculated for NDVI but the end result is absolutely meaningless (i.e. the NDVI range is between 1 and -1 but the comparison between two years can not detect change). I think the reason for this is because the 2012 image looks very 'over- exposed' (i.e. there's little spectral difference between urban and pasture). I think I might need to correct for atmospheric 'noise' but I had thought that AST14OTH images were already correct and that it wouldn't be necessary for ASTER14OTH images. If anyone can shed light on why the images from the two years are so different and how to correct them - I would love to hear your advice. Thanks!!!


title: Add-ons on GRASS (win7)

text: Can someone help me to install an add-on for GRASS 6.4.3RC3, on Windows 7? I tried several approaches, but wasn't able to install the add-on. I found several topics here and on the web but the approach doesn't work. Using `g.extension`, I install `r.basin` and it seems that everything is OK, but when I try to use `r.basin` it doesn't exist.


title: How to get the center and radius of the feature in openlayers

text: I created a control to draw circle and rect to the map:                       var supportControls = {                 darwpoint : new OpenLayers.Control.DrawFeature(this.drawLayer, OpenLayers.Handler.Point),                 drawline : new OpenLayers.Control.DrawFeature(this.drawLayer, OpenLayers.Handler.Path),                 drawpolygon : new OpenLayers.Control.DrawFeature(this.drawLayer, OpenLayers.Handler.Polygon),                 drawrect : new OpenLayers.Control.DrawFeature(this.drawLayer, OpenLayers.Handler.RegularPolygon, {                     handlerOptions : {                         sides : 4,                         irregular : true                     }                 }),                 drawcircle : new OpenLayers.Control.DrawFeature(this.drawLayer, OpenLayers.Handler.RegularPolygon, {                     handlerOptions : {                         sides : 40                     }                 })             };             for ( var key in supportControls) {                 supportControls[key].handler.stopDown = true;                 supportControls[key].handler.stopUp = true;                 supportControls[key].featureAdd=function(feature){                     handlerFeature(feature);                 }                 map.addControl(supportControls[key]);             }                       function handlerFeature(fea){                 // how to get the circle center and radius of the feature if it is a circle             }      Now, after the draw end, I have have no idea to differentiate whether the feature is circle or rect, and how to get the center and radius if it is a circle?


title: find polygon corner coordinates

text: I am trying to get the coordinates of each node of the polygon I create. I would like the attribute table to display the name of the polygon (ex. address) and then the coordinates of the nodes (ex. nodeA= Ax and Ay, NodeB Bx and By, NodeC Cx and Cy, NodeD Dx and Dy) is there a easy way to create all the needed polygons and then have the coordiends of the nodes displayed in the attribute table? any help would be great!! Thanks


title: Determine which field is being modified during OnChangeFeature event

text: In the OnChangeFeature event is there a way to determine which field was just edited causing the event to fire? I'm doing several tasks in OnChangeFeature that only need to happen when certain fields are edited, so being able to determine which field just changed would be helpful. Any suggestions?


title: Override default ArcMap editing error dialog

text: Is there a way to override this dialog easily? The custom message is already there, but I'm guessing that my client will be more annoying and will want a translated message. Can I replace that dialog? This dialog is the one that appear if you thrown an exception from inside a class extension. ![enter image description here](http://i.stack.imgur.com/mf93l.png)


title: Displaying KMZ file + my location in Android Google Maps application?

text: This is probably a newbie question, but I don't know anything about GIS. Someone sent me a GPX file that I converted into a KMZ file so it's displayed in Google Maps. It works fine when viewed in a browser, but I'd like to display it in the dedicated Maps application in Android so I can view the KMZ route and my current location at the same time so I don't stray away from the planned route when going for a ride. However, Maps doesn't like pasting the URL with the KMZ file. Here's a screenshot: ![enter image description here](http://i.stack.imgur.com/U1koT.png) Is there a way to see both a KMZ route and the current location? Thank you.


title: Why does this SQL syntax produce empty feature class with ArcGIS Select_analysis?

text: I'm working on a script that involves an arcpy.select_analysis function. The problem I have is that when I run the script it produces an empty file. I've verified that the whole thing works when in the Select GUI, and produces the correct output, and then have even exported the SQL expression and copy/pasted it into the arcgis python window, but no dice. ![Here is the script and warning in ArcGIS python window](http://i.stack.imgur.com/7fncO.jpg) ![Here is the table view showing that zip 10004 does exist in this field.](http://i.stack.imgur.com/Tw2sH.jpg)] I've zoomed the extent both way out and way in to see if that makes a difference, but it doesn't. Any advice would be much appreciated!


title: How to create a feature class in a file geodatabase in ArcGIS 9.3 with Python?

text: I'm not entirely sure if I am using the correct terminology, so I apologize in advance. What I am looking to do is create a file geodatabase and add a feature class directly into that file geodatabase, as opposed to creating a feature class outside the file geodatabase and then importing it into the file geodatabase. The reason I need to be able to create the feature class directly in a file geodatabase is because I need to have attribute table columns that are nullable, whereas if I create a feature class outside the file geodatabase and then import it into the file geodatabase, nulls will not be allowed. Please correct me if I am wrong. Currently, I am able to create the file geodatabase, but I can't add a feature class directly to the file geodatabase. Any help would be greatly appreciated. Thanks. The code I currently have is:                import os, arcgisscripting      gp = arcgisscripting.create(9.3)      gp.Overwriteoutput = 1      cwd = "C:\\Path\\To\\directory"      gp.workspace = cwd      gp.toolbox = "management"      number = '1'      fileGDB = "test_%s.gdb" % number      shpFile = "file_%s.shp" % number      gp.CreateFileGDB(cwd, fileGDB)      gp.CreateFeatureclass(fileGDB, shpFile, "POINT", '#', '#', '#', '#')      gp.addfield ( shpFile, fieldName, "FLOAT", "20","20", "#", "#", "NULLABLE", "#", "#")      ...the rest of my code here


title: How can I change map scale in ArcMap, after I'm almost finished digitizing?

text: I'm just about to design a map that represents different areas in my immediate living environment. I Unfortunately made a big mistake at the beginning of my project. The current scale is given by ArcMap with 1:30,000. 1: 3,000 would be the correct scale. Now to my question: Is it possible to transform the already almost finalized digitization in any way to the correct scale, so that the distances as well as the areas in my map correspond to the reality? I would appreciate answers very much.


title: Knowing acceleration, gyro and compass data how to calculate north direction

text: I have a small video camera with an attached sensor. I can get from the sensor his acceleration, gyro and compass data. Knowing this data I need to rotate the camera so that it will look strictly north. I know how to rotate the camera, but how to calculate the right angle? How can I do it? Or where can I read about it? Or, if this is not a right place to ask such a question, what is the right place? EDIT: All coordinates are in an Earth-fixed inertial frame.The compass and accelerometer readings are unit vectors, and the gyroscope readings are in radians per second


title: how to save layers in combobox

text: I'd like to develop an app so that user introduce the layers in comboboxes ( layers are slope,aspect,elevation etc) then user use these layers for processing in another form(processing form) and dose not need to select the items in processing form . i don't know how can i write the code for saving the layers in comboboxes . please recommend a solution for this app. thnx.


title: How long should I hold onto (cache) references to IWorkspace, ITable, IFeatureClass?

text: After many months of programming with ArcObjects, I still feel somewhat unsure about two related issues: For some operations, workspaces and datasets must be explicitly opened before they can be used. (For example, workspaces are opened via `IWorkspaceFactory.Open()`, `ITable`s via `IWorkspace.OpenTable()`, etc.) On the other hand, there are operations that can be performed without having to open workspaces or datasets first (e.g. geoprocessing, or operations that accept `IName`s as inputs). Thus I suspect that there is a certain cost involved with opening a workspace or dataset, which can only be avoided for the latter type of operations. And because of that, I tend to keep (cache) references to the opened `IWorkspace`, `ITable`, `IFeatureClass`, … instances whenever I open these for the first time. My **first uncertainty** is whether caching `IWorkspace`, `ITable`, etc. references could ever get me into trouble. More specifically, are there any ArcGIS operations, e.g. on tables, that require that there be no live references to "open" tables? (I'm aware of only one potential problem source at the moment: If a workspace or dataset gets deleted, all cached references to it should be thrown away.) My **second, related uncertainty** concerns how long I should cache workspace and dataset references (at most). Let's say I'm writing an ArcGIS extension; would it be OK to open required workspaces when the extension is loaded, and only reset the references when it is unloaded? Would it even be OK if I did the same for datasets? Links to ESRI reference documentation (or insider knowledge) is most welcome.


title: How to link a video to a GPS trail?

text: Does anyone of a program, extension or tool that links a video with a GPS trail? I found this video and would like to be able to do something similar. http://www.youtube.com/watch?v=G07DWVRJBVU Thanks!


title: Calculate field values using random integer derived from count of like features

text: I have a feature class which contains features classified by type. What I would like to do in my new field is generate a random number sequence for those like values using a count of the like values. Perhaps the example below better illustrates my question:               Field1  Field2     X       random # between 1&4     X       random # between 1&4     X       random # between 1&4     X       random # between 1&4     Y       random # between 1&2     Y       random # between 1&2     Z       random # between 1&3     Z       random # between 1&3     Z       random # between 1&3      I'm thinking I would just use GetCount for the totals and then random.randint(1, GetCount Value) to populate the new field. What I can't seem to figure out is how to have the count reset itself each time it encounters a new value. Thanks for any help you can offer.


title: Can Mapnik render spatial data from SQL Server?

text: This is a very simple question - I just want to know if anybody can confirm that they have successfully used Mapnik to render tiles directly from data held in SQL Server. (And, if so, what did you do to make it work?) Please do not reply unless you have personally confirmed that this is possible... not simply that it _should_ be possible I've seen people recommend Mapnik for rendering data from SQL Server in threads such as this one: Any Good Map Rendering Engines for SqlGeometry/SqlGeography Also, the mapnik website states that "all OGR formats are supported": http://mapnik.org/faq/#data However, I have been completely unable to use a connection to my local SQL Server database as a datasource for a Mapnik layer. As a test, I'm using a straightforward test OGR VRT, which executes a SQL statement on a SQL Server to select a single inline geography Polygon as Well-Known Text, as follows:               <OGRVRTDataSource>       <OGRVRTLayer name="test">         <SrcDataSource>MSSQL:server=zangief\DENALICTP3;database=TempDB;</SrcDataSource>          <SrcSQL>SELECT geography::STPolyFromText('POLYGON((0 50, 2 50, 2 53, 0 53, 0 50))', 4326).STAsText() AS geomWKT</SrcSQL>         <GeometryField encoding="WKT" field="geomWKT"/>         <LayerSRS>EPSG:4326</LayerSRS>         <GeometryType>wkbPolygon</GeometryType>       </OGRVRTLayer>     </OGRVRTDataSource>      (Note I've also tried this with more conventional SELECT * FROM Table syntax). OGRINFO succesfully opens this VRT and reports the following:               ogrinfo mssql.ovf -so -al     INFO: Open of `mssql.ovf'           using driver `VRT' successful.          Layer name: test     Geometry: Polygon     Feature Count: 1     Extent: (0.000000, 50.000000) - (2.000000, 53.000000)     Layer SRS WKT:     GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0,             AUTHORITY["EPSG","8901"]],         UNIT["degree",0.0174532925199433,             AUTHORITY["EPSG","9122"]],         AUTHORITY["EPSG","4326"]]     geomWKT: String (0.0)      However, setting this same VRT file as a datasource for a Mapnik layer reports the following error:               ERROR 1: Failed to open datasource `MSSQL:server=zangief\DENALICTP3;database=Tem     pDB;'.     Traceback (most recent call last):       File "rundemo.py", line 48, in <module>         provlines_lyr.datasource = mapnik.Ogr(file="mssql.ovf", layer="test")       File "C:\OSGeo4W\apps\Python25\lib\site-packages\mapnik\__init__.py", line 418     , in Ogr         return CreateDatasource(keywords)     RuntimeError: Failed to open datasource `MSSQL:server=zangief\DENALICTP3;databas     e=TempDB;'.      It seems that there's some problem between the way that the OGR driver creates the SQL Server connection and Mapnik, but I don't know exactly where it is. I've not yet found any evidence or examples to suggest that anybody else has successfully been able to achieve this either...


title: QGIS 2.4: make an image-to-image registration to link the 2 images (RGB AND NIR)

text: I have 2 images (RGB and NIR) in png form from field and i need to link them together somehow to be able to see the overlapping areas, and cut out the wrong ones. How to do this with QGIS 2.4.0


title: PostGIS 2.1 error install with shared object (rtpostgis-2.1.so") Linux Mint

text: I've Installed Linux Mint 16 mate and install PostGIS with PostGreSQL (I've tried many ways in the Internet from original source to some suggestion) but all is too error: " ERROR: could not load library "/usr/lib/postgresql/9.3/lib/rtpostgis-2.1.so": libxerces-c-3.1.so: cannot open shared object file: No such file or directory" Please help me for fix this problem because I can't understand how to fix this. Please, note that in "/usr/lib/postgresql/9.3/lib" has file rtpostgis-2.1.so. Thanks.


title: getting Intersections and streets from map

text: Am new to GIS and maps , but am working on a research concerning traffic analysis and I want to get the Intersections as nodes and the connecting streets as edges , what source could I find these data as csv at ?


title: How to use Intersect tool in ArcObjects

text: I'm trying to use the Intersect tool in ArcObjects SDK Java with two feature classes. Here is my code:                   public void intersectTwoFeatureClasses(Object in1, Object in2, Object out) throws UnknownHostException, IOException {         IGpValueTableObject intersectInFeatures = new GpValueTableObject();         intersectInFeatures.setColumns(2);         intersectInFeatures.setValue(0, 0, in1);         intersectInFeatures.setValue(0, 1, 1);         intersectInFeatures.setValue(1, 0, in2);         intersectInFeatures.setValue(1, 1, 1);         Intersect intersect = new Intersect(intersectInFeatures, out);         IGeoProcessorResult result = gp.execute(intersect, null);         if(result.getStatus() != esriJobStatus.esriJobSucceeded)             return;     }      But I get an Automation Exception: Item Not Found in this Collection. in 'DAO.Fields'. The way I create my IGPValueTableObject seems to be wrong. Does anyone know how to create it for two feature classes ?


title: Spatial database data representation vs. spatial programistic libraries representation

text: Can anyone tell me what is the difference between spatial database data representation and spatial programistic libraries representation? It is not clear to me. I have tried to google it and I can not figure it out


title: Where to download Tracking Server 10 trial version?

text: I need to learn tracking server 10. I couldn't find any download link to download trial version of tracking server. Where can i download tracking server 10?


title: OpenLayers - Cannot draw a circle using createRegularPolygon

text: I have been trying this for a while but I cannot manage to draw a circle on a vector layer although my polygons are being created without any problems.               this.pj_epsg_900913 = new OpenLayers.Projection("EPSG:900913");     this.pj_epsg_4326 = new OpenLayers.Projection("EPSG:4326");          var bounds = new OpenLayers.Bounds(             -13080498.908163622, 3833552.5668887002,             -12978234.962928545, 3956763.6368140383     );          this.map = new OpenLayers.Map(canvas, {         controls : [ new OpenLayers.Control.LayerSwitcher(),                       new OpenLayers.Control.Navigation(),                       new OpenLayers.Control.ZoomPanel()],         maxExtent : bounds,         maxResolution : 481.2932418958517,//156543.0399,         numZoomLevels : 19,         units : 'm',         projection : this.pj_epsg_900913,         displayProjection : this.pj_epsg_4326     });          this.osmLayer = new OpenLayers.Layer.OSM("OSM", null, {         "tileOptions": {             "crossOriginKeyword": null         }     });          this.map.addLayer(this.osmLayer);          this.markersLayer = new OpenLayers.Layer.Vector("Markers", {         styleMap : style_basic     });          this.geometryLayer = new OpenLayers.Layer.Vector("Geometry");     this.map.addLayer(this.markersLayer);     this.map.addLayer(this.geometryLayer);      Now so far so good. I then draw my polygon here and it works. I see my polygons I add to the geometryLayer. But when I try to add a Circle I can't see any. { "radius":"8.27781404016073", "centroid":"(-118.57075649707252,34.26082074825019)" }               var circle = OpenLayers.Geometry.Polygon.createRegularPolygon(                     new OpenLayers.Geometry.Point(lonlat_[0].substring(1), lonlat_[1].substring(1)).transform(this.pj_epsg_4326,this.pj_epsg_900913),                     circleMeta.radius.substring(1),                     30             );                  var circleFeature = new OpenLayers.Feature.Vector(circle);             circleFeatures.push(circleFeature);     var layer = this.map.getLayersByName('Geometry')[0];     // cleanup features first     layer.removeAllFeatures();     layer.addFeatures(polygonFeatures, circleFeatures);      So, the polygons are added but not the Circles. I double checked if the lat long is empty etc but its all there - only there is no shape drawn on the map. What am I doing wrong? Anyone?


title: What licenses are needed for ArcGIS Server and SDE (vs a FOSS setup)?

text: Does anyone know where I could find a cost breakdown for an ESRI/Microsoft GIS server and database setup? I'm trying to figure out all the costs associated with an ArcGIS Server/SDE sitting on top of SQL Server, and compare it to the support cost of a FOSS setup. **From Microsoft we appear to need:** Windows Server - cost per processor and CAL for each user (ArcGIS Server apparently needs IIS which is part of Windows Server) SQL Server - cost per core and CAL for each user **From ESRI:** ArcGIS for Server, Server Image Extension, ArcGIS for Desktop Standard Level (Needed to edit data in SDE) Any information is greatly appreciated.


title: Batch processing DEM rasters in QGIS/GDAL

text: I am attempting to add relief shading to map using .asc raster files, following this tutorial. It works well, but I have only tried it on single tile of raster data which is 20x20km. I want to generate the shading for a much larger area, which means multiple tiles. I understand I can input GDAL commands in the Hillshade/DEM dialogue in QGIS, and the tutorial suggests this means I can perform a batch operation, but I don't know enough (read any) GDAL to do this. I am using QGIS 1.9 on Ubuntu (though I do have a Windows installation as well). Any ideas? EDIT: I have written the following script, demraster.sh:               !/bin/sh      for f in *.asc      do     echo "Processing %f"      gdaldem hillshade %f -z 1.0 -s 1.0 -az 315.0 -alt 45.0      done      I have set it to be executable with **chmod** , and run it with **sh demraster.sh** but get a syntax error:               Syntax error: word unexpected (expecting "do")


title: How to tell SharpMap to display polygons based on z-order?

text: I have a series of polygons which overlap in spatialite. Each has a an attribute providing it's z-order as well as the output color for that polygon. What do I need to do, processing-wise, to allow SharpMap to display the polygons based on z-order, along with the proper color for each polygon, all in a SINGLE layer?


title: OpenLayers: Showing a WFS overlay on top of Google Maps

text:
I have found similar questions asked previously, but I still fail to get a simple WFS point layer to work using OpenLayers and Google Maps. The original code I used was based on WFS polygon layers I have done previously, I then re- created a page based on the OpenGeo Introduction and other sources, all without success. The WFS side of things seems fine -- I can see the WFS traffic and it contains co-ordinates in the target space. But I can't see anything rendered at all. Even adding a feature via code doesn't get rendered, in the example code below the feature in the program does display if added to the "vectorLayer", but not if added to the "wfsLayer". On the risk of appearing stupid: what is wrong with this code?                               <title>OpenLayers: Google Layer Example</title>         <link rel="stylesheet" href="http://openlayers.org/api/theme/default/style.css" type="text/css" />         <link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css" />

                  Note that I replaced some values with "XXX" as to not disclose the client project. As I said: the WFS traffic looks fine, so I assume these values are not relevant for the question. Points in the WFS come through like this:               <gml:Point srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#900913">         <gml:pos>1.2884006544922689E7 -3801543.4695909135</gml:pos>     </gml:Point>      which seems fine for the spherical Mercator projection around the target location.