GithubHelp home page GithubHelp logo

gfw-api / true-color-tiles Goto Github PK

View Code? Open in Web Editor NEW
1.0 5.0 3.0 1.66 MB

On-the-fly true color conversion

License: MIT License

JavaScript 12.83% Shell 5.28% HTML 7.40% Dockerfile 3.85% TypeScript 70.64%

true-color-tiles's Introduction

True Color Tiles Microservice

Build Status Test Coverage

This repository moves the dynamic pixel showing/hiding/recoloring magic from the GFW flagship site to the server-side, making true color loss and GLAD tiles more easily available.

To demo this service, try adding the following to the map on http://geojson.io (Meta -> Add Map Layer): http://production-api.globalforestwatch.org/v1/true-color-tiles/loss/{z}/{x}/{y}?thresh=75&startYear=2005&endYear=2008

The above will add loss tiles to the geojson.io map, filtering to show only data from 2005 - 2008 where thresh >=75.

This is the same mechanism that the flagship performs when users change the timeline and the TCD threshold of interest.

For an example of adding zoomable loss/glad tiles to ArcMap, see Add-Data-to-ArcMap.md

Endpoints

Annual Loss Layer

http://production-api.globalforestwatch.org/v1/true-color-tiles/loss/{z}/{x}/{y}

Query Parameters

Parameter Type Description
thresh Int Tree cover Density Threshold used to mask Tree cover loss (10/15/20/25/30/50/75 - default 30)
startYear Int Will filter out all loss prior to given year (default 2000)
endYear Int Will filter out all loss after given year (default 2018)

GLAD alerts

http://production-api.globalforestwatch.org/v1/true-color-tiles/glad/{z}/{x}/{y}

Parameter Type Description
startDate Date Will filter out all alerts prior to given date. Use format YYYY-MM-DD (default 2015-01-01)
endDate Date Will filter out all alerts after given date. Use format YYYY-MM-DD (default today)
showUnconfirmed Bool Show unconfirmed alerts (default False)

Running locally on OS X

First, make sure that you have the API gateway running locally.

We're using Docker which, luckily for you, means that getting the application running locally should be fairly painless. First, make sure that you have Docker Compose installed on your machine.

git clone https://github.com/gfw-api/true-color-tiles
cd true-color-tiles
./true-color-tiles.sh develop

true-color-tiles's People

Contributors

dagibbs22 avatar dependabot-preview[bot] avatar dependabot[bot] avatar mappingvermont avatar nsuberi avatar tiagojsag avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.