Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rio-tiler 2.0 #154

Merged
merged 29 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
92b7083
v2 sketch
vincentsarago Mar 10, 2020
e740795
update from #142
vincentsarago Mar 10, 2020
8b425f6
Update CHANGES.txt
vincentsarago Mar 10, 2020
7763ef2
add unscale option to apply internal scale/offset (#157)
vincentsarago Mar 13, 2020
d6a2e3a
Terracotta default transform (#155)
vincentsarago Mar 13, 2020
acce94d
s/breacking/Breaking/g [skip-ci]
vincentsarago Mar 13, 2020
f3f5843
add more metadata info (#159)
vincentsarago Mar 13, 2020
10bf6b2
update docs [skip-ci]
vincentsarago Mar 17, 2020
f55134b
Colormaps v2 (#160)
vincentsarago Mar 19, 2020
5d7f682
add migration docs
vincentsarago Mar 19, 2020
c38db3d
add mypy to pre-commit and add missing types
vincentsarago Mar 19, 2020
28c766e
remove alpha band from output data array (#162)
vincentsarago Mar 19, 2020
428b862
Merge branch 'master' into v2
vincentsarago Mar 19, 2020
06504ec
typo
vincentsarago Mar 19, 2020
bf35b48
Gdal fall back (#165)
vincentsarago Mar 20, 2020
d92b7ae
re-order part function to remove useless transform_bounds (#166)
vincentsarago Mar 24, 2020
f846056
switch back to gdal calculate default transform and adapt VRT resolut…
vincentsarago Mar 25, 2020
e289bb8
update docs
vincentsarago Mar 25, 2020
5026517
Smol documentation fixes (#170)
jqtrde Mar 27, 2020
a051b30
add simple COG info method (#171)
vincentsarago Apr 8, 2020
eacf16a
add io.stack submodule (#172)
vincentsarago Apr 8, 2020
a3fa241
Landsat as uint16 (#174)
vincentsarago Apr 21, 2020
3f5d94a
make image_profile return a copy of a dict (#178)
vincentsarago May 6, 2020
fb7da01
Colormap docs (#179)
vincentsarago May 6, 2020
08e352a
doc update
vincentsarago May 6, 2020
1d3f1bc
fix unwanted breacking change with `img_profiles.get` not allowing de…
vincentsarago May 7, 2020
178b271
allow reading part of data at hight resolution and add area/point fun…
vincentsarago May 18, 2020
aa07d97
release
vincentsarago May 18, 2020
e841c01
add --pre option for pypi install [skip ci]
vincentsarago May 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ common: &common
- run:
name: run pre-commit
command: |
if [[ "$CIRCLE_JOB" == "python-3.6" ]]; then
if [[ "$CIRCLE_JOB" == "python-3.7" ]]; then
~/.local/bin/pre-commit run --all-files
fi
- run:
Expand All @@ -25,13 +25,6 @@ common: &common
when: always

jobs:
"python-2.7":
<<: *common
docker:
- image: circleci/python:2.7
environment:
- TOXENV=py27

"python-3.6":
<<: *common
docker:
Expand Down Expand Up @@ -94,7 +87,6 @@ workflows:
build_and_deploy:
jobs:
- benchmark
- "python-2.7"
- "python-3.6"
- "python-3.7":
filters: # required since `deploy` has tag filters AND requires `build`
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,5 @@ ENV/
.pytest_cache

.benchmarks/
tests/benchmarks/data/*
tests/benchmarks/data/*
tests/fixtures/mask*
22 changes: 13 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@

repos:
-
repo: 'https://github.com/ambv/black'
# 18.6b1
rev: ed50737290662f6ef4016a7ea44da78ee1eff1e2
repo: 'https://github.com/psf/black'
rev: stable
hooks:
- id: black
args: ['--safe']
language_version: python3.6
language_version: python3.7
-
repo: 'https://github.com/pre-commit/pre-commit-hooks'
# v1.3.0
rev: a6209d8d4f97a09b61855ea3f1fb250f55147b8b
rev: v2.4.0
hooks:
- id: flake8
language_version: python3.6
language_version: python3.7
args: [
# E501 let black handle all line length decisions
# W503 black conflicts with "line break before operator" rule
Expand All @@ -26,9 +23,16 @@ repos:
rev: 22d3ccf6cf91ffce3b16caa946c155778f0cb20f
hooks:
- id: pydocstyle
language_version: python3.6
language_version: python3.7
args: [
# Check for docstring presence only
'--select=D1',
# Don't require docstrings for tests
'--match=(?!test).*\.py']

-
repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.770'
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
83 changes: 53 additions & 30 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
2.0a3 (2020-03-25)
------------------
- only use `transform_bounds` when needed in rio_tiler.reader.part

Breaking Changes:
- switch back to gdal/rasterio calculate_default_transform (#164). Thanks to Terracotta core developper @dionhaefner.
- refactor `rio_tiler.utils.get_vrt_transform` to get width and height input.

2.0a2 (2020-03-20)
------------------
- Fall back to gdal/rasterio calculate_default_transform for dateline separation crossing dataset (ref #164)

2.0a1 (2020-03-19)
------------------
- added `reader.preview`, `reader.point` methods
- added multi_* functions to rio_tiler.reader to support multiple assets addresses
- added `rio_tiler.utils.has_mask_band` function
- added `rio_tiler.utils.get_overview_level` to calculate the overview level needed for partial reading.
- added type hints
- added scale, offsets, colormap, datatype and colorinterp in reader.metadata output (#158)
- new `rio_tiler.colormap` submodule
- added `unscale` options to rio_tiler.reader._read function apply internal scale/offset (#157)

Breaking Changes:
- removed python 2 support
- new package architecture (.io submodule)
- introduced new rio_tiler.reader functions (part, preview, metadata...)
- renamed rio_tiler.main to rio_tiler.io.cogeo
- bucket and prefixes are defined in rio_tiler.io.dataset.`{dataset}_parse` function from
AWS supported Public Dataset
- renamed `minimum_tile_cover` to `minimum_overlap`
- renamed `tile_edge_padding` to `padding`
- padding is set to 0 by default.
- use terracotta calculate_default_transform (see https://github.com/cogeotiff/rio-tiler/issues/56#issuecomment-442484999)
- colormaps are now have an alpha value
- `rio_tiler.utils.get_colormap` replaced by `rio_tiler.colormap.get_colormap`
- new `rio_tiler.colormap.get_colormap` supports only GDAL like colormap
- replaced `rio_tiler.utils.array_to_image` by `rio_tiler.utils.render`
- replaced `rio_tiler.utils.apply_cmap` by `rio_tiler.colormap.apply_cmap`
- replaced `rio_tiler.utils._apply_discrete_colormap` by `rio_tiler.colormap.apply_discrete_cmap`
- removed `histogram_bins` and `histogram_range` in options in metadata reader.
Should now be passed in `hist_options` (e.g: hist_options={bins=10, range=(0, 10)})
- remove alpha band value from output data array in tile/preview/metadata #127

1.4.0 (2020-02-19)
------------------
- Add Sentinel2-L2A support (#137)
Expand All @@ -15,7 +59,7 @@ allow more custom VRT Warping. (ref: https://github.com/OSGeo/gdal/issues/1989#i
- add `minimum_tile_cover` option to filter dataset not covering a certain amount of the tile.
- add Sentinel-1 submodule

Breacking Changes:
Breaking Changes:
- need rasterio>=1.1

1.2.11 (2019-09-18)
Expand All @@ -35,62 +79,50 @@ in `rio_tiler.utils.get_vrt_transform`

1.2.8 (2019-07-08)
------------------

- Add kwargs options in landsat8.tile, sentinel2.tile and cbers.tile functions to
allow `resampling_method` and `tile_edge_padding` options forwarding to utils._tile_read.
- Add Input (bounds_crs) and Output (dst_crs) option to `utils._tile_read` function (#108)

1.2.7 (2019-05-14)
------------------

- Revert changes introduced in #106 (see #105)
- Refactor tests

1.2.6 (2019-05-10) - DELETED
------------------

- Use same resampling method for mask and for data (#105)


1.2.5 (2019-05-08)
------------------

- add tile_edge_padding option to be passed to rio_tiler.utils._tile_read to reduce sharp edges that occur due to resampling (#104)

1.2.4 (2019-04-16)
------------------

- add histogram_range options to be passed to rio_tiler.{module}.metadata function (#102)

1.2.3 (2019-04-04)
------------------

- add histogram_bins options to be passed to rio_tiler.{module}.metadata function (#98)

Bug fixes:

- return index number with band descriptions (#99)

1.2.2 (2019-04-03)
------------------

- add mercator min/max zoom info in metadata output from rio_tiler.utils.raster_get_stats (#96)
- add band description (band name) in metadata output from rio_tiler.utils.raster_get_stats (#96)

1.2.1 (2019-03-26)
------------------

- Replace rio-pansharpen dependency with a fork of the brovey function directly
into `rio_tiler.utils` (rio-pansharpen is unmaintened and not compatible with
rasterio>=1) (#94).

1.2.0 (2019-03-26)
------------------

- `rio_tiler.utils.array_to_image`'s color_map arg can be a dictionary of discrete values (#91)

Breacking Changes:

Breaking Changes:
- `expr` argument is now a required option in `rio_tiler.utils.expression`. (#88)

1.1.4 (2019-03-11)
Expand All @@ -99,36 +131,29 @@ Breacking Changes:

1.1.3 (2019-03-06)
------------------

Bug fixes:

- Fix casting to integer for MAX_THREADS environment variable.

1.1.1 (2019-02-21)
------------------
- Minor typo correction and harmonization of the use of src/src_dst/src_path in `rio_tiler.utils`

Bug fixes:

- Fix nodata handling in `utils.raster_get_stats`

1.1.0 (2019-02-15)
------------------

- Allow options forwarding to `tile_read` from `main.tile` function (#86)
- Add `resampling_method` options in `rio_tiler.utils.tile_read` to allow user set
resampling. Default is now bilinear (#85)

Bug fixes:

- Fix nodata option forwarding to tile_read when source is a path (#83)

Refactoring:

- Refactor `rio_tiler.utils.tile_read` to reduce code complexity (#84)

Breacking Changes:

Breaking Changes:
- `indexes` options is now set to **None** in `rio_tiler.utils.tile_read`.
Default will now be the dataset indexes.

Expand All @@ -151,7 +176,7 @@ and to return more statistics (#66)
- add GDAL compatible Image creation profile (#29)
- add max threads number settings via "MAX_THREADS" environment variable (#71)

**Breacking Changes**
Breaking Changes:
- update `metadata` structure returned by `landsat8.metadata`, `sentinel2.metadata`, `cbers.metadata`
- force sentinel, landsat and cbers band names to be string and add validation (#65)
- moved landsat utility functions from `rio_tiler.utils` to `rio_tiler.landsat8`
Expand Down Expand Up @@ -192,7 +217,7 @@ and to return more statistics (#66)
- fix custom nodata handling
- fix performances issue

:Breacking Changes:
Breaking Changes:
- removed alpha band options to select a custom alpha band number

1.0a8 (2018-06-20)
Expand All @@ -211,7 +236,7 @@ and to return more statistics (#66)
------------------
- adds DatasetReader input option for utils.tile_read (do not close the dataset on each read)

:Breacking Changes:
Breaking Changes:
- `utils.tile_band_worker` renamed to `utils.tile_read`
- `main.tile` **rgb** option renamed **indexes**
- `sentinel2.tile`, `landsat8.tile`, `cbers.tile` **rgb** option renamed **bands**
Expand All @@ -222,7 +247,7 @@ and to return more statistics (#66)
- adds utils.b64_encode_img function to encode an image object into a base64 string
- add tiles profiles (jpeg, png, webp) based on https://github.com/mapnik/mapnik/wiki/Image-IO#default-output-details

:Breacking Changes:
Breaking Changes:
- Refactor `rio_tiler.utils.array_to_img` to return PIL image object

1.0a3 (2018-02-05)
Expand All @@ -234,19 +259,17 @@ and to return more statistics (#66)
- add "expression" utility function
- better nodata/mask/alpha band definition and support

:Breacking Changes:
Breaking Changes:
- tile functions now return an associated mask (Landsat, Sentinel, CBERS, main)
- remove nodata support in utils.image_to_array function
- add mask support in utils.image_to_array function
- utils.tile_band_worker will always return a (Band, Width, Height) array (e.g 1x256x256 or 3x256x256)


1.0a1 (2018-01-04)
------------------
- remove aws.py sub-module (replaced by main.py)
- no default bands value for main.py tiles.


1.0a.0 (2018-01-03)
------------------
- add colormap option in `utils.array_to_img`
Expand All @@ -257,7 +280,7 @@ and to return more statistics (#66)
- removing internal caching
- update to rasterio 1.0a12

:Breacking Changes:
Breaking Changes:
- remove data value rescaling in `landsat8.tile` and `sentinel2.tile`
- fix wrong lat/grid_square value in `utils.sentinel_parse_scene_id`
- rename `utils.sentinel_min_max_worker` to `utils.band_min_max_worker`
Expand Down
Loading