<div>Hi Markus,</div>
<div> </div>
<div>So, if I understood well the practical theory you need is not that one described by Urban &amp; Keitt (2001), because they use nodes and edges, and you want a patch-based graph theory, isn&#39;t it? May be Fall et all (2007) is a better technical approach?<br>
</div>
<div>Andrew Fall, Marie-Josee Fortin, Micheline Manseau, and DanO’Brien<br>Spatial Graphs: Principles and Applications for Habitat Connectivity<br>Ecosystems (2007) 10: 448–461 - DOI: 10.1007/s10021-007-9038-7<br></div>
<div>bests</div>
<div> </div>
<div>miltinho</div>
<div>brazil=toronto</div>
<div><br> </div>
<div class="gmail_quote">2009/12/2 Markus Metz <span dir="ltr">&lt;<a href="mailto:markus.metz.giswork@googlemail.com">markus.metz.giswork@googlemail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi all,<br><br>for a raster map with habitat patches separated by gaps in between, I want to know for each habitat patch 1) how far away is the nearest other habitat patch, 2) what&#39;s the id of the nearest habitat patch (each contiguous patch must have a unique ID), 3) how do I get to the nearest habitat patch, i.e. what is the shortest path connecting one patch and its nearest other patch.<br>
<br>Then I need to get clusters of patches, each cluster consisting of patches connected by paths not longer than max_distance, i.e. I can visit all patches within a cluster by traversing gaps not broader than max_distance (hop from one patch to the next, but I can hop only so far...)<br>
<br>That would be interesting for meta-populations, dispersal etc, habitats could be islands, forest fragments, trees of a particular species, any habitat type with a patchy spatial distribution and one or more species dependent on that habitat.<br>
<br>Any idea how to do that in grass or some other (fragment analysis-specific) application?<br><br>Using the habitat map twice as input to r.distance would be a start with r.distance maps=habitat_map,habitat_map, but r.distance is too slow for my taste (running for 2 hours by now), and I still have to get the nearest patches, shortest paths and clusters connected with max_distance. Running r.cost or r.walk for each patch as starting points and all other patches as stop points is not an option because I have ~200,000 patches in a 300 million cell raster. Converting the raster habitat map to a vector with areas and using v.net.* modules doesn&#39;t work because AFAIK these modules work with points as graph nodes, and some of the areas are quite large, using centroids would give wrong distances.<br>
<br>The theory of what I want to do is described in Urban and Keitt (2001) [1]<br><br>Thanks,<br><br>Markus M<br><br>[1] link to pdf: <a href="http://www.keittlab.org/~tkeitt/papers/urban-keitt-2001.pdf" target="_blank">http://www.keittlab.org/~tkeitt/papers/urban-keitt-2001.pdf</a><br>
<br>PS: The grass module I would like to have for this kind of analysis would use a habitat map as input, have as optional output raster paths with distances as cell values, vector paths with costs and ids of the two patches connected by each path, one cluster map for each maxdistance=max1,max2,max3,..., and an ascii file in the same format like r.distance for all paths connecting habitat patches. X-mas is getting close ;-)<br>
<br>_______________________________________________<br>grass-user mailing list<br><a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</blockquote></div><br>