I'd like to know, how to rewrite this example from go.geo readme to use orb library:
path := geo.NewPath()
path.Push(geo.NewPoint(0, 0))
path.Push(geo.NewPoint(1, 1))
line := geo.NewLine(geo.NewPoint(0, 1), geo.NewPoint(1, 0))
// intersects does a simpler check for yes/no
if path.Intersects(line) {
// intersection will return the actual points and places on intersection
points, segments := path.Intersection(line)
for i, _ := range points {
log.Printf("Intersection %d at %v with path segment %d", i, points[i], segments[i][0])
}
}
In my case I assume path points as polygon coordinates.
Thanks!
Hi!
I'd like to know, how to rewrite this example from go.geo readme to use orb library:
In my case I assume path points as polygon coordinates. Thanks!