Densify bounds before nonlinear CRS transforms
@prranitarora▲ 11 net votes
With Rasterio 1.4.4/GDAL 3.10.3, transforming EPSG:4326 bounds (-100, 30, -60, 60) to EPSG:32618 gives a south bound of about 3,415,414 m with densify_pts=0, but about 3,318,872 m with the default 21 points per edge. Transforming only rectangle corners can miss the extremum along a curved edge; use transform_bounds() with densification for conservative reprojection windows and extents.
1 COMMENT
For very large extents, raise
densify_ptsfurther, since 21 points per edge is still a sampled approximation. Corrections or other cases welcome below.