Plugin for average distance from node to polyline in QGIS?

Is there a plugin available that will calculate this? EDIT 1: The red polyline is the average distance of the point to the black polyline. The red polyline is what I want to display. Alternatively, is there something which would calculate the radius of the circle so I can use a buffer? ![enter image description here](http://i.stack.imgur.com/yHIXF.png)


Extracting data from GeoMedia *.mdf database without using GeoMedia?

Is it possible to extract data from Geomedia .mdf without Geomedia? Preferably with use of QGIS or ArcGIS for Desktop?


Installing pgRouting Ubuntu Lucid

Here are the steps i did:   1. Added ppa to repository sources   2. in synaptic marked all pgrouting for postgres 8.4   3. apply (everything was ok)   4. restarted postgres But, i just tried a simple function shortest_path and it seems to do not recognise it: > ERROR: function shortest_path(text, integer, integer, boolean, boolean) does > not exist LINE 1: SELECT * FROM shortest_path(' This is the query: > SELECT * FROM shortest_path('SELECT gid as id,source::integer as > source,target::integer as target,length::double precision as cost FROM > topologia'::text,1, 2, false, false); It should be simple... anything else that I'm missing? Cheers, Marco


Query a georss feed

I'm trying to consume a georss feed from a C# project. Can I have queries against a #georss feed? For example 'nearest item to Lon/Lat' or 'items contained in bounding box X' .? Thanks


ArcGIS Viewer for Flex widget moves inadvertently when placed in upper right

Any widget moves inadvertently to the left whenever it is placed in the upper right area of the window? http://www.fairfield-city.org/maps/gis


Get feature while editing

I have created my custom form for features editing, using `layer.setEditForm("form.ui")` and `layer.setEditFormInit("init")` properties. `init` method receives `dialog`, `layerId` and `featId` as arguments. Everything works ok, but now I need to get a geometry of a new feature before closing the form. Is there any way to do it? Feature id gets assigned to "0" and looks like doesn't exist in the features list before accepting changes.


Where is the work in the GIS/RS consulting industry?

I'm trying to get an understanding of what type of GIS/RS work organizations are most often bidding out to consultants, and why? For example, is most of the freelance work in web mapping these days because in-house programmers have not caught up with this rapidly expanding field? Maybe all the work involves niche specialty jobs, such as GIS/RS research support for temporary environmental projects because non-profit organizations do not have the expertise. Perhaps, oil and gas jobs are dominating the freelance market because of the fracking boom. **What type of GIS/RS work are private/corporate/governmental organizations most often bidding out to consultants these days, and why?**


Intersect, Union are failing on 10.1

After a huge help from Blah238. I found exactly what is the problem. I wasted few days checking our data, and trying many things. The problem that I cannot do intersection between two polylines to give a result a new polyline. It was working on 9.3. So I am not sure if it is not supposed to work , or why it is not working on 10.1 So, I modified the code to this. Now this code is generating COM exception on my machine. Blah can you please help if you can                       static void Main(string[] args)         {             //ESRI License Initializer generated code.             m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeStandard, esriLicenseProductCode.esriLicenseProductCodeAdvanced },             new esriLicenseExtensionCode[] { });                  var geom1 = "LINESTRING (2 1, 7 1)".ToGeometry();             var geom2 = "LINESTRING (3 1, 6 1)".ToGeometry();             var targetOperator = (ITopologicalOperator)geom1;             targetOperator.Simplify();                  IGeometry intersectGeometry = targetOperator.Intersect(geom2, geom2.Dimension);             Console.WriteLine(overlapped1.ToWellKnownText());                       m_AOLicenseInitializer.ShutdownApplication();              }              static IGeometry GetOverlappedGeometry(IGeometry sourceGeometry, IGeometry targetGeometry, esriGeometryDimension dimension)         {             IGeometry overlappedGeometry = null;                  IGeometry localSourceGeometry;             IGeometry localTargetGeometry;                  if (sourceGeometry.GeometryType > targetGeometry.GeometryType)             {                 localSourceGeometry = targetGeometry;                 localTargetGeometry = sourceGeometry;             }             else             {                 localSourceGeometry = sourceGeometry;                 localTargetGeometry = targetGeometry;             }                  var targetOperator = (ITopologicalOperator)localTargetGeometry;                  if (targetOperator != null)             {                 targetOperator.Simplify();                      IGeometry intersectGeometry = targetOperator.Intersect(localSourceGeometry, dimension);                      overlappedGeometry = intersectGeometry;             }                  return overlappedGeometry;         }      Please notice that the code is different that Blah code down , that I am using the dimension 1 is the intersection, and not dim0 Because I want a polyline What the problem with 10.1? Why I was able to do it on 9.3?


GIS and natural disasters - examples of geo-visualizations and geospatial analysis

I stumbled upon NY Times' web map of deaths from tornadoes in US. ![enter image description here](http://i.stack.imgur.com/1vFP4.jpg) Can you point me to some more interesting examples of geo-visualization and/or geospatial analysis of natural disasters and their consequences?


What is the best approach to interacting with map layers after a JTX Job Change event when a new MXD is loaded?

To further clarify, my question is pertaining to a WMX/JTX job activation from within ArcMap, not Workflow Manager. I have a JTXJobListener class where with a `JobChanged` method and that is successfully called. My problem is with the event order. I can do whatever I want with the map, but if that WMX/JTX job loads a MXD...I lose those changes (changes are on the original map not the new one that is loaded). I'm in need of an event that fires after the job type MXD is loaded into ArcMap. Am I missing an event that I can use? If not, what are the typical workaround(s) to this issue? Hack it using the document events??


Multivalue parameter as text in Python toolbox - reading in to imported module function

I'm building a Python toolbox with a tool which calls specific functions from a custom module. The main input parameter for this tool is a multivalue list of raster layers. In the execute block of my tool, I use parameter[2].valueAsText to read in said parameter, as normal, and then feed it into a custom module function as follows:               output          = parameters[0].valueAsText     input           = parameters[2].valueAsText     function        = parameters[1].valueAsText     functionname    = "Local" + function     option          = parameters[3].valueAsText     expression      = parameters[4].valueAsText          newGrid = getattr(localfuncs,functionname)(input,option,expression)     newGrid.save(output)      In this case, I've tested it with one custom function (corresponding to 'functionname'):               def LocalMean(input,option,expression):         import arcpy         newGrid = arcpy.sa.CellStatistics(input,"MEAN")         return newGrid      The trouble is that the 'input' (multivalue read in as text) ends up being a semicolon-delimited string of file names, and the function in the custom module can't seem to convert it back to a list of raster layers for Cell Statistics to actually process. As a result I get this **ERROR 000732** :               Script failed because:      ERROR 000732: Input Raster: Dataset Development;Vegetation;Hydrology;Elevation does not exist or is not supported at this location:       I've tried reading in 'input' with .values instead of .valueAsText, so it comes in as a list, but then I get the error that 'cannot concatenate 'str' and 'list' objects' in the getattr line. Any ideas what I can do about this?   * I know this overall structure may seem unnecessarily complicated; but it's a key part of the bigger project. I'm not attached to specifically using getattr here, but solutions which preserve the basic structure, namely calling functions from a custom module using a string of the function's name, would be ideal. Thanks a lot!


Missing multipolygon after ImpOSM import to PostGIS

I've been testing ImpOSM 2.5.0 with an extract of Washington State (in the U.S.) and am very impressed with the overall result. However, I noticed that fairly prominent lake was missing from the resulting "osm" DB, so I started to dig a bit deeper. I confirmed that the lake is present in the extract, here are it's details:                   <relation id="411923" version="13">                 <member type="way" ref="42114354" role="inner"/>                 <member type="way" ref="42114348" role="inner"/>                 <member type="way" ref="42114344" role="inner"/>                 <member type="way" ref="42114346" role="inner"/>                 <member type="way" ref="42115602" role="inner"/>                 <member type="way" ref="42117265" role="inner"/>                 <member type="way" ref="42125939" role="inner"/>                 <member type="way" ref="52374472" role="outer"/>                 <member type="way" ref="126149886" role="outer"/>                 <member type="way" ref="126149894" role="outer"/>                 <member type="way" ref="52434337" role="outer"/>                 <member type="way" ref="126263156" role="inner"/>                 <tag k="name" v="Moses Lake"/>                 <tag k="natural" v="water"/>                 <tag k="source" v="yahoo_wms"/>                 <tag k="type" v="multipolygon"/>         </relation>      I then checked the DB table definition in geometryc_columns and saw this: > osm=# select * from geometry_columns where f_table_name like '%water%'; > f_table_catalog | f_table_schema | f_table_name | f_geometry_column | > coord_dimension | srid | type   > > -----------------+----------------+-------------------------+-------------------+-----------------+--------+------------ > | public | osm_new_waterways | geometry | 2 | 900913 | LINESTRING | public | > osm_new_waterareas | geometry | 2 | 900913 | GEOMETRY | public | > osm_new_waterareas_gen1 | geometry | 2 | 900913 | GEOMETRY | public | > osm_new_waterareas_gen0 | geometry | 2 | 900913 | GEOMETRY The GEOMETRY type is new to me, but I assume that it is a valid type to store polygons/multi-polygons. I followed the tutorial at http://imposm.org/docs/imposm/2.5.0/tutorial.html and had no problems with any of the steps listed there, but I'm curious if given the nature of this feature, should I have done something more to enable it to be parsed from the extract and created in the DB? Many thanks for any clues you can provide.


How to reproject this vector layer?

I have a dxf file and use this tool to convert it to shapefile. Then I apply some affine transformations and get a shapefile that does not fit the shapefiles downloaded from osm (EPSG:4326). I know that I have to reproject the shapefile using ogr2ogr (am I right?), but as I began without no clue of what was the original CRS, how can achieve the desired result of all districts in green of the picture on the right to fit as the magenta ones on the left one? Thank you in advance ! ![Cordoba province on CAD \(dxf\) at left, and shapefile after affine at right](http://i.stack.imgur.com/yJKZA.png)


Why is sum of st_length() of segments 20% too big?

I'm running a query to return the total length of some bike paths, from OpenStreetMap. Compared to the known actual length of these paths, they're all a bit too big - something like 10-30%. I know it may not be possible to down the exact reason, but any possible explanations would be greatly appreciated - I'm new to GIS and could have a basic misunderstanding. The database is PostGIS with OSM extracts loaded in using Osm2pgsql in 'slim' mode. The routes are OSM relations which osm2pgsql converts into a series of lines, for each way with the given relation. My query looks like this:               select route_name,concat(to_char(sum(st_length(way)/1000.0), 'FM99990D0'), 'km')      from planet_osm_line      where route_name like '%Rail Trail' and (tags::hstore -> 'state') is null      group by route_name      order by sum(st_length(way));       Some selected results:                             route_name              | concat      --------------------------------------+---------           Old Beechy Rail Trail                | 60.4km      Great Southern Rail Trail            | 68.5km      Ballarat-Skipton Rail Trail          | 72.2km      East Gippsland Rail Trail            | 123.4km      Murray to Mountains Rail Trail       | 142.5km      Goulburn River Country Rail Trail    | 170.4km      Actual distances are:               Old Beechy: 46km     Great Southern: 49km     Ballarat-Skipton: 56km     East Gippsland: 94km     Murray to Mountains: 116km     Goulburn River Country: 134km      What could account for this discrepancy? (If anything, I was expecting the numbers to be too low, representing missing data in OSM. But they're all too high.) EDIT Now that I actually do the calculation, it's more like 25-40% too high. Here's the osm2pgsql command:               osm2pgsql  --database gis_aus --slim --create --username ubuntu --hstore --hstore-match-only --number-processes 8 [australia-latest.osm.pbf][2]      i ## More info I just measured the distance of this dead straight, flat road: http://www.openstreetmap.org/browse/way/138890161 Google Maps says 8.144km. PostGIS/OSM/st_length says 10.126km. Pretty big discrepancy.


Choosing Metadata standard

I need help choosing the appropriate Metadata standard for a GDB for a local government. what are your recommendations and why ? what are the main differences between ISO 19139, ISO 19115 and FGDC. Thanks Geog


Data Driven Map Book Using ArcGIS

I am trying to create a Map book using ArcGIS. I am known to Data driven pages which create pages with GRID by GRID. But I want to create a Map book with the districts of Bangladesh. In every page I want to show one district. There are 64 District. Is there any way that will dynamically create the mapbook where in every page one district polygon will fit in one page while dynamically change few text field derived from data?


Exporting shapefile to PostGIS database in QGIS

How do I export a vector shapefile to PostGIS database? I am asking what format I have to export it.


how to select parts of a shape in QGIS

I have to have a Shapefile of France of the bigger regions: Ile-de-France, Bretagne, etc. and that is already included in my shape. But its only shown the Arrondissements (smaller regions) in France and their borders. How can I just show the borders of these bigger regions only? ![Here you can see the shape: Nom_CHF = Name of the smaller region, Nom_region = Name of the bigger region.](http://i.stack.imgur.com/xAmBS.jpg)


proj/pyproj converted coordinates offset

I'm using pyproj to convert some coordinates from WGS84 to OSGB36. When mapped out the converted and unconverted don't map to the same places on a map. The OSGB36 coordinates are mapped about 100 meters north west of where they ought to be. Does anyone know what might be wrong here? Here's an example of what I'm doing in code               import pyproy     wgs84=pyproj.Proj("+init=EPSG:4326")     osgb36=pyproj.Proj("+init=EPSG:27700")     row = pyproj.transform(wgs84, osgb36, lng, lat)


With Python and ArcGIS, how do I add features to a featureclass?

In ArcGIS Python code: `CopyFeatures_management` copies features to the same featureclass - that means overwrite to the feature class. How can I add new features to one featureclass or namely different featureclasses and prevent overwriting in the loop?


How to prevent base layers from being edited?

I've made a local tile server (mapnik + postgis + tilecache). Now i need to make use of some editing tool so that only newly created layer can be edited: users of this tool shouldn't have rights to edit "base" geographic layer (in order not to spoil it). **edit:** I'll try to explain my workflow better: i want to allow users create and edit some _specific_ objects on the map (parts of network infrastructure i.e. routers, optic lines and so on), but the critical feature is to prevent users from editing the geographic map. So, in short, they shoud only be able to edit the layer with our data, but not the data from openstreetmpas (i still need it for being able to update it). I'm using `JOSM` for now, but how can i disable base layer editing?


How to find the most spread out locations?

Probably a very simple question. I have a list of about a thousand potential geographical locations (lat lon), and of those I need to select the 200 locations that are "most spread out". I think that would be the 200 points with highest total average distance. Think of stores in a city. Is there a defined method to do it? Maybe in an R-package? Thanks to everyone making this the great place to learn it is! /Chris


ArcMap - Strange Behavior When Trying To Wire IActiveViewEvents in IDockableWindow

I can't seem to wire up IActiveViewEvents for an IDockableWindow. I am using a straight out-of-the-box IDockableWindow which inherits BaseCommand. The snippet below shows what I have added to the autogenerated code. Problem is, when I try to run ArcMap, it (the main ArcMap GUI) never loads. Please see attached screenshot to see what I mean.![bland arcmap gui](http://i.stack.imgur.com/RCTUT.png)                public override void OnCreate(object hook)         {             if (hook != null)                 m_application = hook as IApplication;                  if (m_application != null)             {                 SetupDockableWindow();                 base.m_enabled = m_dockableWindow != null;             }             else                 base.m_enabled = false;                  IMxDocument mxDoc = (IMxDocument)m_application.Document;             IActiveViewEvents_Event activeViewEvents = mxDoc.ActiveView as IActiveViewEvents_Event;             activeViewEvents.ViewRefreshed += new IActiveViewEvents_ViewRefreshedEventHandler(activeViewEvents_ViewRefreshed);         }              void activeViewEvents_ViewRefreshed(IActiveView view, esriViewDrawPhase phase, object Data, ESRI.ArcGIS.Geometry.IEnvelope envelope)         {             MessageBox.Show("ViewRefreshed");         }


Tornado Data Points: Linking 2 Points in QGIS on the Same Row

So I've got these tornado .csv files that have two latitude & longitude entries with the left-most in the table being the beginning point and the right-most being the ending point of the tornado, as is described here. I'm wondering, how can I link these two points in QGIS, so I get a line?


Corrupt shapefile. How to fix

I have a shapefile I was working on (ArcGIS 9.3) get corrupted somehow and it gives me the error "Number of shapes does not match the number of table records.". What I would want is to recover this shapefile as it has a lot of edits that other revisions of the file do not have. Earlier I recovered from this error using ogr2gui but the tool now just crashes. I have even tried the command line version **ogr2ogr** but still no luck. This script, Shapefile Repair Tool from the ESRI ArcScript website didn't help either. Any ideas? (except that I stop using shapefiles -- legacy system :-)) * * * Here is the output from ogr2ogr (based on a a suggestion in the answers): ![enter image description here](http://i.stack.imgur.com/aqVlL.jpg)


Finding differences between two shapefiles in Python

I'm trying to find out whether there were any border changes between two yearly shapefiles. I've heard a lot of praise for Python's open source GIS tools like Shapely/Fiona, and thought I would try those, but I'm at a loss for how to go about implementing this. Is Shapely poorly suited for this task, and, if so, what tool would be better? Any advice you have would be greatly appreciated. Thanks!


GeoJSON too bulky - what to do?

I am using leaflet.js to allow web users to select a region. Valid regions are US states, Canadian providences, and world countries (except for US and Canada). I constructed a shapefile myself using Qgis and saved it as a geojson. I simplified the geometries as much as I could. The resulting shapefile is 400kb, but the geojson is over a megabyte. This is bigger than I would like. I need to reduce the network overhead involved in transferring this information. What is the right way to do this? The options I can imagine are:   1. Serve the geojson file gzipped, unpack on the client.    2. Parse the shapefile on the client to geojson   3. Generate my own tiles from the shapefile and serve those If anyone could tell me which option is the best (or none of the above) I would appreciate it!


How to use stored procedure in Geoserver?

I have a MS SQL Server 2008 R2 with and have stored procedure in here. I want to create layer in GEoserver using this. I try:               EXECUTE [dd_base].[dbo].[Request BaseSration]       'param1',       'param2',       'param3',       'param4'     GO      And get `error near key word EXECUTE`.   In Geoserver logs:               ERROR [geoserver.web] - Failed to create feature type     java.io.IOException: Error occurred building feature type      What im doing wrong?


Installation problem for pgrouting

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


GeoJSON - Resymbolize without redownloading?

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})


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

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?


How to use ZonalStats plugin?

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.


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

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)


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

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.]


Raster to vector conversion

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)


Create Data Frame or Group Layer

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.


Arctoolboxs suddenly unresponsive

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.


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

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


Looking for free Shapefile editors

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.


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

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.


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

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.


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

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


Gdal Dataset.ReadAsArray() crashes Python

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.


One to Many relation in ArcGIS for Desktop?

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?


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

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)


error in arcsde service

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


MrSid => GeoTiff

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.


PostGIS Optimization - Group spatially close entities physically on disk

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**.


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

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])


Displaying a multi-zoom image layer in open

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                     });


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

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


How to dynamically slice polygons

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


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

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


Ubuntu Touch and QGIS?

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.


Couldn't create DrawBox plugin with opengeo client sdk

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.


Sizing Leaflet Map inside bootstrap

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>


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

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()">


How to work with Geoserver and OpenLayers?

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?


How to connect to another server with ArcSDE?

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


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

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


problem reading netcdf

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 ...


OpenLayers.Renderer.Symbols custom named by function

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); }              }         });


Programmically Populate Value List in ArcGIS Tool Interface

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


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

_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.


Can r.mask be called from a batch file?

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?


ArcGIS Server proxy settings?

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.


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

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.


How to build ArcGIS Flex Viewer app for remote server?

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`.


Extract ground elevation from a path of lat/lon

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


How to read the attribute values using pyQgis?

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


Multiple response from nominatim service call (Geocoding) in openstreetMap

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.


How to apply new WFS-Filter features like intersect

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


Exporting climatic tabular data stored in TIF file into CSV

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


MGRS square identifier to polygon

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.


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

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)


Data Interoperability Extension Live connection to WFS from arc10

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?


OpenLayers - Pre cache layers on Client

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.


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

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?


ArcGIS Javascript API, help with adding marker data to infotemplate

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);


Delineating catchments using GRASS GIS?

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.


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

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.


GeoPortal Managing Tool

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.


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

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();


Bitness Issue with WebADF 10 deployment

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


Why do field values change when exporting from QGIS?

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?


3D Polyline by Slope on Surface

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?


ArcGIS ModelBuilder pass arcpy.SetParameterAsText as input to next tool

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)


Problem running mvn install for geoexplorer

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.