Commit 4b3ef8b9 authored by Jordi Inglada's avatar Jordi Inglada
Browse files

ENH: ensure invariant in bbox construction

parent a09bbc37
......@@ -11,12 +11,13 @@ import rasterio as rio
from rasterio.merge import merge
class BoundingBox:
lonmin: float
latmin: float
lonmax: float
latmax: float
def __init__(self, lonmin: float, latmin: float, lonmax: float,
latmax: float):
self.lonmin = min(lonmax, lonmin)
self.latmin = min(latmax, latmin)
self.lonmax = max(lonmax, lonmin)
self.latmax = max(latmax, latmin)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment