title: (partly solved) Only pink tiles using Qgis Server

text: My name is Alfons and I'm beginning to work with QGIS Server. I'm an architect, so that I'm used to buildings and landscapes, not to scripts and code. Last 6 months I managed to work with GeoServer and OpenLayers, and I could obtain some good results. Now I wanted to migrate to QGIS Server because QGIS is the application I chose in my university to work with other professors and my students, and the "wysiwyg" results as server seduced us. Our problem is that I followed all the tutorials to install QGIS Server and then I began to obtain results. Now, I'm stuck in a nice pink-tiles screen. I could get capabilities, even read layer names in the screen. But nothing more. I used OpenLayers and LizMap for rendering. And used my own files (.SHP and .JPG) in my own .QGS projects, and also the examples provided by 3Liz for LizMap And... I had the same results in 3 different "devices": both my home PC and my laptop, running Windows 7 x64... and in the Lubuntu virtual machine (launched in my 2 hardware devices) provided by OsGeo Live. This is part of my apache access.log file which shows the server doesn't provide the image:               127.0.0.1 - - [04/Oct/2013:23:11:32 +0200] "GET /qgis/qgis_mapserv.fcgi.exe?MAP=http%3A%2F%2Flocalhost%2Fqgis%2F0001%2F13100301.qgs&LAYERS=EDIFICIS%2Cbase-via%2Cbase-mansanes%2Cbase-costa%2Cbase-cases&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,0,-90,90&WIDTH=256&HEIGHT=256 HTTP/1.1" 200 218     127.0.0.1 - - [04/Oct/2013:23:20:51 +0200] "GET /cgi-bin/qgis_mapserv.fcgi.exe?MAP=http%3A%2F%2Flocalhost%2Fcgi-bin%2F13100301.qgs&LAYERS=EDIFICIS%2Cbase-via%2Cbase-mansanes%2Cbase-costa%2Cbase-cases&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,-90,0&WIDTH=256&HEIGHT=256 HTTP/1.1" 404 227      And this is part of the errors.log which says something apout some .cpp which I don't understand.               [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\mapserver\\qgis_map_serv.cpp(186) : (main) Skipping GDAL ECW drivers in server.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(872) : (QgsApplication::applyGdalSkippedDrivers) Gdal Skipped driver list set to:\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(873) : (QgsApplication::applyGdalSkippedDrivers) ECW\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(872) : (QgsApplication::applyGdalSkippedDrivers) Gdal Skipped driver list set to:\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsapplication.cpp(873) : (QgsApplication::applyGdalSkippedDrivers) ECW JP2ECW\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] Warning 1: Unable to find driver ECW to unload from GDAL_SKIP environment variable.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP environment variable.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(201) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/gdalprovider.dll: ...loaded ok (68 file filters)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/georefplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/globeplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/gpsimporterplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(109) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/grassplugin.dll: ...invalid (lib not loadable): Cannot load library D:/OSGeo4W/apps/qgis/plugins/grassplugin.dll: The specified module could not be found.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(109) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/grassprovider.dll: ...invalid (lib not loadable): Cannot load library D:/OSGeo4W/apps/qgis/plugins/grassprovider.dll: The specified module could not be found.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(109) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/grassrasterprovider.dll: ...invalid (lib not loadable): Cannot load library D:/OSGeo4W/apps/qgis/plugins/grassrasterprovider.dll: The specified module could not be found.\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/heatmapplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/interpolationplugin.dll: ...invalid (has type method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(126) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/libgrass_gis.6.4.3.dll: ...invalid (no isProvider method)\r     [Fri Oct 04 23:11:32 2013] [error] [client 127.0.0.1] d:\\src\\qgis-2.0.1\\src\\core\\qgsproviderregistry.cpp(118) : (QgsProviderRegistry::QgsProviderRegistry) Checking D:/OSGeo4W/apps/qgis/plugins/offlineeditingplugin.dll: ...invalid (has type method)\r      I suppose some library file or some driver is missing. For my machines, those are the specs:   * AMD Athlon X64 Dual Core 2.4 GHz, 8Gb, Windows 7 x64, QGIS 32bit and   * Intel Core2 T5500 1.66GHz, 2Gb, Windows 7 x64, QGIS 32bit   * The virtual Lubuntu machine over VirtualBox following the specs from OsGeo Live (EDIT: same problem reproduced also in a WindowsXP (SP3) 32bit computer and a WindowsXP (SP2) on virtual PC) The installation is the provided by OSGEO4W setup, choosing QGIS, APACHE and FCGI and the default added files. Any suggestion ? Thank you very very very much ! EDIT (2013/10/05) : Right-clicking one of the pink images sent me to http:// localhost /cgi-bin/qgis_mapserv.fcgi.exe?MAP=http%3A%2F%2Flocalhost%2Fcgi- bin%2F13100301.qgs&LAYERS=EDIFICIS%2Cbase-via%2Cbase-mansanes%2Cbase- costa%2Cbase- cases&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,0,0,90&WIDTH=256&HEIGHT=256 The server responded with error 404 if asking this link That localhost/cgi-bin is located in OSGEO4W\bin and I tried to put my project there. Now there are also pink tiles but when asking for the image alone the server gives error 500 540 in access.log and "Premature end of script headers: qgis_mapserv.fcgi.exe" in error.log I forgot to tell that I was using QGIS 2.0.1 in all my windows tests and QGIS 1.8 in the linux ones. [EDIT 2013-10-09 02:24 GMT+2] I rebuilt a complete computer to make a clean installation with no influences from other software. The first result was the same. Following "premature end of script..." questions I found some comments about bad installation parameters in the tutorials, so that I followed their suggestions. Finally I deleted some of the changes. Somewhere the sentence /qgis/qgis_mapserv.fcgi.exe? lacks for the "exe". I searched every file in c:\OSGEO and changed it Also I modified the httpd.qgis.conf to write every backslash as slash except the one belonging to the disk unit. The last and better change was deleting the SetHandler sentence inside httpd.qgis.conf Since that moment my files were rendered as WMS by QGIS and others (like GlobalMapper) But they continue NOT rendering in OpenLayers. If format is PNG, the whole map is white. If the format is JPG, the whole map are pink tiles. The same happens with Lizmap's examples. I can try to read them in Qgis or Globalmapper but not on web clients (the own Lizmap client gets stuck !) Thanks !


title: GDAL and Python - Don't print GDAL Error messages

text: According to the GDAL Python Documentation, GDAL functions do not raise exceptions or errors but do print errors to the console via stdout and stderr. I have some code in my script that calls `GetStatistics` on a GDAL raster band. If the band only contains nodata cells (which is possible because it is a tile of a larger dataset) the `GetStatistics` call fails with an error, but the script continues. I would prefer not to see the error messages that are still printed to the console when this happens as it interferes with other print statements that I have written into my own script. Is it possible to turn off these messages?


title: Best way to assign points to nearest roads in postgis?

text: I'm trying to implement a simplified type of dasymetric mapping for census data. I've downloaded the Census's American Community Survey individual-level data and randomly assigned every household to a point within a block group. Now I want to move these random points to the nearest road. I've downloaded the OSM data and loaded it via osm2pgsql. So I have two tables: dade_random_points: a point for each household. 'wkb_geometry' is the geo field. dade_planet_osm_roads: a linestring for every road. 'way' is the geo field. (By the way, I'm doing a proof-of-concept with just Miami-Dade County for right now.) After reading How to get the nearest point on a linestring to a given point? and http://www.postgis.org/docs/ST_ClosestPoint.html I wrote this enormous, multi-nested query. It's still churning on my laptop, but it seems to work when I put in 'limit' statements to do smaller pieces. Surely there has to be a better way? (Or maybe there's a postgis dasymetric library out there somewhere that I haven't been able to find?)               drop table if exists dade_points_on_roads cascade;     create table dade_points_on_roads as     select       table4.id,       table4.osm_id,       table4.geoid10,       table4.name,       ST_ClosestPoint(          ST_Transform(table4.way, 4326),          ST_Transform(table4.wkb_geometry, 4326)         ) as point_on_road     from       (       select         --table3.*,         points.*,         roads.*       from         (         select           table1.id,           min(table1.distance) as distance         from           (           select             p.id,             r.osm_id,             ST_Distance(               ST_Transform(r.way, 4326),               ST_Transform(p.wkb_geometry, 4326)               ) as distance           from              dade_planet_osm_roads as r,             dade_random_points as p           where              ST_DWithin(                ST_Transform(r.way, 4326),                ST_Transform(p.wkb_geometry, 4326),                500               )             --limit 1000           ) as table1         --order by distance asc         group by table1.id         --limit 10         ) as table2,         (         select           p.id,           r.osm_id,           ST_Distance(             ST_Transform(r.way, 4326),             ST_Transform(p.wkb_geometry, 4326)             ) as distance         from            dade_planet_osm_roads as r,           dade_random_points as p         where            ST_DWithin(              ST_Transform(r.way, 4326),              ST_Transform(p.wkb_geometry, 4326),              500             )           --limit 1000         ) as table3,         dade_planet_osm_roads as roads,         dade_random_points as points       where         table2.id = table3.id         and table2.distance = table3.distance         and table2.id = points.id         and table3.osm_id = roads.osm_id       ) as table4     ;


title: What is the scale and does it depend on the print out size?

text: I am new to ArcGIS and I would like to know what is the scale in ArcGIS and does it depend on the print out size or display? Can any one explain all about topic scale in the ArcGIS?


title: Aggregate the raster from the Combine Tool in Spatial Analyst--->Local

text: I have a raster file created through the Combine tool (Spatial Analyst--->Local). The attribute table is showed below. Its resolution is roughly 10m. I would like to aggregate it to 50m with each aggregated cell (including 25 small cells) having the sum of those attributes (SFDVal, MFDVal, MHVal and etc.) from the 25 small cells. I tried several ways (aggregation, zonal etc) but it seems like all of them are working on the actual cell value of the combined raster, instead of other attributes. But I only want to get a sum aggregation on those attributes, not the cell value. Anyone suggestion is appreciated! Thanks in advance! ![enter image description here](http://i.stack.imgur.com/byjhA.png)


title: How do I open and edit a table in my geodatabase

text: I created a file geodatabase with some tables. I created a new table and specified the field properties. Now, how do I open the table to populate the fields?


title: Restrict suggestions from ESRI ArcGIS REST API to US addresses only

text: I am wondering if there is a way to restrict esri arcgis REST API to suggest only US addresses. Combination of location & distance parameters prioritizes the results, but that doesn't restrict suggestions to an area. I tried setting the bbox parameter, but looks like it is only supported for find api and not for suggest. SO, how do I make the arcgis suggestions restrict to only US addresses ??


title: Iterating ArcGIS Network Analyst over multiple files using ModelBuilder?

text: I have 10+ files that I want to add to ArcMap then do some spatial analysis in an automated fashion. The files are in csv format which are located in one folder and named in order as "TTS11_path_points_1" to "TTS11_path_points_13". The steps are as follows:   1. Make XY event layer   2. Export the XY table to a point shapefile using the feature class to feature class tool   3. Project the shapefiles   4. Snap the points to another line shapefile   5. Make a Route layer - network analyst   6. Add locations to stops using the output of step 4   7. Solve to get routes between points based on a RouteName field How do I iterate this procedure over the number of files that I have, while ensuring that every time the output has a different name so it doesn't overwrite the one from the previous iteration? I am using ARCMAP 10.1


title: How to use UTF8 in printing module?

text: I have a Geoserver with printing module. And i have a problem with print cyrillic symbols. I want to try to use `Identity-H` but for this i need a custom font. In Unix system it's can be make like this:               fonts:     - /usr/share/fonts/PingWin/PWTVerdeTST.ttf      But im using Windows.   So how to use custom fonts in `config.yaml` in WIndows. And another question, utf8 it's correct way to print cyrillic symbols in Mapfish print module?


title: GeoJSON of half the earth

text: I'm currently trying to model daytime/nighttime in leaflet, and the only way I currently see me being able to do that is to have a GeoJSON polygon reflecting half of the earth (for daytime/nighttime respectively). However, my GIS knowledge pretty much ends there. Ultimately, there should be an function that maps to the coordinates of the boundary, right?


title: how to multiply and group values of NDVI in Erdas

text: I have downloaded the MODIS data for calculating the NDVi but the ranges of values in its attribute table ranges from -32768 to 9830 i want to club the similar values upto 2 decimal places and also want to multiply these values with scaling factor of 0.0001 Could somebody please help by expalining me how to do this in erdas


title: ArcGIS Online: Adding Screenshots to my content items

text: Within ArcGIS Online, is it possible to associate an array of screenshots with a content item? I see a property in the ArcGiS Online Search API response that includes "screenshots":[]


title: Track Spatial and Attribute Edits By Date and User

text: I do a lot of editing in ArcGIS for several users for numerous datasets. It's very important for the user's to know when I've updated certain spatial or attribute features in the dataset. I created four fields in the datasets:   * Spatial Accuracy Date   * Spatial Accuracy Edited By   * Attribute Accuracy Date   * Attribute Accuracy Edited By: It takes a fair amount of time to update all four of these fields. I'm wondering if there is any way to have these fields auto-populate when I change them, either spatially or in the attributes. I thought I heard of something along these lines when ArcGIS 10.0 came out, but after some Google-ing, I haven't been able to fine anything. I know it’s probably a pipe dream to believe that ESRI would have something like this built in, especially something that can derive whether a feature was changed spatially or in the attributes. I'm hoping there is an ESRI ArcGIS ability to do this, but I am also open to 3rd party extensions or python code.


title: Polygon shapefile to Raster with Mask and Extent

text: I have a polygon shapefile (Vesijärvi lake). The lake has many islands, bays and inlets. When I look at the attribute table, there are actually two adjacent features: Northern lake and southern lake. I have a pre-defined rectangular area of interest with the min x, max x, min y, max y in ETRS-TM35 FIN projected coordinates. The area of interest overlaps with the both parts of the lake. I also have a pre-defined raster cell size (10 meters) My task is: Create a .tif raster file, where 'water' cells (inside the lake) have a value of 1 and 'non-water' cells (outside of lake) have a value of 'no data'. I know that in ArcGIS you can use a 'Feature to Raster' tool, but I don't have ArcGIS. I'm trying to use an open-source GIS, preferably QGIS. In QGIS, I found a tool called 'Rasterize' but I cannot set the minimum x, maximum x, minimum y, maximum y, cellsize and the lake polygon mask. There is a 'Horizontal' and 'Vertical' expression but any combination of numbers gives me an expression is not correct error. Any help with using the QGIS rasterize tool (or a similar free vector-to- raster tool) for converting a polygon shapefile to a raster with the predefined extent, cellsize and mask would be appreciated.


title: How do you view the current spatial index grid size for a file geodatabase feature class?

text: I am receiving an "The spatial index grid size is invalid." error during a copy/paste of polygon features in ArcMap and I successfully corrected it with AddSpatialIndex. But in an effort to figure out how and why I ended up with invalid grid size, I thought I would start with the actual grid size. I would like to know what the current grid size is and I don't see a way to view that in ArcCatalog. Is it possible to view the current grid size of a file geodatabase featureclass?


title: Add SimpleMarkerSymbol and then remove it upon next click

text: My map has some markers and when I click to identify a marker, I'm adding a marker to it. When I click the next marker though, I'd like for the previous marker to be removed since I'm only interested in the more recently identified element. I'm using the legacy modules, JavaScript API.                   var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 18,             new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,             new dojo.Color([0,0,0]), 1),        // border color             new dojo.Color([255,255,0,0.80]));  // fill color         App.map.graphics.add(new esri.Graphic(queryResults[0].feature.geometry, symbol));


I've pondered for a while whether I should ask this question. I even asked whether I should ask a question that should probably be a community wiki on the meta site. Since I didn't get many responses, and the one I did get didn't really explicitly say I shouldn't ask it, I’m going to go ahead and ask it anyway: **How are you, as GIS professionals, spending most of your day at work?** That is, what GIS tasks do you perform to get your job done? I’m curious how my day-to-day activities compare to others in the field. These are some examples of how I spend my GIS work (feel free to add others):   * Cartography – creating new maps, or modifying others    * Scripting/Tool Building    * Research    * Data Edits/Cleansing    * Analysis (vector)    * Analysis (raster)    * Meetings   * Visiting GIS.stackexchange.com Also feel free to add a percentage of your time on different tasks, if you're so inclined.


title: Can I add entries to the layerlist context menu?

text: I am implementing a python based plugin for use with QGIS 1.8. Most of it's user interface is contained within a QDockWidget but there are some layer specific controls I would like to append to the context menu displayed when the user right-clicks on the Table Of Contents. Is there a way for me to manipulate this menu?


title: OpenGeo/Geoserver: can I have a store that access more than one PostGIS schema?

text: I have an existing PostGIS database that I use with QGIS. I am now looking at options for getting some of this data up on the web. Hence OpenGeo. I have Geoserver installed and running and have succeeded in loading a simple layer from my PostGIS database. My current problem is that in QGIS/PostGIS I have used the base schema for my geometry tables and put all the tables relating to my layers into the layers schema. I build my layer using sql. When I create a new 'store' in geoserver I am forced to specify a single schema within the database so this breaks my modus operandi that I use in QGIS. I am also struggling to figure out how to define "SQL Views" and whether or not these are dependent on 'stores' or whether there is some other mechanism that will allow me to do arbitrarily complex SQL queries on the database.


title: Why does the "calculate" button remain gray in Group Stats Plugin?

text: I'm trying to use the Group Stats Plugin. I found your tutorial and I wanted to post a comment but I have seen that it is not possible then I thought to write here. Unfortunately I can not use the plugin: after I enter all the required values, press "calculate" is not active and is always gray. My problem is that I have a shape of point that are points for animal sightings. This shape is formed by a text field containing the types of areas (beech, poplar, etc.) and another containing the areas value. I need to calculate the number of records that contains a precise type of vegetation and the sum of the relative areas. This is possible with Group Stats Plugin? Thank you very much!


title: Complete Metadata of a service not available with Geoportal

text: Using ArcCatalog, I tried creating the metadata of an ArcGIS Server service with the ISO 19139 / 19119 standard. But while registering this service with our custom ESRI geoportal, only the basic metadata information of the service (such as title, description and tags) are getting saved to geoportal database. How can I access the additional metadata information (such as owner, contact details etc of the service)? For this, do I miss anything while registering the service with geoportal?


title: Is it possible to set symbol layers always on top?

text: Is it possible to set symbols always on top, also if the layer with the symbol is drawn under another layer? Example: My layer order is like that: Streets (top)   Buildings   Landuse (bottom) The Buildings layer have centroid-symbols. But these are drawn underneath the streets layers: ![enter image description here](http://i.stack.imgur.com/ALLes.png)


title: DEM mosaic: gaps

text: I have generated DEMs (bare earth) from Lidar data. For computational reasons, I have processed via ArcGis the lidar files in chunks, so I came up with different single DEMs. After, I used "Mosaic to New Raster" tool, and created a single DEM raster. I noticed that there are some gaps (lines) along the junctions between the original single DEM rasters (from which I got the single huge raster). I tried this function in the raster calculator:               Con(IsNull("raster"), FocalStatistics("raster", NbrRectangle(5,5, "CELL"), "MEAN"), "raster")      where "raster" is the name of the single huge DEM. The problem is that the gaps are still there. Any suggestion?


title: How to calculate the area of overlapping buffers within a single layer

text: I am very new to GIS, so don't know if this is EXTREMELY easy or impossible. I have GPS coordinates for stores (about 15000) for which I have created a buffer zone around each store location obviously (or not) in a single layer. In metropolitan areas I now have overlapping buffer areas. I would like to calculate the area where buffers overlap. I have established how to do this if each point were a separate layer, but with 15000 points, I just do not have the time or the energy to do this. Please help. I am working in QGIS.


title: fill a layer's attribute table from another layer's attribute table

text: i am working on arcgis 10.1. I have a layer of polygons divided into squares of 200m/40m with the attribute table filled. I have a second layer of polygons divided into squares of 200m/60m with an empty attribute table. the second layer is the new division into squares of the first one, so they have the same attributes. how can i fill the second layer using the data on the first one using arcgis 10.1? i want the second layer to take the value of the centroids of the first layer. ![Attribute table](http://i.stack.imgur.com/AfyT3.jpg)![the first layer](http://i.stack.imgur.com/Mhw6z.jpg) ![the second layer ](http://i.stack.imgur.com/oMFE2.jpg) Thank you.


title: Resequencing Legend Items in Python

text: I create various layers programmically with Python in ArcMap 10. I can adjust how the layers are sequenced using the `arcpy.mapping.MoveLayer` command. But I want to have the legend reflect a different order. I have yet to figure out how to do this in Python. I have tried using `legend.autoAdd=True or False`. I think I am close in using:               legend=arcpy.mapping.ListLayoutElements(mxd,"LEGEND_ELEMENT","My Legend") [0]      and then legend.items.something. I have four legend items A, B, C, and D which appear incorrectly as D, C, A, B Can anyone provde a link to code examples or better documentation?


title: How can I digitize features on an Y,Z plane in ArcGIS?

text: How can I geo-reference and digitize features on a Y,Z plane of a vertical cross-section in ArcGIS? The surface coordinate system is NAD 83 UTM 15. ![enter image description here](http://i.stack.imgur.com/FEqI7.jpg) This is a simplified version of the question found here: How to digitize directional drilholes from scanned vertical sections?


title: How to compile in Fortran in order to use an add-on in GRASS?

text: I need to use the r.inund.fluv add-on in GRASS. I installed the gfortran compiler in order to use the script. The problem is, I do not know how to compile the files in gfortran. Im using windows Here are the files for r.inund.fluv. I emailed the author of the script, Roberto Marzocchi and he instructed me to do the following and I was stuck at step 4.: Try the following way: 1) save the file r.inund.fluv within the folder named scripts within the grass main folder 2) create a file r.inund.fluv.bat in the folder named bin and copy the following row:               @"%GRASS_SH%" -c '"%GISBASE%/scripts/r.inund.fluv" %*'      3) save the file r.inund.fluv.html within the folder named doc 4) create a folder named fortran_code within your etc folder and save the four fortran code 2d_path.f90, etc etc. then try to compile the 4 fortran codes using for the binary file the same name of the source code without any extension e.g (2d_path.f90 become 2d_path)


title: OpenLayers: my proxy truncating response?

text: I'm using OpenLayers on IIS 7.5 and I want to get my proxy (OpenLayers.ProxyHost) working on my localhost machine. So i copy/pasted the source for this example and have it running on localhost. However my WFS layer is not showing up. I took a proxy code from here i am using: http://code.google.com/p/iisproxy/issues/detail?id=8 Now everything seems to work fine except my response seems to be truncated. Using firebug i can see my request goes through perfect and my RESPONSE is truncated for some reason. **What's going on and HOW CAN I FIX THIS?** ![enter image description here](http://i.stack.imgur.com/BVrm9.png) ![enter image description here](http://i.stack.imgur.com/hQjdV.png) ![enter image description here](http://i.stack.imgur.com/D8hPM.png) Here is my proxy code source: (I've commented out credential stuff as i'm using forms authentication).               <%@ WebHandler Language="C#" Class="proxy" %>               using System;     using System.Configuration;     using System.IO;     using System.Net;     using System.Web;          /// <summary>     /// adapted from: http://code.google.com/p/iisproxy     /// </summary>     public class proxy : IHttpHandler     {         public void ProcessRequest(HttpContext context)         {             var request = context.Request;             var remoteUrl = request.QueryString["url"];                  var req = (HttpWebRequest)WebRequest.Create(remoteUrl);             req.AllowAutoRedirect = false;             req.Method = request.HttpMethod;             req.ContentType = request.ContentType;             req.UserAgent = request.UserAgent;             //var basicPwd = ConfigurationSettings.AppSettings.Get("basicPwd");             //req.Credentials = basicPwd == null ?             //    CredentialCache.DefaultCredentials :             //    new NetworkCredential(HttpContext.Current.User.Identity.Name, basicPwd);             req.PreAuthenticate = true;             req.Headers["Remote-User"] = HttpContext.Current.User.Identity.Name;             foreach (string each in request.Headers)                 if (!WebHeaderCollection.IsRestricted(each) && each != "Remote-User")                     req.Headers.Add(each, request.Headers.Get(each));             if (request.HttpMethod == "POST")             {                 var outputStream = req.GetRequestStream();                 CopyStream(request.InputStream, outputStream);                 outputStream.Close();             }                  HttpWebResponse response;             try             {                 response = (HttpWebResponse)req.GetResponse();             }             catch (WebException we)             {                 response = (HttpWebResponse)we.Response;                 if (response == null)                 {                     context.Response.StatusCode = 13;                     context.Response.Write("Could not contact back-end site");                     context.Response.End();                     return;                 }             }                  context.Response.StatusCode = (int)response.StatusCode;             context.Response.StatusDescription = response.StatusDescription;             context.Response.ContentType = response.ContentType;             //if (response.Headers.Get("Location") != null)             //{             //    var urlSuffix = response.Headers.Get("Location");             //    if (urlSuffix.ToLower().StartsWith(ConfigurationSettings.AppSettings["ProxyUrl"].ToLower()))             //        urlSuffix = urlSuffix.Substring(ConfigurationSettings.AppSettings["ProxyUrl"].Length);             //    context.Response.AddHeader("Location", request.Url.GetLeftPart(UriPartial.Authority) + urlSuffix);             //}             foreach (string each in response.Headers)                 if (each != "Location" && !WebHeaderCollection.IsRestricted(each))                     context.Response.AddHeader(each, response.Headers.Get(each));                  CopyStream(response.GetResponseStream(), context.Response.OutputStream);             response.Close();             context.Response.End();         }              static public void CopyStream(Stream input, Stream output)         {             var buffer = new byte[1024];             int bytes;             while ((bytes = input.Read(buffer, 0, 1024)) > 0)                 output.Write(buffer, 0, bytes);         }              public bool IsReusable         {             get { return false; }         }     }


title: How to add updated tiles to ArcGIS mosaic

text: I have several hundred aerial imagery raster tiles (in ecw format) that I have loaded into a mosaic dataset. I would now like to 'replace' or 'overlay' an older aerial imagery layer with this dataset. Ideally I would like to merge them into one mosaic to save space and make it easier to manage. However it is not a simple case of removing the old tiles by identifying which ones have updates (e.g SP21NE with new SP21NE) as the old aerial imagery layer has been stored as one large .ecw file and not as individual tiles in a mosaic dataset. Could anyone suggest a work around please? Would it be best to use the updated imagery to 'clip' the old one and then merge them together in the mosaic dataset?


title: Automated search of misplaced points with Python or Model Builder

text: I am using ArcGIS 10.2.2. My work is to find points which are misplaced. I want to know if there's a way to automate this using Python or Model Builder? I wish to place this in the attribute table which will output a '1' if there's a misplacement of a point in a field. ![enter image description here](http://i.stack.imgur.com/yyy9j.png) ![enter image description here](http://i.stack.imgur.com/9Q67n.png)


title: How to get an elevation profile for a gps track?

text: I'd like to get a reasonably accurate elevation profile for a track recorded with a GPS (which often has very unreliable altitude data and occasionally none at all, depending on the model.) Does anyone have any hints on the easiest way to do this. The two techniques I am considering so far are:   * Using the Google Elevation API This API is relatively easy to use, but still requires a few steps that aren't trivial due to it's usage restrictions: max 512 samples returned per request, and the number of points along the path is limited (by URL length) as well. I expect a gpsbabel simplify filter can be concocted to reduce the track to a suitable number of points (no point in them being closer than 100m or so together due to the resolution of the altitude data), but then the problem remains of how to map this simplified track back onto the original path, since the lengths will differ. Or, if this isn't suitable for automation the best approach may be to let the user select the transect points on a map manually.   * Downloading the Shuttle Radar Topography Mission (SRTM) data and doing the query locally. This is something I have no experience with, so any suggestions on how feasible this is are welcome. How big is the data set? What GIS software is required, and can it be scripted in a suitable manner? I'd prefer not to have to write an sampling and interpolation algorithm, that sounds like a pain. What is the likely performance of such an approach? (I need it to be pretty quick and run on a memory-limited VPS webserver...) * * * Some further details to flesh out @MerseyViking's answer re downloading the data from http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp: There are 72 x 24 tiles, each about a 20mb zip file that decompresses to a 72.1mb 16bit TIF file (6001x6001 pixels). That's ~120 gb, which is more than I can store. Leaving it compressed and ignoring the oceans will reduce it to maybe 10gb, which is still a bit too large. Loading the data on-demand would dramatically reduce the needed storage space, but the source site is slow (I was only getting 10kb/s) making that pretty impractical.


title: Is the QGIS blog broken?

text: I would like to use the QGIS API in my own program to display maps .... So I thought I would find some tutorial here : http://hub.qgis.org/wiki/quantum-gis/Writing_custom_Applications_with_QGIS_API But the links are directed towards the qgis blog (http://blog.qgis.org/?q=node/10), which seems to be "down" .... Where can I find such tutorials ? Best regards.


title: How to reclassify a very large land cover dataset?

text: Consider the NLCD2001 Land Cover dataset for Alaska (download link). I need to reclassify this dataset so that only pixels of value 41, 42, and 43 are preserved; all other pixel values should become NoData (or 0, if necessary). This seems like a simple task, only requiring one call to the Reclassify tool. Unfortunately, every call results in a vague and unhelpful error message:               Executing: Reclassify "D:\ak_nlcd_2001_land_cover_3-13-08_se5.img" Value "0 40 0;41 41;42 42;43 43;44 255 0;NODATA 0" "D:\alaska_reclassified.tif" DATA      Start Time: Thu Jan 03 09:23:13 2013     ERROR 999998: Unexpected Error.     Failed to execute (Reclassify).     Failed at Thu Jan 03 09:23:13 2013 (Elapsed Time: 0.00 seconds)      How can I go about reclassifying this raster dataset? I am using ArcCatalog 10.0, Build 4000, with the Spatial Analyst extension enabled.


title: Problem with multipolygon in Leaflet

text: I'm using Leaflet L.Polygon, but for some reason there's only blank site. Here's my code:                   var map = L.map('map').setView([37.8, -96], 4);              var cloudmade = L.tileLayer('http://{s}.tile.cloudmade.com/{key}/{styleId}/256/{z}/{x}/{y}.png', {                     attribution: 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',                     key: 'BC9A493B41014CAABB98F0471D759707',                     styleId: 22677                 }).addTo(map);                 var alabama = new L.polygon([                     [-87.359296,35.00118],[-85.606675,34.984749],[-85.431413,34.124869],[-85.184951,32.859696],[-85.069935,32.580372],[-84.960397,32.421541],[-85.004212,32.322956],[-84.889196,32.262709],[-85.058981,32.13674],[-85.053504,32.01077],[-85.141136,31.840985],[-85.042551,31.539753],[-85.113751,31.27686],[-85.004212,31.003013],[-85.497137,30.997536],[-87.600282,30.997536],[-87.633143,30.86609],[-87.408589,30.674397],[-87.446927,30.510088],[-87.37025,30.427934],[-87.518128,30.280057],[-87.655051,30.247195],[-87.90699,30.411504],[-87.934375,30.657966],[-88.011052,30.685351],[-88.10416,30.499135],[-88.137022,30.318396],[-88.394438,30.367688],[-88.471115,31.895754],[-88.241084,33.796253],[-88.098683,34.891641],[-88.202745,34.995703],[-87.359296,35.00118]                 ]).addTo(map).bindPopup("Alabama");      * * * UPDATE * * * I found out what is wrong. These coordinates are in geojson format (lngs lat). But Leaflet polygon coordinates should be in lat lngs.


title: How to determine error radius of given points

text: I am running QGIS 1.8.0 on a 64-bit Windows 7 platform. Given multiple points with different (but close) coordinates, how do I automatically create a new point that programmatically takes into consideration the various coordinates and determines the error radius of said point? The points represent the same object, but the coordinates were obtained from different sources. I've used the measurement tool to document the max/min distance between the points, and drew ellipses around the group of points to visually annotate that they represent the same object, but I need to take this a stop further. The points are contained in various tables which can be joined using one of the columns if necessary. Thanks!


title: Print Map as Tiles in QGIS or using any software.?

text: i need to print a detailed map, on a street level zoom of Metro Manila. i figured to do this i need to download map tiles, but that will be a breach on map usage in OSM. then i found this website, http://metro.teczno.com/#manila, they provide pre-downloaded map extracts of certain areas, with Metro Manila being one, just what i need, now what i have to do is get a hold of some GIS application, and that will be QGIS, i've done some research and it turns out QGIS offers a plugin that prints maps, print composer to be exact, but as i continue reading, though i haven't really tried it, print composer only prints in a certain zoom level? or paper/print size?.. i need a map that is on a street level, so if im gonna use one paper, it has to be hude to accomodate the street zoom level, so im thinking if print composer provides or has a feature to cut a map on a street level zoom to multiple A4 size papers or any smaller size papers, so that i can just later on fit them all together?.


title: Problem with Extend Line tool in Arcpy

text: I have a problem with Extend Line tool in Arcpy, it cannot extend some lines, i tried to get around by erasing the edges of lines that i want to extend without failure, but despite this some fewer lines remains not extended to any feature in the same layer. an example of Extend commande `arcpy.ExtendLine_edit("Line_fc" , "", "FEATURE")` Any help or advices to solve this problem


title: How to access shapefile table in QGIS Modeler R scripts?

text: I need to develop .rsx scripts for QGIS 2.0.1 Modeler to do statistical elaborations on data tables of loaded vector layers. In this case I am not interested in accessing shapefile geometries, I'd like R to read layer table as a dataframe. Unfortunately the only way (I know) to read data from the table of a vector layer in .rsx scripts is to state:               ##vector_layer=vector      And then use the following R code               vector_df=as.data.frame(vector_later)      The OGR library used to access vector layers in R is very slow for shapefiles with many features. Is there any other method to make R read the data table of a loaded vector layer in QGIS without accessing geometries? Something like read.dbf() {foreign library} ....


title: How to make a visual realistic map containing mountain hiking trails/tracks?

text: I would like to try making a map that visually reproduces a mountain/hill and contains hiking trails, just like this one: http://i.stack.imgur.com/PdcnM.jpg I imagine some steps like this:   1. Generate a realistic 45 degrees (or so) representation of the area (from GIS) - how? :D   2. An artist (painter) draws the visual simplified representation of what you get on firsts step and then trails are added. Did anyone do maps like this and knows exactly how to make one? THanks!


title: How to Add a KML from My Google Maps to OpenLayers?

text: I would like to add this kml-link from Google Maps to an OpenLayers instance. The following code is not working:               var layer = new OpenLayers.Layer.GML("KML", "https://maps.google.de/maps/ms?authuser=0& vps=2&hl=de&ie=UTF8&msa=0&output=kml&msid=203149634091768565111.0004cf65c9b03cc8ae76c",      {     format: OpenLayers.Format.KML,     formatOptions: {     'extractStyles': true     }     });      Thanks alot for any ideas!


title: Install ArcGIS apps on my Iphone. Is there a manual or instructions for it?

text: I have install ARCGIS ESRI on my Iphone. Is there a manual or steps on how to use it ? I want to know how to use it. HELP ! Thank you.


title: Enforce inter-field dependencies during editing?

text: I'm wondering if anyone knows if you can have something a bit more intelligent than mandatory fields in attribute tables. Basically I want people to fill in a table & if they type something in Column A they HAVE to put something in Column B, but if they don't put something in Column A they don't need to put something in Column B. Don't want have to run a check & then chase people down.


title: arcpy.mapping.AddLayer invisible layer

text: I'm having a bit of a problem with a script on a particular machine. ==========================================================               import arcpy,sys               class AddLayer(object):              '''         classdocs         '''             def __init__(self,sNewHabFile,workspace):                  scriptPath = sys.path[0]             f = file(scriptPath + chr(92) +'AddLayerFile_ArcGIS_log.txt', 'w') # open for 'w'riting                  f.write("Add layer file initialised") # write text to file             f.write("\n")                  layerFile = sNewHabFile + ".lyr"             f.write(str(layerFile)) # write text to file             f.write("\n")                  mxd = arcpy.mapping.MapDocument("CURRENT")                  f.write(str(mxd.filePath)) # write text to file             f.write("\n")                  addLayer = arcpy.mapping.Layer(layerFile)                  f.write(str(addLayer.name)) # write text to file             f.write("\n")                  df = arcpy.mapping.ListDataFrames(mxd)[0]                  f.write(str(df.name)) # write text to file             f.write("\n")                  arcpy.mapping.AddLayer(df, addLayer, "TOP")                  f.write("Layer added?") # write text to file             f.write("\n")                  layer = arcpy.mapping.ListLayers(mxd)[0]                  f.write("First layer is called:" + str(layer.name)) # write text to file             f.write("\n")                  arcpy.RefreshTOC()             '''             end             '''      ============================================================ It's working fine on my machine, but testing the whole tool on another machine, AddLayer here and in another module I have written does not throw up an error, it just doesn't add the final outputs to the map. As you can see above I have writen to a text file and `layer = arcpy.mapping.ListLayers(mxd)[0]` and `f.write("First layer is called:" + str(layer.name))` are writing the correct layer to the text document, but I can't see anything in the TOC. I can manually add the created data. On my original machine, which is working I am running: ArcView single use with Spatial Analyst, 4th or 5th service pack I think. The machine that is not working is running ArcEditor concurrent with access to Spatial Analyst, this is likely to be a much earlier service pack (either none or 1 or 2). Does anyone have any ideas? Cheers


title: OpenLayers polygon fill not working with GeoJSON file as source

text: I'm trying to visualise some data in a custom shape on a map, and I'm stuck with styling it. I'm currently using the **openlayers** framework in combination with a **geoJSON** file that I generate in code. I've spent a whole day trying to get a fill or stroke on the shapes I have made,but without success. An example of my problem can be found here It would be great if anybody could spot what I am clearly doing wrong. Here's how I define a style: I want to fill the shapes with a color depending on their value. I've set their value as an attribute, as needed.               var myStyles = new OpenLayers.StyleMap({      "default": new OpenLayers.Style({                  strokeDashstyle: "dash",                 fill:true,                 fillColor: "${getColor}",                                          strokeColor: "${getColor}",                  strokeWidth: 2,                 fillOpacity: 1,                  graphicZIndex: 1              },             {                 context: {                     getColor : function (feature) {                         var value = parseFloat(feature.attributes.value)                              return value > 3100 ? '#FFFF00' :                                value > 3000 ? '#BD0026' :                                value > 2900 ? '#E31A1C' :                                value > 2800 ? '#FC4E2A' :                                               '#FFEDA0' ;                     }                 }              })        });       After defining a style, I'm adding a layer to the map that's coupled with that styleMap and my GeoJson data               //add collection of features to the map     var geojson_layer = new OpenLayers.Layer.Vector("GeoJSON", {styleMap:             myStyles,rendererOptions: {zIndexing: true}});          geojson_layer.addFeatures(geojson_format.read(collection));     map.addLayers([geojson_layer,layer]);      Although I'm a newbie in this area, I'm quite sure my geoJSON file is well- formatted. However, you can see an example of my problem at http://bitsoflove.be/clients/000_varia/maps_playground/ . If you go to the developer console then you will see this geoJSON file logged there. **I basically want to have a different fillColor for the shapes that I defined in the geoJSON file according to their value. At this moment I can't event get a regular fillColor for any of them.** Any help will be greatly appreciated. Pepijn


title: OpenLayers: How to get backgroundGraphic to go under externalGraphic

text: I've got a layer with nodes features on which I may want to display two images, a main one and a background one. This page : http://openlayers.org/dev/examples/marker-shadow.html shows what I want: the shadow is under the golden item (it's more obvious when we move the png with a dev tool). For this, they use:               // Set the external graphic and background graphic images.     externalGraphic: "../img/marker-gold.png",     backgroundGraphic: "./img/marker_shadow.png",          // Makes sure the background graphic is placed correctly relative     // to the external graphic.     backgroundXOffset: 0,     backgroundYOffset: -7,          // Set the z-indexes of both graphics to make sure the background     // graphics stay in the background (shadows on top of markers looks     // odd; let's not do that).     graphicZIndex: MARKER_Z_INDEX, //11     backgroundGraphicZIndex: SHADOW_Z_INDEX, //10      Obviously it's not about real CSS z-index since the DOM element both have a `z-index: auto` in the end. But whatever, I wanna try this myself (not at the layer construction but afterwards):               style["backgroundGraphic"] = './img/marker-shadow.png';     style["externalGraphic"] ='./img/marker-gold.png';     style['graphicZIndex'] = 1;     style['backgroundGraphicZIndex'] = style['graphicZIndex']-1;      The images are displayed. But while one could think the backgroundGraphic would automatically go under the externalGraphic, the contrary actually happens. Fine, I'll just add the z-index thing:               style['graphicZIndex'] = 1;     style['backgroundGraphicZIndex'] = style['graphicZIndex']-1;      But it changes absolutely nothing. How do I get my background underneath?


title: Prompting Dialogue Box to Have User Enter Information? Without ArcGIS Engine maybe?

text: Working with the ArcGIS family v10.1 on Windows 7. So, I have this vision for a GIS project that does the following:   1. User opens up ArcGIS Explorer (ideally) or ArcMap (still fine), or I guess even an external website (least ideal) and loads in my project file.   2. It pulls up this map I've made- let's say it's a shapefile of a city, with house/parcels linked to a database of information, like address, owner, year built, and number of windows.   3. They either click one button or hit a hotkey and up pops a dialog box where they can enter, say, 1234 main street, and click ok.   4. Then, without the user having to do anything, ArcExplorer/Map zooms to that parcel/house and also selects and displays, say, all other houses that intersect a circle with a diameter of 300 years, and outputs out a list of the houses in that selection circle. There's a lot more. but I just want to know if this is something that can be done. In the ideal it wouldn't take a ton of sophisticated coding; it doesn't really even need to be fully functional, just a proof of concept. _Edit_ While writing this I've been looking around the internet, and it seems like ArcGIS engine is something I would need? Any way the above could be done without ArcEngine? Many thanks for any help/thoughts!


title: How to use GRIB data in ArcGIS? (Zonal Stat as Table)

text: I am trying to calculate zonal stats as table with a python script for 45 .grib files from the ERA-40 Monthly Mean of Daily Mean database (http://data- portal.ecmwf.int/data/d/era40_moda/) for certain country shapefiles. I know that the data is in Kelvin rather than Celsius. But when I do it manually it's not working. I also have the same data in NetCDF format if that changes anything. But even in nc format, the zonal stats are not computing. Does anyone have any experience with using .grib and calculating zonal stats? Help please!


title: PostGIS ST_Rotate distorts polygon

text: I'm trying to rotate a box around its southwest corner using PostGIS. However, I am not getting the expected results when doing the rotation. I'm using SRID 3785. The image below shows what distortion I'm talking about. ![Map](http://i.stack.imgur.com/UrghX.png) Basically, the original is a square, but the same polygon rotated 90 degrees is distorted. Rotated by 180 is back to normal, and rotate by 270 is distorted the same way. They should all be squares. What's going on?


title: Use MS SQL Server to convert MGRS to Lat Long

text: Below is the SQL for converting Military Grid Reference System (MGRS) to decimal Latitude and Longitude. It is very accurate, but not perfect. If you can make it work 100%, it is yours, but PLEASE share the answer. We used various spreadsheets from the internet to help us get this far and thought we had it solved. It works perfectly for many MGRS coordinates, but some not. The gauntlet is thrown and we have taken it a long way. I hope one of you can see our error and get it working. Currently, we are using an open source dll for the conversion, but I really want to get it into SQL Server.               ALTER FUNCTION [dbo]. [getMGRSLat]     (     @latzone decimal(25,16),     script Date: 04/30/2012     @longzone decimal(25,16), @northing decimal(25,16), @easting decimal(25,16), @diRight decimal(25,16), @diLeft decimal(25,16)     )     RETURNS decimal (38,16)     AS     BEGIN          declare @c17 decimal(38,16), @c29 decimal(38,16), @c26 decimal (38,16) declare @latzone decimal(25,16), @longzone decimal(25,16), @northing decimal(25,16), @easting decimal(25,16), @diRight decimal(25,16), @diLeft decimal(25,16)          SET @latzone = 24     set @longzone = 42     set @northing = 56275     set @easting = 01445     set @diLeft = 19     set @diRight = 1          set @c29 =     (61+90.0*0.242541767+298.0*0.00542396+45.0*0.242541767*0.242541767-252.0*0.006739497     -3.0*0.00542396*0.00542396)*(power(-0.044123322,6.0)/720.0)     declare @c12 decimal(38,38)     set @c12 =     (l-power((1-0.081819191*0.081819191),(1.0/2.0)))/(1+power((1-0.081819191*0.081819191     ), (1.0/2.0)))     declare @cl0 decimal(38,16), @cll decimal(38,16), @c16 decimal(38,16), @c15 decimal(38,38), @c14 decimal(38,16), @c13 decimal(38,16) declare @G20 int, @g25 int SET @G20 = (2000000*cast((@latzone*40000000/360)/2000000 as integer))+((@diRight-((case when 1 + @longzone % 2 = 1 then 6 else 1 end)))*100000) set @g25 CASE WHEN @G20 > 0 then @G20 else 10000000 + @G20 end set @cl0 (@g25+@northing)/0.9996 set @cll =     @c10/(6378137*(1.0-((power(0.081819191,2.0))/4.0)-((3.0*(power(0.081819191,4.0)))/64     .0)-((5.0*(power(0.081819191,6)))/256.0)))     set @c16 =     (1097.0*power(cast((1-power((1-0.081819191*0.081819191),(1.0/2.0)))/(1+power((1-0.08     1819191*0.081819191),(1.0/2.0))) as decimal(38,38)),4.0))/512.0 set @c15 = (151. 0*power(cast((1-power((1-0. 081819191*0. 081819191) , (1.0/2.0)))/(1+power((1-0.081     819191*0.081819191),(1.0/2.0))) as decimal(38,38)),3.0))/96.0 set @c14 = ((21.0*power(@c12,2))/16.0)-((55.0*power(@c12,4.0))/32.0)     set @c13 = 3.0*@c12/2-((27*(power(@c12,3.0)))/32.0)     set @c17 =     @c11+@c13*SIN(2.0*@c11)+@c14*SIN(4.0*@c11)+@c15*SIN(6.0*@c11)+@c16*SIN(8.0*@c11)     set @c26 =     (6378137.0/(power((1-power((0.081819191*SIN(@c17)),2.0)),(1.0/2.0))))*TAN(@c17)/6347     877 . 706     declare @c24 decimal(38,16), @c27 decimal(38,16), @c28 decimal(38,16), @c22     decimal(25,18)     DECLARE @G5 INT     set @c22 =     6378137.0/(power((1-power((0.081819191*SIN(@c17)),2.0)),(1.0/2.0)))     SET @G5 = 1 + @longzone % 3     set @c24 = (500000-(100000.0*(@diLeft-(CASE WHEN @G5 = 1 THEN 16 WHEN @G5     2 THEN 0 ELSE 8 END))+@easting))/(@c22*0.9996) set @c27 = (@c24*@c24/2.0) declare @c20 decimal(38,16), @c21 decimal(38,16) set @c20 = 0.006739497*power(cos(@c17),2.0) SET @c21 = power(TAN(@c17),2.0) set @c28 =     (5+3.0*@c21+10.0*@c20-4.0*@c20*@c20-9.0*0.006739497)*(power(@c24,4.0)/24.0)     select @c29, @c12,@c22     select @G20, @g25     select @c10, @c11 ,@c16 , @c15, @c14, @c13 select @g5, @c24, @c20, @c21 select @c12, @c10, @G20, @g25          return 180*(@c17-@c26*(@c27+@c28+@c29))/PI()          END                    ALTER FUNCTION [dbo] . [getMGRSLong]     (     @latzone decimal(25,16),     script Date: 04/30/2012     @longzone decimal(25,16), @northing decimal(25,16), @easting decimal(25,16), @diRight decimal(25,16), @diLeft decimal(25,16)     )     RETURNS decimal(38,16)     AS     BEGIN          declare @c17 decimal(38,16), @c29 decimal(38,16), @c26 decimal (38,16) declare @latzone decimal(25,16), @longzone decimal(25,16), @northing decimal(25,16), @easting decimal(25,16), @diRight decimal(25,16), @diLeft decimal(25,16)          SET @latzone = 32     set @longzone = 42     set @northing = 56275     set @easting = 01445     set @diLeft = 19     set @diRight = 1          declare @c12 decimal(38,38), @c22 decimal(38,16) set @c12 = (1-power((1-0.081819191*0.081819191),(1.0/2.0)))/(1+power((1-0. 081819191*0. 081819191 ), (1.0/2.0)))          declare @g2 decimal(38,16), @h12 decimal(38,16), @k10 decimal(38,38) declare @c10 decimal(38,16), @c11 decimal(38,16), @c16 decimal (38,16), @c15 decimal(38,38), @c14 decimal(38,16), @c13 decimal(38,16) declare @G20 int, @g25 int SET @G20 = (2000000.0*cast((@latzone*40000000.0/360.0)/2000000.0 as integer))+((@diRight-((case when 1 + @longzone % 2 = 1 then 6 else 1 end)))*100000) set @g25 = CASE WHEN @G20 > 0 then @G20 else 10000000 + @G20 end set @c10 = (@g25+@northing)/0.9996 set @c11 =     @c10/(6378137.0*(1-((power(0.081819191,2.0))/4.0)-((3.0*(power(0.081819191,4.0)))/64     .0)-((5.0*(power(0.081819191,6.0)))/256.0)))     set @c16 =     (1097.0*power(cast((1-power((1-0.081819191*0.081819191),(1.0/2.0)))/(1+power((1-0.08     1819191*0.081819191),(1.0/2.0))) as decimal(38,38)),4.0))/512.0 set @c15 =     (151.0*power(cast((1-power((1-0.081819191*0.081819191),(1.0/2.0)))/(1+power((1-0.081     819191*0.081819191),(1.0/2.0))) as decimal(38,38)),3.0))/96.0 set @c14 = ((21.0*power(@c12,2.0))/16.0)-((55.0*power(@c12,4.0))/32.0)     set @c13 3.0*@c12/2.0-((27.0*(power(@c12,3.0)))/32.0)     set @c17     @c11+@c13*SIN(2.0*@c11)+@c14*SIN(4.0*@c11)+@c15*SIN(6.0*@c11)+@c16*SIN(8.0*@c11)          set @c22 = 6378137.0/power((1-power((0.081819191*SIN(@c17)),2.0)),(1.0/2.0))     declare @c20 decimal(38,16), @c21 decimal (38,16) set @c20 = 0.006739497*power(COS(@c17),2.0) SET @c21 = power(TAN(@c17),2.0) declare @g5 int, @c31 decimal(38,16),@c32 decimal(38,16),@c33 decimal(38,38), @c24 decimal (38,16) SET @G5 = 1 + @longzone % 3 set @c24 = (500000-(100000*(@diLeft-(CASE WHEN @G5 = 1 THEN 16 WHEN @G5 2 THEN 0 ELSE 8 END))+@easting))/(@c22*0.9996) set @c31 = @c24 set @c32 = (1+2*@c21+@c20)*power(@c24,3.0)/6.0     set @c33 =     (5.0-2.0*@c20+28*@c21-3.0*power(@c20,2.0)+8.0*0.006739497+24.0*power(@c21,2.0))*powe     r(@c24,5.0)/120.0     set @k10 = (@c31-@c32+@c33)/cos(@c17)     set @g2 = -183+6*@longzone     set @h12 = @k10*180.0/PI()          return @g2 - @h12     END


title: Downloading GIS layers from India-WRIS (Water Resources Information System of India)?

text: How do you download GIS layers from the India-WRIS (Water Resources Information System of India) web GIS application?


title: What does it mean if a topographic map is indicated to be "West of fifth Meridian"

text: The Natural Resources Canada topographic map A 741, 83 C/7, edition 3 has a (bilingual) indication at the bottom stating: > WEST OF FIFTH MERIDIAN       OUEST DU CINQIÈME MÉRIDIEN What does this mean? It's around 117°W, so it is indeed west of the 5th meridian, but I think something else is meant here. Does this have a specific meaning on a topographic map?


title: How to rotate external graphic using mouse in Openlayers?

text: I would like to rotate externalGraphic using mouse something like this URL. In this URL polygon is used to rotate it but I want an image to be rotated using external graphics tag. Any help is appreciated.


title: How to create Definition Query tool in ModelBuilder that uses in-line variable?

text: I'm having trouble using an in line variable derived from the Parse Path tool in ArcGIS ModelBuilder to create a definition query for a layer file. I'm importing an xyz file to a feature class, and using Parse Path to obtain %Value%. I would like to set a defintion query to something like the one shown below. I have a short Python script that was used to manually enter the def query, but would much rather use %Value% to derive it. ![enter image description here](http://i.stack.imgur.com/cTuNL.png) Thank you!


title: Input a KML file dynamically into MapServer without losing attributes?

text: Is there any possibility for MapServer (I'm running v6.2.1) to process the features / styles from a KML file dynamically? I tried STYLEITEM "AUTO" but it turned out to work only for *.dgn and *.tab files. Actually this'd be exactly the kind of feature I'm looking for tho. Alternatively i'm searching for a way to get my KML file converted to *.tab (MapInfo) in order to later auto-feed it to MapServer. I tried using ogr2ogr but this always results in losing all the attributes from the KML file, leaving only the coordinates with the geometry. Any help appreciated.


title: What are the best databases for storing spatial data? Pros and Cons

text: A couple of days ago I installed the demo of spatialware 4.9 from MapInfo into my SQL Server 2005 install and loaded all the larger dataset into it. I was quite impressed with the performance vs the old file based approach but it got me thinking what other options are out there and what are the pros and cons with them. A con I would have to say with spatialware is the fact that it is $5000 p/a and only MapInfo can read the objects from it. Which at the moment is fine because MapInfo is all we use. I'm wondering what other people have gone with and what their experiences are.


title: What are the major differences between GPS, GLONASS and Galileo?

text: What are the major differences between GPS, GLONASS, COMPASS and Galileo?


title: ESRI JavaScript API 3.8 Locator: SyntaxError {log: undefined, stack: (...), message: "Unexpected token <"}

text: I am having issues trying to set up a geocoder/locator on my server. I keep getting an error **SyntaxError {log: undefined, stack: (...), message: "Unexpected token <"}**, but I can't seem to figure out why. I tried exploring the error message, but I don't get much good information out of it. I have tried using ESRI's geocoder widget then created my own set up using the locator service. I have checked my address string, and I believe it should be passing correctly over to the server. If I am understanding the error message right, it is saying there is a token "<" somewhere that shouldn't be there, but I cannot find it. Other info... I am running version 9.3.1 for my server, using the JavaScript API 3.8 that ESRI hosts, and created an address locator on my server using street centerlines for the area I am mapping. Has anyone run into this issue before or have suggestions for me? Right now, I am just trying to center the map on the location. Once I get that done, I can worry about all the other stuff. My code for the locator is below.Here is my development site.                   /////////////////////////////////////////////////////////////////     locator = new Locator(singleFieldGeocodeURL);     //add handler for completion     locator.on("address-to-locations-complete", showResults);          //trying to find the error     locator.on("error", function (error) {         errorObject = error;         console.log("error" + error);          });               //add handler for button click     on(dom.byId('locate'), 'click', function () {              console.log(dom.byId('address').value);              map.graphics.clear();         var address = {             "SingleLine": dom.byId('address').value         };              locator.outSpatialReference = map.spatialReference;              var options = {             address: { street: address },             outFields: ["Loc_name"]              };         locator.addressToLocations(options);          });          function showResults(evt) {         console.log("in show results");         var candidate;         var symbol = new SimpleMarkerSymbol();         symbol.setStyle(SimpleMarkerSymbol.STYLE_SQUARE);         symbol.setColor(new Color([153, 0, 51, 0.75]));              var geom;         arrayUtils.event(evt.addresses, function (candidate) {             console.log(candidate.score);             if (candidate.score > 80) {                 console.log(candidate.location);                 var attributes = {                     address: candidate.address,                     score: candidate.score,                     locatorName: candidate.attributes.Loc_name                 };                 geom = candidate.location;                 var graphic = new Graphic(geom, symbol, attributes, null);                 map.graphics.add(graphic);                      return false;                  }         });              if (geom !== undefined) {             map.centerAndZoom(geom, 12);         }          }


title: Subquery a list in select layer by attribute management using python

text: I am new to python and having trouble with my script. I want only the records from the COMTRS field (of the pur_dbf_view) that match values from the ComtrsList to be selected; however, I am getting an "invalid expression" error message. I think to solve my problem, I need to write the python list (ComtrsList) to a .dbf or a file format that can be later referenced in the Select Layer by Attribute management at the end of the script. Is this right? Is my syntax for the subquery in the Select layer by Attribute statement correct?               import arcpy, sys, os, traceback          # Set workspace     arcpy.env.workspace = "H:\\GIS_AIR\\Python\\PUR_tool"          # Set variables     plss = "Plss.shp"     comm = "Communities_sub.shp" # Input Community feature class     c_layer = "Communities_layer_sub" # Name of the Make Feature Layer output for    communities     p_layer = "Plss_layer" # Name of the Make Feature Layer output     plss_out = "Output_plss.shp" # Name of PLSS (selected) output feature.  Make sure this    has the .shp extension          search_distance = '0 MILES'          pur_dbf = "Glenn_pur.dbf"     pur_dbf_view = "Glenn_pur_view.dbf"          pur_dbf_sum = "Glenn_pur_sum.dbf"          comtrs_list_dbf = "Comtrs_list.dbf"     template = "TemplateA.dbf"                    # Make feature layer for PLSS feature     arcpy.MakeFeatureLayer_management(plss, p_layer)          print "Completed make feature layer management PLSS"          # Make feature layer for Communities feature     arcpy.MakeFeatureLayer_management(comm, c_layer)     print "Completed make feature layer management Communities"          # Select features that are within 0 miles of comm fc     arcpy.SelectLayerByLocation_management(p_layer, "WITHIN_A_DISTANCE", c_layer,     search_distance, "NEW_SELECTION")          arcpy.CopyFeatures_management(p_layer, plss_out)          # Create new table with template     arcpy.CreateTable_management("H:\\GIS_AIR\\Python\\PUR_tool", comtrs_list_dbf, template)          ComtrsList = []     ComtrsCursor = arcpy.SearchCursor(plss_out)     for row in ComtrsCursor:         comtrsValue = row.getValue("CO_MTRS")         ComtrsList.append(comtrsValue)     print ComtrsList          ###Write ComtrsList to comtrs_list_dbf (.dbf)###     arcpy.MakeTableView_management(pur_dbf, pur_dbf_view)     print "Created table view"          # Select layer by attribute on the pur_dbf_view     arcpy.SelectLayerByAttribute_management(pur_dbf_view, "NEW_SELECTION", "\"COMTRS\" IN (SELECT \"COMTRS\" FROM comtrs_list_dbf)")          arcpy.Statistics_analysis(pur_dbf_view, pur_dbf_sum, [["LBS_AI", "SUM"]], "CODE")


title: XML Error with exporting table from polyline shapefile

text: I am trying to export a selection from an attribute table to an output and am enountering the following error (currently working in South America, so it's in Spanish, but it just says there is an invalid character in the text). ![enter image description here](http://i.stack.imgur.com/lQPHE.jpg) Can anyone help with this? There doesn't seem to be an invalid characters and other similar tables export well. Thanks for your help.


title: Counting animals using near infrared imagery from a drone

text: I am playing around with an idea of using a near infrared camera to fly transects to count animals on the ground. I have been involved in such work earlier, but on bigger mammals and observer based from small planes only. Does anyone know if a near infrared camera on a drone could give images which could give indications on the presence of an animal being warmer than the surrounding ground? The initial animals in question are birds (for example grouse) on the ground with late autumn temperatures (0-5 degrees centigrade). Other animals and background temperatures could be considered.


title: Tracing Boundary Around a Polygon Shapefile in QGIS

text: I'm looking to create a boundary around this shapefile of street blocks to have show the city limits in QGIS. ![enter image description here](http://i.stack.imgur.com/VARvA.png) I tried this solution, (Settings > Snapping Options and enabling the "Avoid Int." checkbox, then adding a feature to the polygon via the editor tool) but couldn't get it to work. It is supposed to snap to the outermost parts of the polygon if I interpret it correctly... Ideally, the solution would create a polygon that removes the spaces but keeps the outermost parts of the polygon. I believe there is a similar tool in ArcGIS called the Trace Tool if that helps. I'm hoping to get around tracing these by hand via the Snapping Tool. Thanks everyone, Zach


title: How to remove numeric characters from alphanumeric value in field calculation?

text: I have a field containing alphanumeric values in the following format:               A-AA00      Sometimes they are also               A-AAA0      I need a Python script I can put in the field calculator in ArcMap 10 that will at least remove the numeric characters, and retrain the alphabetical ones and the hyphen. So that, for example, this:               A-AA0      becomes this:               A-AA      I also want to replace the numeric chars with numeric chars from another field. This Stack Exchange entry addresses this issue, but the string has a space before the number and this can be used for splitting and indexing... my strings are not so handily constructed.


title: Excel object does not display more than 19 fields in ArcMap 10

text: I have an A0 map. I want to put a table underneath it. I want to insert an Excel object as the table. When I do this, the size of the table is 19 fields/columns. I cannot increase this number of columns, even though this is only half the width of an A0 portrait page. The table is only 32.1cm wide when the page is 84.1cm wide. I want it to, effectively, display 84.1cm's worth of cells, not just stretch 19 columns 84.1cm wide. I have set the printer as the A0 plotter (HP designjet HPGL/2). I selected A0 page size in the Excel object. In fact I set this as the default setting in case a non A0 default setting was causing the problem. I know that Word cannot print anything bigger than 55.7cm, but Excel is supposed to be able to print more (presently the object isn't even 55.7cm wide...). Is it correctc excel can print A0 if an A0 printer's installed? I can edit the size of the Excel Object in Arcmap, but this only makes the table bigger, not display more fields. I have also tried opening the excel object from a file rather than typing data straight in. This file contained far in excess of 19 fields, but the object only displays 19.


title: zonal histogram fails to create output table when looping

text: Using python I'm having problems when trying to attempt a FOR LOOP with the ZonalHistogram function of ArcGIS 10.1. It works fine if I use it only for one image but it gives me this error while for looping:               ExecuteError: ERROR 999999: Error executing function.     Create output table failed     Failed to execute (ZonalHistogram)      Here is my very simple script:               import arcpy     from arcpy.sa import *          arcpy.env.workspace = 'G:\\Chile_2012\\MODIS10A2.V005\\prova'          elev_ranges = 'G:\\Chile_2012\\MODIS10A2.V005\\DEM\\elev_ranges'     list = arcpy.ListRasters ()     out_dir = 'G:\\Chile_2012\\MODIS10A2.V005\\prova\\hypso\\'          arcpy.CheckOutExtension ('Spatial')          for raster in list:         ZonalHistogram (raster, 'Value', elev_ranges, out_dir+ raster+ '.dbf')


title: Change raster value for an area based on a class of another raster

text: I would like to change all raster values in raster A that fall into the locations of category/class 1 of raster B. Here, some more details. I did a calculation on a DEM resulting in different topography layers which I summed up to raster A. Now, I have a polygon map which I transferred into raster B. The class 1 of raster B should be an area that has only values of 1 in raster A. So I would like to use map algebra to change this (perhaps using a complex if() statement in GRASS GIS?) I think I could have prevented all this earlier by simply applying a mask to the raster A before the calculations. However, the calculations took quite a while (2hours) so I would not like to repeat all the steps again... any help is very much appreciated! Jens


title: Convert dijit.TitlePane to dijit.form.ToggleButton

text: I have an app that I'm building using the javascript API and have created 3 titlepanes in the header that open up to reveal information (basemap gallery, legend, layers). It functions exactly how I want it to, now I would like to make it "look pretty" by giving each pane its own image, where when you click on the image, it opens the pane in the same way. I have tried overriding the CSS however, that gives all the titlepanes the same image. It looks as though I'll need to convert the titlepanes to a togglebutton. Reading through some of the samples it looks like I'll need to add additional code beyond the html change. Is there a best way to go about this edit? **EDIT:** Here is an example of the html that creates the titlepane the "basemapGallery" div is the information inside the pane that I would like to make a drop down or any other type of button where I can control the image.


title: ArcGIS 10.2.1 is not recognising my CSV file headings

text: I can't get my maps to work because of an issue I'm having with my CSV files. I'm trying to import coordinates and heights of wind turbines, and radius for a viewshed analysis and it works on the original file but whenever I edit the file at all, such as changing the radius column figures from 30000m to 5000m and try and display my XY coordinates in the new file, ArcMap isn't recognising my columns and instead gives me the option of lots of 'fields' to use instead. It starts from 'field 7' so I've worked out that it's not recognising my text but I have no idea why, especially when I haven't changed my text from what it is in the original file which works fine! Can anyone help me out?


title: javascript/jQuery getJSON very slow with a inner loop

text: asked here too http://stackoverflow.com/q/25024466/528884 I'm using OpenLayers to render DOM for layerswitcher, with about 1200 divs. The problem can be simplified as follows. This is very fast (3 seconds or so):               var allLayers = [layerMapnik, layerCycleMap];          for(var ii = 0; ii < 1200; ++ii) {         console.log("ii = " + ii.toString());         var groupName = "wms/Transit/railroad/image/" + ii;         var layName = "CycleMap" + ii.toString();         var oneLayer = new OpenLayers.Layer.XYZ(layName, "http://whatever/tile/${z}/${y}/${x}", {visibility: false, group:groupName});         allLayers.push(oneLayer);     }          console.log("adding layers");          map.addLayers(allLayers);          $.getJSON("sampleArray.json", {}, function( doc ) {         console.log(doc.length);      });      But once the for-loop is put inside the getJson callback, it's painfully slow and freezes the browser, even when the for-loop is not reading the 'doc' at all!               var allLayers = [layerMapnik, layerCycleMap];          $.getJSON("sampleArray.json", {}, function( doc ) {         console.log(doc.length);         for(var ii = 0; ii < 1200; ++ii) {             console.log("ii = " + ii.toString());             var groupName = "wms/Transit/railroad/image/" + ii;             var layName = "CycleMap" + ii.toString();             var oneLayer = new OpenLayers.Layer.XYZ(layName, "http://whatever/tile/${z}/${y}/${x}", {visibility: false, group:groupName});             allLayers.push(oneLayer);         }         console.log("adding layers");              map.addLayers(allLayers);      });      No matter how simple the json file is sampleArray.json:               [       {         "a": 123,         "b": 456       },       {         "c": "ccc",         "d": "ddd"       }      ]      Did I use the getJSON or callback wrong? Or it is an OpenLayer thing? I also tried $.each instead of for-loop, no help.


title: How do I determine the center point of several features in OpenLayers?

text: I have several polygons being drawn on a map, usually representing a country or province or state. Depending on some chosen data, different regions may be selected, so what I was hoping is that there's a way to determine the center point between all of the features on the layer so the map can automatically be focused on the most relevant point. any help would be great. Thanks


title: QGIS loads PostGIS layers but DBManager can't connect

text: DB Manager can't connect to PostgreSQL, but "Add PostGIS Layer" can. My eventual goal is to save created layers to PostGIS. I assume I can do this using the DBManager Tool. I can alternatively use `ogr2ogr` or `shp2pgsql`, but I was hoping QGIS would make workflows between shapefiles and PostGIS a bit easier. This behavior seems odd. Why can it connect one way and not the other? ![enter image description here](http://i.stack.imgur.com/CWNrW.gif) _Side Note: Why does DBManager display my password back to me?_ I can connect easily with psql on command line ![enter image description here](http://i.stack.imgur.com/DbaQP.gif) Additional Info:   * This is a local database   * When I originally connected using 'Add PostGIS Layer', I chose _not_ to save the username and password. I am connecting using my OS user account.   * I'm running OS X 10.9.2, PostGIS 2.1, PostgreSQL 9.3.3, and QGIS 2.2.0   * PostgreSQL, PostGIS and QGIS were all installed using Homebrew. See Homebrew install info below. Homebrew info:               brew info qgis-22     qgis-22: stable 2.2.0, HEAD     http://www.qgis.org     /usr/local/Cellar/qgis-22/2.2.0 (14074 files, 493M) *       Built from source with: --with-grass, --with-api-docs, --with-postgis     From: https://github.com/dakcarto/homebrew-osgeo4mac/commits/master/Formula/qgis-22.rb     ==> Dependencies     Build: cmake ✔, bison ✔     Required: qt ✔, pyqt ✔, qscintilla2 ✔, qwt ✔, qwtpolar ✔, gsl ✔, sqlite ✔, expat ✔, proj ✔, spatialindex ✔, fcgi ✔, gdal ✔, pyspatialite ✔     Recommended: postgresql ✔, gpsbabel ✔     Optional: postgis ✔, grass ✔, qt-mysql ✘, orfeo ✘, r ✘, saga-gis ✘          brew info postgis     postgis: stable 2.1.1, HEAD     http://postgis.net     /usr/local/Cellar/postgis/2.1.1 (44 files, 8.3M) *       Built from source     From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/postgis.rb     ==> Dependencies     Build: autoconf ✔, automake ✔, libtool ✔, gpp ✔     Required: postgresql ✔, proj ✔, geos ✔, json-c ✔, gdal ✔          brew info postgresql     postgresql: stable 9.3.3 (bottled)     http://www.postgresql.org/     Conflicts with: postgres-xc     /usr/local/Cellar/postgresql/9.3.2 (2968 files, 66M)       Poured from bottle     /usr/local/Cellar/postgresql/9.3.3 (2967 files, 65M) *       Poured from bottle     From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/postgresql.rb     ==> Dependencies     Required: readline ✔     Recommended: ossp-uuid ✔


title: How to collapse folder structure into single folder using ArcGIS ModelBuilder?

text: I have a single folder, let's call it Folder1, which contains multiple folders; FolderA, FolderB, FolderC.....FolderZ. Folders A-Z each contain multiple file geodatabases. Folders A-Z do not contain any other file type or any other folders. I need to copy all of the file geodatabases which are in folders A - Z into a single folder elsewhere on my local drive. I am trying to do this in ModelBuilder as I have very little experience of python. I thought that I would be able to easily achieve this by using a model (attached image "MainModel")and a submodel ("SubModel") My main model has a folder variable set as the input parameter (this would be Folder1). This feeds into an Iterate Workspaces iterator. I have set this to only look for folders (here I want it to return FolderA, FolderB, FolderC....FolderZ). ![MainModel](http://i.stack.imgur.com/5JB4N.jpg) I use the output workspace from here to feed into my submodel as a parameter. The submodel has a folder parameter as the input (this is the "Workspace" from MainModel, in theory this should be FolderA, FolderB etc....). This then feeds into an iterate workspaces iterator and looks for FileGDB's. The "Worksapce" output then feeds into the copy tool which copies the geodatabase into a predefined folder on my local drive. ![SubModel](http://i.stack.imgur.com/LDAfG.jpg) I can run the SubModel on its own and it works fine, i.e. I can point it to Folder A and it will copy all of the file geodatabases from FolderA into another folder. The problem arises when I try and work from the MainModel. In MainModel, I can connect the "Workspace" output into the SubModel and it let's me select the "Folder" variable for this. However, the model doesn't fill with colour, and if I open the tool parameter window I see the error (attached "Error840" file). ![Error840](http://i.stack.imgur.com/xvMo1.png) I've tried changing the variables in each model to be folders or workspaces or a combination, and I've tried setting the iterators to look only for folders or only for GDB's or I've even left the "Workspace type" field blank. But nothing seems to work. The only thing I've managed to do where I've had partial success is using a single model (attached "AlternateModel"). This uses the recursive option in the iterator properties and has Folder1 as the input Folder variable parameter. ![AlternateModel](http://i.stack.imgur.com/WVsZP.jpg) This copies all the geodatabases as required from all the folder (A-Z), however, it also copies all the folders (A-Z). Is there something simple which I am missing? Or is this not possible to do?


title: How to do a raster reprojection in QGIS with custom map parameter

text: I'd need to reproject a raster dataset in a new customized projection, but I'm fairly new at both QGIS and GDAL and I'm not exactly sure about how to proceed and what the exact syntax is. The starting raster dataset is in EPSG:3035 and I'd like to reproject it in a Lambert Conic Conformal projection of which I know center latitude, center longitude, true latitude 1, true latitude 2, standard longitude and pole latitude and longitude (the latter are standard: 90 and 0 degrees). I guess that I should use "Raster"-->"Projection"-->"Reproject" under QGIS, but I'm not quite sure on how to express it in proj4 syntax. Thanks for any help!


title: How to integrate road networks into Vehicle Routing Problem with Time Windows (VRPTW) algorithms?

text: I'm trying to determine how routing software integrate road networks. Is there a best-practice (or standard) as to what part of the routing solution road networks are inserted specific to Vehicle Routing Problem with Time Windows (VRPTW)? I've considered the following methods;   1. Using the network first to determine shortest-path between each and every waypoint, and then performing VRPTW algorithms (large up-front cost as number of waypoints increase)   2. Building initial populations first, and then using the road network only when executing cost function evaluations (as in the diagram Fig 1, Page 3 of this document)    3. Executing the full VRPTW solution process and then performing shortest-path calcs only on successive waypoints defined per route sequence. (sub-optimal, road network not taken into account when evaluating route costs) Where in the **Vehicle Routing Problem (VRP)** or VRPTW solving process is the road network accounted for?


title: Geotools // buffer using different CRS

text: I'm currently having a problem with Geotools. I try to generate a buffer (in meter using Lambert 72) on a map that has WGS84 as it's coordinatesystem. (problem is a bit like this one: http://www.mail- archive.com/geotools-gt2-users@lists.sourceforge.net/msg08046.html, however I can't manage to solve my problem with it). I have a couple of points in a map (in WGS84), and I want to add buffers around it using meters. As said here ( http://docs.geotools.org/latest/userguide/library/jts/operation.html ) you should transform the Geometry into the other CRS, buffer and then go back. So what I do:               CoordinateReferenceSystem WGS = DefaultGeographicCRS.WGS84;     CoordinateReferenceSystem lambert = CRS.decode("EPSG:31300");     MathTransform convertToMeter = CRS.findMathTransform(WGS, lambert,false);     MathTransform convertFromMeter = CRS.findMathTransform(lambert, WGS,false);          //Start     targetGeometry=(Point) simpleFeature.getDefaultGeometry();     //transform to meter     targetGeometry = JTS.transform(targetGeometry, convertToMeter);     //add a buffer of 1000meters     targetGeometry= targetGeometry.buffer(1000d);     //go back to WGS 84     targetGeometry = JTS.transform(targetGeometry, convertFromMeter);      So now I expect to get a buffer of 1000meters, however what I get is a buffer of around 750meter, and I don't have any clue why. Anyone could give me some advice (or could tell me the stupid error I'm making)?


title: Selecting raster class with the highest count and attributing it to the field polygon

text: I am looking for a specific help. I have a 5m satellite image that I classified in ENVI. I brought this classified map into ArcGIS 10x as a .dat image and extracted the raster class for every pixel centre (5m) as a point shapefile. Now I want to intersect the point shapefile with a polygon shapefile: e.g. I have a 160 ac quarter section polygon and have 100's of 5 m pixels within it. My goal is to attribute the field polygon with the dominant raster class. I am thinking this is a matter of clipping the points within the field polygon, counting the number of raster classes, and selectiing the raster class with the highest count and attributing it to the field polygon. I am wondering if there is anyway to automate this in ArcGIS? Can anyone please comment what are their thoughts on how to achieve this? Please let me know. Thank you. Arun Govind


title: Why do vectors disappears when zooming in?

text: I have imported a .gpx file into qgis and separated the track waypoints using Vector > GPS > GPS tools. When viewing at full extent I can see the original track and component waypoints. However when I zoom in, the track lines disappear but the waypoints are still there. I have tried:   * checking track layer scale dependent rendering is OFF    * exporting track layer as .shp and adding to map    * moving track layer to top of layer stack    * toggling map rendering  but still cannot view track when zooming in. Any ideas?   Thanks, Tony [EDIT] I have uploaded Pic1 which shows zoomed to the layer extent ('GPX tracklog export'). Pic2 is when it has zoomed in with mouse wheel and part of the shapefile has diappeared. Note these are the gpx file tracklog exported as a shapefile. ![Pic1 - at image extent](http://i.stack.imgur.com/cXNf0.jpg) ![Pic2 - zoom in](http://i.stack.imgur.com/Qx8NL.jpg)


title: Openlayers - Get extent of WFS vector layer and zoom to that extent when map

text: I would like to do the following: 1) While loading an OpenLayers map object get the lat/long Bounding Box of a WFS vector layer served from GeoServer. 2) Use the extent from the WFS vector layer to zoom so the entire layer is viewable. This is the script I have now that uses the lat/longs from the WFS vector and then zooms. This script works fine. I have a javascript function where the map and controls are created in the onLoad of the html Body tag. At the end of the script I call the loadZoomTo() function which then calls this line of script;               function zoomOnLoad() {         this.map.setCenter(new OpenLayers.Bounds(-79.8961,41.1,-78.80809,42.2).getCenterLonLat(), 10);       }      In this script I have the lat/longs hard-coded but I need to be able to change these interactively depending on what option the user selects when he enters the application. If I remove the hard-coded lat/longs and try to replace them with something like this:               function zoomOnLoad() {     this.map.setCenter(new OpenLayers.Bounds(mLayers[a].getDataExtent()).getCenterLonLat(), 0);     }      it fails. I have also tried the event handler method as detailed here: OpenLayers, zoom to vector layer extent but all I get is the html of the page with none of the OpenLayers stuff. No map, no controls etc.. Any suggestions would be appreciated.


title: Are there open-source alternatives to ArcGIS online that can be hosted on my own server?

text: I know this might be too broad topic. But I am looking for web-GIS portal similar to ArcGIS online that is self-installable (configurable) to be hosted in my private server. The main features should include:   * Users can upload and interact with spatial data (shp, CSV, KML, JSON etc)   * Users can rate, comment and download layers submitted by others In my opinion, QGIS-server, QGIS-web-client and/or QGIS cloud could develop to be a full featured cloud service that can be deployed on any server.


title: GeoTiff convert to PNG with transparency

text: I need to convert a GeoTIFF image to PNG format with "NoData" pixels in the original image being transparent in the output. Is there any tool particularly in ArcGIS ArcToolbox or GDAL for this purpose? Thanks! Cheers, Alex


title: Where can I find non-rectified stereo satellite imagery?

text: I'm looking for free (as in _beer_ and as in commercial-use-friendly _freedom_ ) sources of stereo satellite imagery. I assume that such imagery should not be rectified since that would remove the benefits of having a stereo image pair, i.e. the geometry of the resulting images would be nearly identical. So far I found a usable IKONOS dataset from the May 2008 China earthquake from the University of Maryland's Global Land Cover Facility (GLCF). **Do you know of any other stereo _free_ satellite image sources besides GLCF?**


title: Unable to Provide Input for a MultiValue Parameter Script Tool

text: I have the following script:               #Import ArcPy site package     import arcpy     from arcpy import env     from arcpy import Raster     from arcpy.sa import ZonalStatistics     from arcpy.sa import CreateConstantRaster          # Set Environment Workspace     ws = env.workspace = "MY_WORKSPACE_PATH\\FGD.gdb"     # Set Environment Raster Cell Size     env.cellSize = 10          # Check out ArcGIS Spatial Analyst extension license     arcpy.CheckOutExtension("Spatial")          # Get Parameters as Text     rasters = arcpy.GetParameterAsText(0)     inputRasters = rasters.split(";")     inZoneData = arcpy.GetParameterAsText(1)     zoneField = arcpy.GetParameterAsText(2)          # The constant raster = 0     addedRaster = CreateConstantRaster(0)          # Process each raster string     for raster in inputRasters:         addedRaster = addedRaster + Raster(ws + "\\" + raster)          # Execute Zonal Statistics     zoneStats = ZonalStatistics(inZoneData, zoneField, addedRaster, "MAXIMUM", "DATA")          # Save the output     zoneStats.save(ws + "\\" + NewTest_12102011")      I have imported the script as a script tool in ArcMap, my parameters are in the correct order and have the correct attributes (this script works when I have, for example, just two raster inputs as parameters). The input rasters are referenced as a String (this tool will eventually be used as a Geoprocessing Task, so I cannot use rasters a input directly). The problem I have is that when I open the tool, there is no way for me to input anything into the first parameter. ![enter image description here](http://i.stack.imgur.com/0NPHi.png) _To provide some clarity:_ each value that could be entered into the parameter would be the name of a raster inside the geodatabase. For instance, say the user enters "rasterOne" and "rasterTwo". This would refer to MY_WORKSPACE_PATH\FGD.gdc\rasterOne and MY_WORKSPACE_PATH\FGD.gdc\rasterTwo, which are then cast to a Raster object with               Raster("MY_WORKSPACE_PATH\\FGD.gdc\\rasterOne")      Any suggestions would be great. Thanks.


title: How to perform multiple string transformations using one transformer in FME Workbench?

text: I am converting a .DWG file to .GDB. All fields in DWG file are of Char type. The target .GDB needs to have some attributes in Float data type. For now, I am using one StringFormatter transformer for conversion of one attribute. That is cluttering the workspace. Can we perform all Char to Float transformations using a single transformer? Thanks


title: Re-sizing Raster file pixels

text: I have 2 JP2 aerial imagery files that are incorrectly sized. They are 100x larger than the other aerial images but correctly geo-referenced (starting x, y co-ordinates). I believe the issue is their defined pixel size ( 12.5, -12.5 ) as the other aerial imagery files have pixel sizes of: ( 0.125, -0.125 ). I have opened the JP2 files up in notepad and changed these parameters but it corrupts the file or saves it as text. Dos anyone know what Raster tools in QGIS I can use to remedy this or any other techniques? Thanks for your time.


title: Georeferenced TIF files, can TFW files be created from TFWX files? - (ArcGIS 9.3)

text: I have georeferenced some image TIF files in ArcGIS 9.3. Update Georeferencing creates a *.TFWX file. Renaming to *TFW file does not place the image in the correct spatial location for software packages outside ArcGIS. Is their a tool? converter? or method that will allow me to extract the correct georeferencing information from TFWX to TFW so that my image can be used in other Mapping platforms? Hope someone can help. Many thanks


title: Unable to Import 3D Files with real-world position

text: The following link identifies a method of importing one or more 3D models into a multipatch feature class. http://resources.arcgis.com/en/help/main/10.1/index.html#//00q900000097000000 **Test Case** I have thus implemented this using arcpy in the following test case to import 2 OpenFlight files from 'D:\foo', (test1.flt and test2.flt): -               # check out 3d analyst license          # use the appropriate reference system     spacial_ref = arcpy.SpatialReference()     spacial_ref.factoryCode = 4326 # WGS84 http://spatialreference.org/ref/epsg/4326/     spacial_ref.create()          # create the database     arcpy.CreateFileGDB_management("D:\\", "bar.gdb")          # create a point feature class to act as the 'in_featureClass' parameter     arcpy.CreateFeatureclass_management("D:\\bar.gdb", "qux", "POINT", spatial_reference = spacial_ref)          # Add a field in the point feature class that will contain the name of the 3d file     arcpy.AddField_management("D:\\bar.gdb\\qux", "OFNAME", "TEXT")          with arcpy.da.InsertCursor("D:\\bar.gdb\\qux",("OFNAME", "SHAPE@XY")) as cursor:         cursor.insertRow(("test1.flt", (52.1, 4.0)))         cursor.insertRow(("test2.flt", (52.2, 4.1)))          # Import the files using the point feature class and specifying the symbol_field     arcpy.Import3DFiles_3d("D:\\foo", "D:\\bar.gdb\\baz", spatial_reference = spacial_ref, file_suffix = "flt", in_featureClass = "D:\\bar.gdb\\qux", symbol_field = "OFNAME")          # check in 3d analyst license      This indeed creates the bar.gdb which includes the point feature class, 'qux' and the imported openflight models, 'baz'. The confusing part, for me, is that the point feature class indeed does show the points at the correct positions, i.e. 52.1, 4.0 and 52.2, 4.1, whilst the imported models do not. They appear on top of each other at 0,0. **Why do I think what I should have done works?** The following quote from the link above states that an optional in_featureClass can be specified: - > The point features whose coordinates define the real-world position of the > input files. Each input file will be matched to its corresponding point > based on the file names stored in the Symbol Field. The Coordinate System > parameter should be defined to match the spatial reference of the points. Is this not what I have done? I have specified the **symbol_field** as specified by: - > The field in the point features containing the name of the 3D file > associated with each point. **Question** There seems to be no examples in the ArcGIS Resources section that shows these optional parameters being used and so far the code I have written above does not place the input files at their correct, 'real-world' position. Does anyone have any working example of this or could provide some insight as to why my input OpenFlight files are appearing at 0,0 instead of the points specified by the point feature class?


title: How to merge close points into polygon?

text: I have a set of coordinates (points & no overlaps) in a single table,each containing attribute number fields,like in the following image. ![enter image description here](http://i.stack.imgur.com/5r5Wy.png) I want to merge these points into smallest polygons by closest distance like red lines drawn around them,and aggregate attributes fields with them as well. How can i do it in PostGIS or Spatialite ?