Skip to content

Commit

Permalink
rename import
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiedentop committed Feb 12, 2024
1 parent 8b87405 commit 4e5cbc2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/booleans/boolean_contains.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:turf/turf.dart';

import 'boolean_point_in_polygon.dart';
import 'boolean_point_on_line.dart';
import 'boolean_within_helper.dart';
import 'boolean_helper.dart';

/// [booleanContains] returns [true] if the second geometry is completely contained
/// by the first geometry.
Expand Down
29 changes: 29 additions & 0 deletions lib/src/booleans/discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

```
// booleanWithin(Multipoint, LineString) -> at least one point not at start or end.
// booleanWithin(Point, LineString) -> ignore Vertices.
// booleanWithin(Point, Polygon) -> ignore Vertices.
// booleanWithin(MultiPoint, LineString) -> at least one inner point.
// booleanWithin(MultiPoint, Polygon) -> at least one inner point.
// booleanWithin(LineString, LineString) -> no check if there is a inner point.
// booleanWithin(LineString, Polygon) -> at least one point of the line or one
// point between two point of the line is not on the boundary.
// booleanWithin(Polygon, Polygon) -> no check if there is a inner point.
// booleanWithin(LineString, Polygon): TurfJs seems to have an bug. When the last
// point of the line is outside of the polygon, the function returns true.
// turf-boolean-within -> isLineInPoly
```



https://geojson.io/#map=4.84/4.83/2.16


## Polygon is within polygon
file: examples/booleans/within/true/Polygon/Polygon/skip-PolygonIsWIthinPolygon.geojson

This test fails, because the bounding box of the first polygon is not complete within the second polygon. Both polygons share one point.
I'm not sure, if this is the expected behavior. Other within functions allow it if one geometry is on the border of another geometry, if

0 comments on commit 4e5cbc2

Please sign in to comment.