This commit is contained in:
Caleb Robinson 2020-07-31 14:27:46 -07:00 коммит произвёл GitHub
Родитель 6e62d1a74b
Коммит df89c7b7a2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -19,6 +19,7 @@ This is a list of recipes for working with geospatial data using the GDAL comman
- [Quantize float32/float64 raster to byte](#quantize-float32-float64-raster-to-byte)
- [Reproject and crop a large raster to the spatial extent and spatial resolution of a smaller raster](#reproject-and-crop-a-large-raster-to-the-spatial-extent-and-spatial-resolution-of-a-smaller-raster)
- [Rasterize shapefile to the extent of a raster](#rasterize-shapefile-to-the-exent-of-a-raster)
- [Convert GeoTIFF to COG](#convert-geotiff-to-cog)
## Quick links to the various GDAL command line tool's documentation
@ -264,3 +265,12 @@ command = [
]
subprocess.call(command)
```
### Convert GeoTIFF to COG
<a name="convert-geotiff-to-cog"></a>
```
gdalwarp -co BIGTIFF=YES -co NUM_THREADS=ALL_CPUS -co COMPRESS=LZW -CO PREDICTOR=2 -of COG INPUT.tif OUTPUT.tif
```
Note: This requires GDAL version >= 3.1