Class GeoJsonGraphFileLoader
Defined in File geojson_graph_file_loader.hpp
Inheritance Relationships
Base Type
public nav2_route::GraphFileLoader
(Class GraphFileLoader)
Class Documentation
A GraphFileLoader plugin to load a geojson graph representation.
Public Types
Public Functions
Constructor.
Destructor.
Configure, but do not store the node.
- Parameters:
parent – pointer to user’s node
Loads the geojson file into the graph.
- Parameters:
graph – The graph to be populated by the geojson file
graph_to_id_map – A map of node id’s to the graph index
filepath – The path of the file to load
- Returns:
True if the graph was successfully loaded
Protected Functions
Checks if a file even exists on the filesystem.
- Parameters:
filepath – The filepath to be checked
- Returns:
True if the file path provided exists
Get the nodes and edges from features.
- Parameters:
features – [in] The features that contain the nodes and edges
nodes – [out] The nodes found within the features
edges – [out] The edges found within the features
Add nodes into the graph.
- Parameters:
graph – [out] The graph that will contain the new nodes
graph_to_id_map – [out] A map of node id to the graph index
nodes – [in] The nodes to be added into the graph
Add edges into the graph.
- Parameters:
graph – [out] The graph that will contain the new edges
graph_to_id_map – [in] A map of node id to the graph id
edges – [in] The edges to be added into the graph
Converts the coordinates from the json object into the Coordinates type.
- Parameters:
node – The json object that holds the coordinate data
- Returns:
The coordinates found in the json object
Converts the metadata from the json object into the metadata type.
- Parameters:
properties – The json object that holds the metadata
key – The key for the metadata
- Returns:
The converted metadata
Converts the operation from the json object into the operation type.
- Parameters:
json_operation – The json object that holds the operation data
- Returns:
The converted operation data
Converts the operations data from the json object into the operations type if present.
- Parameters:
properties – The json object that holds the operations data
- Returns:
Operations The converted operations data
Converts the edge cost data from the json object into the edge cost type.
- Parameters:
properties – The json object that holds the edge cost data
- Returns:
EdgeCost The converted edge cost data
Protected Attributes