GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72999
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
get_projinfo.c File Reference

GIS Library - Get projection info. More...

#include <unistd.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Include dependency graph for get_projinfo.c:

Go to the source code of this file.

Macros

#define PERMANENT   "PERMANENT"
 

Functions

struct Key_ValueG_get_projunits (void)
 Gets units information for location. More...
 
struct Key_ValueG_get_projinfo (void)
 Gets projection information for location. More...
 
struct Key_ValueG_get_projepsg (void)
 Gets EPSG information for the current location. More...
 

Detailed Description

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.

Macro Definition Documentation

#define PERMANENT   "PERMANENT"

Function Documentation

struct Key_Value* G_get_projepsg ( void  )

Gets EPSG information for the current location.

Note: Allocated Key_Value structure should be freed by G_free_key_value().

Returns
pointer to Key_Value structure with key/value pairs
NULL when EPSG code is defined for location

Definition at line 85 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 Rast_create_gdal_link().

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.

Returns
pointer to Key_Value structure with key/value pairs
NULL on failure

Definition at line 58 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_FILE, and PROJECTION_XY.

Referenced by GPJ_get_datum_params(), GPJ_get_ellipsoid_params(), and Rast_create_gdal_link().

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.

Returns
pointer to Key_Value structure with key/value pairs
NULL on failure

Definition at line 29 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.

Referenced by Rast_create_gdal_link().