May 2017
Beginner to intermediate
328 pages
7h 17m
English
There are two functions designed for creating Multi-geometries:
SELECT ST_AsText(ST_Multi(ST_MakePoint(391390,5817855))) MULTIPOINT((391390,5817855))
This is useful in situations where the database design enforces a uniform geometry type across the whole table, and single geometries cannot be stored alongside Multi-geometries.
To create a multi-part Multi-geometry, another function called ST_Collect must be used.
The simplest use case is to merge two single geometries into a single Multi-geometry. For that, ST_Collect can accept two arguments of the geometry type:
SELECT ST_Collect(ST_MakePoint(20,50),ST_MakePoint(19.95,49.98)); ...Read now
Unlock full access