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 &#8212; the familiar longitude/latitude mapping onto a sphere.

Subclassed by tracktable::TrajectoryPoint< tracktable::PointLonLat >, tracktable::TrajectoryPoint< PointLonLat >, tracktable::domain::terrestrial::TerrestrialPoint

Public Types

typedef PointBase<2> Superclass

Convenient alias for superclass.

typedef Superclass::coordinate_type coord_type

Public Functions

inline PointLonLat()

Create an uninitialized point.

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

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

Since this class is explicitly about a point in a 2-dimensional domain we provide a convenience constructor to let you instantiate and populate one with one line.

inline PointLonLat(const double *coordinates)

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

Populate the point from an array of coordinates. The caller is responsible for ensuring that the array is large enough to contain the right number of coordinates.

inline ~PointLonLat()

Destructor for a point.

inline PointLonLat(Superclass const &other)

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

inline PointLonLat(PointLonLat const &other)

Make this point a copy of another.

inline coord_type longitude() const

Return this point’s longitude.

Returns:

Longitude in degrees

inline void set_longitude(coord_type const &new_longitude)

Set this point’s longitude.

Parameters:

new_longitude[in] New value for longitude

inline coord_type latitude() const

Return this point’s latitude.

Returns:

Latitude in degrees

inline void set_latitude(coord_type const &new_latitude)

Set this point’s latitude.

Parameters:

new_latitude[in] New value for latitude

inline std::string to_string() const

Convert point coordinates to a string

Returns:

Coordinates string

Private Functions

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

Serialize the coordinates to an archive

Parameters:
  • ar[in] Archive to serialize to

  • version[in] Version of the archive

Friends

friend class boost::serialization::access