Skip to main content

Supercharged mercantile

Project description

Build Status codecov.io

supermercado extends the functionality of `mercantile <https://github.com/mapbox/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 steeam 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

image

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

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

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

image

getting crazy

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

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

Uploaded Source

File details

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

File metadata

File hashes

Hashes for supermercado-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0dcfc49ceac030f47b17a4b4ca21c61fd4a1ff69d5fbc1fb141917af908a3778
MD5 31a0a09e0220d7ad2e1aa7b6d34c3767
BLAKE2b-256 fbf469a43272fc6f4609990be7184519ae021bf7d6876f299a29f3f081344f13

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