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

On 24/05/17 11:39, James Duffy wrote:

Please find the polygon in the zip attached.

[sent offlist]

Ok, I can confirm that there is a problem with this particular polygon. I guess that it might an issue with the very small size of this polygon.

When I import it in an EPSG 4326 location, I get the same result as you:

> v.report training op=area u=me
cat|id|area
1|1|38.2256243922775

But when I reproject it to a UTM 43N (EPSG 32743) location, I get a different area, which is close to what you find in QGIS:

v.proj location=LL_WGS84 mapset=mlennert input=training output=training_reproj_grass
v.report training_reproj_grass op=area u=me
cat|id|area
1|1|0.126369981910102

Interestingly, when I create a buffer around the area:

v.buffer training dist=0.0001 out=training_buff_0_0001

The area measurement in GRASS is again very close to the one in QGIS:

v.report training_buff_0_0001 op=area u=me
cat|area
1|419.188654810375

$area in field calculator in QGIS:
425.1112801

And in the ESPG 4326 location, it is impossible to zoom to the original polygon as it seems to go below the zoom capacity of the GUI:

"Failed to run command 'd.vect map=training@mlennert type=point,line,boundary,area,face width=1'. Details:

GRASS_INFO_ERROR(22724,1): Invalid n-s resolution field: 0.000000 "

Although these two might be unrelated, I do feel that there might be an issue with floating point precision somewhere...

Could you post this as a bug report, including your polygon ? Or would you prefer me posting the report, but could I then use your polygon ?

Moritz

On 24/05/17 20:49, James Duffy wrote:

On 24 May 2017 at 14:02, Moritz Lennert <mlennert@club.worldonline.be
<mailto:mlennert@club.worldonline.be>> wrote:

    Could you post this as a bug report, including your polygon ? Or
    would you prefer me posting the report, but could I then use your
    polygon ?

That would be great if you could write the report and pleas feel free to
use my polygon as an example. I would like to help get to the bottom of
this if possible!

Sorry, had forgotten about this. Here's the bug report: https://trac.osgeo.org/grass/ticket/3356. Don't hesitate if you have anything else to add.

Moritz