GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
GProj library - Functions for re-projecting point data. More...
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/gprojects.h>
#include <grass/glocale.h>
Go to the source code of this file.
Macros | |
#define | MAIN |
#define | FINDERFUNC set_proj_lib |
#define | PERMANENT "PERMANENT" |
#define | MAX_PARGS 100 |
Functions | |
int | pj_get_kv (struct pj_info *info, struct Key_Value *in_proj_keys, struct Key_Value *in_units_keys) |
Create a pj_info struct Co-ordinate System definition from a set of PROJ_INFO / PROJ_UNITS-style key-value pairs. More... | |
int | pj_get_string (struct pj_info *info, char *str) |
int | GPJ_get_equivalent_latlong (struct pj_info *pjnew, struct pj_info *pjold) |
Define a latitude / longitude co-ordinate system with the same ellipsoid and datum parameters as an existing projected system. More... | |
const char * | set_proj_lib (const char *name) |
int | pj_print_proj_params (struct pj_info *iproj, struct pj_info *oproj) |
Print projection parameters as used by PROJ.4 for input and output co-ordinate systems. More... | |
GProj library - Functions for re-projecting point data.
(C) 2003-2008 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_proj.c.
#define FINDERFUNC set_proj_lib |
Definition at line 29 of file get_proj.c.
Referenced by pj_get_kv(), and pj_get_string().
#define MAIN |
Definition at line 26 of file get_proj.c.
#define MAX_PARGS 100 |
Definition at line 31 of file get_proj.c.
Referenced by pj_get_string().
#define PERMANENT "PERMANENT" |
Definition at line 30 of file get_proj.c.
int GPJ_get_equivalent_latlong | ( | struct pj_info * | pjnew, |
struct pj_info * | pjold | ||
) |
Define a latitude / longitude co-ordinate system with the same ellipsoid and datum parameters as an existing projected system.
This function is useful when projected co-ordinates need to be simply converted to and from latitude / longitude.
pjnew | Pointer to pj_info struct for geographic co-ordinate system that will be created |
pjold | Pointer to pj_info struct for existing projected co-ordinate system |
Definition at line 352 of file get_proj.c.
int pj_get_kv | ( | struct pj_info * | info, |
struct Key_Value * | in_proj_keys, | ||
struct Key_Value * | in_units_keys | ||
) |
Create a pj_info struct Co-ordinate System definition from a set of PROJ_INFO / PROJ_UNITS-style key-value pairs.
This function takes a GRASS-style co-ordinate system definition as stored in the PROJ_INFO and PROJ_UNITS files and processes it to create a pj_info representation for use in re-projecting with pj_do_proj(). In addition to the parameters passed to it it may also make reference to the system ellipse.table and datum.table files if necessary.
info | Pointer to a pj_info struct (which must already exist) into which the co-ordinate system definition will be placed |
in_proj_keys | PROJ_INFO-style key-value pairs |
in_units_keys | PROJ_UNITS-style key-value pairs |
Definition at line 61 of file get_proj.c.
References err, FINDERFUNC, G_fatal_error(), G_find_key_value(), G_free(), G_warning(), GPJ__get_datum_params(), GPJ__get_ellipsoid_params(), GPJ_get_default_datum_params_by_name(), NULL, and sprintf().
Referenced by GPJ_grass_to_osr().
int pj_get_string | ( | struct pj_info * | info, |
char * | str | ||
) |
Definition at line 256 of file get_proj.c.
References FINDERFUNC, G_fatal_error(), G_warning(), MAX_PARGS, NULL, dialogs::s, and sprintf().
int pj_print_proj_params | ( | struct pj_info * | iproj, |
struct pj_info * | oproj | ||
) |
Print projection parameters as used by PROJ.4 for input and output co-ordinate systems.
iproj | 'Input' co-ordinate system |
oproj | 'Output' co-ordinate system |
Definition at line 396 of file get_proj.c.
References NULL.
const char* set_proj_lib | ( | const char * | name | ) |
Definition at line 366 of file get_proj.c.
References buf, G_free(), G_gisbase(), forms::gisbase, NULL, and sprintf().