[GRASSLIST:6388] Re: Computing polygon area after/during v.overlay

Hamish hamish_nospam at yahoo.com
Sun Apr 10 02:11:58 EDT 2005


> d.vect overlay_output
> d.what.vect
> 
> should show you the area quickly.
> 
> 
> I think it is possible to make a report by using v.to.db. (same with
> line length, ..)


I would like to know the "coastline" lengths of some vector areas.

Yes, it's a fractal problem, so we assume constant smoothness and only
use results as ratios vs other areas within same dataset.


I'm trying to figure out a method to do this:

v.to.db -p option=length type=boundary

only works for lines (that is cat number -1 does report a length; if
type=boundary is not used then all real cats are listed with zero
length). I assume -1 length is sum of all boundaries? If so, I could
exploit the -1 length via v.extract in a loop for each cat, but that
seems like a bad solution.

so I use v.type to turn boundaries into lines, but as boundaries do not
have category numbers so result isn't worth much.

How do I assign the category of the area next to the boundary as the
boundary's cat value? (all areas are islands which do not touch, so no
left/right side issues) v.distance?

v.category option=add
just assigns cats sequentially without regard to original area's cat.


also, what does cat=0 answer mean in v.to.db output when option=area?
Area of holes within a polygon? The true categoried polygon sums do not
include that, correct?

also, why does v.to.db insist on the col= option? You just need to feed
it 'col=foo' or you get "ERROR: This option requires one column"



thanks,
Hamish




More information about the grass-user mailing list