Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union Operations returns collections containing empty elements #7

Open
nbvfgh opened this issue Jan 9, 2025 · 1 comment
Open

Union Operations returns collections containing empty elements #7

nbvfgh opened this issue Jan 9, 2025 · 1 comment
Labels
bug Something isn't working confirmed jts libgeos

Comments

@nbvfgh
Copy link
Owner

nbvfgh commented Jan 9, 2025

DROP TABLE t1;
DROP TABLE t2;
CREATE TABLE t1(geom geometry);
CREATE TABLE t2(geom geometry);

INSERT INTO t1 VALUES('GEOMETRYCOLLECTION(POLYGON EMPTY, POINT EMPTY, LINESTRING(10 10, 10 10))'::geometry);
INSERT INTO t2 VALUES('POINT(1 1)'::geometry);

-- Union
SELECT ST_AsText(ST_Union(t1.geom, t2.geom)) FROM t1, t2;
-- result{GEOMETRYCOLLECTION(POLYGON EMPTY,POINT EMPTY,LINESTRING(0 0,0 0),POINT(1 1))}

-- Unary Union
SELECT ST_AsText(ST_UnaryUnion(ST_Collect(ARRAY[t1.geom, t2.geom]))) FROM t1, t2;
-- result:{GEOMETRYCOLLECTION(POINT(1 1),LINESTRING EMPTY)}

bug is that "the overlay operations should not return collections containing empty elements".

@nbvfgh nbvfgh added bug Something isn't working confirmed libgeos jts labels Jan 9, 2025
@nbvfgh
Copy link
Owner Author

nbvfgh commented Jan 9, 2025

bug tracker: libgeos/geos#1224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed jts libgeos
Projects
None yet
Development

No branches or pull requests

1 participant