Skip to content

Commit

Permalink
Update website docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dfellis committed Oct 17, 2024
1 parent cae83f4 commit 3a51545
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 80 deletions.
16 changes: 12 additions & 4 deletions website/docs/api/directededge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ H3 4.1.0
-o, --origin <CELL> Required. Origin H3 Cell
-d, --destination <CELL> Required. Destination H3 Cell
-h, --help Show this help message.
-f, --format <FMT> 'json' for true or false, 'numeric' for 1 or 0 (Default: json)
```
```bash
Expand Down Expand Up @@ -147,11 +148,12 @@ H3 4.1.0
-o, --origin <CELL> Required. Origin H3 Cell
-d, --destination <CELL> Required. Destination H3 Cell
-h, --help Show this help message.
-f, --format <FMT> 'json' for "CELL"\n, 'newline' for CELL\n (Default: json)
```
```bash
$ h3 cellsToDirectedEdge -o 85283473fffffff -d 85283477fffffff
115283473fffffff
"115283473fffffff"
```
</TabItem>
Expand Down Expand Up @@ -221,6 +223,7 @@ H3 4.1.0
isValidDirectedEdge Checks if the provided H3 directed edge is actually valid
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-f, --format <FMT> 'json' for true or false, 'numeric' for 1 or 0 (Default: json)
```
```bash
Expand Down Expand Up @@ -294,11 +297,12 @@ H3 4.1.0
getDirectedEdgeOrigin Returns the origin cell from the directed edge
-c, --cell <index> Required. H3 Cell
-h, --help Show this help message.
-f, --format <FMT> 'json' for "CELL"\n, 'newline' for CELL\n (Default: json)
```
```bash
$ h3 getDirectedEdgeOrigin -c 115283473fffffff
85283473fffffff
"85283473fffffff"
```
</TabItem>
Expand Down Expand Up @@ -365,11 +369,12 @@ H3 4.1.0
getDirectedEdgeDestination Returns the destination cell from the directed edge
-c, --cell <index> Required. H3 Cell
-h, --help Show this help message.
-f, --format <FMT> 'json' for "CELL"\n, 'newline' for CELL\n (Default: json)
```
```bash
$ h3 getDirectedEdgeDestination -c 115283473fffffff
85283477fffffff
"85283477fffffff"
```
</TabItem>
Expand Down Expand Up @@ -436,6 +441,7 @@ H3 4.1.0
directedEdgeToCells Returns the origin, destination pair of cells from the directed edge
-c, --cell <index> Required. H3 Cell
-h, --help Show this help message.
-f, --format <FMT> 'json' for ["CELL", ...], 'newline' for CELL\n... (Default: json)
```
```bash
Expand Down Expand Up @@ -508,6 +514,7 @@ H3 4.1.0
originToDirectedEdges Returns all of the directed edges from the specified origin cell
-c, --cell <index> Required. H3 Cell
-h, --help Show this help message.
-f, --format <FMT> 'json' for ["CELL", ...], 'newline' for CELL\n... (Default: json)
```
```bash
Expand Down Expand Up @@ -581,11 +588,12 @@ H3 4.1.0
directedEdgeToBoundary Provides the coordinates defining the directed edge
-c, --cell <index> Required. H3 Cell
-h, --help Show this help message.
-f, --format <FMT> 'json' for [[lat, lng], ...], 'wkt' for a WKT POLYGON, 'newline' for lat\nlng\n... (Default: json)
```
```bash
$ h3 directedEdgeToBoundary -c 115283473fffffff
POLYGON((-122.0377349643 37.4201286777, -122.0904289290 37.3375560844, -122.0377349643 37.4201286777))
[[37.4201286777, -122.0377349643], [37.3375560844, -122.0904289290]]
```
</TabItem>
Expand Down
58 changes: 17 additions & 41 deletions website/docs/api/hierarchy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ H3 4.1.0
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-r, --resolution <res> Required. Resolution, 0-14 inclusive, excluding 15 as it can never be a parent
-f, --format <FMT> 'json' for "CELL"\n, 'newline' for CELL\n (Default: json)
```

```bash
$ h3 cellToParent -c 85283473fffffff -r 4
8428347ffffffff
"8428347ffffffff"
```

</TabItem>
Expand Down Expand Up @@ -137,13 +138,14 @@ h3.cell_to_children(cell, child_res)

```sh
$ h3 cellToChildren --help
h3: Returns a JSON array of H3 indexes that are the children (or lower) of the provided cell
h3: Returns an array of H3 indexes that are the children (or lower) of the provided cell
H3 4.1.0

cellToChildren Returns a JSON array of H3 indexes that are the children (or lower) of the provided cell
cellToChildren Returns an array of H3 indexes that are the children (or lower) of the provided cell
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-r, --resolution <res> Required. Resolution, 1-15 inclusive, excluding 0 as it can never be a child
-f, --format <FMT> 'json' for ["CELL", ...], 'newline' for CELL\n... (Default: json)
```

```bash
Expand Down Expand Up @@ -290,11 +292,12 @@ H3 4.1.0
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-r, --resolution <res> Required. Resolution, 1-15 inclusive, excluding 0 as it can never be a child
-f, --format <FMT> 'json' for "CELL"\n, 'newline' for CELL\n (Default: json)
```

```bash
$ h3 cellToCenterChild -c 85283473fffffff -r 7
872834700ffffff
"872834700ffffff"
```

</TabItem>
Expand Down Expand Up @@ -440,11 +443,12 @@ H3 4.1.0
-c, --cell <index> Required. H3 Cell
-r, --resolution <res> Required. Resolution, 1-15 inclusive, excluding 0 as it can never be a child
-p, --position <pos> Required. The child position within the set of children of the parent cell
-f, --format <FMT> 'json' for "CELL"\n, 'newline' for CELL\n (Default: json)
```

```bash
$ h3 childPosToCell -p 42 -c 85283473fffffff -r 7
872834730ffffff
"872834730ffffff"
```

</TabItem>
Expand Down Expand Up @@ -508,30 +512,19 @@ h3.compact_cells(cells)

```sh
$ h3 compactCells --help
h3: Compacts the provided set of cells as best as possible. The set of input cells must all share the same resolution. The compacted cells will be printed one per line to stdout.
h3: Compacts the provided set of cells as best as possible. The set of input cells must all share the same resolution.
H3 4.1.0

compactCells Compacts the provided set of cells as best as possible. The set of input cells must all share the same resolution. The compacted cells will be printed one per line to stdout.
compactCells Compacts the provided set of cells as best as possible. The set of input cells must all share the same resolution.
-h, --help Show this help message.
-f, --file <FILENAME> The file to load the cells from. Use -- to read from stdin.
-i, --file <FILENAME> The file to load the cells from. Use -- to read from stdin.
-c, --cells <CELLS> The cells to compact. Up to 100 cells if provided as hexadecimals with zero padding.
-f, --format <FMT> 'json' for ["CELL", ...], 'newline' for CELL\n... (Default: json)
```
```bash
$ h3 compactCells -c 85283473fffffff,85283447fffffff,8528347bfffffff,85283463fffffff,85283477fffffff,8528340ffffffff,8528340bfffffff,85283457fffffff,85283443fffffff,8528344ffffffff,852836b7fffffff,8528346bfffffff,8528346ffffffff,85283467fffffff,8528342bfffffff,8528343bfffffff,85283407fffffff,85283403fffffff,8528341bfffffff
85283447fffffff
8528340ffffffff
8528340bfffffff
85283457fffffff
85283443fffffff
8528344ffffffff
852836b7fffffff
8528342bfffffff
8528343bfffffff
85283407fffffff
85283403fffffff
8528341bfffffff
8428347ffffffff
[ "85283447fffffff", "8528340ffffffff", "8528340bfffffff", "85283457fffffff", "85283443fffffff", "8528344ffffffff", "852836b7fffffff", "8528342bfffffff", "8528343bfffffff", "85283407fffffff", "85283403fffffff", "8528341bfffffff", "8428347ffffffff" ]
```
</TabItem>
Expand Down Expand Up @@ -601,32 +594,15 @@ H3 4.1.0
uncompactCells Unompacts the provided set of compacted cells.The uncompacted cells will be printed one per line to stdout.
-h, --help Show this help message.
-f, --file <FILENAME> The file to load the cells from. Use -- to read from stdin.
-i, --file <FILENAME> The file to load the cells from. Use -- to read from stdin.
-c, --cells <CELLS> The cells to uncompact. Up to 100 cells if provided as hexadecimals with zero padding.
-r, --resolution <res> Required. Resolution, 0-15 inclusive, that the compacted set should be uncompacted to. Must be greater than or equal to the highest resolution within the compacted set.
-f, --format <FMT> 'json' for ["CELL", ...], 'newline' for CELL\n... (Default: json)
```
```bash
$ h3 uncompactCells -r 5 -c 85283447fffffff,8528340ffffffff,8528340bfffffff,85283457fffffff,85283443fffffff,8528344ffffffff,852836b7fffffff,8528342bfffffff,8528343bfffffff,85283407fffffff,85283403fffffff,8528341bfffffff,8428347ffffffff
85283447fffffff
8528340ffffffff
8528340bfffffff
85283457fffffff
85283443fffffff
8528344ffffffff
852836b7fffffff
8528342bfffffff
8528343bfffffff
85283407fffffff
85283403fffffff
8528341bfffffff
85283463fffffff
85283467fffffff
8528346bfffffff
8528346ffffffff
85283473fffffff
85283477fffffff
8528347bfffffff
[ "85283447fffffff", "8528340ffffffff", "8528340bfffffff", "85283457fffffff", "85283443fffffff", "8528344ffffffff", "852836b7fffffff", "8528342bfffffff", "8528343bfffffff", "85283407fffffff", "85283403fffffff", "8528341bfffffff", "85283463fffffff", "85283467fffffff", "8528346bfffffff", "8528346ffffffff", "85283473fffffff", "85283477fffffff", "8528347bfffffff" ]
```
</TabItem>
Expand Down
19 changes: 11 additions & 8 deletions website/docs/api/indexing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ H3 4.1.0
latLngToCell Convert degrees latitude/longitude coordinate to an H3 cell
-h, --help Show this help message.
-r, --resolution <res> Required. Resolution, 0-15 inclusive.
--lat, --latitude <lat>Required. Latitude in degrees.
--lat, --latitude <lat> Required. Latitude in degrees.
--lng, --longitude <lng> Required. Longitude in degrees.
-f, --format <FMT> 'json' for "CELL"\n, 'newline' for CELL\n (Default: json)
```

```bash
$ h3 latLngToCell --lat 45 --lng 40 -r 2
822d57fffffffff
"822d57fffffffff"
```

</TabItem>
Expand Down Expand Up @@ -141,17 +142,18 @@ h3.cell_to_latlng(cell)

```sh
$ h3 cellToLatLng --help
h3: Convert an H3Cell to a WKT POINT coordinate
h3: Convert an H3Cell to a coordinate
H3 4.1.0

cellToLatLng Convert an H3Cell to a WKT POINT coordinate
cellToLatLng Convert an H3Cell to a coordinate
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-f, --format <FMT> 'json' for [lat, lng], 'wkt' for a WKT POINT, 'newline' for lat\nlng\n (Default: json)
```

```bash
$ h3 cellToLatLng -c 85283473fffffff
POINT(-121.9763759726 37.3457933754)
[37.3457933754, -121.9763759726]
```

</TabItem>
Expand Down Expand Up @@ -221,17 +223,18 @@ h3.cell_to_boundary(cell, geo_json=False)

```sh
$ h3 cellToBoundary --help
h3: Convert an H3 cell to a WKT POLYGON defining its boundary
h3: Convert an H3 cell to a polygon defining its boundary
H3 4.1.0

cellToBoundary Convert an H3 cell to a WKT POLYGON defining its boundary
cellToBoundary Convert an H3 cell to a polygon defining its boundary
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-f, --format <FMT> 'json' for [[lat, lng], ...], 'wkt' for a WKT POLYGON, 'newline' for lat\nlng\n... (Default: json)
```

```bash
$ h3 cellToBoundary -c 85283473fffffff
POLYGON((-121.9150803271 37.2713558667, -121.8622232890 37.3539264509, -121.9235499963 37.4283411861, -122.0377349643 37.4201286777, -122.0904289290 37.3375560844, -122.0291013092 37.2631979746, -121.9150803271 37.2713558667))
[[37.2713558667, -121.9150803271], [37.3539264509, -121.8622232890], [37.4283411861, -121.9235499963], [37.4201286777, -122.0377349643], [37.3375560844, -122.0904289290], [37.2631979746, -122.0291013092]]
```

</TabItem>
Expand Down
6 changes: 5 additions & 1 deletion website/docs/api/inspection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ H3 4.1.0
isValidCell Checks if the provided H3 index is actually valid
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-f, --format <FMT> 'json' for true or false, 'numeric' for 1 or 0 (Default: json)
```
```bash
Expand Down Expand Up @@ -377,6 +378,7 @@ H3 4.1.0
isResClassIII Checks if the provided H3 index has a Class III orientation
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-f, --format <FMT> 'json' for true or false, 'numeric' for 1 or 0 (Default: json)
```
```bash
Expand Down Expand Up @@ -448,6 +450,7 @@ H3 4.1.0
isPentagon Checks if the provided H3 index is a pentagon instead of a hexagon
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-f, --format <FMT> 'json' for true or false, 'numeric' for 1 or 0 (Default: json)
```
```bash
Expand Down Expand Up @@ -519,11 +522,12 @@ H3 4.1.0
getIcosahedronFaces Returns the icosahedron face numbers (0 - 19) that the H3 index intersects
-h, --help Show this help message.
-c, --cell <index> Required. H3 Cell
-f, --format <FMT> 'json' for [faceNum, ...], 'newline' for faceNum\n... (Default: json)
```
```bash
$ h3 getIcosahedronFaces -c 85283473fffffff
7
[7]
```
</TabItem>
</Tabs>
Expand Down
6 changes: 4 additions & 2 deletions website/docs/api/misc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -994,11 +994,12 @@ H3 4.1.0

getRes0Cells Returns all of the resolution 0 cells
-h, --help Show this help message.
-f, --format <FMT> 'json' for ["CELL", ...], 'newline' for CELL\n... (Default: json)
```

```bash
$ h3 getRes0Cells
["8001fffffffffff", "8003fffffffffff", "8005fffffffffff", "8007fffffffffff", "8009fffffffffff", "800bfffffffffff", "800dfffffffffff", "800ffffffffffff", "8011fffffffffff", "8013fffffffffff", "8015fffffffffff", "8017fffffffffff", "8019fffffffffff", "801bfffffffffff", "801dfffffffffff", "801ffffffffffff", "8021fffffffffff", "8023fffffffffff", "8025fffffffffff", "8027fffffffffff", "8029fffffffffff", "802bfffffffffff", "802dfffffffffff", "802ffffffffffff", "8031fffffffffff", "8033fffffffffff", "8035fffffffffff", "8037fffffffffff", "8039fffffffffff", "803bfffffffffff", "803dfffffffffff", "803ffffffffffff", "8041fffffffffff", "8043fffffffffff", "8045fffffffffff", "8047fffffffffff", "8049fffffffffff", "804bfffffffffff", "804dfffffffffff", "804ffffffffffff", "8051fffffffffff", "8053fffffffffff", "8055fffffffffff", "8057fffffffffff", "8059fffffffffff", "805bfffffffffff", "805dfffffffffff", "805ffffffffffff", "8061fffffffffff", "8063fffffffffff", "8065fffffffffff", "8067fffffffffff", "8069fffffffffff", "806bfffffffffff", "806dfffffffffff", "806ffffffffffff", "8071fffffffffff", "8073fffffffffff", "8075fffffffffff", "8077fffffffffff", "8079fffffffffff", "807bfffffffffff", "807dfffffffffff", "807ffffffffffff", "8081fffffffffff", "8083fffffffffff", "8085fffffffffff", "8087fffffffffff", "8089fffffffffff", "808bfffffffffff", "808dfffffffffff", "808ffffffffffff", "8091fffffffffff", "8093fffffffffff", "8095fffffffffff", "8097fffffffffff", "8099fffffffffff", "809bfffffffffff", "809dfffffffffff", "809ffffffffffff", "80a1fffffffffff", "80a3fffffffffff", "80a5fffffffffff", "80a7fffffffffff", "80a9fffffffffff", "80abfffffffffff", "80adfffffffffff", "80affffffffffff", "80b1fffffffffff", "80b3fffffffffff", "80b5fffffffffff", "80b7fffffffffff", "80b9fffffffffff", "80bbfffffffffff", "80bdfffffffffff", "80bffffffffffff", "80c1fffffffffff", "80c3fffffffffff", "80c5fffffffffff", "80c7fffffffffff", "80c9fffffffffff", "80cbfffffffffff", "80cdfffffffffff", "80cffffffffffff", "80d1fffffffffff", "80d3fffffffffff", "80d5fffffffffff", "80d7fffffffffff", "80d9fffffffffff", "80dbfffffffffff", "80ddfffffffffff", "80dffffffffffff", "80e1fffffffffff", "80e3fffffffffff", "80e5fffffffffff", "80e7fffffffffff", "80e9fffffffffff", "80ebfffffffffff", "80edfffffffffff", "80effffffffffff", "80f1fffffffffff", "80f3fffffffffff"]
[ "8001fffffffffff", "8003fffffffffff", "8005fffffffffff", "8007fffffffffff", "8009fffffffffff", "800bfffffffffff", "800dfffffffffff", "800ffffffffffff", "8011fffffffffff", "8013fffffffffff", "8015fffffffffff", "8017fffffffffff", "8019fffffffffff", "801bfffffffffff", "801dfffffffffff", "801ffffffffffff", "8021fffffffffff", "8023fffffffffff", "8025fffffffffff", "8027fffffffffff", "8029fffffffffff", "802bfffffffffff", "802dfffffffffff", "802ffffffffffff", "8031fffffffffff", "8033fffffffffff", "8035fffffffffff", "8037fffffffffff", "8039fffffffffff", "803bfffffffffff", "803dfffffffffff", "803ffffffffffff", "8041fffffffffff", "8043fffffffffff", "8045fffffffffff", "8047fffffffffff", "8049fffffffffff", "804bfffffffffff", "804dfffffffffff", "804ffffffffffff", "8051fffffffffff", "8053fffffffffff", "8055fffffffffff", "8057fffffffffff", "8059fffffffffff", "805bfffffffffff", "805dfffffffffff", "805ffffffffffff", "8061fffffffffff", "8063fffffffffff", "8065fffffffffff", "8067fffffffffff", "8069fffffffffff", "806bfffffffffff", "806dfffffffffff", "806ffffffffffff", "8071fffffffffff", "8073fffffffffff", "8075fffffffffff", "8077fffffffffff", "8079fffffffffff", "807bfffffffffff", "807dfffffffffff", "807ffffffffffff", "8081fffffffffff", "8083fffffffffff", "8085fffffffffff", "8087fffffffffff", "8089fffffffffff", "808bfffffffffff", "808dfffffffffff", "808ffffffffffff", "8091fffffffffff", "8093fffffffffff", "8095fffffffffff", "8097fffffffffff", "8099fffffffffff", "809bfffffffffff", "809dfffffffffff", "809ffffffffffff", "80a1fffffffffff", "80a3fffffffffff", "80a5fffffffffff", "80a7fffffffffff", "80a9fffffffffff", "80abfffffffffff", "80adfffffffffff", "80affffffffffff", "80b1fffffffffff", "80b3fffffffffff", "80b5fffffffffff", "80b7fffffffffff", "80b9fffffffffff", "80bbfffffffffff", "80bdfffffffffff", "80bffffffffffff", "80c1fffffffffff", "80c3fffffffffff", "80c5fffffffffff", "80c7fffffffffff", "80c9fffffffffff", "80cbfffffffffff", "80cdfffffffffff", "80cffffffffffff", "80d1fffffffffff", "80d3fffffffffff", "80d5fffffffffff", "80d7fffffffffff", "80d9fffffffffff", "80dbfffffffffff", "80ddfffffffffff", "80dffffffffffff", "80e1fffffffffff", "80e3fffffffffff", "80e5fffffffffff", "80e7fffffffffff", "80e9fffffffffff", "80ebfffffffffff", "80edfffffffffff", "80effffffffffff", "80f1fffffffffff", "80f3fffffffffff" ]
```
</TabItem>
</Tabs>
Expand Down Expand Up @@ -1127,11 +1128,12 @@ H3 4.1.0
getPentagons Returns all of the pentagons at the specified resolution
-r, --resolution <res> Required. Resolution, 0-15 inclusive.
-h, --help Show this help message.
-f, --format <FMT> 'json' for ["CELL", ...], 'newline' for CELL\n... (Default: json)
```

```bash
$ h3 getPentagons -r 5
["85080003fffffff", "851c0003fffffff", "85300003fffffff", "854c0003fffffff", "85620003fffffff", "85740003fffffff", "857e0003fffffff", "85900003fffffff", "85a60003fffffff", "85c20003fffffff", "85d60003fffffff", "85ea0003fffffff"]
[ "85080003fffffff", "851c0003fffffff", "85300003fffffff", "854c0003fffffff", "85620003fffffff", "85740003fffffff", "857e0003fffffff", "85900003fffffff", "85a60003fffffff", "85c20003fffffff", "85d60003fffffff", "85ea0003fffffff" ]
```

</TabItem>
Expand Down
16 changes: 6 additions & 10 deletions website/docs/api/regions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,15 @@ H3 4.1.0

polygonToCells Converts a polygon (array of lat, lng points, or array of arrays of lat, lng points) into a set of covering cells at the specified resolution
-h, --help Show this help message.
-f, --file <FILENAME> The file to load the polygon from. Use -- to read from stdin.
-p, --polygon <POLYGON>The polygon to convert. Up to 1500 characters.
-i, --file <FILENAME> The file to load the polygon from. Use -- to read from stdin.
-p, --polygon <POLYGON> The polygon to convert. Up to 1500 characters.
-r, --resolution <res> Required. Resolution, 0-15 inclusive, that the polygon should be converted to.
-f, --format <FMT> 'json' for ["CELL", ...], 'newline' for CELL\n... (Default: json)
```

```bash
$ h3 polygonToCells -r 7 -p "[[37.813318999983238, -122.4089866999972145], [37.7198061999978478, -122.3544736999993603], [37.8151571999998453, -122.4798767000009008]]"
87283082bffffff
872830870ffffff
872830820ffffff
87283082effffff
872830828ffffff
87283082affffff
872830876ffffff
[ "87283082bffffff", "872830870ffffff", "872830820ffffff", "87283082effffff", "872830828ffffff", "87283082affffff", "872830876ffffff" ]
```

</TabItem>
Expand Down Expand Up @@ -235,8 +230,9 @@ H3 4.1.0

cellsToMultiPolygon Returns a polygon (array of arrays of lat, lng points) for a set of cells
-h, --help Show this help message.
-f, --file <FILENAME> The file to load the cells from. Use -- to read from stdin.
-i, --file <FILENAME> The file to load the cells from. Use -- to read from stdin.
-c, --cells <CELLS> The cells to convert. Up to 100 cells if provided as hexadecimals with zero padding.
-f, --format <FMT> 'json' for [[[[lat, lng],...],...],...] 'wkt' for a WKT MULTIPOLYGON
```
```bash
Expand Down
Loading

0 comments on commit 3a51545

Please sign in to comment.