[R-sig-Geo] Calculate area of raster cells

Robert J. Hijmans r.hijmans at gmail.com
Wed Apr 28 19:06:35 CEST 2010


P.S. The solution I just posted assumes the earth is a sphere, not an
ellipsoid (which would be more accurate).

> These are projected, not geographical coordinates, unfortunately. The case
> for calculating areas on an ellipsoid is much harder, I'm afraid.
>
> Roger


On Wed, Apr 28, 2010 at 4:16 AM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> On Wed, 28 Apr 2010, Paul Hiemstra wrote:
>
>> Tim Erbrecht wrote:
>>>
>>> Dear all,
>>>
>>>
>>> having data in a SpatialGridDataFrame with geographic coordinates, is
>>> there a simple method to calculate the spatial area for each cell? I wasn't
>>> able to find anything in the list archives ...
>>>
>>>
>>> Thanks and best regards
>>>
>>> Tim
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>> with the meuse dataset:
>>
>> library(sp)
>> data(meuse.grid)
>> gridded(meuse.grid) = ~x+y
>> fullgrid(meuse.grid) = TRUE
>> bla = gridparameters(meuse.grid)
>> area = bla$cellsize[1] * bla$cellsize[2]
>> area
>
> These are projected, not geographical coordinates, unfortunately. The case
> for calculating areas on an ellipsoid is much harder, I'm afraid.
>
> Roger
>
>>
>> cheers,
>> Paul
>>
>>
>
> --
> Roger Bivand
> Economic Geography Section, Department of Economics, Norwegian School of
> Economics and Business Administration, Helleveien 30, N-5045 Bergen,
> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand at nhh.no
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list