Skip to content

Commit 4c4c924

Browse files
lukas-hbaparhamtobrunarmantorkzabanArman Torkzaban
authored
Preparation for new release 0.0.8 (#149)
* initial null-safety implementation * attributes non-nullable + tests, fix meta tests * make altitude for Position and BBox nullable * update action deps, build runner * delete conflicting outputs, dart test on PR action * Strongly type and refactor geomEach meta function This commit also renames Geometry to GeometryObject * simplify geomEach * Add coverage reporting to pull requests tests * Allow PR coverage comment to fail This allows PRs from forks to still run the tests successfully * Refactor coverage reporting into its own job The coverage job is allowed to continue on error, letting the entire workflow 'pass' if we hit issues running or reporting coverage * Move coverage reporting into separate workflow * geomEach: nullable fields #36 * fix types in tests * Update to latest romeovs/lcov-reporter-action This should resolve an issue where the 'comment code coverage on PR' action fails after being merged into main. See romeovs/lcov-reporter-action#16 * raise version for release 0.0.3 * [meta] add implementation and test for featureEach and propEach (#24) * Assemble different types, refactor GeoJSON serialization, general improvements (#43) * #19, #20, #21, refactor * convert GeoJSONObjectType to enum, rename * rm overridden bboxes * Implement vector operations #23 * statically type 'round' helper func, fix unit test * gen coverage * fix typo * geojson unit tests, type fixes * fix deserialization with GeoJSONObjectType, implement hashCode * initial unit tests for new constructors * integration tests * fix path * test bbox on other geojson types * update enum tests * required params for new constructors, unit tests * license notices * bump version for release * Add basic benchmarking framework (#51) * Add pub version badge * [meta] add coordeach implementation (#50) * [meta] add coordeach implementation * [benchmark] add coordeach benchmark using test fixtures * Add implementation for getCoord & getCoords // invariant package (#53) * initial getCoord & getCoords implementation * WIP test coords/coord * test gitpod flutter config * ports invariants package (#62) * dart pub get added * wip, type problem * fixed return error of the test * Gitpod config * new test cases, changed comments * standardized the comments * wrapped List in brackets * some minor typo edit * added highlight in documentation * formatted conflicting files * deleted the gitpod files Co-authored-by: Arman Torkzaban <[email protected]> Co-authored-by: arman <[email protected]> Co-authored-by: arman <[email protected]> Co-authored-by: Arman Torkzaban <[email protected]> * Add flattenEach function and tests (#48) * Add flattenEach function and tests * Refactor flattenEach slightly * Refactor meta -- breaking of iterations tests * Explicitly do not support nested GeometryCollections * Update documentation links * Use more specific type checks in flattenEach test * rm duplicate fcMixed * remove geometryCollection clause * warning for nested GeometryCollection Co-authored-by: Lukas Himsel <[email protected]> * refactor coordEach with geomEach, change type in geomEach callback (#68) * [meta] add coordeach implementation * Rework coordEach implementation to match setup more from geomEach * cleanup * optimize for geometry collection * refactor coordEach with geomEach, change type in geomEach callback Co-authored-by: Tobrun Van Nuland <[email protected]> * Port coordAll function and test, also: refactor coordEach callback (#64) * beginning * wip coordAll * coordAll test, WIP * changes CoordEachCallback's signature * typecast removed, test corrected * changes before merging * refactor for Position in CoordEachCallback Co-authored-by: Lukas Himsel <[email protected]> * Update README.md * Feature reducers (#49) * Temporarily type geomEach callback to GeometryType * Add geomReduce function and tests * propReduce function * WIP - featureReduce() * WIP * added examples and documentations * flattenReduce WIP * WIP * coordReduce * documentation * add static types * merge readme * prepare new merge * generic types for all reducer functions * TurfJS compatible solution with type checks * add cloning * fixed types passed to callbacks, propReduce test * flattenReduce and featureReduce test * coordReduce * minor type conv. num to int Co-authored-by: Arman Torkzaban <[email protected]> Co-authored-by: Lukas Himsel <[email protected]> * Port cluster functions and tests (#69) * port functions * getCluster documentation * WIP documentation * Did the documentation * wrote tests * benchmarks - in process * moved benchmarks to separate file * exported clusters.dart Co-authored-by: armantorkzaban <[email protected]> * Port meta segment functions & lineSegment (#70) * initial commit to segment file * beginning * lineSegment() * lineSegment * refactor * lineSegment tests * polygon test * wip segmentEach * rewrite segmentEach witohut coordEach * fix flattenEachCallback * combine units * tests for segmentEach * segmentEach id check tests * segmentReduce impltd. * updated README * Documentation * benchmark init Co-authored-by: Arman Torkzaban <[email protected]> * split up meta into separate files (#72) * Meta functions extension methods (#73) * initial setup * fix export, add all *each functions * implement 'other' functions * implement *reduce functions * fix tests * rm geojson param for reducers * Update functions and packages in README.md (#67) * WIP - updating README.md * missing new functions & packages * helpers function aint needed anymore - constructor * Links added and unnecessary funtioncs deleted Co-authored-by: Lukas Himsel <[email protected]> * Raise version to 0.0.5 * Documentation (#75) * in process - early analysis of the work * linked the meta functions in readme * CONTRIBUTING.md * links to the sources * edited typos * documentation work * closes #77, closes #16 * proofread * improves pub.dev score, closes #79, #78, #75 * Added deleted model, complemented contributing.md Co-authored-by: Lukas Himsel <[email protected]> * raise to version 0.0.6 * Improve pub score & raise to version 0.0.6+2 (#82) * add examples, fix segment * callbacks * raise version to 0.0.6+2 * Improve pub score (rename example file, raise to 0.0.6+3) (#84) * add examples, fix segment * callbacks * raise version to 0.0.6+2 * Rename example file, raise to 0.0.6+3 * Implement `nearestPointOn(Multi)Line` and `internal` intersects helper (Attempt 2) (#87) * Implement `nearestPointOn(Multi)Line` (#86) Co-authored-by: Levente Morva <[email protected]> * localIndex and index * add documentation * Fix `globalIndex` behaviour Co-authored-by: Levente Morva <[email protected]> * fix test, according to new globalIndex behaviour * add intersection test Co-authored-by: Levente Morva <[email protected]> * Port explode function and test (#93) * initial version without tests * closes #93 * updated readme for explode * fixed formatting Co-authored-by: armantorkzaban <[email protected]> * Merge bbox-polygon and bbox, center, polyline decode (#99) * Added coordEach translation * Added bBox translation * Added center translation * Added decode points from polyline * Update read me * Remove and exclude .idea from git indexing * Convert double to Position * Use existing coord each implementation * Return bBox points in the correct order * Add bbox unit test * Change libraries namespaces * Code refactor * Add doc blocs and some more missing functions * Add encode polyline feature * Add tests for both encode and decode polylines * Add bbox tests * Add helper functions * Convert array to Bbox * Remove redundant helper functions * Add documentation * implementation * tests init, documentation, addition of types and debug * implemented, docs * test initiation * added it to /lib, updated readme, can close 97 * renamed the test file * comments resolved * typo * unused lib removed * merge bbox-polygon * missing center_test.dart * imported bbox_polygon to center_test * test error fixes Co-authored-by: Dennis Mwea <[email protected]> Co-authored-by: Lukas Himsel <[email protected]> * Added missing alt1, alt2 in BBox constructor, BBox put in README (#100) * Added coordEach translation * Added bBox translation * Added center translation * Added decode points from polyline * Update read me * Remove and exclude .idea from git indexing * Convert double to Position * Use existing coord each implementation * Return bBox points in the correct order * Add bbox unit test * Change libraries namespaces * Code refactor * Add doc blocs and some more missing functions * Add encode polyline feature * Add tests for both encode and decode polylines * Add bbox tests * Add helper functions * Convert array to Bbox * Remove redundant helper functions * Add documentation * implementation * tests init, documentation, addition of types and debug * implemented, docs * test initiation * added it to /lib, updated readme, can close 97 * renamed the test file * comments resolved * typo * unused lib removed * merge bbox-polygon * missing center_test.dart * imported bbox_polygon to center_test * test error fixes * added alt 1,2 to Bbox * added bbox to readme * Fix typos * bbox constructure changed to standard * bbox optional positional param. set accordingly * Documentation on limitation of optional prms. Bbox * Update geojson.dart * fix order of BBox default constructor in test * update doc comment * fix previously missed null exceptions Co-authored-by: Dennis Mwea <[email protected]> Co-authored-by: Lukas Himsel <[email protected]> * Implement rhumbBearing function and test (#109) * initial commit, stolen from @armantorkzaban * fix formatting * cleanup comments * Ports lineToPolygon, polygonToLine, and their tests (#104) * line_to_polygon ported * test init of lineToPolygon * debugging the test on line to polygon * line_to_polygon_test done * polygonToLine init * check for features' tyope in FeatureCollections * file name change * test and impl. done for polygonToLine * refactor autocomplete, lineStringToPolygon * comments resolved * type added * implementation and test and type setting Co-authored-by: Lukas Himsel <[email protected]> * Adds proper documentation to feature-conversion Part I (#115) * line_to_polygon ported * test init of lineToPolygon * debugging the test on line to polygon * line_to_polygon_test done * polygonToLine init * check for features' tyope in FeatureCollections * file name change * test and impl. done for polygonToLine * refactor autocomplete, lineStringToPolygon * comments resolved * type added * implementation and test and type setting * corrected documentation Co-authored-by: Lukas Himsel <[email protected]> * Update impl status of feature conversion package * Ports truncate package and its test (#111) * implemented * test init * moving on with the test * test finished. * comments resolved * add truncate reference * Ports clean_coords and its test (#112) * init * implemented * test init - imported * test, moving on * implemented points in comments * resolving comments * test done * readme updated, js removed * fix turf_equality dep, replace forEach with for * update types * trying to fix mutation * refactor, fix tests * another variance * simplified, cleaned comments * seems like it works! Co-authored-by: Lukas Himsel <[email protected]> * Debugs GeometryCollection condition in truncate (#121) * implemented * test init * moving on with the test * test finished. * comments resolved * updated readme.md * changed from forEach to for and used the element * changed forEach to a for loop * variable name changed - resolving a comment * rid of redundant case for GeometryCollection, test Co-authored-by: Lukas Himsel <[email protected]> * close #116 - add src path to README * update changelog, bump version for release * Added support for the area function (#123) * Added the area function * made the geometry to be of type GeometryType * fixed the test and added a benchmark test * fixed the area docs * added some more tests * Marked functions as private and fixed documentation * fixed documentation * added exception in case of unsupported geometry type, formatted the code and removed some redundant code Co-authored-by: yarden <[email protected]> * Implement polygon-smooth and its tests (#127) * initial implementation, and refactor * finished test and benchmark impl * reference in README * Port boolean functions and tests (#91) * in process - early analysis of the work * linked the meta functions in readme * CONTRIBUTING.md * links to the sources * edited typos * documentation work * closes #77, closes #16 * proofread * improves pub.dev score, closes #79, #78, #75 * Added deleted model, complemented contributing.md * booleans init * initial import * boolean_touches * valid - wip * within - init * rewiring the translated code * contains etc. * touches * valid * dependencies imported * Update CONTRIBUTING.md * clockwise test * concave test * intersect test * pointOnLine test * contains * crosses_test - blocked by findIntersections * boolean_contain * boolean_within * rhumb_bearing * rhumb_bearing\'s test - incomplete * rhumb_bearing's test - done, added to lib/bearing * boolean_contains, boolean_parallel, IP * working on contain - removed usages of runtimeType * rewriting pointInLine * tests reverted to false/true folder style * restructuring, clean-up * clockwise and its test, documentation * concave finalized * PointInPolygon plus test, dart format * removed the commented JS lines * return type added * disjoint and test - not done, depends on sweepline * equal implement, test, has dependencies * moving on * clean coords init * cleanCoord implemented, going to new branch * moving on with equal * update turf_equality dep * moving forward * refactors boolean_equal * #88 crosses, disjoint, equal, intersects, pip @lukas-h * cleanup on #88 * progress on overlap * bool: overlap,parallel,valid,touches & lineOverlap * issue with test is worked on * still at porting the overlap test * done: parallel * working on valid * touches done * valid - got stuck * progress on within * moved on with valid, refactored * valid test * lineIntersection testet - contains sweepline * package publishabe, rm git deps, fix equality dep * update params in equality * mod. on valid to cover the std. - MutiPs' 'finite' * RFCs resolved - readied for merge * return type of getGeom * linter effect! * reolved requests * more requests resolved * more requests resolved * test name, touching lineOverlap * fix conversations in booleanContains * fixes conversations in crosses and disjoint * resolves allllllllll outdated conversations, refactor * use getGeom in booleanTouches * use getGeom more frequently * rm linter rule, which is already inherited from dartclub_lint * cleanup, ready for merge Co-authored-by: Lukas Himsel <[email protected]> * Add missing parameter 'unit'. (#145) * Implement rhumb_distance with tests. * Implement rhumb_destination with tests. * Implement centroid with tests. * Implement transform_rotate with tests. * Add truncate tests for MultiLineString, MultiPoint, MultiPolygon * run dart format * introduce localCoordIndex in coordEach, cover more test cases in truncate_test * prepare for next release, support * work student position * Fix excludeWrapCoord in coordEach for MultiPolygon type. (#148) * Fix excludeWrapCoord in coordEach for MultiPolygon type. * Added multipolygon test case for centroid. * format markdown --------- Co-authored-by: Brad Parham <[email protected]> Co-authored-by: Tobrun <[email protected]> Co-authored-by: arman <[email protected]> Co-authored-by: arman <[email protected]> Co-authored-by: Arman Torkzaban <[email protected]> Co-authored-by: Levente Morva <[email protected]> Co-authored-by: Dennis Mwea <[email protected]> Co-authored-by: yardenfi <[email protected]> Co-authored-by: yarden <[email protected]> Co-authored-by: Kangmin An <[email protected]> Co-authored-by: ggastv <[email protected]>
1 parent a9b8df7 commit 4c4c924

File tree

535 files changed

+22570
-258
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

535 files changed

+22570
-258
lines changed

CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 0.0.8
2+
3+
- Implements `transformRotate`, `rhumbDistance`, `rhumbDestination`, `centroid` [#147](https://github.com/dartclub/turf_dart/pull/147)
4+
- Introduce `localCoordIndex` in `coordEach`
5+
- Implements all the `boolean`* functions [#91](https://github.com/dartclub/turf_dart/pull/91)
6+
- Implements `area` function [#123](https://github.com/dartclub/turf_dart/pull/123)
7+
- Implements `polygonSmooth` function [#127](https://github.com/dartclub/turf_dart/pull/127)
8+
- Fixes missing parameter in nearest point on line [#145](https://github.com/dartclub/turf_dart/pull/145)
9+
- Other core improvements
10+
- Support for Dart 3
11+
112
## 0.0.7
213

314
- Implements `nearestPointOn(Multi)Line` [#87](https://github.com/dartclub/turf_dart/pull/87)
@@ -25,10 +36,9 @@
2536
- Documentation: improves pub.dev scores, raised documentation coverage, fixed typos
2637
- Return type fixes for the the meta extensions
2738

28-
2939
## 0.0.5
3040

31-
- Implements *all* meta functions and`lineSegment`
41+
- Implements *all* meta functions and`lineSegment`
3242
- Adds a lot of documentation
3343
- Several bug and type fixes
3444

CONTRIBUTING.md

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,68 @@
33
Welcome and thank you for deciding to contribute to the project!
44

55
Here is how cooperation works perfectly at [Turf Dart](https://github.com/dartclub/turf_dart)
6+
67
#### Table of Contents
7-
- [Code of Conduct](#code-of-conduct)
8-
- [Get started](#get-started)
9-
- [Structure of modules](#structure-of-modules)
10-
- [Implementation Process](#implementation-process)
11-
- [Documentation](#documentation)
12-
- [GeoJSON object model](#GeoJSON-object-model)
8+
9+
- [Code of Conduct](#code-of-conduct)
10+
- [Get started](#get-started)
11+
- [Structure of modules](#structure-of-modules)
12+
- [Implementation Process](#implementation-process)
13+
- [Documentation](#documentation)
14+
- [GeoJSON object model](#GeoJSON-object-model)
1315

1416
## Code of conduct
17+
1518
By participating, you are expected to uphold international human rights and fundamental freedoms!
16-
To put it simply, be kind to each other.
19+
To put it simply, be kind to each other.
1720

1821
## Get started
22+
1923
- Get the [Dart tools](https://dart.dev/tools)
2024
- Clone the repository: ```git clone [email protected]:dartclub/turf_dart.git```
2125
- Navigate to project's folder in terminal & get its dependencies: ```dart pub get```
2226
- Go through [Implementation Process](#implementation-process)
27+
- Import the library in your code and use it. For example:
2328

24-
## Structure of modules
29+
```dart
30+
import 'package:turf/helpers.dart';
31+
import 'package:turf/src/line_segment.dart';
32+
33+
Feature<Polygon> poly = Feature<Polygon>(
34+
geometry: Polygon(coordinates: [
35+
[
36+
Position(0, 0),
37+
Position(2, 2),
38+
Position(0, 1),
39+
Position(0, 0),
40+
],
41+
[
42+
Position(0, 0),
43+
Position(1, 1),
44+
Position(0, 1),
45+
Position(0, 0),
46+
],
47+
]),
48+
);
49+
50+
var total = segmentReduce<int>(poly, (previousValue,
51+
currentSegment,
52+
initialValue,
53+
featureIndex,
54+
multiFeatureIndex,
55+
geometryIndex,
56+
segmentIndex) {
57+
if (previousValue != null) {
58+
previousValue++;
59+
}
60+
return previousValue;
61+
}, 0, combineNestedGeometries: false);
62+
// total.length == 6
2563
```
64+
65+
## Structure of modules
66+
67+
```text
2668
TURF_DART/lib/<MODULE NAME>.dart // public facing API, exports the implementation
2769
│ │
2870
│ └───src/<MODULE NAME>.dart // the implementation
@@ -31,7 +73,9 @@ TURF_DART/lib/<MODULE NAME>.dart // public facing API, exports the implementatio
3173
3274
└───test/components/<MODULE NAME>_test.dart // all the related tests
3375
```
76+
3477
## Implementation process
78+
3579
- Check the Backlog/Issues for similar issues
3680
- Create a new branch _feature-_ from _main_
3781
- Create a _draft Pull request_, mention in it the associated issues
@@ -44,16 +88,17 @@ TURF_DART/lib/<MODULE NAME>.dart // public facing API, exports the implementatio
4488
- run the benchmark: ```dart pub run benchmark```
4589
- Commit
4690
- Convert to real Pull request _ready for review_
47-
- Code review / mention a reviewer from [contributors list](https://github.com/dartclub/turf_dart/graphs/contributors)
48-
91+
- Code review / mention a reviewer from [contributors list](https://github.com/dartclub/turf_dart/graphs/contributors)
4992

5093
## Documentation
94+
5195
We follow [Effective Dart](https://dart.dev/guides/language/effective-dart/documentation) guidelines for documentation.
5296

5397
After going through the [Implementation Process](#implementation-process), please mention the made changes in [README.md](https://github.com/dartclub/turf_dart/blob/main/README.md)
5498

5599
In order to add to this very documentation, please develop CONTRIBUTING.md in [documentation branch](https://github.com/dartclub/turf_dart/tree/documentation)
56100

57101
## GeoJSON Object Model
102+
58103
If you have not read our [README.md](https://github.com/dartclub/turf_dart/blob/main/README.md) this diagram will give you a lot of information. Please consider looking our [notable design decisions](https://github.com/dartclub/turf_dart/blob/main/README.md#notable-design-decisions).
59-
![polymorphism](https://user-images.githubusercontent.com/10634693/159876354-f9da2f37-02b3-4546-b32a-c0f82c372272.png)
104+
![polymorphism](https://user-images.githubusercontent.com/10634693/159876354-f9da2f37-02b3-4546-b32a-c0f82c372272.png)

README.md

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# turf.dart
22

3+
ℹ️ Looking for maintainers as a work student position in Germany: Write an email to [[email protected]](mailto:[email protected]) ℹ️
4+
35
[![pub package](https://img.shields.io/pub/v/turf.svg)](https://pub.dev/packages/turf)
46

57
THIS PROJECT IS WORK IN PROCESS
@@ -11,9 +13,11 @@ This includes a fully [RFC 7946](https://tools.ietf.org/html/rfc7946)-compliant
1113
Most of the implementation is a direct translation from [turf.js](https://github.com/Turfjs/turf).
1214

1315
## Get started
16+
1417
- Get the [Dart tools](https://dart.dev/tools)
1518
- Install the library with `dart pub add turf`
1619
- Import the library in your code and use it. For example:
20+
1721
```dart
1822
import 'package:turf/helpers.dart';
1923
import 'package:turf/src/line_segment.dart';
@@ -35,7 +39,7 @@ Feature<Polygon> poly = Feature<Polygon>(
3539
]),
3640
);
3741
38-
main() {
42+
void main() {
3943
var total = segmentReduce<int>(
4044
poly,
4145
(previousValue, currentSegment, initialValue, featureIndex,
@@ -58,12 +62,14 @@ main() {
5862
![polymorphism](https://user-images.githubusercontent.com/10634693/159876354-f9da2f37-02b3-4546-b32a-c0f82c372272.png)
5963

6064
## Notable Design Decisions
65+
6166
- Nested `GeometryCollections` (as described in
6267
[RFC 7946 section 3.1.8](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.8))
6368
are _not supported_ which takes a slightly firmer stance than the "should
6469
avoid" language in the specification
6570

6671
## Tests and Benchmarks
72+
6773
Tests are run with `dart test` and benchmarks can be run with
6874
`dart run benchmark`
6975

@@ -73,14 +79,15 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
7379
## Components
7480

7581
### Measurement
82+
7683
- [ ] along
77-
- [ ] area
84+
- [x] [area](https://github.com/dartclub/turf_dart/blob/main/lib/src/area.dart)
7885
- [x] [bbox](https://github.com/dartclub/turf_dart/blob/main/lib/src/bbox.dart)
7986
- [x] [bboxPolygon](https://github.com/dartclub/turf_dart/blob/main/lib/src/bbox_polygon.dart)
8087
- [x] [bearing](https://github.com/dartclub/turf_dart/blob/main/lib/src/bearing.dart)
8188
- [x] [center](https://github.com/Dennis-Mwea/turf_dart/blob/main/lib/src/center.dart)
8289
- [ ] centerOfMass
83-
- [ ] centroid
90+
- [x] [centroid](https://github.com/dartclub/turf_dart/blob/main/lib/src/centroid.dart)
8491
- [x] [destination](https://github.com/dartclub/turf_dart/blob/main/lib/src/destination.dart)
8592
- [x] [distance](https://github.com/dartclub/turf_dart/blob/main/lib/src/distance.dart)
8693
- [ ] envelope
@@ -90,19 +97,21 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
9097
- [ ] polygonTangents
9198
- [ ] pointToLineDistance
9299
- [x] [rhumbBearing](https://github.com/dartclub/turf_dart/blob/main/lib/src/rhumb_bearing.dart)
93-
- [ ] rhumbDestination
94-
- [ ] rhumbDistance
100+
- [x] [rhumbDestination](https://github.com/dartclub/turf_dart/blob/main/lib/src/rhumb_destination.dart)
101+
- [x] [rhumbDistance](https://github.com/dartclub/turf_dart/blob/main/lib/src/rhumb_distance.dart)
95102
- [ ] square
96103
- [ ] greatCircle
97104

98105
### Coordinate Mutation
106+
99107
- [x] [cleanCoords](https://github.com/dartclub/turf_dart/blob/main/lib/src/clean_coords.dart)
100108
- [ ] flip
101109
- [ ] rewind
102110
- [ ] round
103111
- [x] [truncate](https://github.com/dartclub/turf_dart/blob/main/lib/src/truncate.dart)
104112

105113
### Transformation
114+
106115
- [ ] bboxClip
107116
- [ ] bezierSpline
108117
- [ ] buffer
@@ -114,17 +123,18 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
114123
- [ ] dissolve
115124
- [ ] intersect
116125
- [ ] lineOffset
117-
- [ ] polygonSmooth
126+
- [x] [polygonSmooth](ttps://github.com/dartclub/turf_dart/blob/main/lib/src/polygon_smooth.dart)
118127
- [ ] simplify
119128
- [ ] tesselate
120-
- [ ] transformRotate
129+
- [x] [transformRotate](https://github.com/dartclub/turf_dart/blob/main/lib/src/transform_rotate.dart)
121130
- [ ] transformTranslate
122131
- [ ] transformScale
123132
- [ ] union
124133
- [ ] voronoi
125-
- [x] [polyLineDecode](https://github.com/Dennis-Mwea/turf_dart/blob/main/lib/src/polyline.dart)
134+
- [x] [polyLineDecode](https://github.com/dartclub/turf_dart/blob/main/lib/src/polyline.dart)
126135

127136
### Feature Conversion
137+
128138
- [ ] combine
129139
- [x] [explode](https://github.com/dartclub/turf_dart/blob/main/lib/src/explode.dart)
130140
- [ ] flatten
@@ -133,11 +143,12 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
133143
- [x] [polygonToLine](https://github.com/dartclub/turf_dart/blob/main/lib/src/polygon_to_line.dart)
134144

135145
### MISC
146+
136147
- [ ] ellipse
137148
- [ ] kinks
138149
- [ ] lineArc
139150
- [ ] lineChunk
140-
- [ ] lineIntersect
151+
- [ ] [lineIntersect](https://github.com/dartclub/turf_dart/blob/main/lib/src/line_intersect.dart)
141152
- [ ] lineOverlap
142153
- [x] [lineSegment](https://github.com/dartclub/turf_dart/blob/main/lib/src/line_segment.dart)
143154
- [ ] lineSlice
@@ -150,49 +161,55 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
150161
- [ ] unkinkPolygon
151162

152163
### Random
164+
153165
- [ ] randomPosition
154166
- [ ] randomPoint
155167
- [ ] randomLineString
156168
- [ ] randomPolygon
157169

158170
### Data
171+
159172
- [ ] sample
160173

161174
### Interpolation
175+
162176
- [ ] interpolate
163177
- [ ] isobands
164178
- [ ] isolines
165179
- [ ] planepoint
166180
- [ ] tin
167181

168182
### Joins
183+
169184
- [ ] pointsWithinPolygon
170185
- [ ] tag
171186

172187
### Grids
188+
173189
- [ ] hexGrid
174190
- [ ] pointGrid
175191
- [ ] squareGrid
176192
- [ ] triangleGrid
177193

178194
### Classification
195+
179196
- [x] [nearestPoint](https://github.com/dartclub/turf_dart/blob/main/lib/src/nearest_point.dart)
180197

181198
### Aggregation
199+
182200
- [ ] collect
183201
- [ ] clustersDbscan
184202
- [ ] clustersKmeans
185203

186204
### META
205+
187206
- [x] [coordAll](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart)
188207
- [x] [coordEach](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart)
189208
- [x] [coordReduce](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart)
190209
- [x] [featureEach](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/feature.dart)
191210
- [x] [featureReduce](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/feature.dart)
192211
- [x] [flattenEach](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/flatten.dart)
193212
- [x] [flattenReduce](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/flatten.dart)
194-
- [x] [getCoord](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart)
195-
- [x] [getCoords](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart)
196213
- [x] [geomEach](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/geom.dart)
197214
- [x] [geomReduce](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/geom.dart)
198215
- [x] [propEach](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/prop.dart)
@@ -203,21 +220,29 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
203220
- [x] [clusterEach](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/cluster.dart)
204221
- [x] [clusterReduce](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/cluster.dart)
205222

223+
### Invariants
224+
225+
- [x] [getCoord](https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart)
226+
- [x] [getCoords](https://github.com/dartclub/turf_dart/blob/main/lib/src/invariant.dart)
227+
- [x] [getGeom](https://github.com/dartclub/turf_dart/blob/main/lib/src/invariant.dart)
228+
206229
### Booleans
207-
- [ ] booleanClockwise
208-
- [ ] booleanConcave
209-
- [ ] booleanContains
210-
- [ ] booleanCrosses
211-
- [ ] booleanDisjoint
212-
- [ ] booleanEqual
213-
- [ ] booleanIntersects
230+
231+
- [x] [booleanClockwise](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_clockwise.dart)
232+
- [x] [booleanConcave](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_concave.dart)
233+
- [x] [booleanContains](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_contains.dart)
234+
- [x] [booleanCrosses](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_crosses.dart)
235+
- [x] [booleanDisjoint](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_disjoint.dart)
236+
- [x] [booleanEqual](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_equal.dart)
237+
- [x] [booleanIntersects](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_intersect.dart)
214238
- [ ] booleanOverlap
215-
- [ ] booleanParallel
216-
- [ ] booleanPointInPolygon
217-
- [ ] booleanPointOnLine
239+
- [x] [booleanParallel](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_parallel.dart)
240+
- [x] [booleanPointInPolygon](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_point_in_polygon.dart)
241+
- [x] [booleanPointOnLine](https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_point_on_line.dart)
218242
- [ ] booleanWithin
219243

220244
### Unit Conversion
245+
221246
- [x] [bearingToAzimuth](https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart)
222247
- [x] [convertArea](https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart)
223248
- [x] [convertLength](https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart)

analysis_options.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
include: package:dartclub_lint/dart.yaml
1+
include: package:lints/recommended.yaml
22

33
analyzer:
44
errors:
5-
prefer_generic_function_type_aliases: error
5+
prefer_generic_function_type_aliases: error

benchmark/area_benchmark.dart

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import 'package:benchmark/benchmark.dart';
2+
import 'package:turf/turf.dart';
3+
4+
Feature<Polygon> poly = Feature<Polygon>(
5+
geometry: Polygon(coordinates: [
6+
[
7+
Position(125, -15),
8+
Position(113, -22),
9+
Position(117, -37),
10+
Position(130, -33),
11+
Position(148, -39),
12+
Position(154, -27),
13+
Position(144, -15),
14+
Position(125, -15)
15+
]
16+
]),
17+
);
18+
19+
void main() {
20+
group('area', () {
21+
benchmark('simple', () {
22+
area(poly);
23+
});
24+
});
25+
}

benchmark/explode_benchmark.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var poly = Polygon(coordinates: [
1212
],
1313
]);
1414

15-
main() {
15+
void main() {
1616
group('explode', () {
1717
benchmark('simple', () {
1818
explode(poly);

0 commit comments

Comments
 (0)