RPCs, terrain and output coverage#

RPC metadata and grid planning#

Object or argument

Contract

RPC

Detached rational polynomial metadata. from_gdal and to_gdal validate conversions to and from GDAL metadata.

RPCTransformer

Executes coordinate transformations using RPC metadata.

OrthorectificationPlan

Holds a plan for orthorectification execution.

plan_rpc_grid

Proposes a north-up envelope by sampling the image boundary at a fixed WGS84 ellipsoidal height or over a height range. Executing the plan supplies terrain-aware pixel validity.

source_shape

Required by plan_rpc_grid when the input is an RpcModel.

boundary_samples_per_edge

Number of boundary samples per edge, from 2 through 65.

Automatic UTM selection

Requires a scene center between 80°S and 84°N.

Terrain heights#

terrain_vertical_reference determines which height arguments are accepted.

Terrain vertical reference

Requirements and behavior

wgs84_ellipsoid

Grid and epoch arguments are rejected.

Orthometric compound CRS

Requires terrain_grid_directory, degree/Greenwich horizontal settings, and an epoch where applicable. cuGeo-Proj transforms sampled X/Y/Z to WGS84(G2139). A sample outside the height model receives coordinate-failure status.

Coordinate-failure status alone does not identify the cause of every failure. The projected-destination example over geographic orthometric terrain uses the explicit prepared route. Its source assertions are in cugeo-raster/python_tests/test_orthorect.py at test_projected_destination_over_geographic_orthometric_terrain.

Output and execution#

Input or option

Controls

Destination Affine and CRS

The map grid on which output pixels are placed.

Caller output shape and dtype

The dimensions and sample type of out.

Image and terrain resampling

Sampling of imagery and terrain, respectively.

Fill

The value used where a pixel cannot be produced.

Preferred and minimum tile shape

The tile sizes used by the bounded execution route.

Stream

The selected CUDA stream for device geometry and sampling.

return_status

Whether pixel statuses are returned.

return_receipt

Whether the execution receipt is returned.

out

Execution route

NumPy

Synchronous host execution.

Supported ordinary CUDA Array Interface output

Synchronously decodes a native-TIFF region on the host, copies it to the GPU, and performs geometry and sampling on the selected stream with bounded CuPy scratch. The staged imagery profile is single-channel UInt16.

Pixel interpretation#

The checked-in identity-RPC contract case uses a 4 × 2 UInt16 TIFF and a Float32 DEM. For its pitched device output, the assertions require samples to match the input, every validity flag to be true, and every status to be zero. See cugeo-raster/python_tests/test_orthorect.py at test_ordinary_file_facade_uses_bounded_caller_device_arena.

For another scene, inspect a pixel’s validity and status alongside its filled value. For a tile failure or how much of a call completed, see the receipt scopes and diagnostic fields.