Skip to content

Commit 09d8f04

Browse files
committed
driver and creation option updates
1 parent 0f462db commit 09d8f04

File tree

2 files changed

+54
-8
lines changed

2 files changed

+54
-8
lines changed

docs/getting_started/cli/ortho_config.rst

+27-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
Ortho image configuration
55
=========================
66

7-
Ortho images are created as GeoTIFFs. Image resolution and format (data type, compression, nodata / internal mask and overviews) can be configured. Configuration options are common to all |oty|_ orthorectification sub-commands and default to sensible values when not supplied.
7+
Ortho image resolution and format can be configured. Configuration options are common to all |oty|_ orthorectification sub-commands and default to sensible values when not supplied.
8+
9+
Resolution, data type and compression
10+
-------------------------------------
811

912
Ortho resolution defaults to an estimate of the `ground sampling distance <https://en.wikipedia.org/wiki/Ground_sample_distance>`__. This can be changed with ``--res``. The ortho data type defaults to the source image data type, and can be changed with ``--dtype``.
1013

11-
Compression can be configured with ``--compress`` as either ``deflate`` (with any ortho data type) or ``jpeg`` (with the ``uint8`` or ``uint16`` ortho data types). If ``--compress`` is not specified, compression defaults to ``jpeg`` when the ortho data type is ``uint8``, otherwise it defaults to ``deflate``. When ``jpeg`` compression is used with the ``uint16`` data type, the ortho is 12 bit ``jpeg`` compressed.
14+
Compression can be configured with ``--compress`` as either ``deflate`` or ``lzw`` (with any ortho data type), or ``jpeg`` (with the ``uint8`` or ``uint16`` ortho data types). If ``--compress`` is not specified, compression defaults to ``jpeg`` when the ortho data type is ``uint8``, and to ``deflate`` otherwise. When ``jpeg`` compression is used with the ``uint16`` data type, the ortho is 12 bit ``jpeg`` compressed.
1215

1316
.. note::
1417

@@ -20,11 +23,30 @@ The next example orthorectifies using EXIF / XMP tags, and configures the ortho
2023
2124
oty exif --dem odm/odm_dem/dsm.tif --res 0.2 --dtype uint8 --compress deflate odm/images/100_0005_0140.tif
2225
23-
Valid ortho pixels are masked with either an internal mask band or a nodata value. By default, an internal mask is used when the ortho image is ``jpeg`` compressed. This avoids ``jpeg`` artefacts in invalid areas. When the ortho is ``deflate`` compressed, the default is use to a nodata value based on the data type. Masking behaviour can be changed with ``--write-mask`` to write an internal mask, or ``--no-write-mask`` to use a nodata value.
26+
Masking and overviews
27+
---------------------
28+
29+
Valid ortho pixels are masked with either an internal mask band or a nodata value. By default, an internal mask is used when the ortho image is ``jpeg`` compressed. This avoids ``jpeg`` artefacts in invalid areas. When the ortho is ``deflate`` or ``lzw`` compressed, the default is use to a nodata value based on the data type. Masking behaviour can be changed with ``--write-mask`` to write an internal mask, or ``--no-write-mask`` to use a nodata value.
2430

25-
Internal overviews are added by default. This can be changed with ``--no-build-ovw``. In this example, we create an ortho image with ``deflate`` compression, nodata rather than internal masking, and no internal overviews:
31+
Internal overviews are added by default. This can be changed with ``--no-build-ovw``. In this example, we create an ortho image with ``deflate`` compression, internal masks, and no internal overviews:
2632

2733
.. code-block:: bash
2834
29-
oty exif --dem odm/odm_dem/dsm.tif --compress deflate --no-write-mask --no-build-ovw odm/images/100_0005_0140.tif
35+
oty exif --dem odm/odm_dem/dsm.tif --compress deflate --write-mask --no-build-ovw odm/images/100_0005_0140.tif
36+
37+
Custom creation options and driver
38+
----------------------------------
39+
40+
For ortho image configurations not possible with the above options, custom creation options can be specified with ``--creation-option``. The ``--compress`` option is ignored, and no other creation options are set by Orthority when this is supplied.
41+
42+
The ortho can be formatted as a ``gtiff`` (GeoTIFF - the default) or ``cog`` (Cloud Optimised GeoTIFF) with ``--driver``.
43+
44+
This example formats the ortho as a GeoTIFF with internal masks, and specifies custom creation options for tiled YCbCr JPEG compression with a quality of 90:
45+
46+
.. code-block:: bash
47+
48+
oty exif --dem odm/odm_dem/dsm.tif --write-mask --driver gtiff --creation-option tiled=yes --creation-option compress=jpeg --creation-option photometric=ycbcr --creation-option jpeg_quality=90 odm/images/100_0005_0140.tif
49+
50+
.. note::
3051

52+
Each driver has its own creation options. See the GDAL `GeoTIFF <https://gdal.org/en/latest/drivers/raster/gtiff.html#creation-options>`__ and `COG <https://gdal.org/en/latest/drivers/raster/cog.html#creation-options>`__ docs for details.

docs/getting_started/cli/sharp_config.rst

+27-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
Output image configuration
55
==========================
66

7-
Pan-sharpened images are created as GeoTIFFs. Image format (data type, compression, nodata / internal mask and overviews) can be configured. Configuration options are shared with the |oty|_ orthorectification sub-commands, and default to sensible values when not supplied.
7+
The pan-sharpened image format can be configured. Configuration options are shared with the |oty|_ orthorectification sub-commands, and default to sensible values when not supplied.
88

9-
The image data type defaults to the multispectral image data type, and can be changed with ``--dtype``. Compression can be configured with ``--compress`` as either ``deflate`` (with any image data type) or ``jpeg`` (with the ``uint8`` or ``uint16`` image data types). If ``--compress`` is not specified, compression defaults to ``jpeg`` when the image data type is ``uint8``, otherwise it defaults to ``deflate``. When ``jpeg`` compression is used with the ``uint16`` data type, the image is 12 bit ``jpeg`` compressed.
9+
Data type and compression
10+
-------------------------
11+
12+
The image data type defaults to the multispectral image data type, and can be changed with ``--dtype``. Compression can be configured with ``--compress`` as either ``deflate`` or ``lzw`` (with any image data type), or ``jpeg`` (with the ``uint8`` or ``uint16`` image data types). If ``--compress`` is not specified, compression defaults to ``jpeg`` when the image data type is ``uint8``, and to ``deflate`` otherwise. When ``jpeg`` compression is used with the ``uint16`` data type, the image is 12 bit ``jpeg`` compressed.
1013

1114
.. note::
1215

@@ -18,10 +21,31 @@ The next example creates a pan-sharpened image with the ``int16`` data type, and
1821
1922
oty sharpen --pan pan_sharp/pan.tif --multispectral pan_sharp/ms.tif --out-file pan_sharp.tif --dtype int16 --compress deflate
2023
21-
Valid image pixels are masked with either an internal mask band or a nodata value. By default, an internal mask is used when the image image is ``jpeg`` compressed. This avoids ``jpeg`` artefacts in invalid areas. When the image is ``deflate`` compressed, the default is use to a nodata value based on the data type. Masking behaviour can be changed with ``--write-mask`` to write an internal mask, or ``--no-write-mask`` to use a nodata value.
24+
Masking and overviews
25+
---------------------
26+
27+
Valid image pixels are masked with either an internal mask band or a nodata value. By default, an internal mask is used when the image is ``jpeg`` compressed. This avoids ``jpeg`` artefacts in invalid areas. When the image is ``deflate`` or ``lzw`` compressed, the default is use to a nodata value based on the data type. Masking behaviour can be changed with ``--write-mask`` to write an internal mask, or ``--no-write-mask`` to use a nodata value.
2228

2329
Internal overviews are added by default. This can be changed with ``--no-build-ovw``. In this example, we create an pan-sharpened image with ``deflate`` compression, internal masking rather than nodata, and no internal overviews:
2430

2531
.. code-block:: bash
2632
2733
oty sharpen --pan pan_sharp/pan.tif --multispectral pan_sharp/ms.tif --out-file pan_sharp.tif --compress deflate --write-mask --no-build-ovw
34+
35+
Custom creation options and driver
36+
----------------------------------
37+
38+
For pan-sharpened image configurations not possible with the above options, custom creation options can be specified with ``--creation-option``. The ``--compress`` option is ignored, and no other creation options are set by Orthority when this is supplied.
39+
40+
The image can be formatted as a ``gtiff`` (GeoTIFF - the default) or ``cog`` (Cloud Optimised GeoTIFF) with ``--driver``.
41+
42+
This example formats the pan-sharpened image as a COG with internal masks, and specifies custom creation options for JPEG compression with a quality of 90:
43+
44+
.. code-block:: bash
45+
46+
oty sharpen --pan pan_sharp/pan.tif --multispectral pan_sharp/ms.tif --out-file pan_sharp.tif --write-mask --driver cog --creation-option compress=jpeg --creation-option quality=90
47+
48+
.. note::
49+
50+
Each driver has its own creation options. See the GDAL `GeoTIFF <https://gdal.org/en/latest/drivers/raster/gtiff.html#creation-options>`__ and `COG <https://gdal.org/en/latest/drivers/raster/cog.html#creation-options>`__ docs for details.
51+

0 commit comments

Comments
 (0)