diff --git a/map/autoware_lanelet2_map_validator/CMakeLists.txt b/map/autoware_lanelet2_map_validator/CMakeLists.txt index 339c3a38..691821ee 100644 --- a/map/autoware_lanelet2_map_validator/CMakeLists.txt +++ b/map/autoware_lanelet2_map_validator/CMakeLists.txt @@ -65,6 +65,8 @@ if(BUILD_TESTING) add_validation_test(regulatory_elements_details_for_traffic_lights) add_validation_test(traffic_light_facing) add_validation_test(missing_referrers_for_traffic_lights) + add_validation_test(intersection_area_validity) + add_validation_test(intersection_area_segment_type) endif() ament_auto_package( diff --git a/map/autoware_lanelet2_map_validator/README.md b/map/autoware_lanelet2_map_validator/README.md index daa8706c..db59817d 100644 --- a/map/autoware_lanelet2_map_validator/README.md +++ b/map/autoware_lanelet2_map_validator/README.md @@ -322,7 +322,7 @@ The "Validators" column will be blank if it hasn't be implemented. | vm-03-05 | Lanelet division in the intersection | | | vm-03-06 | Guide lines in the intersection | | | vm-03-07 | Multiple lanelets in the intersection | | -| vm-03-08 | Intersection Area range | | +| vm-03-08 | Intersection Area range | [mapping.intersection.intersection_area_validity](./docs/intersection/intersection_area_validity.md), [mapping.intersection.intersection_area_segment_type](./docs/intersection/intersection_area_segment_type.md) | | vm-03-09 | Range of Lanelet in the intersection | | | vm-03-10 | Right of way (with signal) | | | vm-03-11 | Right of way (without signal) | | diff --git a/map/autoware_lanelet2_map_validator/autoware_requirement_set.json b/map/autoware_lanelet2_map_validator/autoware_requirement_set.json index 917993cb..74185b48 100644 --- a/map/autoware_lanelet2_map_validator/autoware_requirement_set.json +++ b/map/autoware_lanelet2_map_validator/autoware_requirement_set.json @@ -8,6 +8,17 @@ } ] }, + { + "id": "vm-03-08", + "validators": [ + { + "name": "mapping.intersection.intersection_area_validity" + }, + { + "name": "mapping.intersection.intersection_area_segment_type" + } + ] + }, { "id": "vm-04-01", "validators": [ diff --git a/map/autoware_lanelet2_map_validator/docs/intersection/intersection_area_segment_type.md b/map/autoware_lanelet2_map_validator/docs/intersection/intersection_area_segment_type.md new file mode 100644 index 00000000..980a2607 --- /dev/null +++ b/map/autoware_lanelet2_map_validator/docs/intersection/intersection_area_segment_type.md @@ -0,0 +1,31 @@ +# intersection_area_segment_type + +## Validator name + +mapping.intersection.intersection_area_segment_type + +## Feature + +This validator check whether each `intersection_area` type polygon is made from points that belong to `road_border` type linestrings or the starting/ending edge of a lanelet. + +This is achieved by the following procedure. + +1. Create a 2D bounding box that circumscribes the polygon. +2. Collect `road_border` type linestrings within or intersecting the 2D bounding box. +3. Collect starting/ending edges of lanelets within or intersecting the 2D bounding box. +4. Examine each point that constitutes the polygon whether it belongs to the collection above. + +The validator outputs the following issue with the corresponding ID of the primitive. + +| Issue Code | Message | Severity | Primitive | Description | Approach | +| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| Intersection.IntersectionAreaSegmentType-001 | "This intersection area is not made by points from road_border linestrings or lanelet edges. (Point ID: \)" | Error | Polygon | The `intersection_area` polygon has points that doesn't belong to `road_border` type linestrings or lanelet edges. The violating points are listed up at \. | Ensure that the `intersection_area` is formed ONLY by `road_border` linestrings and lanelet edges. | + +### Supplementary information + +Note that this validator only examines what type of linestring the points constituting the polygon belongs to, and doesn't examine they have a valid connection. Use the `mapping.intersection.intersection_area_validity` to check whether the polygon is `boost::geometry::is_valid()`. + +## Related source codes + +- intersection_area_segment_type.hpp +- intersection_area_segment_type.cpp diff --git a/map/autoware_lanelet2_map_validator/docs/intersection/intersection_area_validity.md b/map/autoware_lanelet2_map_validator/docs/intersection/intersection_area_validity.md new file mode 100644 index 00000000..fd0eb7fe --- /dev/null +++ b/map/autoware_lanelet2_map_validator/docs/intersection/intersection_area_validity.md @@ -0,0 +1,20 @@ +# intersection_area_validity + +## Validator name + +mapping.intersection.intersection_area_validity + +## Feature + +This validator check whether each `intersection_area` type polygon satisfies [`boost::geometry::is_valid`](https://www.boost.io/doc/libs/1_86_0/libs/geometry/doc/html/geometry/reference/algorithms/is_valid/is_valid_2_with_message.html). + +The validator outputs the following issue with the corresponding ID of the primitive. + +| Issue Code | Message | Severity | Primitive | Description | Approach | +| ----------------------------------------- | --------------------------------------------------------------------------------------- | -------- | --------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Intersection.IntersectionAreaValidity-001 | "This intersection_area doesn't satisfy boost::geometry::is_valid (reason: \) | Error | Polygon | The `intersection_area` polygon didn't satisfy `boost::geometry::is_valid`. | There are several reasons expected and it is written in "(reason: \)". The \ is a copy of [the output message defined in the `boost::geometry` library](https://www.boost.org/doc/libs/1_86_0/boost/geometry/policies/is_valid/failing_reason_policy.hpp). | + +## Related source codes + +- intersection_area_validity.hpp +- intersection_area_validity.cpp diff --git a/map/autoware_lanelet2_map_validator/src/include/lanelet2_map_validator/validators/intersection/intersection_area_segment_type.hpp b/map/autoware_lanelet2_map_validator/src/include/lanelet2_map_validator/validators/intersection/intersection_area_segment_type.hpp new file mode 100644 index 00000000..cd563d43 --- /dev/null +++ b/map/autoware_lanelet2_map_validator/src/include/lanelet2_map_validator/validators/intersection/intersection_area_segment_type.hpp @@ -0,0 +1,67 @@ +// Copyright 2024 Autoware Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LANELET2_MAP_VALIDATOR__VALIDATORS__INTERSECTION__INTERSECTION_AREA_SEGMENT_TYPE_HPP_ // NOLINT +#define LANELET2_MAP_VALIDATOR__VALIDATORS__INTERSECTION__INTERSECTION_AREA_SEGMENT_TYPE_HPP_ // NOLINT + +#include +#include + +#include +#include + +namespace lanelet::autoware::validation +{ +class IntersectionAreaSegmentTypeValidator : public lanelet::validation::MapValidator +{ +public: + constexpr static const char * name() + { + return "mapping.intersection.intersection_area_segment_type"; + } + + lanelet::validation::Issues operator()(const lanelet::LaneletMap & map) override; + +private: + /** + * @brief The main validation process + * + * @param map + * @return lanelet::validation::Issues + */ + lanelet::validation::Issues check_intersection_area_segment_type(const lanelet::LaneletMap & map); + + /** + * @brief Create a submap consisting of road_border linestrings and lanelet edges only. + * + * @param map + * @param intersection_area + * @return lanelet::LaneletSubmapUPtr + */ + lanelet::LaneletSubmapUPtr create_nearby_borders_submap( + const lanelet::LaneletMap & map, const lanelet::ConstPolygon3d & intersection_area); + + /** + * @brief Create a list-up-string from Ids=vector + * + * @param ids + * @return std::string + */ + std::string ids_to_string(const lanelet::Ids ids); +}; +} // namespace lanelet::autoware::validation + +// clang-format off +#endif // LANELET2_MAP_VALIDATOR__VALIDATORS__INTERSECTION__INTERSECTION_AREA_SEGMENT_TYPE_HPP_ // NOLINT +// clang-format on diff --git a/map/autoware_lanelet2_map_validator/src/include/lanelet2_map_validator/validators/intersection/intersection_area_validity.hpp b/map/autoware_lanelet2_map_validator/src/include/lanelet2_map_validator/validators/intersection/intersection_area_validity.hpp new file mode 100644 index 00000000..708cefab --- /dev/null +++ b/map/autoware_lanelet2_map_validator/src/include/lanelet2_map_validator/validators/intersection/intersection_area_validity.hpp @@ -0,0 +1,37 @@ +// Copyright 2024 Autoware Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef LANELET2_MAP_VALIDATOR__VALIDATORS__INTERSECTION__INTERSECTION_AREA_VALIDITY_HPP_ // NOLINT +#define LANELET2_MAP_VALIDATOR__VALIDATORS__INTERSECTION__INTERSECTION_AREA_VALIDITY_HPP_ // NOLINT + +#include +#include + +namespace lanelet::autoware::validation +{ +class IntersectionAreaValidityValidator : public lanelet::validation::MapValidator +{ +public: + constexpr static const char * name() { return "mapping.intersection.intersection_area_validity"; } + + lanelet::validation::Issues operator()(const lanelet::LaneletMap & map) override; + +private: + lanelet::validation::Issues check_intersection_area_validity(const lanelet::LaneletMap & map); +}; +} // namespace lanelet::autoware::validation + +// clang-format off +#endif // LANELET2_MAP_VALIDATOR__VALIDATORS__INTERSECTION__INTERSECTION_AREA_VALIDITY_HPP_ // NOLINT +// clang-format on diff --git a/map/autoware_lanelet2_map_validator/src/validators/intersection/intersection_area_segment_type.cpp b/map/autoware_lanelet2_map_validator/src/validators/intersection/intersection_area_segment_type.cpp new file mode 100644 index 00000000..60e0a179 --- /dev/null +++ b/map/autoware_lanelet2_map_validator/src/validators/intersection/intersection_area_segment_type.cpp @@ -0,0 +1,152 @@ +// Copyright 2024 Autoware Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "lanelet2_map_validator/validators/intersection/intersection_area_segment_type.hpp" + +#include "lanelet2_map_validator/utils.hpp" + +#include + +#include +#include +#include + +#include + +namespace lanelet::autoware::validation +{ +namespace +{ +lanelet::validation::RegisterMapValidator reg; +} + +lanelet::validation::Issues IntersectionAreaSegmentTypeValidator::operator()( + const lanelet::LaneletMap & map) +{ + lanelet::validation::Issues issues; + + lanelet::autoware::validation::appendIssues(issues, check_intersection_area_segment_type(map)); + + return issues; +} + +lanelet::validation::Issues +IntersectionAreaSegmentTypeValidator::check_intersection_area_segment_type( + const lanelet::LaneletMap & map) +{ + lanelet::validation::Issues issues; + + for (const lanelet::ConstPolygon3d & polygon3d : map.polygonLayer) { + if ( + !polygon3d.hasAttribute(lanelet::AttributeName::Type) || + polygon3d.attribute(lanelet::AttributeName::Type).value() != "intersection_area") { + continue; + } + + const auto borders_submap = create_nearby_borders_submap(map, polygon3d); + lanelet::Ids invalid_point_ids = {}; + for (const lanelet::ConstPoint3d & point : polygon3d) { + lanelet::LineStrings3d search_results = borders_submap->lineStringLayer.findUsages(point); + if (search_results.empty()) { + invalid_point_ids.push_back(point.id()); + } + } + if (!invalid_point_ids.empty()) { + issues.emplace_back( + lanelet::validation::Severity::Error, lanelet::validation::Primitive::Polygon, + polygon3d.id(), + append_issue_code_prefix( + this->name(), 1, + "This intersection area is not made by points from road_border linestrings or lanelet " + "edges. (Point ID: " + + ids_to_string(invalid_point_ids) + ")")); + } + } + + return issues; +} + +lanelet::LaneletSubmapUPtr IntersectionAreaSegmentTypeValidator::create_nearby_borders_submap( + const lanelet::LaneletMap & map, const lanelet::ConstPolygon3d & intersection_area) +{ + lanelet::BoundingBox2d bbox2d = + lanelet::geometry::boundingBox2d(lanelet::traits::toBasicPolygon2d(intersection_area)); + + lanelet::ConstLanelets nearby_lanelets = map.laneletLayer.search(bbox2d); + lanelet::ConstLineStrings3d nearby_linestrings = map.lineStringLayer.search(bbox2d); + + lanelet::LineStrings3d nearby_borders; + + // Collect lanelet edges intersecting the intersection area + for (const auto & lanelet : nearby_lanelets) { + if ( + !lanelet.hasAttribute(lanelet::AttributeName::Subtype) || + lanelet.attribute(lanelet::AttributeName::Subtype).value() != + lanelet::AttributeValueString::Road) { + continue; + } + + if (bbox2d.contains(lanelet.leftBound2d().front().basicPoint2d())) { + lanelet::Point3d left_point(lanelet.leftBound().front()); + lanelet::Point3d right_point(lanelet.rightBound().front()); + + lanelet::AttributeMap attribute; + attribute["type"] = "lanelet_edge"; // An instant linestring type for this code + + lanelet::LineString3d lanelet_front_edge( + lanelet::utils::getId(), {left_point, right_point}, attribute); + nearby_borders.push_back(lanelet_front_edge); + } + + if (bbox2d.contains(lanelet.leftBound2d().back().basicPoint2d())) { + lanelet::Point3d left_point(lanelet.leftBound().back()); + lanelet::Point3d right_point(lanelet.rightBound().back()); + + lanelet::AttributeMap attribute; + attribute["type"] = "lanelet_edge"; // An instant linestring type for this code + + lanelet::LineString3d lanelet_back_edge( + lanelet::utils::getId(), {left_point, right_point}, attribute); + nearby_borders.push_back(lanelet_back_edge); + } + } + + // Collect road_border subtype linestrings + for (const auto & linestring : nearby_linestrings) { + if ( + linestring.hasAttribute(lanelet::AttributeName::Type) && + linestring.attribute(lanelet::AttributeName::Type).value() == + lanelet::AttributeValueString::RoadBorder) { + auto data = std::const_pointer_cast(linestring.constData()); + nearby_borders.push_back(lanelet::LineString3d(data, linestring.inverted())); + } + } + + return lanelet::utils::createSubmap(nearby_borders); +} + +std::string IntersectionAreaSegmentTypeValidator::ids_to_string(const lanelet::Ids ids) +{ + std::string result = "("; + for (size_t i = 0; i < ids.size(); i++) { + result += std::to_string(ids[i]); + if (i < ids.size() - 1) { + result += ", "; + } + } + result += ")"; + return result; +} + +} // namespace lanelet::autoware::validation diff --git a/map/autoware_lanelet2_map_validator/src/validators/intersection/intersection_area_validity.cpp b/map/autoware_lanelet2_map_validator/src/validators/intersection/intersection_area_validity.cpp new file mode 100644 index 00000000..2a0a2893 --- /dev/null +++ b/map/autoware_lanelet2_map_validator/src/validators/intersection/intersection_area_validity.cpp @@ -0,0 +1,73 @@ +// Copyright 2024 Autoware Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "lanelet2_map_validator/validators/intersection/intersection_area_validity.hpp" + +#include "lanelet2_map_validator/utils.hpp" + +#include + +#include +#include +#include + +#include + +namespace lanelet::autoware::validation +{ +namespace +{ +lanelet::validation::RegisterMapValidator reg; +} + +lanelet::validation::Issues IntersectionAreaValidityValidator::operator()( + const lanelet::LaneletMap & map) +{ + lanelet::validation::Issues issues; + + lanelet::autoware::validation::appendIssues(issues, check_intersection_area_validity(map)); + + return issues; +} + +lanelet::validation::Issues IntersectionAreaValidityValidator::check_intersection_area_validity( + const lanelet::LaneletMap & map) +{ + lanelet::validation::Issues issues; + + for (const lanelet::ConstPolygon3d & polygon3d : map.polygonLayer) { + if ( + !polygon3d.hasAttribute(lanelet::AttributeName::Type) || + polygon3d.attribute(lanelet::AttributeName::Type).value() != "intersection_area") { + continue; + } + + lanelet::BasicPolygon2d basic_polygon2d = lanelet::traits::to2D(polygon3d.basicPolygon()); + + std::string reason; + bool polygon_is_valid = boost::geometry::is_valid(basic_polygon2d, reason); + if (!polygon_is_valid) { + issues.emplace_back( + lanelet::validation::Severity::Error, lanelet::validation::Primitive::Polygon, + polygon3d.id(), + append_issue_code_prefix( + this->name(), 1, + "This intersection_area doesn't satisfy boost::geometry::is_valid (reason: " + reason + + ").")); + } + } + + return issues; +} +} // namespace lanelet::autoware::validation diff --git a/map/autoware_lanelet2_map_validator/test/data/map/intersection/basic_intersection_area.osm b/map/autoware_lanelet2_map_validator/test/data/map/intersection/basic_intersection_area.osm new file mode 100644 index 00000000..b5122a94 --- /dev/null +++ b/map/autoware_lanelet2_map_validator/test/data/map/intersection/basic_intersection_area.osm @@ -0,0 +1,2985 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_irrelative_point.osm b/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_irrelative_point.osm new file mode 100644 index 00000000..a8e04a2b --- /dev/null +++ b/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_irrelative_point.osm @@ -0,0 +1,2992 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_self_intersection.osm b/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_self_intersection.osm new file mode 100644 index 00000000..d0679e0d --- /dev/null +++ b/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_self_intersection.osm @@ -0,0 +1,2986 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_wrong_linestring_type.osm b/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_wrong_linestring_type.osm new file mode 100644 index 00000000..9c212f79 --- /dev/null +++ b/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_wrong_linestring_type.osm @@ -0,0 +1,2986 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_wrong_orientation.osm b/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_wrong_orientation.osm new file mode 100644 index 00000000..4bb51e8f --- /dev/null +++ b/map/autoware_lanelet2_map_validator/test/data/map/intersection/intersection_area_with_wrong_orientation.osm @@ -0,0 +1,2985 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/map/autoware_lanelet2_map_validator/test/data/map/sample_map.osm b/map/autoware_lanelet2_map_validator/test/data/map/sample_map.osm index e9b84e91..8994ebae 100644 --- a/map/autoware_lanelet2_map_validator/test/data/map/sample_map.osm +++ b/map/autoware_lanelet2_map_validator/test/data/map/sample_map.osm @@ -1,6 +1,6 @@ - + @@ -155,14 +155,14 @@ - - - + + + - - - + + + @@ -170,29 +170,24 @@ - - - + + + - - - - - - - - + + + - - - + + + - - - + + + @@ -200,19 +195,19 @@ - - - + + + - - - + + + - - - + + + @@ -385,10 +380,10 @@ - - - - + + + + @@ -445,14 +440,14 @@ - - - + + + - - - + + + @@ -625,24 +620,24 @@ - - - + + + - - + + - - - - + + + + - - - + + + @@ -770,11 +765,6 @@ - - - - - @@ -3631,9 +3621,9 @@ - - - + + + @@ -3731,6 +3721,921 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4152,7 +5057,6 @@ - @@ -4653,11 +5557,6 @@ - - - - - @@ -5090,12 +5989,6 @@ - - - - - - @@ -5243,12 +6136,6 @@ - - - - - - @@ -5283,6 +6170,316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5291,6 +6488,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5786,15 +7139,6 @@ - - - - - - - - - @@ -5822,6 +7166,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5891,7 +7271,7 @@ - + diff --git a/map/autoware_lanelet2_map_validator/test/src/test_intersection_area_segment_type.cpp b/map/autoware_lanelet2_map_validator/test/src/test_intersection_area_segment_type.cpp new file mode 100644 index 00000000..df72f1b8 --- /dev/null +++ b/map/autoware_lanelet2_map_validator/test/src/test_intersection_area_segment_type.cpp @@ -0,0 +1,93 @@ +// Copyright 2024 Autoware Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "lanelet2_map_validator/validators/intersection/intersection_area_segment_type.hpp" +#include "map_validation_tester.hpp" + +#include +#include + +class TestIntersectionAreaSegmentType : public MapValidationTester +{ +private: +}; + +TEST_F(TestIntersectionAreaSegmentType, ValidatorAvailability) // NOLINT for gtest +{ + std::string expected_validator_name = + lanelet::autoware::validation::IntersectionAreaSegmentTypeValidator::name(); + + lanelet::validation::Strings validators = + lanelet::validation::availabeChecks(expected_validator_name); // cspell:disable-line + + const uint32_t expected_validator_num = 1; + EXPECT_EQ(expected_validator_num, validators.size()); + EXPECT_EQ(expected_validator_name, validators[0]); +} + +TEST_F(TestIntersectionAreaSegmentType, CheckIrrelativePoint) // NOLINT for gtest +{ + load_target_map("intersection/intersection_area_with_irrelative_point.osm"); + + lanelet::autoware::validation::IntersectionAreaSegmentTypeValidator checker; + const auto & issues = checker(*map_); + + EXPECT_EQ(issues.size(), 1); + EXPECT_EQ(issues[0].id, 10803); + EXPECT_EQ(issues[0].severity, lanelet::validation::Severity::Error); + EXPECT_EQ(issues[0].primitive, lanelet::validation::Primitive::Polygon); + EXPECT_EQ( + issues[0].message, + "[Intersection.IntersectionAreaSegmentType-001] This intersection area is not made by points " + "from road_border linestrings or lanelet edges. (Point ID: (10804))"); +} + +TEST_F(TestIntersectionAreaSegmentType, CheckWrongLinestringType) // NOLINT for gtest +{ + load_target_map("intersection/intersection_area_with_wrong_linestring_type.osm"); + + lanelet::autoware::validation::IntersectionAreaSegmentTypeValidator checker; + const auto & issues = checker(*map_); + + EXPECT_EQ(issues.size(), 1); + EXPECT_EQ(issues[0].id, 10803); + EXPECT_EQ(issues[0].severity, lanelet::validation::Severity::Error); + EXPECT_EQ(issues[0].primitive, lanelet::validation::Primitive::Polygon); + EXPECT_EQ( + issues[0].message, + "[Intersection.IntersectionAreaSegmentType-001] This intersection area is not made by points " + "from road_border linestrings or lanelet edges. (Point ID: (10756, 10757, 10758, 10759, 10760, " + "10761, 10762, 10763, 10764, 10765, 10766, 10767, 10768, 10769, 10770, 10771, 10772, 10773, " + "10774, 10775, 10776))"); +} + +TEST_F(TestIntersectionAreaSegmentType, ValidIntersectionArea) // NOLINT for gtest +{ + load_target_map("intersection/basic_intersection_area.osm"); + + lanelet::autoware::validation::IntersectionAreaSegmentTypeValidator checker; + const auto & issues = checker(*map_); + + EXPECT_EQ(issues.size(), 0); +} + +TEST_F(TestIntersectionAreaSegmentType, SampleMap) // NOLINT for gtest +{ + load_target_map("sample_map.osm"); + + lanelet::autoware::validation::IntersectionAreaSegmentTypeValidator checker; + const auto & issues = checker(*map_); + + EXPECT_EQ(issues.size(), 0); +} diff --git a/map/autoware_lanelet2_map_validator/test/src/test_intersection_area_validity.cpp b/map/autoware_lanelet2_map_validator/test/src/test_intersection_area_validity.cpp new file mode 100644 index 00000000..faea5fd2 --- /dev/null +++ b/map/autoware_lanelet2_map_validator/test/src/test_intersection_area_validity.cpp @@ -0,0 +1,93 @@ +// Copyright 2024 Autoware Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "lanelet2_map_validator/validators/intersection/intersection_area_validity.hpp" +#include "map_validation_tester.hpp" + +#include +#include + +class TestIntersectionAreaValidity : public MapValidationTester +{ +private: +}; + +TEST_F(TestIntersectionAreaValidity, ValidatorAvailability) // NOLINT for gtest +{ + std::string expected_validator_name = + lanelet::autoware::validation::IntersectionAreaValidityValidator::name(); + + lanelet::validation::Strings validators = + lanelet::validation::availabeChecks(expected_validator_name); // cspell:disable-line + + const uint32_t expected_validator_num = 1; + EXPECT_EQ(expected_validator_num, validators.size()); + EXPECT_EQ(expected_validator_name, validators[0]); +} + +TEST_F(TestIntersectionAreaValidity, CheckWrongOrientation) // NOLINT for gtest +{ + load_target_map("intersection/intersection_area_with_wrong_orientation.osm"); + + lanelet::autoware::validation::IntersectionAreaValidityValidator checker; + const auto & issues = checker(*map_); + + EXPECT_EQ(issues.size(), 1); + EXPECT_EQ(issues[0].id, 10803); + EXPECT_EQ(issues[0].severity, lanelet::validation::Severity::Error); + EXPECT_EQ(issues[0].primitive, lanelet::validation::Primitive::Polygon); + EXPECT_EQ( + issues[0].message, + "[Intersection.IntersectionAreaValidity-001] This intersection_area doesn't satisfy " + "boost::geometry::is_valid (reason: Geometry has wrong orientation)."); +} + +TEST_F(TestIntersectionAreaValidity, CheckSelfIntersection) // NOLINT for gtest +{ + load_target_map("intersection/intersection_area_with_self_intersection.osm"); + + lanelet::autoware::validation::IntersectionAreaValidityValidator checker; + const auto & issues = checker(*map_); + + EXPECT_EQ(issues.size(), 1); + EXPECT_EQ(issues[0].id, 10803); + EXPECT_EQ(issues[0].severity, lanelet::validation::Severity::Error); + EXPECT_EQ(issues[0].primitive, lanelet::validation::Primitive::Polygon); + EXPECT_EQ( + issues[0].message, + "[Intersection.IntersectionAreaValidity-001] This intersection_area doesn't satisfy " + "boost::geometry::is_valid (reason: Geometry has invalid self-intersections. A " + "self-intersection point was found at (3757.52, 73751.8); method: i; operations: u/i; segment " + "IDs {source, multi, ring, segment}: {0, -1, -1, 21}/{0, -1, -1, 23})."); +} + +TEST_F(TestIntersectionAreaValidity, ValidIntersectionArea) // NOLINT for gtest +{ + load_target_map("intersection/basic_intersection_area.osm"); + + lanelet::autoware::validation::IntersectionAreaValidityValidator checker; + const auto & issues = checker(*map_); + + EXPECT_EQ(issues.size(), 0); +} + +TEST_F(TestIntersectionAreaValidity, SampleMap) // NOLINT for gtest +{ + load_target_map("sample_map.osm"); + + lanelet::autoware::validation::IntersectionAreaValidityValidator checker; + const auto & issues = checker(*map_); + + EXPECT_EQ(issues.size(), 0); +}