Skip to content
🌵SedonaDB (Rust) 0.3.0 is out now, featuring larger-than-memory spatial joins, and row-level CRS!

ST_PointOnSurface

Introduction: Returns a POINT guaranteed to lie on the surface.

ST_PointOnSurface

Format: ST_PointOnSurface(A: Geometry)

Return type: Geometry

Since: v1.2.1

Examples:

SELECT ST_PointOnSurface(df.geometry)
FROM df
  1. Input: POINT (0 5)

Output: POINT (0 5)

  1. Input: LINESTRING(0 5, 0 10)

Output: POINT (0 5)

  1. Input: POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))

Output: POINT (2.5 2.5)

  1. Input: LINESTRING(0 5 1, 0 0 1, 0 10 2)

Output: POINT Z(0 0 1)