Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#756 closed defect (fixed)

ST_Equals(MULTILINE, LINE) fails

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description

Are a line and a collection containing that exactly same line "equal" ? I'd say YES, but PostGIS says NO.

Change History (10)

comment:1 by pramsey, 13 years ago

By the same token are

LINESTRING(0 0, 1 1)

and

MULTILINESTRING(0 0, 1 1),EMPTY)

equal?

comment:2 by strk, 13 years ago

I think they should be equal as well, yes.

comment:3 by robe, 13 years ago

I agree — the DEM-9 only cares about occupying the same well defined space and they do therefore they are equal.

comment:4 by robe, 13 years ago

Milestone: PostGIS 1.5.3PostGIS 2.0.0

comment:5 by strk, 13 years ago

This bug just stroke again… st_equals(A,B) was returning false while st_symdifference(A,B) was returning empty. Wonder ? Well.. st_equals(st_multi(A), ST_multi(B)) returned true…

We should really fix this before it hurts

comment:6 by strk, 12 years ago

Owner: changed from pramsey to strk
Status: newassigned

I'm on it.

comment:7 by strk, 12 years ago

Paul: do you have a supported way to create your MULTILINESTRING ? I can't, with WKT.

comment:8 by strk, 12 years ago

I could: st_collect('LINESTRING(0 0, 1 1)'::geometry, 'LINESTRING EMPTY'::geometry);

comment:9 by strk, 12 years ago

Resolution: fixed
Status: assignedclosed
Version: 1.5.Xtrunk

Fixed and regress tested in r8479 for trunk. 1.5 branch isn't affected.

comment:10 by strk, 12 years ago

Oops, revision is actually r8480 — sorry for the confusion

Note: See TracTickets for help on using tickets.