Open mdsumner opened 1 year ago
if (psOptions->bTargetAlignedPixels ||
(psOptions->bCropToCutline &&
psOptions->aosWarpOptions.FetchBool("CUTLINE_ALL_TOUCHED", false)))
{
psOptions->dfMinX = floor(psOptions->dfMinX / psOptions->dfXRes) *
psOptions->dfXRes;
psOptions->dfMaxX =
ceil(psOptions->dfMaxX / psOptions->dfXRes) * psOptions->dfXRes;
psOptions->dfMinY = floor(psOptions->dfMinY / psOptions->dfYRes) *
psOptions->dfYRes;
psOptions->dfMaxY =
ceil(psOptions->dfMaxY / psOptions->dfYRes) * psOptions->dfYRes;
}
related work on the python side 🤔
extend -tap to work with -ts,-te and not require -tr
I think in the t_srs case it's kind of pointless, because you have an implied resolution from -te/-ts and then you would only align the -te to that (I guess that's ok).
https://github.com/OSGeo/gdal/pull/7073#issuecomment-1386206357
we want this to avoid having to do raster logic outside, so any
-te
when not changing the crs will do what the RasterIO lib does (snaps to native)