From 029a59f2122583dabbbab2521f14bd689877af0f Mon Sep 17 00:00:00 2001
From: TaikiYamada4 <taiki.yamada@tier4.jp>
Date: Fri, 10 Jan 2025 16:56:27 +0900
Subject: [PATCH] Added documents for
 mapping.lane.local_coordinates_declaration

Signed-off-by: TaikiYamada4 <taiki.yamada@tier4.jp>
---
 .../lane/local_coordinates_declaration.md     | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 map/autoware_lanelet2_map_validator/docs/lane/local_coordinates_declaration.md

diff --git a/map/autoware_lanelet2_map_validator/docs/lane/local_coordinates_declaration.md b/map/autoware_lanelet2_map_validator/docs/lane/local_coordinates_declaration.md
new file mode 100644
index 00000000..23da6360
--- /dev/null
+++ b/map/autoware_lanelet2_map_validator/docs/lane/local_coordinates_declaration.md
@@ -0,0 +1,24 @@
+# local_coordinates_declaration
+
+## Validator name
+
+mapping.lane.local_coordinates_declaration
+
+## Feature
+
+This validator checks whether local coordinates are declared to each point in a Lanelet2 map if one or more points have local coordinates. If a Lanelet2 map is made to have local coordinates, each point MUST have both a `local_x` tag and a `local_y` tag.
+
+If the Lanelet2 map is NOT made to have local coordinates and doesn't have a single point with `local_x` or `local_y` declared, this validator ignores the map and outputs no issues.
+
+The validator outputs the following issue with the corresponding ID of the primitive.
+
+| Issue Code                           | Message                                                    | Severity | Primitive | Description                                                                                                                                                  | Approach                                                                                   |
+| ------------------------------------ | ---------------------------------------------------------- | -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
+| Lane.LocalCoordinatesDeclaration-001 | This point doesn't have local coordinates while others do. | Error    | Point     | The map has a point that has tags `local_x` and `local_y` but this point doesn't have them. All points in a map must be set to have both tags or not at all. | Be sure to align whether each point has or does not have both tabs `local_x` and `local_y` |
+| Lane.LocalCoordinatesDeclaration-002 | "local_x" is declared but "local_y" is not."               | Error    | Point     | The point has a `local_x` tag but doesn't have a `local_y` tag.                                                                                              | Be sure that all points have both tags `local_x` and `local_y`.                            |
+| Lane.LocalCoordinatesDeclaration-003 | "local_y" is declared but "local_x" is not."               | Error    | Point     | The point has a `local_y` tag but doesn't have a `local_x` tag.                                                                                              | Be sure that all points have both tags `local_x` and `local_y`.                            |
+
+## Related source codes
+
+- local_coordinates_declaration.cpp
+- local_coordinates_declaration.hpp