spatialdata.are_extents_equal#
- spatialdata.are_extents_equal(extent0, extent1, atol=0.1)#
Check if two data extents, as returned by
get_extent()
are equal up to approximation errors.- Parameters:
extent0 (
dict
[str
,tuple
[float
,float
]]) – The first data extent.extent1 (
dict
[str
,tuple
[float
,float
]]) – The second data extent.atol (
float
(default:0.1
)) – The absolute tolerance to use when comparing the extents.
- Return type:
bool
- Returns:
: Whether the extents are equal or not.
Notes
The default value of
atol
is currently high because of a bug ofrasterize()
that makes the extent of the rasterized data slightly different from the extent of the original data. This bug is tracked in scverse/spatialdata#165