orb icon indicating copy to clipboard operation
orb copied to clipboard

Intersects

Open pigubaoza opened this issue 6 years ago • 4 comments

Hi, I've noticed that this library does not contain the Intersection and Intersects methods that were in your deprecated library geo. Are there plans for them to be implemented in this library as well?

pigubaoza avatar Dec 27 '18 02:12 pigubaoza

I wasn't really happy with the API in go.geo. What kind of API are you thinking of. It gets weird because two line strings can intersect into nothing, a point, a line string or a multi line string.

paulmach avatar Jan 06 '19 21:01 paulmach

Perhaps it could be like python's shapely library. Their intersect function returns a collection of geometric objects. https://shapely.readthedocs.io/en/stable/manual.html#collections

pigubaoza avatar Jan 07 '19 01:01 pigubaoza

Having just intersects (the predicate) would be useful (and is easier to implement than the constructive method). I haven't had any luck finding a pure Go implementation of geometry.Intersects(other) for all geometry types.

tschaub avatar Jan 16 '19 19:01 tschaub

Right now I am using Boundary intersection and if further filtering is needed I use https://github.com/JamesMilnerUK/pip-go

ghost avatar Feb 11 '19 10:02 ghost