- Switch to
pyproject.toml
(cogeotiff#232) - add
--zoom-level
option to define dataset coarsest zoom level, when creatingweb optimized
COG.
- Fix equivalence for rio-cogeo and GDAL definition of
aligned_levels
Breaking Changes:
- update morecantile requirement to
>=3.1,<4.0
. WebOptimized COGs will is now aligned with GDAL and Mercantile TMS definition.
- use
rasterio.vrt.WarpedVRT
inutils.get_web_optimized_params
to better handle dataset with GEOS projection (crossing dateline).
- remove usage of (soon to be deprecated)
rasterio.path
(cogeotiff#222) - add band metadata in
cog_info
output and updaterio_cogeo.models.Info
(cogeotiff#223)
- update
test
anddev
dependencies torio-tiler>=3.0.0a0
- no changes since 3.0.0a0
- update to
morecantile>=3.0
- raise warning when using incompatible options for GDAL COG driver (cogeotiff#212)
- update
click
version requirement to>=7.0
to make sureclick.Choice
supports thecase_sensitive
option.
-
allow external configuration (GDAL Env) for
cog_validate
(cogeotiff#206)from rio_cogeo import cog_validate assert cog_validate("cog.tif", congig={"GDAL_DISABLE_READDIR_ON_OPEN": "EMPTY_DIR"})[0]
In previous version we were forcing
GDAL_DISABLE_READDIR_ON_OPEN=FALSE
incog_validate
function to check for external overviews.Starting with version 2.3, it's up to the user to set the wanted GDAL configuration (e.g
EMPTY_DIR
: no external file check,FALSE
: check for external files)
- use opened file for click progressbar (cogeotiff#204)
- Add dictionary access to
Info
model (author @geospatial-jeff, cogeotiff#201) - remove unsupported resampling method for Warping in CLI options (author @drnextgis, cogeotiff#202)
- replace missing rio-tiler dependencies with a custom BBox type definition (cogeotiff#198)
- add pydantic models for
info
output (cogeotiff#191) - add
use_cog_driver
option to create COG using new GDAL COG Driver (cogeotiff#194)
Breaking Changes:
rio_cogeo.cogeo.cog_info
now returns a pydantic model
from rio_cogeo.cogeo import cog_info
# before
info = cog_info("my.tif")
assert isinstance(info, dict)
assert info["GEO"]["CRS"]
# now
assert isinstance(info, rio_cogeo.models.Info)
assert info.GEO.CRS
- add
TILING SCHEME
in dataset namespaced metadata when creating WebOptimized COG (cogeotiff#193) - add more info in rio cogeo info
Tags
(cogeotiff#193)
# before
$ rio cogeo create in.tif out.tif -w
$ rio cogeo info out.tif | jq .Tags
>>> {
"AREA_OR_POINT": "Area",
"OVR_RESAMPLING_ALG": "NEAREST"
}
# now
$ rio cogeo create in.tif out.tif -w
$ rio cogeo info out.tif | jq .Tags
>> {
"Image Metadata": {
"AREA_OR_POINT": "Area",
"DataType": "Generic",
"OVR_RESAMPLING_ALG": "NEAREST"
},
"Image Structure": {
"COMPRESSION": "DEFLATE",
"INTERLEAVE": "BAND",
"LAYOUT": "COG"
},
"Tiling Scheme": {
"NAME": "WEBMERCATORQUAD",
"ZOOM_LEVEL": "17"
}
}
-
update
Web-Optimized
configuration to match GDAL COG Driver (cogeotiff#193)By default only the
raw
data will be aligned to the grid. To align overviews, thealigned_levels
option can be used (wasn't really working in previous version). -
rio_cogeo.utils.get_web_optimized_params
has been refactored (cogeotiff#193) -
cog_translate
will now materialize Nodata or Alpha band to an internal mask automatically for JPEG compresssed output (cogeotiff#196)
# before
cog_translate(raster_path_rgba, "cogeo.tif", jpeg_profile)
with rasterio.open("cogeo.tif") as src:
assert src.count == 4
assert src.compression.value == "JPEG"
assert has_alpha_band(src)
assert not has_mask_band(src)
# now
cog_translate(raster_path_rgba, "cogeo.tif", jpeg_profile)
with rasterio.open("cogeo.tif") as src:
assert src.count == 3
assert src.compression.value == "JPEG"
assert has_mask_band(src)
- fix issue in validation when BLOCK_OFFSET_0 is None (cogeotiff#182)
- add colormap options in
cog_translate
to allow a user to set or update a colormap
cmap = {0: (0, 0, 0, 0), 1: (1, 2, 3, 255)}
cog_translate("boring.tif", "cogeo.tif", deflate_profile, colormap=cmap)
with rasterio.open("cogeo.tif") as cog:
print(cog.colormap(1)[1])
>>> (1, 2, 3, 255)
- add additional_cog_metadata options in
cog_translate
to allow the user to add more dataset metadatas
cog_translate("boring.tif", "cogeo.tif", deflate_profile, additional_cog_metadata={"comments": "I made this tiff with rio-cogeo"})
with rasterio.open("cogeo.tif") as cog:
print(cog.tags()["comment"])
>>> "I made this tiff with rio-cogeo"
- remove useless path translation to pathlib and avoid side effect when using a URL (cogeotiff#178)
- drop support for Python 3.5 (cogeotiff#173)
- allow pathlib.PurePath object as input and output (cogeotiff#173)
- add top-level exports (cogeotiff#169)
# before
from rio_cogeo.cogeo import cog_translate, cog_validate, cog_info
from rio_cogeo.profiles import cog_profiles
# now
from rio_cogeo import cog_translate, cog_validate, cog_info, cog_profiles
- switch to
morecantile
and update the web-optimized creation method to better match GDAL 3.2. - add
zoom_level_strategy
options to match GDAL 3.2 COG driver. - add
aligned_levels
(cli and api) to select the level of overview to align with the TMS grid.
Breaking Changes:
- removed
--latitude-adjustment/--global-maxzoom
option in the CLI - removed
latitude_adjustment
option inrio_cogeo.cogeo.cog_translate
- updated overview blocksize to match the blocksize of the high resolution data (instead of default to 128)
- for web-optimized COG, the highest overview level will be aligned with the TMS grid.
- remove
pkg_resources
(pypa/setuptools#510)
There have been no changes since 2.0a9
- Update max IFD offset to 300 bytes (cogeotiff#158)
- Make sure Alpha band isn't considered as an internal mask by
utils.has_mask_band
(#156)
- Fix wrong min-zoom calculation in
rio_cogeo.cogeo.cog_info
- remove duplicate
count
information in rio_cogeo.cogeo.cog_info output (#150) - allow COG with IFD offset up to 200 bytes to accomodate with GDAL 3.1 changes (#151)
- fix zoom level calculation in
rio_cogeo.cogeo.cog_info
- fix bug in cogeo.info when CRS in not set.
- add minzoom/maxzoom in cogeo.info output.
Breaking Changes:
- rio_cogeo.utils.get_max_zoom renamed rio_cogeo.utils.get_zooms and now return min/max zoom.
- move most of the cogeo info code in rio_cogeo.cogeo.cog_info api
- add cog_validation info in cogeo info result
- cog_validate returns a tuple (is_valid, errors, warnings) (#142, co-author with @geospatial-jeff)
- add scale, offset, image tags and band color interpretation in cog_info (#145, #146 and #147)
- Force output width and height (#140)
- add
info
CLI (#134) - use
Deflate
as default temporary compression (#137)
- add
--config
CLI option to pass additional GDAL Configuration options (#135)
- Dropping python 2 (#128)
- use new mercantile xy_bounds for better web-optimized file (#126)
- Allow temporary file on disk when using MemoryFile output
- add
--blocksize
option in CLI (#131) - depreciate
rio_cogeo.utils.get_maximum_overview_level
and use rasterio.rio.overview.get_maximum_overview_level (#132)
- Transfer colormap (#121)
- Transfer scale and offset values to output COG (#118)
- Transfer color interpretation value to output COG (#113) * Thanks @pierotofy
- Cast
dataset_mask
returned by rasterio to uint8 to overcome a bug in rasterio 1.1.2 (#115)
- add
strict
option to cog_validate to treat warnings as error (#109) * Thanks @pierotofy - add documentation examples using MemoryFiles (#108 #107)
- Switch to
PHOTOMETRIC=MINISBLACK
when PHOTOMETRIC is set to YCBCR for 1 band dataset (#41)
- add
-forward-band-tags
options (#115)
- add
--allow-intermediate-compression
option to reduce the memory/disk footprint (#103)
- Fix support for optimizing open datasets, memfiles, and VRTs (#100 from j08lue)
- Add lzma/lerc/lerc_deflate/lerc_zstd profiles (#97)
- Add warnings and notes for
non-standard
compression (#97) - fix THREADS definition for GDAL config
- Fix incorrect context behavior closing input Dataset (#94)
- add safeguard to keep datatype from input to output files (#85)
CLI Changes:
- add
-t, --dtype
datatype option.
API Changes:
- add datatype option
- update for rasterio>=1.0.28
- allow rasterio.io.DatasetReader input (#89)
Note: This release was deleted in PyPi.
- check internal blocksize and adapt if raster is too small (#80)
- add
--web-optimized
option to create a web optimized COG (#10) - add
--latitude-adjustment/--global-maxzoom
option to adjust MAX_ZOOM for global datasets - Web-optimized tests needs python3.6 (cogdumper)
- add
--resampling
option to select the resampling algorithm when using--web-optimized
- add
--in-memory/--no-in-memory
options to use temporyNamedd file instead of in-memory temp file.
Breaking Changes:
- remove deprecated YCBCR profile
- 512x512 dataset without internal tiling are valid
Breaking Changes:
- Switch from JPEG to DEFLATE as default profile in CLI (#66)
Breaking Changes:
- refactor utils.get_maximum_overview_level to get rasterio dataset as input and reduce the number of dataset opennings (#61)
- add more logging and
--quiet
option (#46) - add
--overview-blocksize
to set overview's internal tile size (#60)
Bug fixes:
- copy tags and description from input to output (#19)
- copy input mask band to output mask
Breaking Changes:
- rio cogeo now has subcommands: 'create' and 'validate' (#6).
- internal mask creation is now optional (--add-mask).
- internal nodata or alpha channel can be forwarded to the output dataset.
- removed default overview blocksize to be equal to the raw data blocksize (#60)
- allow non integer nodata value (#51)
- fix GDAL blocksize options casting for overview calculation (#50)
- Renamed "ycbcr" profile's name to "jpeg" to reflect the compression name. "ycbcr" profile will raise a "DeprecationWarning" (#44)
- "webp" profile has been added to COG profiles. Exploitation of this new compression mode will require GDAL 2.4 (#27)
- Rio-cogeo can calculate the overview level based on the internal tile size and the dataset width/height (#37)
- write tags in output file (#31)
- add bilinear, cubic spline, lanczos resampling modes for overviews
- add resampling option for overviews (#28)
- Remove unnecessary compression for in-memory step (reduce runtime and memory usage) (#25)
- rasterio 1.0
- remove default bidx in cli (#17)
- Add ZSTD compressed COG profile (#14)
- Fix warnings for useless boundless=True option (#13)
- add BIGTIFF=IF_SAFER to COG profile (if BIGTIFF not set otherwise in the env)
Breaking Changes:
- replace "BAND" by "PIXEL" interleave in PACKBITS profile (#16)
- Initial release. Requires Rasterio >= 1.0b1.