h3
h3 copied to clipboard
Determine if we should remove `Linked*` types from public API
This section was previously in the naming RFC, but we will move it to a separate discussion.
Here's the previous section:
Polygons
Data Structures
- remove the
LinkedGeoCoord,LinkedGeoLoop, andLinkedGeoPolygonfrom the public API and only use them internally - expose
GeoMultiPolygoninstead ofLinkedGeoPolygonGeoMultiPolygonis easier for clients to work with
- rename
GeoBoundarytoCellBoundaryto indicate it is space-limited to describing the geometry of cells
| Current name | Proposed name | Notes |
|---|---|---|
GeoBoundary |
CellBoundary |
<= 10 stack-allocated GeoPoints |
| . | ||
GeoCoord |
GeoPoint |
|
Geofence |
GeoLoop |
heap-allocated GeoPoints |
GeoPolygon |
GeoPolygon |
|
GeoMultiPolygon |
GeoMultiPolygon |
replaces LinkedGeoPolygon in public API |
| . | ||
LinkedGeoCoord |
LinkedGeoPoint |
(remove from public API) |
LinkedGeoLoop |
(remove from public API) | |
LinkedGeoPolygon |
(remove from public API) | |
| . | ||
CoordIJ |
same |
Functions
| Current name | Proposed name | Notes |
|---|---|---|
h3ToGeoBoundary |
cellToBoundary |
returns CellBoundary |
| DNE | cellToLoop |
returns GeoLoop |
| DNE | loopToBoundary |
|
| DNE | boundaryToLoop |
|
getH3UnidirectionalEdgeBoundary |
directedEdgeToBoundary |
returns CellBoundary |
| . | ||
polyfill |
same, polygonToCells |
takes GeoPolygon |
| DNE | multiPolygonToCells |
takes GeoMultiPolygon |
h3SetToLinkedGeo |
cellsToMultiPolygon |
returns GeoMultiPolygon |
The plan is to benchmark GeoMultiPolygon versions of these functions against the existing LinkedGeoPolygon functions to see if the overhead of converting to GeoMultiPolygon is significant.
#308