GRASS GIS 7 Programmer's Manual  7.2.0(2016)-exported
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_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...
 

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

§ PERMANENT

#define PERMANENT   "PERMANENT"

Definition at line 16 of file get_projinfo.c.

Referenced by G_get_projepsg(), G_get_projinfo(), and G_get_projunits().

Function Documentation

§ G_get_projepsg()

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 G_debug(), G_file_name(), G_location(), G_projection(), G_read_key_value_file(), NULL, and PERMANENT.

§ 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.

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(), NULL, and PERMANENT.

Referenced by GPJ_get_datum_params().

§ G_get_projunits()

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(), NULL, and PERMANENT.