[GRASS-dev] Area weighted rasterization with v.to.rast?
Newcomb, Doug
doug_newcomb at fws.gov
Thu Nov 8 04:53:21 PST 2012
Markus,
The first thing that occurs to me is to make the value of the first raster
from the polygon layer the area of the polygon. r.mapcalculator to divide
the value of each raster by the area of a raster cell. This should give
you a raster with the value of the proportion of area of the polygon in
each cell.
Now rasterize the polygon layer with the original attribute you wanted to
affect. Multiply this raster by the proportional raster above.
A bit brute force, but it should give you what you want.
Doug
On Thu, Nov 8, 2012 at 5:29 AM, Markus Neteler <neteler at osgeo.org> wrote:
> Hi all,
>
> for a project I would be in need to rasterize vector polygons with
> attribute value to the raster model where the resulting raster cells
> carry the weighted portion of the original attribute according to
> the area covered.
>
> Example:
> A square vector polygon with value 10.000 falls onto four raster
> cells. The resulting cells should each carry the value 2.500.
>
> I wonder if the mechanism used in r.resamp.stats for -w:
> Weight according to area
> could be implemented in v.to.rast to achieve this goal.
>
> thanks
> Markus
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20121108/343f8daf/attachment.html>
More information about the grass-dev
mailing list