ad_map_access
GeometryOperation.hpp
Go to the documentation of this file.
1 // ----------------- BEGIN LICENSE BLOCK ---------------------------------
2 //
3 // Copyright (C) 2018-2021 Intel Corporation
4 //
5 // SPDX-License-Identifier: MIT
6 //
7 // ----------------- END LICENSE BLOCK -----------------------------------
12 #pragma once
13 
16 #include "ad/map/point/ENUEdge.hpp"
17 #include "ad/map/point/GeoEdge.hpp"
19 #include "ad/physics/ParametricRange.hpp"
20 
22 namespace ad {
24 namespace map {
26 namespace point {
27 
33 inline bool isValid(Geometry const &geometry)
34 {
35  return geometry.isValid;
36 }
37 
43 Geometry createGeometry(const ECEFEdge &points, bool closed);
44 
55 ENUEdge getCachedENUEdge(Geometry const &geometry);
56 
62 bool isSuccessor(Geometry const &edge, const Geometry &other);
63 
69 bool isPredecessor(Geometry const &edge, const Geometry &other);
70 
76 bool haveSameStart(Geometry const &edge, const Geometry &other);
77 
83 bool haveSameEnd(Geometry const &edge, const Geometry &other);
84 
90 point::ECEFPoint getParametricPoint(Geometry const &geometry, const physics::ParametricValue &t);
91 
101 void getParametricRange(Geometry const &geometry,
102  const physics::ParametricRange &trange,
103  ECEFEdge &outputEdge,
104  const bool revertOrder = false);
105 
115 void getParametricRange(Geometry const &geometry,
116  const physics::ParametricRange &trange,
117  GeoEdge &outputEdge,
118  const bool revertOrder = false);
119 
131 void getParametricRange(Geometry const &geometry,
132  const physics::ParametricRange &trange,
133  ENUEdge &outputEdge,
134  const bool revertOrder = false);
135 
142 physics::ParametricValue findNearestPointOnEdge(Geometry const &geometry, const point::ECEFPoint &pt);
143 
150 ECEFEdge getMiddleEdge(Geometry const &geometry, Geometry const &other);
151 
152 } // namespace point
153 } // namespace map
154 } // namespace ad
ad
namespace ad
Definition: GeometryStoreItem.hpp:28
ECEFEdge.hpp
ad::map::point::haveSameStart
bool haveSameStart(Geometry const &edge, const Geometry &other)
Checks if two edges have same start point.
ad::map::point::getMiddleEdge
ECEFEdge getMiddleEdge(Geometry const &geometry, Geometry const &other)
Calculates middle line between two Geometries.
CoordinateTransform.hpp
ENUEdge.hpp
ad::map::point::getParametricPoint
PointType getParametricPoint(std::vector< PointType > const &edge, physics::Distance const &edgeLength, const physics::ParametricValue &t)
Calculates parametric point on the edge.
Definition: EdgeOperation.hpp:138
ad::map::point::isSuccessor
bool isSuccessor(Geometry const &edge, const Geometry &other)
Checks if Geometry is longitudinally connected with another Geometry at the end.
Geometry.hpp
ad::map::point::isValid
bool isValid(ECEFPoint const &point, bool const logErrors=true)
checks if the given ECEFPoint is valid
Definition: ECEFOperation.hpp:27
ad::map::point::getParametricRange
std::vector< PointType > getParametricRange(std::vector< PointType > const &edge, physics::Distance const &edgeLength, const physics::ParametricRange &trange)
Generates sub-edge for given range.
Definition: EdgeOperation.hpp:193
ad::map::point::createGeometry
Geometry createGeometry(const ECEFEdge &points, bool closed)
create a geometry
ad::map::point::GeoEdge
std::vector<::ad::map::point::GeoPoint > GeoEdge
DataType GeoEdge.
Definition: GeoEdge.hpp:42
ad::map::point::Geometry
DataType Geometry.
Definition: Geometry.hpp:45
ad::map::point::ECEFPoint
DataType ECEFPoint.
Definition: ECEFPoint.hpp:45
ad::map::point::haveSameEnd
bool haveSameEnd(Geometry const &edge, const Geometry &other)
Checks if two edges have same end point.
GeoEdge.hpp
ad::map::point::findNearestPointOnEdge
physics::RatioValue findNearestPointOnEdge(PointType const &a, const PointType &pt0, const PointType &pt1)
Find point nearest to the line formed by two points.
Definition: EdgeOperation.hpp:44
ad::map::point::getCachedENUEdge
ENUEdge getCachedENUEdge(Geometry const &geometry)
get the cached ENUEdge for a geometry
ad::map::point::ECEFEdge
std::vector<::ad::map::point::ECEFPoint > ECEFEdge
DataType ECEFEdge.
Definition: ECEFEdge.hpp:42
ad::map::point::isPredecessor
bool isPredecessor(Geometry const &edge, const Geometry &other)
Checks if Geometry is longitudinally connected with another Geometry at the start.
ad::map::point::ENUEdge
std::vector<::ad::map::point::ENUPoint > ENUEdge
DataType ENUEdge.
Definition: ENUEdge.hpp:42