Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.36 KB

serve_odm_cog_with_titiler.md

File metadata and controls

26 lines (18 loc) · 1.36 KB

Serve a Cloud-Optimized GeoTIFF from OpenDroneMap using Titiler

So you have a Cloud-Optimized GeoTIFF (COG), perhaps from OpenDroneMap (ODM), and you want to serve it to the world as a Tile Mill Server (TMS) link from a cloud or local server?

You've come to the right place.

Here's a quick recipe using Titiler, a fantastic Free Software utility built by DevelopmentSeedfor doing exactly that.

Make sure you have a valid COG

Check the one you have

This utility by Even Roault will tell you if your file is a valid COG. Assuming you have gdal-bin installed, copying this Python file and running it python3 validate_cloud_optimized_geotiff.py INFILE.tif should tell you.

But you might want to compress it nicely anyway.

In which case you can use one of the recipes from this utility. The line I most often use is

gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES -b 1 -b 2 -b 3 -mask 4 --config GDAL_TIFF_INTERNAL_MASK YES -co BIGTIFF=IF_SAFER INFILE.tif OUTFILE.tif

followed by

gdaladdo -r average --config BIGTIFF_OVERVIEW=IF_SAFER INFILE.tif 2 4 8 16 32 64 128 256 512 1024

Install titiler

Use pip