Check coverage and diagnose invalid output#
Trace an affected pixel from its destination location through the operation and its validity information. For an RPC terrain product, also inspect the status and completed execution receipt.
Where does the affected pixel fall?#
Take an affected output row and column and use the destination affine, CRS and output shape to locate it on the map. Check that its location falls in the intended destination grid, then check the operation used.
warp_affineinverse-samples in the same coordinate system.warp.reprojecthandles different CRSs.For an RPC terrain product, inspect the explicit destination grid and the separate imagery and terrain resampling choices.
Does the fill value represent a valid measurement?#
A value alone cannot distinguish a valid zero from an invalid pixel filled with zero. The host mask fixture in cugeo-raster/tests/data/dataset_masks/internal.tif provides a valid-zero check. From a repository checkout, read band 1 and compare the value and effective validity at row 0, column 0 and row 0, column 1.
import numpy as np
import cugeo.raster as raster
path = "cugeo-raster/tests/data/dataset_masks/internal.tif"
with raster.open(path) as dataset:
values = np.empty((4, 4), dtype=np.uint8)
validity = np.empty((4, 4), dtype=np.uint8)
dataset.read(1, out=values, fill_value=0)
dataset.read_masks(1, out=validity)
for row, column in [(0, 0), (0, 1)]:
print((row, column), "value:", values[row, column],
"validity:", validity[row, column])
Both values should be 0. The nonzero validity indicator identifies the valid measurement. The zero indicator identifies the masked pixel. An I/O error points to required storage that could not be read correctly. A capability error can identify a recognized encoding or flag that the route does not support.
What do the RPC status and receipt establish?#
When orthorectifying into caller-owned out, request return_status=True and return_receipt=True. For coordinate-failure status, check model coverage at the affected location and the declared terrain_vertical_reference. An outside-model sample receives this status, so verify the location before assigning that cause.
Check the vertical-reference settings against the affected product.
wgs84_ellipsoidrejects grid and epoch arguments.An orthometric compound CRS requires
terrain_grid_directory, degree/Greenwich horizontal settings and the applicable epoch. cuGeo Proj transforms sampled X/Y/Z to WGS84(G2139).
Read the completed receipt beside the output choice.
Output |
Execution path |
|---|---|
NumPy |
Synchronous host execution |
Supported staged UInt16 single-channel CUDA Array Interface output |
Native TIFF decoding reads the region on the host. Raster copies it to the device and uses bounded CuPy scratch for geometry and sampling on the selected stream. The call is synchronous. |
Use an independent control location to judge placement.