diff --git a/CHANGES.md b/CHANGES.md index 641222f..16d48a1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,31 @@ * remove `is_tiled` rasterio method and add better test for blockshapes for the validation script (author @sgillies, https://github.com/cogeotiff/rio-cogeo/pull/278) +* Deprecate parameter **web_optimized** of `cogeo.cog_translate` Python function (author @alexismanin, https://github.com/cogeotiff/rio-cogeo/pull/279) + + ```python + # before + output_profile = cog_profiles.get(profile) + + tms = morecantile.tms.get("WGS1984Quad") + cog_translate( + "in.tif", + "out.tif", + output_profile, + web_optimzed=True, + tms=tms + ) + + # now + tms = morecantile.tms.get("WGS1984Quad") + cog_translate( + "in.tif", + "out.tif", + output_profile, + tms=tms + ) + ``` + ## 5.1.1 (2024-01-08) * use morecantile `TileMatrixSet.cellSize` property instead of deprecated/private `TileMatrixSet._resolution` method diff --git a/rio_cogeo/cogeo.py b/rio_cogeo/cogeo.py index fe4d9ad..4a7cd8f 100644 --- a/rio_cogeo/cogeo.py +++ b/rio_cogeo/cogeo.py @@ -177,7 +177,8 @@ def cog_translate( # noqa: C901 Previously, `tms` usage was conditioned by `web_optimized` state. The behaviour has changed to allow setting a tile matrix set without the need of `web_optimized` flag. `web_optimized` now only serve to activate a default `WebMercatorQuad` tile matrix set. - It might be removed in future versions. + Set to be removed 6.0. + """ if web_optimized: warnings.warn( diff --git a/rio_cogeo/scripts/cli.py b/rio_cogeo/scripts/cli.py index 4ecd5d5..df38454 100644 --- a/rio_cogeo/scripts/cli.py +++ b/rio_cogeo/scripts/cli.py @@ -275,6 +275,7 @@ def create( if tms: with open(tms, "r") as f: tilematrixset = TileMatrixSet(**json.load(f)) + elif web_optimized: tilematrixset = morecantile.tms.get("WebMercatorQuad")