#include <vpgl_lvcs.h>

Public Types | |
| enum | LenUnits { FEET, METERS } |
| enum | AngUnits { RADIANS, DEG } |
| enum | cs_names { wgs84 =0, nad27n, wgs72, utm, NumNames } |
Public Member Functions | |
| vpgl_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. More... | |
| vpgl_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. More... | |
| vpgl_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. More... | |
| vpgl_lvcs (const vpgl_lvcs &) | |
| vpgl_lvcs & | operator= (const vpgl_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. More... | |
| 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. More... | |
| void | radians_to_degrees (double &lon, double &lat, double &z) |
| double | radians_to_degrees (const double val) |
| void | degrees_to_dms (double, int °rees, int &minutes, double &seconds) |
| void | radians_to_dms (double, int °rees, int &minutes, double &seconds) |
| void | angle_diff_to_cartesian_vector (const double lon0, const double lat0, const double lon1, const double lat1, double &cart_dx, double &cart_dy) |
| void | get_origin (double &lat, double &lon, double &elev) const |
| return the origin of the local system. More... | |
| void | get_scale (double &lat, double &lon) const |
| return the scale for lat lon and elevation. More... | |
| void | get_transform (double &lox, double &loy, double &theta) const |
| Return the compass alignment transform. More... | |
| void | set_transform (const double lox, const double loy, const double theta) |
| Set the compass alignment transform. More... | |
| void | set_origin (const double lon, const double lat, const double elev) |
| Set the origin of the local system. More... | |
| cs_names | get_cs_name () const |
| return the coordinate system. More... | |
| LenUnits | local_length_unit () const |
| AngUnits | geo_angle_unit () const |
| void | print (std::ostream &) const |
| Print internals on strm. More... | |
| bool | save (std::string fname) |
| void | read (std::istream &strm) |
| Read internals from strm. More... | |
| void | write (std::ostream &strm) |
| bool | operator== (vpgl_lvcs const &r) const |
| void | get_utm_origin (double &x, double &y, double &elev, int &zone) const |
| void | b_write (vsl_b_ostream &os) const |
| Binary save self to stream. More... | |
| void | b_read (vsl_b_istream &is) |
| Binary load self from stream. More... | |
| short | version () const |
| Return IO version number;. More... | |
| void | ref () |
| void | unref () |
| long | get_references () const |
| bool | is_referenced () const |
Static Public Member Functions | |
| static vpgl_lvcs::cs_names | str_to_enum (const char *) |
Static Public Attributes | |
| static VPGL_EXPORT const char * | cs_name_strings [] = { "wgs84", "nad27n", "wgs72", "utm"} |
Protected Member Functions | |
| void | compute_scale () |
| void | local_transform (double &x, double &y) |
| Transform from local co-ordinates to north=y,east=x. More... | |
| void | inverse_local_transform (double &x, double &y) |
| Transform from north=y,east=x aligned axes to local co-ordinates. More... | |
| 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.) More... | |
| double | localCSOriginLat_ |
| Lat (in geo_angle_unit_) of the origin. More... | |
| double | localCSOriginLon_ |
| Lon (in geo_angle_unit_) of the origin. More... | |
| double | localCSOriginElev_ |
| Elev (in localXYZUnit_) of the origin. More... | |
| double | lat_scale_ |
| radians/meter along lat at the origin) More... | |
| double | lon_scale_ |
| radians/meter along lon at the origin) More... | |
| AngUnits | geo_angle_unit_ |
| lat lon angle unit (degrees or radians) More... | |
| LenUnits | localXYZUnit_ |
| Input (x,y,z) unit (meters or feet) in local CS. More... | |
| double | lox_ |
| Origin in local co-ordinates. More... | |
| double | loy_ |
| Origin in local co-ordinates. More... | |
| double | theta_ |
| Direction of north in radians. More... | |
| double | localUTMOrigin_X_East_ |
| double | localUTMOrigin_Y_North_ |
| int | localUTMOrigin_Zone_ |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const vpgl_lvcs &local_coord_sys) |
| std::istream & | operator >> (std::istream &os, vpgl_lvcs &local_coord_sys) |
Related Functions | |
(Note that these are not member functions.) | |
| void | x_write (std::ostream &os, vpgl_lvcs const &v, std::string element_name="vpgl_lvcs") |
| XML save vpgl_lvcs to stream. More... | |
Definition at line 48 of file vpgl_lvcs.h.
| enum vpgl_lvcs::AngUnits |
| Enumerator | |
|---|---|
| RADIANS | |
| DEG | |
Definition at line 54 of file vpgl_lvcs.h.
| enum vpgl_lvcs::cs_names |
| Enumerator | |
|---|---|
| wgs84 | |
| nad27n | |
| wgs72 | |
| utm | |
| NumNames | |
Definition at line 55 of file vpgl_lvcs.h.
| enum vpgl_lvcs::LenUnits |
| Enumerator | |
|---|---|
| FEET | |
| METERS | |
Definition at line 53 of file vpgl_lvcs.h.
| vpgl_lvcs::vpgl_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.
the origin is still given in wgs84.
| orig_lat | latitude of LVCS orig in radians. |
| orig_lon | longitude of LVCS orig in radians. |
| orig_elev | elev of orig LVCS in radians. |
| cs_name | nad27n, wgs84, wgs72 or utm |
| lat_scale | radians/meter along lat (custom geoid) |
| lon_scale | radians/meter along lon (custom geoid) |
| ang_unit | angle units |
| len_unit | input in LVCS in these length units. |
| lox | Origin in local co-ordinates. |
| loy | Origin in local co-ordinates. |
Definition at line 91 of file vpgl_lvcs.cxx.
| vpgl_lvcs::vpgl_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
the origin is still given in wgs84.
| orig_elev | simplified interface |
Definition at line 134 of file vpgl_lvcs.cxx.
| vpgl_lvcs::vpgl_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
the origin is still given in wgs84.
| lon_low | lower corner bounding geo_rectangle |
| lon_high | upper corner bounding geo_rectangle |
| elev | elevation of all rectangle corners |
Definition at line 166 of file vpgl_lvcs.cxx.
| vpgl_lvcs::vpgl_lvcs | ( | const vpgl_lvcs & | lvcs | ) |
Definition at line 48 of file vpgl_lvcs.cxx.
|
inline |
Definition at line 106 of file vpgl_lvcs.h.
| void vpgl_lvcs::b_read | ( | vsl_b_istream & | is | ) |
Binary load self from stream.
Definition at line 995 of file vpgl_lvcs.cxx.
| void vpgl_lvcs::b_write | ( | vsl_b_ostream & | os | ) | const |
Binary save self to stream.
Definition at line 974 of file vpgl_lvcs.cxx.
|
protected |
Definition at line 220 of file vpgl_lvcs.cxx.
| void vpgl_lvcs::degrees_to_dms | ( | double | geoval, |
| int & | degrees, | ||
| int & | minutes, | ||
| double & | seconds | ||
| ) |
Definition at line 208 of file vpgl_lvcs.cxx.
|
inline |
Definition at line 123 of file vpgl_lvcs.h.
|
inline |
return the coordinate system.
Definition at line 184 of file vpgl_lvcs.h.
|
inline |
return the origin of the local system.
Definition at line 189 of file vpgl_lvcs.h.
|
inline |
return the scale for lat lon and elevation.
Definition at line 177 of file vpgl_lvcs.h.
|
inline |
Return the compass alignment transform.
Definition at line 206 of file vpgl_lvcs.h.
|
inline |
Definition at line 196 of file vpgl_lvcs.h.
| void vpgl_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_y, | ||
| 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_. If global_cs_name == UTM, pointin_lon is X_East, pointin_lat is Y_North
Definition at line 555 of file vpgl_lvcs.cxx.
|
protected |
Transform from north=y,east=x aligned axes to local co-ordinates.
Definition at line 918 of file vpgl_lvcs.cxx.
|
inline |
Definition at line 122 of file vpgl_lvcs.h.
| void vpgl_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 If global_cs_name == UTM, pointout_lon is X_East, pointout_lat is Y_North If global_cs_name == WGS84, the pointin needs to be at same hemisphere (north or south) as the lvcs origin
Definition at line 350 of file vpgl_lvcs.cxx.
|
protected |
Transform from local co-ordinates to north=y,east=x.
Definition at line 890 of file vpgl_lvcs.cxx.
Definition at line 70 of file vpgl_lvcs.cxx.
| bool vpgl_lvcs::operator== | ( | vpgl_lvcs const & | r | ) | const |
Definition at line 956 of file vpgl_lvcs.cxx.
| void vpgl_lvcs::print | ( | std::ostream & | strm | ) | const |
Print internals on strm.
Definition at line 786 of file vpgl_lvcs.cxx.
| void vpgl_lvcs::radians_to_degrees | ( | double & | lon, |
| double & | lat, | ||
| double & | z | ||
| ) |
Definition at line 201 of file vpgl_lvcs.cxx.
| double vpgl_lvcs::radians_to_degrees | ( | const double | val | ) |
Definition at line 196 of file vpgl_lvcs.cxx.
|
inline |
Definition at line 232 of file vpgl_lvcs.h.
| void vpgl_lvcs::read | ( | std::istream & | strm | ) |
Read internals from strm.
the origin is still given in wgs84.
Definition at line 805 of file vpgl_lvcs.cxx.
|
inline |
Definition at line 125 of file vpgl_lvcs.h.
|
protected |
Definition at line 26 of file vpgl_lvcs.cxx.
|
protected |
Definition at line 37 of file vpgl_lvcs.cxx.
|
inline |
Set the origin of the local system.
Definition at line 225 of file vpgl_lvcs.h.
|
inline |
Set the compass alignment transform.
Definition at line 215 of file vpgl_lvcs.h.
|
static |
Definition at line 18 of file vpgl_lvcs.cxx.
|
inline |
Return IO version number;.
Definition at line 141 of file vpgl_lvcs.h.
| void vpgl_lvcs::write | ( | std::ostream & | strm | ) |
Definition at line 858 of file vpgl_lvcs.cxx.
|
friend |
Definition at line 950 of file vpgl_lvcs.cxx.
|
friend |
Definition at line 944 of file vpgl_lvcs.cxx.
|
related |
XML save vpgl_lvcs to stream.
Definition at line 9 of file vpgl_xio_lvcs.cxx.
Definition at line 56 of file vpgl_lvcs.h.
|
protected |
lat lon angle unit (degrees or radians)
Definition at line 165 of file vpgl_lvcs.h.
|
protected |
radians/meter along lat at the origin)
Definition at line 163 of file vpgl_lvcs.h.
|
protected |
Name of local frame's coord system ("nad27n", "wgs84" etc.)
Definition at line 159 of file vpgl_lvcs.h.
|
protected |
Elev (in localXYZUnit_) of the origin.
Definition at line 162 of file vpgl_lvcs.h.
|
protected |
Lat (in geo_angle_unit_) of the origin.
Definition at line 160 of file vpgl_lvcs.h.
|
protected |
Lon (in geo_angle_unit_) of the origin.
Definition at line 161 of file vpgl_lvcs.h.
|
protected |
Definition at line 171 of file vpgl_lvcs.h.
|
protected |
Definition at line 172 of file vpgl_lvcs.h.
|
protected |
Definition at line 173 of file vpgl_lvcs.h.
|
protected |
Input (x,y,z) unit (meters or feet) in local CS.
Definition at line 166 of file vpgl_lvcs.h.
|
protected |
radians/meter along lon at the origin)
Definition at line 164 of file vpgl_lvcs.h.
|
protected |
Origin in local co-ordinates.
Definition at line 167 of file vpgl_lvcs.h.
|
protected |
Origin in local co-ordinates.
Definition at line 168 of file vpgl_lvcs.h.
|
protected |
Direction of north in radians.
Definition at line 169 of file vpgl_lvcs.h.
1.8.15