How to properly convert EPSG:3857 to EPSG:4326 tif?

I tried using the answer from "Transforming EPSG:3857 to EPSG:4326" to do this but gdalinfo tells me that this didn't really work properly.               Driver: GTiff/GeoTIFF     Files: geo-map.tif     Size is 1024, 512     Coordinate System is:     GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4326"]]     Origin = (-179.999999999999545,85.051100000000005)     Pixel Size = (0.351538008801935,-0.332291793794902)     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  (-180.0000000,  85.0511000) (180d 0' 0.00"W, 85d 3' 3.96"N)     Lower Left  (-180.0000000, -85.0822984) (180d 0' 0.00"W, 85d 4'56.27"S)     Upper Right ( 179.9749210,  85.0511000) (179d58'29.72"E, 85d 3' 3.96"N)     Lower Right ( 179.9749210, -85.0822984) (179d58'29.72"E, 85d 4'56.27"S)     Center      (  -0.0125395,  -0.0155992) (  0d 0'45.14"W,  0d 0'56.16"S)     Band 1 Block=1024x2 Type=Byte, ColorInterp=Red       Mask Flags: PER_DATASET ALPHA      Band 2 Block=1024x2 Type=Byte, ColorInterp=Green       Mask Flags: PER_DATASET ALPHA      Band 3 Block=1024x2 Type=Byte, ColorInterp=Blue       Mask Flags: PER_DATASET ALPHA      Band 4 Block=1024x2 Type=Byte, ColorInterp=Alpha      The corner coordinates still projects to 180, 85.0511 which is for EPSG:3857. For EPSG:4326, isn't it supposed to be 180, 90? so I tried translating it again using:               gdal_translate -a_srs EPSG:4326 -a_ullr -180 90 180 -90 geo-map.tif new-geo-map.tif      and got this:               Driver: GTiff/GeoTIFF     Files: new-geo-map.tif     Size is 1024, 512     Coordinate System is:     GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4326"]]     Origin = (-180.000000000000000,90.000000000000000)     Pixel Size = (0.351562500000000,-0.351562500000000)     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  (-180.0000000,  90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"N)     Lower Left  (-180.0000000, -90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"S)     Upper Right ( 180.0000000,  90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"N)     Lower Right ( 180.0000000, -90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"S)     Center      (   0.0000000,   0.0000000) (  0d 0' 0.01"E,  0d 0' 0.01"N)     Band 1 Block=1024x2 Type=Byte, ColorInterp=Red       Mask Flags: PER_DATASET ALPHA      Band 2 Block=1024x2 Type=Byte, ColorInterp=Green       Mask Flags: PER_DATASET ALPHA      Band 3 Block=1024x2 Type=Byte, ColorInterp=Blue       Mask Flags: PER_DATASET ALPHA      Band 4 Block=1024x2 Type=Byte, ColorInterp=Alpha      I realized that it's still not the right thing. The thing is, I need the .tiff to use in WhirlyGlobe but I always end up with a discrepancy. I tried Natural Earth's .tiff on the globe and it worked fine:               Driver: GTiff/GeoTIFF     Files: NE2_LR_LC_SR_W.tif            NE2_LR_LC_SR_W.tfw     Size is 16200, 8100     Coordinate System is:     GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4326"]]     Origin = (-180.000000000000000,90.000000000000000)     Pixel Size = (0.022222222222220,-0.022222222222220)     Metadata:       AREA_OR_POINT=Area       TIFFTAG_DATETIME=2012:07:16 09:57:53       TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)       TIFFTAG_SOFTWARE=Adobe Photoshop CS5 Macintosh       TIFFTAG_XRESOLUTION=72       TIFFTAG_YRESOLUTION=72     Image Structure Metadata:       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  (-180.0000000,  90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"N)     Lower Left  (-180.0000000, -90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"S)     Upper Right ( 180.0000000,  90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"N)     Lower Right ( 180.0000000, -90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"S)     Center      (  -0.0000000,   0.0000000) (  0d 0' 0.00"W,  0d 0' 0.00"N)     Band 1 Block=16200x1 Type=Byte, ColorInterp=Red     Band 2 Block=16200x1 Type=Byte, ColorInterp=Green     Band 3 Block=16200x1 Type=Byte, ColorInterp=Blue      please tell me what I'm doing wrong? :(


Postgis csv and error loading into mysql

I want to load spatial data into MySQL using a CSV I have generated from a Postgres table and when loading it into MySQL database using phpmyadmin it complains "Cannot get geometry object from data you send to the GEOMETRY field." How best can I export PostGIS geometry into MySQL using a csv without generating errors? I have created a MySQL table as               CREATE TABLE cadastre (       gid int(11) auto_increment NOT NULL,         geom MultiPolygon NOT NULL,         lpkey varchar(50),          SPATIAL INDEX(geom),          PRIMARY KEY (`gid`)        ) ENGINE=MyISAM  DEFAULT CHARSET=latin1;


Geoexplorer not displaying geoserver layers

I have a problem with geoexplorer not displaying my geoserver layers anymore. It gives me an error of "Non-existing source 'local' referenced in layer config." I really dont know hwta went wrong or what to do.


How to use gdal module in python

I am trying to import gdal modules from osgeo installed in my win64x machine but I get the following error: > Traceback (most recent call last):   >  File "", line 1, in   >  from osgeo import ogr   >  ImportError: No module named osgeo I am using the python shell from arcgis 10.1 that comes with python 2.7.2


Arcpy - deleted my entire workspace?

I've got a script which runs through some GPS data and creates several outputs (tables, shapefiles etc.). However, when I've just run it, the folder where all the input data lies (along with most of the outputs) has just vanished without a trace. It's not even the recycling bin. The only references to 'Delete' are deleting fields, deleting a table if it exists (*arcpy.Delete_management(gpsStreetSummary)*) and at the start deleting a GDB if it exists. There's nothing I can find in the script to explain why it would just delete everything?? Does anyone know if there is a bug in arcpy that sometimes causes this to happen?


DynamicCacheLayerManager.Connect deletes my tiles

You are supposed to be able to connect to your existing tiles with this command.               dynamicCacheLayerManager.Connect(tileCacheDir, tileCachePath);      When I do that my tiles are destroyed and rebuilt. Clearly this isn't the desired behavior, does anyone have any tips? I'm using ArcEngine 10 in C# with VS2010.


Qgis 1.8.0 throws error "Can not find the entry point sqlite3_rtree_geometry_callback"

Loading QGIS on Window 8 causes this problem: `Can not find the entry point sqlite3_rtree_geometry_callback in the procedure of dynamic loading C:\\....\Quantum GIS Lisboa \ bin \ spatialite.dll` Everything worked properly for many months. Thanks.


Data organization strategies for .csv and .shp

I'm organizing a large amount of data for a project and the data is stored in .csv format, with a code to relate each row to a polygon in a .shp. I was planning on converting the .csv data into .dbf and importing it into a geodatabase, all using ESRI tools. Is this the best way of organizing such data? (The alternative I thought of was to join the .shp and the .csv and to export the data so I have a permanent link, but it seems like I would have a lot of duplicated data) I'm interested in learning how best to improve my work flow and organize this data. I am planning on doing it all using ArcGIS 10 and using python where possible.


How do I set up the ArcGIS Viewer for Flex?

I am still a newbie at the Flex Viewer; I have been using the Out of the Box Web Application for Server 10.0. I tried to put a simple service as an additional basemap (I also tried it as an additional operational layer) and now the viewer will not fully open up. After I refresh the page multiple times it finally comes up but doesn't work properly. The map service I have added is not cached but I don't cache it for the Out of the box web application. The map service is relatively small geographically, and currently has no large feature classes in it or imagery. Would caching the map service change it that much?? I'd like to add imagery into but I want to get it working without it first. I would like to replace the web mapping application with the Flex viewer as there are more options. The data server and the web server are on the same machine. The map service is also using UNC paths as I am creating the original map on a different machine but if that is huge problem that could be adjusted. Trouble is the machine that has ArcGIS Server on it does not have Desktop and vice versa. Kind of limited with a single use license. Any help on any of this would be greatly appreciated.


Zoom function for add in in arcmap

I am completely new at gis but I have to make an add in to work with arcmap to make it zoom to a place I want it to go. (I use a textfield in a php website to tell where to go in arcmap) Is there a zoom function I can use in my case?


GDAL Create( ) for a netCDF file segfaults

I have a problem with the creation of NetCDF dataset using GDAL. When I use "gdalinfo" and "gdal_translate" utilities on a NetCDF format, they work fine, but when I create a new dataset using the function Create( ) member of the class GDALDriver (http://www.gdal.org/classGDALDriver.html) and passing the string format "netCDF", it says "Segmentation Fault". This instruction returns NULL: poDriver = GetGDALDriverManager()->GetDriverByName(pszFormat); with : const char *pszFormat = "netCDF"; It isn't a code error, because with other formats it works fine. I suppose it is a problem of libraries versions, I have: - gdal-1.10.1 - libhdf5-0-1.8.9-21.1 - libhdf5_hl0-1.8.9-21.1 - HDF4 4.2.9 - NETCDF 4.3.0


Calculate distances between polygon centres in QGIS

Is there a practical way to calculate distances between polygon centroids in QGIS? I have a UK city region map divided into administrative units (1 ward = 1 polygon). I want to represent their population growth in function of the distance to the core city and the best way to do it seems to be looking for the geometrical 'centroid' of each polygon and measure its distance to the 'centroid' of the core city polygon. I can do it manually with the ruler tool but it takes a long time and is not very accurate. Thanks


ArcGIS difference reclassify tool properties symbology

Is there a difference between the reclassify tool and just changing the ranges of a layer within the properties>symbology?


Run FME Script in batch file using .NET

Encountered another roadblock. I have a working FME script that I want to automatically run using a console app. I created a simple batch file which accepts a MDB file path as parameter:                 fme.exe E:\sample.fmw --SourceDataset_GEODATABASE_MDB "%1"      when I run this batch file, everything works well. But when I try to do the same thing only in my console application using the following code:               processInfo = New ProcessStartInfo("cmd.exe", "/c C:\executeFME.bat C:\sampleFile.mdb")     processInfo.CreateNoWindow = True     processInfo.UseShellExecute = False     processInfo.RedirectStandardError = True     processInfo.RedirectStandardOutput = True          process__1 = Process.Start(processInfo)     process__1.WaitForExit()          Dim output As String = process__1.StandardOutput.ReadToEnd()     Dim [error] As String = process__1.StandardError.ReadToEnd()          Dim exitCode = process__1.ExitCode                        Console.WriteLine("ExitCode: " & exitCode.ToString(), "ExecuteCommand"     process__1.Close()      I get the error " **Python Exception : No module named arcgisscripting** " I have a Startup python script that will check the geometries of the supplied mdb file and this is where it errors out. Do I still need to configure something to make it to work? Thanks. **EDIT** I noticed in the log files that the manually executed batch file using the correct Python Interpreter: **C:\Windows\SysWOW64\python27.dll** while the batch file executed by the console app uses a different one: **C:\apps\FME\fmepython27\python27.dll**. I tried modifying the Interpreter settings by using:               fme.exe APPLY_SETTINGS SYSTEM "Python/Python Interpreter" c:/windows/SysWOW64/python27.dll      Ran it again and it was still using the old interpreter. I think this is the cause of this but I'm out of ideas on how to fix it. Please help!


How to write in only a file .csv (or .txt) the values contained in several rasters?

I am an beginner in Python programming but I would like to write in only a file .csv (or .txt) the values contained in several rasters. For example, I built several rasters by using a loop. The rasters are like this:                outCostPath.save('P_' +  str(int(ID_patch_1)) + '_' + str(int(ID_patch_2)) + ".tif")      For each raster, I would to save the value that is situated at the second line and the column "PATHCOST" in a file .csv. In the end, this file .csv should contain all values contained in all created rasters. Here is my algorithm:               i = 1          for ID_patch_1 = 1 to 100             for ID_patch_1 = ID_patch_1 + 1 to 100              ## Building a raster         fileRaster = outCostPath.save('P_' +  str(int(ID_patch_1)) + '_' + str(int(ID_patch_2)) + ".tif")              ## Writing in a file .csv         fileCsv(i,1) = ID_patch_1 ## put value of ID_patch_1 in fileCsv at line i and first column         fileCsv(i,2) = ID_patch_2 ## put value of ID_patch_2 in fileCsv at line i and second column         fileCsv(i,3) = fileRaster(2,3) ## put value situated at line 2 and third column in the created raster         i = i + 1              end      end       The problem is that I don't know to code this algorithm in Arcpy. Thanks very much for your help.


How to add field to postgres layer with PyQgis?

I'm fetching a posgtres layer with PyQgis and then I'm trying to add field with this:               lyr.startEditing()     lyr.addAttribute(QgsField("class", QVariant.Int))      But It is not adding the field and also not giving any error. I manually added the field and inserted values programatically and it worked. So what am I doing wrong?


Poster or Map Presentation Guidelines?

Is there a website that will guide me through for various kind of paper size to create a/ or several presentation for digital or hardcopy maps/ or poster with different fonts, display area, title and so on. I am more interesting in reading on what is the recommend for the font size and the paper size.


How to find annotation overlaping file in arcmap 9.3?

I have all my textstring(Annotation) at distance 1.5 feet? I want to find all the annotation which at distnce less than 1.5? Also want to find the overlapping file? Can I make any file like shape file of so that I can zoom to location?


How often does Google change the geo-coordinates for a given address?

I geocoded the address "50 Hurt Plaza Southeast, Atlanta, GA 30303" twice. Once on July 28th, 2014 when I got the coordinates: (33.754208, -84.387272) And again today, August 18th, 2014, and got the coordinates: (33.754129, -84.38721). Should I expect google to be constantly updating its geo-coordinates for given addresses through the year? Or is this a rare occurence? It's a concern for me because I confirm the identity of buildings in the database I'm working with by comparing the geo-coordinates, and that's not going to work so well if they're in flux. Note the results above have been rounded to the sixth decimal. Any thoughts would be appreciated. Thanks!


Accessing NOAA CO-OPS water levels using SOS with bounding box and time extent

I'm tring to access all water level data within a bounding box and temporal extent using the OGC SOS from the NOAA CO-OPS. On the page here: http://opendap.co-ops.nos.noaa.gov/ioos-dif-sos/ there is a very useful SOS query builder tool, and I can formulate a query to get all the station data in a specific region: http://opendap.co-ops.nos.noaa.gov/ioos-dif- sos/SOS?service=SOS&request=GetObservation&version=1.0.0&observedProperty=water_surface_height_above_reference_datum&offering=urn:ioos:network:NOAA.NOS.CO- OPS:WaterLevelActive&featureOfInterest=BBOX:-74.4751,40.389,-73.7432,40.9397&responseFormat=text%2Fcsv&eventTime=2012-10-26T00:00:00Z/2012-11-01T00:00:00Z&result=VerticalDatum%3D%3Durn:ogc:def:datum:epsg::5103&dataType=VerifiedSixMinute But when I execute this query it tells me max of 1 day can be requested in a collection. So I guess there are two approaches. **Approach 1** : Do a query on collection with bounding box, but only the start time requested: http://opendap.co-ops.nos.noaa.gov/ioos-dif- sos/SOS?service=SOS&request=GetObservation&version=1.0.0&observedProperty=water_surface_height_above_reference_datum&offering=urn:ioos:network:NOAA.NOS.CO- OPS:WaterLevelActive&featureOfInterest=BBOX:-74.4751,40.389,-73.7432,40.9397&responseFormat=text%2Fcsv&eventTime=2012-10-26T00:00:00Z&result=VerticalDatum%3D%3Durn:ogc:def:datum:epsg::5103&dataType=VerifiedSixMinute which returns:               station_id,sensor_id,"latitude (degree)","longitude (degree)",date_time,"water_surface_height_above_reference_datum (m)",datum_id,"vertical_position (m)"     urn:ioos:station:NOAA.NOS.CO-OPS:8518750,urn:ioos:sensor:NOAA.NOS.CO-OPS:8518750:W1,40.7006,-74.0142,2012-10-26T00:00:00Z,0.446,urn:ogc:def:datum:epsg::5103,1.848     urn:ioos:station:NOAA.NOS.CO-OPS:8531680,urn:ioos:sensor:NOAA.NOS.CO-OPS:8531680:W1,40.4669,-74.0094,2012-10-26T00:00:00Z,0.319,urn:ogc:def:datum:epsg::5103,1.624      and then I could strip out the station_id and use them in single station queries. **Approach 2** : Issue multiple collection request for periods of one day and then concatenate the responses together. I guess I would use approach 1 if I had more days than stations, and approach 2 if I had more stations than days. Is there a better way?


How to set up an ArcMap Relate with a table from MS SQL Server 2012

This is my first time working with data directly from MS SQL Server 2012, and I'm unsure whether I can use it in a Relate in ArcMap. I have a table in MS SQL Server, which I brought into ArcMap via the Database Connections option. When I add this table to ArcMap using the standard Add Data button, a New Query Layer dialog appears: ![enter image description here](http://i.stack.imgur.com/taCqP.jpg) ArcMap requires a unique identifier field, however this table doesn't have one. I chose one of the existing fields, even though it's not unique (the first problem?). I can now view the table in ArcMap, and I'm able to set up a Relate between this table and a featureclass, based on the matching BoreholeID field. However, when I select a borehole from the featureclass, or a row in the table, the Relate is displayed but greyed out: ![enter image description here](http://i.stack.imgur.com/Dja2h.jpg)   * Can I use a table from MS SQL Server Management Studio in an ArcMap relate?   * If so, is the cause of the problem the lack of a unique ID field?   * If not, what else could be causing the problem?


How to get point file in 5km Buffer of route generated in pgrouting

I am using pgrouting to get shortest route. Now i want to get point that comes in buffer of 5km along router.Point is other shape file. route is using road shape so any one give me idea for same.


R with ggplot2/ggmap - How to load a png image as a map

I am trying to find a workaround for `ggmap`'s missing support of world maps (i.e. you can't create any maps that show latitudes > 80°, due to idiosyncrasies in the `mapproj` package). To a limited extend however, it seems possible to create empty world maps and save them as an image (png etc.), even if you can't use the ggmap object directly as one normally would in `ggmap(get_map(...))`. That's why I'd like to load a png (ideally, one I created with `ggmap`) into `ggplot2` and use that as a map instead. How exactly can I do that? I am aware that you can load background images im `ggplot2` (see this stackoverflow question). But I'd also like to plot points on my map, so it's important that the latitude/longitude values are mapped correctly.


How to change the Transparency of an ILayer?

I've created a function which sets the `IColor` to a specific `ILayer`, the value of transparency is between 0 and 255. When I set the value to 0, it gives me a transparent layer which is OK, but when I set it to 1,2,3,4,5,....255 it gives me the color as if it has 255 transparency. I don't understand, what's wrong with my code:               public static void setLayerColor(ILayer layer, IColor fillColor, IColor outlineColor, short width = 1)         {if (layer == null || fillColor == null || outlineColor == null) return;          IGeoFeatureLayer geoFeatureLayer = (IGeoFeatureLayer)layer;          ISimpleRenderer simpleRenderer = (ISimpleRenderer)geoFeatureLayer.Renderer;               ISimpleFillSymbol symbol = new SimpleFillSymbolClass();          ILineSymbol lineSymbol = new SimpleLineSymbolClass();               lineSymbol.Width = width;          lineSymbol.Color = outlineColor;               symbol.Color = fillColor;          symbol.Outline = lineSymbol;          simpleRenderer.Symbol = (ISymbol)symbol;}      My function has 4 parameters:   * `ILayer`, the layer of which I want to change its color.   * `IColor`, fillColor.   * `IColor`, outlineColor.   * `short`, the width of the outline.


How to add a sequence to the attribute table?

Is there a way to use the field calculator in QGIS to create a range of values in a count sequence with a specified input range? For example, if I wanted to have the values 1 to 5 repeated within my table according to the first record in the table. Thanks...


How are geographic coordinates stored for multivariate statistical analysis?

In terms of Principal Components Analysis or Multiple Discriminant Analysis, I have used dummy variables to represent a group of like-features that are located in the same geographic region. For example, in the analysis of two metropolitan cities, the census tracts that make up city one are classified as 0 and city two as 1. This binary classification groups the census tracts into two regions. I am wondering how I could store geographic coordinates (centroid?) of these census tracts so that I could introduce a spatial component to the multivariate analysis. This is dissimilar to the approach mentioned above since I am not grouping any features; but rather, I am interested in determining whether or not spatiality is a statistically significant independent variable (in terms of regression), or if spatiality is a significant part of a component/factor (in terms of PCA/FA). This would be simple enough if the variable was a single measured value; but alas, we have x and y coordinates to think about.


Contradictories results with Moran's I and Geary's C

I have contradictories results for both index. One side Moran's I says there is a positive correlation , but Geary's C says there isn't any correlation. ![enter image description here](http://i.stack.imgur.com/FF1Ci.png) ![enter image description here](http://i.stack.imgur.com/FIUye.png) Geary's C is more sensitive local variations, and Moran index is more global... wich of those should I consider? Supposedly both index should indicate negative correlation. Any idea? Thank you per advance! :D


Join based on maximum overlap in PostGIS/PostGresQL?

I have two sets of polygons in two tables. The sets overlap each other. For each polygon in set A, I would like to get the ID of the polygon in set B that it overlaps the most. I'm using PostgreSQL with the PostGIS extension. I know just enough about SQL to know that you can only join based on true/false conditions. So this won't work:               SELECT       a.id as a_id,       b.id as b_id,     FROM       a     JOIN       b     ON       max(ST_Area(ST_Intersection(a.geom, b.geom)))      because max() can't be in the ON clause. `ST_Intersects()` is a true/false test, so I **could** join on that, but polygons in set A will often overlap with more than one polygon in set B, and I need to know which one overlaps the **most**. ST_Intersects would presumably just return the first overlapping ID it came across, regardless of the extent of the overlap. This seems like it should be do-able, but it's beyond me. Any thoughts?


Is it possible to create filters based on attributes for markers in Leaflet?

I need to create filters based on attributes of markers. I have markers defined this way:               var locations = [         ['AB11 5HW','17','A',57.147701,-2.085442 ] ,     ['AB11 8DG','3','B',57.129372,-2.090916 ] ,     ];      If the user selects for 'A' or 'B' all markers containing attribute A or B should become visible on the map. Something like               var markersA =  a[2] contains 'A'       I thought it is maybe possible with Leaflet Marker groups or something similar. I'm new to Javascript so I'm interested if it's even possible.


QGIS howto create raster from map canvas easily

i have question ho to create raster from QGIS map canvas (what i seen in my qgis) easily. Now i have used print composer and after some luck i get whole dataset into map item, after that i throw lucky guess for dpi and i get something. What i would like to do is : make map look pretty in qgis, select cell resolution and get what i see in georeferenced raster file (geotiff, png etc..) from whole dataset. is this possible or do i just use print composer wrong ?


GeoServer Date ftl showing time stamp rather than just the date

I had an issue with Geoserver showing my postgresql data in the US (MDY) format rather than the UK / European format (DMY). I fixed this by removing the comment #, and setting the language, to en_GB. In the tomcat6.conf file.               # You can change your tomcat locale here     #LANG="en_US"      The data now displays on my geoserver outputs as DMY, however HH:MM is also shown when i do a get feature request. The postgresql field is Date, and Geoserver lists it as a Date in the layer information panel. However i have 00:00 after the date when i click for a GETfeature information request. **How would I stop 00:00 after the date?**


Load locations faster in ArcGis network analyst

I am currently using ArcGis Network Analyst to calculate an OD cost matrix. I was wondering whether there is a faster way to load my locations (origins, destinations and barriers) because my current rate is around 10 locations loaded per second (which is quite slow for I have about 7.000 points to load). Moreover, is there a way to save these locations in order to use them later? I think of origins/destinations but also of the barriers. I didn't find anything about this in the ArcGis documentation. Thanks for your help!


How to Configure sextante in Qgis 1.9 ubuntu

I am using Ubuntu 13.04 and the most up to date version of Qgis 2.1.0-Master. I am trying to get sextante to work correctly and have a hard time. Specifically SAGA 2.1.0 and GRASS 6.4.2 will not execute correctly. When I try to run any of the grass tools qgis hangs then crashes. When I try to run SAGA tools it tells me saga is not installed or needs to be configured. The latest version of Sextante seems to have removed the SAGA folder input field which I am assuming needs to be updated. I am not sure why grass is crashing at all. I have another similar question open HERE. Any help would be greatly appreciated.


MMQgis Plugin error in Qgis

I am using Qgis 1.9 .Just now I downloaded a plugin "mm qgis"But When I run this plugin I am getting following error: An error has occured while executing Python code: Traceback (most recent call last): File "C:\Documents and Settings\15491/.qgis2/python/plugins\mmqgis\mmqgis_dialogs.py", line 525, in run message = mmqgis_geometry_convert(self.iface, layername, newtype, splitnodes, savename, 1) File "C:\Documents and Settings\15491/.qgis2/python/plugins\mmqgis\mmqgis_library.py", line 1154, in mmqgis_geometry_convert layer.dataProvider().select(layer.dataProvider().attributeIndexes()) AttributeError: 'QgsVectorDataProvider' object has no attribute 'select' Python version: 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] QGIS version: 1.9.0-Master Master, 1a723b4 Python path: ['C:\Documents and Settings\15491/.qgis2/python/plugins\sextante_taudem', 'C:\Documents and Settings\15491/.qgis2/python/plugins\sextante_animove', 'C:\Documents and Settings\15491/.qgis2/python/plugins\sextantelwgeomprovider', 'C:\Documents and Settings\15491/.qgis2/python/plugins\sextanteexampleprovider', 'C:\Documents and Settings\15491/.qgis2/python/plugins\sextante', 'C:\Documents and Settings\15491/.qgis2/python/plugins\permaclim', 'C:/OSGeo4W/apps/qgis-dev/./python', 'C:\Documents and Settings\15491/.qgis2/python', 'C:\Documents and Settings\15491/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis- dev/./python/plugins', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib- tk', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\Documents and Settings\15491\.qgis2\python\plugins\mmqgis/forms', 'C:\OSGeo4W\apps\qgis- dev\python\plugins\fTools\tools', 'C:\Documents and Settings\15491\.qgis2\python\plugins\pdokbaggeocoder/forms'] what is the mistake?


SpatiaLite: Creating to, from nodes from a normal road layer (LINE)

Following this tutorial but using my own data. How do I create the from_node and to_node columns? I am using Spatialite and Sqlite3. I'd prefer to not use a gui as I'm working remotely via ssh on a server. The network is currently held in a spatialite database with a geometry column e.g:               id  |  road_name   |  geometry     1   |  Phil Street |        I wish to, using sql, add column to and from node e.g.:               id  |  road_name   |  from_node  |  to_node  |  geometry     1   |  Phil Street |  1          |  2        |


How to calculate distance between point feature to multiple polyline features in ArcGIS

I have a GPS track which is basically a point layer. I have different route networks such as - train, tram and bus routes. I want to calculate the distance between each point to nearest features within a search radius. I used Generate Near table to calculate distance. This works fine. However after getting the table I have to sort the distance for each and every point. I am looking for a method which will directly generate the distance result as follows- pointID | near_feature_1_distance | near_feature_1_distance | near_feature_1_distance where pointID is the GPS points, near_feature_1_distance is the distance from that GPS point to a given near_feature_1 (say tram line) and so on. I did this in ArcGIS 9.3 long back. But now I am using ArcGIS 10.1 (however I have 9.3 as well) but I cannot remember how I did it. Any help will be highly appreciated.


SLD encoding in GeoSever on Ubuntu

I am facing a challenge with the encoding in my SLD file in GeoServer on a Ubuntu server. When I create a SLD file containing the danish letters æ, ø, å in the GeoServer web interface like this filter:               <ogc:Filter>      <ogc:PropertyIsEqualTo>        <ogc:PropertyName>priority</ogc:PropertyName>        <ogc:Literal>Høj</ogc:Literal>      </ogc:PropertyIsEqualTo>     </ogc:Filter>      In the "Style Editor" the "ø" looks fine and when submit I can see (in Firebug) that the posted request contains the letter "ø". But when I try to edit the style again, my filter looks like this:               <ogc:Filter>      <ogc:PropertyIsEqualTo>        <ogc:PropertyName>priority</ogc:PropertyName>        <ogc:Literal>H?j</ogc:Literal>      </ogc:PropertyIsEqualTo>     </ogc:Filter>      The "ø" has been replaced with a "?". My SLD header looks like this:               <?xml version="1.0" encoding="UTF-8"?>      I have tried to use Latin-1 encoding               <?xml version="1.0" encoding="ISO-8859-1"?>      But I the "ø" still shows as a "?". When I run "env | grep LANG" in the terminal on the Ubuntu server I get this output:               LANG=en_GB.UTF-8     GDM_LANG=en_GB     LANGUAGE=en_GB:en      This should indicate the default encoding is utf-8. When I run a "file --mime- encoding myld.sld" I get:               us-ascii      My question is: **How do I get GeoServer to write the sld file in utf-8 encoding or in Latin-1 so I can use the danish letters in my SLDs?**


OpenLayers map breaks at certain zoom level when many popups exist in the map

I'm still learning OpenLayers. I found this weird issue in my OpenLayers map. I create FramedCloud popups and add them to each features.               popup = new OpenLayers.Popup.FramedCloud("popup",         OpenLayers.LonLat.fromString(parsedFeature.geometry.toShortString()),         null,         "
date: " + someDate + "
longitude: " + data.lon + "
latitude: " + data.lat + "
",         null,         false     );      But I don't add them until it gets to certain zoom level. Then I add the popups to the map with the following code               olMap.events.register('zoomend', olMap, function () {         var zoom = olMap.getZoom();         var popup;         if (zoom > 11) {             for (i = 0; i < dm.currentLocationsVector.features.length; i++) {                 popup = dm.currentLocationsVector.features[i].popup;                 if (!popup.map) {                     olMap.addPopup(popup);                 }             }         } else if (zoom < 12) {             for (i = 0; i < vector.features.length; i++) {                 popup = vector.features[i].popup;                 if (popup.map) {                     olMap.removePopup(popup);                 }             }         }     });      Actually it works good until zoom 17 then when the map zoom level gets 18 the map breaks. ![enter image description here](http://i.stack.imgur.com/HLmiZ.png) It looks like the popups and the map get messed in some way. I don't think I have problem in creating popups.Thought it might some bug in OpenLayers. Cheers


Has Export to AI (Adobe Illustrator) changed at ArcGIS for Desktop 10.2?

In the past when I would export vector layers from ArcGIS each layer would be nested in a group with a clipping path over the top. Now when I Export to AI from 10.2 that layer's features are 5-6 layers deep. Did this software behaviour change at 10.2? ![enter image description here](http://i.stack.imgur.com/eDB0Q.jpg)


What's the correct transformation for Lambert Conformal Conic for Mexico?

I have a shp archive without the .prj file. I don´t know the proyection of this shp, but I think it is in lambert conformal conic. Can anybody helpme to proyect this shp? i´ve tried to proyect it in wgs84 utm 16N and geografic wgs84, but i have no success. this shp is from Quintana Roo, México. I´m working in qgis


How to Import Metadata of feature classes with them into ArcSDE?

I have a database that has numerous feature classes of different types. None of these feature classes have metadata. I understand that when you import feature classes to a database, the metadata does not come with. I'm trying to import metadata to features that have never had metadata and I'm not seeing a way to do this.


OpenLayers Mapserver spatial filter INTERSECTS format problems

Trying to get hand-drawn polygon delimiter for spatial query via OpenLayers to mapserver (then postgis). I can get the WKT of the drawn polygon and can substitute the dynamic values, but am having trouble getting the spatial query properly formatted. Filter defined in OpenLayers:               myfilter = new OpenLayers.Filter.Logical({                 type: OpenLayers.Filter.Logical.AND,                 filters: [ new OpenLayers.Filter.Spatial({                    type: OpenLayers.Filter.Spatial.INTERSECTS,                    property: "footprint",                    value: curr_wkt                    }),                    new OpenLayers.Filter.Comparison({                       type: OpenLayers.Filter.Comparison.EQUAL_TO,                       property:  "roll",                       value: roll                     })                   ]              });      What myfilter looks like after created:               (INTERSECTS(footprint, '(POLYGON((-161.6625 71.073751831055,-167.625 69.498751831055,-168.3 65.673751831055,     -166.275 61.848751831055,-157.6125 64.773751831055,-161.6625 71.073751831055))')) AND (roll = '4')      But in the POST output from Firebug when run, the filter gets converted to an undefined Box (or Envelope if using 1.1.0): POST result - footprint undefined undefined undefined undefined roll 4 Is the WKT the wrong input format to use? Why does it change it to Box?


How to get WGS84 lat lon bounds from a VRT file

I have vrt files generated using gdalbuildvrt that reference GeoTiffs referenced using the NZTM coordinate system. Is there an easy way to determine the bounds as WGS84 latitude longitude coordinates? I assume this should be possible with a few GDAL commands from the command line prompt? Example vrt file:               <?xml version="1.0" encoding="UTF-8"?>         <VRTDataset rasterXSize="11340" rasterYSize="8505">            <SRS>PROJCS["New Zealand Transverse Mercator 2000; NZGD 2000",GEOGCS["unknown",DATUM["unknown",SPHEROID["GRS 1980",6378137,298.2572221010002,AUTHORITY["EPSG","7019"]]],PRIMEM["Greenwich",0],UNIT[,0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",173],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",1600000],PARAMETER["false_northing",10000000],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]</SRS>            <GeoTransform>1.0839978833333333e+006, 4.2333333333333298e+000, 0.0000000000000000e+000, 4.9020021166666662e+006, 0.0000000000000000e+000,-4.2333333333333298e+000</GeoTransform>            <VRTRasterBand dataType="Byte" band="1">               <HideNoDataValue>1</HideNoDataValue>               <ColorInterp>Red</ColorInterp>               <SimpleSource>                  <SourceFilename relativeToVRT="1">CF04_GeoTifv1-02.tif</SourceFilename>                  <SourceBand>1</SourceBand>                  <SourceProperties RasterXSize="5671" RasterYSize="8505" DataType="Byte" BlockXSize="5671" BlockYSize="17" />                  <SrcRect xOff="0" yOff="0" xSize="5671" ySize="8505" />                  <DstRect xOff="0" yOff="0" xSize="5671" ySize="8505" />               </SimpleSource>               <SimpleSource>                  <SourceFilename relativeToVRT="1">CF05_GeoTifv1-01.tif</SourceFilename>                  <SourceBand>1</SourceBand>                  <SourceProperties RasterXSize="5671" RasterYSize="8505" DataType="Byte" BlockXSize="5671" BlockYSize="17" />                  <SrcRect xOff="0" yOff="0" xSize="5671" ySize="8505" />                  <DstRect xOff="5669" yOff="0" xSize="5671" ySize="8505" />               </SimpleSource>            </VRTRasterBand>            <VRTRasterBand dataType="Byte" band="2">               <HideNoDataValue>1</HideNoDataValue>               <ColorInterp>Green</ColorInterp>               <SimpleSource>                  <SourceFilename relativeToVRT="1">CF04_GeoTifv1-02.tif</SourceFilename>                  <SourceBand>2</SourceBand>                  <SourceProperties RasterXSize="5671" RasterYSize="8505" DataType="Byte" BlockXSize="5671" BlockYSize="17" />                  <SrcRect xOff="0" yOff="0" xSize="5671" ySize="8505" />                  <DstRect xOff="0" yOff="0" xSize="5671" ySize="8505" />               </SimpleSource>               <SimpleSource>                  <SourceFilename relativeToVRT="1">CF05_GeoTifv1-01.tif</SourceFilename>                  <SourceBand>2</SourceBand>                  <SourceProperties RasterXSize="5671" RasterYSize="8505" DataType="Byte" BlockXSize="5671" BlockYSize="17" />                  <SrcRect xOff="0" yOff="0" xSize="5671" ySize="8505" />                  <DstRect xOff="5669" yOff="0" xSize="5671" ySize="8505" />               </SimpleSource>            </VRTRasterBand>            <VRTRasterBand dataType="Byte" band="3">               <HideNoDataValue>1</HideNoDataValue>               <ColorInterp>Blue</ColorInterp>               <SimpleSource>                  <SourceFilename relativeToVRT="1">CF04_GeoTifv1-02.tif</SourceFilename>                  <SourceBand>3</SourceBand>                  <SourceProperties RasterXSize="5671" RasterYSize="8505" DataType="Byte" BlockXSize="5671" BlockYSize="17" />                  <SrcRect xOff="0" yOff="0" xSize="5671" ySize="8505" />                  <DstRect xOff="0" yOff="0" xSize="5671" ySize="8505" />               </SimpleSource>               <SimpleSource>                  <SourceFilename relativeToVRT="1">CF05_GeoTifv1-01.tif</SourceFilename>                  <SourceBand>3</SourceBand>                  <SourceProperties RasterXSize="5671" RasterYSize="8505" DataType="Byte" BlockXSize="5671" BlockYSize="17" />                  <SrcRect xOff="0" yOff="0" xSize="5671" ySize="8505" />                  <DstRect xOff="5669" yOff="0" xSize="5671" ySize="8505" />               </SimpleSource>            </VRTRasterBand>            <VRTRasterBand dataType="Byte" band="4">               <ColorInterp>Alpha</ColorInterp>               <ComplexSource>                  <SourceFilename relativeToVRT="1">CF04_GeoTifv1-02.tif</SourceFilename>                  <SourceBand>1</SourceBand>                  <SourceProperties RasterXSize="5671" RasterYSize="8505" DataType="Byte" BlockXSize="5671" BlockYSize="17" />                  <SrcRect xOff="0" yOff="0" xSize="5671" ySize="8505" />                  <DstRect xOff="0" yOff="0" xSize="5671" ySize="8505" />                  <ScaleOffset>255</ScaleOffset>                  <ScaleRatio>0</ScaleRatio>               </ComplexSource>               <ComplexSource>                  <SourceFilename relativeToVRT="1">CF05_GeoTifv1-01.tif</SourceFilename>                  <SourceBand>1</SourceBand>                  <SourceProperties RasterXSize="5671" RasterYSize="8505" DataType="Byte" BlockXSize="5671" BlockYSize="17" />                  <SrcRect xOff="0" yOff="0" xSize="5671" ySize="8505" />                  <DstRect xOff="5669" yOff="0" xSize="5671" ySize="8505" />                  <ScaleOffset>255</ScaleOffset>                  <ScaleRatio>0</ScaleRatio>               </ComplexSource>            </VRTRasterBand>         </VRTDataset>      Any advice / pointers is greatly appreciated.


Get and compare area of arcpy geometry from extent object

I'm trying to get a numerical value for the area of a polygon that I am generating from an extent object. In this case, I am using the "onRectangle" function in the python addins for arcpy. The problem starts when using the getArea method on the polygon geometry. I have no intention of writing this polygon to disk. Ultimately, I want to be able to compare the extent of a user drawn rectangle to the dataframe extent. Here's what I've got so far.               def onRectangle(self, rectangle_geometry):         frameExtent = rectangle_geometry         XMAX = frameExtent.XMax         XMIN = frameExtent.XMin         YMAX = frameExtent.YMax         YMIN = frameExtent.YMin         pnt1 = arcpy.Point(XMIN, YMIN)         pnt2 = arcpy.Point(XMIN, YMAX)         pnt3 = arcpy.Point(XMAX, YMAX)         pnt4 = arcpy.Point(XMAX, YMIN)         print XMAX, XMIN, YMAX, YMIN         array = arcpy.Array()         array.add(pnt1)         array.add(pnt2)         array.add(pnt3)         array.add(pnt4)         array.add(pnt1)         rectPoly = arcpy.Polygon(array)         global rectArea         rectArea = rectPoly.getArea()         print str(rectArea)         return rectArea      The python window in ArcMap returns this error: `TypeError: Invalid geometry type for method.` Any pointers would be appreciated for both getting the area of the polygon and comparing it (percentage wise) to the full data extent would be appreciated. I'm using ArcGIS 10.2 advanced license.


qgis 1.8.0 crash when starting qthread

I am trying to update a vector layer attribute table using QThread. i connect a pushbutton click with a slot to start the thread: def EGSupdateAttributeTable(self): AttUpdateEGSThread = EGSUpdateAttThread(self.theLayerToEdit) AttUpdateEGSThread.start() and this is my thread class:               # -*- coding: utf-8 -*-     from PyQt4 import QtCore, QtGui     from qgis.utils import *     from qgis.core import *     from qgis.gui import *     import sys     import qgis.utils          #the update EGS Algorithme attribute table Class     class EGSUpdateAttThread(QtCore.QThread):         def __init__(self,theLayerToEdit):             QtCore.QThread.__init__(self)             self.theLayerToEdit = theLayerToEdit             self.LayerFeatureCount = self.theLayerToEdit.featureCount()         def run(self):             QtGui.QMessageBox.information(None, 'layer', str(self.LayerFeatureCount))             #self.editScenarioDlg.ui.PrbUpdateAtt.show()             provider = self.theLayerToEdit.dataProvider()             #allAttrs = provider.attributeIndexes()             Feature = QgsFeature()             allAttrs = provider.attributeIndexes()             provider.select(allAttrs)             iFloodProt = provider.fieldNameIndex("FloodProt")             indexStableClimate = provider.fieldNameIndex("StableClim")                   iUsableWat = provider.fieldNameIndex("usablewat")             iACRE = provider.fieldNameIndex("ACRES")             immwater = provider.fieldNameIndex("mmwater")             iCN = provider.fieldNameIndex("CN")             iCarbonFixe = provider.fieldNameIndex("CarbonFixe")             iDenitrific = provider.fieldNameIndex("Denitrific")             iWaterRetentionValue = self.editScenarioDlg.ui.leWaterRetValue.text().toInt()[0]             iStableClimate = self.editScenarioDlg.ui.leDollByCarbonValue.text().toInt()[0]             iUsableWater = self.editScenarioDlg.ui.leDollByNitrogenValue.text().toInt()[0]             while provider.nextFeature(Feature):                 if len(Feature.attributeMap())>0:                     #QMessageBox.information(self.drawShapeDlg, 'attributetable' ,  str(Feature.attributeMap()))                     dACREVal =  Feature.attributeMap()[iACRE].toDouble()[0]                     immwaterVal =  Feature.attributeMap()[immwater].toInt()[0]                     #QMessageBox.information(self.drawShapeDlg, 'iWaterRetentionValue' ,  str(iWaterRetentionValue))                     dCNValue = Feature.attributeMap()[iCN].toDouble()[0]                     dCarbonFixeValue =  Feature.attributeMap()[iCarbonFixe].toDouble()[0]                     dDenitrificValue = Feature.attributeMap()[iDenitrific].toDouble()[0]                     dFloodProtVal = iWaterRetentionValue * (dACREVal * 43560) * immwaterVal *  0.00328084                     dStableClim = dCarbonFixeValue * iStableClimate                     dUsableWater = dDenitrificValue * iUsableWater                          self.theLayerToEdit.changeAttributeValue(Feature.id(), iFloodProt, QVariant(dFloodProtVal) )                     self.theLayerToEdit.changeAttributeValue(Feature.id(), indexStableClimate, QVariant(dStableClim))                     self.theLayerToEdit.changeAttributeValue(Feature.id(), iUsableWat, QVariant(dUsableWater))      i cannot identify the cause of this crash


CQL_FILTER not liking '%' wildcards

I am setting up a query against a layer on my GeoServer instance. My query string can become quite complex, and some statements require using multiple '%' wildcards. For starter's here's an example: Search for Property Owner: **___ __ ___ __ ___ ____** If the user types in 'Smith', I need to find values that meet the following criteria:               CQL_FILTER=Owner ilike '%Smith%'      However, this is returning all features in my layer. In fact, when I use just one wildcard, ex. 'Smith%', I still get all features. What makes this even more difficult is when my query string becomes quite lengthy:               CQL_FILTER=Owner ilike '%Smith%' AND Address ilike '%Main%' AND Value < 100000      Reading the GeoServer docs, I see the wildcard is supported in CQL/ECQL. The syntax is very close to SQL which I have used in the past to do the very same queries. Anyone have an idea what may be causing this issue? Anyone else have much luck using wildcards in their CQL filters? Thanks in advance!


geospatial libraries like postgis

I'm pretty comfortable with postgis, but I realized that for part of my application, having a database is pretty heavy. I'd like to be able to take a stream of Point objects and check against an in memory collection of Polygon objects for intersection. With postgis, this would be accomplished with ST_Contains(). The biggest reason for moving away from a database is I need real time analysis of the Points as they come in. Right now, I collect a series of Points then do batch work on them, but I find my system struggles to keep up with the input sometimes, mostly because of the I/O associated with accessing the database rather than handling the Points in real time. I've come across GEOS, but I'm not really sure how to get started using that library. I'm on a Mac but also have access to a Windows machine if there is a C# solution out there. **EDIT** It's been wisely pointed out that it might be more beneficial to state my problem with my current setup before trying anything too radical. We collect 1,000 points per second of x,y coordinates. We map these coordinates to zones (polygons) based on which zones a point intersects with (we can have overlapping zones, and thus a point can belong to more than one zone). Once we've established which zone a point is in and which sensor reported that point, we apply our business logic to determine if any actions need to take place. My first approach was to use the database (Postgres 9.3/postgis 2.1) to check every point as I received it. So I would get a reading from a sensor, figure out which sensor sent me the reading, then figure out which zones that point was in, then apply my logic. I could check a point in about 3 miliseconds and was therefore behind the 8 ball when collecting 1,000 points/second. My next approach was to batch these zone checkings and business logic interpretations. Now, I grab whatever new data the sensors have produced (usually 5-10 points), figure out which zone each point is in in parallel using the database, then apply my business logic to all those points, again in parallel thanks to the database. Then I poll for new data and repeat. This approach seems to work well, but is a hog on the system and very fragile. I'm barely keeping up with the data. Someone on the postgresql IRC channel pointed out I'm seeing a lot of overhead writing points to my database just to pull them out miliseconds later to do calculations on those points. They suggested I look at real time steam processing, and that's what I'm trying to investigate now. I'm thinking if I can read the raw sensor data and clean it before inserting it into the database (identify which zone the point is in and which sensor sent me the reading), I can then apply my business logic in the way I currently do, I should just have more wiggle room.


Do you use a proven workflow to edit and document ArcGIS ModelBuilder models?

Do you have any reference to best practice examples , or can you share your expertise on how to keep track of edits to ModelBuilder models , track changes between model/tool versions and maintain model stability, robustness and function? I am aware of the ESRI guidance to managing, copying and naming models **here**. I would be interested if anyone has established practices, or specific expertise in the use of version tracking, archiving, editing of ModelBuilder tools that they successfully use to track model development and checking and to maintain models in a stable condition.


How to smoothly join two rectangles

I am looking for the Math and steps involved not using a tool. We have PostGIS but its an old version so we are working with the data in Python. Given three coordinates:   * -107.37, 52.46   * -103.24, 52.62   * -101.09, 53.97 I then join them to form a line. I then build buffered polygons around each line segment (20NM) - resulting in two rectangles. If there was another coordinate I would have 3 rectangles and so on. This is what the output looks like when the rectangles are assembled: ![Joined rectangles](http://imgur.com/uABkups.png) However, what I really want is to have that triangular gap - sealed up with a curve. Like this (did it by hand): ![with curve](http://i.imgur.com/dPbvLhP.png) So I have everything working just fine and dandy, but I have no idea how to properly join these rectangles so that they have a nicely fitted curve to fill in that triangular gap. Any help would be greatly appreciated. Edit: Since I am assembling the polygon data myself I can easily identify the points that need to be connected. Is there a way to join two points with a curve? Thanks!


OpenLayers layer mergeNewParams handle event or callback

I am changing the CQL filter of my WMS layer.                var layer = new OpenLayers.Layer.WMS(         "MyLayer",         "url",         { layers: "PGSA:myLayer", transparent: true },         { isBaseLayer: false }     );      When I call **ChangeCql** function, it takes a little time. So I need to show a loding message to user.               function changeCql(){         layer.mergeNewParams({'CQL_FILTER': "name = 'foo' "});     }      How can I handle the event of layer for **mergeNewParams**?


Point features disappear when moved using QGIS 2.0

When I move, either by the node or the move function, a feature symbol on the map canvas, it simply disappears, not just the label, the whole thing. CTRL-Z brings it back. I'm using a MAC OS-X. I've re-loaded QGIS 2.0 as well as GDAL to no avail -- same problem. Thanks. For instance, here's the canvas with the "Boy Scout trailhead": ![Before](http://i.stack.imgur.com/p5YhK.jpg) and after moving the trailhead symbol just a bit to the left. (Using the node tool.) ![After:](http://i.stack.imgur.com/MxaAr.jpg) The feature also disappears from the attribute table as well.


What's the purpose of the reference latitude in Lambert Conformal Conic?

Going through flight school I got acquainted with the Lambert Conformal Conic projection, as it's the common projection for VFR sectional charts, and I think I have pretty good grasp of it, geometrically. However, trying to wrap my head around the mathematics behind it I browse around on Wikipedia and on MathWorld which both more or less simply list the formulas, not really diving into the mathematics behind it. It appears to have 4 parameters:   * The two standard parallels,   * reference longitude, and reference latitude What is the purpose of the reference longitude/latitude? Do they affect the actual projection, or will they simply shift the result to let the reference coordinates result in (x,y)=(0,0)?


Is there an explanation of Root-Mean-Square-Error (RMSE) for Dummies available?

Having an all-round expertise in GIS is sometimes not enough to fully understand some concepts of GIS Science. To add to this, I am also not a mathematician. Considering this, would anyone be able to offer a child's explanation of **Root-Mean-Square-Error (RMSE)** whilst georeferencing an image onto a basemap? Having done this operation a thousand times, my only concern has been to firstly find locations in the target map which are also in the base map. Using common sense as a tool, I would usually find churches, old buildings, and similar objects which are very stable structures and would not have moved in the time difference between the basemap and the target image. After placing as many passpoints as possible, I would then look at the statistics table and either re-do passpoints with a high RMSE or delete them so that the overall RMSE score becomes as low as possible. Now I know that the rmse is a statistical error calculation, but what has always bugged me, is that sometimes I am 100% sure that the passpoints are placed very accurately on the images...eg. on a church steeple, or another stable structure which is present in both the target image and basemap, but the rmse is still high. Therefore, I would be able to change the passpoints to a location which is further away from the reference structure (ie make the visual transformation less accurate) in order to decrease the rmse! This appears to me to be a paradox, because I would be decreasing the visual accuracy of the operation in order to increase the statistical accuracy. Sometimes, I ignore the rmse completely because I can SEE that that after the georeferencing operation, the reference map and the target image line up very well...ie all the pass-points are in exactly the right place on both maps. Could anyone please offer me a better simple explaination as to whether I am doing something fundamentally wrong here?


16bit grayscale raster displays all black in Geoserver

I have a 16-bit raster (MrSID) that I want to display in Geoserver 2.0.2 but it is displaying as all black. If I create a new style similar to the default raster.sld but with graychannel element the image displays correctly. My question: Is there a way to modify the default raster.sld so that it handles BOTH RGB and grayscale images (8 and 16-bit)? Thanks


Finding nearest point in SpatiaLite without GEOS

I want to find the nearest point having latitude and longitude stored as Point in SpatiaLite. I read this and it has this example:               SELECT feature_name, feature_class,           ST_Distance(Geometry, MakePoint(-70.250, 43.802)) AS Distance FROM XYGNIS      WHERE distance < 0.1 AND ROWID IN      (SELECT ROWID FROM SpatialIndex        WHERE f_table_name = 'XYGNIS' AND search_frame =        BuildCircleMbr(-70.250,    43.802, 0.1))      ORDER BY distance LIMIT 10      I cannot use it, however, since ST_Distance requiring compiling SpatiaLite with GEOS, which is in LGPL, which I cannot use. Is there a way I can do arithmetics to calculate distance and set that to a "variable" and then find the one with the minimal distance?


How to find the nearest single point?

I have two shapefiles containing each one set of points, set A and set B. One set is my random selection (set A), the other is a list of communities (set B). For each point of the random selection (set A) I want to find the nearest point pertaining to


One Polygon Joining to Database with Many matching records

Using ArcMap 10.1. Is this possible to have one polygon and join to a database/excel with many matching records? I would like to have 1 polygon but match to 100 corresponding records in a table. When I use the identify tool or select this polygon all 100 matching records would display?


How to join two polygon layers into a resulting layer with overlapping polygons merged together (including attributes)

I am trying to find a method (in QGIS and/or GRASS) to join two layers of polygons into a resulting layer with merged overlapping polygons. It's hard to explain in words, so I've drawn a simplified graphic ![enter image description here](http://i.stack.imgur.com/hGme9.png) Has anyone come up with a working solution for this need?


How can I label edges of polygons?

How would I label polygon features, such as Counties, by its edge in ArcMap 10.1. This is similar to what one might find in a street atlas. For instance, have there are two counties (Lamb and Castro), at the same spot I want the labels to be inside along the boundary in the respective counties. How do I create this effect?


Convert a List to a file list to use in an arcpy tool

I just can't figure out how to feed a list of files into an arcpy tool... I have                List_tif.append(os.getcwd()+"\\Stage1\\"+name+"\\GeoTif\\"+name+"_"+str(ddp.pageRow.PageName) + ".tif;")      That generates the list and then I try to feed it into arcpy               arcpy.MosaicToNewRaster_management(List_tif,os.getcwd()+"\\Stage2\\jp2", name+"_tif.jp2", "90019.prj", "", "", "3", "LAST","FIRST")      but I get an error as the tools is expecting file1.tif; file2.tif etc but is getting a List > > 'P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Creation\Stage1\LS\GeoTif\LS_O10.png;', > 'P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Creation\Stage1\LS\GeoTif\LS_O11.png;', > 'P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Creation\Stage1\LS\GeoTif\LS_O12.png;', > 'P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Creation\Stage1\LS\GeoTif\LS_O13.png;'] I tried               PNGList=string.split(List_png, ";")      but this doesn't work either. This should be simple (:- **EDIT 1:** Thanks guys...I tried the list rasters as well but it doesn't even generate the list               >>> rasters=arcpy.ListRasters('*')     >>> rasters     >>> files=arcpy.ListFiles()     >>> files     >>> import glob     >>> rasters=glob.glob('*.png')     >>> rasters     ['BA25k_A2.png', 'BA25k_A3.png', 'BA25k_A4.png', 'BA25k_A5.png', 'BA25k_A6.png', 'BA25k_A7.png', 'BA25k_A8.png', 'BA25k_B10.png', 'BA25k_B11.png', 'BA25k_B2.png', 'BA25k_B3.png', 'BA25k_B4.png', 'BA25k_B5.png', 'BA25k_B6.png', 'BA25k_B7.png', 'BA25k_B8.png', 'BA25k_B9.png', 'BA25k_C10.png', 'BA25k_C11.png', 'BA25k_C12.png', 'BA25k_C2.png', 'BA25k_C3.png', 'BA25k_C4.png', 'BA25k_C5.png', 'BA25k_C6.png', 'BA25k_C7.png', 'BA25k_C8.png', 'BA25k_C9.png', 'BA25k_D10.png', 'BA25k_D11.png', 'BA25k_D12.png', 'BA25k_D13.png', 'BA25k_D2.png', 'BA25k_D3.png', 'BA25k_D4.png', 'BA25k_D5.png', 'BA25k_D6.png']     >>>       I didn't mean to ask this specifically for the arcpy mosaic tool as passing the list of files is important for lots of other tools as well such as creating a mosaic dataset, filling a gdb etc. I also tried your vtab example               vtab = arcpy.ValueTable(1)     for tif in List_tif:         vtab.addRow(tif)          print "Generating jp2 from png tiles @"+str(datetime.datetime.now())     ##PNGList=string.split(List_png, ";")     arcpy.MosaicToNewRaster_management(vtab,os.getcwd()+"\\Stage2\\jp2", name+"_tif.jp2", "90019.prj", "", "", "3", "LAST","FIRST")      but I still get the bands error.


How to use model-builder iterator with a custom bit of arbitrary code?

How do I integrate a in-line variable from modelbuilder into a python script? Specifically, I'm using an iterator, and I'm trying to include the 'name' variable in a python script. I believe the problem is on step four, when I add it to the model as a a script (as shown here). Script code I'm trying to include looks like this:               pop_rank = 1     rows = arcpy.UpdateCursor ("path_to_dataset", "", "", "", "pop A")     for row in rows:         row.setValue("RANK", pop_rank)         pop_rank += 1         rows.updateRow(row)      Specifically, I'd like to make the "path_to_dataset" into the 'Name' variable from the iterator. I can pull the path using the 'parse path' model builder only tool, but I'm not sure how to feed that into the Python Script.


Use Values from Raster Statistics (e.g. sum of all cells) in Raster Calculator

I need to do calculations on raster layers which require the sum of all cells of the raster. I've used the zonal statistics tool for that but it gets a little annoying to do those extra steps (run the plugin, open the Attribute table, copy the sum...). Is there a way I can calculate and use the values of raster statistics directly inside a raster calculator? Even better would be to calculate those values from a raster created in the same step: > A*B*C / Sum (A*B*C)


Click to Openlayers shows blank pop up - All Formats for Images Works

I am totally new to GeoServer and all this WebServer stuff, so please understand that all the gray hairs on my head over the last 2 weeks are from trying to get this all set up and working. When I select my layer to preview with OpenLayers, I get a pop up that opens and is blank, except for the bounding box and the text to the bottom left and right. Not sure how to fix this so I click and have it show the map item, which in this case is a shapefile. I should note that I can select the 'All Formats' form the Layer Preview and if it is an image, I can see and/or download the shape as a jpg, pdf, tiff, gif, so I know the data is being read, just not displayed. Anyone else have this issue and resolved it? Thanks.


Is there a way to run a python script on opening a QGIS project?

I have a .csv file containing financial data which is generated on a regular basis outside QGIS. Then I want to create a PyQGIS script that will add the .csv file as a layer in my project. (The idea here is I want to have the up- to-date financial data as attributes data for one of the shapefiles in the project). Is there a way to run the script automatically as soon as I open the QGIS project. Thank you


How can i change the geometry of an existing layer?

I work with Qgis, v. 2.0.1. I have a point layer in which I have structures that could be represented as lines or polygons, but at the moment they are represented as a group of points. I know I can create new layers with different geometry but if I do this, I don't have the attribute table of the origianl point layer attached to the new line/polygon layer. And if I copy the point layer, I have the attribute table but it's not the right geometry. Can I change the geometry afterwards? I could do a table join, right? But I don't have a common attribute and the table join is not permanent is it? Thanks - G.H.


Distort image to Mercator Projection view

i have an image that rendered from data i have on my DB. i need to convert this image, with Mercator Projection method, to distorted image that when i'll wrap a 3d sphere with it it'll looks realistic. do anyone know what are the formulas i need to use to make the distorted image? P.S. i'm using PHP with GD. **update:** > in which format is your original data? my data is saved as XML, but we'll do here some optimizations after that so save it compressed with some binary algo. the rendering process has already done and i already have the rendered image as 2d view but without the distortion that should be in images that under Mercator Projection. to explain more about my needs, i attached link to album 2 photos i uploaded: '2dBefore.jpg' is an example images that show how it's looks like after the data rendering but before the Mercator Projection distortion, and '2dAfter.jpg' show how the image should be looks like after the Mercator Projection distortion as i understood, the distortion being worse as much as your going north or south from the equator and i need to know how to do that with code (and not with Gimp as i did now) I'll also explain you generally about my project: it's a game that each user on it should locate on specific location against a planet (sphere). in the game, there are 2 modes: 1. 2d mode - that show maps on 2d view with the users' data on it. 2. 3d mode - that show a sphere with the users' data on it. it's like takes Google maps and Google earth together on the same application. when a player zoom out/in he'll pass between the modes. i already mapped the world by longitude and latitude and each user have his own coordinate, the rendering of the data on the 2d maps (using PHP and GD) working fine (I'm consider the world like that: http://www.dsscentral.info/dishtips/world105.gif) but in the 3d map i have some hard-times to understands how i should distort it, as you probably understand from the above.


Geometryutil, simplify polygon, querytask and query fault error

One of the tools in my app is to draw freehand polygons (counties) to show points (companies) in each county. Everything works great but if the user creates an intersecting polygon then I have a problem. To try to fix that I am working with the Geometryutil class to simplify the polygon and I am using this example on this link http://help.arcgis.com/en/webapi/fle...0000063000000/ However the example is creating polygons to show polygons and I need to show points, howevert after I draw the polygon I get an error and the points appear on the map. The error says RPC Fault Faultstring="Unable to complete query operation" faultCode="400" faultDetail="Unable to perform query operation. I have been trying everything to make it work for the past few hours and cant't find a solution. Could anybody help me with what I need to change in my code? I really appreciate your help! Here is the code snippet               // This is an event listener function added on the init function when the drawtool settings are set after the drawtool is created outside the function                  import com.esri.ags.utils.GeometryUtil;             public var drawPolygon : Graphic = new Graphic();               private function onDrawEnd(event:DrawEvent):void             {                 drawToolbar.deactivate();                  myGraphicsLayer.clear();                 freehandbutton.selectedIndex = -1;                 multipointbutton.selectedIndex = -1;                 myMap.panEnabled = false;                      var geometry:Geometry = event.graphic.geometry;                      if (geometry is Polygon && GeometryUtil.polygonSelfIntersecting(geometry as Polygon))                 {                     // Note: As of version 2.0, GeometryService returns geometries (instead of graphics).                     myGeometryService.simplify([ geometry ]);                 }                      if (geometry is Polygon && !GeometryUtil.polygonSelfIntersecting(geometry as Polygon))                 {                               drawPolygon.geometry = event.graphic.geometry;                     drawPolygon.symbol = fillSymbolcounty;                     drawPolygon.autoMoveToTop = false; //keep graphics from moving to top                        //to not draw a polygon when I use the freehand polygon select tool I uncomment the next line, but right now I have this uncommented and on the zoomtorow function                      // I have this  myPolygonGraphicsLayer.remove(drawPolygon) uncommented, so the polygon disappears when we zoom in and does not darken the view (it darkens the view                     //if I dont have the drawpolygon.symbol as fillSymbolcounty which is transparent inside                     myPolygonGraphicsLayer.add(drawPolygon);                      runQueryTask(event.graphic.geometry);                     // If using point draw tool then run querytask3                 } else{                     //Must be multipoint                          runQueryTaskcounty(event.graphic.geometry);}                       }                                                import com.esri.ags.events.GeometryServiceEvent;             import com.esri.ags.geometry.Geometry;                  import com.esri.ags.utils.GeometryUtil;                  import mx.rpc.events.FaultEvent;                  private function myGeometryService_simplifyCompleteHandler(event:GeometryServiceEvent):void             {                 // Note: As of version 2.0, GeometryService returns geometries (instead of graphics)                      doQuery(event.result[0] as Geometry);             }                                      private function doQuery(geom:Geometry):void             {                 try                 {                               queryTaskintersectingpolygon.showBusyCursor = true;                     var queryintersectingpolygon:Query = new Query();                     queryintersectingpolygon.spatialRelationship = "esriSpatialRelIntersects";                     queryintersectingpolygon.returnGeometry = true;    //set to true because we want to place points on the map                     queryintersectingpolygon.outSpatialReference = myMap.spatialReference;                     queryintersectingpolygon.outFields = ['*'];                           queryintersectingpolygon.geometry = geom;                     queryintersectingpolygon.returnGeometry = true;                     queryTaskintersectingpolygon.execute(queryintersectingpolygon, new AsyncResponder(onResult, onFault));                          function onResult(featureSet:FeatureSet, token:Object = null):void                     {                         if (featureSet.features.length > 0)                         {                             for each (var myGraphic:Graphic in featureSet.features)                             {                                      //graphic.symbol = resultsSymbol;                                 //myGraphicslayerpolygon.add(graphic);                                    myGraphicsLayerintersectingpolygon.add(myGraphic);                             }                         }                         else                         {                             Alert.show("No parcels were found", "Try something else");                         }                     }                     function onFault(info:Object, token:Object = null):void                     {                         Alert.show(info.faultString + "\n\n" + info.faultDetail, "queryTask fault " + info.faultCode);                     }                 }                 catch (error:Error)                 {                     Alert.show(error.toString(), "myGeometryService_simplifyCompleteHandler error");                 }             }                  protected function queryTask_faultHandler(event:FaultEvent):void             {                 Alert.show(event.fault.faultString + "\n\n" + event.fault.faultDetail, "QueryTask Fault " + event.fault.faultCode);             }


How to put more than one overlay label in Openlayers layerswitcher?

I have two set of layers like 'Public' and 'Private'.Each set has 3 layers. My requirement is, Layer switcher has to show the first set of layers with check- box under the label name 'Public' and second set of layers with check-box under the label name 'Private'. [Not with Option button]. I have tried as shown below: In Design:

              In Javascript:                //Layer Switcher     var layerSwitch = new OpenLayers.Control.LayerSwitcher({         div: OpenLayers.Util.getElement('layerswitcher')     });     osMap.addControl(layerSwitch)          layerSwitch = osMap.getControlsByClass("OpenLayers.Control.LayerSwitcher")[0];     layerSwitch.dataLbl.innerText = "Public"      ![enter image description here](http://i.stack.imgur.com/zv8KM.png) In that above list I need to add 'Private' label and layers. Please suggest me to implement this.Thanks in advance.


interfacing multiple gps

I am trying to interface NMEA output of multiple GPS units transmitting wirelessly to a single PC, each GPS position can then be shown on georefance map of that area. My question 1.) How to interface multiple GPS data with one PC, since one GPS is interfaced automatically in QGIS? 2.) How to display each GPS position simultanously on one map? Thanks


produce images with shapefiles and OpenStreetMap

I have a python file http://pastebin.com/jzwE6c6P which iterates over the features of a shapefile and renders a simple image by zooming to the bounding box of each feature. What I need is OpenstreetMap as a basemap. I have OpenStreetMap successfully loaded in a postis database. I can produce an OpenStreetMap with the mapnik example generate_image.py, but I have no idea how to call the osm file. http://svn.openstreetmap.org/applications/rendering/mapnik/generate_image.py Any help would be greatly appreciated


Best practices and examples of web maps of polar regions

I am looking for examples of web maps focusing on polar regions (Arctic or Antarctic) preferably using a polar projection. What could be best practices to follow for such web mapping applications? Any advise on the polar projection and tiling scheme to choose would be welcome!


Network Analyst: (1) disaggregating route cost by segments and (2) showing level of service

_For the record, I also posted this onreddit.com/r/gis_. I've been playing around with Network Analyst (in 10.2) for the first time in a long time, never really had to use it much but I want to learn it some more. I'm (think I'm) fine with the standard applications of it (routing, service areas). I'm curious if it has the functionality to do the following workflow. **Here's the setup/idea:**   * assume a single road with multiple segments, let's pretend I split it into equal segments of 100 meters.   * each segment has varying capacity, defined by either lanes/width or a discrete number of people.   * all my cars start on the same point, and all of them are going to the same end point.   * imagine that halfway through the road, there's a toll booth. for this one segment, where speed/capacity slows down. if there's only one car on the road, it doesn't matter. if there are 1000 cars, it becomes a problem. **My question is:** Can I get an output, showing increased time/costs to travel along each segment ~~and not just for the route as a whole~~ as I vary the amount of cars passing along the road? ~~(Using the Vehicle Routing Problem method only gives one accumulated cost for the whole route.)~~ _I found the Copy Traversed Source Features tool to solve this problem of how to see the time on each segment, but I still have the question about how to, generally, model different capacities on the same route_ That way, I could basically color-code the different segments for their level of service depending on different capacities. Maybe with one car on the road, everything is green. With 100, it's mostly green, red at the tollbooths and yellow just behind them. With 1000 cars, the red extends further back on the road. I'm sure there are whole traffic modeling programs that can do this, but I'd like to know if it could be done with just Network Analyst. Forgive me if this is really rudimentary. Trying to search for anything ArcGIS with "flow" or "capacity" tends to yield a lot of ArcHydro stuff! I found ArcCASPER, but I'm not entirely sure if I can use this to get the "itemized" cost/time values along each segment.


ST_Touches function in Spatialite

I'm a newbie to Spatialite so forgive me if the answer to my question is obvious...(I tried looking online but couldn't find the answer to this question). I am trying to use the function ST_touches in Spatialite Gui but it says it does not recognize that function. Is there anything I need to install in order to use this function? And how? Thanks so much, Ana


Can I Rotate SVG symbol counter clockwise in Quantum GIS? (Direction East 0 - counter clockwise)

I'm working in a road signs project. I need the signs layer symbol to rotate according to the value in the angle field, so they could be represented facing the correct orientation. However, the angle field values refer to a CAD file originally designs with drawing units configuration where the angle value rotates counter clockwise, from East (Direction 0). Example: A sign with rotation angle value of 90º will be facing north in a clockwise rotation, or will be facing south in a counter clockwise. (East as 0º) I have altered the CAD file drawing units configuration to rotate clockwise and the angle value has changed on the CAD blocks. But when converted back to shape they still return the original counter clockwise rotation angle value.


Are there any open source tools for the processing of UAV images?

I have aerial photographs taken by a Unmanned Aerial Vehicle (UAV). I want to do ortho mosaicing and DEM creation to do volumetric analysis. Are there any open source tools that process the UAV images? Any help would be appreciated.


Showing map in Grass Layer Manager/Map Display via Python

I've created some raster(tif) maps using Grass libraries in Python. I want to opem them automatically in Grass GIS Map Display or Layer Manager after creation. I don't want to use GUI for this. What commands I need to use for this? I'm using GRASS GIS 6.5.svn over Windows 7. Thansk in advance..


gdal ImportError in python on Windows

Trying to import gdal for Python 2.7.3 on Windows XP:               >>> import gdal     Traceback (most recent call last):       File "<stdin>", line 1, in <module>       File "C:\Python27\lib\site-packages\gdal.py", line 2, in <module>         from osgeo.gdal import deprecation_warn       File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 21, in <mo         _gdal = swig_import_helper()       File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 17, in swit_helper       _mod = imp.load_module('_gdal', fp, pathname, description)     ImportError: DLL load failed: The specified procedure could not be found.      Following suggestions from How to install GDAL with Python on windows? and elsewhere, here's what I've done so far:   * removed all versions of python and started with a clean install of 2.7.3   * installed gdal with the OSGeo4W installer   * installed the native Win gdal binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/   * added `C:\OSGeo4W\bin;` first in my `Path` variable   * tried `from osgeo import gdal`   * launched python from within the OSGeo4W Shell   * run the procedure outlined in http://cartometric.com/blog/2011/10/17/install-gdal-on-windows/ The result is the same. Any other ideas about how to troubleshoot this?


How do I set the projection and coordinate system for a TIFF file?

I have a topographic map of California (obtained from CAL-Atlas) as a TIFF file. I tried importing it into QGis, but it displays the map using a pixel based coordinate system rather than latitude/longitude (the `.prj` file indicates that it uses NAD83 Albers projection). How can I rectify the coordinate system for this raster file in QGis? I'm using QGis 1.8 for this project, but also have 2.0 if necessary.


How to count the number of lines connected to a point?

I have a water network which and I need to install elbows and Tees (T). When 2 lines connect to a point, I want to install an elbow, when 3 lines connect, I want to install a Tee. How do I get ArcGIS or QGIS to determine how many lines are connected to a point and designate an elbow or a tee based on that criteria? ![enter image description here](http://i.stack.imgur.com/GTFWAm.jpg)


How do I download tracks from Garmin GPSmap 62 using GPS utility?

I think I have to open files from windows file manager and then save these, rather than the autoconnect facility available between other Garmin devices and GPS utility.. Is this correct or is there a way to get it to open the GPS transfer window automically on connection with this device model as this has the tick options for tracks download too? If I have to go via windows file manager, how do I differentiate tracks from waypoints and is there an easier way please?


How to find if a lat/lon point is on a street?

Are there any services to determine whether or not a give lat/lon point is on a street? I am working on an app that uses user entered lat/lon points but it only really makes sense if its on a street. I want to generate a bunch of points for testing but the points need to be on a street. Any input is appreciated!


How to add labeling to a polygon layer?

I'm trying to add labeling to a polygons vector layer called "myVectorLayer". It does not give me an error but the labeling does not appear.               palyr = QgsPalLayerSettings()     palyr.readFromLayer(myVectorLayer)          palyr.enabled = True     palyr.fieldName = 'name'     palyr.placement= QgsPalLayerSettings.OverPoint     palyr.setDataDefinedProperty(QgsPalLayerSettings.Size,True,True,'8','')          palyr.writeToLayer(myVectorLayer)       Thanks for your help


How to link R script to Algotithm output in QGIS modeler?

I constructed a simple R script for QGIS modeler (.rsx) that calculates groupwise summary statistics of a vector layer table (sum by field "subject" and "FRC"). The script correctly works. When executed, a windows is opened and you can manually choose the vector layer and the other parameters. However, if I insert this script in the graphical modeler I am able to choose the output of a previous Algorithm as input to my script, nevertheless I cannot select fields from its attribute table, as requested by my script. How can I do that? ----Edit----- As an example, consider I want to construct a model that calculates the % of different land use types inside polygon buffers constructed around some street addresses. The model represented in the picture below intersect the buffers with a polygon layer representing land use areas, then calculates the area of each new feature in the intersection layer. ![model](http://i.stack.imgur.com/VdKre.jpg) Now I want to link my R-script to the output layer "Intersection_with_area" to summarize the total area for each address and for each land use type. Here below the .rsx code:               ##intersection=vector     ##address=field intersection     ##soiltype=field intersection     ##area=field intersection     ##folder=string     ##filename=string          library(doBy)     setwd(as.character(folder))          inters_df=as.data.frame(intersection)          summ=summaryBy(list(area,c(address,soiltype)),FUN=sum, data=inters_df, keep.names=T)     write.csv(summ,as.character(nomefile))      I am unable to select the fields "address", "area" and "soiltype" from the vector layer "Intersection_with_area" that is in my model.


Date Time Format output in REST API in 10.1

It looks like the output format for dates is in ticks. Has this always been the case? Can it be changed at the server level or the request level?


OpenLayers WFS filter by DATE?

Using openlayers, I would like to create a temporal filter to query a GeoServer WFS service. There is a WFS filter example here without the temporal (date) portion that i need: http://openlayers.org/dev/examples/wfs-filter.html My dates on GeoServer are stored in the following format: "2010-09-12 08:10:40+00" Any links or code snippets that might help me would be greatly appreciated.


Is there lat/lon grid option in QGIS?

For example, I have georeferenced layer loaded and I want lat/lot grid or at least some ruler in QGIS display canvas, to suite me as a helper.   It looks like only reference is cursor tracking in status bar, which is not what I'm after. Is there such option, or a plugin?


PostGIS ERROR: could not load library "/usr/lib/postgresql91/lib64/postgis-2.0.so"

OS is openSUSE 12.1, PostgreSQL - 9.1, PostGIS - 2.0. Postgre/PostGIS are installed from Application:Geo repository. After recent updates when I try to connect to my database I get the following error:                   ERROR:  could not load library "/usr/lib/postgresql91/lib64/postgis-2.0.so":      /usr/lib/postgresql91/lib64/postgis-2.0.so: undefined symbol: pj_get_spheroid_defn      I searched the web for this error (hint-1, hint-2) and seems that it may have something to do with ld.so.config (or ldconfig command). But I can't figure out what I have to do in my case.


Is it possible to automate creating an image pyramid store with Geoserver?

Geoserver has a REST API to automate Geoserver commands, however I do not see any examples of how to automatically create an Image Pyramid store and associated layer. Is that possible? Can anyone provide me sample code?


How to Group By with Summarize on alphanumeric field in ArcGIS?

Is it possible to create from Summarize option, a new table with the COUNT of a string field and the code of municipalities, in my case, like that:               +-------------------+--------------+     | id_municipalities | string_value |     +-------------------+--------------+     | 1                 | A            |     | 1                 | A            |     | 1                 | C            |     | 2                 | A            |     | 2                 | B            |     | 3                 | D            |     +-------------------+--------------+      And the result table, like that:               +-------------------+--------------------+---------------+     | id_municipalities | COUNT_string_Value |  string_value |     +-------------------+--------------------+---------------+     | 1                 | 2                  | A             |     | 2                 | 1                  | B             |     | 3                 | 1                  | D             |     +-------------------+--------------------+---------------+      Thanks in advance


What is generally faster in OpenLayers: WMS or GeoJSON?

I work both with WMS (connection with postgres) and GeoJSON in OpenLayers. I have the impression that a WMS is faster when more feature need to be loaded. And I have the impression that GeoJSON is fast when there are only a small amount of feature. When more features need to load the application is much slower with GeoJSON What is generally faster in OpenLayers? And is there way to make a GeoJSON file load faster.


How to build a relational database system with 4 tables in arcgis desktop?

I have been given data from an working online application which consists of a relational model. My aim is to recreate the model using Arcgis Desktop. I have the table "elements" containing Point geometry with the attribute element_id as the primary key. In the table Aspects, Types and media. The tables "Aspects" and "Media" have a 1:1 relationship with "elements" and media has a 1:m relationship. It is possible to build these multiple relationships in ArcGIS Desktop?


Is there a difference between ESRI's NAD83 Indiana SPW and QGIS's?

It seems ESRI and QGIS don't have the same definition for my most commonly used projection, NAD83 StatePlane Indiana West (US ft). When I create data in an ESRI product the projection shows up in QGIS as: > USER:100001 - * Generated CRS (+proj=tmerc +lat_0=37.5 > +lon_0=-87.08333333333333 +k=0.9999666666666667 +x_0=900000 +y_0=250000 > +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs) When I create data in QGIS the projection information shows up under the Custom folder as:               NAD83_Indiana_West_ftUS     Authority: Custom          Projection: Transverse_Mercator     false_easting: 2952750.0     false_northing: 820208.333     central_meridian: -87.08333333333333     scale_factor: 0.999966667     latitude_of_origin: 37.5     Linear Unit: Foot_US (0.3048006096012192)          Geographic Coordinate System: GCS_North_American_1983     Angular Unit: Degree (0.0174532925199433)     Prime Meridian: Greenwich (0.0)     Datum: D_North_American_1983       Spheroid: GRS_1980         Semimajor Axis: 6378137.0         Semiminor Axis: 6356752.314140356         Inverse Flattening: 298.257222101      ESRI's normal entry is:               NAD_1983_StatePlane_Indiana_West_FIPS_1302_Feet     WKID: 2966 Authority: EPSG          Projection: Transverse_Mercator     False_Easting: 2952750.0     False_Northing: 820208.3333333333     Central_Meridian: -87.08333333333333     Scale_Factor: 0.9999666666666667     Latitude_Of_Origin: 37.5     Linear Unit: Foot_US (0.3048006096012192)          Geographic Coordinate System: GCS_North_American_1983     Angular Unit: Degree (0.0174532925199433)     Prime Meridian: Greenwich (0.0)     Datum: D_North_American_1983       Spheroid: GRS_1980         Semimajor Axis: 6378137.0         Semiminor Axis: 6356752.314140356         Inverse Flattening: 298.257222101      How big of a deal is this? The only difference I can see is in the precision of the scale factors. Is there another difference I missed? Is it worth worrying about?


How to draw a polygon with preset length in OpenLayers?

For a project I am working on, I need to be able to put a polygon on a map using OpenLayers, based on a variable point that can be set by a user. The polygon is an isosceles triangle of which two legs should be exactly 1 kilometer and should originate from a point set by the user under an angle of 90 degrees. Does anyone know how this can be done?


Using Natural Earth Dataset As WMS

This Question is about Natural Earth Project. I tried to do some research about creating my own WMS and came across this project. The web page says : > Natural Earth is a public domain map dataset available at 1:10m, 1:50m, and > 1:110 million scales. Featuring tightly integrated vector and raster data, > with Natural Earth you can make a variety of visually pleasing, well-crafted > maps with cartography or GIS software. How can I harvest the data for my WMS So that it can be used with Mapinfo or Other software?


Shorcut to apply selected shapefile projection to the data frame in arc gis

What is the shortcut to apply selected shapefile or the newly added data's projection to the data frame in arc gis, well not the traditional way of Dataframe--->Properties--->CS system _"This could be a silly question yet a very useful one seen some person using it long ago, if there isn't any shortcut, then sincere apology"_


Creating database for climate data with MySQL

I'm working on a project using climate data and MySQL. Before I start to work, what's your advice on the best way to complete this task. I plan on using the following workflow: >   1. Analyse the climate-data, creating a mysql database-schema that could > hold the data. (all tables should use UTF-8 as charset). >   2. Download all the raw-data from worldclim.org, using the 30 arc-seconds > (~1 km) resolution. >   3. Import the data. Providing a dump > I have already downloaded the data for Min.Temperature, and it looks like this when I open one of the folders ![enter image description here](http://i.stack.imgur.com/nsH3g.jpg) The data is in .adf format: how can I insert that format into MySQL? Also, what do you think is the best way to organize the database in MySQL for that kind of data? Thank you. _UPDATE_ I explored and found out that is option in AutoCAD Map 3D (FDO) where I can insert shapefiles in MySQL. Maybe then is the best way to convert coverages to shapefiles and then in Autocad Map 3D to MySQL? * * * I need to use MySQL. So I'll download . bil files. gissolved said I can save it in a blob field in my database and KevinMayall said I should convert it to ASCII and then to MySQL. These are raster files. What is the best way to import .bil files to database then?


How to create GRASS scripts in C# in Windows

Most of the tutorials that I have seen are under Python and Linux. Is it Possible to create GRASS scripts in C# or atleast in Windows. I can create scripts using a different language as a compromise but at least it must run in C# because I am currently using C# for my GUI of the simulation system that I am making. Thanks!


How to resolve GRASS error "Execution failed: 'gproj -p' "?

I installed the WinGRASS-6.4.0-1-Setup.exe 55M from http://grass.osgeo.org/grass64/binary/mswindows/native/. I'm using a x64. After installation, I tried opening the demoLocation but it failed and displayed the error: Execution failed: 'gproj -p'. How do I resolve it?


Using ArcPy, is there a way to change the color of a symbol in a UniqueValuesSymbology object?

I have an template mxd I reference with several pre-defined layers. The only variable I need to modify is the color of certain symbols in the layer. I have tried to modify and dig around the Symbology Object but I cannot access the colors of each Unique Value Symbol. Any help is appreciated. Thank you all. -- edit This is how I am accessing the the Symbology of the individual layers. There doesn't seem to be and option to change the color a value.   * I am using ArcGIS 10.2.1              mxd_file = r"some\path\file.mxd"     mxd = arcpy.mapping.MapDocument(mxd_file)          # getting data frame        df = arcpy.mapping.ListDataFrames(mxd)[0]          # getting street layer     street_layer = arcpy.mapping.ListLayers(mxd, 'Street', df)[0]          if street_layer.symbologyType == 'UNIQUE_VALUES':         # trying to access all possible properties of the symbology object         street_symbology = street_layer.symbology         desc = street_symbology.classDescription         labels = street_symbology.classLabels         values = street_symbology.classValues         show_other_values = street_symbology.showOtherValues         value_field = street_symbology.valueField     del mxd, df          layer_file = r"some\path\file.lyr"     arcpy.SaveToLayerFile_management(path_layer, layer_file)


Error in r.terraflow

I used r.terraflow.short in GRASS, but it displayed this error:               r.terraflow.short elevation=raster_bulacanElevation \                       filled=raster_bulacanElevationFlooded1 \                       direction=raster_bulacanElevationFlowDirection1 \                       swatershed=raster_bulacanElevationSink1 \                         accumulation=raster_bulacanElevationAccumulation1 \                       tci=raster_bulacanElevationTCI1     stats.out: Permission denied     STREAM temporary files in C:/Users/Rhen/AppData/Local/Temp     (THESE INTERMEDIATE STREAMS WILL NOT BE DELETED IN CASE OF     ABNORMAL TERMINATION OF THE PROGRAM. TO SAVE SPACE PLEASE     DELETE THESE FILES MANUALLY!)      What should I do to make r.terraflow.short run? I tried deleting all the contents of the Temp folder but GRASS still displayed the same error.


mapserverpro.com & mapserving.com opinions?

Does anyone use these services? I'm trying to figure out which way to go as I embark on a mapping project, and wonder what GIS-dedicated hosting services like these are like. Thanks.


Why won't this simple raster layer in my mapfile show up?

I am trying to get a simple raster layer to work on MapServer. I am not exactly going to be using geographic data, but I want to "georeference" multiple rasters together to create a map-like interface. Unfortunately, I can't seem to get over this initial step of getting a single raster to show up using my mapfile. Mapfile:               MAP         IMAGETYPE   PNG         EXTENT      -180 -90 180 90         SIZE        400 300         IMAGECOLOR  255 255 255         UNITS       DD         STATUS      ON         DEBUG       ON                   LAYER             NAME    "base"             DATA    "Base.png"             STATUS  ON             TYPE    RASTER         END      END       My directory structure is like this: /home/username/public_html/cgi-bin/mapserv.cgi /home/username/public_html/dir/Base.png /home/username/public_html/dir/mapfile.map /home/username/public_html/dir/tmp/ When I visit the map using something like the following link, all i get is a blank image of the correct size but not the actual Base.png image. No pink tiles. No error message. What am I doing wrong? *http://myurl.com/cgi-bin/mapserv.cgi?map=/home/username/public_html/dir/mapfile.map&layer=base&mode=map