Observed since 20 Oct, 19:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
test if a polygon completely contains another polygon
test if a polygon completely contains another polygon
this can useful when computing whether or not a polygon is a hole or island.
This library is not highly optimized, but should suit your needs for the general case. Hit me up if it's not fast enough and I'll see what we can do.
npm install 2d-plolygon-contains-polygon
var a = [
[0, 0],
[100, 0],
[100, 100],
[0, 100]
];
var b = [
[20, 20],
[80, 20],
[80, 80],
[20, 80]
];
console.log(contains(a, b));
// output: true
contains(container, contained)
container and container are polygons represented by a 2d array (i.e. [[x, y], [x, y], ])
returns true if contained is contained in container, and false otherwise.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0Registry latest | 24 Apr 2015 | 4 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 19:10 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ecd2bab8212df7ddb18132e93e78ae395a5b5707f5e4927ee5f1f4fbd282eb1b