GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
#include <stdio.h>
#include <stdarg.h>
#include <stdbool.h>
#include <grass/config.h>
#include <grass/datetime.h>
#include <grass/version.h>
#include <sys/types.h>
#include <grass/defs/gis.h>
Go to the source code of this file.
Data Structures | |
struct | Cell_head |
2D/3D raster map header (used also for region) More... | |
struct | G_3dview |
struct | Key_Value |
struct | Option |
Structure that stores option information. More... | |
struct | Flag |
Structure that stores flag info. More... | |
struct | GModule |
Structure that stores module info. More... | |
struct | TimeStamp |
struct | Counter |
struct | Popen |
struct | _Color_Value_ |
struct | _Color_Rule_ |
struct | _Color_Info_ |
struct | Colors |
struct | ilist |
List of integers. More... | |
Macros | |
#define | __attribute__(x) |
#define | GIS_H_VERSION GRASS_HEADERS_VERSION |
#define | GIS_H_DATE GRASS_HEADERS_DATE |
#define | G_gisinit(pgm) G__gisinit(GIS_H_VERSION, (pgm)) |
#define | G_no_gisinit() G__no_gisinit(GIS_H_VERSION) |
#define | TRUE true |
#define | FALSE false |
#define | PRI_OFF_T "ld" |
#define | NEWLINE '\n' |
Cross-platform Newline Character. More... | |
#define | HOST_NEWLINE "\n" |
#define | WARN_UNUSED_RESULT |
Generate warning if function return value is unused. More... | |
#define | U_UNDEFINED -1 |
List of units. More... | |
#define | U_UNKNOWN 0 |
#define | U_ACRES 1 |
#define | U_HECTARES 2 |
#define | U_KILOMETERS 3 |
#define | U_METERS 4 |
#define | U_MILES 5 |
#define | U_FEET 6 |
#define | U_RADIANS 7 |
#define | U_DEGREES 8 |
#define | U_USFEET 9 |
#define | U_YEARS DATETIME_YEAR |
#define | U_MONTHS DATETIME_MONTH |
#define | U_DAYS DATETIME_DAY |
#define | U_HOURS DATETIME_HOUR |
#define | U_MINUTES DATETIME_MINUTE |
#define | U_SECONDS DATETIME_SECOND |
#define | PROJECTION_XY 0 |
Projection code - XY coordinate system (unreferenced data) More... | |
#define | PROJECTION_UTM 1 |
Projection code - UTM. More... | |
#define | PROJECTION_SP 2 |
Projection code - State Plane. More... | |
#define | PROJECTION_LL 3 |
Projection code - Latitude-Longitude. More... | |
#define | PROJECTION_OTHER 99 |
Projection code - other projection (other then noted above) More... | |
#define | PROJECTION_FILE "PROJ_INFO" |
#define | UNIT_FILE "PROJ_UNITS" |
#define | EPSG_FILE "PROJ_EPSG" |
#define | WKT_FILE "PROJ_WKT" |
#define | SRID_FILE "PROJ_SRID" |
#define | CONFIG_DIR ".grass7" |
#define | M_PI 3.14159265358979323846 /* pi */ |
#define | M_PI_2 1.57079632679489661923 /* pi/2 */ |
#define | M_PI_4 0.78539816339744830962 /* pi/4 */ |
#define | M_R2D 57.295779513082320877 /* 180/pi */ |
#define | M_D2R 0.017453292519943295769 /* pi/180 */ |
#define | GRASS_EPSILON 1.0e-15 |
#define | G_VAR_GISRC 0 |
#define | G_VAR_MAPSET 1 |
#define | G_GISRC_MODE_FILE 0 /* files */ |
#define | G_GISRC_MODE_MEMORY 1 /* memory only */ |
#define | TYPE_INTEGER 1 |
#define | TYPE_DOUBLE 2 |
#define | TYPE_STRING 3 |
#define | YES 1 |
#define | NO 0 |
#define | GNAME_MAX 256 |
#define | GMAPSET_MAX 256 |
#define | GPATH_MAX 4096 |
#define | GBASENAME_SEP "_" |
#define | serialize_int32_le(buf, x) |
#define | deserialize_int32_le(buf) |
#define | serialize_int32_be(buf, x) |
#define | deserialize_int32_be(buf) |
#define | GRASS_DIRSEP '/' |
#define | HOST_DIRSEP '/' |
#define | G_DEV_NULL "/dev/null" |
#define | G_INFO_FORMAT_STANDARD 0 /* GRASS_MESSAGE_FORMAT=standard or not defined */ |
#define | G_INFO_FORMAT_GUI 1 /* GRASS_MESSAGE_FORMAT=gui */ |
#define | G_INFO_FORMAT_SILENT 2 /* GRASS_MESSAGE_FORMAT=silent */ |
#define | G_INFO_FORMAT_PLAIN 3 /* GRASS_MESSAGE_FORMAT=plain */ |
#define | G_ICON_CROSS 0 |
#define | G_ICON_BOX 1 |
#define | G_ICON_ARROW 2 |
#define | DEFAULT_FG_COLOR "black" |
#define | DEFAULT_BG_COLOR "white" |
#define | DEFAULT_COLOR_TABLE "viridis" |
#define | G_FATAL_EXIT 0 |
#define | G_FATAL_PRINT 1 |
#define | G_FATAL_RETURN 2 |
#define | ENDIAN_LITTLE 0 |
Endian check. More... | |
#define | ENDIAN_BIG 1 |
#define | ENDIAN_OTHER 2 |
#define | GV_KEY_COLUMN "cat" |
Name of default key column. More... | |
Typedefs | |
typedef int | CELL |
typedef double | DCELL |
typedef float | FCELL |
typedef int64_t | grass_int64 |
typedef grass_int64 | LCELL |
#define CONFIG_DIR ".grass7" |
Definition at line 129 of file gis.h.
Referenced by G_config_path().
#define DEFAULT_BG_COLOR "white" |
Definition at line 371 of file gis.h.
Referenced by D_setup(), D_setup2(), and D_setup_unity().
#define DEFAULT_FG_COLOR "black" |
Definition at line 370 of file gis.h.
Referenced by G_define_standard_option(), and PNG_Graph_set().
#define deserialize_int32_be | ( | buf | ) |
#define deserialize_int32_le | ( | buf | ) |
#define ENDIAN_BIG 1 |
Definition at line 381 of file gis.h.
Referenced by dig__byte_order_out(), and dig_init_portable().
#define ENDIAN_LITTLE 0 |
#define EPSG_FILE "PROJ_EPSG" |
Definition at line 122 of file gis.h.
Referenced by G_get_projepsg().
#define FALSE false |
Definition at line 63 of file gis.h.
Referenced by dig_init_portable(), G__has_required_rule(), G_database_unit_name(), G_parser(), G_recreate_command(), G_temp_element(), G_wait(), GS_delete_surface(), P_Create_Aux2_Table(), P_Create_Aux4_Table(), Rast_close_gdal_write_link(), Rast_is_null_value(), RTreeInitPVars(), V1_open_old_ogr(), Vect__init_head(), Vect_build_pg(), Vect_cat_in_cat_list(), Vect_close(), Vect_delete(), Vect_open_old(), Vect_open_old2(), Vect_open_old_head(), Vect_open_old_head2(), Vect_open_tmp_old(), Vect_open_tmp_update(), Vect_open_update(), Vect_open_update2(), Vect_open_update_head(), Vect_remove_constraints(), Vect_save_fidx(), Vect_save_sidx(), and Vect_set_constraint_field().
#define G_gisinit | ( | pgm | ) | G__gisinit(GIS_H_VERSION, (pgm)) |
Definition at line 53 of file gis.h.
Referenced by Cairo_Graph_set(), main(), PNG_Graph_set(), and PS_Graph_set().
#define G_INFO_FORMAT_PLAIN 3 /* GRASS_MESSAGE_FORMAT=plain */ |
#define G_INFO_FORMAT_SILENT 2 /* GRASS_MESSAGE_FORMAT=silent */ |
#define G_INFO_FORMAT_STANDARD 0 /* GRASS_MESSAGE_FORMAT=standard or not defined */ |
#define G_no_gisinit | ( | ) | G__no_gisinit(GIS_H_VERSION) |
#define G_VAR_GISRC 0 |
Definition at line 152 of file gis.h.
Referenced by G__read_env(), and G__write_env().
#define G_VAR_MAPSET 1 |
Definition at line 153 of file gis.h.
Referenced by db_get_connection(), db_get_default_database_name(), db_get_default_driver_name(), db_get_default_group_name(), db_get_default_schema_name(), db_set_connection(), tgis_get_connection(), tgis_get_database_name(), tgis_get_driver_name(), and tgis_set_connection().
#define GBASENAME_SEP "_" |
Definition at line 173 of file gis.h.
Referenced by G_get_basename_separator().
#define GIS_H_DATE GRASS_HEADERS_DATE |
#define GIS_H_VERSION GRASS_HEADERS_VERSION |
#define GMAPSET_MAX 256 |
Definition at line 168 of file gis.h.
Referenced by G_fully_qualified_name(), G_rename(), I_fopen_signature_file_new(), I_fopen_signature_file_old(), I_fopen_sigset_file_new(), I_fopen_sigset_file_old(), M_do_remove(), Rast3d_open_cell_old_no_header(), Rast__mask_info(), Rast__open_null_write(), Rast__open_old(), Rast__quant_export(), Rast__quant_import(), Rast_get_cellhd(), Rast_mask_info(), Rast_remove_colors(), Vect__delete(), Vect__open_old(), Vect_copy(), and Vect_remove_colors().
#define GNAME_MAX 256 |
Definition at line 167 of file gis.h.
Referenced by fopen_subgroup_file_old(), G__make_mapset_element_misc(), G_double_to_basename_format(), G_fully_qualified_name(), G_has_vector_timestamp(), G_myname(), G_read_vector_timestamp(), G_remove_vector_timestamp(), G_rename(), G_tempfile_pid(), G_write_vector_timestamp(), I_find_subgroup(), I_find_subgroup2(), I_find_subgroup_file(), I_find_subgroup_file2(), I_fopen_signature_file_new(), I_fopen_signature_file_old(), I_fopen_sigset_file_new(), I_fopen_sigset_file_old(), I_fopen_subgroup_file_append(), I_fopen_subgroup_file_new(), M_do_copy(), M_do_remove(), M_find(), main(), parse_fontcap_entry(), Rast3d_make_mapset_map_directory(), Rast3d_open_cell_old_no_header(), Rast__mask_info(), Rast__open_null_write(), Rast__open_old(), Rast__quant_export(), Rast__quant_import(), Rast_get_cellhd(), Rast_get_vrt(), Rast_mask_info(), Rast_put_reclass(), Rast_remove_colors(), Vect__delete(), Vect__open_old(), Vect_copy(), Vect_open_tmp_new(), and Vect_remove_colors().
#define GPATH_MAX 4096 |
Definition at line 170 of file gis.h.
Referenced by db_set_default_connection(), G_config_path(), G_get_available_mapsets(), G_get_projepsg(), G_get_projinfo(), G_get_projsrid(), G_get_projunits(), G_get_projwkt(), G_has_vector_timestamp(), G_make_mapset(), G_make_mapset_element(), G_make_mapset_element_tmp(), G_mapset_permissions(), G_mapset_permissions2(), G_myname(), G_read_datum_table(), G_read_ellipsoid_table(), G_read_vector_timestamp(), G_recursive_remove(), G_remove_vector_timestamp(), G_rename(), G_tempfile_pid(), G_write_projsrid(), G_write_projwkt(), G_write_vector_timestamp(), GPJ_get_datum_transform_by_name(), gsds_get_name(), gvl_file_get_name(), I_fopen_signature_file_new(), I_fopen_signature_file_old(), I_fopen_sigset_file_new(), I_fopen_sigset_file_old(), list_subgroups(), M_do_copy(), M_do_remove(), M_read_list(), parse_fontcap(), parse_fontcap_entry(), Rast3d_range_write(), Rast__check_fp_type(), Rast__close_null(), Rast_create_gdal_link(), Rast_map_is_fp(), Rast_map_type(), Rast_put_reclass(), read_datum_table(), read_ellipsoid_table(), V1_close_nat(), V1_open_new_nat(), V1_open_old_nat(), V2_close_pg(), Vect__delete(), Vect__get_element_path(), Vect__get_path(), Vect__open_old(), Vect__read_head(), Vect__write_head(), Vect_cidx_open(), Vect_cidx_save(), Vect_coor_info(), Vect_copy(), Vect_hist_command(), Vect_open_fidx(), Vect_open_topo(), Vect_remove_colors(), Vect_save_fidx(), Vect_save_frmt(), Vect_save_sidx(), Vect_save_topo(), and Vect_write_dblinks().
#define GRASS_DIRSEP '/' |
Definition at line 208 of file gis.h.
Referenced by G_convert_dirseps_from_host(), and G_convert_dirseps_to_host().
#define GV_KEY_COLUMN "cat" |
Name of default key column.
Definition at line 388 of file gis.h.
Referenced by G_define_standard_option().
#define HOST_DIRSEP '/' |
Definition at line 213 of file gis.h.
Referenced by G__location_path(), G_config_path(), G_convert_dirseps_from_host(), G_convert_dirseps_to_host(), I_find_subgroup(), I_find_subgroup2(), I_find_subgroup_file(), and I_find_subgroup_file2().
#define HOST_NEWLINE "\n" |
Definition at line 77 of file gis.h.
Referenced by Vect_write_ascii_head().
#define M_PI 3.14159265358979323846 /* pi */ |
Definition at line 134 of file gis.h.
Referenced by COM_Text_rotation(), G_math_findzc(), RTreeRectVolume(), and sphere_volume().
#define M_PI_2 1.57079632679489661923 /* pi/2 */ |
Definition at line 137 of file gis.h.
Referenced by G_math_findzc(), and G_rhumbline_lat_from_lon().
#define M_R2D 57.295779513082320877 /* 180/pi */ |
Definition at line 143 of file gis.h.
Referenced by IL_secpar_loop_2d().
#define NO 0 |
Definition at line 164 of file gis.h.
Referenced by G_define_option(), G_define_standard_option(), M_define_option(), N_define_standard_option(), and Rast3d_set_window_params().
#define PRI_OFF_T "ld" |
Definition at line 69 of file gis.h.
Referenced by dig__read_head(), dig__write_head(), dig_Rd_Plus_head(), dig_Wr_Plus_head(), dig_write_cidx_head(), V1_delete_line_nat(), V1_delete_line_ogr(), and V1_delete_line_pg().
#define PROJECTION_FILE "PROJ_INFO" |
Definition at line 120 of file gis.h.
Referenced by G_get_projinfo().
#define PROJECTION_LL 3 |
Projection code - Latitude-Longitude.
Definition at line 116 of file gis.h.
Referenced by G_adjust_Cell_head(), G_adjust_Cell_head3(), G_adjust_window_ll(), G_area_of_cell_at_row(), G_area_of_polygon(), G_database_projection_name(), G_distance(), G_format_easting(), G_format_northing(), G_format_resolution(), G_limit_north(), G_limit_south(), G_projection_name(), G_projection_units(), G_scan_easting(), G_scan_northing(), G_scan_resolution(), G_shortest_way(), GPJ_osr_to_grass(), Rast__create_window_mapping(), Rast_get_vrt(), and Vect_get_proj_name().
#define PROJECTION_OTHER 99 |
Projection code - other projection (other then noted above)
Definition at line 118 of file gis.h.
Referenced by G_projection_name(), GPJ_osr_to_grass(), and Vect_get_proj_name().
#define PROJECTION_UTM 1 |
Projection code - UTM.
Definition at line 112 of file gis.h.
Referenced by G_database_projection_name(), G_projection_name(), G_projection_units(), GPJ_osr_to_grass(), and Vect_get_proj_name().
#define PROJECTION_XY 0 |
Projection code - XY coordinate system (unreferenced data)
Definition at line 110 of file gis.h.
Referenced by G_database_projection_name(), G_get_projepsg(), G_get_projinfo(), G_get_projunits(), G_projection_name(), G_projection_units(), and Vect_get_proj_name().
#define serialize_int32_be | ( | buf, | |
x | |||
) |
#define serialize_int32_le | ( | buf, | |
x | |||
) |
#define SRID_FILE "PROJ_SRID" |
Definition at line 124 of file gis.h.
Referenced by G_write_projsrid().
#define TRUE true |
Definition at line 59 of file gis.h.
Referenced by dig_init_portable(), G__has_required_rule(), G_compare_projections(), G_owner(), G_recreate_command_original_path(), gsd_scalebar(), P_Create_Aux2_Table(), P_Create_Aux4_Table(), V1_close_nat(), V1_delete_line_pg(), V1_read_next_line_nat(), Vect__get_path(), Vect_attach_isles(), Vect_build_partial(), Vect_cat_in_cat_list(), Vect_close(), Vect_open_old_head(), Vect_open_old_head2(), Vect_open_tmp_old(), Vect_open_tmp_update(), Vect_open_update(), Vect_open_update2(), Vect_open_update_head(), Vect_save_sidx(), Vect_set_category_index_update(), Vect_set_constraint_field(), Vect_set_release_support(), and Vect_sfa_get_num_features().
#define TYPE_DOUBLE 2 |
Definition at line 161 of file gis.h.
Referenced by G_define_standard_option(), and N_define_standard_option().
#define TYPE_INTEGER 1 |
Definition at line 160 of file gis.h.
Referenced by G_define_standard_option(), and N_define_standard_option().
#define TYPE_STRING 3 |
Definition at line 162 of file gis.h.
Referenced by G_define_standard_option(), M_define_option(), N_define_standard_option(), and Rast3d_set_window_params().
#define U_ACRES 1 |
Definition at line 92 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_spatial(), G_meters_to_units_factor_sq(), and G_units().
#define U_DAYS DATETIME_DAY |
Definition at line 104 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_temporal(), and G_units().
#define U_DEGREES 8 |
Definition at line 99 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_spatial(), G_projection_units(), and G_units().
#define U_FEET 6 |
Definition at line 97 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_spatial(), G_meters_to_units_factor(), G_meters_to_units_factor_sq(), and G_units().
#define U_HECTARES 2 |
Definition at line 93 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_spatial(), G_meters_to_units_factor_sq(), and G_units().
#define U_HOURS DATETIME_HOUR |
Definition at line 105 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_temporal(), and G_units().
#define U_KILOMETERS 3 |
Definition at line 94 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_spatial(), G_meters_to_units_factor(), G_meters_to_units_factor_sq(), and G_units().
#define U_METERS 4 |
Definition at line 95 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_spatial(), G_meters_to_units_factor(), G_meters_to_units_factor_sq(), G_projection_units(), and G_units().
#define U_MILES 5 |
Definition at line 96 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_spatial(), G_meters_to_units_factor(), G_meters_to_units_factor_sq(), and G_units().
#define U_MINUTES DATETIME_MINUTE |
Definition at line 106 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_temporal(), and G_units().
#define U_MONTHS DATETIME_MONTH |
Definition at line 103 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_temporal(), and G_units().
#define U_RADIANS 7 |
Definition at line 98 of file gis.h.
Referenced by G_is_units_type_spatial().
#define U_SECONDS DATETIME_SECOND |
Definition at line 107 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_temporal(), and G_units().
#define U_UNDEFINED -1 |
List of units.
Definition at line 90 of file gis.h.
Referenced by G_database_unit(), and G_projection_units().
#define U_UNKNOWN 0 |
Definition at line 91 of file gis.h.
Referenced by G_get_units_name(), G_projection_units(), and G_units().
#define U_USFEET 9 |
Definition at line 100 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_spatial(), G_meters_to_units_factor(), G_meters_to_units_factor_sq(), and G_units().
#define U_YEARS DATETIME_YEAR |
Definition at line 102 of file gis.h.
Referenced by G_get_units_name(), G_is_units_type_temporal(), and G_units().
#define UNIT_FILE "PROJ_UNITS" |
Definition at line 121 of file gis.h.
Referenced by G_get_projunits().
#define WARN_UNUSED_RESULT |
#define WKT_FILE "PROJ_WKT" |
Definition at line 123 of file gis.h.
Referenced by G_write_projwkt().
#define YES 1 |
Definition at line 163 of file gis.h.
Referenced by G_define_standard_option(), and N_define_standard_option().
typedef int64_t grass_int64 |
typedef grass_int64 LCELL |
anonymous enum |
Element types identifiers (enum)
Identifies various element types. Element can be raster map, vector map, etc.
Enumerator | |
---|---|
G_ELEMENT_RASTER | raster |
G_ELEMENT_RASTER3D | 3d raster |
G_ELEMENT_VECTOR | vector |
G_ELEMENT_ASCIIVECTOR | ASCII vector |
G_ELEMENT_LABEL | labels |
G_ELEMENT_REGION | region |
G_ELEMENT_GROUP | group |
enum rule_type |
enum STD_FLG |
Standard flag identifiers (enum)
Identifies of all recognized standard flags.
Used by the G_parser() system.
Enumerator | |
---|---|
G_FLG_UNDEFINED | |
G_FLG_V_TABLE | do not create attribute table |
G_FLG_V_TOPO | do not build topology |
enum STD_OPT |
Standard option identifiers (enum)
Identifies of all recognized standard options.
The term old in the descriptions means existing map which is supposed to exist before the module is called. On the other hand, the term new in the descriptions means that the map is not supposed to exist and that module will create one.
Used by the G_parser() system.
IMPORTANT NOTE: when adding new item to STD_OPT you should also update STD_OPT_STRINGS array in general/g.parser/standard_option.c.