Skip to content

Commit 917bb55

Browse files
authored
Doc: gdal_raster_materialize.rst: add note that VRT cannot be used and add example on how to use materialize for cloud optimized geotiff (OSGeo#13454)
1 parent e65e528 commit 917bb55

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

doc/source/programs/gdal_raster_materialize.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ current directory if not specified, and is deleted when the pipeline finishes.
2626
The user can also select another format, or specify an explicit filename,
2727
in which case the materialized dataset is not deleted when the pipeline finishes.
2828

29+
.. note:: VRT output is not compatible with materialize
30+
2931
Synopsis
3032
--------
3133

@@ -55,3 +57,20 @@ Examples
5557
5658
$ gdal pipeline ! read in.tif ! reproject --dst-crs=EPSG:32632 ! \
5759
! materialize ! contour --interval=10 ! write out.gpkg --overwrite
60+
61+
62+
.. example::
63+
:title: How to use materialize for Cloud Optimized GeoTIFF (COG)
64+
65+
Usually when you want load COG data, you are not loading the whole data but instead on certain region and using lower resolution for fast analysis.
66+
Therefore, after using command `read`, it is not supposed to be materialize right away because it mean it will download the whole thing into the memory/disk.
67+
Instead, you could use command `reproject` and use `--bbox` to limit the region of interest and set `--size` or `--resolution` to use lower resolution overview.
68+
69+
.. code-block:: bash
70+
71+
$ gdal pipeline ! read /vsicurl/https://some.storage.com/mydata/landcover.tif \
72+
! reproject -r mode -d EPSG:4326 --bbox=112,2,116,4.5 --bbox-crs=EPSG:4326 --size=3000,3000 \
73+
! materialize \
74+
! zonal-stats --zones=/vsicurl/https://some.storage.com/mydata/adm_level4.fgb --stat=values \
75+
! write out.geojson
76+

0 commit comments

Comments
 (0)