Skip to main content

Supercharged mercantile

Project description

supermercado

supermercado extends the functionality of mercantile with additional commands

Installation

From pypi

pip install supermercado

To develop locally

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

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

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.3.0.tar.gz (10.5 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.3.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: supermercado-0.3.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for supermercado-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d8cc7519cb25f1142ee0e7c9e40b9be9a5688c3ac1f90a87d165286c3bfe44b6
MD5 71edb2c57eb2164217cc30ab5b757ea8
BLAKE2b-256 6324e5b34a27e9e015e920e4c7850762cf8fb3503e00055fc878f1ae0f402d26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for supermercado-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69f2c9240eb6bcb2f2af04215a950f5773dcf3fd6bde392941c7fb7e44da9172
MD5 d9ea1c6010fb56b433a5706751178fef
BLAKE2b-256 486abf37cd2aefb2f00584d29dff7d1b4f6a4c9addeecba082cf96b0777d8a21

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