GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-d6dec75dd4
|
GIS Library - Units management and conversion. More...
Go to the source code of this file.
Functions | |
double | G_meters_to_units_factor (int units) |
Units conversion from meters to units. More... | |
double | G_meters_to_units_factor_sq (int units) |
Units conversion from square meters to square units. More... | |
int | G_is_units_type_spatial (int units) |
Check if the unit is of spatial type. More... | |
int | G_is_units_type_temporal (int units) |
Check if the unit is of temporal type. More... | |
const char * | G_get_units_name (int units, int plural, int square) |
Get localized units name. More... | |
int | G_units (const char *units_name) |
Get units code by name. More... | |
GIS Library - Units management and conversion.
(C) 2001-2010 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 units.c.
const char* G_get_units_name | ( | int | units, |
int | plural, | ||
int | square | ||
) |
Get localized units name.
Units codes (gis.h):
units | units code |
plural | plural form if true |
square | area units if true |
Definition at line 204 of file units.c.
References _, G_database_unit_name(), G_get_units_name(), G_units(), NULL, U_ACRES, U_DAYS, U_DEGREES, U_FEET, U_HECTARES, U_HOURS, U_KILOMETERS, U_METERS, U_MILES, U_MINUTES, U_MONTHS, U_SECONDS, U_UNKNOWN, U_USFEET, and U_YEARS.
Referenced by G_database_unit_name(), G_get_units_name(), Rast3d_get_vertical_unit(), and Rast3d_print_header().
int G_is_units_type_spatial | ( | int | units | ) |
int G_is_units_type_temporal | ( | int | units | ) |
double G_meters_to_units_factor | ( | int | units | ) |
Units conversion from meters to units.
Units codes (gis.h):
Returns a factor which converts meters to units (by multiplication).
units | units code |
Definition at line 38 of file units.c.
References U_FEET, U_KILOMETERS, U_METERS, U_MILES, and U_USFEET.
double G_meters_to_units_factor_sq | ( | int | units | ) |
Units conversion from square meters to square units.
Units codes (gis.h):
Returns a factor which converts square meters to square units (by multiplication).
units | units code |
Definition at line 88 of file units.c.
References U_ACRES, U_FEET, U_HECTARES, U_KILOMETERS, U_METERS, U_MILES, and U_USFEET.
int G_units | ( | const char * | units_name | ) |
Get units code by name.
Units codes (gis.h):
units_name | units name (singular or plural form) |
Definition at line 320 of file units.c.
References G_database_unit_name(), G_units(), NULL, U_ACRES, U_DAYS, U_DEGREES, U_FEET, U_HECTARES, U_HOURS, U_KILOMETERS, U_METERS, U_MILES, U_MINUTES, U_MONTHS, U_SECONDS, U_UNKNOWN, U_USFEET, and U_YEARS.
Referenced by G_get_units_name(), G_units(), and Rast3d_set_vertical_unit().