This topic describes the ST_IsSimple function. This function returns true if the input geometry object has no self-intersection points.

Syntax

boolean  ST_IsSimple(geometry  geomA);

Parameters

Parameter Description
geomA The geometry object that you want to specify.

Description

This function supports 3D objects and does not delete z coordinates.

Examples

  • If you execute the following statement, the function returns true:
    SELECT ST_IsSimple('LINESTRING(0 0,0 2,2 0,0 0)'::geometry);
     st_issimple
    -------------
     t
    (1 row)
                        
  • If you execute the following statement, the function returns false:
    SELECT ST_IsSimple('LINESTRING(0 0,0 2,0 0)'::geometry);
     st_issimple
    -------------
     f
    (1 row)