GeoTIFF: https://s3-us-west-2.amazonaws.com/remotepixel-pub/data/Int16_nodata9999.tif
$ docker run --name dockerimage -p 8000:8000 --volume $(pwd)/:/local --rm -it lambci/lambda:build-python3.6 bash
$ yum install wgetGeoTIFF: https://s3-us-west-2.amazonaws.com/remotepixel-pub/data/Int16_nodata9999.tif
$ docker run --name dockerimage -p 8000:8000 --volume $(pwd)/:/local --rm -it lambci/lambda:build-python3.6 bash
$ yum install wgetLet's see how much it will cost to translate all the Sentinel-2 JPEG2000 to COGs using AWS Lambda https://github.com/developmentseed/sentinel-2-cog (Note at this scale AWS Lambda might not be the cheapest option).
How many S2 scenes do we have on AWS?
$ curl https://sat-api.developmentseed.org/collections/sentinel-2-l1c/items | jq -r '.meta.found'
5 633 438Lambda config
| import mercantile | |
| from shapely.geometry import box, shape | |
| from supermercado import burntiles | |
| minzoom = 7 | |
| maxzoom = 12 | |
| maximum_items_per_tile = 20 | |
| def stac_to_mosaicJSON(data): | |
| dataset = data["features"] |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset='utf-8' /> | |
| <title>Demo</title> | |
| <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
| <script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.0.0/mapbox-gl.js'></script> | |
| <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.0.0/mapbox-gl.css' rel='stylesheet' /> |
| """rio_tiler.sentinel1: Sentinel-1 processing.""" | |
| import os | |
| import re | |
| import json | |
| import warnings | |
| import multiprocessing | |
| from functools import partial | |
| from concurrent import futures |
| import json | |
| import click | |
| import cligj | |
| from shapely.geometry import shape, mapping, MultiPolygon | |
| from shapely.affinity import translate | |
| @click.command() |
| import json | |
| import click | |
| import cligj | |
| from shapely.geometry import shape, mapping | |
| @click.command() | |
| @click.pass_context |