Skip to main content

Supercharged mercantile

Project description

PyPI Tests

supermercado

supermercado extends the functionality of mercantile with additional commands

Quickstart

pip install supermercado

Usage

Usage: supermercado [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  burn   Burn a stream of GeoJSON into a output...
  edges  For a stream of [<x>, <y>, <z>] tiles, return...
  union  Returns the unioned shape of a stream of...

supermercado burn

<{geojson} stream> | supermercado burn <zoom> | <[x, y, z] stream>

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

image

cat data/ellada.geojson | supermercado burn 10 | mercantile shapes | fio collect

image

supermercado edges

<[x, y, z] stream> | supermercado 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 data/ellada.geojson | supermercado burn 10 | supermercado edges | mercantile shapes | fio collect | geojsonio

image

supermercado union

<[x, y, z] stream> | supermercado union | <{geojson} stream>

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

cat data/ellada.geojson | supermercado burn 10 | supermercado union | fio collect | geojsonio

image

getting crazy

cat data/ellada.geojson | supermercado burn 12 | supermercado edges | supermercado union | fio collect | geojsonio

image

Contributing

Developing

git clone git@github.com:mapbox/supermercado.git
cd supermercado
uv venv
source .venv/bin/activate
uv sync --all-groups

Releasing

  1. Within your PR, update pyproject.toml with the new version number
  2. Once the PR is merged, pull main and verify the tests
uv run pytest
uv run ruff check .
uv run ruff format --check .
  1. Tag with the new version number and push
# ie
$ git checkout main
$ git pull
$ git tag 1.2.3
$ git push origin main 1.2.3
  1. GitHub Actions builds the release, runs uvx twine check, and publishes to PyPI using the pypi environment token

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

supermercado-0.4.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

supermercado-0.4.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file supermercado-0.4.0.tar.gz.

File metadata

  • Download URL: supermercado-0.4.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for supermercado-0.4.0.tar.gz
Algorithm Hash digest
SHA256 48dde7bba62fa492f6dc0edaa8c3e70286f85531edd15e35fb5b638d534b6a5a
MD5 24a83a72abc535bf0f09dd1a9da51376
BLAKE2b-256 d4cba27f0e78482e2de59d48f36c54951c0066768c74c0e628c313f17bd6c2d1

See more details on using hashes here.

File details

Details for the file supermercado-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: supermercado-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for supermercado-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 afefff2fdc52e05076be3fae95372343214d2a29d79828979ff0d8ef0a5270ec
MD5 50ac6699afae3539f10cdb50994cf282
BLAKE2b-256 c16bd9c8424de13ead0f72f4f65b85c0604cd22bc20cc0b578a78ba8890063a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page