get_datum.c File Reference

#include "gis.h"
#include "glocale.h"
#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>

Include dependency graph for get_datum.c:

Go to the source code of this file.

Functions

int G_get_datum_parameters (double *a, double *e2, double *f, double *dx, double *dy, double *dz)
 get datum parameters from database
int G_get_datum_parameters7 (double *a, double *e2, double *f, double *dx, double *dy, double *dz, double *rx, double *ry, double *rz, double *m)
 get datum parameters from database


Function Documentation

int G_get_datum_parameters ( double *  a,
double *  e2,
double *  f,
double *  dx,
double *  dy,
double *  dz 
)

get datum parameters from database

This function sets the datum parameters for the map datum of the current database. These are the semi-major axis a (in meters), the eccentricity squared e2 and the inverse flattening f of the spheroid associated with the database and the x shift dx, the y shift dy and the z shift dz of the map datum associated with the database. If there is no map datum explicitely associated with the actual database, the standard values for the WGS84 spheroid and map datum are set. The funcion returns 1 on success, 0 if the default WGS84 parameters are set. If an error occurs, the function dies with a diagnostic message (HINT: to change, very bad practice to die in a library function!).

Parameters:
a 
e2 
f 
dx 
dy 
dz 
Returns:
int

Definition at line 54 of file get_datum.c.

References G__file_name(), G_datum_shift(), G_fatal_error(), G_find_key_value(), G_get_datum_by_name(), G_get_spheroid_by_name(), G_read_key_value_file(), NULL, and PERMANENT.

int G_get_datum_parameters7 ( double *  a,
double *  e2,
double *  f,
double *  dx,
double *  dy,
double *  dz,
double *  rx,
double *  ry,
double *  rz,
double *  m 
)

get datum parameters from database

This is a placeholder as the 7 parameter datum shift support is not implemented yet.

Parameters:
a 
e2 
f 
dx 
dy 
dz 
rx 
ry 
rz 
m 
Returns:
int

Definition at line 160 of file get_datum.c.


Generated on Wed Aug 23 17:49:39 2006 for GRASS by  doxygen 1.4.7