odc.geo.geobox.GeoBox.snap_to

GeoBox.snap_to(other)[source]

Snap pixel grid to other.

Find smallest sub-pixel translation to apply to this geobox such that pixel edges align with other.

Parameters:

other (GeoBox) – GeoBox to snap to, must be related by translation only, no change in scale or rotation.

Raises:

ValueError when other is in a different projection or has different resolution or orientation.

Return type:

GeoBox