GIS functions return "GEOMETRYCOLLECTION()" instead of "GEOMETRYCOLLECTION EMPTY"

Bug #848926 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Undecided
Alexey Botchkov

Bug Description

MariaDB [test]> select astext(ST_INTERSECTION( MULTILINESTRINGFROMTEXT(' MULTILINESTRING( (3 5, 2 4, 2 5, 3 5) ) ') , LINESTRINGFROMTEXT(' LINESTRING( 5 5 , 9 3 , 5 5 , 6 1 ) ') ))\G
*************************** 1. row ***************************
astext(ST_INTERSECTION( MULTILINESTRINGFROMTEXT(' MULTILINESTRING( (3 5, 2 4, 2 5, 3 5) ) ') , LINESTRINGFROMTEXT(' LINESTRING( 5 5 , 9 3 , 5 5 , 6 1 ) ') )): GEOMETRYCOLLECTION()
1 row in set (0.00 sec)

GEOMETRYCOLLECTION() is not recognized by PostGIS as a valid value. PostGIS returns "GEOMETRYCOLLECTION EMPTY".

Also, trying to use GEOMETRYCOLLECTION() in a calculation results in a totally bogus result:

MariaDB [test]> SELECT ASTEXT(ENVELOPE(GEOMETRYFROMTEXT('GEOMETRYCOLLECTION()')))\G
*************************** 1. row ***************************
ASTEXT(ENVELOPE(GEOMETRYFROMTEXT('GEOMETRYCOLLECTION()'))): POLYGON((1.79769313486232e+308 1.79769313486232e+308,-1.79769313486232e+308 1.79769313486232e+308,-1.79769313486232e+308 -1.79769313486232e+308,1.79769313486232e+308 -1.79769313486232e+308,1.79769313486232e+308 1.79769313486232e+308))

Changed in maria:
assignee: nobody → Alexey Botchkov (holyfoot)
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

Same applies for other functions, e.g.

select ASTEXT(ST_DIFFERENCE( MULTIPOLYGONFROMTEXT(' MULTIPOLYGON( ( (3 5, 2 5, 2 4, 3 4, 3 5) ) ) ') , POLYGONFROMTEXT(' POLYGON( (3 5, 2 5, 2 4, 3 4, 3 5) ) ') )) ;

summary: - ST_INTERSECTION returns "GEOMETRYCOLLECTION()" instead of
+ GIS functions return "GEOMETRYCOLLECTION()" instead of
"GEOMETRYCOLLECTION EMPTY"
Changed in maria:
status: New → Fix Committed
Changed in maria:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.