[GRASS5] v.to.db 2 new features compactness and perimeter

Wolf Bergenheim wolf+grass at bergenheim.net
Thu Nov 3 11:27:13 EST 2005


Hi!

I fixed my fix for supporting compactness in v.to.db. I also added
support for perimeter option which calculates the perimeter of an area.
Compactness is calculated by doing:

compactness = perimeter / 2 * sqrt(M_PI * area)

which gives a circle the value 1 and all other shapes have a larger value.

Please have a look at my patch, and LMK if you think something is
strange or out right wrong. I have tested these new options a bit, but I
haven't really tested them on weird / broken material. I have also not
tried to calculate the perimeter or compactness of lines. (;

--Wolf

-- 

<:3 )---- Wolf Bergenheim ----( 8:>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: v.to.db.wolf.patch
Type: text/x-patch
Size: 6609 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20051103/3b6ea793/v.to.db.wolf.bin


More information about the grass-dev mailing list