Skip to content

Commit 32b6e07

Browse files
authored
GeoPoint -> LatLng (#466)
* H3_EXPORT(pointToCell) * find: pointToCell * formatting * find pointToCell in .md, .h.in, .txt * filename change * find: H3_EXPORT(cellToPoint) * find: cellToPoint in .c * find cellToPoint in *.txt, *.md * filename changes * cmake * formatting * rename files * vertexToPoint * LinkedGeoPoint * formatting * move `*` * move `*` again * eh, whatever, formatter * find: GeoPoint in *.c,*.h,*.h.in * formatting * remaining GeoPoints * filename changes * lonDegs * lonRads * coslon and sinlon * lat/lon -> lat/lng * few more lat/lons * E_LATLON_DOMAIN * LatLon * invalidLon * a few stray `Lon `s * minPosLon and maxNegLon * minLon and maxLon * `lon`s in polygonAlgos.h * _LON * stray `lon`s in latLngToCell.c * posLatPosLon and negLatPosLon * `lon=` and `lon;` * some text locations * in error-handling-rfc * .lon * ->lon * `LatLng` struct in h3api.h.in * let's not change the 3.x docs * changelog * updating the terminology rfc * update copyright year * update copyright year * cite terminology RFC * lat/lng in docs terminology page * placeholder python names * some dangling GeoCoord changes * meh * distanceRads * pointDistKm * pointDistM * docs * filter names * latLngToCell in docs in a few more places * docs filenames for latLngToCell * h3ToGeoBoundary to cellToBoundary * h3ToGeoDesc * h3ToGeoDesc.md to cellToLatLngDesc.md * formatting * h3ToGeo in a few more places * can't change the "js live" examples before the JS bindings update * D -> d in version-3.x sidebards * relative path seems to fix `Error: Docusaurus found broken links!` * Revert "can't change the "js live" examples before the JS bindings update" This reverts commit 25cb2c3. * notes on cleaning up the website * outputLngLatKML * change weird LatLng variable name * latLngToCellDesc * remove website cleanup notes
1 parent 9ab1053 commit 32b6e07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1067
-1067
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ The public API of this library consists of the functions declared in file
1616
- closed-form implementation of `numHexagons`
1717

1818
### Breaking changes
19-
- rename `maxH3ToChildrenSize` to `cellToChildrenSize`
19+
- rename functions according to the terminology RFC (#403, #466)
2020
- `cellToChildrenSize` to output `int64_t` instead of `int`
21+
- `pointDistRads` to `distanceRads`
22+
- `pointDistKm` to `distanceKm`
23+
- `pointDistM` to `distanceM`
24+
25+
### Other changes
26+
- generally use `lng` instead of `lon`
2127

2228
## [3.7.1] - 2020-10-05
2329
### Fixed

CMakeLists.txt

+20-20
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ set(LIB_SOURCE_FILES
106106
src/h3lib/include/polygonAlgos.h
107107
src/h3lib/include/h3Index.h
108108
src/h3lib/include/directedEdge.h
109-
src/h3lib/include/geoPoint.h
109+
src/h3lib/include/latLng.h
110110
src/h3lib/include/vec2d.h
111111
src/h3lib/include/vec3d.h
112112
src/h3lib/include/linkedGeo.h
@@ -129,7 +129,7 @@ set(LIB_SOURCE_FILES
129129
src/h3lib/lib/vertex.c
130130
src/h3lib/lib/linkedGeo.c
131131
src/h3lib/lib/localij.c
132-
src/h3lib/lib/geoPoint.c
132+
src/h3lib/lib/latLng.c
133133
src/h3lib/lib/directedEdge.c
134134
src/h3lib/lib/mathExtensions.c
135135
src/h3lib/lib/iterators.c
@@ -154,11 +154,11 @@ set(EXAMPLE_SOURCE_FILES
154154
examples/compactCells.c
155155
examples/edge.c)
156156
set(OTHER_SOURCE_FILES
157-
src/apps/filters/cellToPoint.c
157+
src/apps/filters/cellToLatLng.c
158158
src/apps/filters/h3ToLocalIj.c
159159
src/apps/filters/localIjToH3.c
160160
src/apps/filters/h3ToComponents.c
161-
src/apps/filters/pointToCell.c
161+
src/apps/filters/latLngToCell.c
162162
src/apps/filters/cellToBoundary.c
163163
src/apps/filters/gridDisk.c
164164
src/apps/filters/gridDiskUnsafe.c
@@ -172,15 +172,15 @@ set(OTHER_SOURCE_FILES
172172
src/apps/testapps/testCellToParent.c
173173
src/apps/testapps/testH3Index.c
174174
src/apps/testapps/mkRandGeoBoundary.c
175-
src/apps/testapps/testPointToCell.c
175+
src/apps/testapps/testLatLngToCell.c
176176
src/apps/testapps/testH3NeighborRotations.c
177177
src/apps/testapps/testCellToChildrenSize.c
178178
src/apps/testapps/testGridDisksUnsafe.c
179-
src/apps/testapps/testCellToPoint.c
179+
src/apps/testapps/testCellToLatLng.c
180180
src/apps/testapps/testCellToCenterChild.c
181181
src/apps/testapps/testCellToChildren.c
182182
src/apps/testapps/testGetIcosahedronFaces.c
183-
src/apps/testapps/testGeoPoint.c
183+
src/apps/testapps/testLatLng.c
184184
src/apps/testapps/testGridRingUnsafe.c
185185
src/apps/testapps/testH3SetToVertexGraph.c
186186
src/apps/testapps/testBBox.c
@@ -208,13 +208,13 @@ set(OTHER_SOURCE_FILES
208208
src/apps/testapps/testH3Memory.c
209209
src/apps/testapps/testH3Iterators.c
210210
src/apps/miscapps/cellToBoundaryHier.c
211-
src/apps/miscapps/cellToPointHier.c
211+
src/apps/miscapps/cellToLatLngHier.c
212212
src/apps/miscapps/generateBaseCellNeighbors.c
213213
src/apps/miscapps/generatePentagonDirectionFaces.c
214214
src/apps/miscapps/generateFaceCenterPoint.c
215215
src/apps/miscapps/h3ToHier.c
216-
src/apps/fuzzers/fuzzerPointToCell.c
217-
src/apps/fuzzers/fuzzerCellToPoint.c
216+
src/apps/fuzzers/fuzzerLatLngToCell.c
217+
src/apps/fuzzers/fuzzerCellToLatLng.c
218218
src/apps/fuzzers/fuzzerGridDisk.c
219219
src/apps/benchmarks/benchmarkPolygonToCells.c
220220
src/apps/benchmarks/benchmarkPolygon.c
@@ -378,16 +378,16 @@ if(BUILD_FILTERS)
378378
list(APPEND INSTALL_TARGETS ${name})
379379
endmacro()
380380

381-
add_h3_filter(pointToCell src/apps/filters/pointToCell.c ${APP_SOURCE_FILES})
381+
add_h3_filter(latLngToCell src/apps/filters/latLngToCell.c ${APP_SOURCE_FILES})
382382
add_h3_filter(h3ToComponents src/apps/filters/h3ToComponents.c ${APP_SOURCE_FILES})
383-
add_h3_filter(cellToPoint src/apps/filters/cellToPoint.c ${APP_SOURCE_FILES})
383+
add_h3_filter(cellToLatLng src/apps/filters/cellToLatLng.c ${APP_SOURCE_FILES})
384384
add_h3_filter(h3ToLocalIj src/apps/filters/h3ToLocalIj.c ${APP_SOURCE_FILES})
385385
add_h3_filter(localIjToH3 src/apps/filters/localIjToH3.c ${APP_SOURCE_FILES})
386386
add_h3_filter(cellToBoundary src/apps/filters/cellToBoundary.c ${APP_SOURCE_FILES})
387387
add_h3_filter(gridDiskUnsafe src/apps/filters/gridDiskUnsafe.c ${APP_SOURCE_FILES})
388388
add_h3_filter(gridDisk src/apps/filters/gridDisk.c ${APP_SOURCE_FILES})
389389
add_h3_filter(cellToBoundaryHier src/apps/miscapps/cellToBoundaryHier.c ${APP_SOURCE_FILES})
390-
add_h3_filter(cellToPointHier src/apps/miscapps/cellToPointHier.c ${APP_SOURCE_FILES})
390+
add_h3_filter(cellToLatLngHier src/apps/miscapps/cellToLatLngHier.c ${APP_SOURCE_FILES})
391391
add_h3_filter(h3ToHier src/apps/miscapps/h3ToHier.c ${APP_SOURCE_FILES})
392392

393393
# Generate KML files for visualizing the H3 grid
@@ -405,7 +405,7 @@ if(BUILD_FILTERS)
405405
VERBATIM
406406
DEPENDS create-kml-dir)
407407
add_custom_target(kml_centers_${resolution}
408-
COMMAND ${SHELL} "$<TARGET_FILE:h3ToHier> -r ${resolution} | $<TARGET_FILE:cellToPoint> --kml --kml-name res${resolution}centers.kml --kml-description \"Res ${resolution} Centers\" > KML/res${resolution}centers.kml"
408+
COMMAND ${SHELL} "$<TARGET_FILE:h3ToHier> -r ${resolution} | $<TARGET_FILE:cellToLatLng> --kml --kml-name res${resolution}centers.kml --kml-description \"Res ${resolution} Centers\" > KML/res${resolution}centers.kml"
409409
VERBATIM
410410
DEPENDS create-kml-dir)
411411
add_dependencies(kml
@@ -550,17 +550,17 @@ if(H3_IS_ROOT_PROJECT AND BUILD_TESTING)
550550
# Add each individual test
551551
file(GLOB all_centers tests/inputfiles/bc*centers.txt)
552552
foreach(file ${all_centers})
553-
add_h3_test_with_file(testPointToCell src/apps/testapps/testPointToCell.c ${file})
553+
add_h3_test_with_file(testLatLngToCell src/apps/testapps/testLatLngToCell.c ${file})
554554
endforeach()
555555

556556
file(GLOB all_ic_files tests/inputfiles/res*ic.txt)
557557
foreach(file ${all_ic_files})
558-
add_h3_test_with_file(testCellToPoint src/apps/testapps/testCellToPoint.c ${file})
558+
add_h3_test_with_file(testCellToLatLng src/apps/testapps/testCellToLatLng.c ${file})
559559
endforeach()
560560

561561
file(GLOB all_centers tests/inputfiles/rand*centers.txt)
562562
foreach(file ${all_centers})
563-
add_h3_test_with_file(testPointToCell src/apps/testapps/testPointToCell.c ${file})
563+
add_h3_test_with_file(testLatLngToCell src/apps/testapps/testLatLngToCell.c ${file})
564564
endforeach()
565565

566566
file(GLOB all_cells tests/inputfiles/*cells.txt)
@@ -586,7 +586,7 @@ if(H3_IS_ROOT_PROJECT AND BUILD_TESTING)
586586
add_h3_test(testPolygonToCellsReported src/apps/testapps/testPolygonToCellsReported.c)
587587
add_h3_test(testVertexGraph src/apps/testapps/testVertexGraph.c)
588588
add_h3_test(testDirectedEdge src/apps/testapps/testDirectedEdge.c)
589-
add_h3_test(testGeoPoint src/apps/testapps/testGeoPoint.c)
589+
add_h3_test(testLatLng src/apps/testapps/testLatLng.c)
590590
add_h3_test(testBBox src/apps/testapps/testBBox.c)
591591
add_h3_test(testVertex src/apps/testapps/testVertex.c)
592592
add_h3_test(testPolygon src/apps/testapps/testPolygon.c)
@@ -632,8 +632,8 @@ if(BUILD_FUZZERS)
632632
add_dependencies(fuzzers ${name})
633633
endmacro()
634634

635-
add_h3_fuzzer(fuzzerPointToCell src/apps/fuzzers/fuzzerPointToCell.c)
636-
add_h3_fuzzer(fuzzerCellToPoint src/apps/fuzzers/fuzzerCellToPoint.c)
635+
add_h3_fuzzer(fuzzerLatLngToCell src/apps/fuzzers/fuzzerLatLngToCell.c)
636+
add_h3_fuzzer(fuzzerCellToLatLng src/apps/fuzzers/fuzzerCellToLatLng.c)
637637
add_h3_fuzzer(fuzzerGridDisk src/apps/fuzzers/fuzzerGridDisk.c)
638638
endif()
639639

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ To build the documentation website, see the [website/](./website/) directory.
152152
To get the H3 index for some location:
153153

154154
```
155-
./bin/geoToH3 --resolution 10 --latitude 40.689167 --longitude -74.044444
155+
./bin/latLngToCell --resolution 10 --latitude 40.689167 --longitude -74.044444
156156
```
157157

158158
10 is the H3 resolution, between 0 (coarsest) and 15 (finest). The coordinates entered are the latitude and longitude, in degrees, you want the index for (these coordinates are the Statue of Liberty). You should get an H3 index as output, like `8a2a1072b59ffff`.
159159

160160
You can then take this index and get some information about it, for example:
161161

162162
```
163-
./bin/h3ToGeoBoundary --index 8a2a1072b59ffff
163+
./bin/cellToBoundary --index 8a2a1072b59ffff
164164
```
165165

166166
This will produce the vertices of the hexagon at this location:
@@ -180,7 +180,7 @@ This will produce the vertices of the hexagon at this location:
180180
You can get the center coordinate of the hexagon like so:
181181

182182
```
183-
./bin/h3ToGeo --index 8a2a1072b59ffff
183+
./bin/cellToLatLng --index 8a2a1072b59ffff
184184
```
185185

186186
This will produce some coordinate:

dev-docs/RFCs/v4.0.0/error-handling-rfc.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Sample:
4343
H3Error err;
4444
H3Index result;
4545
46-
err = geoToH3(lat, lon, res, &result);
46+
err = latLngToCell(lat, lng, res, &result);
4747
if (err) {
4848
fprintf(stderr, "Error: %d", err);
4949
}
@@ -53,7 +53,7 @@ Sample with errors discarded:
5353
```
5454
H3Index result;
5555
56-
geoToH3(lat, lon, res, &result);
56+
latLngToCell(lat, lng, res, &result);
5757
```
5858

5959
Placing error information in the return of function calls requires that functions return two pieces of information - the error status, and the requested data. This approach does make it clear that a status code is returned and that may make it more usual that a consumer of the API does check the error status.
@@ -65,7 +65,7 @@ Sample:
6565
H3Error err;
6666
H3Index result;
6767
68-
err = geoToH3(lat, lon, res, &result);
68+
err = latLngToCell(lat, lng, res, &result);
6969
if (err) {
7070
fprintf(stderr, "Error: %d", err);
7171
}
@@ -75,7 +75,7 @@ Sample with errors discarded:
7575
```
7676
H3Index result;
7777
78-
result = unsafe_geoToH3(lat, lon, res);
78+
result = unsafe_latLngToCell(lat, lng, res);
7979
```
8080

8181
This approach is the same as using return codes, but offers an "unsafe" version of some functions where there is less or no error information returned. This is intended to be used in performance critical cases where the inputs are known to be suitable ahead of time, or the caller would not do anything with the error information anyways.
@@ -87,7 +87,7 @@ Sample:
8787
H3Error err;
8888
H3Index result;
8989
90-
err = geoToH3(lat, lon, res, &result);
90+
err = latLngToCell(lat, lng, res, &result);
9191
if (err) {
9292
const char* msg = h3GetError();
9393
fprintf(stderr, "Error: %d (%s)", err, msg);
@@ -105,7 +105,7 @@ Sample:
105105
H3Error err;
106106
H3Index result;
107107
108-
result = geoToH3(lat, lon, res);
108+
result = latLngToCell(lat, lng, res);
109109
if (err = h3GetError()) {
110110
fprintf(stderr, "Error: %d", err);
111111
}
@@ -115,7 +115,7 @@ Sample with errors discarded:
115115
```
116116
H3Index result;
117117
118-
result = geoToH3(lat, lon, res);
118+
result = latLngToCell(lat, lng, res);
119119
```
120120

121121
In this approach, the data requested is returned from the function, and the consumer is responsible for knowing when to check for errors, and how to handle them. There are a few drawbacks:
@@ -131,7 +131,7 @@ Sample:
131131
H3Error err;
132132
H3Index result;
133133
134-
result = geoToH3(lat, lon, res, &err);
134+
result = latLngToCell(lat, lng, res, &err);
135135
if (err) {
136136
fprintf(stderr, "Error: %d", err);
137137
}
@@ -140,7 +140,7 @@ if (err) {
140140
Sample with errors discarded:
141141
```
142142
H3Index result;
143-
result = geoToH3(lat, lon, res, NULL);
143+
result = latLngToCell(lat, lng, res, NULL);
144144
```
145145

146146
This is an inversion of the return code approach, where the error status is the reference parameter. This offers an advantage that a caller could choose to disregard the error status (for example by passing NULL)
@@ -156,7 +156,7 @@ int err;
156156
if (err = setjmp(env)) {
157157
fprintf(stderr, "Error: %d", err);
158158
} else {
159-
result = geoToH3(lat, lon, res, env);
159+
result = latLngToCell(lat, lng, res, env);
160160
}
161161
```
162162

@@ -176,9 +176,9 @@ It would be good to use a single pattern for error handling, so that callers do
176176
It is proposed that errors will be indicated by the return code of the function. Any public function that can return an
177177
error (for example, due to domain issues in its input) will return an error code.
178178

179-
The signature for `geoToH3` will look like:
179+
The signature for `latLngToCell` will look like:
180180
```
181-
H3Error geoToH3(double lat, double lon, int res, H3Index *result);
181+
H3Error latLngToCell(double lat, double lng, int res, H3Index *result);
182182
```
183183

184184
### Is Valid Functions
@@ -243,7 +243,7 @@ SQLite's approach to this is to define broad error categories (in 8 bits), and t
243243
| 0 | E_SUCCESS | Success (no error)
244244
| 1 | E_FAILED | The operation failed but a more specific error is not available
245245
| 2 | E_DOMAIN | Argument was outside of acceptable range (when a more specific error code is not available)
246-
| 3 | E_LATLON_DOMAIN | Latitude or longitude arguments were outside of acceptable range
246+
| 3 | E_LATLNG_DOMAIN | Latitude or longitude arguments were outside of acceptable range
247247
| 4 | E_RES_DOMAIN | Resolution argument was outside of acceptable range
248248
| 5 | E_CELL_INVALID | `H3Index` cell argument was not valid
249249
| 6 | E_DIR_EDGE_INVALID | `H3Index` directed edge argument was not valid
@@ -261,9 +261,9 @@ The H3 library may always add additional error messages. Error messages not reco
261261
#### Example error code results
262262

263263
```
264-
geoToH3(lat=Infinity, lon=0, res=0, &out) => E_LATLON_DOMAIN
265-
geoToH3(lat=0, lat=0, res=-1, &out) => E_RES_DOMAIN
266-
h3ToGeo(index=0, &out) => E_CELL_INVALID
264+
latLngToCell(lat=Infinity, lng=0, res=0, &out) => E_LATLNG_DOMAIN
265+
latLngToCell(lat=0, lat=0, res=-1, &out) => E_RES_DOMAIN
266+
cellToLatLng(index=0, &out) => E_CELL_INVALID
267267
h3IsResClassIII(index=RES_0_INDEX, &out) => E_SUCCESS
268268
h3IsResClassIII(index=RES_1_INDEX, &out) => E_SUCCESS
269269
h3IsResClassIII(index=0, &out) => E_CELL_INVALID
@@ -273,7 +273,7 @@ hexRange(origin=AN_INDEX, k=-1, &out) => E_DOMAIN
273273
hexRange(origin=PENTAGON_INDEX, k=1, &out) => E_PENTAGON
274274
# Failed to allocate internal buffer:
275275
kRing(origin=AN_INDEX, k=1, &out) => E_MEMORY
276-
pointDistRads({Infinity, Infinity}, {0, 0}, &out) => E_LATLON_DOMAIN
276+
distanceRads({Infinity, Infinity}, {0, 0}, &out) => E_LATLNG_DOMAIN
277277
hexAreaKm2(res=-1) => E_RES_DOMAIN
278278
# Cannot parse:
279279
stringToH3(str="zzzz", &out) => E_FAILED

dev-docs/RFCs/v4.0.0/names_for_concepts_types_functions.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The following technical terms should be used in the documentation, the H3 codeba
5252
- **grid**:
5353
- the graph with nodes corresponding to H3 cells, and edges given by pairs of adjacent cells
5454
- for example, `gridDistance` is the minimal number of edges in a graph path connecting two cells
55-
- **point**:
55+
- **lat/lng point**:
5656
- a representation of a geographic point in terms of a latitude/longitude pair
5757
- **topological**:
5858
- H3 cells are **topological** pentagons or hexagons, in the sense that they have 5 or 6 neighbors, respectively, in the H3 **grid**
@@ -66,7 +66,7 @@ The following technical terms should be used in the documentation, the H3 codeba
6666
- there is a one-to-one correspondence between the "base cell number" and the `H3Index` representation of resolution `0` cells
6767
+ e.g., base cell 0 has `H3Index` hexadecimal representation `'8001fffffffffff'`
6868
- **boundary**:
69-
- all or part of the list of geometric points that enclose an H3 cell
69+
- all or part of the list of lat/lng points that enclose an H3 cell
7070
- may include more than 6 points in the case that a cell is not a geometric hexagon, such as when a hexagon crosses an icosahedron boundary
7171
- may also be used to describe the boundary between two geometric cells, as in the case of an edge
7272
- represented in the H3 codebase with the `CellBoundary` struct (previously `GeoBoundary` before v4.0)
@@ -100,7 +100,7 @@ The proposed prefix is `h3_`.
100100
+ object properties (`getResolution`, `getBaseCellNumber`)
101101
- use `to` to denote transforms
102102
+ different representations of the same object
103-
+ when doing a lossy transformation to a new object (`cellToParent`, `pointToCell`, `polygonToCells`)
103+
+ when doing a lossy transformation to a new object (`cellToParent`, `latLngToCell`, `polygonToCells`)
104104
- do not use `get` or `to` for *computations*
105105
+ e.g., `compactCells`, `cellAreaKm2`
106106

@@ -139,8 +139,8 @@ There is some ambiguity between property, transform, and computation, so use you
139139
| `h3GetResolution` | `getResolution` |
140140
| *DNE* | `getMode` |
141141
| `h3GetFaces` | `getIcosahedronFaces` |
142-
| `geoToH3` | `pointToCell` |
143-
| `h3ToGeo` | `cellToPoint` |
142+
| `geoToH3` | `latLngToCell` |
143+
| `h3ToGeo` | `cellToLatLng` |
144144
| `compact` | `compactCells` |
145145
| `uncompact` | `uncompactCells` |
146146
| `polyfill` | `polygonToCells` |
@@ -260,13 +260,13 @@ discussion requiring benchmarking, so we will defer that to a
260260

261261
- rename `GeoBoundary` to `CellBoundary` to indicate it is space-limited to describing the geometry of cells
262262

263-
| Current name | Proposed name | Notes |
264-
|-------------------|-------------------|-----------------------------------|
265-
| `GeoBoundary` | `CellBoundary` | <= 10 stack-allocated `GeoPoint`s |
266-
| `GeoCoord` | `GeoPoint` | |
267-
| `Geofence` | `GeoLoop` | heap-allocated `GeoPoint`s |
268-
| `GeoPolygon` | `GeoPolygon` | |
269-
| `GeoMultiPolygon` | `GeoMultiPolygon` | currently not used |
263+
| Current name | Proposed name | Notes |
264+
|-------------------|-------------------|---------------------------------|
265+
| `GeoCoord` | `LatLng` | |
266+
| `GeoBoundary` | `CellBoundary` | <= 10 stack-allocated `LatLng`s |
267+
| `Geofence` | `GeoLoop` | heap-allocated `LatLng`s |
268+
| `GeoPolygon` | `GeoPolygon` | |
269+
| `GeoMultiPolygon` | `GeoMultiPolygon` | currently not used |
270270

271271

272272
### Functions

dev-docs/RFCs/v4.0.0/vertex-mode-rfc.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ This proposal would add a new H3 index mode, Vertex Mode, to provide a canonical
1313
The advantages of this approach:
1414

1515
* Shared vertices can be compared between hexagons with a strict equality check
16-
* Vertices can be represented and stored without the trig calls required to produce a lat/lon point
17-
* Vertex to lat/lon can be guaranteed to return the same result across different cells that share the vertex
16+
* Vertices can be represented and stored without the trig calls required to produce a lat/lng point
17+
* Vertex to lat/lng can be guaranteed to return the same result across different cells that share the vertex
1818

1919
At a minimum, this should open up significant performance and correctness gains in `h3SetToLinkedGeo` and `directedEdgeToBoundary`, and there are likely other uses as well.
2020

@@ -47,4 +47,4 @@ Proposed simple algorithm for determining ownership:
4747

4848
* `void getCellVertexes(H3Index cell, H3Vertex *vertices)`
4949
* `H3Vertex getCellVertex(H3Index cell, int vertIndex)`
50-
* `GeoCoord vertexToGeoPoint(H3Vertex vertex)`
50+
* `LatLng vertexToLatLng(H3Vertex vertex)`

0 commit comments

Comments
 (0)