JS Turf, Check if Line is completely within polygon

1k Views Asked by At

I have a single Turf Polygon and a Turf LineString. I need to check wether the line is completely within the polygon. the outer-Points of the line are allowed to be on the polygon border.

I've tried:

turf.difference(poly, line) === null

turf.booleanEquals(turf.intersect(poly, line), line)

turf.booleanContains(poly, line);

but nothing worked as intended.

0

There are 0 best solutions below