Boost logo

Geometry :

Subject: Re: [geometry] [equals] equals(Linestring, Linestring) behavior changed
From: Barend Gehrels (barend_at_[hidden])
Date: 2014-05-06 16:29:09


Hi Adam,

Adam Wulkiewicz wrote On 6-5-2014 19:20:
> 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.

I agree with this. Great that it is using relate() now.

Thanks a lot. Regards, Barend


Geometry list run by mateusz at loskot.net