- update
morecantile
dependency tomorecantile>=5.0,<7.0
(author @AndrewAnnex, #298)
- add
py.typed
file (author @mentaljam, #297)
- no change since
5.3.4
- make sure there is no overviews when
overview_level=0
and using GDAL COG Driver (author @lagamura, #289) - add python 3.12 support
- remove Numpy requirement in
pyproject.toml
- do not set output size in the intermediate VRT
- add Alpha band for GCPS wrapped dataset
- fix issue when creating COG from file with internal GCPS
- add
decimation_base
option incogeo.cog_translate
(author @mccarthyryanc, #285)
-
remove
is_tiled
rasterio method and add better test for blockshapes for the validation script (author @sgillies, #278) -
Deprecate parameter web_optimized of
cogeo.cog_translate
Python function (author @alexismanin, #279)# 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 )
-
fix COG validation for SPARSE dataset (author @mpadillaruiz, #281)
-
remove default (128) for
--overview-blocksize
option in the CLI. Now defaults to GDAL behaviour. -
change how
blocksize
for overviews is defined when usingtms
orweb-optimized
options -
blocksize
is now defined from the tilematrixset'stileWidth
andtileHeight
when--blocksize
is not provided
- use morecantile
TileMatrixSet.cellSize
property instead of deprecated/privateTileMatrixSet._resolution
method
- add option to write progress to an external text buffer (author @SellersEvan, #273)
- update
morecantile
requirement to>=5.0,<6.0
(author @mentaljam, #267) - update
pydantic
requirement to~=2.0
(author @mentaljam, #267) - fix
pydantic
deprecation warnings (author @mentaljam, #267)- replace
BaseModel.json
withBaseModel.model_dump_json
- replace
BaseModel.dict
withBaseModel.model_dump
- replace
class Config
withmodel_config
class variables
- replace
- limit pydantic requirement to `~=1.0``
- update morecantile requirement to
>=4.0.0
- native support for all TileMatrixSet (with respect of the TMS spec 2.0)
- add
--tms
option to specify a path to a TileMatrixSet JSON file - switch resampling enums to python Literal
breaking change
-
Web optimization is now done in rio-cogeo instead of GDAL, when using
--web-optimized
and--use-cog-driver
options -
switch from using
TILING_SCHEME
namespaced tags to simpleTILING_SCHEME_
prefixed metadata# before with rasterio.open("cog_web.tif") as src: print(src.tags(ns="TILING_SCHEME")) >>> { "NAME": "WebMercatorQuad", "ZOOM_LEVEL": "18", } # now with rasterio.open("cog_web.tif") as src: print(src.tags()) >>> { "TILING_SCHEME_NAME": "WebMercatorQuad", "TILING_SCHEME_ZOOM_LEVEL": "18", }
- Flag GeoTIFFs with invalidated optimizations as invalid COGs (author @mplough-kobold, #260)
- Use Case-insensitive check for external overviews (author @mplough-kobold, #252)
- Use destination directory for the temporary file
- add python 3.11 support
Breaking Changes
- remove python 3.7 support
- require rasterio >= 1.3.3 (ref: #248)
- COG can be have blocksize (bigger than their
height
orwidth
) and be tiled even if they are smaller than 512x512
# before
rio cogeo create image_51x51.tif cog.tif
rio cogeo info cog.tif --json | jq '.IFD'
>>> [
{
"Level": 0,
"Width": 51,
"Height": 51,
"Blocksize": [
51,
51
],
"Decimation": 0
}
]
rio cogeo info cog.tif --json | jq '.Profile.Tiled'
>>> false
# now
rio cogeo create image_51x51.tif cog.tif
rio cogeo info cog.tif --json | jq '.IFD'
>>> [
{
"Level": 0,
"Width": 51,
"Height": 51,
"Blocksize": [
512,
512
],
"Decimation": 0
}
]
rio cogeo info cog.tif --json | jq '.Profile.Tiled'
>>> true
- avoid breaking change for
cog_info()
when previously passing*kwargs
tocog_validate
- add python 3.10 support
- allow forwarding namespaced metadata to output dataset
- set GDAL config for all
info
methods (previously GDAL's configs were only use in the COG validation step)
- allow non-GeoTIFF in
cog_validate
- allow
config
option inrio cogeo info
CLI
- Switch to
pyproject.toml
(#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
(#222) - add band metadata in
cog_info
output and updaterio_cogeo.models.Info
(#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 (#212)
- update
click
version requirement to>=7.0
to make sureclick.Choice
supports thecase_sensitive
option.
-
allow external configuration (GDAL Env) for
cog_validate
(#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 (#204)
- Add dictionary access to
Info
model (author @geospatial-jeff, #201) - remove unsupported resampling method for Warping in CLI options (author @drnextgis, #202)
- replace missing rio-tiler dependencies with a custom BBox type definition (#198)
- add pydantic models for
info
output (#191) - add
use_cog_driver
option to create COG using new GDAL COG Driver (#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 (#193) - add more info in rio cogeo info
Tags
(#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 (#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 (#193) -
cog_translate
will now materialize Nodata or Alpha band to an internal mask automatically for JPEG compresssed output (#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 (#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 (#178)
- drop support for Python 3.5 (#173)
- allow pathlib.PurePath object as input and output (#173)
- add top-level exports (#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 (#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.