Re: [GRASS-user] Centerlines of Polygons (skeletons)

2008-06-19 Thread Hamish
Mars wrote:
 Wondering if there is a simple way in GRASS to produce skeletons
 of Polygons (rivers/streams), to find the flow centerline.

Michael Perdue 
 You could do;
 
 v.to.rast - r.thin - r.to.vect - v.clean (and
 maybe v.generalize)
 
 But you'll lose the link to the attribute data.


see also this example in the r.watershed help page: Create a more detailed 
stream map using the accumulation map and convert it to a vector output map.


Another take on the r.thin approach is to use r.cost from the river bank to get 
a layer with distance to shore. Then feed that through r.param.scale feature 
method to extract ridge lines of the cost, and then run r.thin on that.


a problem is that for a long narrow river to get accurate results the raster 
resolution must be very fine, which makes the overall map size unmanageable. I 
had an idea to write a script which would iteratively make its way downstream 
doing {v.to.rast, r.cost, r.thin, r.to.vect line} then merging the vector lines 
somehow but have not gotten around to it, hoping there was a more elegant 
solution from fluvial gurus.

The problem of what to do at forks requires some thought as well.


One project we have here requires the establishment of a river-mile linear 
referencing system (LRS), i.e. a custom coordinate system where our axes are 
river-mile and +/- perpendicular offset. (like v.segment or v.lrs.segment)

then we can straighten the river and do our theoretical work in a simpler 2D 
model versus putting it in a full triangulated mesh.
maybe a third axis could be deviation angle or radius of curvature at that 
point in the LRS. Maybe better to just store that as a regular attribute of the 
LRS node (created with v.[lrs.]segment or 'v.to.points -i dmax=').


In another project I require to know the width of the river at any point along 
it (for fluid dynamics calcs). Again I had hoped to use a line perpendicular to 
an established centerline LRS, chop at intersection with the riverbank polygon, 
then upload the line length as an attribute of the LRS node. From there to get 
a raster layer I could either write the line with r.in.poly using the value or 
r.grow the converted LRS node data.
Or grow outwards 2*max distance from riverbank given by r.cost.


I have read through Bill's paper a few times but fear I lack the ArcInfo 
experience to understand the methods well enough to port it to GRASS vector 
functions, although I am sure it is possible to do so.

Another gotcha is that for the first project we would like to, in general, try 
and follow the center of the channel, ie the fastest part of the flow and not 
cut inside corners too much (getting back to Mars's original request). I am not 
sure if it is better to follow the geometric centerline or primary flow 
streamline at sharp bends; maybe best to include a switch to let the user 
choose which is the more appropriate.

It seems like a least-bending-energy thin-snake-spline run through the middle 
of the river polygon might be another nice solution.



happy for ideas,

Hamish


ps- note new mailing list address.



  

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Centerlines of Polygons (skeletons)

2008-06-18 Thread Michael Perdue
You could do;

v.to.rast - r.thin - r.to.vect - v.clean (and maybe v.generalize)

But you'll lose the link to the attribute data.

Cheers,

Mike


- Original Message 
From: Aurora Geomatics [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2008 5:24:46 PM
Subject: [GRASS-user] Centerlines of Polygons (skeletons)

Wondering if there is a simple way in GRASS to produce skeletons of  
Polygons (rivers/streams), to find the flow centerline.

thanks


Mars Sjoden
Aurora Geomatics
[EMAIL PROTECTED]
http://arorageo.blogspot.com/

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user



  __
Connect with friends from any web browser - no download required. Try the new 
Yahoo! Canada Messenger for the Web BETA at 
http://ca.messenger.yahoo.com/webmessengerpromo.php___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Centerlines of Polygons (skeletons)

2008-06-18 Thread Christian Schwartze
Hi,

I only know the way for raster data using r.thin to get a center line
for e.g. wide raster streams.

Christian. 

Am Mittwoch, den 18.06.2008, 10:24 -0700 schrieb Aurora Geomatics:
 Wondering if there is a simple way in GRASS to produce skeletons of  
 Polygons (rivers/streams), to find the flow centerline.
 
 thanks
 
 
 Mars Sjoden
 Aurora Geomatics
 [EMAIL PROTECTED]
 http://arorageo.blogspot.com/
 
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Centerlines of Polygons (skeletons)

2008-06-18 Thread Wolf Bergenheim

On 19.06.2008 00:01, Aurora Geomatics wrote:

I wonder, is there a way to create a Voronoi diagram in GRASS?



There is the v.voronoi module, which is also the subject of one of  the 
Summer of Code projects this summer. I've been looking at an algorithm 
that creates Voronoi diagrams out of skeleton lines, but currently there 
is no direct support for skeleton lines in GRASS, as far as I can tell, 
perhaps if Martin P. gets interested he will develop this method and as 
a by-product a v.skeleton module, but that won't probably happen autumn 
if at all.


--Wolf

--

:3 ) Wolf Bergenheim ( 8:

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Centerlines of Polygons (skeletons)

2008-06-18 Thread Aurora Geomatics
This sounds very interesting, certainly I could see this really coming  
in handy when given a few thousand polygons of rivers and streams and  
asked to quickly output the centerlines... Finding centerlines of  
river/stream polygons may seem so simple for all this powerful  
computational equipment and software to clients, and perhaps it is to  
those who have higher math skills...


On 18-Jun-08, at 2:22 PM, Wolf Bergenheim wrote:



On 19.06.2008 00:01, Aurora Geomatics wrote:

I wonder, is there a way to create a Voronoi diagram in GRASS?


There is the v.voronoi module, which is also the subject of one of   
the Summer of Code projects this summer. I've been looking at an  
algorithm that creates Voronoi diagrams out of skeleton lines, but  
currently there is no direct support for skeleton lines in GRASS, as  
far as I can tell, perhaps if Martin P. gets interested he will  
develop this method and as a by-product a v.skeleton module, but  
that won't probably happen autumn if at all.


--Wolf



Looks like some interesting material, I'll have a read though this,  
see what I can use out of it for my situation.  I noticed the issue of  
the Branching outside the Centerline/Skeleton came up, I'll have to  
read deeper to see if or what the solution was for this issue.



Have a look at this old page

http://research.esd.ornl.gov/CRERP/DOCS/RIVERMI/P114.HTM

you could do the same thing in GRASS

Bill H.




Thanks Tom, I must have miss spelled when I searched it in the GRASS  
manual.


On Wed, Jun 18, 2008 at 02:01:56PM -0700, we recorded a bogon- 
computron collision of the [EMAIL PROTECTED] flavor,  
containing:


I wonder, is there a way to create a Voronoi diagram in GRASS?



Yes.  With v.voronoi.
--
Tom Russo




Mars Sjoden
Aurora Geomatics
[EMAIL PROTECTED]
http://arorageo.blogspot.com/

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user