Return true if every point of inner polygon is contained within outer polygon, false otherwise
From https://github.com/substack/point-in-polygon ray-casting algorithm based on http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
o1 -------- o2 | i1 -- i2 | | | | | | i0 -- i3 | o0 -------- o3const outer = [[0, 0], [0, 3], [3, 3], [3, 0], [0, 0]];const inner = [[1, 1], [1, 2], [2, 2], [2, 1], [1, 1]];geomPolygonContainsPolygon(outer, inner); // returns true Copy
o1 -------- o2 | i1 -- i2 | | | | | | i0 -- i3 | o0 -------- o3const outer = [[0, 0], [0, 3], [3, 3], [3, 0], [0, 0]];const inner = [[1, 1], [1, 2], [2, 2], [2, 1], [1, 1]];geomPolygonContainsPolygon(outer, inner); // returns true
Return true if every point of inner polygon is contained within outer polygon, false otherwise