/****************************************************************/
/* geo_def.h This file containss basic structures and functions */
/* for working with them.									    */
									    
/****************************************************************/

#ifndef GEO_DEF_INCLUDED
#define GEO_DEF_INCLUDED


#define MS

/*--- DATUM STRUCTURES -----------------------------------------*/

typedef enum
{
    Airy               =  0,
    AustralianNational =  1,
    Bessel1841         =  2,
    Bessel1841Nambia   =  3,
    Clarke1866         =  4,
    Clarke1880         =  5,
    Everest            =  6,
    Fischer1960Mercury =  7,
    Fischer1968        =  8,
    GRS1967            =  9,
    GRS1980            = 10,
    Helmert1906        = 11,
    Hough              = 12,
    International=13,
    Krassovsky=14,
    ModifiedAiry=15,
    ModifiedEverest=16,
    ModifiedFischer1960=17,
    SouthAmerican1969=18,
    WGS60=19,
    WGS66=20,
    WGS72=21,
    WGS84=22
} TDatum;

typedef struct
{
    char   *Name;
    double Major, Minor;
} TEllipsoid;

static const TEllipsoid Ellipsoid[]= {
  {"Airy",						6377563,6356257},
  {"Australian National",		6378160,6356775},
  {"Bessel 1841",				6377397,6356079},
  {"Bessel 1841 (Nambia)",		6377484,6356166},
  {"Clarke 1866",				6378206,6356583},
  {"Clarke 1880",				6378249,6356515},
  {"Everest",					6377276,6356075},
  {"Fischer 1960 (Mercury)",	6378166,6356784},
  {"Fischer 1968",				6378150,6356768},
  {"GRS 1967",					6378160,6356775},
  {"GRS 1980",					6378137,6356752},
  {"Helmert 1906",				6378200,6356818},
  {"Hough",						6378270,6356794},
  {"International",				6378388,6356912},
  {"Krassovsky",				6378245,6356863},
  {"Modified Airy",				6377340,6356034},
  {"Modified Everest",			6377304,6356103},
  {"Modified Fischer 1960",		6378155,6356773},
  {"South American 1969",		6378160,6356775},
  {"WGS 60",					6378165,6356783},
  {"WGS 66",					6378145,6356760},
  {"WGS 72",					6378135,6356751},
  {"WGS 84",					6378137,6356752}};

/*--- COORDINATE STRUCTURES ------------------------------------*/

typedef struct
{
    double Latitude;
    double Longitude;
    TDatum Datum;
} TCoordinate;

/*--- PROJECTION STRUCTURES ------------------------------------*/
 
typedef enum {pKKJ, pYKJ, pUTM} TProjection;

typedef struct
{
    double  Northing;
    double  Easting;
    int     ZoneNumber;
    TDatum  Datum;
} TProjected;

#endif /*GEO_DEF_INCLUDED*/
