get_ellipse.c File Reference

#include <grass/gis.h>
#include <grass/glocale.h>
#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

Include dependency graph for get_ellipse.c:

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


Function Documentation

void ellipsoid_table_file ( char *  file  ) 

Definition at line 371 of file get_ellipse.c.

References G_gisbase().

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.

Parameters:
n 
Returns:
char *

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);

Parameters:
n 
Returns:
char *
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 below zero or 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);

Parameters:
n 
Returns:
char *
get ellipsoid name This function returns a pointer to the short name for the nth ellipsoid. If n is less than 0 or greater than the number of known ellipsoids, it returns a NULL pointer.

Parameters:
n 
Returns:
char *

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.

Parameters:
name 
a 
e2 
Returns:
int
get ellipsoid parameters 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.

Parameters:
name 
a 
e2 
Returns:
int

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.

Parameters:
a 
e2 
Returns:
int
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.

Parameters:
a 
e2 
Returns:
int

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.

Parameters:
name 
a 
e2 
f 
Returns:
int

Definition at line 290 of file get_ellipse.c.

References G_strcasecmp().


Generated on Sun Apr 6 17:32:19 2008 for GRASS by  doxygen 1.5.5