{"id":23440,"library":"cogeo-mosaic","title":"cogeo-mosaic","description":"A Python library for creating and managing Cloud Optimized GeoTIFF (COG) mosaics using MosaicJSON format. Version 9.1.0 requires Python >=3.11 and supports rio-tiler 7+. Active development with frequent releases.","status":"active","version":"9.1.0","language":"python","source_language":"en","source_url":"https://github.com/developmentseed/cogeo-mosaic","tags":["raster","cog","mosaic","geotiff","spatial"],"install":[{"cmd":"pip install cogeo-mosaic","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for mosaic backends and image retrieval","package":"rio-tiler","optional":false},{"reason":"Required for COG support","package":"rasterio","optional":false},{"reason":"Optional for S3 backend","package":"aiobotocore","optional":true},{"reason":"Optional for AWS integrations","package":"boto3","optional":true}],"imports":[{"note":"","wrong":"","symbol":"MosaicJSON","correct":"from cogeo_mosaic.mosaic import MosaicJSON"},{"note":"","wrong":"","symbol":"MosaicBackend","correct":"from cogeo_mosaic.backends import MosaicBackend"},{"note":"","wrong":"","symbol":"STACBackend","correct":"from cogeo_mosaic.backends.stac import STACBackend"}],"quickstart":{"code":"from cogeo_mosaic.mosaic import MosaicJSON\nfrom cogeo_mosaic.backends import MosaicBackend\n\n# Create a simple mosaic from a list of COG URLs\ncogs = [\n    \"https://example.com/cog1.tif\",\n    \"https://example.com/cog2.tif\",\n]\nmosaic = MosaicJSON.from_urls(cogs)\n\n# Save to local file\nwith MosaicBackend(\"mosaic.json\", mosaic_def=mosaic) as backend:\n    backend.write()\n\n# Open existing mosaic\nwith MosaicBackend(\"mosaic.json\") as backend:\n    tile = backend.tile(0, 0, 0)\n    print(tile.shape)","lang":"python","description":"Create and query a Cloud Optimized GeoTIFF mosaic using MosaicJSON."},"warnings":[{"fix":"Replace `from cogeo_mosaic.backends.base import BaseMosaic` with `from rio_tiler.mosaic.backend import BaseBackend`.","message":"Version 9.0.0 switched to rio-tiler 7.x and changed backend base class from `BaseMosaic` to `rio_tiler.mosaic.backend.BaseBackend`. Custom backends must update imports.","severity":"breaking","affected_versions":">=9.0.0"},{"fix":"Upgrade Python to >=3.8 and rio-tiler to >=7.0.","message":"Version 8.0.0 dropped support for Python <3.8 and rio-tiler <7.0.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN (if needed) environment variables.","message":"When using S3 backends, credentials must be configured via environment variables or boto3 session. The library does not auto-configure from ~/.aws/config.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `from rio_tiler.mosaic.backend import BaseBackend` instead.","message":"`from cogeo_mosaic.backends.base import BaseMosaic` is deprecated in 9.0.0 and removed in later versions.","severity":"deprecated","affected_versions":">=9.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install cogeo-mosaic` in the correct Python environment.","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'cogeo_mosaic'"},{"fix":"Use `from cogeo_mosaic.mosaic import MosaicJSON`.","cause":"Incorrect import path; MosaicJSON is in cogeo_mosaic.mosaic.","error":"AttributeError: module 'cogeo_mosaic' has no attribute 'MosaicJSON'"},{"fix":"Provide valid tile indices (x, y, z) and optionally set `assets` parameter.","cause":"Using tile() without specifying assets or expression, or tile index out of bounds.","error":"TypeError: Cannot read properties of undefined (reading 'shape') / rio_tiler.errors.InvalidBandNames"},{"fix":"Use `MosaicJSON.from_urls()` or `MosaicJSON.from_features()` to create a MosaicJSON object first.","cause":"Passing a dictionary or invalid JSON to MosaicBackend constructor.","error":"cogeo_mosaic.errors.InvalidMosaicError: 'mosaic' must be a valid MosaicJSON"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}