#include <grass/gis.h>
Go to the source code of this file.
Functions | |
int | G_begin_cell_area_calculations () |
begin cell area calculations | |
double | G_area_of_cell_at_row (register int row) |
cell area in specified row | |
int | G_begin_polygon_area_calculations () |
begin polygon area calculations | |
double | G_area_of_polygon (double *x, double *y, int n) |
area in square meters of polygon |
double G_area_of_cell_at_row | ( | register int | row | ) |
double G_area_of_polygon | ( | double * | x, | |
double * | y, | |||
int | n | |||
) |
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. Note. If the database is planimetric with the non-meter grid, this routine performs the required unit conversion to produce square meters. double G_planimetric_polygon_area (x, y, n) area in coordinate units double *x, *y ; int n ; Returns the area in coordinate units of the polygon described by the n pairs of x,y coordinate vertices for planimetric grids. If the units for x,y are meters, then the area is in square meters. If the units are feet, then the area is in square feet, and so on.
x | ||
y | ||
n |
Definition at line 156 of file area.c.
References G_ellipsoid_polygon_area(), and G_planimetric_polygon_area().
int G_begin_cell_area_calculations | ( | ) |
begin cell area calculations
This routine must be called once before any call to G_area_of_cell_at_row. It perform all inititalizations 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. It returns 2 if the projection is non-planimetric (i.e, latitude-longitude), 1 if the projection is planimetric (i.e, UTM or SP) all cells are the same size, and 0 if the projection "projection" is not measurable (i.e, imagery or xy) If the return value is 1 or 0, all the grid cells in the map have the same area. Otherwise the area of a grid cell varies with the row.
void |
Definition at line 33 of file 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(), and G_get_set_window().
int G_begin_polygon_area_calculations | ( | ) |
begin polygon area calculations
This initializes the polygon area calculation routines. It is used both for planimetric and latitude-longitude projections. It returns 2 if the projection is latitude-longitude, 1 if the projection is planimetric, and 0 if the projection doesn't hav e a metric (e.g. imagery.)
a | ||
e2 | ||
factor |
Definition at line 113 of file area.c.
References G_begin_ellipsoid_polygon_area(), G_database_units_to_meters_factor(), G_get_ellipsoid_parameters(), and G_projection().