[GRASS-user] v.to.db area calculations

Moritz Lennert mlennert at club.worldonline.be
Fri May 19 02:20:12 PDT 2017



Le 19 mai 2017 11:12:30 GMT+02:00, Markus Metz <markus.metz.giswork at gmail.com> a écrit :
>On Thu, May 18, 2017 at 4:22 PM, James Duffy
><james.philip.duffy at gmail.com>
>wrote:
>>
>> Hello,
>>
>> I'm trying to calculate the area of a polygon using v.to.db as
>follows
>(through R):
>>
>> execGRASS("v.to.db", flags = c("p","quiet"), parameters = list(map =
>"test", units = "meters", option = "area", separator = "comma"),intern
>=
>TRUE)
>>
>> 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
>match.
>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
>the
>same category? In this case the entry in the attribute table is the sum
>of
>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.

Moritz


>
>Markus M
>
>>
>> Can anyone shed some light on how v.to.db calculates area and why it
>might be going wrong please?
>>
>> Thank you
>>
>> James
>>
>>
>>
>> --
>> James Duffy
>> PhD Researcher
>> Environment and Sustainability Institute
>> Penryn Campus
>> University of Exeter
>> Penryn
>> Cornwall
>> TR10 9FE
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list