Ticket #756 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

ST_Equals(MULTILINE, LINE) fails

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: trunk
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

Changed 4 years ago by pramsey

By the same token are

LINESTRING(0 0, 1 1)

and

MULTILINESTRING(0 0, 1 1),EMPTY)

equal?

Changed 4 years ago by strk

I think they should be equal as well, yes.

Changed 4 years ago by robe

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

Changed 4 years ago by robe

  • milestone changed from PostGIS 1.5.3 to PostGIS 2.0.0

Changed 3 years ago by strk

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

Changed 3 years ago by strk

  • owner changed from pramsey to strk
  • status changed from new to assigned

I'm on it.

Changed 3 years ago by strk

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

Changed 3 years ago by strk

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

Changed 3 years ago by strk

  • status changed from assigned to closed
  • version changed from 1.5.X to trunk
  • resolution set to fixed

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

Changed 3 years ago by strk

Oops, revision is actually r8480 -- sorry for the confusion

Note: See TracTickets for help on using tickets.