xugrid.Ugrid1d.to_crs#
- Ugrid1d.to_crs(crs: pyproj.CRS | str = None, epsg: int = None)#
Transform geometries to a new coordinate reference system. Transform all geometries in an active geometry column to a different coordinate reference system. The
crs
attribute on the current Ugrid must be set. Eithercrs
orepsg
may be specified for output.This method will transform all points in all objects. It has no notion of projecting the cells. All segments joining points are assumed to be lines in the current projection, not geodesics. Objects crossing the dateline (or other projection boundary) will have undesirable behavior.
- 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 output projection.