GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ellipse.c File Reference

GProj library - Functions for reading datum parameters from the location database. More...

#include <unistd.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include <grass/gprojects.h>
#include "local_proto.h"
Include dependency graph for ellipse.c:

Go to the source code of this file.

Functions

int GPJ_get_ellipsoid_params (double *a, double *e2, double *rf)
 
int GPJ__get_ellipsoid_params (struct Key_Value *proj_keys, double *a, double *e2, double *rf)
 
int GPJ_get_ellipsoid_by_name (const char *name, struct gpj_ellps *estruct)
 looks up ellipsoid in ellipsoid table and returns the a, e2 parameters for the ellipsoid More...
 
struct ellps_listread_ellipsoid_table (int fatal)
 
void GPJ_free_ellps (struct gpj_ellps *estruct)
 
void free_ellps_list (struct ellps_list *elist)
 

Detailed Description

GProj library - Functions for reading datum parameters from the location database.

Author
Paul Kelly <paul-grass stjohnspoint.co.uk>

(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 ellipse.c.

Function Documentation

void free_ellps_list ( struct ellps_list elist)
int GPJ__get_ellipsoid_params ( struct Key_Value *  proj_keys,
double *  a,
double *  e2,
double *  rf 
)
void GPJ_free_ellps ( struct gpj_ellps *  estruct)

Definition at line 275 of file ellipse.c.

References G_free().

Referenced by GPJ__get_ellipsoid_params(), and GPJ_grass_to_osr().

int GPJ_get_ellipsoid_by_name ( const char *  name,
struct gpj_ellps *  estruct 
)

looks up ellipsoid in ellipsoid table and returns the a, e2 parameters for the ellipsoid

Returns
1 if ok, -1 if not found in table

Definition at line 131 of file ellipse.c.

References ellps_list::a, ellps_list::es, free_ellps_list(), G_store(), G_strcasecmp(), ellps_list::longname, ellps_list::name, ellps_list::next, NULL, read_ellipsoid_table(), and ellps_list::rf.

Referenced by GPJ__get_ellipsoid_params(), and GPJ_grass_to_osr().

int GPJ_get_ellipsoid_params ( double *  a,
double *  e2,
double *  rf 
)

This routine returns the ellipsoid parameters from the database. If the PROJECTION_FILE exists in the PERMANENT mapset, read info from that file, otherwise return WGS 84 values.

Returns
1 ok, 0 default values used. Dies with diagnostic if there is an error

Definition at line 37 of file ellipse.c.

References G_create_key_value(), G_free_key_value(), G_get_projinfo(), GPJ__get_ellipsoid_params(), and NULL.