Skip to content

Commit

Permalink
Merge pull request #23 from PermafrostDiscoveryGateway/bug-14-PIL
Browse files Browse the repository at this point in the history
Bug-14-PIL
  • Loading branch information
julietcohen authored Feb 15, 2024
2 parents 78f1f11 + 8c6f171 commit 5c4850e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions pdgraster/WebImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

from . import Palette

import time
import uuid
import logging
from . import logging_config
import os
logger = logging_config.logger


class WebImage():
"""
Expand Down Expand Up @@ -96,6 +103,7 @@ def to_image(self, image_data):
rgba_list = self.rgba_list
height = self.height
width = self.width
image_data = image_data.astype(float)
no_data_mask = image_data == nodata_val

# set the nodata value to np.nan
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ coloraide = ">= 0.10, < 1"
colormaps = "== 0.4.0"
Pillow = ">= 9, < 10"
rasterio = ">= 1.2, < 2"
pdgstaging = ">= 0.9.1"
pydantic = "1.10.9"

[tool.poetry.group.dev.dependencies]
pytest = ">=7"
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
author='Robyn Thiessen-Bock, Juliet Cohen',
author_email='[email protected], [email protected]',
name='pdgraster',
version='0.9.0',
version='0.9.1',
description='Rasterization to GeoTiff and web-based tiles for the PDG '
'Visualization pipeline',
long_description=long_description,
Expand All @@ -23,6 +23,7 @@
'morecantile >= 3.1, < 4',
'Rtree >= 0.9, < 1',
'rasterio >= 1.2, < 2',
'pydantic == 1.10.9',
'pdgstaging @ git+https://github.com/PermafrostDiscoveryGateway/viz-staging.git#egg=pdgstaging',
'colormaps == 0.4.0'
],
Expand Down

0 comments on commit 5c4850e

Please sign in to comment.