@turf/mask
Advanced tools
Comparing version 6.5.0 to 7.0.0-alpha.0
@@ -1,7 +0,2 @@ | ||
import { | ||
Feature, | ||
Polygon, | ||
MultiPolygon, | ||
FeatureCollection, | ||
} from "@turf/helpers"; | ||
import { Feature, Polygon, MultiPolygon, FeatureCollection } from "geojson"; | ||
@@ -8,0 +3,0 @@ /** |
{ | ||
"name": "@turf/mask", | ||
"version": "6.5.0", | ||
"version": "7.0.0-alpha.0", | ||
"description": "turf mask module", | ||
@@ -45,3 +45,3 @@ "author": "Turf Authors", | ||
"test:tape": "node -r esm test.js", | ||
"test:types": "tsc --esModuleInterop --noEmit types.ts" | ||
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" | ||
}, | ||
@@ -58,6 +58,6 @@ "devDependencies": { | ||
"dependencies": { | ||
"@turf/helpers": "^6.5.0", | ||
"@turf/helpers": "^7.0.0-alpha.0", | ||
"polygon-clipping": "^0.15.3" | ||
}, | ||
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e" | ||
"gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189" | ||
} |
@@ -9,29 +9,12 @@ # @turf/mask | ||
**Parameters** | ||
### Parameters | ||
- `polygon` **([FeatureCollection][2] \| [Feature][3]<([Polygon][4] \| [MultiPolygon][5])>)** GeoJSON Polygon used as interior rings or holes. | ||
- `mask` **[Feature][3]<[Polygon][4]>?** GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used) | ||
* `polygon` **([FeatureCollection][2] | [Feature][3]<([Polygon][4] | [MultiPolygon][5])>)** GeoJSON Polygon used as interior rings or holes. | ||
* `mask` **[Feature][3]<[Polygon][4]>?** GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used) | ||
**Examples** | ||
### Examples | ||
```javascript | ||
var polygon = turf.polygon([ | ||
[ | ||
[112, -21], | ||
[116, -36], | ||
[146, -39], | ||
[153, -24], | ||
[133, -10], | ||
[112, -21], | ||
], | ||
]); | ||
var mask = turf.polygon([ | ||
[ | ||
[90, -55], | ||
[170, -55], | ||
[170, 10], | ||
[90, 10], | ||
[90, -55], | ||
], | ||
]); | ||
var polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]); | ||
var mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]); | ||
@@ -41,11 +24,15 @@ var masked = turf.mask(polygon, mask); | ||
//addToMap | ||
var addToMap = [masked]; | ||
var addToMap = [masked] | ||
``` | ||
Returns **[Feature][3]<[Polygon][4]>** Masked Polygon (exterior ring with holes). | ||
Returns **[Feature][3]<[Polygon][4]>** Masked Polygon (exterior ring with holes). | ||
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.6 | ||
[2]: https://tools.ietf.org/html/rfc7946#section-3.3 | ||
[3]: https://tools.ietf.org/html/rfc7946#section-3.2 | ||
[4]: https://tools.ietf.org/html/rfc7946#section-3.1.6 | ||
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.7 | ||
@@ -52,0 +39,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
9618
154
1
62
+ Added@turf/helpers@7.2.0(transitive)
+ Added@types/geojson@7946.0.15(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@turf/helpers@6.5.0(transitive)
Updated@turf/helpers@^7.0.0-alpha.0