<div dir="ltr"><div><br><br>On Fri, Sep 15, 2017 at 5:10 PM, Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>> wrote:<br>><br>><br>><br>><br>> -------- Forwarded Message --------<br>> Subject: [GRASS-dev] area() function in r.mapcalc<br>> Date: Fri, 15 Sep 2017 16:32:29 +0200<br>> From: Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>><br>> To: Andy Wickert <<a href="mailto:andrewwickert@gmail.com">andrewwickert@gmail.com</a>><br>> CC: grass-dev <<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>><br>><br>> Andy,<br>><br>> As I just saw your contribution to the addons: r.cell.area [1],<br><br></div>r.cell.area uses a hard-coded sphere, ignoring the ellipsoid/sphere of the current location, i.e. results are most probably wrong.<br><div><br>> please all note that 10 months ago MarkusM has implemented an area() function in r.mapcalc [2]. This is currently only available in trunk, but will thus be in GRASS GIS 7.4. This uses internal library functions<br><br></div><div>These internal library functions have been available since GRASS 4.0 (!). All you need is</div><div>G_begin_cell_area_calculations()</div><div>followed by</div><div>G_area_of_cell_at_row()</div><div>for each row.<br></div><div><br></div><div>r.cell.area should use these GRASS functions, but r.cell.area will be obsolete as soon as trunk with r.mapcalc's area() function is released as a new minor GRASS 7 version.</div><div><br></div><div>Markus M</div><div><br></div><div>> which calculate area of the pixel taking into account the current projection system.<br>><br>> Moritz<br>><br>><br>> [1] <a href="https://trac.osgeo.org/grass/changeset/71487">https://trac.osgeo.org/grass/changeset/71487</a><br>> [2] <a href="https://trac.osgeo.org/grass/changeset/69962/grass/trunk/raster/r.mapcalc">https://trac.osgeo.org/grass/changeset/69962/grass/trunk/raster/r.mapcalc</a><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br><br></div></div>