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.

Returns

None if no dimensions with expected names are found

Return type

Optional[Tuple[str, str]]

Returns

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