#include <gclio.h>
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... |
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:
start_data
starts the data blockend_data
ends the data blockversion
<version string> version stringellipsoid
<name> := {ell_pars.db} ellipsoid name. See data base ell_pars.db for valid ellipsoid names.map_projection
<name> map projection nameunit_angle
<unit> := {rad | deg | gon} angular unitorigin_latitude
<b0> latitude of originorigin_longitude
<l0> longitude of originscale
<m0> scale factoroffset_x
<x0> offset in xoffset_y
<y0> offset in ystd_parallel_1
<b1> 1st standard parallelstd_parallel_2
<b2> 2nd standard parallelreference_point
<bb> <lb> <hb> latitude, longitude and height of reference point
enum GCL::GCLIO::ecode |
header value codes
bool GCL::GCLIO::is_flag | ( | ecode | flg | ) | const [inline] |
test header value
[in] | flg | header value codes |
References _eflags.
Referenced by print_header(), and write_header().
GCLIO::ecode GCL::GCLIO::code | ( | const char * | name | ) | [static] |
get code
name | keyword string |
References _map, GCL::GCLIO::map_t::code, and GCL::GCLIO::map_t::name.
Referenced by read_header().
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 } }
Referenced by code().