Skip to main content

Inspect CloudOptimized Geotiff using Mapbox GL JS

Project description

https://circleci.com/gh/mapbox/rio-glui.svg?style=svg https://codecov.io/gh/mapbox/rio-glui/branch/master/graph/badge.svg

Explore CloudOptimized geotiff on your browser using Mapbox GL JS.

http://i.giphy.com/3ohzdVQrl8uUc8I2dO.gif

Install

You can install rio-glui using pip

$ pip install -U pip
$ pip install rio-glui

or install from source:

$ git clone https://github.com/mapbox/rio-glui.git
$ cd rio-glui
$ pip install -e .

Usage

Usage: rio glui [OPTIONS] PATH

  Rasterio glui cli.

Options:
-b, --bidx BIDX                   Raster band index
--scale INTEGER Min Max           Min and Max data bounds to rescale data from.
--colormap [cfastie|schwarzwald]  Rio-tiler compatible colormap name ('cfastie' or 'schwarzwald')
--tiles-format [png|jpg|webp]     Tile image format (default: png)
--tiles-dimensions INTEGER        Dimension of images being served (default: 512)
--nodata INTEGER                  Force mask creation from a given nodata value
--gl-tile-size INTEGER            mapbox-gl tileSize (default is the same as `tiles-dimensions`)
--port INTEGER                    Webserver port (default: 8080)
--playground                      Launch playground app
--mapbox-token TOKEN              Pass Mapbox token
--help                            Show this message and exit.

Explore COG hosted on aws

$ rio glui https://oin-hotosm.s3.amazonaws.com/5ac626e091b5310010e0d482/0/5ac626e091b5310010e0d483.tif

Playground

The –playground option opens a playground template where you an interact with the data to apply rio-color formula.

Creating CloudOptimized Geotiff

To create rio-glui friendly files (CloudOptimized Geotiff) you can use another rasterio plugin: rio-cogeo (https://github.com/mapbox/rio-cogeo.git).

Extras

This plugin also enable raster visualisation in Jupyter Notebook using [mapboxgl-jupyter](https://github.com/mapbox/mapboxgl-jupyter)

Contribution & Devellopement

Issues and pull requests are more than welcome.

Dev install & Pull-Request

$ git clone https://github.com/mapbox/rio-glui.git
$ cd rio-cogeo
$ pip install -e .[dev]

Python3.6 only

This repo is set to use pre-commit to run flake8, pydocstring and black (“uncompromising Python code formatter”) when commiting new code.

$ pre-commit install
$ git add .
$ git commit -m'my change'
black....................................................................Passed
Flake8...................................................................Passed
Verifying PEP257 Compliance..............................................Passed
$ git push origin

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

rio-glui-1.0.4.tar.gz (48.2 kB view details)

Uploaded Source

File details

Details for the file rio-glui-1.0.4.tar.gz.

File metadata

  • Download URL: rio-glui-1.0.4.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for rio-glui-1.0.4.tar.gz
Algorithm Hash digest
SHA256 4674a61d0f2171e784e80c0df45a9b103d2095b73f5198f3b7d9ad0e8a41a8b0
MD5 3d7f50a86aedf92b9f86cea68cfea710
BLAKE2b-256 026f32524252ba9c6ce200d202fca82b8890fb5850744db62c314415f494c2c8

See more details on using hashes here.

Provenance

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