All Products
Search
Document Center

PolarDB:ST_IsSimple

Last Updated:Mar 28, 2026

ST_IsSimple checks whether a geometry has no points of self-intersection and returns a Boolean result.

Syntax

boolean ST_IsSimple(geometry geomA);

Parameters

ParameterDescription
geomAThe geometry to check.

Usage notes

  • Returns true if the geometry is simple; returns false otherwise.

  • Supports 3D geometry and preserves z coordinates.

Examples

The following examples use a LINESTRING geometry to demonstrate when ST_IsSimple returns true and false.

Returns true — no self-intersection:

SELECT ST_IsSimple('LINESTRING(0 0,0 2,2 0,0 0)'::geometry);

Output:

 st_issimple
-------------
 t
(1 row)

Returns false — geometry has a self-intersection:

SELECT ST_IsSimple('LINESTRING(0 0,0 2,0 0)'::geometry);

Output:

 st_issimple
-------------
 f
(1 row)