All Projects → mapbox → Mercantile

mapbox / Mercantile

Licence: other
Spherical mercator tile and coordinate utilities

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Mercantile

Codeql
GitHub Satellite 2020 workshops on finding security vulnerabilities with CodeQL for Java/JavaScript.
Stars: ✭ 103 (-59.29%)
Mutual labels:  satellite
Rio Cogeo
Cloud Optimized GeoTIFF creation and validation plugin for rasterio
Stars: ✭ 128 (-49.41%)
Mutual labels:  satellite
Laitos
Top geek's chindogu - personal assistant over satellite/telephone/SMS/chatbot, plus web infrastructure servers (web & mail, ad-free DNS, web proxy, SNMP, etc)
Stars: ✭ 191 (-24.51%)
Mutual labels:  satellite
Mapbox Cli Py
Command line interface to Mapbox Web Services
Stars: ✭ 108 (-57.31%)
Mutual labels:  satellite
Pyorbital
Orbital and astronomy computations in python
Stars: ✭ 119 (-52.96%)
Mutual labels:  satellite
Look4sat
Amateur radio and weather satellite tracker and passes predictor for Android inspired by Gpredict
Stars: ✭ 160 (-36.76%)
Mutual labels:  satellite
Satellite
Download the latest images from Himawari-8 or DSCOVR and set it as your desktop background.
Stars: ✭ 99 (-60.87%)
Mutual labels:  satellite
University1652 Baseline
ACM Multimedia2020 University-1652: A Multi-view Multi-source Benchmark for Drone-based Geo-localization 🚁 annotates 1652 buildings in 72 universities around the world.
Stars: ✭ 232 (-8.3%)
Mutual labels:  satellite
R2cloud
Decode satellite signals on Raspberry PI or any other 64-bit intel.
Stars: ✭ 125 (-50.59%)
Mutual labels:  satellite
Awesome Geospatial Companies
🌐 List of 500+ geospatial companies (GIS, Earth Observation, UAV, Satellite, Digital Farming, ..)
Stars: ✭ 184 (-27.27%)
Mutual labels:  satellite
Foreman Ansible Modules
Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
Stars: ✭ 109 (-56.92%)
Mutual labels:  satellite
Py6s
A Python interface to the 6S Radiative Transfer Model
Stars: ✭ 117 (-53.75%)
Mutual labels:  satellite
Gps.js
A NMEA parser and GPS utility library
Stars: ✭ 171 (-32.41%)
Mutual labels:  satellite
Satellitetoolbox.jl
A toolbox for satellite analysis written in julia language.
Stars: ✭ 104 (-58.89%)
Mutual labels:  satellite
Bv
Quickly view satellite imagery, hyperspectral imagery, and machine learning image outputs directly in your iTerm2 terminal.
Stars: ✭ 215 (-15.02%)
Mutual labels:  satellite
Oscam Emu
Open Source Cam Emulator (patch only)
Stars: ✭ 101 (-60.08%)
Mutual labels:  satellite
Himawari.js
Download real-time images of Earth from the Himawari-8 satellite
Stars: ✭ 1,763 (+596.84%)
Mutual labels:  satellite
Pyskel
Skeleton of a Python package
Stars: ✭ 244 (-3.56%)
Mutual labels:  satellite
Rio Tiler
Rasterio plugin to create web map tiles from raster datasets.
Stars: ✭ 221 (-12.65%)
Mutual labels:  satellite
Ossim
Core OSSIM (Open Source Software Image Map) package including C++ code for OSSIM library, command-line applications, tests, and build system
Stars: ✭ 182 (-28.06%)
Mutual labels:  satellite

========== Mercantile

.. image:: https://travis-ci.org/mapbox/mercantile.svg :target: https://travis-ci.org/mapbox/mercantile :alt: Build Status

.. image:: https://coveralls.io/repos/github/mapbox/mercantile/badge.svg?branch=master :target: https://coveralls.io/github/mapbox/mercantile?branch=master :alt: Coverage Status

.. image:: https://readthedocs.org/projects/mercantile/badge/?version=latest :target: http://mercantile.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

Spherical mercator coordinate and tile utilities

Documentation: http://mercantile.readthedocs.io/en/latest/

The mercantile module provides ul(xtile, ytile, zoom) and bounds(xtile, ytile, zoom) functions that respectively return the upper left corner and bounding longitudes and latitudes for XYZ tiles, a xy(lng, lat) function that returns spherical mercator x and y coordinates, a tile(lng, lat, zoom) function that returns the tile containing a given point, and quadkey conversion functions quadkey(xtile, ytile, zoom) and quadkey_to_tile(quadkey) for translating between quadkey and tile coordinates.

.. code-block:: pycon

>>> import mercantile
>>> mercantile.ul(486, 332, 10)
LngLat(lng=-9.140625, lat=53.33087298301705)
>>> mercantile.bounds(486, 332, 10)
LngLatBbox(west=-9.140625, south=53.12040528310657, east=-8.7890625, north=53.33087298301705)
>>> mercantile.xy(*mercantile.ul(486, 332, 10))
(-1017529.7205322663, 7044436.526761846)
>> mercantile.xy_bounds(486, 332, 10)
Bbox(left=-1017529.7205322663, bottom=7005300.768279833, right=-978393.962050256, top=7044436.526761846)
>>> mercantile.tile(*mercantile.ul(486, 332, 10) + (10,))
Tile(x=486, y=332, z=10)
>>> mercantile.quadkey(486, 332, 10)
'0313102310'
>>> mercantile.quadkey_to_tile('0313102310')
Tile(x=486, y=332, z=10)

Also in mercantile are functions to traverse the tile stack.

.. code-block:: pycon

>>> mercantile.parent(486, 332, 10)
Tile(x=243, y=166, z=9)
>>> mercantile.children(mercantile.parent(486, 332, 10))
[Tile(x=486, y=332, z=10), Tile(x=487, y=332, z=10), Tile(x=487, y=333, z=10), Tile(x=486, y=333, z=10)]

Named tuples are used to represent tiles, coordinates, and bounding boxes.

Mercantile CLI

Mercantile's command line interface, named "mercantile", has commands for getting the shapes of Web Mercator tiles as GeoJSON and getting the tiles that intersect with a GeoJSON bounding box.

.. code-block:: console

$ mercantile --help
Usage: mercantile [OPTIONS] COMMAND [ARGS]...

  Command line interface for the Mercantile Python package.

Options:
  -v, --verbose  Increase verbosity.
  -q, --quiet    Decrease verbosity.
  --help         Show this message and exit.

Commands:
  bounding-tile  Print the bounding tile of a lng/lat point, bounding box, or
                 GeoJSON objects.
  children       Print the children of the tile.
  parent         print the parent tile.
  quadkey        Convert to/from quadkeys.
  shapes         Print the shapes of tiles as GeoJSON.
  tiles          Print tiles that overlap or contain a lng/lat point, bounding
                 box, or GeoJSON objects.

See docs/cli.rst <docs/cli.rst>__ for more about the mercantile program.

See Also

supermercado <https://github.com/mapbox/supermercado>__ is another python lib with added tile logic functionality (union tile shapes, find edge tiles, and find tile intersections for complex geometries).

node-sphericalmercator <https://github.com/mapbox/node-sphericalmercator>__ provides many of the same features for Node.

tilebelt <https://github.com/mapbox/tilebelt>__ has some of the GeoJSON features as mercantile and a few more (tile parents, quadkey).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].