Skip to content

Commit

Permalink
DOCS: Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
davemlz committed Jan 26, 2024
1 parent 97e2ef4 commit 1d4388b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,41 @@ da = cubo.create(
)
```

### Using different units for `edge_size`

By default, the units of `edge_size` are pixels. But you can modify this using the `units` argument:

```python
da = cubo.create(
lat=4.31,
lon=-76.2,
collection="sentinel-2-l2a",
bands=["B02","B03","B04"],
start_date="2021-06-01",
end_date="2021-06-10",
edge_size=1500,
units="m",
resolution=10,
)
```

> [!TIP]
> You can use "px" (pixels), "m" (meters), or any unit available in [`scipy.constants`](https://docs.scipy.org/doc/scipy/reference/constants.html#units).
```python
da = cubo.create(
lat=4.31,
lon=-76.2,
collection="sentinel-2-l2a",
bands=["B02","B03","B04"],
start_date="2021-06-01",
end_date="2021-06-10",
edge_size=1.5,
units="kilo",
resolution=10,
)
```

### Using another endpoint

By default, `cubo` uses Planetary Computer. But you can use another STAC provider endpoint if you want:
Expand Down
36 changes: 36 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,42 @@ Main function: `create()`
resolution=10,
)
Using different units for `edge_size`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default, the units of `edge_size` are pixels. But you can modify this using the `units` argument:

.. code-block:: python
da = cubo.create(
lat=4.31,
lon=-76.2,
collection="sentinel-2-l2a",
bands=["B02","B03","B04"],
start_date="2021-06-01",
end_date="2021-06-10",
edge_size=1500,
units="m",
resolution=10,
)
You can use "px" (pixels), "m" (meters), or any unit available in
`scipy.constants <https://docs.scipy.org/doc/scipy/reference/constants.html#units>`_.

.. code-block:: python
da = cubo.create(
lat=4.31,
lon=-76.2,
collection="sentinel-2-l2a",
bands=["B02","B03","B04"],
start_date="2021-06-01",
end_date="2021-06-10",
edge_size=1.5,
units="kilo",
resolution=10,
)
Using another endpoint
~~~~~~~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 1d4388b

Please sign in to comment.