41 # include <vcl_msvc_warnings.h> 46 #include <vpgl/vpgl_export.h> 79 double lat_high,
double lon_high,
91 double& lon,
double& lat,
double& gz,
95 void global_to_local(
const double lon,
const double lat,
const double gz,
97 double& lx,
double& ly,
double& lz,
103 void degrees_to_dms(
double,
int& degrees,
int& minutes,
double& seconds);
104 void radians_to_dms(
double,
int& degrees,
int& minutes,
double& seconds);
107 double& cart_dx,
double& cart_dy) {
108 double l0x, l0y, l0z, l1x, l1y, l1z;
116 void get_origin(
double& lat,
double& lon,
double& elev)
const;
117 void get_scale(
double& lat,
double& lon)
const;
118 void get_transform(
double& lox,
double& loy,
double& theta)
const;
119 void set_transform(
const double lox,
const double loy,
const double theta);
120 void set_origin(
const double lon,
const double lat,
const double elev);
124 void print(std::ostream&)
const;
125 bool save(std::string fname) { std::ofstream of(fname.c_str());
if (of) {
print(of);
return true; }
return false; }
126 void read(std::istream& strm);
127 void write(std::ostream& strm);
132 void get_utm_origin(
double& x,
double& y,
double& elev,
int& zone)
const;
236 #endif // vpgl_lvcs_h_ double localCSOriginLon_
Lon (in geo_angle_unit_) of the origin.
short version() const
Return IO version number;.
double localCSOriginElev_
Elev (in localXYZUnit_) of the origin.
AngUnits geo_angle_unit() const
void write(std::ostream &strm)
void radians_to_degrees(double &lon, double &lat, double &z)
void radians_to_dms(double, int °rees, int &minutes, double &seconds)
void set_origin(const double lon, const double lat, const double elev)
Set the origin of the local system.
LenUnits local_length_unit() const
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 ...
double localUTMOrigin_Y_North_
void print(std::ostream &) const
Print internals on strm.
double localUTMOrigin_X_East_
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 loca...
double theta_
Direction of north in radians.
void degrees_to_dms(double, int °rees, int &minutes, double &seconds)
double loy_
Origin in local co-ordinates.
void set_length_conversions(LenUnits len_unit, double &to_meters, double &to_feet)
void b_write(vsl_b_ostream &os) const
Binary save self to stream.
bool save(std::string fname)
friend std::ostream & operator<<(std::ostream &os, const vpgl_lvcs &local_coord_sys)
double lox_
Origin in local co-ordinates.
void local_transform(double &x, double &y)
Transform from local co-ordinates to north=y,east=x.
LenUnits localXYZUnit_
Input (x,y,z) unit (meters or feet) in local CS.
friend std::istream & operator >>(std::istream &os, vpgl_lvcs &local_coord_sys)
void b_read(vsl_b_istream &is)
Binary load self from stream.
static vpgl_lvcs::cs_names str_to_enum(const char *)
double localCSOriginLat_
Lat (in geo_angle_unit_) of the origin.
void angle_diff_to_cartesian_vector(const double lon0, const double lat0, const double lon1, const double lat1, double &cart_dx, double &cart_dy)
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.
void read(std::istream &strm)
Read internals from strm.
AngUnits geo_angle_unit_
lat lon angle unit (degrees or radians)
bool operator==(vpgl_lvcs const &r) const
double lat_scale_
radians/meter along lat at the origin)
void inverse_local_transform(double &x, double &y)
Transform from north=y,east=x aligned axes to local co-ordinates.
void get_scale(double &lat, double &lon) const
return the scale for lat lon and elevation.
cs_names local_cs_name_
Name of local frame's coord system ("nad27n", "wgs84" etc.)
vpgl_lvcs & operator=(const vpgl_lvcs &)
void set_angle_conversions(AngUnits ang_unit, double &to_radians, double &to_degrees)
void set_transform(const double lox, const double loy, const double theta)
Set the compass alignment transform.
double lon_scale_
radians/meter along lon at the origin)
void get_origin(double &lat, double &lon, double &elev) const
return the origin of the local system.
void get_utm_origin(double &x, double &y, double &elev, int &zone) const
void get_transform(double &lox, double &loy, double &theta) const
Return the compass alignment transform.
static VPGL_EXPORT const char * cs_name_strings[]
cs_names get_cs_name() const
return the coordinate system.