I would hope against use of "unbounded" raster reprojection, to me that is a bad smell and unfortunately it's becoming more prevalent not less in modern downstream and related software. It's not just Mercator, any Stereographic has the same problem and many others.
It's really not hard to get the four numbers of the bounding box for the target, practitioners and tools should highlight that need and encourage against in-built heuristics. The clamping of Mercator to square is entirely arbitrary anyway, as would be any other limit place on Stereographic or others. If this feature was put in I'd still encourage for a better heuristic, apply a configurable size (pixels) limit (around the centre point of the result), an ncols and nrows parameter - or radius (in the target crs). That has practical benefits, limiting any auto-heuristic to a sane number of pixels, and configurable-away, or ignored when you provide a sensible target specification: size, bbox, crs (or bbox, resolution crs equivalently). Cheers, Mike On Mon, May 25, 2026 at 8:05 PM Denis Rykov via gdal-dev < [email protected]> wrote: > In https://github.com/OSGeo/gdal/commit/5b7829 a useful heuristic was > added to gdalwarp that clamps latitudes when warping from geographic CRS to > Mercator projections. However, AutoCreateWarpedVRT does not apply the same > heuristic. Users who create warped VRTs programmatically will silently get > unbounded extents in the same scenario, with no warning issued. It would > be great to have this heuristic available at a lower level so other callers > beyond gdalwarp can benefit from it as well. > _______________________________________________ > gdal-dev mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Michael Sumner Research Software Engineer Australian Antarctic Division Hobart, Australia 0438489030 e-mail: [email protected]
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
