oty rpc

Orthorectify SOURCE images with RPC camera model(s).

SOURCE images can be specified with paths, URIs or path / URI wildcard patterns.

Camera parameters are read from SOURCE image tags / sidecar files, or from --rpc-param if provided.

The --dem option is required, except when exporting camera parameters with --export-params. If --crs is not supplied, a 3D WGS84 geographic world / ortho CRS is used:

oty rpc --dem dem.tif source*.tif

Camera parameters can be refined with GCPs using --gcp-refine:

oty rpc --dem dem.tif --gcp-refine tags source*.tif

Camera parameters can be exported to Orthority format file(s) with --export-params. If --export-params is supplied with --gcp-refine, the refined parameters are exported as well as the GCPs:

oty rpc ---export-params --gcp-refine tags source*.tif

Ortho images and exported files are placed in the current working directory by default. This can be changed with --out-dir.

oty rpc [OPTIONS] SOURCE...

Options

-d, --dem <dem_file>

Path / URI of a DEM file covering the source image(s).

-rp, --rpc-param <rpc_param_file>

Path / URI of an Orthority RPC parameter file.

-gr, --gcp-refine <gcp_refine>

Refine camera model(s) with GCP(s). Can be supplied with the path / URI value of an Orthority format GCP file, or with ‘tags’ to read GCPs from source image tags.

-rm, --refine-method <refine_method>

Refinement method to use with --gcp-refine.

Default:

shift

Options:

shift | shift-drift

-c, --crs <crs>

CRS of ortho image(s) and world coordinates as an EPSG, proj4, or WKT string; path / URI of a text file containing string; or path / URI of an image with metadata CRS.

Default:

'auto'

-r, --res <resolution>

Ortho image resolution in units of the --crs. Can be used twice for non-square pixels: --res WIDTH --res HEIGHT.

Default:

'ground sampling distance'

-db, --dem-band <dem_band>

Index of the DEM band to use (1 based).

Default:

1

-i, --interp <interp>

Interpolation method for remapping source to ortho image.

Default:

cubic

Options:

nearest | average | bilinear | cubic | lanczos

-di, --dem-interp <dem_interp>

Interpolation method for DEM reprojection.

Default:

cubic

Options:

nearest | average | bilinear | cubic | lanczos

-pb, --per-band, -npb, --no-per-band

Orthorectify band-by-band (--per-band) or all bands at once (--no-per-band). --no-per-band is faster but uses more memory.

Default:

False

-wm, --write-mask, -nwm, --no-write-mask

Mask valid pixels with an internal mask (--write-mask), or with a nodata value based on --dtype (--no-write-mask). An internal mask helps remove nodata noise caused by lossy compression.

Default:

'true for jpeg compression.'

-dt, --dtype <dtype>

Ortho image data type.

Default:

'source image data type.'

Options:

uint8 | uint16 | int16 | float32 | float64

-cm, --compress <compress>

Ortho image compression.

Default:

'jpeg for uint8 --dtype, deflate otherwise'

Options:

jpeg | deflate | lzw

-bo, --build-ovw, -nbo, --no-build-ovw

Build overviews for the ortho image(s).

Default:

True

-co, --creation-option <NAME=VALUE>

Creation option(s) for the ortho image(s). If supplied, --compress is ignored. See the GDAL docs for details.

Default:

'auto'

-dv, --driver <driver>

Ortho image driver.

Default:

gtiff

Options:

gtiff | cog

-e, --export-params

Export camera parameters to Orthority format file(s), and exit.

Default:

False

-od, --out-dir <out_dir>

Path / URI of the output file directory.

Default:

'current working'

-o, --overwrite

Overwrite existing output(s).

Default:

False

Arguments

SOURCE...

Optional argument(s)

See https://orthority.readthedocs.io/ for more detail.