Just to clear a few things up.

The shapefile contains only a single polygon (I created it as a simple test
to work out this discrepancy).

OTF is turned off in QGIS, I am working in EPSG 4326.

The 0.127m2 comes from using the Measure tool (OTF off) in QGIS. And it is
set to display m2.

Using the $area calculator in the field calculator in QGIS does indeed show
something that is more likely degrees squared.

On 19 May 2017 at 10:20, Moritz Lennert <mlenn...@club.worldonline.be>
wrote:

>
>
> 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
> ><james.philip.du...@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@lists.osgeo.org
> >> https://lists.osgeo.org/mailman/listinfo/grass-user
>



-- 
*James Duffy*
PhD Researcher
Environment and Sustainability Institute
Penryn Campus
University of Exeter
Penryn
Cornwall
TR10 9FE
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to