#include <grass/gis.h>
#include <grass/glocale.h>
#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
Go to the source code of this file.
Data Structures | |
struct | table |
Functions | |
void | ellipsoid_table_file (char *) |
int | G_get_ellipsoid_parameters (double *a, double *e2) |
get ellipsoid parameters | |
int | G_get_ellipsoid_by_name (const char *name, double *a, double *e2) |
get ellipsoid by name | |
char * | G_ellipsoid_name (int n) |
return ellopsoid name | |
int | G_get_spheroid_by_name (const char *name, double *a, double *e2, double *f) |
get spheroid parameters by name | |
char * | G_ellipsoid_description (int n) |
get description for nth ellipsoid |
void ellipsoid_table_file | ( | char * | file | ) |
char* G_ellipsoid_description | ( | int | n | ) |
get description for nth ellipsoid
This function returns a pointer to the description text for the nth ellipsoid. If n is less than 0 or greater than the number of known ellipsoids, it returns a NULL pointer.
n |
Definition at line 323 of file get_ellipse.c.
References NULL.
char* G_ellipsoid_name | ( | int | n | ) |
return ellopsoid name
This routine returns a pointer to a string containg the name for the nth ellipsoid in the GRASS ellipsoid table; NULL when n is too large. It can be used as follows:
int n ; char *name ; for ( n=0 ; name=G_ellipsoid_name(n) ; n++ ) fprintf(stdout, "%s\n", name);
n |
int n ; char *name ; for ( n=0 ; name=G_ellipsoid_name(n) ; n++ ) fprintf(stdout, "%s\n", name);
n |
n |
Definition at line 257 of file get_ellipse.c.
References NULL.
Referenced by G_ask_ellipse_name().
int G_get_ellipsoid_by_name | ( | const char * | name, | |
double * | a, | |||
double * | e2 | |||
) |
get ellipsoid by name
This routine returns the semi-major axis a (in meters) and eccentricity squared e2 for the named ellipsoid. Returns 1 if name is a known ellipsoid, 0 otherwise.
name | ||
a | ||
e2 |
name | ||
a | ||
e2 |
Definition at line 181 of file get_ellipse.c.
References G_strcasecmp().
Referenced by G_ask_ellipse_name(), and G_get_ellipsoid_parameters().
int G_get_ellipsoid_parameters | ( | double * | a, | |
double * | e2 | |||
) |
get ellipsoid parameters
This routine returns the semi-major axis a (in meters) and the eccentricity squared e2 for the ellipsoid associated with the database. If there is no ellipsoid explicitly associated with the database, it returns the values for the WGS 84 ellipsoid.
a | ||
e2 |
a | ||
e2 |
Definition at line 63 of file get_ellipse.c.
References G__file_name(), G_fatal_error(), G_find_key_value(), G_get_ellipsoid_by_name(), G_read_key_value_file(), NULL, and PERMANENT.
Referenced by G_begin_cell_area_calculations(), G_begin_distance_calculations(), G_begin_polygon_area_calculations(), and G_database_ellipse_name().
int G_get_spheroid_by_name | ( | const char * | name, | |
double * | a, | |||
double * | e2, | |||
double * | f | |||
) |
get spheroid parameters by name
This function returns the semi-major axis a (in meters), the eccentricity squared e2 and the inverse flattening f for the named ellipsoid. Returns 1 if name is a known ellipsoid, 0 otherwise.
name | ||
a | ||
e2 | ||
f |
Definition at line 290 of file get_ellipse.c.
References G_strcasecmp().