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

> Get coordinates as a distributed pandas-on-Spark DataFrame.

Get coordinates as a distributed pandas-on-Spark `DataFrame`.

The returned frame has `x` and `y` columns. With
`include_z=True` or `include_m=True`, it also has `z` or `m`
columns, respectively. Missing optional ordinates are represented by
`NaN`.

## Signature

```python theme={"system"}
get_coordinates(
    include_z=False,
    ignore_index=False,
    index_parts=False,
    *,
    include_m=False,
) -> pspd.DataFrame
```

## Parameters

<ParamField path="include_z" type="bool" default="False">
  Include Z coordinates.
</ParamField>

<ParamField path="ignore_index" type="bool" default="False">
  If True, label the result with a new zero-based sequential index,
  ignoring `index_parts`.
</ParamField>

<ParamField path="index_parts" type="bool" default="False">
  If True, append a zero-based coordinate-position level to the
  original index.
</ParamField>

<ParamField path="include_m" type="bool" default="False">
  Include M coordinates.
</ParamField>

## Returns

<ResponseField name="return" type="pyspark.pandas.DataFrame" />

## Examples

```python theme={"system"}
>>> from sedona.spark.geopandas import GeoSeries
>>> from shapely.geometry import Point, LineString, Polygon
>>> s = GeoSeries(
...     [
...         Point(1, 1),
...         LineString([(1, -1), (1, 0)]),
...         Polygon([(3, -1), (4, 0), (3, 1)]),
...     ]
... )
>>> s.get_coordinates()
     x    y
0  1.0  1.0
1  1.0 -1.0
1  1.0  0.0
2  3.0 -1.0
2  4.0  0.0
2  3.0  1.0
2  3.0 -1.0
```

```python theme={"system"}
>>> s.get_coordinates(index_parts=True)
       x    y
0 0  1.0  1.0
1 0  1.0 -1.0
  1  1.0  0.0
2 0  3.0 -1.0
  1  4.0  0.0
  2  3.0  1.0
  3  3.0 -1.0
```


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