h3 icon indicating copy to clipboard operation
h3 copied to clipboard

Determine if we should remove `Linked*` types from public API

Open ajfriend opened this issue 5 years ago • 2 comments

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, and LinkedGeoPolygon from the public API and only use them internally
  • expose GeoMultiPolygon instead of LinkedGeoPolygon
    • GeoMultiPolygon is easier for clients to work with
  • rename GeoBoundary to CellBoundary to 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

ajfriend avatar Mar 23 '20 23:03 ajfriend

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.

ajfriend avatar Mar 25 '20 00:03 ajfriend

#308

ajfriend avatar Mar 25 '20 00:03 ajfriend