Opened 8 years ago

Closed 8 years ago

#3433 closed defect (fixed)

ST_ClusterIntersecting gives incorrect results for MultiPoints

Reported by: dbaston Owned by: pramsey
Priority: high Milestone: PostGIS 2.2.2
Component: postgis Version: 2.2.x
Keywords: Cc:

Description

The following query

SELECT ST_AsText(unnest(ST_ClusterIntersecting(geom)))
FROM (SELECT unnest(ARRAY['POINT (0 0)', 'MULTIPOINT (0 0, 1 1)']) AS geom) sq;

returns

GEOMETRYCOLLECTION(POINT(0 0))
GEOMETRYCOLLECTION(MULTIPOINT(0 0,1 1))

ST_ClusterWithin seems to be unaffected.

Change History (3)

comment:1 by dbaston, 8 years ago

Possibly related to https://trac.osgeo.org/geos/ticket/694 ?

The following cunit test fails:

GEOSGeometry* p = GEOSGeomFromWKT("POINT (0 0)");
GEOSGeometry* mp = GEOSGeomFromWKT("MULTIPOINT (0 0, 1 1)");

const GEOSPreparedGeometry* mp_p = GEOSPrepare(mp);
CU_ASSERT(GEOSPreparedIntersects(mp_p, p));

comment:3 by dbaston, 8 years ago

Resolution: fixed
Status: newclosed

Applied fix to trunk at r14611 and 2.2 at r14612, avoiding the construction of a PreparedGeometry for a Point or MultiPoint input.

Note: See TracTickets for help on using tickets.