title: Installation problem for pgrouting

text: When compiling pgrouting from source for Ubuntu 12.10, I got the following error message. The version of boost is 1.52, is it too new for building pgrouting?               [ 37%] Building CXX object core/src/CMakeFiles/routing.dir/boost_wrapper.o     In file included from /usr/local/include/boost/graph/adjacency_list.hpp:245:0,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/graph/detail/adjacency_list.hpp: In instantiation of ‘struct boost::detail::adj_list_any_edge_pmap::bind_<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex>, Vertex, boost::edge_weight_t>’:     /usr/local/include/boost/graph/detail/adjacency_list.hpp:2685:12:   required from ‘struct boost::detail::adj_list_choose_edge_pmap<boost::edge_weight_t, boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex>, Vertex>’     /usr/local/include/boost/graph/detail/adjacency_list.hpp:2690:14:   required from ‘struct boost::detail::adj_list_edge_property_selector::bind_<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex>, Vertex, boost::edge_weight_t>’     /usr/local/include/boost/graph/properties.hpp:208:12:   required from ‘struct boost::detail::edge_property_map<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex>, boost::edge_weight_t>’     /usr/local/include/boost/graph/properties.hpp:228:10:   required from ‘struct boost::property_map<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex>, boost::edge_weight_t>’     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:41:   required from here     /usr/local/include/boost/graph/detail/adjacency_list.hpp:2653:29: error: forming reference to void     /usr/local/include/boost/graph/detail/adjacency_list.hpp:2654:35: error: forming reference to void     /usr/local/include/boost/graph/detail/adjacency_list.hpp:2658:61: error: forming reference to void     /usr/local/include/boost/graph/detail/adjacency_list.hpp:2661:68: error: forming reference to void     /home/user/pgrouting/core/src/boost_wrapper.cpp: In function ‘int boost_dijkstra(edge_t*, unsigned int, int, int, bool, bool, path_element_t**, int*, char**)’:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: error: no matching function for call to ‘get(boost::edge_weight_t, graph_t&)’     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note: candidates are:     In file included from /usr/local/include/boost/graph/adjacency_list.hpp:36:0,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/property_map/property_map.hpp:179:19: note: template<class T> const T& get(const T*, std::ptrdiff_t)     /usr/local/include/boost/property_map/property_map.hpp:179:19: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘const T*’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/graph/breadth_first_search.hpp:26:0,                      from /usr/local/include/boost/graph/dijkstra_shortest_paths.hpp:21,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:29:     /usr/local/include/boost/graph/two_bit_color_map.hpp:67:1: note: template<class IndexMap> boost::two_bit_color_type boost::get(const boost::two_bit_color_map<IndexMap>&, typename boost::property_traits<PropMap>::key_type)     /usr/local/include/boost/graph/two_bit_color_map.hpp:67:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘const boost::two_bit_color_map<IndexMap>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/graph/adjacency_list.hpp:245:0,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/graph/detail/adjacency_list.hpp:1711:5: note: template<class Config, class Base, class Property, class Key> typename boost::property_traits<typename boost::property_map<typename Config::graph_type, Property>::const_type>::reference boost::get(Property, const boost::adj_list_helper<Config, Base>&, const Key&)     /usr/local/include/boost/graph/detail/adjacency_list.hpp:1711:5: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   candidate expects 3 arguments, 2 provided     In file included from /usr/local/include/boost/graph/adjacency_list.hpp:245:0,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/graph/detail/adjacency_list.hpp:1701:5: note: template<class Config, class Base, class Property, class Key> typename boost::property_traits<typename boost::property_map<typename Config::graph_type, Property>::type>::reference boost::get(Property, boost::adj_list_helper<Config, Base>&, const Key&)     /usr/local/include/boost/graph/detail/adjacency_list.hpp:1701:5: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   candidate expects 3 arguments, 2 provided     In file included from /usr/local/include/boost/graph/adjacency_list.hpp:245:0,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/graph/detail/adjacency_list.hpp:1690:5: note: template<class Config, class Base, class Property> typename boost::property_map<typename Config::graph_type, Property>::const_type boost::get(Property, const boost::adj_list_helper<Config, Base>&)     /usr/local/include/boost/graph/detail/adjacency_list.hpp:1690:5: note:   template argument deduction/substitution failed:     /usr/local/include/boost/graph/detail/adjacency_list.hpp:1682:5: note: template<class Config, class Base, class Property> typename boost::property_map<typename Config::graph_type, Property>::type boost::get(Property, boost::adj_list_helper<Config, Base>&)     /usr/local/include/boost/graph/detail/adjacency_list.hpp:1682:5: note:   template argument deduction/substitution failed:     /usr/local/include/boost/graph/detail/adjacency_list.hpp:345:3: note: template<class Tag, class Vertex, class EdgeVec, class Property> const typename boost::property_value<Property, Tag>::type& boost::get(Tag, const boost::detail::stored_ra_edge_iter<Vertex, EdgeVec, Property>&)     /usr/local/include/boost/graph/detail/adjacency_list.hpp:345:3: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   ‘graph_t {aka boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex>}’ is not derived from ‘const boost::detail::stored_ra_edge_iter<Vertex, EdgeVec, Property>’     In file included from /usr/local/include/boost/graph/adjacency_list.hpp:245:0,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/graph/detail/adjacency_list.hpp:337:3: note: template<class Tag, class Vertex, class Iter, class Property> const typename boost::property_value<Property, Tag>::type& boost::get(Tag, const boost::detail::stored_edge_iter<Vertex, Iter, Property>&)     /usr/local/include/boost/graph/detail/adjacency_list.hpp:337:3: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   ‘graph_t {aka boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex>}’ is not derived from ‘const boost::detail::stored_edge_iter<Vertex, Iter, Property>’     In file included from /usr/local/include/boost/graph/adjacency_list.hpp:245:0,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/graph/detail/adjacency_list.hpp:329:3: note: template<class Tag, class Vertex, class Property> const typename boost::property_value<Property, Tag>::type& boost::get(Tag, const boost::detail::stored_edge_property<Vertex, Property>&)     /usr/local/include/boost/graph/detail/adjacency_list.hpp:329:3: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   ‘graph_t {aka boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, boost::no_property, Vertex>}’ is not derived from ‘const boost::detail::stored_edge_property<Vertex, Property>’     In file included from /usr/local/include/boost/optional.hpp:15:0,                      from /usr/local/include/boost/graph/named_graph.hpp:19,                      from /usr/local/include/boost/graph/adjacency_list.hpp:45,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/optional/optional.hpp:705:1: note: template<class T> typename boost::optional::pointer_type boost::get(boost::optional<T>*)     /usr/local/include/boost/optional/optional.hpp:705:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘boost::optional<T>*’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/optional.hpp:15:0,                      from /usr/local/include/boost/graph/named_graph.hpp:19,                      from /usr/local/include/boost/graph/adjacency_list.hpp:45,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/optional/optional.hpp:697:1: note: template<class T> typename boost::optional::pointer_const_type boost::get(const boost::optional<T>*)     /usr/local/include/boost/optional/optional.hpp:697:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘const boost::optional<T>*’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/optional.hpp:15:0,                      from /usr/local/include/boost/graph/named_graph.hpp:19,                      from /usr/local/include/boost/graph/adjacency_list.hpp:45,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/optional/optional.hpp:687:1: note: template<class T> typename boost::optional::reference_type boost::get(boost::optional<T>&)     /usr/local/include/boost/optional/optional.hpp:687:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘boost::optional<T>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/optional.hpp:15:0,                      from /usr/local/include/boost/graph/named_graph.hpp:19,                      from /usr/local/include/boost/graph/adjacency_list.hpp:45,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/optional/optional.hpp:679:1: note: template<class T> typename boost::optional::reference_const_type boost::get(const boost::optional<T>&)     /usr/local/include/boost/optional/optional.hpp:679:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘const boost::optional<T>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/graph/named_graph.hpp:16:0,                      from /usr/local/include/boost/graph/adjacency_list.hpp:45,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/multi_index_container.hpp:747:1: note: template<int N, class Value, class IndexSpecifierList, class Allocator> typename boost::multi_index::nth_index<boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>, N>::type& boost::multi_index::get(boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>&)     /usr/local/include/boost/multi_index_container.hpp:747:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/graph/named_graph.hpp:16:0,                      from /usr/local/include/boost/graph/adjacency_list.hpp:45,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/multi_index_container.hpp:771:1: note: template<int N, class Value, class IndexSpecifierList, class Allocator> const typename boost::multi_index::nth_index<boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>, N>::type& boost::multi_index::get(const boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>&)     /usr/local/include/boost/multi_index_container.hpp:771:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘const boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/graph/named_graph.hpp:16:0,                      from /usr/local/include/boost/graph/adjacency_list.hpp:45,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/multi_index_container.hpp:816:1: note: template<class Tag, class Value, class IndexSpecifierList, class Allocator> typename boost::multi_index::index<boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>, Tag>::type& boost::multi_index::get(boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>&)     /usr/local/include/boost/multi_index_container.hpp:816:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/graph/named_graph.hpp:16:0,                      from /usr/local/include/boost/graph/adjacency_list.hpp:45,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/multi_index_container.hpp:836:1: note: template<class Tag, class Value, class IndexSpecifierList, class Allocator> const typename boost::multi_index::index<boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>, Tag>::type& boost::multi_index::get(const boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>&)     /usr/local/include/boost/multi_index_container.hpp:836:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘const boost::multi_index::multi_index_container<Value, IndexSpecifierList, Allocator>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/graph/adjacency_list.hpp:36:0,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/property_map/property_map.hpp:352:3: note: template<class PropertyMap, class Reference, class K> Reference boost::get(const boost::put_get_helper<Reference, PropertyMap>&, const K&)     /usr/local/include/boost/property_map/property_map.hpp:352:3: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘const boost::put_get_helper<Reference, PropertyMap>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/graph/adjacency_list.hpp:36:0,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:28:     /usr/local/include/boost/property_map/property_map.hpp:215:3: note: template<class K, class V> const typename boost::readable_property_map_archetype::reference& boost::get(const boost::readable_property_map_archetype<K, V>&, const typename boost::readable_property_map_archetype<K, V>::key_type&)     /usr/local/include/boost/property_map/property_map.hpp:215:3: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘const boost::readable_property_map_archetype<K, V>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/tuple/tuple.hpp:33:0,                      from /usr/local/include/boost/graph/graph_traits.hpp:16,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:27:     /usr/local/include/boost/tuple/detail/tuple_basic.hpp:211:1: note: template<int N, class HT, class TT> typename boost::tuples::access_traits<typename boost::tuples::element<N, boost::tuples::cons<HT, TT> >::type>::non_const_type boost::tuples::get(boost::tuples::cons<HT, TT>&)     /usr/local/include/boost/tuple/detail/tuple_basic.hpp:211:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘boost::tuples::cons<HT, TT>’ and ‘boost::edge_weight_t’     In file included from /usr/local/include/boost/tuple/tuple.hpp:33:0,                      from /usr/local/include/boost/graph/graph_traits.hpp:16,                      from /home/user/pgrouting/core/src/boost_wrapper.cpp:27:     /usr/local/include/boost/tuple/detail/tuple_basic.hpp:225:1: note: template<int N, class HT, class TT> typename boost::tuples::access_traits<typename boost::tuples::element<N, boost::tuples::cons<HT, TT> >::type>::const_type boost::tuples::get(const boost::tuples::cons<HT, TT>&)     /usr/local/include/boost/tuple/detail/tuple_basic.hpp:225:1: note:   template argument deduction/substitution failed:     /home/user/pgrouting/core/src/boost_wrapper.cpp:77:82: note:   mismatched types ‘const boost::tuples::cons<HT, TT>’ and ‘boost::edge_weight_t’     make[2]: *** [core/src/CMakeFiles/routing.dir/boost_wrapper.o] Error 1     make[1]: *** [core/src/CMakeFiles/routing.dir/all] Error 2     make: *** [all] Error 2


title: GeoJSON - Resymbolize without redownloading?

text: GeoJSON served via GeoServer to OpenLayers. Simple question - Is it possible to apply a new styleMap without redownloading the data from the server? I am currently using the following, but am redownloading.               layer.styleMap = new_style     layer.refresh({force:true})


title: How to make working with Postgis vector layers in QGIS faster?

text: I have just imported a Spatialite database into Postgresql/Postgis. The problem is: using QGIS to work with them is much slower in Postgis (spatial indexes created) than doing the same in Spatialite. Is there any way to improve Postgis layers speed in QGIS? **EDIT** : Postgis is running on an external server while Spatialite database is on my local PC. Previously, I thought QGIS would cache all my loaded layers onto local disk, I just checked and found that I was wrong - every time I pan around in QGIS, network traffic on my Postgis database increase (right now I am the only one using this experimenting server). Is there any way to make QGIS cache data locally to improve speed?


title: How to use ZonalStats plugin?

text: I am using QGIS 1.8.0 on a Windows Home Premium 7 machine. I have a single band TIFF that is 187 MB in size. My vector polygon shapefile represents a regular grid of a 147x112 36kmx36km grid cells. Both files have the same map projection parameters. I installed the NextGIS ZonalStats plugin, and tried running it. I have also tried the embedded zonal stats plugin. Finally, I have tried the following commands in the Python command window:               rasterfile = qgis.utils.iface.mapCanvas().currentLayer().source()     vectorlayer = qgis.utils.iface.mapCanvas().currentLayer()     zonalstats = qgis.analysis.QgsZonalStatistics(vectorlayer,rasterfile)     zonalstats.calculateStatistics(None)      In each case, the system fails to run to completion. Instead, I get the "Not Responding" error. Sometimes Windows will ask me to kill the program. Other times, I have to kill it in the Task Manager. Any help with this will be greatly appreciated as I am trying to move away from ArcGIS.


title: Select and copy features in ArcMap using Python add-in tool

text: I'm trying to add a tool to an add-in toobar to select features from an existing feature class and copy them across to another feature class. I need two tools, one for a point and one for a rectangle. Add-in tools only handle rectangles, so I'm trying to generate the point coordinate off the onMouseDown event and simply use the X and Y feedback I get. The problem is that I can't seem to pass these coordinates to anything usefull to extract the features. I've tried using Environment extents and then doing a simple CopyFeatures, but that's not working as it copies the entire fc and doesn't seem to honour the environment settings I set. My question is: Can I pass coordinates to the Select by Location tool somehow or is there another way of passing coordinates to something to extract by that extent? This is what I have now:               import arcpy     import pythonaddins     arcpy.overWriteOutput = True          # Replace this with the SDE layer once it's available.     global ELAtemplate, fc     ELAtemplate = r'C:\Data\nsw_map_units.shp'     fc = ""          class DefineUnitsbyPoint(object):         """Implementation for DefineUnitsbyPoint.tool (Tool)"""         def __init__(self):             self.enabled = True             self.shape = "Rectangle" # Use onMouseDown to get initial extent of the rectangle.         def onMouseDownMap(self, x, y, button, shift):             # fc can be assigned from a combo box selection in another class             global ELAtemplate, fc             if fc == "":                 pythonaddins.MessageBox('Choose a layer to select from.', 'Choose a Layer', 0)             else:                 mxd = arcpy.mapping.MapDocument("CURRENT")                 pointGeom = arcpy.PointGeometry(arcpy.Point(x,y), mxd.activeDataFrame.spatialReference)                 arcpy.SelectLayerByLocation_management(ELAtemplate, "INTERSECT", pointGeom, "", "ADD_TO_SELECTION")                 arcpy.CopyFeatures(ELAtemplate, fc)


title: Plot the Shortest Paths in a Grid without any clash at a point of time

text: The efficient algorithm needs to be done and proved for the best solution for the given problem: **User inputs:** (#) Size of the NxN Grid. (N); (#) No. of Paths: Z; (#) Source and Destination Coordinates of each of the individual Z paths. **Given:** (#) Each path comprises of the cells which are ADJACENT to each other and NOT diagonal. (#) Time taken to cross each cell is EQUAL and is an unit time. (#) Travelling starts from the respective source coordinates of each path in the grid SIMULTANEOUSLY. (#) Paths may intersect, BUT after say 'x'th unit time no two paths must intersect in one particular cell at a time. If such case arises, then one of the paths need to bypass into a new path taking alternate adjacent cell just before the clashing cell. **Output:** Z no. of paths which are SHORTEST possible without clash. ![enter image description here](http://i.stack.imgur.com/YrTEz.jpg) [Say there are two paths (Z=2), say X to Y and W to Z. While travelling, both X and W start simultaneously from their respective source coordinates, going to their respective destinations Y and Z such that they should take the SHORTEST possible path, AND after 'x'th unit time, they must not CLASH (when both the paths have traveled exactly (x-1) no. of cells and clashing into the 'x'th cell) into one single cell. If that happens, one of the path needs to be bypassed towards its destination keeping in mind without clash, shortest possible path. And this has to be implemented for Z no. of lines starting simultaneously in the grid.]


title: Raster to vector conversion

text: I have a bunch of raster maps from a general plan of a city. Examples:   * Areas reserved for federal, regional and municipal buildings   * Special land use zones   * Zoning   * Risks of occurrence of emergencies   * Power supply scheme   * Industry, energy sector and tranportation zones   * Transportation infrastructure scheme   * Water supply and sewage scheme I need to vectorize them such that I can store all elements (lines, polygons, points) of the map listed in the legend in a database like PostGIS such that I can   * find all elements of a master plan, which affect a certain region on the map (e. g. if I have a house at location X and the government wants to build a road in the same place, I want to notice it) and   * compare two versions of a master plan by running database queries. The ultimate purpose is to bring the data contained in these maps into a format that can be understood by non-technical people - inhabitants of the city so that they can express agreement or disagreement with the general plan. One obvious approach is to simply lay raster map over a vector map of the region (there is a vector map of that city in OSM) and manually transfer the lines from raster to vector form.   1. What tools (preferably open source) can I use to vectorize the maps manually and save the data in PostGIS?   2. Are there any alternatives, which are faster? Can this process be automated (fully or partially) using open source or inexpensive commercial software? **Update 18.01.2013:** FYI: I asked the copyright holder (city administration) of the maps to provide them in vector format. I'll wait for their answer and then decide on further actions. **Update 27.01.2013:** Today I made a first experiment in georeferencing for these maps. Inputs:   1. OpenStreetMap map   2. Raster map Process: You can see how I do georeferencing in this video. Results:   1. GCP points for both maps   2. Modified raster map I have following questions:   1. How many points do I need to enter in order to have good enough quality of the mapping? Are there any rules of thumb for that?   2. What can I do to improve the quality of the mapping (remove mapping defects shown below) ? **Sample mapping defect #1** ![Mapping defect #1](http://i.stack.imgur.com/F5qeJ.png) **Sample mapping defect #2** ![Mapping defect #2](http://i.stack.imgur.com/UEYhu.png)


title: Create Data Frame or Group Layer

text: I am attempting to write some Python code which creates a blank data frame or group layer which can then be populated with other layers. I'm at a loss as to how to do this since I'm somewhat new to Python coding.


title: Arctoolboxs suddenly unresponsive

text: My Arcgis Desktop 10.1 was working fine until, suddenly, I became unable to use the Arctoolbox tools :   * when I try to open them from the arctoolbox window they just do not answer,   * when I try to open them from the search tool I get a warning/error message :  ## " ## Warning ## Adding this item is not supported or the application that opens it is not found. ## OK " I've done researches on internet, but although some problems deal with arctoolbox dysfunctionalities, I found none that are quite like mine. Anybody has a suggestion or solution ? Thanks.


title: Why is an extra field necessary when creating point shapefile from csv files in Python?

text: I have a Python script that creates a point shapefile from a csv file within a Python script. This script gives me a ValueError for the longitude field (LON) if there isn't an extra nonsensical field to the right of it. Below is the error and how the csv file has been formatted to remove this error:                   lonValueIndex = valueList.index("LON")         ValueError: list.index(x): x not in list          DATE       LAT      LON          TEST     2/19/2011  34.27531  -118.21071    a     2/19/2011  34.18069  -118.34079    b     2/19/2011  34.0215   -118.21857    c      Do you see that Test field with values of a, b, and c? If I don't put a field to the right of the LON field I get the ValueError. Below is part of my script. Does anyone know why that extra field is necessary? Thank you.               import arcpy, csv     arcpy.env.overwriteOutput = True          #Set variables     arcpy.env.workspace = "C:\\GIS\\StackEx\\"     outFolder = arcpy.env.workspace     pointFC = "art2.shp"     coordSys = "C:\\Program Files\\ArcGIS\\Desktop10.0\\Coordinate Systems" + \                "\\Geographic Coordinate Systems\\World\\WGS 1984.prj"     csvFile = "C:\\GIS\\StackEx\\chicken.csv"     fieldName = "DATE1"          #Create shapefile and add field     arcpy.CreateFeatureclass_management(outFolder, pointFC, "POINT", "", "", "", coordSys)     arcpy.AddField_management(pointFC, fieldName, "TEXT","","", 10)          gpsTrack = open(csvFile, "r")          headerLine = gpsTrack.readline()     #print headerLine     #I updated valueList to remove the '\n'     valueList = headerLine.strip().split(",")     print valueList     latValueIndex = valueList.index("LAT")     lonValueIndex = valueList.index("LON")     dateValueIndex = valueList.index("DATE")          # Read each line in csv file     cursor = arcpy.InsertCursor(pointFC)     for point in gpsTrack.readlines():             segmentedPoint = point.split(",")        # Get the lat/lon values of the current reading                            latValue = segmentedPoint[latValueIndex]        lonValue = segmentedPoint[lonValueIndex]        dateValue = segmentedPoint[dateValueIndex]        vertex = arcpy.CreateObject("Point")        vertex.X = lonValue        vertex.Y = latValue        feature = cursor.newRow()        feature.shape = vertex        feature.DATE1 = dateValue        cursor.insertRow(feature)          del cursor


title: Looking for free Shapefile editors

text: I want to create and edit Shapefiles for my application, and I'm looking for a free shape (ESRI) file editor - free for creating and editing. Thanks in advance.


title: CRS problem: not recognizing the CRS of shapefiles to be the same for all

text: I'm attempting to aggregate (average) the attributes a point layer to polygon attributes (i.e. block groups and counties) via a spatial join. Both the points and polygons are in the same projection - I've tried both NAD 83 and WGS84. After filling out the "join attributes by location" pop up, I get one saying: > CRS Warning! Warning: Input layers have non-matching CRS. This may cause > unexpected results. But they DON'T have non-matching CRS'. It gets to 15% processed, and every time I get a "Crash dumped: minidump written to C:..." etc. My steps to remedy have included: rebooting my computer, resaving each shapefile with the correct CRS, and uninstalling then reinstalling QGIS. I can send screen shots/shapefiles/any more info.


title: Spatial Analyst's CostPath toolbox/function has PATHCOST of 0 when using in_memory workspace

text: I have a point feature and am interested in finding the least cost path between two points in the feature using a raster as the cost surface. I first calculate the cost distance and cost backlink via the CostDistance tool. I then use the CostPath tool to get the actual path and then look at the PATHCOST attribute for the raster cell's with value 3. What I do not understand is if I run the CostPath tool with output workspace pointed at a GDB, the PATHCOST comes out as expected. When I run the CostPath tool using `in_memory` (this is actually part of a script) as the output workspace, the PATHCOST values always come out to zero. I've debugged this until I was able to pintpoint this as culprit, happening in ArcMap as well, not just the script environment.


title: Rasterize shapefile to a new gtiff file with gdal_rasterize utility,however,I cannot open the tif file?

text: Now I'm tring to rasterize a shapefile with a utility "gdal_rasterize" and want to generate a new gtiff file,but when I open the rasterized gtiff file,it prompts "Windows Photo Viewer can't open this picture because the file appears to be damaged,corrupted,or is too large.      ......................................................................................... .........................................................................................   Command Line:   gdal_rasterize -burn 255 -burn 0 -burn 0 -ts 800 800 -l Countries02 "D:\Map Data\Countries02.shp" "D:\Result\Countries02.tif" Map Data: https://skydrive.live.com/redir?resid=7EF4FFBCD523D8E0!431&authkey=!AKiLt1a0bpOGi7w The output gdalinfo returns is as follow:   Driver: GTiff/GeoTIFF   Files: d:\Result\World.tif   Size is 800, 800   Coordinate System is `'   Origin = (-180.000000000000000,83.623596191406250)   Pixel Size = (0.450000000000000,-0.217029495239258)   Image Structure Metadata:   INTERLEAVE=PIXEL   Corner Coordinates:   Upper Left (-180.0000000, 83.6235962)   Lower Left (-180.0000000, -90.0000000)   Upper Right ( 180.0000000, 83.6235962)   Lower Right ( 180.0000000, -90.0000000)   Center ( 0.0000000, -3.1882019)   Band 1 Block=800x1 Type=Float64, ColorInterp=Gray   Minimum=0.000, Maximum=255.000, Mean=87.551, StdDev=121.080   Metadata:   STATISTICS_MAXIMUM=255   STATISTICS_MEAN=87.5514609375   STATISTICS_MINIMUM=0   STATISTICS_STDDEV=121.07999102565   Band 2 Block=800x1 Type=Float64, ColorInterp=Undefined   Minimum=0.000, Maximum=0.000, Mean=0.000, StdDev=0.000   Metadata:   STATISTICS_MAXIMUM=0   STATISTICS_MEAN=0   STATISTICS_MINIMUM=0   STATISTICS_STDDEV=0   Band 3 Block=800x1 Type=Float64, ColorInterp=Undefined   Minimum=0.000, Maximum=0.000, Mean=0.000, StdDev=0.000   Metadata:   STATISTICS_MAXIMUM=0   STATISTICS_MEAN=0   STATISTICS_MINIMUM=0   STATISTICS_STDDEV=0


title: Gdal Dataset.ReadAsArray() crashes Python

text: I am using Python 2.6.5 (32bit) with Numpy 1.3 and Gdal 1.9.1 installed on Windows 7 64bit. I am trying to read an 800 MB Imagine (.img) raster dataset into a Numpy array to do some raster algebra, but as soon as I run the following code, Python.exe crashes.               from osgeo import gdal          g = gdal.Open(r'path\to\dataset', gdal.GA_Readonly)     b = g.GetRasterBand(1)     data = b.ReadAsArray()      Python.exe crashes on the `b.ReadAsArray()` call. I did some Google searching and found articles dated from Gdal 1.6 that mentioned this issue with Windows 7 64bit, but they also mentioned that it had been fixed in the latest development versions at that time. Has anyone else had this issue? Any workarounds? **UPDATE:** I decided to debug the code in PyDev to try to determine where it is failing. From what I can tell (still not getting any error messages) it is failing on line 22 of gdal_array.py.               _mod = imp.load_module('_gdal_array', fp, pathname, description)      When I step into the line of code above, it brings me into the **init**.py module of numpy. When I reach the end of the numpy. **__ _init_ __**.py module, it steps out back to the above line of code. Then, when I hit the step into button, which should bring me to the next line within gdal_array.py, the script just terminates with no error messages or anything. **UPDATE #2:** I uninstalled GDAL 1.9.1 and installed GDAL 1.6.1 from the Python Cheeseshop and OSGeo's Windows Binaries. Still had the same issue.


title: One to Many relation in ArcGIS for Desktop?

text: I'm working on ArcMap, and I have a one to many relation between a building column and the residents in the building. The attribute table for the building has these columns: id,label,number. I have an excel sheet containing these columns: number,resident I'm trying to relate the number from building attribute table and the number in the excel sheet. How to do that?


title: Need help regarding Hard disk space for Amazon EC 2 for ArcGIS server 10.1

text: It is regarding ArcGIS Server for Amazon EC2 instance. We have ArcGIS Server 10.1 installed on AMI EC2 instance and now we are facing space problem. We have few map services around 12 to 15 map services and only 1.5 GB space remaining on C drive. I spoke my IT admin and contacted support but not get satisfactory answer. I have stored all data on D drive still wondering that few service definitions files are created on C drive. The arcgisserver folder size is 2.35 GB still it is showing that all my C drive is approximately full (Please check the screen-shots and please explain me why it’s taking the too much space.) According to research, I found following options:   1. Completely move (the arcgisfolder) to D drive   2. Increase the space of C drive ( I don’t want to restart my machine because its production machine and REST services has the ip address so If I restart the machine the IP address will change and I need to update REST url with new IP address [Which is not possible : ( ]   3. Delete all services (& recreate it on D drive, which is not possible.)   4. My IT admin has checked the all settings of C drive and we are wondering that why it’s taking too much space on Amazon instance (We do not have any cache services)   5. Going through following links https://forums.aws.amazon.com/message.jspa?messageID=288313 http://www.rdacorp.com/2011/03/how-to-increase-windows-2008-r2-ebs-volume- size/ http://stackoverflow.com/questions/5898308/how-to-safely-upgrade-an-amazon- ec2-instance-from-t1-micro-to-large I remember that in previous version i.e. version 10.0 SP3 I did not face this type of problem. Please check this and let me know suitable option so that we will do this is on Downtime. Software's : ArcGIS Server 10.1 & ArcGIS Desktop 10.1 , O.S : win 2008 R2 Any help will be highly appreciable …thanks in advance : ) ![enter image description here](http://i.stack.imgur.com/eDgez.png) ![enter image description here](http://i.stack.imgur.com/6TcD6.png) Please check the win_dart information of my machine Image 1: ![enter image description here](http://i.stack.imgur.com/BzBx0.png)


title: error in arcsde service

text: I am getting an error message when atempting to Create a connection in Arc Catalog. The message is : Failed to Connect to database SDE not Running on Server Then I Check the Service esri_sde it has not started, so when I try to start it I get the message : The ArcSde Service(esri_sde)service on Local Computer started and them stopped. i found sde_esri_sde.log file . the error messages are : IDBInitialize::Initialize Failed DB_open_instance() PCC_connect error: 2 init_DB DB_instance_open_as_dba: -51 DBMS error code: 2 Microsoft SQL Server Native Client 10.0: Login timeout expired i dont know what's wrong ... ?! please help me


title: MrSid => GeoTiff

text: I have a MrSid file that I would like to convert to a GeoTiff. Is there a way to do this on a Mac running Mountain Lion? I know it can be done on Windows and Linux using the LizardTech command line utilities.


title: PostGIS Optimization - Group spatially close entities physically on disk

text: I'm working on my first PostGIS database and was hoping to find some performance gains for live rendering. I'm rendering a map directly from a PostGIS (9.1, 2.0) db that contains an import of OSM data (using imposm3). Most importantly, my roads table is about 30GB and it's rendering a bit slower than I would like. In the future, I'll be using generalized alternatives to the fully detailed roads table at higher zoom levels, but for now I just have it rendering at reasonably low zoom levels. I've already taken note of some PostGIS-specific tuning suggestions and these have made a nice impact on performance. My question is if it would be feasible and worthwhile to reorganize how the entities in my roads table are stored on disk. For example, I would imagine that if I'm querying a neighborhood-sized area and the enclosed entities are on the same physical disk page, performance would be much better than if they were ordered based on OSM submission order (which I fear they are now). I'm wondering if there are any utilities or suggested means of reordering the entities on disk. Alternatively, would I perhaps benefit from creating new smaller tables spatially split from the larger, 30GB table? Thanks! **Edit:** Half out of stubbornness and half out of curiosity, I went ahead and ran the `CLUSTER table ON hash_index` and this ended up making my table's performance _slightly worse_. After doing quite a bit of searching and learning, I came to the realization that **the first thing one should do every single time is`EXPLAIN query`**. Ended up that there was some weirdness with the types and my queries weren't even using the index. I'm adding this mostly as a PSA to anyone who might wind up here searching for the clustering solution: **check that your indexes are correct and run`explain` to make sure they're being used**.


title: "Sequence size" doesn't match row in Python?

text: Essentially I am trying to calculate a value for a couple of fields after adding them. Below you can see how I am adding the fields and then an example on how my "for" statement is looping through the cursors to add values. I keep getting an error: "TypeError: sequence size must match size of the row" I'm not sure what to do about this. Is there a better method than to use the UpdateCursor updateRow statements?               fieldName = ["azVEqSet", "azVERis"]     try:         arcpy.AddField_management(points, fieldName[0] ,"FLOAT")         arcpy.AddField_management(points, fieldName[1] ,"FLOAT")     except:         arcpy.DeleteField_management(points, [fieldName[0], fieldName[1]])         arcpy.AddField_management(points, fieldName[0] ,"FLOAT")         arcpy.AddField_management(points, fieldName[1] ,"FLOAT")          cursor = arcpy.da.UpdateCursor(points, ["azVEqSet", "azVERis", "POINT_X", "RASTERVALU", "POINT_Y"])     for row in cursor:     ...          numberInsert = ReturnedVariable          row[0] = numberInsert          cursor.updateRow([row])


title: Displaying a multi-zoom image layer in open

text: I am displaying an image on a map in OpenLayers. The problem is: if I zoom out, the image vanishes. If I zoom in, it works as it should. How do I display an image layer in OpenLayers so that when I zoom out, the image is still there? I guarantee this is a duplicate question but I can't seem to find the answer. So, I apologize if this has been answered. Here is my code:                 var graphic = new OpenLayers.Layer.Image(                     Monocle.currentWidget.name + " Destination " + featurenum,                     "data:image/png;base64," + results,                     new OpenLayers.Bounds(Monocle.Sightline.BBOX(feature,1), Monocle.Sightline.BBOX(feature,2), Monocle.Sightline.BBOX(feature,3),Monocle.Sightline.BBOX(feature,4)),                     new OpenLayers.Size(580, 288),                     { isBaseLayer: false,                         opacity: 0.3,                         displayOutsideMaxExtent: true                     });


title: Can layers from Spatialite db be used as input for a Sextante model?

text: I'm trying to build my first models in SEXTANTE and already fail at the start. It seems not to be possible to add a vector layer which derives from a database. Orginally, the layers are from a .mdb. I also imported the layers into a spatialite database. When running the model with those layers as input, the excutions breaks with an error:               Error executing algorithm 0     Wrong value: dbname='P:/pathtodb/Grunddaten.sqlite' key='PKUID' table="monitoring_area" (Geometry) sql=      When saving the layers as shape files first and adding to the project, the model runs without a problem. Is it in general not possible to use layers from db's or do i have to do some special stuff to get the model running? Exctracting stuff into shapefiles from db's is sooo ... Thanx


title: How to dynamically slice polygons

text: My survey software doesn't supports big polygons (with more than 8000 points) and I'm trying to slice those polygons with local dynamic grids. I wrote a function but it's only returning one sliced peace of polygon. I would like to return an array of all part of those polygon I could unnest... example:               SELECT unnest(slice_polyg(geom,500,3163)) FROM polygon_table      Function:               CREATE OR REPLACE FUNCTION slice_polyg(geometry, integer, integer)     RETURNS geometry AS          'SELECT  st_intersection(g1.geom1, g2.geom2) AS geom          FROM          (SELECT $1 AS geom1) AS g1           INNER JOIN          (SELECT st_setsrid(CAST(ST_MakeBox2d(     st_setsrid(ST_Point(x,y),$3),     st_setsrid(ST_Point(x + $2 ,y +$2),$3))          as geometry),$3) as geom2          FROM       (SELECT      generate_series(floor(st_xmin($1))::int - ($2/2), ceiling(st_xmax($1))::int,$2) + ($2/2) as x,     generate_series(floor(st_ymin($1))::int - ($2/2), ceiling(st_ymax($1))::int,$2) + ($2/2) as y      FROM (SELECT $1 AS geom1) AS g1) as foo ) as g2          ON ST_Intersects(g1.geom1, g2.geom2)'          LANGUAGE sql


title: Install other python distributions on top of ARCGIS installation ? - esp. Python(x,y)

text: I'm using ArcGIS 10 and would like to use various additional libraries that are not included in the delivered version of ArcGIS (esp. numpy and matplotlib). First I tried to install them manually as described here: http://matplotlib.sourceforge.net/users/installing.html But because this seem not to work I tried various different mailing lists and forums but so far it seems that this problem cannot be solved; see also my post here: matplotlib does not work in ArcGIS 10 and Eclipse (Python) I'm wondering if it may work if I just install the distribution PYTHON(X,Y) which has all packages I need for development. (see http://www.pythonxy.com/) Does anyone have experience and knows if I can just install another distribution simply on top of the existing version installed by ArcGIS 10 without loosing my ArcGIS Python functionalities. Maybe someone did even try this and installed the PYTHON(X,Y) distribution to use with ArcGIS already? What version would be best? The newest one runs with Python 2.6.6. Thanks! Werner


title: Ubuntu Touch and QGIS?

text: I'm planning buying a tablet for running Ubuntu. There are little info on experience with Ubuntu Touch and QGIS and does it work? What I want is to run it on the tablet, drawing polygons etc on screen, but which version works best? Anyone that have good experiences? And no Windows is not an option, maybe as dualboot.


title: Couldn't create DrawBox plugin with opengeo client sdk

text: Hi,   I followed the official tutorial explaining how to create personal plugin with openGeo client sdk but unfortunately I couldn't perform that task.   In the beggining, i "copy/ past" the code as it mentioned in the tutorial but my browser told me that gxp is not defined after that i make changes as follows:               /**     *     * @require plugins/Tool.js     */          /** api: (extends)     *  plugins/Tool.js     */          Ext.namespace("gxp.plugins");     //Ext.ns("carta.plugins");          gxp.plugins.DrawBox = Ext.extend(gxp.plugins.Tool, {     ptype: "gxp_drawbox",     addActions: function(){         return gxp.plugins.DrawBox.superclass.addActions.apply(this, [{             text: "Draw box"         }]);     }     });          Ext.preg(gxp.plugins.DrawBox.prototype.ptype, gxp.plugins.DrawBox);        # Then, when I examine the code with chrome I receive this eroor :               Uncaught TypeError: Cannot read property 'prototype' of undefined ext-base.js:7     Ext.apply.extend ext-base.js:7     (anonymous function)      Do you have any hints about resolving this problem?   Thanks.


title: Sizing Leaflet Map inside bootstrap

text: I have been trying to change the height of my leaflet map to a percentage inside of bootstrap but everytime I do the map will not draw. Thus, I always have to revert to px value. I'm pretty sure its a simple setting that I'm missing since I am a CSS novice. Here is my css.               <style type="text/css">       body {         padding-top: 60px;         padding-bottom: 40px;       }       #map {         height: 75%;       }     </style>


title: mapquest geocoding - i can not get the (lon,lat) returned from the API

text: I just started using the mapQuest Geocoding API and I created a code for searching addresses. The following code alerts "OK" but I can not alert the (lat, lon) coords, even I tried with so many different ways. Can you spot what is wrong? Does this means that the coords are not actually returned? The alerts about the coords are not even alert "undifined"... Thanks the code :               function codeAddress(){         var ad = document.getElementById("address");//get input from form         $.ajax({                     type: "POST",                                     url: "http://www.mapquestapi.com/geocoding/v1/address?key=Fmjtd******&outFormat=json&inFormat=json&json={location:"+ad+",options:{maxResults:1}}",                                              success: function(response) {                         alert("OK");//alerts OK, but NONE of the followinng                         alert(response.results[0].locations[0].location.street);                         alert(response.results[0].locations[0].location.latLng.lat);                         alert(response.results[0].latLng.lat);                         alert(response.results[0].location.latLng.lat);                         alert(responce.results[0].locations[0].latLng);                              }})     }          //this is the html form         <input id="address" type="textbox">         <input type="button" value="Encode" onClick="codeAddress()">


title: How to work with Geoserver and OpenLayers?

text: I am new to Geoserver and am a bit lost at the moment. I have added shapefiles to Geoserver and created a layer containing all the shapefiles that I would like to display on my externally hosted website. When I go to `layer preview` in Geoserver it allows you to display an open layers preview in a pop up. I have copied the page source from the preview into the html of my hosted website. This seems to work fine when I open my webpage when Geoserver is running. As soon as I turn off Geoserver I can no longer view these data on my webpage. Can anyone help me?


title: How to connect to another server with ArcSDE?

text: how to connect from my server in our office to another server in another office with internet and access to their geodatabase by use of ArcSDE ? sincerely


title: How to join number of point features into attribute of nearest line segment

text: I have point shapefile with lot of attributes, that represent road accidents and line shapefile with highways. What i want is to join attribute into line shapefile with value, that represent number of accidents which happened on each road segment (line segment in shapefile). First idea was to create buffer around line segments which was used to locate accidents, but i dont know what to do next. I need this to create simple line diagram map (exactly this one http://athena.zcu.cz/kurzy/gish/000/HTML/37/Ob98.jpg) and I want to know some possibilities of cartographic visualization from these data, not only joining number of accidents, but some idea to use attributes in data too. Im talking about simple line diagram map. Thank you


title: problem reading netcdf

text: I am using qgis 2.2 (I have also tried this in qgis 2.0 and arcgis 10 with the same result) (I have some basic understanding of netcdf, but I am probably missing a lot of details...) I have manged to read in some netcdf-files and have them displayed correctly. Some other fails miserably, as the coordinate infomation is ignored and the file is displayed south- and eastwards from 0,0 ... Is this a known problem? I have been looking at the files with ncdump, but have not been able to spot any differences that should make one of them work and the other to fail. When looking at the metadata in qgis or arcgis, it is clear that a lot is missing for those files that do not display correctly. Edit: When converting the files from netcdf4 to netcdf3 they worked fine. is this a known issue in arcgis / qgis? (using arcgis 10, it seems to use gdal, but I cannot find which version, qgis 2.2 from osgeo4w using gdal 1.10) Edit2: The original files were so large it was a bit difficult to share them. Now I have made an example file that behaves the same way: http://sickel.net/div/test.nc - it is created from http://sickel.net/div/test.cdl - it should, as far as I do understand, cover an area from -160 to -15 E, 20 - 60 N ie most of US main land and neary to UK in the atlantic ocean, but it ends up from 0,0 and south and eastwards in qgis, in arcmap 10.0, it ends up as a point on -160,20 ...


title: OpenLayers.Renderer.Symbols custom named by function

text: Is there any approach to define custom OpenLayers.Renderer.symbol by a function? For example, instead of making a symbol for each 3-pointed, 4-pointed, 5-pointed etc. star               OpenLayers.Renderer.symbol.star3 = [ /* coordinates array of 3-pointed star */ ];     OpenLayers.Renderer.symbol.star4 = [ /* coordinates array of 4-pointed star */ ];     OpenLayers.Renderer.symbol.star5 = [ /* coordinates array of 5-pointed star */ ];     ...      I want to shorten the code and create a group common symbol defined by a function, like:               OpenLayers.Renderer.symbol.pointedstar(n) = function(n) { /* return array of n-pointed star */ }      and then have it in graphicName style definition:               starstyle = new OpenLayers.Style({ graphicName: "pointedstar(3)", ... });      and even make it depending on feature properties:               starStyle = new OpenLayers.Style(         { graphicName: "${numofpoints}", ...},         { context:              { "numofpoints": /* features contain a property "numberofpoints" to use */                  function(e) { return pointedstar(e.feature.attribute.numberofpoints); }              }         });


title: Programmically Populate Value List in ArcGIS Tool Interface

text: I'm just trying to set up the parameters in a tool I've built in ArcGIS. What I want to do is read in a feature class or table and get the values in a specific field called "SITE". The field contains a bunch of site names. What I want to do is read in the values of that field and populate them into the 'Value List' tool parameter property I've been looking at the tool properties and I though I can use the 'Obtained From' property, but it looks like I can only obtain field names, but not that values in the field. Is there anyway else to do this? Is there anyways to read in the values from the SITE field and populate it to a value list programmically? Thanks, Mike


title: QGIS plugin, extending plugin stub, instance has no attribute error

text: _Update_ This is not an answer to why it does not work when the method is defined inside the class, but a workaround. Simply defining the method outside, prior to, the class (something that Evil Genius touched upon) works. One just have to remove the references to 'self' in the body of the method and in the call. * * * I've developed a test plugin, following the steps in the Plugin Manager. The initial window is callable and everything is fine. Started to customize the test_plugin.py file by showing Hello World in the statusbar with               self.iface.mainWindow().statusBar().showMessage("Hello World!")      This line replaces the pass keyword in the run method. Clicking the OK button shows the message. Great! Now I've crated a method               def statusbar_msg(self, msg):         self.iface.mainWindow().statusBar().clearMessage()         self.iface.mainWindow().statusBar().showMessage(msg)      that is supposed to do the same, but via the call               self.statusbar_msg("Hello World!")      However, this results in an error.               An error has occured while executing Python code:          Traceback (most recent call last):       File "C:/.../python/plugins\test_plugin\test_plugin.py", line 153, in run         self.statusbar_msg("Hello World!!")     AttributeError: test_plugin instance has no attribute 'statusbar_msg'      (Defining the statusbar_msg method before/after the run method does not change anything) Any suggestion as to what is going on and why would be much appreciated.


title: Can r.mask be called from a batch file?

text: I am using a shell script that is called by a batch file. The shell script contains the GRASS scripts that I am using for my program. Every time I use the r.mask script, it displays the error `r.mask: command not found`. Can r.mask be called from a batch file? How can I use r.mask using a batch file and shell script?


title: ArcGIS Server proxy settings?

text: I may be facing a unique issue. My ArcGIS server is running within my company network.The server has picked up the proxy settings of the box it is running in. But to serve the printing request, the server bypasses this proxy settings and calls url(services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer) directly. As a result this request is getting blocked at the company firewalls and the request is failing. When the firewall was disabled the printing is a success. I have followed this link http://resources.arcgis.com/en/help/main/10.1/index.html#//015400000309000000 How do I route all the server requests to the Internet through my proxy server? I am running ArcGIS 10.1 Server on Windows.


title: How to use Memory layers in QGIS plugin to store results of Geoprocessing tools

text: I'm building a plugin to perform Multi Criteria Analysis (yes another one...). As part of my workflow intersecting vectorlayers is needed. I use QgsOverlayAnalyzer.intersection (a pity union is not yet supported as far as I know). Because intersection is limited to 2 layers a number of inbetween results is generated. Until now I create these inbetween results as shapefiles, add them to the TOC, use them in another intersection step and eventually remove them later. Sample code (path, intersectionlayer1 and 2 are defined)               productname= "intersection_output1" # first inbetween result          product = QFileDialog.getSaveFileName(self.pluginGui,"Save inbetween result as", path, "shapefiles (*.shp)")          QgsOverlayAnalyzer().intersection(intersectionlayer1, intersectionlayer2, product, 0)          self.iface.addVectorLayer(product, productname, 'ogr')      Not very elegant and therefore I have a few questions:   * how to bypass adding the inbetween results to the TOC (QgsMapLayerRegistry requires them isn't it) ? Just using disk as storage is an improvement.   * how to store these inbetween results in memory (Plugin) layers ? This would improve processing speed and removal of inbetween results is easy.


title: How to build ArcGIS Flex Viewer app for remote server?

text: I'm trying to help a co-worker set up an ArcFlex Viewer app using the Application Builder. I'm a bit puzzled by the settings screen: ![enter image description here](http://i.stack.imgur.com/cV1Hu.png) It's asking for a web server base folder (local path) and a web server base folder URL (web path). What should I enter for the local path if this is going to be hosted on a remote server? It's a free hosting service, so I don't really have access to the local path there other than `.../my_user_name/public_html`.


title: Extract ground elevation from a path of lat/lon

text: I have a set of Lat/Lon points and I'd like to know the actual ground elevation of these points. I have access to Global Mapper, Google Earth, AutoCAD Civil 3D. Could somebody suggest the bets way to go about doing this. I'm trying to compare the recorded elevations from a GPS model (at the ground) to actual "ground-truth" (obviouslly based on some sort of terrain set) Thanks


title: How to read the attribute values using pyQgis?

text: What is the way to get the information contained in the attribute table, say in column 2, row 2 using pyQgis?


title: Multiple response from nominatim service call (Geocoding) in openstreetMap

text: I am using OpenStreeMap with Google as layer, and for geocoding , nominatim service. Below, is my code.               $.ajax({     url: "http://nominatim.openstreetmap.org/search?q=" + address + &format=json&polygon=0&addressdetails=1",     type: 'POST',     //data: { 'htmlViewType': htmlViewType },     complete: function () { },     success: function (result) {         var obj = JSON.parse(result);         if (obj.length > 0) {             document.getElementById('LblError').innerHTML = obj[0].display_name;             var markerslonLat = new OpenLayers.LonLat(obj[0].lon, obj[0].lat).transform(WGS84, map.getProjectionObject(), 0);             map.setCenter(markerslonLat, 10);             //var icon = new OpenLayers.Icon('http://www.openlayers.org/dev/img/marker.png', size, offset);             var icon = new OpenLayers.Icon(' http://maps.google.com/mapfiles/ms/micons/blue.png', size, offset);             markers.addMarker(new OpenLayers.Marker(markerslonLat, icon));             map.addLayer(markers);         }         else {             document.getElementById('LblError').innerHTML = 'no such address.';         }     },     error: function (error) {         document.getElementById('LblError').innerHTML = error;     }     });      Now, when i pass address = "Bharuch" in above URL , it returns 2 result in array, and when address = "Surat", it returns 5. **so, my question is : which result value should i take from that array result as original Result ?** Right , now i am taking result from 0 index, but in few case it don't show my actual address. Thanks.


title: How to apply new WFS-Filter features like intersect

text: I was pleasantly surprised to find very much enlarged filter support in QGIS- Dev (1.9.0_Master). One application would be a WFS-Filter which combines $geometry and Intersect in order to load only the data from WFS which would be visible in the actual extent. Something like this: intersects( $geometry, geomFromWKT( 'LINESTRING(765145.88 6274561.22, 776031.67 6284189.52)' ) ) Found that one in http://www.3liz.com/blog/rldhont/index.php?post/2012/11/06/Spatial-operators- in-QGIS-expression But the above mentioned statement is not a valid expression in the "Expression string builder". What is the correct way to phrase it? Thanks Andy


title: Exporting climatic tabular data stored in TIF file into CSV

text: I have a TIF file containing tabular climatic data, described here, which I am trying to export to spreadsheet / CSV format: http://www.helioclim.org/linke/linke_helioserve.html In summary, it is a TIF with no header, 2160 rows by 4320 columns, where the upper left corner is 90 N, 180 W, and the lower right corner is 90S 180 E. Standard stuff. I also know that the output data is supposed to be an integer roughly between 40 and 140. All I want to do is to extract the tabular data into a spreadsheet as source data for calculation purposes (I'm well aware that the column count exceeds Excel's capabilities). It seems the TIF is used as a very efficient container of the GIS raw data. And since the TIF contains data that is already in tabular format, I thought it would be relatively easy (not the case). So far the only thing that has 'kinda' worked I have tried freeware "Grid Convert" to CSV, but it produces 3 columns of output data, the first 2 being all zeros and the third, 7 digits long, presumably 9,331,200 rows. It's still useless, but nothing else has worked. I don't have much experience working with this kind of data format, a starting heads up would be welcome :) In case it might help, this is a download link to part of the raw data, under "Linke Turbidity Factor: Monthly maps" http://www.soda- is.com/eng/services/climat_free_eng.php Anybody have any ideas how I may extract the raw data from the TIF file? Thanks in advance


title: MGRS square identifier to polygon

text: I'm looking for a function/formula/library that basically takes a MGRS square identifier such as 4QFJ16 and returns me the coordinates of the 4 corners of this polygon in some simple form such as EPSG:4326 lat/lon pair. The idea behind is that I regularly have data to display where we only know in which square it was taken (no northing/easting information). So I'd simply like to be able to display this specific polygon on a map. What I can find easily is large graticules as shapefiles, or information to convert a specific point in this square to lat/lon coordinates. But some "as simple as possible" formula would be better, since I could easily make browser calculations instead of embedding a huge amount of data (the complete graticule). Also, a formula would have the advantage to be language- agnostic, so I can use it for different use cases (realtime JS conversion JS, filling a PostGIS database, ...). I don't need a huge precision, I work with 10 or 1km MGRS squares. Hope my question is clear. Many thanks in advance.


title: How to write a QGIS regex for rounding to two places after the decimal point?

text: In QGIS field-calculator `round()` is not working in QGIS 1.8 so I try to do the following with a regex: I'd like to keep the first two places after the decimal point - where do I go wrong?               regexp_replace( tostring( "Shape_Area" / 10000 ), '(\d+\.\d{2})\d+', '\1')      ![enter image description here](http://i.stack.imgur.com/L9VeI.png)


title: Data Interoperability Extension Live connection to WFS from arc10

text: I am trying to make use of a live non-cached Data Interoperability (DI) connection to consume a WFS services served by geoserver. The data displays in arcmap fine, and using fiddler to monitor the HTTP traffic, I can see the live http requests and responses as I pan and zoom the map. However, viewing the attribute table, or other operations such as select by rectangle are not working. Looking at the requests and responses with fiddler, the problem seems to be with the format of the filter xml embedded by arc10/DI within the request. Arc/DI is embedding something like this:               <ogc:Filter>     <ogc:PropertyIsEqualTo>     <ogc:PropertyName>SomeProperty</PropertyName>     <ogc:Literal>100</Literal>     </ogc:PropertyIsEqualTo>     <ogc:/Filter>      The server is failing to parse this filter xml. When I manually edit the xml in the requests within fiddler to this (ie drop the ogc namespace)               <Filter>     <PropertyIsEqualTo>     <PropertyName>SomeProperty</PropertyName>     <Literal>100</Literal>     </PropertyIsEqualTo>     </Filter>      the server understands the request and send the feature gml back. Is this is a bug on the Arc/DI side?


title: OpenLayers - Pre cache layers on Client

text: We are using GeoServer and OpenLayers to display our data. We have a static WMS layer and several dynamic WFS layers. I want to use client side caching of the WMS layer at different pre-defined zoom levels. When I first load the map I want the layers to display. The WMS layer will be client cached but then in the background I want the WMS layer for the next ZoomIn level to cache also. Is this possible? How much should we be caching i.e. how much is too much? Also is there any point in caching dynamic WFS layers? Any help appreciated.


title: How to add individual layer of WMS group layer to ArcMap?

text: I am attempting to add a single WMS layer that is part of a WMS service group layer. I am writing code to do this using ArcObjects in C# .Net. So far I have been unsuccessful. I can either only add the whole group layer, or I can add the individual WMS sub-layer but the full group is also still added. Here is the code I have tried. I have allowed the user to select a layer from a list, and this code is trying to only add that selected layer.                   IWMSGroupLayer wmsMapLayer = new WMSMapLayerClass();         IWMSConnectionName connName = new WMSConnectionNameClass();              IPropertySet propSet = new PropertySetClass();         propSet.SetProperty("URL", "http://www.___________________?");              connName.ConnectionProperties = propSet;              IDataLayer dataLayer = (IDataLayer)wmsMapLayer;         dataLayer.Connect((IName)connName);              IWMSServiceDescription serviceDesc = wmsMapLayer.WMSServiceDescription;         IWMSLayerDescription groupDesc = serviceDesc.LayerDescription[0];              for (int i = 0; i < groupDesc.LayerDescriptionCount - 1; i++)         {             IWMSLayerDescription layerDesc = groupDesc.LayerDescription[i];                  if (layerDesc.Title == lstWMSLayers.SelectedItem.ToString())//Checking if this is the selected layer             {                 ILayer newLayer;                 IWMSLayer newWMSLayer = wmsMapLayer.CreateWMSLayer(layerDesc);                 newLayer = (ILayer)newWMSLayer;                 wmsMapLayer.InsertLayer(newLayer, 0);                      IMxDocument mxDoc = (IMxDocument)ArcMap.Application.Document;                 mxDoc.FocusMap.AddLayer((ILayer)wmsMapLayer);                 IActiveView activeView = (IActiveView)mxDoc.FocusMap;                 activeView.Refresh();             }         }      In ArcMap I get the following tree of layers   * WMS Service Group Layer      * Selected WMS Layer     * WMS Group Layer        * All the layers that are part of the service... Any suggestions?


title: ArcGIS Javascript API, help with adding marker data to infotemplate

text: I previously asked a question about adding picture markers from a list of coordinates I got that working, but now I need to apply info windows to each one and I have no clue how. The only thing I have so far is adding attributes to the graphics. How do I use these graphic.attributes and add them into a infowindow?                                       var point;                               var symbol = new PictureMarkerSymbol(                             {                                 "angle": 0,                                 "xoffset": 0,                                 "yoffset": 12,                                 "type": "esriPMS",                                 "url": displayicon,                                 "contentType": "image/png",                                 "width": 24,                                 "height": 24                             });                                  var graphic;                                  point = new esri.geometry.Point(item.lon, item.lat);                               graphic = new esri.Graphic(point, symbol);                                  graphic.attr('title', result_title);                             graphic.attr('desc', result_short_desc);                                  console.log(graphic.attributes);                              graphicsLayer.add(graphic);


title: Delineating catchments using GRASS GIS?

text: I am trying to delineate catchment using GRASS. Can anybody point me to "easy to understand" type of notes for GRASS? Will appreciate any help.


title: Using the UpdateCursor to change the values in fields added with arcpy.Addfield_management

text: I am working with some ArcGIS data and trying to add fields using AddField_management.               >>> arcpy.AddField_management("huc4","Class","TEXT")      I want to populate this new field using the UpdateCursor and two other fields that already exist.               >>> cursor = arcpy.da.UpdateCursor("huc4",["SHAPE_Area","SHAPE_Leng","Class"])     >>>      >>> for row in cursor:     ...   if row[0]/row[1] > 40000:     ...         row[2] = "Low"     ...         cursor.updateRow([row])     ...              Runtime error      Traceback (most recent call last):       File "<string>", line 4, in <module>     TypeError: sequence size must match size of the row     >>>       I don't really understand this error, but it's happened with every attempt I've made to use the UpdateCursor to populate my new fields.


title: GeoPortal Managing Tool

text: i know in this site everybody more or less have been setup a geoportal for showing their basemaps and analysis on local or net for their workers or conserned people in the net. it is obvious that in the gis platform there are lots of datas and machines for serving all requests from people. if you are alone in your work or more knowledgeable from other workers in the same place it is meant to there are lots of works to do in your professional businness if you respect your work... owing to you loving your work, doing more work sth like coding, designing or mapping, working a lot probably not bother you. but when you are sleeping at middle of the night or with your favorite friends come together with stealthy way for doing sth. , so at your special moment when comes a call about job makes you bother or it disgusts you from your work... at now for managing and controling the gis sth like only restarting services as apache, nginx or iis; your database maybe swelled; maybe image server not working bla bla bla... what tools are you advice me for controling not everything but more in gis or for gis....do you have any open source tool for this.. a program with defining database controlling size of data, service status or restarting them... thank you for your advice.... thanks.


title: In ESRI ArcMap, how do I refer to NaN or ±∞ (special floating point values) in definition queries?

text: I have by chance discovered how ESRI ArcMap displays special floating point values to the user.   * +∞ (positive infinity) is displayed as `1.#INF`   * –∞ (negative infinity) would supposedly be displayed as `-1.#INF` -- I haven't verified this one.   * NaN (not a number) is displayed as a right-aligned `<Null>` -- not to be confused with left-aligned `<Null>`, which denotes NULL (missing values): ![Screenshot of a table viewed in ArcMap that shows two distinct types of NULL](http://i.stack.imgur.com/qnoNE.png) ( _Get unique values_ in the field calculator does not list NaN at all, by the way.) But I haven't discovered how to write layer definition queries to select rows based on these special values:   * `ColumnName IS NULL` will only select regular NULL values, but non NaN.   * `ColumnName = 1.#INF` is rejected as having invalid syntax. Does anyone know how to do this? * * * **C# ArcObjects code snippet for storing a 1.#INF value to a table field (basic concept):** As requested. Since I'm no longer at work, the following is not the real code I used and I cannot test it right now, but it should produce the effect shown in the screenshot above:               ITable table = …;     int doubleFieldIndex = table.FindField(…);     IRow row = table.CreateRow();      row.Value[doubleFieldIndex] = double.PositiveInfinity;     row.Store();


title: Bitness Issue with WebADF 10 deployment

text: I am in process of migrating a WebADF 931 app to 10 and facing some challenges with depoloyment on 64 bit Server (Windows Server 2008 R2). The website works fine when deployed to 32 bit server but throws errors in 64 bit environment. I have run these scripts to make sure that server is 32 bit enabled (as per suggestion from ESRI). I am still missing some critical setting. I am looking for some feedback on what else I could try to get this going.   * cscript adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1   * %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i   * made sure that in advanced setting "Enabled 32-bit Application" property is set to true  Thanks Jay


title: Why do field values change when exporting from QGIS?

text: Today I came across a very strange behavior of QGIS. Maybe someone knows what's going on? I have a table with two fields which are defined as Double, with a Length of 20 and a Precision of 0. Some sample values:               8159080177     8159080742     8159080008     ...      The format by the way is shape. Exporting a selection of the features results in a table that has same definitions as stated above but all values for the two columns are               -2147483648       -2147483648       -2147483648       ...      I get the same values when I read the features with python using `ogr`'s `<feature>.GetFieldAsInteger('<fieldname>')`. Reading it as a string returns the correct value. What is happening here?


title: 3D Polyline by Slope on Surface

text: I wish to project (continue/extend/whatever) a polyline upslope following a specified gradient along a DEM surface. Is there any way of doing this?


title: ArcGIS ModelBuilder pass arcpy.SetParameterAsText as input to next tool

text: I am trying to build a model which uses two simple scripts, Script A and Script B. I want to use arcpy.SetParameterAsText to set an output in script A, which is then used as an input in script B. In the screenshot the output is datetime. But for some reason script B is not executing. ![enter image description here](http://i.stack.imgur.com/leMb3.jpg) EDIT: Script B will run on itws own, but it won't display the parameter passed by script A Script A ![enter image description here](http://i.stack.imgur.com/Lyu9C.jpg) Script B: ![enter image description here](http://i.stack.imgur.com/6hO4t.jpg)


title: Problem running mvn install for geoexplorer

text: What's the solution to this: http://www.paste.to/MjU5ODE= I'm getting the same error on Ubuntu 12.04. Installed with: Java 1.6.0_27 (OpenJDK), Maven 2.2.1 and Ant 1.8.2 Is the Ant version the problem since 1.8.1 is in the maven repository? How do I resolve this? Sorry I have little experience with Maven/Ant.


title: Why is OpenLayers only displaying the first features in my KML?

text: I have an OpenLayers map (that you can find here, use the blue search area) that reads in a KML string that is written from Perl using data from oracle. It reads the KML like this:               var vector_Layer = new OpenLayers.Layer.Vector("Search Results");          function GetFeaturesFromKMLString (strKML) {         var format = new OpenLayers.Format.KML({         'internalProjection': new OpenLayers.Projection("EPSG:900913"),         'extranalProjection': new OpenLayers.Projection("EPSG:4326")             });         return format.read(strKML);     };          vector_Layer.addFeatures(GetFeaturesFromKMLString('$newkml'));      The problem I've found is that not all of the features are displayed. For example If I search for Edinburgh only the first three features are displayed from a KML with 11 features. The KML produced where you search for Edinburgh is like this:               <?xml version="1.0" encoding="utf-8" ?><kml xmlns="http://www.opengis.net/kml/2.2"><Document><Folder><name>scotland_one_inch_1st</name><Schema name="scotland_one_inch_1st" id="scotland_one_inch_1st"><SimpleField name="Name" type="string"></SimpleField><SimpleField name="Description" type="string"></SimpleField><SimpleField name="SHEET" type="string"></SimpleField></Schema><Placemark><name>COLLINS, Greenvile</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">The east coast of Scotland with the isles of Orkney and Shetland</SimpleData></SchemaData><Data name="ID"><value>5728</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-4.7676,60.8791 .1049,60.8791 .1049,55.4382 -4.7676,55.4382</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>VAN KEULEN, Johannes</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">Nieuwe pascaert van de oost cust van Schotlandt beginnende van Barwyck tot aen de Orcades ylanden</SimpleData></SchemaData><Data name="ID"><value>5972</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-4.1645,58.6564 -.7398,58.6564 -.7398,55.7407 -4.1645,55.7407</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>WAGHENAER, Lucas, Janszoon</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">Beschrijuinge van een deel vann Schottlandt van Bambourg tot Aberdein daer Edenberg de princepaele coepstat?</SimpleData></SchemaData><Data name="ID"><value>5847</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-3.2504,57.1679 -1.3825,57.1679 -1.3825,55.5345 -3.2504,55.5345</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>KNOX, James</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">Map of the Basin of the Firth of Forth, including the Lothians, Fife, & Kinross, with parts of the adjoining Shires</SimpleData></SchemaData><Data name="ID"><value>5464</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-4.0011,56.3508 -2.3221,56.3508 -2.3221,55.5773 -4.0011,55.5773</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>BLAEU, Joan</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">Fifae Vicecomitatus, The Sherifdome of Fyfe</SimpleData></SchemaData><Data name="ID"><value>6172</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-3.6467,56.5955 -2.4311,56.5955 -2.4311,55.9404 -3.6467,55.9404</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>MOLL, Herman</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">The Shires of Fife and Kinros by H. Moll Geographer</SimpleData></SchemaData><Data name="ID"><value>5829</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-3.7619,56.4995 -2.364,56.4995 -2.364,55.9376 -3.7619,55.9376</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>BLAEU, Joan and Cornelis</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">Lothian and Linlitquo</SimpleData></SchemaData><Data name="ID"><value>5824</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-3.737,56.143 -2.405,56.143 -2.405,55.7104 -3.737,55.7104</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>COLLINS, Greenvile</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">Edinburgh Firth</SimpleData></SchemaData><Data name="ID"><value>5974</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-3.4581,56.3983 -2.4148,56.3983 -2.4148,55.8581 -3.4581,55.8581</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>THOMSON, John</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">Northern part of Edinburgh Shire [2 separate sh.]</SimpleData></SchemaData><Data name="ID"><value>5501</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-3.7407,55.9899 -2.8252,55.9899 -2.8252,55.6441 -3.7407,55.6441</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name>ADAIR, John</name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">A map of Mid-Lothian, survey%27d by Mr J. Adair F.R.S.</SimpleData></SchemaData><Data name="ID"><value>5469</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-3.7407,55.9899 -2.8252,55.9899 -2.8252,55.6441 -3.7407,55.6441</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark><name></name><ExtendedData><SchemaData schemaUrl="scotland_one_inch_1st"><SimpleData name="SHEET">Firth of Forth - Fisherrow to Edgar</SimpleData></SchemaData><Data name="ID"><value>156</value></Data></ExtendedData><Polygon><outerBoundaryIs><LinearRing><coordinates>-3.4441,56.0993 -3.0092,56.0993 -3.0092,55.9221 -3.4441,55.9221</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark></Folder></Document></kml>      Has anyone had a problem like this before and do you know if it is an issue with the KML or with OpenLayers?


title: Why would Update (Analysis) tool from ArcGIS Desktop 10.0 create duplicate features in file geodatabase?

text: I am attempting to use the **Update (Analysis) tool** to update a right of way (ROW) polygon feature class with a roads polygon feature class. The ROW feature class completely contains the roads feature class and I want to 'etch' the roads into it so I have one feature class with different attributes in one field for the roads area vs. non-road area. The feature classes have identical fields; for my field of interest, I've given different values to the features in the roads vs. ROW classes. On my computer, this works as expected - the roads are 'etched' into the ROW with the appropriate attributes so I can distinguish roads from non-roads. However, on my colleague's computer, the update does not 'etch' the roads in...instead, where the roads are, the update creates two polygons with identical geometry - one with the road attribute and one with the non-road attribute. I haven't been able to find anyone else with this problem by googling. Has anyone else encountered this? Any idea of potential causes? Thanks!


title: PGROuting 2 : Getting nearest node to a given point (with lat - long given)

text: I have a point whose latitude and longitude (only) are known, and a table of nodes with their geom. I want to find the closest node in the table to the given point. I think I can achieve this with pgr_findNearestNodeDwithin function, but i cannot find the exact syntax of the function and the parameters it takes. Any pointers in this direction will be appreciated.


title: How to apply a Majority filter in GRASS GIS?

text: I was wondering if someone could help me write a majority filter for GRASS GIS. I have this map (see below) which I need to run a filter over to make the red areas a bit more dominant. I know I can use r.mapcalc but I'm just not sure of the formula. ![alt text](http://imgur.com/Kh6Nd.png)


title: Where can I find statistics on software development within the GIS industry?

text: I am trying to find some information, specifically poll results on platforms and languages used for GIS software solutions. I remember taking one but I cannot find the poll to see the results, it may have even been an ESRI poll for all I know. Can anybody point me to any of those results who may know where they had been squirreled away to? I suppose this is a race for the first person to suggest google.com.


title: GIS scholarship sources

text: What are good sources to find GIS scholarships?


title: Queries returning very big datasets in PostGIS

text: I have a PostGIS query that will return several million rows:               SELECT       t1.id AS id1,      t2.id AS id2,      ABS(t1.mean_h - t2.mean_h) AS h_diff,       ST_Distance(t1.the_geom, t2.the_geom) AS dist       FROM tas_ponds as t1, tas_ponds as t2      WHERE      (t1.gid > t2.gid) AND      ST_DWithin(t1.the_geom, t2.the_geom, 17000)      When run in `psql`, I get an `out of memory for query result` error. Googling suggests that this an error within psql rather than postgres/PostGIS. Would amending the query into the form `SELECT ... INTO x FROM ...` fix the problem? Are there any other recommended approaches for dealing with very large datasets?


title: Detecting invalid WKT in text column in SQL Server

text: I've got a whole load of WKT data in a SQL Server table, of which I'm trying to detect the validity. I'm currently doing a query like this:               UPDATE f SET          f."CurrentGeomValid" = geometry::STGeomFromText(f."GEOM_CURRENT",29900).STIsValid()     FROM "Feature" f      WHERE f."CurrentGeomValid" IS NULL;      (Basically updating a column with the geometry validity). I'm hitting an issue when the WKT is completely invalid, for example:               POLYGON ((0 0, 10 10, 0 0) (100 100, 200 100, 200 200, 100 200, 100 100))      The initial loop of this polygon doesn't have enough points and gets me a message like so:               Msg 6522, Level 16, State 1, Line 1     A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry":      System.FormatException: 24305: The Polygon input is not valid because the ring does not have enough distinct points. Each ring of a polygon must contain at least three distinct points.     System.FormatException:         at Microsoft.SqlServer.Types.Validator.Execute(Transition transition)        at Microsoft.SqlServer.Types.ForwardingGeoDataSink.EndFigure()        at Microsoft.SqlServer.Types.OpenGisWktReader.ParseLineStringText()        at Microsoft.SqlServer.Types.OpenGisWktReader.ParsePolygonText()        at Microsoft.SqlServer.Types.OpenGisWktReader.ParseMultiPolygonText()        at Microsoft.SqlServer.Types.OpenGisWktReader.ParseTaggedText(OpenGisType type)        at Microsoft.SqlServer.Types.OpenGisWktReader.Read(OpenGisType type, Int32 srid)        at Microsoft.SqlServer.Types.SqlGeometry.GeometryFromText(OpenGisType type, SqlChars text, Int32 srid)      The issue seems to be that the STGeomFromText function is failing to read the invalid geometry so that the STIsValid function can tell me that it's invalid! I can certainly write some .NET code with an exception handler and process my dataset row by row; I'm wondering if there is a better way of doing this in a single query? Any idea? Cheers!


title: How to make a Marker moving along the line in QGIS?

text: I have some questions about simulator moving on the QGIS map. On a vector layer, selected some points to make a polyline, and, let a Vertex Marker moving along the polyline. Now, I want to moving the marker smoothly between two points (means I need calculate points between two selected points), and, the marker's moving speed can be special, e.g: 5 km/h. Is there any way to make these functions? Thank You very much!


title: Installing PgRouting

text: I am trying to install pgRouting 2.0 on postgressql. After writing the data from the share and lib folder into C:\Program Files (x86)\PostgreSQL\9.1... I tried to create pgrouting extension on pgadmin PgSQL console by using the command "CREATE EXTENSION pgrouting". But I got the error that the library librouting.dll doesn't exist. Can anyone help me?


title: CartoCSS layer visibility

text: I am working in TileMill and I have a number of layers in two different levels of detail. I have assigned classes to the layers "highdetail" and "lowdetail", and I know how to use the zoom selector - now how can I hide all the low detail layers when zoomed in past e.g. zoom level 6? The layers are a mix of polygon/raster/line.


title: Extract single datapoint from netCDF file in R using ndcf

text: I'm trying to extract a single variable from a 3-dimensional netCDF file.               [1] "file blah.nc has 3 dimensions:"     [1] "longitude   Size: 200"     [1] "latitude   Size: 100"     [1] "time   Size: 2000"     [1] "------------------------"     [1] "file blah.nc has 1 variables:"     [1] "short temp[longitude,latitude,time]  Longname:temperature Missval:-9999"      Time's units are "days". I just want to get a single day in the middle of the dataset at `time=t1` say. The manual seems to indicate that I should `temp1 = get.var.ncdf(blah.nc, "temp", start=c(long1, lat1, t1))`, but this gets all temperatures for all longs and lats until the ends of the arrays. I don't want to read the entire variable and then extract the desired value in R, I want the ncdf library to do it. `get.var.ncdf` doesn't take a `end=c(long1+1, lat1+1, t1+1)` argument as far as I can tell? So, how can I do this using ncdf?


title: What is meaning of Emissive in ENVI?

text: When I view MOD02 data in ENVI directly with ...   File--Open image file, ENVI automatically loads data.   So what is the meaning of Emissive? ![mod02 in envi](http://i.stack.imgur.com/8u3pD.png) The description of MOD02 data can be found in MOD 02 - Level-1B Calibrated Geolocation Data Set and MODIS Data Product Non-Technical Description - MOD 02, 03.


title: Converting Raster datasets into layers using ArcPy/ModelBuilder?

text: I am new to ArcGIS and ArcPy (just started using them on Wednesday). I am using a model to create a Point Density plot from a Shape File, with the output being a Raster dataset. I want to convert the Raster dataset into a new layer and modify the properties. Is there a function that converts Raster datasets into layers, or is there another way to do it? It is clear the the model is just a starting point, and that I have to add Python code for it to do what I want it to do.


title: Generate near table for x number of neighbours using arcpy

text: There are 3 likely scenerios that I am trying to capture near distances for:   1. An interchange subway station, which has 2 or more neighboring stations. That is, the station in question connects 2 or more major routes and has 2 or more neighboring stations.   2. A terminal subway station, which has only 1 neighboring station. This is the station at the end of the line.   3. An inline subway station, which has exactly 2 neighboring stations, one of either approach. I am attempting to calculate a value one might call "average distance between neighboring stations" The `arcpy.GenerateNearTable_analysis()` can handle two options: Distance to closest feature, and Distance between all features. Does anyone have a clever method for solving for these scenarios? Note that each station is designated as "Interchange", "Terminal" or "Inline" in the attribute table under the field "StationType". ## Added: Here is some psuedo code based on @whuber's suggestion in the comments. I don't have time to figure this out just yet, so if anyone wants to take a stab at it you'll be rewarded with a checkmark! ;) I have taken a look at the NetworkX library and it seems to work as I want it to. Given the graph:               A —― B ―― C ―― D          |          E      as well as the nodes and links:               Nodes = ["A", "B", "C", "D", "E"]     Links = [("A", "B"), ("B", "C"), ("C", "D"), ("B", "E")]          def myFunction(node):         identify the links that node belongs to         count the number of links         calculate the total link lengths         divide the total link lengths by the number of links         return someValue


title: use a variable as a fixed input value for buffer in ARCgis 10.0

text: I need one help. i am using arcgis 10. I actually want to show to create a buffer of a single point. But, the radius of that buffer depends on a simple formula (say Radius = a*b*c) instead of entering directly the radius, is there are way to just enter the constants on the model builder, use the result and connect it to buffer so that we can get that answer? Thanks hope everyone understood my question.


title: OGR OVF has no identified FID column

text: I have an OVF layer defined as follows:               <OGRVRTDataSource>             <OGRVRTLayer name="UserPoint">              <SrcDataSource>ODBC:un/pw@CLO</SrcDataSource>              <SrcSQL>select PKey as FID, Feature from PointData</SrcSQL>              <GeometryField encoding="WKB" field="Feature"/>       <FID>FID</FID>             </OGRVRTLayer>     </OGRVRTDataSource>      The ODBC connection is to a SQL Express 2008 database. The PointData table is defined as follows:               CREATE TABLE [dbo].[PointData](      [PKey] [int] IDENTITY(1,1) NOT NULL,      [Feature] [geometry] NULL,      CONSTRAINT [PK_PointData] PRIMARY KEY CLUSTERED      (      [PKey] ASC     )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]     ) ON [PRIMARY]      This query               select *, Feature.STAsText() from pointdata      yields               1 0x00000000010C0000000000C062400000000000C06240 POINT (150 150)      "ogrinfo test.ovf --debug on" runs for a _very_ long time returning many lines of this sort of stuff:               ERROR 4: Update access not supported for VRT datasources.     OGR_ODBC: EstablishSession(DSN:"CLO", userid:"un", password:"pw")     ODBC: SQLConnect(CLO)     ODBC: CatalogNameL: (null)     Schema name: (null)          OGR_ODBC: Table PointData has no identified FID column.     OGR_ODBC: Table UserMapData has no identified FID column.     OGR_ODBC: Table CHECK_CONSTRAINTS has no identified FID column.      before finally saying:               OGR: OGROpen(ODBC:un/pw@CLO/02C79D10) succeeded as ODBC.     ODBC: ExecuteSQL(select PKey as FID, Feature from PointData) called.     OGR_ODBC: Table SELECT has no identified FID column.     OGR: OGROpen(test.ovf/00E17090) succeeded as VRT.     Had to open data source read-only.     INFO: Open of `test.ovf'           using driver `VRT' successful.     OGR: GetLayerCount() = 1          1: UserPoint     OGR: ReleaseDataSource(ODBC:un/pw@CLO/02C79D10) dereferenced and now destroying.     ODBC: SQLDisconnect()      GDAL version is 1.6.0. I have tried using no FID tag and using SrcLayer instead of SrcSQL. Anybody know what I could do to make it see the FID? I'm guessing it would be a lot faster if it didn't check every table in the database for an FID... Thanks in advance for your assistance.


title: Is it possible, and if so how, to effectively classify vegetation types using false near infra red imagery?

text: Background : I use near infra-red imagery to delineate wetlands and water bodies with good success. It's also obvious to distinguish between new healthy vegetation and older growth and land areas with no vegetation but i need to devide vegetation into further groups. To look at other examples, I downloaded the latest NRCAN (Natural Resources Canada) CANVEC (Canada Vector) vegetation data (polygons with attributes) and the data is incredibly detailed given the coverage (Canada) and scale (1:50000). It is my understanding the classification was done with using Landsat 7 & 8 multispectral imagery in the near infra-red spectrum. I believe this data is also continually updated as new imagery becomes available. There are at least 14 different vegetation types (screen capture with types below). How is this possible? It seems that to do my project manually would be possible but also an enormous undertaking at the detail / scale I need (approx 1:2000). **Questions:** How can I efficiently classify vegetation using custom false NIR high resolution imagery into similar categories? Is there a fairly accurate automated process or is this done visually / manually? What is a typical technique one may use to classify vegetation in this way? _CanVec Vegetation categories as classified from imagery:_ ![enter image description here](http://i.stack.imgur.com/B1IIZ.jpg) _Typical example of our custom imagery. I can delineate this area manually and perhaps work out some categories but this is only a fraction of our data and it would take VERY long time to finish the entire area._ ![enter image description here](http://i.stack.imgur.com/zZIoD.jpg)


title: Error 000204 using "Export Feature Attribute to ASCII" Tool on ArcGIS Server 10

text: I´m trying to export feature attributes to a CSV-File (on ArcGIS Server) to use them in other applications (using the "Export Feature Attribute to ASCII" Tool). While the tool is working ok in a Desktop environment the published model always fails with the following error message: ERROR 000204: Error creating input feature cursor I have no idea how to deal with that or what might be the problem. Any suggestions? Any help would be highly appreciated.