<html style="direction: ltr;">
  <head>
    <meta content="text/html; charset=windows-1255"
      http-equiv="Content-Type">
    <style>body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;"
    bidimailui-detected-decoding-type="preferred-charset"
    bgcolor="#FFFFFF" text="#000000">
    On 30/01/2012 09:52, Shane Litherland wrote:
    <blockquote cite="mid:1327909960.6375.15.camel@Lacebark" type="cite">
      <pre wrap="">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?
</pre>
    </blockquote>
    <br>
    v.to.db is what you need. From the man page:<br>
    <p style="color: rgb(0, 0, 0); font-family: arial,sans-serif;
      font-style: normal; font-variant: normal; font-weight: normal;
      letter-spacing: normal; line-height: normal; orphans: 2;
      text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; background-color: rgb(255, 255,
      255); font-size: medium;">Upload polygon areas to corresponding
      centroid record in the attribute table:</p>
    <p><tt>v.to.db map=soils type=centroid option=area col=area_size
        unit=h</tt></p>
    You'll need to start by adding a database connection and a column
    for area. Again in the man page there's a sample you can follow-
    just use option=area instead of option=sides:<br>
    <tt>Upload category numbers of left and right area, to an attribute
      table of boundaries common for the areas:<br>
      # add categories for boundaries of the input vector map, in layer
      2:<br>
      v.category soils out=mysoils layer=2 type=boundary option=add<br>
      # add a table with columns named "left" and "right" to layer 2 of
      the input<br>
      # vector map:<br>
      v.db.addtable mysoils layer=2 col="left integer,right integer"<br>
      # upload categories of left and right areas:<br>
      v.to.db mysoils option=sides col=left,right layer=2<br>
      # display the result:<br>
      v.db.select mysoils layer=2</tt><br>
    <blockquote cite="mid:1327909960.6375.15.camel@Lacebark" type="cite">
      <pre wrap="">
regards,
Shane.

_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>

This mail was received via Mail-SeCure System.


</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>