[GRASS-user] how to report/measure a vector area?

Moritz Lennert mlennert at club.worldonline.be
Tue Jan 31 04:40:34 EST 2012


On 30/01/12 09:01, Micha Silver wrote:
>   On 30/01/2012 09:52, Shane Litherland wrote:
>> Hi all,
>>
>> I'm lost. I have looked around in GRASS for how to report the area (e.g.
>> in hectares) for a vector map that, yes, has area (i.e. centroids and
>> boundaries).
>>
>> I cannot find a way to do this. A bit of web searching, even gave some
>> suggestions this basic facility may not be available in GRASS?? surely
>> there's something tucked away to do it?
>>
>> I'm sure I've done something in the past to view vector area data,
>> though it may have been area data that was already in a table. When I
>> use the query tool in map display, it tells me 'nothing'. Seems that is
>> because my vector is not connected to an attribute table. For the
>> purpose of my exercise I did not need cats for the boundaries/centroids
>> so I didn't bother with a table connection either. Maybe this is where
>> I've gone wrong?
>>
>> I did try vector to raster to try and report on how many raster
>> cells/area... no luck there either.
>>
>> I also tried the 'measure' tool in the map display, but it only gives
>> distance.
>>
>>
>> I could go and learn more about PostGIS for sending the vector data to a
>> postgres geometry table and figure it out that way... I was hoping to
>> find a way to do it in GRASS in a matter of minutes, not via a database
>> and a couple of days/weeks of learning how...
>>
>> What tool/command should I be using?
>
> v.to.db is what you need. From the man page:

Just for the record. If all you want is to list areas on screen (not 
putting them into your attribute table), you also have v.report. But if 
also works by category, so you will have to add categories to your 
vector layer.

Moritz


More information about the grass-user mailing list