PointLonLat Module

Module Contents

class PointLonLat : public tracktable::PointBase<2>

2D point on a sphere

This class specializes PointBase to use boost::geometry in a spherical-equatorial coordinate system the familiar longitude/latitude mapping onto a sphere.

Subclassed by tracktable::domain::terrestrial::TerrestrialPoint

Public Types

typedef PointBase<2> Superclass

Convenient alias for superclass.

typedef Superclass::coordinate_type coord_type

Public Functions

PointLonLat()

Create an uninitialized point.

PointLonLat(coord_type const &a, coord_type const &b)

Create a 2D point on a sphere (convenience constructor)

PointLonLat(const double *coordinates)

Create a 2D point on a sphere (convenience constructor)

~PointLonLat()
PointLonLat(Superclass const &other)

Make this point a copy of a generic 2D point.

PointLonLat(PointLonLat const &other)

Make this point a copy of another.

coord_type longitude() const

Return this point’s longitude.

Return

Longitude in degrees

void set_longitude(coord_type const &new_longitude)

Set this point’s longitude.

Parameters
  • [in] new_longitude: New value for longitude

coord_type latitude() const

Return this point’s latitude.

Return

Latitude in degrees

void set_latitude(coord_type const &new_latitude)

Set this point’s latitude.

Parameters
  • [in] new_latitude: New value for latitude

std::string to_string() const

Private Functions

template<class Archive>
void serialize(Archive &ar, const unsigned int version)