diff --git a/website/docs/api/indexing.mdx b/website/docs/api/indexing.mdx index 4729d792d..58523f48f 100644 --- a/website/docs/api/indexing.mdx +++ b/website/docs/api/indexing.mdx @@ -227,6 +227,7 @@ h3.cell_to_boundary(cell) ``` Returns tuple of lat/lng tuples. +For GeoJSON compatibility, see the [`h3-py` docs](https://uber.github.io/h3-py/api_quick.html#polygon-interface). diff --git a/website/docs/api/inspection.mdx b/website/docs/api/inspection.mdx index 53aadf62f..b3ca47833 100644 --- a/website/docs/api/inspection.mdx +++ b/website/docs/api/inspection.mdx @@ -12,6 +12,9 @@ These functions provide metadata about an H3 index, such as its resolution or ba ## getResolution +Returns the resolution of the index. +(Works for cells, edges, and vertexes.) + -Returns the resolution of the index. ## getBaseCellNumber +Returns the base cell number of the index. +(Works for cells, edges, and vertexes.) + -Returns the base cell number of the index. - ## stringToH3 +Converts the string representation to `H3Index` (`uint64_t`) representation. + @@ -181,8 +188,12 @@ long stringToH3(String h3Address); +:::note + The H3 JavaScript binding supports only the string representation of an H3 index. +::: + @@ -193,16 +204,20 @@ h3.string_to_h3(h) +:::note + The H3 CLI supports only the string representation of an H3 index. +::: + + -Converts the string representation to `H3Index` (`uint64_t`) representation. +## h3ToString -Returns 0 (`E_SUCCESS`) on success. +Converts the `H3Index` representation of the index to the string representation. `str` must be at least of length 17. -## h3ToString @@ -228,6 +245,15 @@ H3Error h3ToString(H3Index h, char *str, size_t sz); String h3ToString(long h3); ``` + + + +:::note + +The H3 JavaScript binding supports only the string representation of an H3 index. + +::: + @@ -238,17 +264,21 @@ h3.h3_to_string(h) +:::note + The H3 CLI supports only the string representation of an H3 index. +::: + -Converts the `H3Index` representation of the index to the string representation. `str` must be at least of length 17. -Returns 0 (`E_SUCCESS`) on success. ## isValidCell +Returns non-zero if this is a valid H3 cell index. + -Returns non-zero if this is a valid H3 cell index. ## isResClassIII +Returns non-zero if this index has a resolution with Class III orientation. + -Returns non-zero if this index has a resolution with Class III orientation. ## isPentagon +Returns non-zero if this index represents a pentagonal cell. + -Returns non-zero if this index represents a pentagonal cell. ## getIcosahedronFaces +Find all icosahedron faces intersected by a given H3 cell. +Faces are represented as integers from 0-19, inclusive. + @@ -532,14 +571,10 @@ $ h3 getIcosahedronFaces -c 85283473fffffff -Find all icosahedron faces intersected by a given H3 index and places them in the array `out`. `out` must be at least length of `maxFaceCount(h)`. - -Faces are represented as integers from 0-19, inclusive. The array is sparse, and empty (no intersection) array values are represented by -1. - -Returns 0 (`E_SUCCESS`) on success. - ## maxFaceCount +Returns the maximum number of icosahedron faces the given H3 index may intersect. + @@ -595,5 +632,3 @@ This function exists for memory management and is not exposed. - -Returns the maximum number of icosahedron faces the given H3 index may intersect.