2016-10-24 21:19:10 -04:00
|
|
|
#ifndef OSRM_GEOJSON_DEBUG_POLICIES
|
|
|
|
#define OSRM_GEOJSON_DEBUG_POLICIES
|
|
|
|
|
2024-05-22 08:58:07 -04:00
|
|
|
#include <optional>
|
2016-10-24 21:19:10 -04:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "extractor/query_node.hpp"
|
|
|
|
#include "util/coordinate.hpp"
|
|
|
|
#include "util/json_container.hpp"
|
|
|
|
#include "util/node_based_graph.hpp"
|
|
|
|
#include "util/typedefs.hpp"
|
|
|
|
|
2022-12-11 04:10:26 -05:00
|
|
|
namespace osrm::util
|
2016-10-24 21:19:10 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
struct NodeIdVectorToLineString
|
|
|
|
{
|
2017-07-26 05:31:55 -04:00
|
|
|
NodeIdVectorToLineString(const std::vector<util::Coordinate> &node_coordinates);
|
2016-10-24 21:19:10 -04:00
|
|
|
|
|
|
|
// converts a vector of node ids into a linestring geojson feature
|
|
|
|
util::json::Object operator()(const std::vector<NodeID> &node_ids,
|
2024-05-22 08:58:07 -04:00
|
|
|
const std::optional<json::Object> &properties = {}) const;
|
2016-10-24 21:19:10 -04:00
|
|
|
|
2017-07-26 05:31:55 -04:00
|
|
|
const std::vector<util::Coordinate> &node_coordinates;
|
2016-10-24 21:19:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CoordinateVectorToLineString
|
|
|
|
{
|
|
|
|
// converts a vector of node ids into a linestring geojson feature
|
|
|
|
util::json::Object operator()(const std::vector<util::Coordinate> &coordinates,
|
2024-05-22 08:58:07 -04:00
|
|
|
const std::optional<json::Object> &properties = {}) const;
|
2016-10-24 21:19:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct NodeIdVectorToMultiPoint
|
|
|
|
{
|
2017-07-26 05:31:55 -04:00
|
|
|
NodeIdVectorToMultiPoint(const std::vector<util::Coordinate> &node_coordinates);
|
2016-10-24 21:19:10 -04:00
|
|
|
|
|
|
|
// converts a vector of node ids into a linestring geojson feature
|
|
|
|
util::json::Object operator()(const std::vector<NodeID> &node_ids,
|
2024-05-22 08:58:07 -04:00
|
|
|
const std::optional<json::Object> &properties = {}) const;
|
2016-10-24 21:19:10 -04:00
|
|
|
|
2017-07-26 05:31:55 -04:00
|
|
|
const std::vector<util::Coordinate> &node_coordinates;
|
2016-10-24 21:19:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CoordinateVectorToMultiPoint
|
|
|
|
{
|
|
|
|
// converts a vector of node ids into a linestring geojson feature
|
|
|
|
util::json::Object operator()(const std::vector<util::Coordinate> &coordinates,
|
2024-05-22 08:58:07 -04:00
|
|
|
const std::optional<json::Object> &properties = {}) const;
|
2016-10-24 21:19:10 -04:00
|
|
|
};
|
|
|
|
|
2022-12-20 12:00:11 -05:00
|
|
|
} // namespace osrm::util
|
2016-10-24 21:19:10 -04:00
|
|
|
|
|
|
|
#endif /* OSRM_GEOJSON_DEBUG_POLICIES */
|