RE: ST_Union behaviour

"Regina Obe" <[email protected]>
Newsgroups gmane.comp.gis.postgis
Message-ID <[email protected]>
Are you unioning one geometry or many?

 

The only reason I can think of why ST_Union would return unchanged overlapping polygons is if you fed it a geometry collection or invalid multipolygon with overlapping polygons.

 

In these cases you should be using ST_UnaryUnion  https://postgis.net/docs/ST_UnaryUnion.html

 

 

 

From: Antonio Valanzano <[email protected]> 
Sent: Monday, December 23, 2024 3:47 AM
To: [email protected]
Subject: ST_Union behaviour

 

Does someone know why ST_Union behaves differently with linestrings and polygons?

 

If a table contains linestrings that overlap at some points then ST_Union creates a collection of linestrings  that are splitted at intersections.

 

If a table contains polygons with overlaps then ST_Union creates a collection of polygons that are still overlapped and are not splitted (the result contains only the original polygons).

 

Thanks in advance.

 

Antonio
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.