Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
bgeo_lvcs Class Reference

#include <bgeo_lvcs.h>

Inheritance diagram for bgeo_lvcs:
Inheritance graph
[legend]

List of all members.

Public Types

enum  LenUnits { FEET, METERS }
enum  AngUnits { RADIANS, DEG }
enum  cs_names { wgs84 = 0, nad27n, wgs72, NumNames }

Public Member Functions

 bgeo_lvcs (double orig_lat=0, double orig_lon=0, double orig_elev=0, cs_names cs_name=wgs84, double lat_scale=0, double lon_scale=0, AngUnits ang_unit=DEG, LenUnits len_unit=METERS, double lox=0, double loy=0, double theta=0)
 Radians from y axis to north in local co-ordinates.
 bgeo_lvcs (double orig_lat, double orig_lon, double orig_elev, cs_names cs_name, AngUnits ang_unit=DEG, LenUnits len_unit=METERS)
 A simplified constructor that takes the origin and specified coordinate system.
 bgeo_lvcs (double lat_low, double lon_low, double lat_high, double lon_high, double elev, cs_names cs_name=wgs84, AngUnits ang_unit=DEG, LenUnits elev_unit=METERS)
 This constructor takes a lat-lon bounding box and erects a local vertical coordinate system at the center.
 bgeo_lvcs (const bgeo_lvcs &)
bgeo_lvcsoperator= (const bgeo_lvcs &)
void local_to_global (const double lx, const double ly, const double lz, cs_names cs_name, double &lon, double &lat, double &gz, AngUnits output_ang_unit=DEG, LenUnits output_len_unit=METERS)
 Converts pointin, given in local vertical coord system, to pointout in the global coord system given by the string lobalcs_name.
void global_to_local (const double lon, const double lat, const double gz, cs_names cs_name, double &lx, double &ly, double &lz, AngUnits output_ang_unit=DEG, LenUnits output_len_unit=METERS)
 Converts pointin, given in a global coord system described by global_cs_name, to pointout in the local vertical coord system.
void radians_to_degrees (double &lon, double &lat, double &z)
double radians_to_degrees (const double val)
void degrees_to_dms (double, int &degrees, int &minutes, double &seconds)
void radians_to_dms (double, int &degrees, int &minutes, double &seconds)
void get_origin (double &lat, double &lon, double &elev) const
 return the origin of the local system.
void get_scale (double &lat, double &lon) const
 return the scale for lat lon and elevation.
void get_transform (double &lox, double &loy, double &theta) const
 Return the compass alignment transform.
void set_transform (const double lox, const double loy, const double theta)
 Set the compass alignment transform.
void set_origin (const double lon, const double lat, const double elev)
 Set the origin of the local system.
cs_names get_cs_name () const
 return the coordinate system.
LenUnits local_length_unit () const
AngUnits geo_angle_unit () const
void print (vcl_ostream &) const
 Print internals on strm.
bool save (vcl_string fname)
void read (vcl_istream &strm)
 Read internals from strm.
bool operator== (bgeo_lvcs const &r) const
virtual void b_write (vsl_b_ostream &os) const
 Binary save self to stream.
virtual void b_read (vsl_b_istream &is)
 Binary load self from stream.
void x_write (vcl_ostream &os, vcl_string element_name) const
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Static Public Member Functions

static bgeo_lvcs::cs_names str_to_enum (const char *)

Static Public Attributes

static GEO_DLL_DATA const char * cs_name_strings [] = { "wgs84", "nad27n", "wgs72"}

Protected Member Functions

void compute_scale ()
void local_transform (double &x, double &y)
 Transform from local co-ordinates to north=y,east=x.
void inverse_local_transform (double &x, double &y)
 Transform from north=y,east=x aligned axes to local co-ordinates.
void set_angle_conversions (AngUnits ang_unit, double &to_radians, double &to_degrees)
void set_length_conversions (LenUnits len_unit, double &to_meters, double &to_feet)

Protected Attributes

cs_names local_cs_name_
 Name of local frame's coord system ("nad27n", "wgs84" etc.)
double localCSOriginLat_
 Lat (in radians) of the origin.
double localCSOriginLon_
 Lon (in radians) of the origin.
double localCSOriginElev_
 Elev (in radians) of the origin.
double lat_scale_
 radians/meter along lat at the origin)
double lon_scale_
 radians/meter along lon at the origin)
AngUnits geo_angle_unit_
 lat lon angle unit (degrees or radians)
LenUnits localXYZUnit_
 Input (x,y,z) unit (meters or feet) in local CS.
double lox_
 Origin in local co-ordinates.
double loy_
 Origin in local co-ordinates.
double theta_
 Direction of north in radians.

Friends

vcl_ostream & operator<< (vcl_ostream &os, const bgeo_lvcs &local_coord_sys)
vcl_istream & operator>> (vcl_istream &os, bgeo_lvcs &local_coord_sys)

Detailed Description

Definition at line 29 of file bgeo_lvcs.h.


Member Enumeration Documentation

Enumerator:
RADIANS 
DEG 

Definition at line 35 of file bgeo_lvcs.h.

Enumerator:
wgs84 
nad27n 
wgs72 
NumNames 

Definition at line 36 of file bgeo_lvcs.h.

Enumerator:
FEET 
METERS 

Definition at line 34 of file bgeo_lvcs.h.


Constructor & Destructor Documentation

bgeo_lvcs::bgeo_lvcs ( double  orig_lat = 0,
double  orig_lon = 0,
double  orig_elev = 0,
cs_names  cs_name = wgs84,
double  lat_scale = 0,
double  lon_scale = 0,
AngUnits  ang_unit = DEG,
LenUnits  len_unit = METERS,
double  lox = 0,
double  loy = 0,
double  theta = 0 
)

Radians from y axis to north in local co-ordinates.

Parameters:
orig_latlatitude of LVCS orig in radians.
orig_lonlongitude of LVCS orig in radians.
orig_elevelev of orig LVCS in radians.
cs_namenad27n, wgs84, wgs72
lat_scaleradians/meter along lat (custom geoid)
lon_scaleradians/meter along lon (custom geoid)
ang_unitangle units
len_unitinput in LVCS in these lenght units.
loxOrigin in local co-ordinates.
loyOrigin in local co-ordinates.

Definition at line 81 of file bgeo_lvcs.cxx.

bgeo_lvcs::bgeo_lvcs ( double  orig_lat,
double  orig_lon,
double  orig_elev,
cs_names  cs_name,
AngUnits  ang_unit = DEG,
LenUnits  len_unit = METERS 
)

A simplified constructor that takes the origin and specified coordinate system.

The units of the input latitude and longitude values are assumed to be the same as specified by ang_unit. Similarly, the unit of elevation is specified by elev_unit. The local cartesian system is aligned with North and East

Parameters:
orig_elevsimplified interface

Definition at line 112 of file bgeo_lvcs.cxx.

bgeo_lvcs::bgeo_lvcs ( double  lat_low,
double  lon_low,
double  lat_high,
double  lon_high,
double  elev,
cs_names  cs_name = wgs84,
AngUnits  ang_unit = DEG,
LenUnits  elev_unit = METERS 
)

This constructor takes a lat-lon bounding box and erects a local vertical coordinate system at the center.

The units of the input latitude and longitude values are assumed to be the same as specified by ang_unit. Similarly, the unit of elevation is specified by elev_unit. The local cartesian system is aligned with North and East

Parameters:
lon_lowlower corner bounding geo_rectangle
lon_highupper corner bounding geo_rectangle
elevelevation of all rectangle corners

Definition at line 133 of file bgeo_lvcs.cxx.

bgeo_lvcs::bgeo_lvcs ( const bgeo_lvcs lvcs)

Definition at line 44 of file bgeo_lvcs.cxx.


Member Function Documentation

void bgeo_lvcs::b_read ( vsl_b_istream is) [virtual]

Binary load self from stream.

Definition at line 736 of file bgeo_lvcs.cxx.

void bgeo_lvcs::b_write ( vsl_b_ostream os) const [virtual]

Binary save self to stream.

Definition at line 717 of file bgeo_lvcs.cxx.

void bgeo_lvcs::compute_scale ( ) [protected]

Definition at line 173 of file bgeo_lvcs.cxx.

void bgeo_lvcs::degrees_to_dms ( double  geoval,
int &  degrees,
int &  minutes,
double &  seconds 
)

Definition at line 161 of file bgeo_lvcs.cxx.

AngUnits bgeo_lvcs::geo_angle_unit ( ) const [inline]

Definition at line 95 of file bgeo_lvcs.h.

bgeo_lvcs::cs_names bgeo_lvcs::get_cs_name ( ) const [inline]

return the coordinate system.

Definition at line 148 of file bgeo_lvcs.h.

void bgeo_lvcs::get_origin ( double &  lat,
double &  lon,
double &  elev 
) const [inline]

return the origin of the local system.

Definition at line 153 of file bgeo_lvcs.h.

void bgeo_lvcs::get_scale ( double &  lat,
double &  lon 
) const [inline]

return the scale for lat lon and elevation.

Definition at line 141 of file bgeo_lvcs.h.

void bgeo_lvcs::get_transform ( double &  lox,
double &  loy,
double &  theta 
) const [inline]

Return the compass alignment transform.

Definition at line 162 of file bgeo_lvcs.h.

void bgeo_lvcs::global_to_local ( const double  pointin_lon,
const double  pointin_lat,
const double  pointin_z,
cs_names  global_cs_name,
double &  pointout_x,
double &  pointout_lat,
double &  pointout_z,
AngUnits  input_ang_unit = DEG,
LenUnits  input_len_unit = METERS 
)

Converts pointin, given in a global coord system described by global_cs_name, to pointout in the local vertical coord system.

The units of X, Y, Z are specified by input_ang_unit and input_len_unit to define lon, lat, elev in (angle, angle, length). The output point is returned in the units specified by this->localXYZUnit_.

Definition at line 446 of file bgeo_lvcs.cxx.

void bgeo_lvcs::inverse_local_transform ( double &  x,
double &  y 
) [protected]

Transform from north=y,east=x aligned axes to local co-ordinates.

Definition at line 660 of file bgeo_lvcs.cxx.

LenUnits bgeo_lvcs::local_length_unit ( ) const [inline]

Definition at line 94 of file bgeo_lvcs.h.

void bgeo_lvcs::local_to_global ( const double  pointin_x,
const double  pointin_y,
const double  pointin_z,
cs_names  global_cs_name,
double &  pointout_lon,
double &  pointout_lat,
double &  pointout_z,
AngUnits  output_ang_unit = DEG,
LenUnits  output_len_unit = METERS 
)

Converts pointin, given in local vertical coord system, to pointout in the global coord system given by the string lobalcs_name.

X, Y, Z in pointin are assumed to be lengths, in the units specified by this->localXYZUnit_. pointout is written out in [angle, angle, length], as specified by the specified units

Definition at line 299 of file bgeo_lvcs.cxx.

void bgeo_lvcs::local_transform ( double &  x,
double &  y 
) [protected]

Transform from local co-ordinates to north=y,east=x.

Definition at line 632 of file bgeo_lvcs.cxx.

bgeo_lvcs & bgeo_lvcs::operator= ( const bgeo_lvcs lvcs)

Definition at line 63 of file bgeo_lvcs.cxx.

bool bgeo_lvcs::operator== ( bgeo_lvcs const &  r) const

Definition at line 698 of file bgeo_lvcs.cxx.

void bgeo_lvcs::print ( vcl_ostream &  strm) const

Print internals on strm.

Definition at line 573 of file bgeo_lvcs.cxx.

void bgeo_lvcs::radians_to_degrees ( double &  lon,
double &  lat,
double &  z 
)

Definition at line 154 of file bgeo_lvcs.cxx.

double bgeo_lvcs::radians_to_degrees ( const double  val)

Definition at line 149 of file bgeo_lvcs.cxx.

void bgeo_lvcs::radians_to_dms ( double  rad,
int &  degrees,
int &  minutes,
double &  seconds 
) [inline]

Definition at line 188 of file bgeo_lvcs.h.

void bgeo_lvcs::read ( vcl_istream &  strm)

Read internals from strm.

Definition at line 592 of file bgeo_lvcs.cxx.

bool bgeo_lvcs::save ( vcl_string  fname) [inline]

Definition at line 97 of file bgeo_lvcs.h.

void bgeo_lvcs::set_angle_conversions ( AngUnits  ang_unit,
double &  to_radians,
double &  to_degrees 
) [protected]

Definition at line 22 of file bgeo_lvcs.cxx.

void bgeo_lvcs::set_length_conversions ( LenUnits  len_unit,
double &  to_meters,
double &  to_feet 
) [protected]

Definition at line 33 of file bgeo_lvcs.cxx.

void bgeo_lvcs::set_origin ( const double  lon,
const double  lat,
const double  elev 
) [inline]

Set the origin of the local system.

Definition at line 181 of file bgeo_lvcs.h.

void bgeo_lvcs::set_transform ( const double  lox,
const double  loy,
const double  theta 
) [inline]

Set the compass alignment transform.

Definition at line 171 of file bgeo_lvcs.h.

bgeo_lvcs::cs_names bgeo_lvcs::str_to_enum ( const char *  s) [static]

Definition at line 14 of file bgeo_lvcs.cxx.

void bgeo_lvcs::x_write ( vcl_ostream &  os,
vcl_string  element_name 
) const

Definition at line 757 of file bgeo_lvcs.cxx.


Friends And Related Function Documentation

vcl_ostream& operator<< ( vcl_ostream &  os,
const bgeo_lvcs local_coord_sys 
) [friend]

Definition at line 686 of file bgeo_lvcs.cxx.

vcl_istream& operator>> ( vcl_istream &  os,
bgeo_lvcs local_coord_sys 
) [friend]

Definition at line 692 of file bgeo_lvcs.cxx.


Member Data Documentation

const char * bgeo_lvcs::cs_name_strings = { "wgs84", "nad27n", "wgs72"} [static]

Definition at line 37 of file bgeo_lvcs.h.

lat lon angle unit (degrees or radians)

Definition at line 133 of file bgeo_lvcs.h.

double bgeo_lvcs::lat_scale_ [protected]

radians/meter along lat at the origin)

Definition at line 131 of file bgeo_lvcs.h.

Name of local frame's coord system ("nad27n", "wgs84" etc.)

Definition at line 127 of file bgeo_lvcs.h.

double bgeo_lvcs::localCSOriginElev_ [protected]

Elev (in radians) of the origin.

Definition at line 130 of file bgeo_lvcs.h.

double bgeo_lvcs::localCSOriginLat_ [protected]

Lat (in radians) of the origin.

Definition at line 128 of file bgeo_lvcs.h.

double bgeo_lvcs::localCSOriginLon_ [protected]

Lon (in radians) of the origin.

Definition at line 129 of file bgeo_lvcs.h.

Input (x,y,z) unit (meters or feet) in local CS.

Definition at line 134 of file bgeo_lvcs.h.

double bgeo_lvcs::lon_scale_ [protected]

radians/meter along lon at the origin)

Definition at line 132 of file bgeo_lvcs.h.

double bgeo_lvcs::lox_ [protected]

Origin in local co-ordinates.

Definition at line 135 of file bgeo_lvcs.h.

double bgeo_lvcs::loy_ [protected]

Origin in local co-ordinates.

Definition at line 136 of file bgeo_lvcs.h.

double bgeo_lvcs::theta_ [protected]

Direction of north in radians.

Definition at line 137 of file bgeo_lvcs.h.


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