|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
|
GIS Library - Area calculation functions. More...
#include <grass/gis.h>
Go to the source code of this file.
Functions | |
| int | G_begin_cell_area_calculations (void) |
| Begin cell area calculations. | |
| double | G_area_of_cell_at_row (int row) |
| Cell area in specified row. | |
| int | G_begin_polygon_area_calculations (void) |
| Begin polygon area calculations. | |
| double | G_area_of_polygon (const double *x, const double *y, int n) |
| Area in square meters of polygon. | |
GIS Library - Area calculation functions.
(C) 2001-2009 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file gis/area.c.
Cell area in specified row.
This routine returns the area in square meters of a cell in the specified row. This value is constant for planimetric grids and varies with the row if the projection is latitude-longitude.
| row | row number |
Definition at line 86 of file gis/area.c.
References PROJECTION_LL.
Referenced by N_init_geom_data_2d().
Area in square meters of polygon.
Returns the area in square meters of the polygon described by the n pairs of x,y coordinate vertices. It is used both for planimetric and latitude-longitude projections.
You should call G_begin_polygon_area_calculations() function before calling this function.
Note: If the database is planimetric with the non-meter grid, this routine performs the required unit conversion to produce square meters.
| x | array of x coordinates |
| y | array of y coordinates |
| n | number of x,y coordinate pairs |
Definition at line 158 of file gis/area.c.
References G_ellipsoid_polygon_area(), G_planimetric_polygon_area(), PROJECTION_LL, and x.
Referenced by Vect_find_island(), and Vect_get_area_area().
Begin cell area calculations.
This routine must be called once before any call to G_area_of_cell_at_row(). It perform all initializations needed to do area calculations for grid cells, based on the current window "projection" field. It can be used in either planimetric projections or the latitude-longitude projection.
Definition at line 45 of file gis/area.c.
References G_begin_zone_area_on_ellipsoid(), G_begin_zone_area_on_sphere(), G_darea0_on_ellipsoid(), G_darea0_on_sphere(), G_database_units_to_meters_factor(), G_get_ellipsoid_parameters(), G_get_set_window(), and PROJECTION_LL.
Referenced by N_init_geom_data_2d().
Begin polygon area calculations.
This initializes the polygon area calculation routines. It is used both for planimetric and latitude-longitude projections.
Definition at line 119 of file gis/area.c.
References G_begin_ellipsoid_polygon_area(), G_database_units_to_meters_factor(), G_get_ellipsoid_parameters(), G_projection(), and PROJECTION_LL.
Referenced by Vect_find_island(), and Vect_get_area_area().