Boost logo

Geometry :

Subject: [geometry] [equals] equals(Linestring, Linestring) behavior changed
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-05-06 13:20:14


Hi,

The equal(Linestring, Linestring) is changed and
Linestring/MultiLinestring and MultiLinestring/MultiLinestring versions
are now available.

Previously used trivial-check- and collect_vectors- based approach
wasn't working correctly for non-simple (OGC conformant) Linear
geometries. So now, internally relate() is used for L/L versions of
geometries.
equals() should now return TRUE for geometries occupying the same space.

One remark.

OGC specs defines the DE9IM mask for equals() as: TFFFTFFFT
However in the Wikipedia we may find: T*F**FFF*.

Currently the second one is used (T*F**FFF*). Otherwise the function
would return FALSE for Linear Geometries Linestrings occupying the same
space but with non-corresponding boundaries. E.g. consider this pair of
Linestrings:

LINESTRING(0 0,5 0,5 5,0 5,0 0)
LINESTRING(5 5,0 5,0 0,5 0,5 5,0 5)

The first one is LinearRing (no boundary). The second one has 2-Point
boundary (and overlapping segments). They occupy the same space though.
So currently TRUE should be returned in this case. AFAIK this is
consistent with PostGIS.

Feel free to object.

Regards,
Adam


Geometry list run by mateusz at loskot.net