> ## 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.

# GeoDataFrame.to_crs

> Transform geometries to a new coordinate reference system.

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 GeoSeries must
be set.  Either `crs` or `epsg` may be specified for output.

This method will transform all points in all objects. It has no notion
of projecting entire geometries.  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.

## Signature

```python theme={"system"}
to_crs(
    crs: Any | None = None,
    epsg: int | None = None,
    inplace: bool = False,
) -> GeoDataFrame | None
```

## Parameters

<ParamField path="crs" type="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="int | None" default="None">
  EPSG code specifying output projection.
</ParamField>

<ParamField path="inplace" type="bool" default="False">
  Whether to return a new GeoDataFrame or do the transformation in
  place.
</ParamField>

## Returns

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

**See also**

* `GeoDataFrame.set_crs`: assign CRS without re-projection

## Examples

```python theme={"system"}
>>> from shapely.geometry import Point
>>> from sedona.spark.geopandas import GeoDataFrame
>>> d = {'col1': ['name1', 'name2'], 'geometry': [Point(1, 2), Point(2, 1)]}
>>> gdf = GeoDataFrame(d, crs=4326)
>>> gdf
    col1     geometry
0  name1  POINT (1 2)
1  name2  POINT (2 1)
>>> gdf.crs
<Geographic 2D CRS: EPSG:4326>
Name: WGS 84
Axis Info [ellipsoidal]:
- Lat[north]: Geodetic latitude (degree)
- Lon[east]: Geodetic longitude (degree)
Area of Use:
- name: World
- bounds: (-180.0, -90.0, 180.0, 90.0)
Datum: World Geodetic System 1984
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich
```

```python theme={"system"}
>>> gdf = gdf.to_crs(3857)
>>> gdf
    col1                       geometry
0  name1  POINT (111319.491 222684.209)
1  name2  POINT (222638.982 111325.143)
>>> gdf.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
```


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