Add areas to a vector in GRASS

I sometimes use r.to.vect to convert a raster map in GRASS to a vector map. One way to find the area of each of the new polygons is:

# I am working with the vector map forests
v.add.col map=forests column="area double precision"
v.to.db map=forests option=area units=h columns=area

This will add the column area to forests and updates it with the size of the polygon in hectars.

Advertisements
This entry was posted in Computer, GRASS. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s