geotiff cloud optimized - wordpress.com...data retrieval - performance cog is intended to be used on...

39
Cloud Optimized Geotiff Open-source GIS Israel By Guy Doulberg

Upload: others

Post on 06-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Cloud Optimized Geotiff

Open-source GIS IsraelBy Guy Doulberg

Page 2: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

About Guy Doulberg

● In the last 3 years working for Satellogic● Leads the team that is responsible for delivering satellogic product

Page 3: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

About Satellogic

● Aregintian startup● Founded in 2011● The mission is important to the rest of the talk

Page 4: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Satellogic Accessible Satellite data

Page 5: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Satellogic Challenge

● How to store in our data ● How to retrieve our data● Without being bankrupt● In a safe place

Page 6: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Satellogic - implementation

● Store rasters on Azure Blob Storage● Store rasters a Cloud Optimized GeoTiff (COG)

Page 7: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

COG words explained

Page 8: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Why cloud?

Page 9: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Cloud Storage is elastic, cheap and safe

● You pay only for what you are actually using● When you pay it is cheap compared to other solution● The cloud providers grant you some data-availability SLA - you don’t need to manage

it

Page 10: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Cloud storage price list

Page 11: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

What need to be Optimized?

Page 12: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Data retrieval - performance

● COG is intended to be used on big areas of high resolution.● The client would like to retrieve only the data that is required and no more than that.

Page 13: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Data retrieval - cost

● The data is not local ● You pay for the volume of the data you actually retrieved

Page 14: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Why GeoTiff?

Page 15: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

GeoTiff - legacy support

● The community wanted existing systems will work without a change

Page 16: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

COG description

Page 17: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

COG description

A file format that uses:

● Tiling● Overviews● HTTP range● IFD at the top of a file

Using the above techniques will optimize your data for the cloud

Page 18: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

GeoTiff: Tiled

● A Tiled GeoTiff is a Tiff that uses tiles to store its data.● Tiles instead of Stripes● A Tile has width and height● Common tiles sizes: 256X256, 512X512

Page 19: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

GeoTiff: retrieving a pixel in a stripe

Page 20: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

GeoTiff: retrieving a pixel in a tile

Page 21: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Geotiff: Overviews

● A Geotiff with overviews is a Geotiff constructed out of several Geotiffs.● Each Geotiff is for a different resolution (pyramid) ● Overviews are used to cache resampled lower resolution pixels ●

Page 22: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

HTTP Ranges request

Page 23: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

COG - IFD Locations

● An IFD is a pointer to the location of the first tile● A GeoTiff with overviews has several IFD one for each overview● A COG must have its IFDs located in the first data block

Page 24: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Putting it all together

Page 25: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Data Retrieval example

● Most cases user needs are different from the way the raster was stored.● A user defines an Area of Interest (AOI) and resolution● For example: WMS, XYZ requests

Page 26: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

COG - Classic data retrieval

● Fetch the header of a cog file (<16KB)● Pick the IFD by resolution ● Calculate the tiles needed according to the tiles offsets in the IFD

Page 27: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Demos

Page 28: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Using COGs

Page 30: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Qgis

● Adding a cog as a layer

Page 32: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Creating COGs

Page 33: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Gdal_translate

● Follow the steps here: https://trac.osgeo.org/gdal/wiki/CloudOptimizedGeoTIFF#Preparation

Page 34: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Telluric

● https://github.com/satellogic/telluric● A library developed by satellogic (including me)

Page 35: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Rasterio

● https://github.com/cogeotiff/rio-cogeo

Page 36: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Nice tools

Page 37: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Cog Explorer

1. Use javascript library to visualize cogs2. https://geotiffjs.github.io/cog-explorer/#long=16.370&lat=48.210&zoom=5&scene=&b

ands=&pipeline=

Page 38: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

marblecutter

● Flask or Lambda to server xyz of cogs● https://hi.stamen.com/stamen-aws-lambda-tiler-blog-post-76fc1138a145

Page 39: Geotiff Cloud Optimized - WordPress.com...Data retrieval - performance COG is intended to be used on big areas of high resolution. The client would like to retrieve only the data that

Thank you