[R-sig-Geo] Difference in area calculation between QGIS and R

Edzer Pebesma edzer@pebe@m@ @ending from uni-muen@ter@de
Wed Jun 27 18:07:18 CEST 2018


On 06/27/2018 05:29 PM, Michael Sumner wrote:
> Raster uses a (discretized) cosine-of-latitude approximati (popular amongst
> longlat map makers).

As far as I can tell, raster branches into the libgeographic code
(copied into the package sources, although Karney is not mentioned as
one of the package copyright holders), using close to exact geodesic /
ellipsoidal computation.

> 
> QGIS uses a project to local equal area projection method or maybe some
> other approach.
> 
> There's lots and f options, all that matters is what your work needs.
> 
> Cheers, Mike
> 
> On Wed, 27 Jun 2018, 22:14 Suncus Etruscus, <suncus.etruscus.i using gmail.com>
> wrote:
> 
>> Dear List,
>> I am trying to use R ("sp" and "raster" packages) to calculate the area of
>> several polygons (CRS of the shapefile EPSG: 4326  - WGS84).
>>
>> I used this line of code:
>>
>> shapefile_name$area_km2 <- area(shapefile_name)/1000000
>>
>> However, when I used QGIS to calculate the area of the same polygons
>> (through the "$area" function), I found there was a slight difference (in
>> every polygon).
>>
>> For example, for a polygon of about 30 000 km2, the area calculated in R
>> was 50 km2 smaller.
>>
>> What could be the cause?
>>
>> Thanks in advance,
>> N.
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>

-- 
Edzer Pebesma
Institute for Geoinformatics
Heisenbergstrasse 2, 48151 Muenster, Germany
Phone: +49 251 8333081



More information about the R-sig-Geo mailing list