Bug #78206 | ST_UNION() RETURNS AN INVALID GEOMETRYCOLLECTION | ||
---|---|---|---|
Submitted: | 25 Aug 2015 11:05 | Modified: | 30 Sep 2015 17:40 |
Reporter: | Menelaos Karavelas | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: GIS | Severity: | S3 (Non-critical) |
Version: | 5.7.9 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | st_union |
[25 Aug 2015 11:05]
Menelaos Karavelas
[25 Aug 2015 12:28]
Menelaos Karavelas
Posted by developer: The test case reported in this bug report was initially reported as part of BUG#21658405 (as an additional failing test case). Since the root case of the test case in this bug is different from the other/main test case in BUG#21658405, we have this new bug report.
[31 Aug 2015 7:26]
Norvald Ryeng
Posted by developer: A simpler version of the original test case: SELECT ST_ASTEXT( ST_UNION( ST_GEOMFROMTEXT(' LINESTRING(-9 -17,17 -11) '), ST_GEOMFROMTEXT(' GEOMETRYCOLLECTION( LINESTRING(8 16,-8 -3), POLYGON((2 3,-9 -7,12 -13,2 3)), MULTILINESTRING((-2 2,11 -10),(6 0,-15 0,16 0)) ) ') ) ) AS res; SELECT ST_ISVALID( ST_UNION( ST_GEOMFROMTEXT(' LINESTRING(-9 -17,17 -11) '), ST_GEOMFROMTEXT(' GEOMETRYCOLLECTION( LINESTRING(8 16,-8 -3), POLYGON((2 3,-9 -7,12 -13,2 3)), MULTILINESTRING((-2 2,11 -10),(6 0,-15 0,16 0)) ) ') ) ) AS valid; Note that the two queries are the same, the difference is just ST_AsText vs. ST_IsValid. The invalid linestring in the output, (-1.2999999999999998 0,-1.2999999999999998 0), is the leftmost point where the polygon intersects the line along the x axis.
[30 Sep 2015 17:40]
Paul DuBois
Noted in 5.7.9, 5.8.0 changelogs. For some inputs, ST_Union() could return an invalid geometry collection.