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

RouteBase object. More...

Inheritance diagram for gem::RouteBase:
Collaboration diagram for gem::RouteBase:

Public Member Functions

LandmarkList getWaypoints (GetWaypointsOptions options=GW_RemainingInitial) const noexcept
 Get list of route waypoints.
LandmarkList getWaypointsVia (const Landmark &viaWpt) const noexcept
 Get a new waypoints configuration using existing waypoints and the given intermediate via waypoint.
TimeDistance getTimeDistance () const noexcept
 Get length in meters and estimated travel time in seconds for the route / route segment.
RectangleGeographicArea getGeographicArea () const noexcept
 Get geographic area of the route.
TilesCollectionGeographicArea getTilesGeographicArea () const noexcept
 Get tiles collection area of the route.
PolygonGeographicArea getPolygonGeographicArea () const noexcept
 Get Polygon Geographic Area.
bool getIncursCosts () const noexcept
 Method to check if traveling the route or route segment incurs cost to the user.
String getSummary () const noexcept
 Get the summary of the route.
void setRouteListener (RouteListener routeListener) noexcept
 Set listener for events related to the current route.
RouteListener getRouteListener () const noexcept
 Get route related events listener.
TimeDistance getTimeDistance (bool activePart) const noexcept
 Get length in meters and estimated travel time in seconds for the route.
RouteTrafficEventList getTrafficEvents () const noexcept
 Get list of traffic events affecting the route.
DataBuffer exportTrafficAs (int format) const noexcept
 Export route traffic in the requested data format.
RouteSegmentList getSegments () const noexcept
 Get route segments.
int getClosestSegment (Coordinates const &coord) const noexcept
 Get index of the closest route segment to the given coordinates.
bool hasFerryConnections () const noexcept
 Check if the route contains ferry connections.
bool hasTollRoads () const noexcept
 Check if the route contains toll roads.
ERouteStatus getStatus () const noexcept
 Get route status.
DataBuffer exportAs (int format) const noexcept
 Export route data in the requested data format.
const RouteTerrainProfileRef getTerrainProfile () const noexcept
 Get route terrain profile.
Coordinates getCoordinateOnRoute (int distance) const noexcept
 Get a coordinate on route at the given distance from the departure / starting point.
TimeDistanceCoordinate getTimeDistanceCoordinateOnRoute (const Coordinates &coords) const noexcept
 Get a time-distance coordinate on route closest to the given reference coordinate.
int getDistanceOnRoute (const Coordinates &coords, bool activePart) const noexcept
 Get route distance from departure at the given coordinate.
Path getPath (int start, int end) const noexcept
 Build path from route start - end segment.
Path getPath () const noexcept
 Build path from route.
TimeDistanceCoordinateList getTimeDistanceCoordinates (int start, int end, int step, bool stepType) const noexcept
 Build a list of time-distance coordinates from a route.
const StringListRef getDominantRoads () const noexcept
 Get dominant road names.
TollSectionList getTollSections () const noexcept
 Get segment toll sections.
const RoutePreferencesRef preferences () const noexcept
 Get the route preferences.
DataBuffer dump () const noexcept
 Debug purposes.
SearchableParameterList getExtraInfo () const noexcept
 Get user extra info.
int setExtraInfo (const ParameterList &info) noexcept
 Set user extra info.
LargeInteger getId () const noexcept
 Get route unique id.

Protected Member Functions

 RouteBase (const RouteBase &obj)=default
 Default copy constructor.
 RouteBase (RouteBase &&obj)=default
 Default move constructor noexcept is deduced.
RouteBase & operator= (const RouteBase &obj)=default
 Default copy assignment.
RouteBase & operator= (RouteBase &&obj)=default
 Default move assignment noexcept is deduced.

Friends

class Route
class PTRoute

Detailed Description

RouteBase object.

Implements share-read / copy-on-write Api object over IRoute.

Constructor & Destructor Documentation

◆ RouteBase() [1/2]

gem::RouteBase::RouteBase ( const RouteBase & obj)
protecteddefault

Default copy constructor.

Parameters
objRouteBase to copy from.

◆ RouteBase() [2/2]

gem::RouteBase::RouteBase ( RouteBase && obj)
protecteddefault

Default move constructor noexcept is deduced.

Parameters
objRouteBase to move from.

Member Function Documentation

◆ dump()

DataBuffer gem::RouteBase::dump ( ) const
inlinenoexcept

Debug purposes.

Dump the route

Returns
A DataBuffer representation of the route's internal state.

◆ exportAs()

DataBuffer gem::RouteBase::exportAs ( int format) const
inlinenoexcept

Export route data in the requested data format.

Parameters
[in]formatData format, see EPathFileFormat
Returns
Route data buffer

◆ exportTrafficAs()

DataBuffer gem::RouteBase::exportTrafficAs ( int format) const
inlinenoexcept

Export route traffic in the requested data format.

Parameters
[in]formatData format, see EPathFileFormat
Returns
Route data buffer

◆ getClosestSegment()

int gem::RouteBase::getClosestSegment ( Coordinates const & coord) const
inlinenoexcept

Get index of the closest route segment to the given coordinates.

Parameters
coordThe geographic coordinates to check against the route segments.
Returns
-1 if route is invalid

◆ getCoordinateOnRoute()

Coordinates gem::RouteBase::getCoordinateOnRoute ( int distance) const
inlinenoexcept

Get a coordinate on route at the given distance from the departure / starting point.

Parameters
distanceThe distance from the route start, in meters.
Returns
Coordinates at the specified distance along the route.

◆ getDistanceOnRoute()

int gem::RouteBase::getDistanceOnRoute ( const Coordinates & coords,
bool activePart ) const
inlinenoexcept

Get route distance from departure at the given coordinate.

Parameters
coordsThe geographic coordinates where the distance is to be measured.
activePartBoolean indicating whether to consider only the active part of the route (true) or the entire route (false).
Returns
The distance in meters from the route start to the specified coordinates.

◆ getDominantRoads()

const StringListRef gem::RouteBase::getDominantRoads ( ) const
inlinenoexcept

Get dominant road names.

A road is considered dominant when it covers n% from route total length

Returns
The names list. If a road has multiple names, they will be presented as "name1 / name2 / ... / namex"

◆ getExtraInfo()

SearchableParameterList gem::RouteBase::getExtraInfo ( ) const
inlinenoexcept

Get user extra info.

Returns
A string containing extra descriptive information added by user.

◆ getGeographicArea()

RectangleGeographicArea gem::RouteBase::getGeographicArea ( ) const
inlinenoexcept

Get geographic area of the route.

The geographic area is the smallest rectangle that can be drawn around the route.

Returns
Geographic area covered by the route, represented as a GeographicArea object.

◆ getId()

LargeInteger gem::RouteBase::getId ( ) const
inlinenoexcept

Get route unique id.

Returns
The route unique id, 0 if the route is not valid

◆ getIncursCosts()

bool gem::RouteBase::getIncursCosts ( ) const
inlinenoexcept

Method to check if traveling the route or route segment incurs cost to the user.

Returns
Boolean indicating whether the route incurs additional costs (e.g., tolls).

◆ getPath() [1/2]

Path gem::RouteBase::getPath ( ) const
inlinenoexcept

Build path from route.

Returns
The result path object

◆ getPath() [2/2]

Path gem::RouteBase::getPath ( int start,
int end ) const
inlinenoexcept

Build path from route start - end segment.

Parameters
[in]startStart distance from route start
[in]endEnd distance from route start
Returns
The result path object

◆ getPolygonGeographicArea()

PolygonGeographicArea gem::RouteBase::getPolygonGeographicArea ( ) const
inlinenoexcept

Get Polygon Geographic Area.

Returns
Geographic area of the route represented as a polygon.

◆ getRouteListener()

RouteListener gem::RouteBase::getRouteListener ( ) const
inlinenoexcept

Get route related events listener.

Returns
A listener for route events.

◆ getSegments()

RouteSegmentList gem::RouteBase::getSegments ( ) const
inlinenoexcept

Get route segments.

Returns
Segments of the route, each detailed with specific route information.

◆ getStatus()

ERouteStatus gem::RouteBase::getStatus ( ) const
inlinenoexcept

Get route status.

Returns
Current status of the route.

◆ getSummary()

String gem::RouteBase::getSummary ( ) const
inlinenoexcept

Get the summary of the route.

Returns
A summary of the route, including key metrics and descriptions.

◆ getTerrainProfile()

const RouteTerrainProfileRef gem::RouteBase::getTerrainProfile ( ) const
inlinenoexcept

Get route terrain profile.

Returns
Terrain profile of the route, detailing elevation changes.

◆ getTilesGeographicArea()

TilesCollectionGeographicArea gem::RouteBase::getTilesGeographicArea ( ) const
inlinenoexcept

Get tiles collection area of the route.

Returns
Detailed geographic area of the route represented in tiles.

◆ getTimeDistance() [1/2]

TimeDistance gem::RouteBase::getTimeDistance ( ) const
inlinenoexcept

Get length in meters and estimated travel time in seconds for the route / route segment.

Returns
Time and distance information for the route, encapsulated in a TimeDistance object.

◆ getTimeDistance() [2/2]

TimeDistance gem::RouteBase::getTimeDistance ( bool activePart) const
inlinenoexcept

Get length in meters and estimated travel time in seconds for the route.

Parameters
[in]activePartIf true and the route is part of a navigation session, returns only the active part of the route metrics

[in] If false or the route is not part of a navigation session, returns whole route metrics

Returns
The time and distance information.

◆ getTimeDistanceCoordinateOnRoute()

TimeDistanceCoordinate gem::RouteBase::getTimeDistanceCoordinateOnRoute ( const Coordinates & coords) const
inlinenoexcept

Get a time-distance coordinate on route closest to the given reference coordinate.

Parameters
coordsThe reference coordinates
Returns
Time-distance coordinate on route closest to the reference coordinate

◆ getTimeDistanceCoordinates()

TimeDistanceCoordinateList gem::RouteBase::getTimeDistanceCoordinates ( int start,
int end,
int step,
bool stepType ) const
inlinenoexcept

Build a list of time-distance coordinates from a route.

Parameters
[in]startStart distance from route start
[in]endEnd distance from route start
[in]stepThe step on which the coordinates are created
[in]stepTypeThe step unit type: true = distance in meters, false = time in seconds
Returns
The result list

◆ getTollSections()

TollSectionList gem::RouteBase::getTollSections ( ) const
inlinenoexcept

Get segment toll sections.

Returns
The error code. On success, the toll sections are returned

◆ getTrafficEvents()

RouteTrafficEventList gem::RouteBase::getTrafficEvents ( ) const
inlinenoexcept

Get list of traffic events affecting the route.

Returns
List of traffic events affecting the route.

◆ getWaypoints()

LandmarkList gem::RouteBase::getWaypoints ( GetWaypointsOptions options = GW_RemainingInitial) const
inlinenoexcept

Get list of route waypoints.

The waypoints are ordered like: departure, first waypoint, ..., destination.

Parameters
[in]optionsSee GetWaypointsOptions for details
Returns
a landmark list

◆ getWaypointsVia()

LandmarkList gem::RouteBase::getWaypointsVia ( const Landmark & viaWpt) const
inlinenoexcept

Get a new waypoints configuration using existing waypoints and the given intermediate via waypoint.

Parameters
[in]viaWptThe via waypoint to be inserted in the route waypoints.
Returns
A new route waypoints configuration including the given via waypoint

If route is not target to a simulation / navigation, the returned list is the initial waypoints with the via inserted in a proper index position for an optimal routing

If route is target to a simulation / navigation, the returned list is the remaining to travel waypoints with the via inserted in a proper index position for an optimal routing

◆ hasFerryConnections()

bool gem::RouteBase::hasFerryConnections ( ) const
inlinenoexcept

Check if the route contains ferry connections.

Returns
Boolean indicating whether the route includes ferry connections.

◆ hasTollRoads()

bool gem::RouteBase::hasTollRoads ( ) const
inlinenoexcept

Check if the route contains toll roads.

Returns
Boolean indicating whether the route includes toll roads.

◆ operator=() [1/2]

RouteBase & gem::RouteBase::operator= ( const RouteBase & obj)
protecteddefault

Default copy assignment.

Parameters
objRouteBase to copy from.
Returns
RouteBase reference.

◆ operator=() [2/2]

RouteBase & gem::RouteBase::operator= ( RouteBase && obj)
protecteddefault

Default move assignment noexcept is deduced.

Parameters
objRouteBase to move from.
Returns
RouteBase reference.

◆ preferences()

const RoutePreferencesRef gem::RouteBase::preferences ( ) const
inlinenoexcept

Get the route preferences.

Returns
A reference to the Preferences object managing user preferences for route calculations.

◆ setExtraInfo()

int gem::RouteBase::setExtraInfo ( const ParameterList & info)
inlinenoexcept

Set user extra info.

Parameters
infoA ParameterList containing extra information to be associated with the route.
Returns
0 if the extra information was successfully set.

◆ setRouteListener()

void gem::RouteBase::setRouteListener ( RouteListener routeListener)
inlinenoexcept

Set listener for events related to the current route.

Parameters
routeListenerRoute listener for this route. Use 'empty' to unregister current listener.