Difference in area calculation between QGIS and R
Thank you for you answer, Michael, I am new to the use of R for spatial analyses. I have always used QGIS for this kind of operations, but this time I need to repeat the area calculation with thousands of polygons several times in a loop, so I switched to R. Actually, what my work needs is the most accurate measurement of such areas. I am wondering if the best thing to do is to accept the results in R and ignore those in QGIS. Thanks, Nick 2018-06-27 17:29 GMT+02:00 Michael Sumner <mdsumner at gmail.com>:
Raster uses a (discretized) cosine-of-latitude approximati (popular amongst longlat map makers). 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 at 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 at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
-- Dr. Michael Sumner Software and Database Engineer Australian Antarctic Division 203 Channel Highway <https://maps.google.com/?q=203+Channel+Highway+Kingston+Tasmania+7050+Australia&entry=gmail&source=g> Kingston Tasmania 7050 Australia <https://maps.google.com/?q=203+Channel+Highway+Kingston+Tasmania+7050+Australia&entry=gmail&source=g>