Skip to content

Release

3.3.0 (2023-03-09)

3.2.5 (2022-12-16)

  • Do not parse TMS json files automatically but wait for the TMS to be used

3.2.4 (2022-12-14)

  • fix CanadianNAD83_LCC, WorldMercatorWGS84Quad and EuropeanETRS89_LAEAQuad TMS
  • add title option in morecantile custom CLI

3.2.3 (2022-12-13)

3.2.2 (2022-11-25)

  • add morecantile.defaults.TileMatrixSets in export

3.2.1 (2022-10-25)

  • add python 3.11 support

3.2.0 (2022-10-20)

  • add python 3.10 support
  • remove python 3.7 support
  • switch to pyproject.toml

3.1.2 (2022-03-21)

3.1.1 (2022-02-25)

3.1.0 (2022-02-18)

breaking changes

  • update WebMercatorQuad TMS to match mercantile and GDAL definition of the half-earth value

3.0.5 (2022-02-16)

3.0.4 (2022-02-16)

3.0.3 (2021-12-06)

3.0.2 (2021-11-12)

3.0.1 (2021-11-10)

3.0.0 (2021-09-23)

  • no change since 3.0.0a1

3.0.0a1 (2021-09-17)

3.0.0a0 (2021-09-09)

breaking changes

  • switch from rasterio to PyProj for CRS definition and projection transformation (developmentseed/morecantile!58)
  • remove python 3.6 supports (because of pyproj)

2.1.4 (2021-08-20)

  • add NZTM2000Quad tile matrix set from LINZ (author @blacha, developmentseed/morecantile!57)
  • add quadkey supports (@author adrian-knauer, developmentseed/morecantile!56)

    import morecantile
    
    tms = morecantile.tms.get("WebMercatorQuad")
    
    # Tile to Quadkey
    tms.quadkey(486, 332, 10)
    >>> "0313102310"
    
    # Quadkey to Tile
    tms.quadkey_to_tile("0313102310")
    >>> Tile(486, 332, 10)
    
  • update NZTM2000* CRS uri from https://www.opengis.net/def/crs/EPSG/0/2193 to urn:ogc:def:crs:EPSG:2193 (developmentseed/morecantile!61)

2.1.3 - Doesn't exists

2.1.2 (2021-05-18)

2.1.1 (2021-05-17)

  • remove mercantile dependency.
  • raise PointOutsideTMSBounds warning when user is doing operations outside TMS bounds.
  • fix wrong xy_bbox when tms.boundingBox use a specific CRS.

2.1.0 (2020-12-17)

  • add zoom_level_strategy option for TileMatrixSet.zoom_for_res to match GDAL 3.2. By default, it is set to auto, meaning that it will select the closest zoom level. User can set the strategy to lower or upper to select below or above zoom levels.
    import morecantile
    tms = morecantile.tms.get("WebMercatorQuad")
    
    # native resolution of zoom 7 is 1222.9924 m
    # native resolution of zoom 8 is 611.4962 m
    assert tms.zoom_for_res(612.0) == 8
    assert tms.zoom_for_res(612.0, zoom_level_strategy="lower") == 7
    assert tms.zoom_for_res(612.0, zoom_level_strategy="upper") == 8
    

2.0.1 (2020-11-05)

  • simplify morecantile.TileMatrixSet default representation
from morecantile import tms

tms.get("WorldCRS84Quad")
>>> <TileMatrixSet title='CRS84 for the World' identifier='WorldCRS84Quad'>

print(tms.get("WorldCRS84Quad").json())
>>> {
    'type': 'TileMatrixSetType',
    'title': 'CRS84 for the World',
    'abstract': None,
    'keywords': None,
    'identifier': 'WorldCRS84Quad',
    'supportedCRS': CRS.from_epsg(4326),
    'wellKnownScaleSet': AnyHttpUrl(...),
    'boundingBox': {
        'type': 'BoundingBoxType',
        'crs': CRS.from_epsg(4326),
        'lowerCorner': (-180.0, -90.0),
        'upperCorner': (180.0, 90.0)},
        'tileMatrix': [...]
    }

2.0.0 (2020-11-04)

  • switch from CoordBBox to rasterio.coords.BoundingBox (ref: developmentseed/morecantile#38).
  • update morecantile.commons Tile and Coords to match rasterio's BoundingBox.
  • rename morecantile.models.BoundingBox to morecantile.models.TMSBoundingBox to avoind name colision with rasterio's BoundingBox.
  • improve default TMS immutability by making morecantile.tms.register to return a new TileMatrixSets instance (ref: developmentseed/morecantile#37)
import morecantile import TileMatrixSet, tms
from rasterio.crs import CRS

crs = CRS.from_epsg(3031)
extent = [-948.75, -543592.47, 5817.41, -3333128.95]  # From https:///epsg.io/3031
custom_tms = TileMatrixSet.custom(extent, crs, identifier="MyCustomTmsEPSG3031")

print(len(tms.list()))
>>> 10

defaults = tms.register(custom_tms)
print(len(tms.list()))
>>> 10

print(len(defaults.list()))
>>> 11

1.3.1 (2020-10-07)

# Save custom TMS to a file
import morecantile
from rasterio.crs import CRS

crs = CRS.from_epsg(3031)
extent = [-948.75, -543592.47, 5817.41, -3333128.95]  # From https:///epsg.io/3031
tms = morecantile.TileMatrixSet.custom(extent, crs, identifier="MyCustomTmsEPSG3031")

with open("/tmp/mytms/MyCustomTmsEPSG3031.json", "w") as f:
    f.write(tms.json(exclude_none=True))
import os
os.environ["TILEMATRIXSET_DIRECTORY"] = "/tmp/mytms"

from morecantile import tms
assert "MyCustomTmsEPSG3031" in tms.list()

1.3.0.post1 (2020-09-30)

  • fix TileMatrixSet's model schema bug where pydantic wasn't able to translate Union[rasterio.crs.CRS, pydantic.AnyHttpUrl] to a valid schema (ref: developmentseed/morecantile#34)

1.3.0 (2020-09-30)

  • Allow Custom CRS for custom TMS definition (developmentseed/morecantile#23)
  • Extend TMS beyond TMS Document max zoom level (developmentseed/morecantile!28)
  • Require rasterio >= 1.1.7 (sept 2020) to support inverted lat/lon TMS (ref: developmentseed/morecantile#26)
  • Remove deprecated function
  • Add tms.xy_bbox and tms.bbox properties to return TileMatrixSet boundaries.
  • Add tms.intersect_tms to check if a bbox intersect with the TileMatrixSet boundaries.
  • Avoid out-range tiles (e.g. negative indexes)
  • Add tms.zoom_for_res function to get the TMS zoom level for a specific resolution (developmentseed/morecantile#31).

1.2.0 (2020-06-01)

  • add TileMatrixSet minzoom/maxzoom properties
  • fix TileMatrixSet.tile calculation
  • add TileMatrixSet.tiles function (replicat from mercantile)
  • add buffer and projected options to TileMatrixSet.feature method
  • removes mercantile as dependencies
  • add CLI
  • renamed morecantile.TileMatrixSet.point_towgs84 to morecantile.TileMatrixSet.lnglat (matches mercantile)
  • renamed morecantile.TileMatrixSet.point_fromwgs84 to morecantile.TileMatrixSet.xy (matches mercantile)
  • add truncate option in morecantile.TileMatrixSet.tile (matches mercantile)
  • re-order buffer and precision options in morecantile.TileMatrixSet.feature (matches mercantile)
  • uses mercantile's tests

1.1.1 (2020-05-15)

1.1.0 (2020-05-13)

  • better submodule definition
  • add morecantile.tms object to access and register defaults TileMatrixSet
  • Add depreciation warning for morecantile.TileMatrixSet.load method

1.0.0 (2020-05-11)

Major refactor of Morecantile, which is now based on OGC TileMatrixSet JSON documents.

0.1.0 (2020-02-03)

0.0.1 (2020-01-23)

  • Initial release