On Fri, Sep 15, 2017 at 5:10 PM, Moritz Lennert < [email protected]> wrote: > > > > > -------- Forwarded Message -------- > Subject: [GRASS-dev] area() function in r.mapcalc > Date: Fri, 15 Sep 2017 16:32:29 +0200 > From: Moritz Lennert <[email protected]> > To: Andy Wickert <[email protected]> > CC: grass-dev <[email protected]> > > Andy, > > As I just saw your contribution to the addons: r.cell.area [1],
r.cell.area uses a hard-coded sphere, ignoring the ellipsoid/sphere of the current location, i.e. results are most probably wrong. > 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 These internal library functions have been available since GRASS 4.0 (!). All you need is G_begin_cell_area_calculations() followed by G_area_of_cell_at_row() for each row. 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. Markus M > which calculate area of the pixel taking into account the current projection system. > > Moritz > > > [1] https://trac.osgeo.org/grass/changeset/71487 > [2] https://trac.osgeo.org/grass/changeset/69962/grass/trunk/raster/r.mapcalc > _______________________________________________ > grass-user mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________ grass-user mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-user
