[R-sig-Geo] Is there an annotated river dataset available?

Karl Ove Hufthammer karl at huftis.org
Fri Jan 8 12:20:09 CET 2010


On Fri, 8 Jan 2010 10:11:20 +0100 Hans-Jörg Bibiko <bibiko at eva.mpg.de> 
wrote:
> I've a tiny question. Is there an annotated river dataset available?
> By 'annotated' I mean that rivers are ranked by a sort of 
> relevance/size/length or whatever. The problem is that I have an huge 
> SpatialLines object called 'rivers' which shows ~23200 rivers  but I 
> have to draw a map which only shows the most largest ones (let's say 
> 100 to 150) plus one to three rivers for a country.

How about using the 'SpatialLinesLengths' function? Try get the 100 
largest rivers, you can use

big.rivers=rivers[rev(order(SpatialLineLengths(rivers)))[1:100],]

'SpatialLinesLengths' may have a bug, though. At least for one of my 
data, it gives a 'non-finite line lengths' error message on one of the 
(finite!) lines.

-- 
Karl Ove Hufthammer



More information about the R-sig-Geo mailing list