@@ -98,8 +98,8 @@ const coordinates = h3.cellsToMultiPolygon(hexagons, true);
98
98
## h3
99
99
100
100
* [ h3] ( #module_h3 )
101
- * [ .UNITS] ( #module_h3.UNITS ) : < code >Object</ code >
102
- * [ .h3IndexToSplitLong(h3Index)] ( #module_h3.h3IndexToSplitLong ) ⇒ <code >Array. & lt ; number & gt ; </code >
101
+ * [ .UNITS] ( #module_h3.UNITS )
102
+ * [ .h3IndexToSplitLong(h3Index)] ( #module_h3.h3IndexToSplitLong ) ⇒ <code >SplitLong </code >
103
103
* [ .splitLongToH3Index(lower, upper)] ( #module_h3.splitLongToH3Index ) ⇒ <code >H3Index</code >
104
104
* [ .isValidCell(h3Index)] ( #module_h3.isValidCell ) ⇒ <code >boolean</code >
105
105
* [ .isPentagon(h3Index)] ( #module_h3.isPentagon ) ⇒ <code >boolean</code >
@@ -108,16 +108,16 @@ const coordinates = h3.cellsToMultiPolygon(hexagons, true);
108
108
* [ .getIcosahedronFaces(h3Index)] ( #module_h3.getIcosahedronFaces ) ⇒ <code >Array.< ; number> ; </code >
109
109
* [ .getResolution(h3Index)] ( #module_h3.getResolution ) ⇒ <code >number</code >
110
110
* [ .latLngToCell(lat, lng, res)] ( #module_h3.latLngToCell ) ⇒ <code >H3Index</code >
111
- * [ .cellToLatLng(h3Index)] ( #module_h3.cellToLatLng ) ⇒ <code >Array. & lt ; number & gt ; </code >
112
- * [ .cellToBoundary(h3Index, [ formatAsGeoJson] )] ( #module_h3.cellToBoundary ) ⇒ <code >Array.< ; Array. & lt ; number & gt ; > ; </code >
111
+ * [ .cellToLatLng(h3Index)] ( #module_h3.cellToLatLng ) ⇒ <code >CoordPair </code >
112
+ * [ .cellToBoundary(h3Index, [ formatAsGeoJson] )] ( #module_h3.cellToBoundary ) ⇒ <code >Array.< ; CoordPair > ; </code >
113
113
* [ .cellToParent(h3Index, res)] ( #module_h3.cellToParent ) ⇒ <code >H3Index</code >
114
114
* [ .cellToChildren(h3Index, res)] ( #module_h3.cellToChildren ) ⇒ <code >Array.< ; H3Index> ; </code >
115
115
* [ .cellToCenterChild(h3Index, res)] ( #module_h3.cellToCenterChild ) ⇒ <code >H3Index</code >
116
116
* [ .gridDisk(h3Index, ringSize)] ( #module_h3.gridDisk ) ⇒ <code >Array.< ; H3Index> ; </code >
117
117
* [ .gridDiskDistances(h3Index, ringSize)] ( #module_h3.gridDiskDistances ) ⇒ <code >Array.< ; Array.< ; H3Index> ;> ; </code >
118
118
* [ .gridRingUnsafe(h3Index, ringSize)] ( #module_h3.gridRingUnsafe ) ⇒ <code >Array.< ; H3Index> ; </code >
119
119
* [ .polygonToCells(coordinates, res, [ isGeoJson] )] ( #module_h3.polygonToCells ) ⇒ <code >Array.< ; H3Index> ; </code >
120
- * [ .cellsToMultiPolygon(h3Indexes, [ formatAsGeoJson] )] ( #module_h3.cellsToMultiPolygon ) ⇒ <code >Array.< ; Array.< ; Array.< ; Array. & lt ; number & gt ; > ;> ;> ; </code >
120
+ * [ .cellsToMultiPolygon(h3Indexes, [ formatAsGeoJson] )] ( #module_h3.cellsToMultiPolygon ) ⇒ <code >Array.< ; Array.< ; Array.< ; CoordPair > ;> ;> ; </code >
121
121
* [ .compactCells(h3Set)] ( #module_h3.compactCells ) ⇒ <code >Array.< ; H3Index> ; </code >
122
122
* [ .uncompactCells(compactedSet, res)] ( #module_h3.uncompactCells ) ⇒ <code >Array.< ; H3Index> ; </code >
123
123
* [ .areNeighborCells(origin, destination)] ( #module_h3.areNeighborCells ) ⇒ <code >boolean</code >
@@ -127,7 +127,7 @@ const coordinates = h3.cellsToMultiPolygon(hexagons, true);
127
127
* [ .isValidDirectedEdge(edgeIndex)] ( #module_h3.isValidDirectedEdge ) ⇒ <code >boolean</code >
128
128
* [ .directedEdgeToCells(edgeIndex)] ( #module_h3.directedEdgeToCells ) ⇒ <code >Array.< ; H3Index> ; </code >
129
129
* [ .originToDirectedEdges(h3Index)] ( #module_h3.originToDirectedEdges ) ⇒ <code >Array.< ; H3Index> ; </code >
130
- * [ .directedEdgeToBoundary(edgeIndex, [ formatAsGeoJson] )] ( #module_h3.directedEdgeToBoundary ) ⇒ <code >Array.< ; Array. & lt ; number & gt ; > ; </code >
130
+ * [ .directedEdgeToBoundary(edgeIndex, [ formatAsGeoJson] )] ( #module_h3.directedEdgeToBoundary ) ⇒ <code >Array.< ; CoordPair > ; </code >
131
131
* [ .gridDistance(origin, destination)] ( #module_h3.gridDistance ) ⇒ <code >number</code >
132
132
* [ .gridPathCells(origin, destination)] ( #module_h3.gridPathCells ) ⇒ <code >Array.< ; H3Index> ; </code >
133
133
* [ .cellToLocalIj(origin, destination)] ( #module_h3.cellToLocalIj ) ⇒ <code >CoordIJ</code >
@@ -139,7 +139,7 @@ const coordinates = h3.cellsToMultiPolygon(hexagons, true);
139
139
* [ .getHexagonEdgeLengthAvg(res, unit)] ( #module_h3.getHexagonEdgeLengthAvg ) ⇒ <code >number</code >
140
140
* [ .cellToVertex(h3Index, vertexNum)] ( #module_h3.cellToVertex ) ⇒ <code >H3Index</code >
141
141
* [ .cellToVertexes(h3Index)] ( #module_h3.cellToVertexes ) ⇒ <code >Array.< ; H3Index> ; </code >
142
- * [ .vertexToLatLng(h3Index)] ( #module_h3.vertexToLatLng ) ⇒ <code >Array. & lt ; number & gt ; </code >
142
+ * [ .vertexToLatLng(h3Index)] ( #module_h3.vertexToLatLng ) ⇒ <code >CoordPair </code >
143
143
* [ .isValidVertex(h3Index)] ( #module_h3.isValidVertex ) ⇒ <code >boolean</code >
144
144
* [ .getNumCells(res)] ( #module_h3.getNumCells ) ⇒ <code >number</code >
145
145
* [ .getRes0Cells()] ( #module_h3.getRes0Cells ) ⇒ <code >Array.< ; H3Index> ; </code >
@@ -148,15 +148,17 @@ const coordinates = h3.cellsToMultiPolygon(hexagons, true);
148
148
* [ .radsToDegs(rad)] ( #module_h3.radsToDegs ) ⇒ <code >number</code >
149
149
* [ .H3Index] ( #module_h3.H3Index ) : <code >string</code >
150
150
* [ .H3IndexInput] ( #module_h3.H3IndexInput ) : <code >string</code > \| <code >Array.< ; number> ; </code >
151
- * [ .CoordIJ] ( #module_h3.CoordIJ ) : <code >Object</code >
152
- * [ .H3Error] ( #module_h3.H3Error ) ⇐ <code >Error</code >
151
+ * [ .CoordIJ] ( #module_h3.CoordIJ )
152
+ * [ .H3Error] ( #module_h3.H3Error )
153
+ * [ .CoordPair] ( #module_h3.CoordPair ) : <code >Array.< ; number> ; </code >
154
+ * [ .SplitLong] ( #module_h3.SplitLong ) : <code >Array.< ; number> ; </code >
153
155
154
156
155
157
* * *
156
158
157
159
<a name =" module_h3.UNITS " ></a >
158
160
159
- ### h3.UNITS : < code >Object</ code >
161
+ ### h3.UNITS
160
162
Length/Area units
161
163
162
164
** Properties**
@@ -175,10 +177,10 @@ Length/Area units
175
177
176
178
<a name =" module_h3.h3IndexToSplitLong " ></a >
177
179
178
- ### h3.h3IndexToSplitLong(h3Index) ⇒ <code >Array. & lt ; number & gt ; </code >
180
+ ### h3.h3IndexToSplitLong(h3Index) ⇒ <code >SplitLong </code >
179
181
Convert an H3 index (64-bit hexidecimal string) into a "split long" - a pair of 32-bit ints
180
182
181
- ** Returns** : <code >Array. & lt ; number & gt ; </code > - A two-element array with 32 lower bits and 32 upper bits
183
+ ** Returns** : <code >SplitLong </code > - A two-element array with 32 lower bits and 32 upper bits
182
184
183
185
| Param | Type | Description |
184
186
| --- | --- | --- |
@@ -314,10 +316,10 @@ Get the hexagon containing a lat,lon point
314
316
315
317
<a name =" module_h3.cellToLatLng " ></a >
316
318
317
- ### h3.cellToLatLng(h3Index) ⇒ <code >Array. & lt ; number & gt ; </code >
319
+ ### h3.cellToLatLng(h3Index) ⇒ <code >CoordPair </code >
318
320
Get the lat,lon center of a given hexagon
319
321
320
- ** Returns** : <code >Array. & lt ; number & gt ; </code > - Point as a [ lat, lng] pair
322
+ ** Returns** : <code >CoordPair </code > - Point as a [ lat, lng] pair
321
323
** Throws** :
322
324
323
325
- <code >H3Error</code > If input is invalid
@@ -332,12 +334,12 @@ Get the lat,lon center of a given hexagon
332
334
333
335
<a name =" module_h3.cellToBoundary " ></a >
334
336
335
- ### h3.cellToBoundary(h3Index, [ formatAsGeoJson] ) ⇒ <code >Array.< ; Array. & lt ; number & gt ; > ; </code >
337
+ ### h3.cellToBoundary(h3Index, [ formatAsGeoJson] ) ⇒ <code >Array.< ; CoordPair > ; </code >
336
338
Get the vertices of a given hexagon (or pentagon), as an array of [ lat, lng]
337
339
points. For pentagons and hexagons on the edge of an icosahedron face, this
338
340
function may return up to 10 vertices.
339
341
340
- ** Returns** : <code >Array.< ; Array. & lt ; number & gt ; > ; </code > - Array of [ lat, lng] pairs
342
+ ** Returns** : <code >Array.< ; CoordPair > ; </code > - Array of [ lat, lng] pairs
341
343
** Throws** :
342
344
343
345
- <code >H3Error</code > If input is invalid
@@ -494,7 +496,7 @@ expected to be holes.
494
496
495
497
<a name =" module_h3.cellsToMultiPolygon " ></a >
496
498
497
- ### h3.cellsToMultiPolygon(h3Indexes, [ formatAsGeoJson] ) ⇒ <code >Array.< ; Array.< ; Array.< ; Array. & lt ; number & gt ; > ;> ;> ; </code >
499
+ ### h3.cellsToMultiPolygon(h3Indexes, [ formatAsGeoJson] ) ⇒ <code >Array.< ; Array.< ; Array.< ; CoordPair > ;> ;> ; </code >
498
500
Get the outlines of a set of H3 hexagons, returned in GeoJSON MultiPolygon
499
501
format (an array of polygons, each with an array of loops, each an array of
500
502
coordinates). Coordinates are returned as [ lat, lng] pairs unless GeoJSON
@@ -505,7 +507,7 @@ set have the same resolution and that the set contains no duplicates. Behavior
505
507
is undefined if duplicates or multiple resolutions are present, and the
506
508
algorithm may produce unexpected or invalid polygons.
507
509
508
- ** Returns** : <code >Array.< ; Array.< ; Array.< ; Array. & lt ; number & gt ; > ;> ;> ; </code > - MultiPolygon-style output.
510
+ ** Returns** : <code >Array.< ; Array.< ; Array.< ; CoordPair > ;> ;> ; </code > - MultiPolygon-style output.
509
511
** Throws** :
510
512
511
513
- <code >H3Error</code > If input is invalid
@@ -514,7 +516,7 @@ algorithm may produce unexpected or invalid polygons.
514
516
| Param | Type | Description |
515
517
| --- | --- | --- |
516
518
| h3Indexes | <code >Array.< ; H3IndexInput> ; </code > | H3 indexes to get outlines for |
517
- | [ formatAsGeoJson] | <code >boolean</code > | Whether to provide GeoJSON output: [ lng, lat] , closed loops |
519
+ | [ formatAsGeoJson] | <code >boolean</code > | Whether to provide GeoJSON output: [ lng, lat] , closed loops |
518
520
519
521
520
522
* * *
@@ -684,11 +686,11 @@ every neighbor)
684
686
685
687
<a name =" module_h3.directedEdgeToBoundary " ></a >
686
688
687
- ### h3.directedEdgeToBoundary(edgeIndex, [ formatAsGeoJson] ) ⇒ <code >Array.< ; Array. & lt ; number & gt ; > ; </code >
689
+ ### h3.directedEdgeToBoundary(edgeIndex, [ formatAsGeoJson] ) ⇒ <code >Array.< ; CoordPair > ; </code >
688
690
Get the vertices of a given edge as an array of [ lat, lng] points. Note that for edges that
689
691
cross the edge of an icosahedron face, this may return 3 coordinates.
690
692
691
- ** Returns** : <code >Array.< ; Array. & lt ; number & gt ; > ; </code > - Array of geo coordinate pairs
693
+ ** Returns** : <code >Array.< ; CoordPair > ; </code > - Array of geo coordinate pairs
692
694
** Throws** :
693
695
694
696
- <code >H3Error</code > If the input is invalid
@@ -947,10 +949,10 @@ Find the indexes for all vertexes of a cell.
947
949
948
950
<a name =" module_h3.vertexToLatLng " ></a >
949
951
950
- ### h3.vertexToLatLng(h3Index) ⇒ <code >Array. & lt ; number & gt ; </code >
952
+ ### h3.vertexToLatLng(h3Index) ⇒ <code >CoordPair </code >
951
953
Get the lat, lng of a given vertex
952
954
953
- ** Returns** : <code >Array. & lt ; number & gt ; </code > - Latitude, longitude coordinates of the vertex
955
+ ** Returns** : <code >CoordPair </code > - Latitude, longitude coordinates of the vertex
954
956
** Throws** :
955
957
956
958
- <code >H3Error</code > If the input is invalid
@@ -1073,7 +1075,7 @@ or two 32-bit integers in little endian order in an array.
1073
1075
1074
1076
<a name =" module_h3.CoordIJ " ></a >
1075
1077
1076
- ### h3.CoordIJ : < code >Object</ code >
1078
+ ### h3.CoordIJ
1077
1079
Coordinates as an ` {i, j} ` pair
1078
1080
1079
1081
** Properties**
@@ -1088,11 +1090,10 @@ Coordinates as an `{i, j}` pair
1088
1090
1089
1091
<a name =" module_h3.H3Error " ></a >
1090
1092
1091
- ### h3.H3Error ⇐ < code >Error</ code >
1092
- Custom JS Error with an attached error code. Error codes come from the
1093
+ ### h3.H3Error
1094
+ Custom JS Error instance with an attached error code. Error codes come from the
1093
1095
core H3 library and can be found [ in the H3 docs] ( https://h3geo.org/docs/next/library/errors#table-of-error-codes ) .
1094
1096
1095
- ** Extends** : <code >Error</code >
1096
1097
** Properties**
1097
1098
1098
1099
| Name | Type |
@@ -1101,6 +1102,22 @@ core H3 library and can be found [in the H3 docs](https://h3geo.org/docs/next/li
1101
1102
| code | <code >number</code > |
1102
1103
1103
1104
1105
+ * * *
1106
+
1107
+ <a name =" module_h3.CoordPair " ></a >
1108
+
1109
+ ### h3.CoordPair : <code >Array.< ; number> ; </code >
1110
+ Pair of lat,lng coordinates (or lng,lat if GeoJSON output is specified)
1111
+
1112
+
1113
+ * * *
1114
+
1115
+ <a name =" module_h3.SplitLong " ></a >
1116
+
1117
+ ### h3.SplitLong : <code >Array.< ; number> ; </code >
1118
+ Pair of lower,upper 32-bit ints representing a 64-bit value
1119
+
1120
+
1104
1121
* * *
1105
1122
1106
1123
0 commit comments