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

# ST_IsValid (Python)

> Check if a geometry is well formed.

Check if a geometry is well formed.

SQL reference: [`ST_IsValid`](/reference/wherobots-db/geometry-data/validation/ST_IsValid)

## Signature

```python theme={"system"}
from sedona.spark.sql.st_functions import ST_IsValid

ST_IsValid(
    geometry: ColumnOrName,
    flag: Optional[Union[ColumnOrName, int]] = None,
) -> Column
```

## Parameters

<ParamField path="geometry" type="ColumnOrName" required>
  Geometry column to check in.
</ParamField>

<ParamField path="flag" type="Optional[Union[ColumnOrName, int]]" default="None">
  Optional flag to modify behavior of the validity check.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  True if geometry is well formed and False otherwise as a boolean column.
</ResponseField>


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