salem.check_crs

salem.check_crs(crs, raise_on_error=False)[source]

Checks if the crs represents a valid grid, projection or ESPG string.

Returns:
A valid crs if possible, otherwise None

Examples

>>> p = check_crs('epsg:26915 +units=m')
>>> p.srs
'epsg:26915 +units=m'
>>> p = check_crs('wrong')
>>> p is None
True