odc.geo.xr.spatial_dims

odc.geo.xr.spatial_dims(xx, relaxed=False)[source]

Find spatial dimensions of xx.

Checks for presence of dimensions named: y, x | latitude, longitude | lat, lon

If relaxed=True and none of the above dimension names are found, assume that last two dimensions are spatial dimensions.

Return type:

Optional[Tuple[str, str]]

Returns:

None if no dimensions with expected names are found

Returns:

('y', 'x') | ('latitude', 'longitude') | ('lat', 'lon')