Skip to content

Commit

Permalink
Specify south west corner is included, add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
fulldecent committed Jun 7, 2021
1 parent e05cd31 commit 2ce7dca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/Plus Codes Specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ All substantial changes changes to this document are listed here.
A **Plus Code** represents a locus of coordinates ("**area**") with **bounds** on northern & southern parallels and western & eastern meridians. This area includes exactly the coordinates:

1. Inside (excluding) the bounds;
2. On the eastern bound between (excluding) the northern and southern bounds;
2. On the western bound between (excluding) the northern and southern bounds;
3. (If the northern bound is 90° N and the western bound is 180° W) the North Pole (i.e. the point at 90° N);
4. (If the southern bound is 90° S and the western bound is 180° W) the South Pole (i.e. the point at 90° S); and
5. (If the southern bound is not 90° S) on the southern bound from (excluding) the western bound to (including) the eastern bound.
5. (If the southern bound is not 90° S) on the southern bound from (including) the western bound to (excluding) the eastern bound.

This specification references latitudes and longitudes on Earth under [WGS 84](https://earth-info.nga.mil), which is the standard used by the Global Positioning System. If another geodetic is used, that context MUST be agreed between the producer and consumer of a Plus Code.

Expand Down
11 changes: 11 additions & 0 deletions test_data/encoding.csv
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
0.5,179.5,4,6VGX0000+
1,1,11,6FH32222+222
################################################################################
# Corners and edges of bounds
# Plus Codes Specification:
# > This area includes exactly the coordinates:...
# > 1. Inside (excluding) the bounds;
0,0.1,2,6F000000+
# > 2. On the western bound between (excluding) the northern and southern bounds;
0,0,2,6F000000+
# > 5. (If the southern bound is not 90° S) on the southern bound from (excluding) the western bound to (including) the eastern bound.
-10,0,2,6F000000+
-10,0.1,2,6F000000+
################################################################################
# North Pole and latitudes > 90N
# Plus Codes Specification:
# > This area includes exactly the coordinates:...
Expand Down

0 comments on commit 2ce7dca

Please sign in to comment.