salem.check_crs

salem.check_crs(crs)

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

Returns:A valid crs if possible, otherwise None

Examples

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