Skip to content
Prev 8677 / 29559 Next

polygonValues (raster): Very slow

Yes, you are both right. Actually, shame to me: the better the
machine, the more careless the user!

1. Weights are not really needed, as the polygons are much larger than
the pixels. Ignoring those pixels not
having their center in the polygon is good enough.
2. A lot (~40%) of the polygons actually lie over the ocean or over
continents for which the raster
has no data. Therefore I must discard the unnecessary polygons first.
I think I can do this with maptools,
but can do it outside R as well. The only problem is that I would
prefer not having broken polygons, so
polygons should be either kept or eliminated.

The polygons actually come from a grid. The raster is a map of %cover
of Betula in Europe that we
have to coarsen to an specified grid for a model of atmospheric
transport that we expect will predict
pollen abundance, which we'll check against data from pollen sampling stations.

The grid is not aligned to the raster, this is why I'm using a polygon
and a raster instead of 2 raster layers.
But I can reconsider this if using 2 raster layer is faster.

Thanks!

Agus

2010/6/30 Nikhil Kaza <nikhil.list at gmail.com>: