Le 19 mai 2017 11:12:30 GMT+02:00, Markus Metz <markus.metz.gisw...@gmail.com>
a écrit :
>On Thu, May 18, 2017 at 4:22 PM, James Duffy
>> I'm trying to calculate the area of a polygon using v.to.db as
>> execGRASS("v.to.db", flags = c("p","quiet"), parameters = list(map =
>"test", units = "meters", option = "area", separator = "comma"),intern
>> I assume that the output of this command will be a meters squared
>calculation of the area inside the polygon 'test'.
>> However, in QGIS, I manually calculated the area the they do not
>QGIS (which I believe to be true) shows 0.128m2, and the output from
>v.to.db shows 22.42226m2.
>This is a large difference. Is it possible that several polygons share
>same category? In this case the entry in the attribute table is the sum
>all polygons with that category.
>> I am working in WGS84.
>GRASS uses geodesic distance and area calculation for latlon, I believe
>QGIS as well.
QGIS only uses geodesic when OTF projection is activated and a datum is
selected in the project properties (done by default with otf active I think).
Otherwise it uses map units.
>> Can anyone shed some light on how v.to.db calculates area and why it
>might be going wrong please?
>> Thank you
>> James Duffy
>> PhD Researcher
>> Environment and Sustainability Institute
>> Penryn Campus
>> University of Exeter
>> TR10 9FE
>> grass-user mailing list
grass-user mailing list