xugrid.UgridDatasetAccessor.set_crs#
- UgridDatasetAccessor.set_crs(crs: pyproj.CRS | str = None, epsg: int = None, allow_override: bool = False, topology: str = None)[source]#
Set the Coordinate Reference System (CRS) of a UGRID topology.
NOTE: The underlying geometries are not transformed to this CRS. To transform the geometries to a new CRS, use the
to_crs
method.- Parameters:
crs (pyproj.CRS, optional if epsg is specified) – The value can be anything accepted by
pyproj.CRS.from_user_input()
, such as an authority string (eg “EPSG:4326”) or a WKT string.epsg (int, optional if crs is specified) – EPSG code specifying the projection.
allow_override (bool, default False) – If the the UGRID topology already has a CRS, allow to replace the existing CRS, even when both are not equal.
topology (str, optional) – Name of the grid topology in which to set the CRS. Sets the CRS for all grids if left unspecified.