From 820ec18563dbc1b35f2bb658b7f0263543785efe Mon Sep 17 00:00:00 2001
From: johnniehard Planet produces all its data as COG, and has a little tutorial on how to download part of an image using VSI Curl. Most of the tutorial is specific to working with the Planet API, but it shows the use of GDAL Warp with a COG to extract a single farm field from a larger image.
Also on the GDAL wiki page about COG, there is a section on How to generate it with GDAL. For quick reference the one liner is:
+
+ As of version 3.1 of GDAL there is a built in COG provider which by default provides tiling and creation of overviews, use it like this:
+ Reading a Cloud Optimized GeoTIFF
How to generate a Cloud Optimized GeoTIFF
-
+ gdal_translate input.tif output_cog.tif -of COG -co COMPRESS=LZW
There is a GDAL wiki page about COG creation: How to generate it with GDAL. For quick reference the one liner is:
gdal_translate in.tif out.tif -co TILED=YES -co COPY_SRC_OVERVIEWS=YES -co COMPRESS=DEFLATE
-
+
+
+ or you can use rio-cogeo plugin:
$ rio cogeo create in.tif out.tif --cog-profile deflate