Understanding use of epsilon in transform.rowcol


Hi, I'm trying to understand the use of epsilon in rasterio.transform.rowcol

Specifically here - https://github.com/groutr/rasterio/blob/95d77c5e8553405a9dee373ae815072cf91d5cd1/rasterio/transform.py#L240 - where, as I read it, a point to be transformed from world coordinates to raster row/column indices is nudged by epsilon before being transformed, in the direction of the interior of the raster cell.

Why do we need to translate it that small amount before transforming? My guess is that it avoids later rounding or off-by-one errors, but I'm struggling to come up with an example or small test case.

Am I on the right lines? Is there good background material (or keywords to search on) that I'm missing for this kind of thing?

Thanks in advance, I hope this is the right forum for these questions.

Join main@rasterio.groups.io to automatically receive all group messages.