GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
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. More... | |
struct Key_Value * | G_get_projinfo (void) |
Gets projection information for location. More... | |
struct Key_Value * | G_get_projepsg (void) |
Gets EPSG information for the current location. More... | |
char * | G_get_projwkt (void) |
Get WKT information for the current location. More... | |
char * | G_get_projsrid (void) |
Get srid (spatial reference id) for the current location. More... | |
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.
Referenced by G_get_projepsg(), G_get_projinfo(), and G_get_projunits().
struct Key_Value* G_get_projepsg | ( | void | ) |
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 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().
struct Key_Value* G_get_projinfo | ( | void | ) |
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 _, 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().
char* G_get_projsrid | ( | void | ) |
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():
PROJJSON (PROJ >= 6.2)
Definition at line 233 of file get_projinfo.c.
struct Key_Value* G_get_projunits | ( | void | ) |
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 _, G_file_name(), G_location(), G_projection(), G_read_key_value_file(), G_warning(), GPATH_MAX, NULL, PERMANENT, PROJECTION_XY, and UNIT_FILE.
char* G_get_projwkt | ( | void | ) |
Get WKT information for the current location.
Definition at line 127 of file get_projinfo.c.