> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GeoSeries.set_crs

> Set the Coordinate Reference System (CRS) of a GeoSeries.

Set the Coordinate Reference System (CRS) of a `GeoSeries`.

Pass `None` to remove CRS from the `GeoSeries`.

## Signature

```python theme={"system"}
set_crs(
    crs: Union[Any, None] = None,
    epsg: Union[int, None] = None,
    inplace: bool = False,
    allow_override: bool = False,
) -> GeoSeries
```

## Parameters

<ParamField path="crs" type="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.
</ParamField>

<ParamField path="epsg" type="Union[int, None]" default="None">
  EPSG code specifying the projection.
</ParamField>

<ParamField path="inplace" type="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.
</ParamField>

<ParamField path="allow_override" type="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.
</ParamField>

## Returns

<ResponseField name="return" type="GeoSeries" />

<Note>
  The underlying geometries are not transformed to this CRS. To
  transform the geometries to a new CRS, use the `to_crs` method.
</Note>

**See also**

* `GeoSeries.to_crs`: re-project to another CRS

## Examples

```python theme={"system"}
>>> from sedona.spark.geopandas import GeoSeries
>>> from shapely.geometry import Point
>>> s = GeoSeries([Point(1, 1), Point(2, 2), Point(3, 3)])
>>> s
0    POINT (1 1)
1    POINT (2 2)
2    POINT (3 3)
dtype: geometry
```

Setting CRS to a GeoSeries without one:

```python theme={"system"}
>>> s.crs is None
True
```

```python theme={"system"}
>>> s = s.set_crs('epsg:3857')
>>> s.crs
<Projected CRS: EPSG:3857>
Name: WGS 84 / Pseudo-Mercator
Axis Info [cartesian]:
- X[east]: Easting (metre)
- Y[north]: Northing (metre)
Area of Use:
- name: World - 85°S to 85°N
- bounds: (-180.0, -85.06, 180.0, 85.06)
Coordinate Operation:
- name: Popular Visualisation Pseudo-Mercator
- method: Popular Visualisation Pseudo Mercator
Datum: World Geodetic System 1984
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich
```

Overriding existing CRS:

```python theme={"system"}
>>> s = s.set_crs(4326, allow_override=True)
```

Without `allow_override=True`, `set_crs` returns an error if you try to
override CRS.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.