Skip to main content
Set the Coordinate Reference System (CRS) of a GeoSeries. Pass None to remove CRS from the GeoSeries.

Signature

Parameters

Union[Any, None]
default:"None"
The value can be anything accepted by pyproj.CRS.from_user_input() <pyproj.crs.CRS.from_user_input>, such as an authority string (eg “EPSG:4326”) or a WKT string.
Union[int, None]
default:"None"
EPSG code specifying the projection.
bool
default:"False"
If True, the CRS of the GeoSeries will be changed in place (while still returning the result) instead of making a copy of the GeoSeries.
bool
default:"False"
If the GeoSeries already has a CRS, allow to replace the existing CRS, even when both are not equal. Validation uses column metadata when available. Without it, validation performs a distributed lookup of the first non-null geometry’s SRID.

Returns

GeoSeries
The underlying geometries are not transformed to this CRS. To transform the geometries to a new CRS, use the to_crs method.
See also
  • GeoSeries.to_crs: re-project to another CRS

Examples

Setting CRS to a GeoSeries without one:
Overriding existing CRS:
Without allow_override=True, set_crs returns an error if you try to override CRS.