Skip to main content

Supermorecado

Extend the functionality of morecantile with additional commands.

Test Coverage Package version Downloads License


Documentation: https://developmentseed.org/supermorecado/

Source Code: https://github.com/developmentseed/supermorecado


supermorecado is like supermercado, but with support for other TileMatrixSet grids.

Install

$ python -m pip install -U pip
$ python -m pip install supermorecado

# Or install from source:

$ python -m pip install -U pip
$ python -m pip install git+https://github.com/developmentseed/supermorecado.git

Usage

supermorecado --help
Usage: supermorecado [OPTIONS] COMMAND [ARGS]...

  Command line interface for the Supermorecado Python package.

Options:
  --help  Show this message and exit.

Commands:
  burn     Burn a stream of GeoJSONs into a output stream of the tiles they intersect for a given zoom.
  edges    For a stream of [<x>, <y>, <z>] tiles, return only those tiles that are on the edge.
  heatmap  Creates a vector `heatmap` of tile densities.
  union    Returns the unioned shape of a stream of [<x>, <y>, <z>] tiles in GeoJSON.

supermorecado burn

<{geojson} stream> | supermorecado burn <zoom> --identifier {tms Identifier} | <[x, y, z] stream>

Takes an input stream of GeoJSON and returns a stream of intersecting [x, y, z]s for a given zoom.

Using default TMS (WebMercatorQuad)

cat tests/fixtures/france.geojson | supermorecado burn 9 | morecantile shapes | fio collect | geojsonio

Using other TMS (e.g WGS1984Quad)

cat tests/fixtures/france.geojson | supermorecado burn 6 --identifier WGS1984Quad | morecantile shapes --identifier WGS1984Quad | fio collect | geojsonio

supermorecado edges

<[x, y, z] stream> | supermorecado edges | <[x, y, z] stream>

Outputs a stream of [x, y, z]s representing the edge tiles of an input stream of [x, y, z]s. Edge tile = any tile that is either directly adjacent to a tile that does not exist, or diagonal to an empty tile.

cat tests/fixtures/france.geojson | supermorecado burn 9 | supermorecado edges | morecantile shapes | fio collect | geojsonio

supermorecado union

<[x, y, z] stream> | supermorecado union --identifier {tms Identifier} | <{geojson} stream>

Outputs a stream of unioned GeoJSON from an input stream of [x, y, z]s. Like morecantile shapes but as an overall footprint instead of individual shapes for each tile.

Using default TMS (WebMercatorQuad)

cat tests/fixtures/france.geojson | supermorecado burn 9 | supermorecado union | fio collect | geojsonio

Using other TMS (e.g WGS1984Quad)

cat tests/fixtures/france.geojson | supermorecado burn 6 --identifier WGS1984Quad |  supermorecado union --identifier WGS1984Quad | fio collect | geojsonio

supermorecado heatmap

<[x, y, z] stream> | supermorecado heatmap --identifier {tms Identifier} | <{geojson} stream>

Outputs a stream of heatmap GeoJSON from an input stream of [x, y, z]s.

Using default TMS (WebMercatorQuad)

cat tests/fixtures/heatmap.txt| supermorecado heatmap | fio collect | geojsonio

Using other TMS (e.g WGS1984Quad)

# create a list of tiles
cat tests/fixtures/france.geojson | supermorecado burn 6 --identifier WGS1984Quad > france_wgs84_z6.txt
# randomly append more tiles
for run in {1..10}; do cat france_wgs84_z6.txt | sort -R | head -n 2 >> france_wgs84_z6.txt; done

cat france_wgs84_z6.txt |  supermorecado heatmap --identifier WGS1984Quad | fio collect | geojsonio

API migration

supermorecado is really similar to supermercado (it reuse most of the code) but with the addition of multiple TMS support from morecantile.

features = [
    {
        "geometry": {
            "coordinates": [
                [-127.97, 49.15],
                [-101.95, -8.41],
                [-43.24, -32.84],
                [37.62, -25.17],
                [71.72, -7.01],
                [107.23, 48.69],
            ],
            "type": "LineString",
        },
        "properties": {},
        "type": "Feature",
    },
]

# supermercado
from supermercado import burntiles, uniontiles

tiles = burntiles.burn(features)
u_tiles = uniontiles.union(features)

# supermorecado
import morecantile
from supermorecado import burnTiles, unionTiles

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

burntiles = burnTiles(tms=tms)
tiles = burntiles.burn(features)

uniontiles = unionTiles(tms=tms)
u_tiles = uniontiles.burn(features)

Changes

See CHANGES.md.

Contribution & Development

See CONTRIBUTING.md

License

See LICENSE

Authors

Created by Development Seed

Metadata

Release files for supermorecado 0.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 supermorecado 0.2.0
File Size Uploaded
supermorecado-0.2.0.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for supermorecado 0.2.0
File Interpreter ABI Platform
supermorecado-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.6 kB

Release files / supermorecado-0.2.0.tar.gz

Download URL supermorecado-0.2.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e64f5667d7f00117486d04876aa58622b38f356b19e2c61ae29332f2cabf50e1
BLAKE2b-256 checksum
How to use checksums
2436bb66411c216d6c1c1c08686ec526fdf6d62e268cc283d5966168d8f08da9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 3, 2026.

Transparency log

Release files / supermorecado-0.2.0-py3-none-any.whl

Download URL supermorecado-0.2.0-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
247f721854af8b991d81faa554fd93e971c6d5395146ab1b9b746f1a51862f29
BLAKE2b-256 checksum
How to use checksums
49910c82bea0f2d9875a302d4d06c0109b86b2b3e5eec0dff23fadfb15fd219a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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