GCL::GCLIO Class Reference

GCL file I/O class. More...

#include <gclio.h>

List of all members.

Public Types

enum  ecode {
  UNKNOWN = 1<<0, VERSION = 1<<1, ELLIPSOID = 1<<2, MAP_PROJECTION = 1<<3,
  UNIT_ANGLE = 1<<4, ORIGIN_LATITUDE = 1<<5, ORIGIN_LONGITUDE = 1<<6, SCALE = 1<<7,
  OFFSET_X = 1<<8, OFFSET_Y = 1<<9, STD_PARALLEL_1 = 1<<10, STD_PARALLEL_2 = 1<<11,
  REFERENCE_POINT = 1<<12, START_DATA = 1<<29, END_DATA = 1<<30, END_OF_MAP = 1<<31
}
 header value codes More...

Public Member Functions

bool is_flag (ecode flg) const
 test header value
UnitAngle::ecode get_acode () const
 get angular unit code
constructors/destructors
 GCLIO ()
 default constructor
virtual ~GCLIO ()
 destructor
read/write/print file header
bool read_header (istream &is)
 read header
void write_header (ostream &os) const
 write header
void print_header (ostream &os) const
 print header

Static Public Member Functions

static ecode code (const char *name)
 get code

Public Attributes

int _major
 major version number
int _minor
 minor version number
int _patch
 patch version number
int _eflags
 which header information is defined
string _ell_name
 ellipoid name
UnitAngle::ecode _acode
 angular unit
string _map_name
 map projection name
double _b0
 latitude of origin
double _l0
 longitude of origin
double _m0
 scale factor
double _x0
 offset in x
double _y0
 offset in y
double _b1
 1st standard parallel
double _b2
 2nd standard parallel
double _bb
 latitude of reference point
double _lb
 longitude of reference point
double _hb
 height of reference point

Static Private Attributes

static map_t _map []
 map

Classes

struct  map_t
 map structure More...


Detailed Description

GCL file I/O class.

This class provides some functions for input and output of GCL-files.

In general the GCL file is a simple text file consiting of a header block followed by the data block. The GCL format is keyword driven.

Header syntacs: keyword [argument ...]

Data block: The data block starts with the keyword start_data and ends with EOF or the keyword end_data.

Keywords, arguments and description:

See also:
Ellipsoid parameter data base: tests/ell_pars.db
Author:
Dirk Stallmann

Member Enumeration Documentation

header value codes

Enumerator:
UNKNOWN  unknown
VERSION  version
ELLIPSOID  ellipsoid
MAP_PROJECTION  map projection
UNIT_ANGLE  angular unit
ORIGIN_LATITUDE  latitude of origin
ORIGIN_LONGITUDE  longitude of origin
SCALE  scale
OFFSET_X  offset in x
OFFSET_Y  offset in y
STD_PARALLEL_1  latitude of 1st standard parallel
STD_PARALLEL_2  latitude of 2nd standard parallel
REFERENCE_POINT  reference point coordinates
START_DATA  start of coordinate data
END_DATA  end of coordinate data
END_OF_MAP  end of coordinate data


Member Function Documentation

bool GCL::GCLIO::is_flag ( ecode  flg  )  const [inline]

test header value

Parameters:
[in] flg header value codes
Returns:
true = header value exist, false = header value exist

References _eflags.

Referenced by print_header(), and write_header().

GCLIO::ecode GCL::GCLIO::code ( const char *  name  )  [static]

get code

Parameters:
name keyword string
Returns:
code header value code

References _map, GCL::GCLIO::map_t::code, and GCL::GCLIO::map_t::name.

Referenced by read_header().


Member Data Documentation

GCLIO::map_t GCL::GCLIO::_map [static, private]

Initial value:

{
    { UNKNOWN,          "unknown" },
    { VERSION,          "version" },
    { ELLIPSOID,        "ellipsoid" },
    { MAP_PROJECTION,   "map_projection" },
    { UNIT_ANGLE,       "unit_angle" },
    { ORIGIN_LATITUDE,      "origin_latitude" },
    { ORIGIN_LONGITUDE,     "origin_longitude" },
    { SCALE,            "scale" },
    { OFFSET_X,         "offset_x" },
    { OFFSET_Y,         "offset_y" },
    { STD_PARALLEL_1,   "std_parallel_1" },
    { STD_PARALLEL_2,   "std_parallel_2" },
    { REFERENCE_POINT,  "reference_point" },
    { START_DATA,       "start_data" },
    { END_DATA,         "end_data" },
    { END_OF_MAP,       0 }
}
map

Referenced by code().


The documentation for this class was generated from the following files:

Generated on Wed Aug 6 15:31:16 2008 by  doxygen 1.5.5