[GRASS-user] SQL Query - greater length river inside a basin

Hi All,

I need a query that returns the greater length of river within a basin. Does anyone have any suggestions on how I can solve this problem?

The rivers are formed by segments. if each were a continuous line would be easy (but is not, lol).

Here is a print-screen of the problem, in yellow is what would be the result of the query.

Thanks in advance,

Marcello Benigno B. de Barros Filho
Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
http://profmarcello.blogspot.com
http://about.me/marcello.benigno

(attachments)

Screenshot.png

On Thu, 28 Apr 2011, Marcello Benigno wrote:

I need a query that returns the greater length of river within a basin.
Does anyone have any suggestions on how I can solve this problem?

Marcello,

   I did this a while ago by using mapcalc() to add the lengths of river
segments and show the total. Don't recall the algorithm off hand but I'm
sure you can quickly work it out.

Rich