Skip to main content

cogeo-mosaic

rio-tiler

Create mosaics of Cloud Optimized GeoTIFF based on the mosaicJSON specification.

Test Coverage Package version Downloads Downloads


Documentation: https://developmentseed.org/cogeo-mosaic/

Source Code: https://github.com/developmentseed/cogeo-mosaic


Read the official announcement https://medium.com/devseed/cog-talk-part-2-mosaics-bbbf474e66df

Install

python -m pip install pip -U
python -m pip install cogeo-mosaic --pre

# Or from source

python -m pip install git+http://github.com/developmentseed/cogeo-mosaic

Notes:

  • Starting with version 5.0, pygeos has been replaced by shapely and thus makes libgeos a requirement. Shapely wheels should be available for most environment, if not, you'll need to have libgeos installed.

See it in action

  • TiTiler: A lightweight Cloud Optimized GeoTIFF dynamic tile server (COG, STAC and MosaicJSON).

Contribution & Development

See CONTRIBUTING.md

License

See LICENSE

Authors

Created by Development Seed

See contributors for a listing of individual contributors.

Changelog

Unreleased

9.2.0 (2026-06-18)

  • feat: switch to httpx2

9.1.0 (2026-02-02)

  • update: rio-tiler requirements
  • update: type hints

9.0.2 (2025-12-15)

  • add support for python 3.14

9.0.1 (2025-11-25)

  • update morecantile requirements to >=7.0

9.0.0 (2025-11-21)

  • update rio-tiler requirement to >=8.0,<9.0

  • rename cogeo_mosaic.backends.base.BaseBackend to cogeo_mosaic.backends.base.MosaicJSONBackend breaking change

  • cogeo_mosaic.backends.base.MosaicJSONBackend subclass rio_tiler.mosaic.backend.BaseBackend

  • remove .center property from MosaicJSONBackend breaking change

  • reverse option should be passed via search_options breaking change

    # before
    with MemoryBackend(mosaic_def=...) as mosaic:
        ptsR = mosaic.point(-73, 45, reverse=True)
    
    # now
    with MemoryBackend(mosaic_def=...) as mosaic:
        ptsR = mosaic.point(-73, 45, search_options={"reverse": True})
    

8.2.0 (2025-05-06)

  • allow kwargs to be forwarded to backend's get_assets method from assets_for_tile, assets_for_point and assets_for_bbox methods

8.1.0 (2025-02-13)

  • add lock=Lock() to cachetools cached instance to avoid thread corruption
  • remove python 3.8 support
  • add python 3.13 support

8.0.0 (2024-10-21)

  • remove deprecated methods

  • update morecantile requirement to >=5.0,<7.0

  • update rio-tiler requirement to >=7.0,<8.0

  • update Info model

    # before
    class Info(BaseModel):
        bounds: BBox = Field(default=(-180, -90, 180, 90))
        center: Optional[Tuple[float, float, int]] = None
        minzoom: int = Field(0, ge=0, le=30)
        maxzoom: int = Field(30, ge=0, le=30)
        name: Optional[str] = None
        quadkeys: List[str] = []
        tilematrixset: Optional[str] = None
    
    # now
    class Info(BaseModel):
        bounds: BBox = Field(default=(-180, -90, 180, 90))
        crs: str
        center: Optional[Tuple[float, float, int]] = None
        name: Optional[str] = None
        quadkeys: List[str] = []
        mosaic_tilematrixset: Optional[str] = None
        mosaic_minzoom: int = Field(0, ge=0, le=30)
        mosaic_maxzoom: int = Field(30, ge=0, le=30)
    

7.2.0 (2024-10-04)

7.1.0 (2023-12-06)

  • Automatically remove/add asset_prefix in Mosaic Backends

7.0.1 (2023-10-17)

7.0.0 (2023-07-26)

  • update morecantile requirement to >=5.0,<6.0
  • update rio-tiler requirement to >=6.0,<7.0
  • update pydantic requirement to ~=2.0

6.2.0 (2023-07-11)

  • add coord_crs to MosaicBackend.point() method

6.1.0 (2023-07-11)

  • add tilematrixset in MosaicBackend.info() response

6.0.1 (2023-07-11)

  • fix HttpBackend post_init method

6.0.0 (2023-07-10)

  • update morecantile>=4.1,<5.0 and rio-tiler>=5.0,<6.0 requirements

  • replace supermercado with supermorecado to burn geometries as tiles for different TMS

  • update MosaicJSON models to 0.0.3 specification (adds tilematrixset, asset_type, asset_prefix, data_type, colormap and layers attributes)

  • allow Mosaic creation using other TileMatrixSet (default is still WebMercatorQuad)

  • add tms support to MosaicBackend to read tile in other TMS than the mosaic TileMatrixSet

    # Before
    # Mosaic and output Tile in WebMercatorQuad
    with MosaicBackend("mosaic.json") as mosaic:
        img, _ = mosaic.tile(0, 0, 0)
    
    # Now
    # Mosaic in WebMercatorQuad (default), output tile in WGS84
    WGS1984Quad = morecantile.tms.get("WGS1984Quad")
    with MosaicBackend("mosaic.json", tms=WGS1984Quad) as mosaic:
        img, _ = mosaic.tile(0, 0, 0)
    

5.1.1 (2023-02-06)

5.1.0 (2023-01-20)

  • use az:// prefix for private Azure Blob Storage Backend.

5.0.0 (2022-11-21)

  • switch from pygeos to shapely>=2.0

4.2.2 (2022-11-19)

  • remove useless file in package

4.2.1 (2022-11-15)

  • add python 3.11 support

4.2.0 (2022-10-24)

  • remove python 3.7 support
  • add python 3.10 support
  • switch to hatch build-system
  • update rio-tiler dependency to >=4.0.0a0

4.1.1 (2022-10-21)

4.1.0 (2022-02-22)

  • remove mercantile and switch to morecantile>=3.1

4.0.0 (2021-11-30)

  • no change since 4.0.0a2

4.0.0a2 (2021-11-22)

  • update rio-tiler requirement (>=3.0.0a6) and update backend reader type information

4.0.0a1 (2021-11-18)

  • update rio-tiler requirement (>=3.0.0a5)
  • fix MosaicBackend to match Backend input names.

4.0.0a0 (2021-10-20)

breaking changes

  • remove BaseBackend.metadata() method (can be replaced by BaseBackend.mosaic_def.dict(exclude={"tiles"}))
  • remove cogeo_mosaic.models.Metadata model
  • remove python 3.6 support
  • BaseBackend.path -> BaseBackend.input attribute (input was added in rio-tiler BaseReader)

3.0.2 (2021-07-08)

3.0.1 (2021-06-22)

3.0.0 (2021-05-19)

3.0.0rc2 (2021-02-25)

breaking

  • gzip is now only applied if the path endswith .gz
  • remove backend_options attribute in base backends. This attribute was used to pass optional gzip option and/or STAC related options
  • STAC backends has additional attributes (stac_api_options and mosaic_options)

3.0.0rc1 (2021-02-11)

breaking

3.0.0b1 (2020-12-18)

3.0.0a19 (2020-12-14)

  • Update to remove all calls to rio_tiler.mercator functions.

3.0.0a18 (2020-11-24)

  • update Backend base class for rio-tiler 2.0.0rc3 (add .feature() method)

3.0.0a17 (2020-11-09)

  • update for rio-tiler 2.0rc and add backend output models

3.0.0a16 (2020-10-26)

  • raise MosaicNotFoundError when mosaic doesn't exists in the DynamoDB table.

3.0.0a15 (2020-10-22)

3.0.0a14 (2020-10-22)

with MosaicBackend(
    f"stac+{stac_endpoint}",
    query.copy(),
    11,
    14,
    backend_options={
        "accessor": lambda feature: feature["id"],
        "stac_next_link_key": "next",
    }
) as mosaic:

Breaking changes

3.0.0a13 (2020-10-13)

  • add TMS in BaseBackend to align with rio-tiler BaseBackend.

3.0.0a12 (2020-10-07)

Note: We changed the versioning scheme to {major}.{minor}.{path}{pre}{prenum}

3.0a11 (2020-09-21)

  • Raise Exception when trying to overwrite a mosaic (#112)
  • Add reverse option in .tile and .point to get values from assets in reversed order.

3.0a10 (2020-08-24)

  • Allow PointOutsideBounds exception for point method (#108)

3.0a9 (2020-08-24)

  • BaseBackend.center returns value from the mosaic definition (#105)

3.0a8 (2020-08-21)

  • BaseBackend is now a subclass of rio-tiler.io.base.BaseReader (add minzoom, maxzoom, bounds properties and info method)
  • use attr to define backend classes

Breaking changes

  • backend_options is now used to pass options (*kwargs) to the _read method

3.0a7 (2020-07-31)

  • update to rio-tiler 2.0b5

Breaking changes

  • 'value' -> 'values' in MosaicBackend.point output (#98)

3.0a6 (2020-07-31)

  • Use environement variable to set/disable cache (#93, autho @geospatial-jeff)
  • Allow Threads configuration for overview command (author @kylebarron)
  • add --in-memory/--no-in-memory to control temporary files creation for overview function.
  • allow pixel_selection method options for overview function.
  • update to rio-tiler 2.0b4
  • use new COGReader and STACReader to add .tile and .point methods directly in the backends

Breaking changes

  • backend.tile -> backend.assets_for_tile
  • backend.point -> backend.assets_for_point

3.0a5 (2020-06-29)

3.0a4 (2020-06-25)

  • add STACBackend (#82)
  • fix backends caching and switch to TTL cache (#83)

3.0a3 (2020-05-01)

  • add Upload CLI (#74, author @kylebarron)
  • fix boto3 dynamodb exception (#75)

3.0a2 (2020-05-01)

  • Better mosaicJSON model testing and default center from bounds (#73, author @geospatial-jeff)

3.0a1 (2020-05-01)

This is a major version, meaning a lot of refactoring was done and may lead to breaking changes.

  • add quadkey_zoom option in CLI (#41, author @kylebarron)
  • use R-tree from pygeos for testing intersections (#43, author @kylebarron)

Breaking changes

2.0.1 (2020-01-28)

  • Bug fix, use pygeos from pypi instead of git repo

2.0.0 (2020-01-28) - Major refactor

  • remove stack related code (lambda handler, serverless)
  • switch to pygeos (#24)
  • bug fixes
  • add last pixel_method

1.0.0 (2019-12-13)

  • add tif output
  • fix overview creation
  • add other Web templates

0.3.0 (2019-11-07)

  • use aws lambda layer
  • add update_mosaic utility function
  • add /tiles/point endpoint to get points values from a mosaic
  • add logs for mosaic creation
  • add custom pixel methods
  • add custom color maps

Breaking changes

  • rename /mosaic/info/<mosaicid> to /mosaic/<mosaicid>/info

0.2.0 (2019-09-30)

  • update for lambda-proxy~=5.0 (#15)
  • add minimum_tile_cover option for mosaic creation (#16)
  • add tile_cover_sort option (#16)
  • add verbosity for cli

0.1.0 (2019-09-05)

  • add /create.html endpoint (#14)
  • update to remotepixel/amazonlinux docker image

Release files for cogeo-mosaic 9.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cogeo-mosaic 9.2.0
File Size Uploaded
cogeo_mosaic-9.2.0.tar.gz 28.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cogeo-mosaic 9.2.0
File Interpreter ABI Platform
cogeo_mosaic-9.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 67.9 kB

Release files / cogeo_mosaic-9.2.0.tar.gz

Download URL cogeo_mosaic-9.2.0.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8694c3104063662d1ae79fca139eed38d591417af318b9dd89855419e76e2440
BLAKE2b-256 checksum
How to use checksums
daa587c3354b4072a9f403ff6dc325aa595acfee9d289e5ee7bd28a90ab8c691
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.

Transparency log

Release files / cogeo_mosaic-9.2.0-py3-none-any.whl

Download URL cogeo_mosaic-9.2.0-py3-none-any.whl
Size 39.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b53e28f9fcc52ee804be5a400f5a68dfd82c82f710d9d55a48a9053b33ea51b
BLAKE2b-256 checksum
How to use checksums
07a122a770179653f84558b16929c9722a58e81d444d81969e1429fb73c52667
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

9.2.0 This release

2 release files

9.1.0

2 release files

9.0.2

2 release files

9.0.1

2 release files

9.0.0

2 release files

8.2.0

2 release files

8.1.0

2 release files

8.0.0

2 release files

7.2.0

2 release files

7.1.0

2 release files

7.0.1

2 release files

7.0.0

2 release files

6.2.0

2 release files

6.1.0

2 release files

6.0.1

2 release files

6.0.0

2 release files

5.1.1

2 release files

5.1.0

2 release files

5.0.0

2 release files

4.2.2

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.1

1 release file

4.1.0

1 release file

4.0.0

1 release file

3.0.2

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.0.1

1 release file

2.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page