[gdal-dev] AutoCreateWarpedVRT missing latitude clamping heuristic for Mercator projections
Michael Sumner
mdsumner at gmail.com
Thu May 28 15:27:21 PDT 2026
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 <
gdal-dev at lists.osgeo.org> 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
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
--
Michael Sumner
Research Software Engineer
Australian Antarctic Division
Hobart, Australia
0438489030
e-mail: mdsumner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20260529/2f25cdc1/attachment.htm>
More information about the gdal-dev
mailing list