Point on surface
A representative point guaranteed to lie on (or inside) a polygon, often used for labeling.
Category: Geometry · Also known as: interior point, label point, ST_PointOnSurface
Definition (expanded)
A centroid can land outside concave polygons or polygons with holes. A point-on-surface (sometimes called an interior point) is computed to guarantee it lies on the polygon surface/area, making it better for labels and markers.
Examples
PostGIS point on surface
SQL
SELECT ST_AsText(ST_PointOnSurface(geom)) FROM my_polygons;
Common mistakes
- Using centroid for labeling and being surprised when the label appears outside the polygon.
Related terms
CentroidA representative center point of a polygon, often used for labeling or quick location.PolygonA closed area geometry defined by an exterior ring and optional interior rings (holes).Hole (Interior Ring)An interior ring inside a polygon that subtracts area (a cut-out).PointA single coordinate location, represented as one (x, y) pair.