@turf/boolean-within
Advanced tools
Comparing version 6.5.0 to 7.0.0-alpha.0
@@ -116,3 +116,3 @@ import calcBbox from "@turf/bbox"; | ||
for (var i = 0; i < multiPoint.coordinates.length; i++) { | ||
isInside = booleanPointInPolygon(multiPoint.coordinates[1], polygon); | ||
isInside = booleanPointInPolygon(multiPoint.coordinates[i], polygon); | ||
if (!isInside) { | ||
@@ -123,3 +123,3 @@ output = false; | ||
if (!oneInside) { | ||
isInside = booleanPointInPolygon(multiPoint.coordinates[1], polygon, { | ||
isInside = booleanPointInPolygon(multiPoint.coordinates[i], polygon, { | ||
ignoreBoundary: true, | ||
@@ -126,0 +126,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import { Feature, Geometry } from "@turf/helpers"; | ||
import { Feature, Geometry } from "geojson"; | ||
/** | ||
@@ -3,0 +3,0 @@ * Boolean-within returns true if the first geometry is completely within the second geometry. |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var bbox_1 = __importDefault(require("@turf/bbox")); | ||
var boolean_point_on_line_1 = __importDefault(require("@turf/boolean-point-on-line")); | ||
var boolean_point_in_polygon_1 = __importDefault(require("@turf/boolean-point-in-polygon")); | ||
var invariant_1 = require("@turf/invariant"); | ||
const tslib_1 = require("tslib"); | ||
const bbox_1 = tslib_1.__importDefault(require("@turf/bbox")); | ||
const boolean_point_on_line_1 = tslib_1.__importDefault(require("@turf/boolean-point-on-line")); | ||
const boolean_point_in_polygon_1 = tslib_1.__importDefault(require("@turf/boolean-point-in-polygon")); | ||
const invariant_1 = require("@turf/invariant"); | ||
/** | ||
@@ -121,3 +119,3 @@ * Boolean-within returns true if the first geometry is completely within the second geometry. | ||
for (var i = 0; i < multiPoint.coordinates.length; i++) { | ||
isInside = boolean_point_in_polygon_1.default(multiPoint.coordinates[1], polygon); | ||
isInside = boolean_point_in_polygon_1.default(multiPoint.coordinates[i], polygon); | ||
if (!isInside) { | ||
@@ -128,3 +126,3 @@ output = false; | ||
if (!oneInside) { | ||
isInside = boolean_point_in_polygon_1.default(multiPoint.coordinates[1], polygon, { | ||
isInside = boolean_point_in_polygon_1.default(multiPoint.coordinates[i], polygon, { | ||
ignoreBoundary: true, | ||
@@ -131,0 +129,0 @@ }); |
{ | ||
"name": "@turf/boolean-within", | ||
"version": "6.5.0", | ||
"version": "7.0.0-alpha.0", | ||
"description": "turf boolean-within module", | ||
@@ -52,3 +52,3 @@ "author": "Turf Authors", | ||
"test:tape": "ts-node -r esm test.js", | ||
"test:types": "tsc --esModuleInterop --noEmit types.ts" | ||
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts" | ||
}, | ||
@@ -69,9 +69,10 @@ "devDependencies": { | ||
"dependencies": { | ||
"@turf/bbox": "^6.5.0", | ||
"@turf/boolean-point-in-polygon": "^6.5.0", | ||
"@turf/boolean-point-on-line": "^6.5.0", | ||
"@turf/helpers": "^6.5.0", | ||
"@turf/invariant": "^6.5.0" | ||
"@turf/bbox": "^7.0.0-alpha.0", | ||
"@turf/boolean-point-in-polygon": "^7.0.0-alpha.0", | ||
"@turf/boolean-point-on-line": "^7.0.0-alpha.0", | ||
"@turf/helpers": "^7.0.0-alpha.0", | ||
"@turf/invariant": "^7.0.0-alpha.0", | ||
"tslib": "^2.3.0" | ||
}, | ||
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e" | ||
"gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189" | ||
} |
@@ -12,8 +12,8 @@ # @turf/boolean-within | ||
**Parameters** | ||
### Parameters | ||
- `feature1` **([Geometry][1] \| [Feature][2]<any>)** GeoJSON Feature or Geometry | ||
- `feature2` **([Geometry][1] \| [Feature][2]<any>)** GeoJSON Feature or Geometry | ||
* `feature1` **([Geometry][1] | [Feature][2]\<any>)** GeoJSON Feature or Geometry | ||
* `feature2` **([Geometry][1] | [Feature][2]\<any>)** GeoJSON Feature or Geometry | ||
**Examples** | ||
### Examples | ||
@@ -20,0 +20,0 @@ ```javascript |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
20778
6
453
1
+ Addedtslib@^2.3.0
+ Added@turf/bbox@7.2.0(transitive)
+ Added@turf/boolean-point-in-polygon@7.2.0(transitive)
+ Added@turf/boolean-point-on-line@7.2.0(transitive)
+ Added@turf/helpers@7.2.0(transitive)
+ Added@turf/invariant@7.2.0(transitive)
+ Added@turf/meta@7.2.0(transitive)
+ Added@types/geojson@7946.0.16(transitive)
+ Addedpoint-in-polygon-hao@1.2.4(transitive)
+ Addedrobust-predicates@3.0.2(transitive)
+ Addedtslib@2.8.1(transitive)
- Removed@turf/bbox@6.5.0(transitive)
- Removed@turf/boolean-point-in-polygon@6.5.0(transitive)
- Removed@turf/boolean-point-on-line@6.5.0(transitive)
- Removed@turf/helpers@6.5.0(transitive)
- Removed@turf/invariant@6.5.0(transitive)
- Removed@turf/meta@6.5.0(transitive)
Updated@turf/bbox@^7.0.0-alpha.0
Updated@turf/helpers@^7.0.0-alpha.0