Skip to main content

Supercharged mercantile

Project description

supermercado

Build Status codecov.io

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
pip install -e .

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.1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

supermercado-0.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: supermercado-0.1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.0

File hashes

Hashes for supermercado-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f2310c00a7d151ffe60b9e817bec8f2c5ea8706f6080f685e3e3132eb3279327
MD5 f401cf0e5faa4e7f5e2c7da0de5fa9d0
BLAKE2b-256 d1ea4948b337bd51df46120c201cb60779c78581eeaa691ac049f08d20780f9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: supermercado-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.0

File hashes

Hashes for supermercado-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5a9873db8b2c194289527491a5e1bd580ad78f3b47c578f806126a01c448f613
MD5 c4479ed83897dbb21a6fb3e1a0983543
BLAKE2b-256 2dadabf90d50aacc28763424b0bde1e47228d635172df7ebe0ad428f8fd6c99f

See more details on using hashes here.

Supported by

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