Skip to content

Commit

Permalink
add more colormaps (#641)
Browse files Browse the repository at this point in the history
* add more colormaps

* update tests
  • Loading branch information
vincentsarago authored Sep 27, 2023
1 parent 7bed9de commit 1fe63d3
Show file tree
Hide file tree
Showing 80 changed files with 3,531 additions and 1,895 deletions.
16 changes: 16 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@

* add `rio_tiler.utils.get_coverage_array` method to create a `coverage %` array

* add `cmocean` colormaps

<img src="https://raw.githubusercontent.com/cogeotiff/rio-tiler/main/docs/src/img/colormaps_for_oceanography.png" style="max-width: 500px;"></a>

* allow uppercase in `cmap.get` method

```python
from rio_tiler.colormap import cmap

# Before
cm = cmap.get("greys")

# Now
cm = cmap.get("Greys")
```

# 6.1.0 (2023-09-15)

* add `width`, `height` and `count` properties in `MosaicMethodBase`
Expand Down
28 changes: 27 additions & 1 deletion docs/scripts/colormap_thumb.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
(
"Sequential",
[
"Greys",
"Purples",
"Blues",
"Greens",
Expand Down Expand Up @@ -118,6 +117,32 @@
"gist_ncar",
],
),
(
"Colormaps for oceanography",
[
"thermal",
"haline",
"solar",
"ice",
"oxy",
"deep",
"dense",
"algae",
"matter",
"turbid",
"speed",
"amp",
"tempo",
"rain",
"phase",
"topo",
"balance",
"delta",
"curl",
"diff",
"tarn",
],
),
]


Expand Down Expand Up @@ -170,6 +195,7 @@ def main():
out_path = (
Path(__file__).parents[0]
/ ".."
/ "src"
/ "img"
/ (cmap_category.replace(" ", "_").lower() + ".png")
)
Expand Down
131 changes: 124 additions & 7 deletions docs/src/api/rio_tiler/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,44 @@ def with_traceback(
```


Exception.with_traceback(tb) --

set self.__traceback__ to tb and return self.

### AssetAsBandError

```python3
class AssetAsBandError(
/,
*args,
**kwargs
)
```

#### Ancestors (in MRO)

* rio_tiler.errors.RioTilerError
* builtins.Exception
* builtins.BaseException

#### Class variables

```python3
args
```

#### Methods


#### with_traceback

```python3
def with_traceback(
...
)
```


Exception.with_traceback(tb) --

set self.__traceback__ to tb and return self.
Expand Down Expand Up @@ -160,10 +198,10 @@ Exception.with_traceback(tb) --

set self.__traceback__ to tb and return self.

### IncorrectTileBuffer
### InvalidAssetName

```python3
class IncorrectTileBuffer(
class InvalidAssetName(
/,
*args,
**kwargs
Expand Down Expand Up @@ -198,10 +236,10 @@ Exception.with_traceback(tb) --

set self.__traceback__ to tb and return self.

### InvalidAssetName
### InvalidBandName

```python3
class InvalidAssetName(
class InvalidBandName(
/,
*args,
**kwargs
Expand Down Expand Up @@ -236,10 +274,10 @@ Exception.with_traceback(tb) --

set self.__traceback__ to tb and return self.

### InvalidBandName
### InvalidBufferSize

```python3
class InvalidBandName(
class InvalidBufferSize(
/,
*args,
**kwargs
Expand Down Expand Up @@ -385,6 +423,44 @@ def with_traceback(
```


Exception.with_traceback(tb) --

set self.__traceback__ to tb and return self.

### InvalidExpression

```python3
class InvalidExpression(
/,
*args,
**kwargs
)
```

#### Ancestors (in MRO)

* rio_tiler.errors.RioTilerError
* builtins.Exception
* builtins.BaseException

#### Class variables

```python3
args
```

#### Methods


#### with_traceback

```python3
def with_traceback(
...
)
```


Exception.with_traceback(tb) --

set self.__traceback__ to tb and return self.
Expand Down Expand Up @@ -461,6 +537,44 @@ def with_traceback(
```


Exception.with_traceback(tb) --

set self.__traceback__ to tb and return self.

### InvalidPointDataError

```python3
class InvalidPointDataError(
/,
*args,
**kwargs
)
```

#### Ancestors (in MRO)

* rio_tiler.errors.RioTilerError
* builtins.Exception
* builtins.BaseException

#### Class variables

```python3
args
```

#### Methods


#### with_traceback

```python3
def with_traceback(
...
)
```


Exception.with_traceback(tb) --

set self.__traceback__ to tb and return self.
Expand Down Expand Up @@ -637,17 +751,20 @@ class RioTilerError(

* rio_tiler.errors.InvalidFormat
* rio_tiler.errors.TileOutsideBounds
* rio_tiler.errors.IncorrectTileBuffer
* rio_tiler.errors.InvalidBufferSize
* rio_tiler.errors.PointOutsideBounds
* rio_tiler.errors.InvalidBandName
* rio_tiler.errors.InvalidColorMapName
* rio_tiler.errors.InvalidAssetName
* rio_tiler.errors.InvalidExpression
* rio_tiler.errors.MissingAssets
* rio_tiler.errors.MissingBands
* rio_tiler.errors.InvalidMosaicMethod
* rio_tiler.errors.ColorMapAlreadyRegistered
* rio_tiler.errors.EmptyMosaicError
* rio_tiler.errors.InvalidColorFormat
* rio_tiler.errors.AssetAsBandError
* rio_tiler.errors.InvalidPointDataError

#### Class variables

Expand Down
4 changes: 2 additions & 2 deletions docs/src/api/rio_tiler/expression.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ None
```python3
def apply_expression(
blocks: Sequence[str],
bands: Sequence[Union[str, int]],
bands: Sequence[str],
data: numpy.ndarray
) -> numpy.ndarray
) -> numpy.ma.core.MaskedArray
```


Expand Down
Loading

0 comments on commit 1fe63d3

Please sign in to comment.