morecantile


Namemorecantile JSON
Version 5.3.0 PyPI version JSON
download
home_pageNone
SummaryConstruct and use map tile grids (a.k.a TileMatrixSet / TMS).
upload_time2024-02-09 13:48:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords gis tms tilematrixset map tile
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Morecantile

<p align="center">
  <img height="500" src="https://github.com/developmentseed/morecantile/assets/10407788/a1523c6d-e255-4dc6-a201-20029715858a"/>
  <p align="center">Construct and use map tile grids (a.k.a TileMatrixSet / TMS).</p>

</p>
<p align="center">
  <a href="https://github.com/developmentseed/morecantile/actions?query=workflow%3ACI" target="_blank">
      <img src="https://github.com/developmentseed/morecantile/workflows/CI/badge.svg" alt="Test">
  </a>
  <a href="https://codecov.io/gh/developmentseed/morecantile" target="_blank">
      <img src="https://codecov.io/gh/developmentseed/morecantile/branch/main/graph/badge.svg" alt="Coverage">
  </a>
  <a href="https://pypi.org/project/morecantile" target="_blank">
      <img src="https://img.shields.io/pypi/v/morecantile?color=%2334D058&label=pypi%20package" alt="Package version">
  </a>
  <a href="https://pypistats.org/packages/morecantile" target="_blank">
      <img src="https://img.shields.io/pypi/dm/morecantile.svg" alt="Downloads">
  </a>
  <a href="https://github.com/developmentseed/morecantile/blob/main/LICENSE" target="_blank">
      <img src="https://img.shields.io/github/license/developmentseed/morecantile.svg" alt="License">
  </a>
</p>

---

**Documentation**: <a href="https://developmentseed.org/morecantile/" target="_blank">https://developmentseed.org/morecantile/</a>

**Source Code**: <a href="https://github.com/developmentseed/morecantile" target="_blank">https://github.com/developmentseed/morecantile</a>

---

Morecantile is like [mercantile](https://github.com/mapbox/mercantile) (the best tool to work with Web Mercator tile indexes), but with support for other TileMatrixSet grids.

**Morecantile** follows the **OGC Two Dimensional Tile Matrix Set** specification **2.0** found in [https://docs.ogc.org/is/17-083r4/17-083r4.html](https://docs.ogc.org/is/17-083r4/17-083r4.html)

| Morecantile Version | OGC Specification Version | Link
| ------------------- | ------------------------- |---------
| >=4.0               | 2.0                       | https://docs.ogc.org/is/17-083r4/17-083r4.html
| =<3.0               | 1.0                       | http://docs.opengeospatial.org/is/17-083r2/17-083r2.html


## Install

```bash
$ python -m pip install -U pip
$ python -m pip install morecantile

# Or install from source:
$ python -m pip install -U pip
$ python -m pip install git+https://github.com/developmentseed/morecantile.git
```

## Usage

```python
import morecantile

tms = morecantile.tms.get("WebMercatorQuad")

# Get TMS bounding box
print(tms.xy_bbox)
>>> BoundingBox(
    left=-20037508.342789244,
    bottom=-20037508.34278919,
    right=20037508.34278919,
    top=20037508.342789244,
)

# Get the bounds for tile Z=4, X=10, Y=10 in the TMS's CRS (e.g epsg:3857)
print(tms.xy_bounds(morecantile.Tile(10, 10, 4)))
>>> BoundingBox(
    left=5009377.085697308,
    bottom=-7514065.628545959,
    right=7514065.628545959,
    top=-5009377.085697308,
)

# Get the bounds for tile Z=4, X=10, Y=10 in Geographic CRS (e.g epsg:4326)
print(tms.bounds(morecantile.Tile(10, 10, 4)))
>>> BoundingBox(
    left=44.999999999999964,
    bottom=-55.776573018667634,
    right=67.4999999999999,
    top=-40.97989806962009,
)
```

More info can be found at https://developmentseed.org/morecantile/usage/

### Defaults Grids

`morecantile` provides a set of default TileMatrixSets:

- **CDB1GlobalGrid** \*: CDB 1 Global Grid - EPGS:4326 (WGS84)
- **CanadianNAD83_LCC**: Lambert conformal conic NAD83 for Canada - EPSG:3978
- **EuropeanETRS89_LAEAQuad**: ETRS89-extended / LAEA Europe - EPGS:3035
- **GNOSISGlobalGrid** \*: GNOSIS Global Grid - EPGS:4326 (WGS84)
- **LINZAntarticaMapTilegrid**: LINZ Antarctic Map Tile Grid (Ross Sea Region) - EPSG:5482
- **NZTM2000Quad**: LINZ NZTM2000 Map Tile Grid - EPSG:2193
- **UPSAntarcticWGS84Quad**: Universal Polar Stereographic WGS 84 Quad for Antarctic - EPSG:5042
- **UPSArcticWGS84Quad**: Universal Polar Stereographic WGS 84 Quad for Arctic - EPSG:5041
- **UTM31WGS84Quad**: Example of UTM grid - EPSG:32631
- **WebMercatorQuad**: Spherical Mercator - EPGS:3857 (default grid for Web Mercator based maps)
- **WGS1984Quad**: EPSG:4326 for the World - EPGS:4326 (WGS84)
- **WorldCRS84Quad**: CRS84 for the World
- **WorldMercatorWGS84Quad**: Elliptical Mercator projection - EPGS:3395

\* TileMatrixSets with variable Matrix Width (see https://docs.ogc.org/is/17-083r4/17-083r4.html#toc15)

ref: https://schemas.opengis.net/tms/2.0/json/examples/tilematrixset/

## Implementations

- [rio-tiler](https://github.com/cogeotiff/rio-tiler): Create tile from raster using Morecantile TMS.
- [titiler](https://github.com/developmentseed/titiler): A modern dynamic tile server built on top of FastAPI and Rasterio/GDAL.
- [tipg](https://github.com/developmentseed/tipg): OGC Features and Tiles API.
- [planetcantile](https://github.com/AndrewAnnex/planetcantile): Tile matrix sets for other planets.
- [supermorecado](https://github.com/developmentseed/supermorecado): Extend the functionality of morecantile with additional commands.


## Changes

See [CHANGES.md](https://github.com/developmentseed/morecantile/blob/main/CHANGES.md).

## Contribution & Development

See [CONTRIBUTING.md](https://github.com/developmentseed/morecantile/blob/main/CONTRIBUTING.md)

## License

See [LICENSE](https://github.com/developmentseed/morecantile/blob/main/LICENSE)

## Authors

Created by [Development Seed](<http://developmentseed.org>)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "morecantile",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "GIS,TMS,TileMatrixSet,Map Tile",
    "author": null,
    "author_email": "Vincent Sarago <vincent@developmentseed.com>",
    "download_url": "https://files.pythonhosted.org/packages/a8/91/35ea01100231c4b99b86300fd044ecdb48cd50bfe1ee6f80ed4d6d0291de/morecantile-5.3.0.tar.gz",
    "platform": null,
    "description": "# Morecantile\n\n<p align=\"center\">\n  <img height=\"500\" src=\"https://github.com/developmentseed/morecantile/assets/10407788/a1523c6d-e255-4dc6-a201-20029715858a\"/>\n  <p align=\"center\">Construct and use map tile grids (a.k.a TileMatrixSet / TMS).</p>\n\n</p>\n<p align=\"center\">\n  <a href=\"https://github.com/developmentseed/morecantile/actions?query=workflow%3ACI\" target=\"_blank\">\n      <img src=\"https://github.com/developmentseed/morecantile/workflows/CI/badge.svg\" alt=\"Test\">\n  </a>\n  <a href=\"https://codecov.io/gh/developmentseed/morecantile\" target=\"_blank\">\n      <img src=\"https://codecov.io/gh/developmentseed/morecantile/branch/main/graph/badge.svg\" alt=\"Coverage\">\n  </a>\n  <a href=\"https://pypi.org/project/morecantile\" target=\"_blank\">\n      <img src=\"https://img.shields.io/pypi/v/morecantile?color=%2334D058&label=pypi%20package\" alt=\"Package version\">\n  </a>\n  <a href=\"https://pypistats.org/packages/morecantile\" target=\"_blank\">\n      <img src=\"https://img.shields.io/pypi/dm/morecantile.svg\" alt=\"Downloads\">\n  </a>\n  <a href=\"https://github.com/developmentseed/morecantile/blob/main/LICENSE\" target=\"_blank\">\n      <img src=\"https://img.shields.io/github/license/developmentseed/morecantile.svg\" alt=\"License\">\n  </a>\n</p>\n\n---\n\n**Documentation**: <a href=\"https://developmentseed.org/morecantile/\" target=\"_blank\">https://developmentseed.org/morecantile/</a>\n\n**Source Code**: <a href=\"https://github.com/developmentseed/morecantile\" target=\"_blank\">https://github.com/developmentseed/morecantile</a>\n\n---\n\nMorecantile is like [mercantile](https://github.com/mapbox/mercantile) (the best tool to work with Web Mercator tile indexes), but with support for other TileMatrixSet grids.\n\n**Morecantile** follows the **OGC Two Dimensional Tile Matrix Set** specification **2.0** found in [https://docs.ogc.org/is/17-083r4/17-083r4.html](https://docs.ogc.org/is/17-083r4/17-083r4.html)\n\n| Morecantile Version | OGC Specification Version | Link\n| ------------------- | ------------------------- |---------\n| >=4.0               | 2.0                       | https://docs.ogc.org/is/17-083r4/17-083r4.html\n| =<3.0               | 1.0                       | http://docs.opengeospatial.org/is/17-083r2/17-083r2.html\n\n\n## Install\n\n```bash\n$ python -m pip install -U pip\n$ python -m pip install morecantile\n\n# Or install from source:\n$ python -m pip install -U pip\n$ python -m pip install git+https://github.com/developmentseed/morecantile.git\n```\n\n## Usage\n\n```python\nimport morecantile\n\ntms = morecantile.tms.get(\"WebMercatorQuad\")\n\n# Get TMS bounding box\nprint(tms.xy_bbox)\n>>> BoundingBox(\n    left=-20037508.342789244,\n    bottom=-20037508.34278919,\n    right=20037508.34278919,\n    top=20037508.342789244,\n)\n\n# Get the bounds for tile Z=4, X=10, Y=10 in the TMS's CRS (e.g epsg:3857)\nprint(tms.xy_bounds(morecantile.Tile(10, 10, 4)))\n>>> BoundingBox(\n    left=5009377.085697308,\n    bottom=-7514065.628545959,\n    right=7514065.628545959,\n    top=-5009377.085697308,\n)\n\n# Get the bounds for tile Z=4, X=10, Y=10 in Geographic CRS (e.g epsg:4326)\nprint(tms.bounds(morecantile.Tile(10, 10, 4)))\n>>> BoundingBox(\n    left=44.999999999999964,\n    bottom=-55.776573018667634,\n    right=67.4999999999999,\n    top=-40.97989806962009,\n)\n```\n\nMore info can be found at https://developmentseed.org/morecantile/usage/\n\n### Defaults Grids\n\n`morecantile` provides a set of default TileMatrixSets:\n\n- **CDB1GlobalGrid** \\*: CDB 1 Global Grid - EPGS:4326 (WGS84)\n- **CanadianNAD83_LCC**: Lambert conformal conic NAD83 for Canada - EPSG:3978\n- **EuropeanETRS89_LAEAQuad**: ETRS89-extended / LAEA Europe - EPGS:3035\n- **GNOSISGlobalGrid** \\*: GNOSIS Global Grid - EPGS:4326 (WGS84)\n- **LINZAntarticaMapTilegrid**: LINZ Antarctic Map Tile Grid (Ross Sea Region) - EPSG:5482\n- **NZTM2000Quad**: LINZ NZTM2000 Map Tile Grid - EPSG:2193\n- **UPSAntarcticWGS84Quad**: Universal Polar Stereographic WGS 84 Quad for Antarctic - EPSG:5042\n- **UPSArcticWGS84Quad**: Universal Polar Stereographic WGS 84 Quad for Arctic - EPSG:5041\n- **UTM31WGS84Quad**: Example of UTM grid - EPSG:32631\n- **WebMercatorQuad**: Spherical Mercator - EPGS:3857 (default grid for Web Mercator based maps)\n- **WGS1984Quad**: EPSG:4326 for the World - EPGS:4326 (WGS84)\n- **WorldCRS84Quad**: CRS84 for the World\n- **WorldMercatorWGS84Quad**: Elliptical Mercator projection - EPGS:3395\n\n\\* TileMatrixSets with variable Matrix Width (see https://docs.ogc.org/is/17-083r4/17-083r4.html#toc15)\n\nref: https://schemas.opengis.net/tms/2.0/json/examples/tilematrixset/\n\n## Implementations\n\n- [rio-tiler](https://github.com/cogeotiff/rio-tiler): Create tile from raster using Morecantile TMS.\n- [titiler](https://github.com/developmentseed/titiler): A modern dynamic tile server built on top of FastAPI and Rasterio/GDAL.\n- [tipg](https://github.com/developmentseed/tipg): OGC Features and Tiles API.\n- [planetcantile](https://github.com/AndrewAnnex/planetcantile): Tile matrix sets for other planets.\n- [supermorecado](https://github.com/developmentseed/supermorecado): Extend the functionality of morecantile with additional commands.\n\n\n## Changes\n\nSee [CHANGES.md](https://github.com/developmentseed/morecantile/blob/main/CHANGES.md).\n\n## Contribution & Development\n\nSee [CONTRIBUTING.md](https://github.com/developmentseed/morecantile/blob/main/CONTRIBUTING.md)\n\n## License\n\nSee [LICENSE](https://github.com/developmentseed/morecantile/blob/main/LICENSE)\n\n## Authors\n\nCreated by [Development Seed](<http://developmentseed.org>)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Construct and use map tile grids (a.k.a TileMatrixSet / TMS).",
    "version": "5.3.0",
    "project_urls": {
        "Documentation": "https://developmentseed.org/morecantile/",
        "Source": "https://github.com/developmentseed/morecantile"
    },
    "split_keywords": [
        "gis",
        "tms",
        "tilematrixset",
        "map tile"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3f696053f04782704b209cb55c72650f8a856bd00a3c5b66309e57757255d77d",
                "md5": "40bb08eb46a2e8ac0afea9023616d5ba",
                "sha256": "e4e81193189d77482a803cf0c06639771d913f47825fae61038db7ae3be41d95"
            },
            "downloads": -1,
            "filename": "morecantile-5.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "40bb08eb46a2e8ac0afea9023616d5ba",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 49048,
            "upload_time": "2024-02-09T13:48:49",
            "upload_time_iso_8601": "2024-02-09T13:48:49.690286Z",
            "url": "https://files.pythonhosted.org/packages/3f/69/6053f04782704b209cb55c72650f8a856bd00a3c5b66309e57757255d77d/morecantile-5.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a89135ea01100231c4b99b86300fd044ecdb48cd50bfe1ee6f80ed4d6d0291de",
                "md5": "d7e543cb97e6c18c6ba8c0b8716d98a0",
                "sha256": "47448ed7bf2b6749fededdbe4335237406102e2c1b0d262a03aa6539d9b639bd"
            },
            "downloads": -1,
            "filename": "morecantile-5.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d7e543cb97e6c18c6ba8c0b8716d98a0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 43513,
            "upload_time": "2024-02-09T13:48:51",
            "upload_time_iso_8601": "2024-02-09T13:48:51.795529Z",
            "url": "https://files.pythonhosted.org/packages/a8/91/35ea01100231c4b99b86300fd044ecdb48cd50bfe1ee6f80ed4d6d0291de/morecantile-5.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-09 13:48:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "developmentseed",
    "github_project": "morecantile",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "morecantile"
}
        
Elapsed time: 0.17993s