|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-f6f2c534ea
|
GIS Library - Get projection info. More...
#include <string.h>#include <errno.h>#include <unistd.h>#include <stdio.h>#include <grass/gis.h>#include <grass/glocale.h>
Go to the source code of this file.
Macros | |
| #define | PERMANENT "PERMANENT" |
Functions | |
| struct Key_Value * | G_get_projunits (void) |
| Gets units information for location. | |
| struct Key_Value * | G_get_projinfo (void) |
| Gets projection information for location. | |
| struct Key_Value * | G_get_projepsg (void) |
| Gets EPSG information for the current location. | |
| char * | G_get_projwkt (void) |
| Get WKT information for the current location. | |
| char * | G_get_projsrid (void) |
| Get srid (spatial reference id) for the current location. | |
GIS Library - Get projection info.
(C) 1999-2014 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 get_projinfo.c.
| #define PERMANENT "PERMANENT" |
Definition at line 19 of file get_projinfo.c.
Gets EPSG information for the current location.
DEPRECATED: Use G_get_projsrid() instead.
Note: Allocated Key_Value structure should be freed by G_free_key_value().
Definition at line 102 of file get_projinfo.c.
References access, EPSG_FILE, G_debug(), G_file_name(), G_location(), G_projection(), G_read_key_value_file(), GPATH_MAX, NULL, PERMANENT, and PROJECTION_XY.
Referenced by G_get_projinfo(), G_get_projsrid(), and Rast_create_gdal_link().
Gets projection information for location.
Note: Allocated Key_Value structure should be freed by G_free_key_value().
Prints a warning if no projection information available.
Definition at line 61 of file get_projinfo.c.
References _, access, G_file_name(), G_find_key_value(), G_free_key_value(), G_get_projepsg(), G_location(), G_projection(), G_read_key_value_file(), G_set_key_value(), G_warning(), GPATH_MAX, NULL, PERMANENT, PROJECTION_FILE, and PROJECTION_XY.
Referenced by GPJ_get_datum_params(), GPJ_get_ellipsoid_params(), and Rast_create_gdal_link().
Get srid (spatial reference id) for the current location.
Typically an srid will be of the form authority NAME:CODE, e.g. EPSG:4326
This srid is passed to proj_create() using PROJ or OSRSetFromUserInput() using GDAL. Therefore various other forms of srid are possible, e.g. in OSRSetFromUserInput():
Definition at line 235 of file get_projinfo.c.
References _, access, EPSG_FILE, G_asprintf(), G_chop(), G_debug(), G_fatal_error(), G_file_name(), G_find_key_value(), G_free(), G_free_key_value(), G_get_projepsg(), G_location(), G_malloc, G_projection(), G_realloc, GPATH_MAX, Key_Value::nalloc, NULL, PROJECTION_XY, and SRID_FILE.
Gets units information for location.
Note: Allocated Key_Value structure should be freed by G_free_key_value().
Prints a warning if no units information available.
Definition at line 32 of file get_projinfo.c.
References _, access, G_file_name(), G_location(), G_projection(), G_read_key_value_file(), G_warning(), GPATH_MAX, NULL, PERMANENT, PROJECTION_XY, and UNIT_FILE.
Referenced by Rast_create_gdal_link().
Get WKT information for the current location.
Definition at line 126 of file get_projinfo.c.
References _, access, G_chop(), G_debug(), G_fatal_error(), G_file_name(), G_free(), G_location(), G_malloc, G_projection(), G_realloc, GPATH_MAX, Key_Value::nalloc, NULL, PROJECTION_XY, and WKT_FILE.