GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
|
GIS Library - Units management and conversion. More...
#include <string.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
double | G_meters_to_units_factor (int units) |
Units conversion from meters to units. | |
double | G_meters_to_units_factor_sq (int units) |
Units conversion from square meters to square units. | |
int | G_is_units_type_spatial (int units) |
Check if the unit is of spatial type. | |
int | G_is_units_type_temporal (int units) |
Check if the unit is of temporal type. | |
const char * | G_get_units_name (int units, int plural, int square) |
Get localized units name. | |
int | G_units (const char *units_name) |
Get units code by name. | |
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(), and NULL.
Referenced by G_database_unit_name(), and G_get_units_name().
int G_is_units_type_spatial | ( | int | units | ) |
int G_is_units_type_temporal | ( | int | units | ) |
double G_meters_to_units_factor | ( | int | units | ) |
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 |
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(), and NULL.
Referenced by G_get_units_name(), and G_units().