diff --git a/oceanmesh/geodata.py b/oceanmesh/geodata.py index d7268d6..e26285f 100644 --- a/oceanmesh/geodata.py +++ b/oceanmesh/geodata.py @@ -785,13 +785,14 @@ def __init__(self, dem, crs="EPSG:4326", bbox=None, extrapolate=False): if bbox is None: bbox = src.bounds topobathy = src.read(1) + bbox = (bbox[0], bbox[2], bbox[1], bbox[3]) # then clip the DEM to the box else: # _bbox = (bbox[0], bbox[2], bbox[1], bbox[3]) window = from_bounds(*_bbox, transform=src.transform) topobathy = src.read(1, window=window, masked=True) - topobathy = np.transpose(topobathy, (1, 0)) + topobathy = np.transpose(topobathy, (1, 0)) # Ensure its a floating point array topobathy = topobathy.astype(np.float64) topobathy[