Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::GeographicArea Class Reference

GeographicArea object. More...

Inheritance diagram for gem::GeographicArea:
Collaboration diagram for gem::GeographicArea:

Public Member Functions

 GeographicArea (const GeographicArea &)=default
 Default copy constructor.
 GeographicArea (GeographicArea &&)=default
 Default move constructor noexcept is deduced.
GeographicAreaoperator= (const GeographicArea &other)=default
 Copy assignment operator.
GeographicAreaoperator= (GeographicArea &&other) noexcept=default
 Move assignment operator.
EGeographicAreaType type () const
 Retrieves the specific type of the geographic area.
bool containsCoordinates (Coordinates const &point) const
 Checks if the specified point is contained within the geographic area.
RectangleGeographicArea getBoundingBox () const noexcept
 Get the bounding box.
Coordinates getCenterPoint () const noexcept
 Retrieves the center point of the geographic area.
bool equals (GeographicArea const &other) const noexcept
 Checks if two geographic areas are considered equal.
bool operator== (const GeographicArea &area) const noexcept
 Equality comparison operator for geographic areas.
bool operator!= (const GeographicArea &area) const noexcept
 Inequality comparison operator for geographic areas.
template<typename TSubclass>
TSubclass cast () const noexcept
 Attempts to cast the current geographic area object to a specified subclass.
bool isDefault () const override
 Determines if the current geographic area object is in its default state (unaltered since creation).
 operator bool () const noexcept
 Boolean conversion operator indicating if the geographic area is valid and not in its default state.
bool isEmpty () const noexcept
 Checks if the geographic area is empty.
void reset () noexcept
 Resets the geographic area object to its default state.
int convert (GeographicArea &area) const noexcept
 Converts the geographic area to another type, if possible.

Detailed Description

GeographicArea object.

This object represents a geographical area on the surface of a WGS 84 Ellipsoid.

Implements share-read / copy-on-write Api object over IGeographicArea. In the calculations related to these geographical areas the altitude information contained in the Coordinates object is ignored. All geographical areas deal with Coordinates objects.

Member Function Documentation

◆ cast()

template<typename TSubclass>
TSubclass gem::GeographicArea::cast ( ) const
inlinenoexcept

Attempts to cast the current geographic area object to a specified subclass.

This is a template method.

Template Parameters
TSubclassThe subclass type to cast to.
Returns
An object of type TSubclass if the cast is successful; otherwise, a default-constructed object of TSubclass.

◆ containsCoordinates()

bool gem::GeographicArea::containsCoordinates ( Coordinates const & point) const
inline

Checks if the specified point is contained within the geographic area.

Parameters
pointA Coordinates object representing the point to check.
Returns
True if the point is within the geographic area, false otherwise.

◆ convert()

int gem::GeographicArea::convert ( GeographicArea & area) const
inlinenoexcept

Converts the geographic area to another type, if possible.

Parameters
areaA GeographicArea object to convert to.
Returns
An integer indicating the success or failure of the conversion.

◆ equals()

bool gem::GeographicArea::equals ( GeographicArea const & other) const
inlinenoexcept

Checks if two geographic areas are considered equal.

Parameters
otherAnother GeographicArea object for comparison.
Returns
true if the areas are equal, false otherwise.

◆ getBoundingBox()

RectangleGeographicArea gem::GeographicArea::getBoundingBox ( ) const
inlinenoexcept

Get the bounding box.

This is the smallest rectangle that can be drawn around the area such that it surrounds this geographic area completely.

If the area is bigger than what is allowed in the WGS 84 coordinate system, the rectangle is truncated to valid WGS 84 coordinate values. The RectangleGeographicArea is always aligned with parallels and meridians.

Returns
A RectangleGeographicArea object representing the bounding box.

◆ getCenterPoint()

Coordinates gem::GeographicArea::getCenterPoint ( ) const
inlinenoexcept

Retrieves the center point of the geographic area.

Calculates and returns the geographic center of the area.

Returns
Coordinates object representing the center point of the area.

◆ isDefault()

bool gem::GeographicArea::isDefault ( ) const
inlineoverride

Determines if the current geographic area object is in its default state (unaltered since creation).

Returns
true if the object is default, false otherwise.

◆ isEmpty()

bool gem::GeographicArea::isEmpty ( ) const
inlinenoexcept

Checks if the geographic area is empty.

Returns
true if the area is empty, false otherwise.

◆ operator bool()

gem::GeographicArea::operator bool ( ) const
inlineexplicitnoexcept

Boolean conversion operator indicating if the geographic area is valid and not in its default state.

Returns
true if the object is valid and not default, false otherwise.

◆ operator!=()

bool gem::GeographicArea::operator!= ( const GeographicArea & area) const
inlinenoexcept

Inequality comparison operator for geographic areas.

Parameters
areaAnother GeographicArea object to compare against.
Returns
true if the areas are not equal, false otherwise.

◆ operator=() [1/2]

GeographicArea & gem::GeographicArea::operator= ( const GeographicArea & other)
default

Copy assignment operator.

Replaces the current object's contents with another GeographicArea object's contents.

Parameters
otherThe GeographicArea object to copy from.
Returns
A reference to the current object after assignment.

◆ operator=() [2/2]

GeographicArea & gem::GeographicArea::operator= ( GeographicArea && other)
defaultnoexcept

Move assignment operator.

Transfers the contents of another GeographicArea object to this one.

Parameters
otherThe GeographicArea object to move from. It becomes in an unspecified state after the operation.
Returns
A reference to the current object after assignment.

◆ operator==()

bool gem::GeographicArea::operator== ( const GeographicArea & area) const
inlinenoexcept

Equality comparison operator for geographic areas.

Parameters
areaAnother GeographicArea object to compare against.
Returns
true if the areas are equal, false otherwise.

◆ type()

EGeographicAreaType gem::GeographicArea::type ( ) const
inline

Retrieves the specific type of the geographic area.

Returns
The type of the geographic area as an EGeographicAreaType enumeration.