[geos-devel] Fwd: Geometry/Rectangle Intersection: line touching rectangle

Sandro Santilli strk at keybit.net
Thu Sep 11 08:57:52 PDT 2014


[re-adding geos-devel in the recipient lits]

On Thu, Sep 11, 2014 at 08:50:17AM -0700, Martin Davis wrote:
> Yup, that's correct output for JTS, as per it's spec (not the OGC spec -
> they didn't actually specify any semantics, so I made them up  8^)

Indeed OGC only talks about what "intersects" mean, but I guess for extension
returning something that contains all shared points from interior-or-boundary
of either operands is the closest thing to do.

> The rationale is as before - provide everything back, and it can be
> filtered post-op if required.  That said, JTS really needs an easy way to
> retain just the polygons- or even better retain just the highest dimension
> output geometries.
>
> Not sure how this could be handled by the RectangleIntersection.   I'm sure
> it could be done, but might be complicated.

Did you take a look at the algorithm ?
It sounds like by the end of operations the class is left with a bunch
of lines to work with, not much to build a result w/out going back
to look at which sides of those lines are internal or external of the
originals.

> I'd be tempted to just provide the RI as a separate class...

Yeah, it is already a separate class, I might just give up making it
transparently used by Geometry::intersection().

--strk;


More information about the geos-devel mailing list