Skip to content

Commit 01ce4be

Browse files
committed
Change "Open Location Code" to "Plus Code" when talking about individual codes, as per naming convention
1 parent 26fa64f commit 01ce4be

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Documentation/Specification/specification.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This differs from the above method in that each step produces a single character
5555
This encodes latitude into base five and longitude into base four, and then combines the digits for each position together.
5656

5757
The following provides an algorithm to encode the values from least significant digit to most significant digit:
58-
1. Add 90 to the latiude, multiply the fractional part by 2.5e7 and take the integer part as latitude.
58+
1. Add 90 to the latitude, multiply the fractional part by 2.5e7 and take the integer part as latitude.
5959
1. Add 180 to the longitude, multiply the fractional part by 8.192e6 and take the integer part as longitude.
6060
1. Take the integer part of latitude modulus 5. Multiply that by 4, and add the integer part of the longitude modulus 4.
6161
1. Prefix the existing code with the symbol with the above value.
@@ -64,8 +64,8 @@ The following provides an algorithm to encode the values from least significant
6464

6565
### Code length
6666

67-
The minimum valid length of an Open Location Code is two digits.
68-
The maximum length of an Open Location Code is 15 digits.
67+
The minimum valid length of a Plus Code is two digits.
68+
The maximum length of a Plus Code is 15 digits.
6969

7070
Below 10 digits, only even numbers are valid lengths.
7171

@@ -98,7 +98,7 @@ NB: This table assumes one degree is 111321 meters, and that all distances are c
9898
## Decoding
9999

100100
The coordinates obtained when decoding are the south-west corner.
101-
(The north-east corner and center coordinates can be obtained by adding the precison values.)
101+
(The north-east corner and center coordinates can be obtained by adding the precision values.)
102102

103103
This implies that the north-east coordinates are not included in the area of the code, with the exception of codes whose northern latitude is 90 degrees.
104104

@@ -137,13 +137,13 @@ Given a global code, _796RWF8Q+WF_, you can eliminate the first **four** digits
137137
* The center point of the feature is within **0.4** degrees latitude and **0.4** degrees longitude
138138
* The bounding box of the feature is less than **0.8** degrees high and wide.
139139

140-
(These values are chosen because a four digit Open Location Code is 1x1 degrees.)
140+
(These values are chosen because a four digit Plus Code is 1x1 degrees.)
141141

142142
If there is no suitable locality close enough or small enough, you can eliminate the first **two** digits of the code if:
143143
* The center point of the feature is within **8** degrees latitude and **8** degrees longitude
144144
* The bounding box of the feature is less than **16** degrees high and wide.
145145

146-
(These values are chosen because a two digit Open Location Code is 20x20 degrees.)
146+
(These values are chosen because a two digit Plus Code is 20x20 degrees.)
147147

148148
The values above are slightly smaller than the maximums to allow for different geocoder backends placing localities in slightly different positions.
149149
Although they could be increased there will be a risk that a shortened code will recover to a different location than the original, and people misdirected.
@@ -156,7 +156,7 @@ If a settlement (such as neighbourhood, town or city) is to be used, you should
156156

157157
The following public methods should be provided by any Open Location Code implementation, subject to minor changes caused by language conventions.
158158

159-
Note that any method that returns an Open Location Code should return upper case characters.
159+
Note that any method that returns a Plus Code should return upper case characters.
160160

161161
Methods that accept Plus Codes as parameters should be case insensitive.
162162

@@ -166,41 +166,41 @@ Errors should be returned following the language convention. For example excepti
166166

167167
### `isValid`
168168

169-
The `isValid` method takes a single parameter, a string, and returns a boolean indicating whether the string is a valid Open Location Code sequence.
169+
The `isValid` method takes a single parameter, a string, and returns a boolean indicating whether the string is a valid Plus Code.
170170

171171
### `isShort`
172172

173-
The `isShort` method takes a single parameter, a string, and returns a boolean indicating whether the string is a valid short Open Location Code.
173+
The `isShort` method takes a single parameter, a string, and returns a boolean indicating whether the string is a valid short Plus Code.
174174

175175
See [Short Codes](#short-codes) above.
176176

177177
### `isFull`
178178

179-
Determines if a code is a valid full (i.e. not shortened) Open Location Code.
179+
Determines if a code is a valid full (i.e. not shortened) Plus Code.
180180

181181
Not all possible combinations of Open Location Code characters decode to valid latitude and longitude values.
182182
This checks that a code is valid and that the resulting latitude and longitude values are legal.
183183
Full codes must include the format separator character and it must be after eight characters.
184184

185185
### `encode`
186186

187-
Encode a location into an Open Location Code.
187+
Encode a location into a Plus Code.
188188
This takes a latitude and longitude and an optional length.
189189
If the length is not specified, a code with 10 digits (and the format separator character) will be returned.
190190

191191
### `decode`
192192

193-
Decodes an Open Location Code into the location coordinates.
193+
Decodes a Plus Code into the location coordinates.
194194
This method takes a string.
195-
If the string is a valid full Open Location Code, it returns:
195+
If the string is a valid full Plus Code, it returns:
196196
- the latitude and longitude of the SW corner of the bounding box;
197197
- the latitude and longitude of the NE corner of the bounding box;
198198
- the latitude and longitude of the center of the bounding box;
199199
- the number of digits in the original code.
200200

201201
### `shorten`
202202

203-
Passed a valid full Open Location Code and a latitude and longitude this removes as many digits as possible (up to a maximum of six) such that the resulting code is the closest matching code to the passed location.
203+
Passed a valid full Plus Code and a latitude and longitude this removes as many digits as possible (up to a maximum of six) such that the resulting code is the closest matching code to the passed location.
204204
A safety factor may be included.
205205

206206
If the code cannot be shortened, the original full code should be returned.
@@ -209,4 +209,4 @@ Since the only really useful shortenings are removing the first four or six char
209209

210210
### `recoverNearest`
211211

212-
This method is passed a valid short Open Location Code and a latitude and longitude, and returns the nearest matching full Open Location Code to the specified location.
212+
This method is passed a valid short Plus Code and a latitude and longitude, and returns the nearest matching full Plus Code to the specified location.

0 commit comments

Comments
 (0)