Skip to content

Commit a9b8df7

Browse files
lukas-hbaparhamtobrunarmantorkzabanArman Torkzaban
authored
Prepare for release 0.0.7 (#119)
* 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 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]>
1 parent cfeebad commit a9b8df7

File tree

174 files changed

+7031
-22
lines changed

Some content is hidden

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

174 files changed

+7031
-22
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ build/
1010
# Directory created by dartdoc
1111
doc/api/
1212

13-
coverage/
13+
coverage/
14+
15+
.idea/
16+

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
## 0.0.7
2+
3+
- Implements `nearestPointOn(Multi)Line` [#87](https://github.com/dartclub/turf_dart/pull/87)
4+
- Implements `explode` function [#93](https://github.com/dartclub/turf_dart/pull/93)
5+
- Implements `bbox-polygon` and `bbox`, `center`, polyline functions [#99](https://github.com/dartclub/turf_dart/pull/99)
6+
- Updates the `BBox`-class constructor [#100](https://github.com/dartclub/turf_dart/pull/100)
7+
- Implements `rhumbBearing` function [#109](https://github.com/dartclub/turf_dart/pull/109)
8+
- Implements `lineToPolygon` and `polygonToLine` functions [#104](https://github.com/dartclub/turf_dart/pull/104)
9+
- Implements `truncate` function [#111](https://github.com/dartclub/turf_dart/pull/111)
10+
- Implements `cleanCoord` function [#112](https://github.com/dartclub/turf_dart/pull/112)
11+
- Some documentation & README improvements
12+
113
## 0.0.6+3
214

315
- Rename examples file
16+
417
## 0.0.6+2
518

619
- Added code examples

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,32 +75,32 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
7575
### Measurement
7676
- [ ] along
7777
- [ ] area
78-
- [ ] bbox
79-
- [ ] bboxPolygon
80-
- [x] [bearing](https://github.com/dartclub/turf_dart/blob/main/lib/bearing.dart)
81-
- [ ] center
78+
- [x] [bbox](https://github.com/dartclub/turf_dart/blob/main/lib/src/bbox.dart)
79+
- [x] [bboxPolygon](https://github.com/dartclub/turf_dart/blob/main/lib/src/bbox_polygon.dart)
80+
- [x] [bearing](https://github.com/dartclub/turf_dart/blob/main/lib/src/bearing.dart)
81+
- [x] [center](https://github.com/Dennis-Mwea/turf_dart/blob/main/lib/src/center.dart)
8282
- [ ] centerOfMass
8383
- [ ] centroid
84-
- [x] [destination](https://github.com/dartclub/turf_dart/blob/main/lib/destination.dart)
85-
- [x] [distance](https://github.com/dartclub/turf_dart/blob/main/lib/distance.dart)
84+
- [x] [destination](https://github.com/dartclub/turf_dart/blob/main/lib/src/destination.dart)
85+
- [x] [distance](https://github.com/dartclub/turf_dart/blob/main/lib/src/distance.dart)
8686
- [ ] envelope
8787
- [ ] length
88-
- [x] [midpoint](https://github.com/dartclub/turf_dart/blob/main/lib/midpoint.dart)
88+
- [x] [midpoint](https://github.com/dartclub/turf_dart/blob/main/lib/src/midpoint.dart)
8989
- [ ] pointOnFeature
9090
- [ ] polygonTangents
9191
- [ ] pointToLineDistance
92-
- [ ] rhumbBearing
92+
- [x] [rhumbBearing](https://github.com/dartclub/turf_dart/blob/main/lib/src/rhumb_bearing.dart)
9393
- [ ] rhumbDestination
9494
- [ ] rhumbDistance
9595
- [ ] square
9696
- [ ] greatCircle
9797

9898
### Coordinate Mutation
99-
- [ ] cleanCoords
99+
- [x] [cleanCoords](https://github.com/dartclub/turf_dart/blob/main/lib/src/clean_coords.dart)
100100
- [ ] flip
101101
- [ ] rewind
102102
- [ ] round
103-
- [ ] truncate
103+
- [x] [truncate](https://github.com/dartclub/turf_dart/blob/main/lib/src/truncate.dart)
104104

105105
### Transformation
106106
- [ ] bboxClip
@@ -122,14 +122,15 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
122122
- [ ] transformScale
123123
- [ ] union
124124
- [ ] voronoi
125+
- [x] [polyLineDecode](https://github.com/Dennis-Mwea/turf_dart/blob/main/lib/src/polyline.dart)
125126

126127
### Feature Conversion
127128
- [ ] combine
128-
- [ ] explode
129+
- [x] [explode](https://github.com/dartclub/turf_dart/blob/main/lib/src/explode.dart)
129130
- [ ] flatten
130-
- [ ] lineToPolygon
131+
- [x] [lineToPolygon](https://github.com/dartclub/turf_dart/blob/main/lib/src/line_to_polygon.dart)
131132
- [ ] polygonize
132-
- [ ] polygonToLine
133+
- [x] [polygonToLine](https://github.com/dartclub/turf_dart/blob/main/lib/src/polygon_to_line.dart)
133134

134135
### MISC
135136
- [ ] ellipse
@@ -143,7 +144,7 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
143144
- [ ] lineSliceAlong
144145
- [ ] lineSplit
145146
- [ ] mask
146-
- [ ] nearestPointOnLine
147+
- [x] [nearestPointOnLine](https://github.com/dartclub/turf_dart/blob/main/lib/src/nearest_point_on_line.dart)
147148
- [ ] sector
148149
- [ ] shortestPath
149150
- [ ] unkinkPolygon
@@ -175,7 +176,7 @@ Any new benchmarks must be named `*_benchmark.dart` and reside in the
175176
- [ ] triangleGrid
176177

177178
### Classification
178-
- [x] [nearestPoint](https://github.com/dartclub/turf_dart/blob/main/lib/nearest_point.dart)
179+
- [x] [nearestPoint](https://github.com/dartclub/turf_dart/blob/main/lib/src/nearest_point.dart)
179180

180181
### Aggregation
181182
- [ ] collect

benchmark/explode_benchmark.dart

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import 'package:benchmark/benchmark.dart';
2+
import 'package:turf/src/explode.dart';
3+
import 'package:turf/turf.dart';
4+
5+
var poly = Polygon(coordinates: [
6+
[
7+
Position.of([0, 0]),
8+
Position.of([0, 10]),
9+
Position.of([10, 10]),
10+
Position.of([10, 0]),
11+
Position.of([0, 0]),
12+
],
13+
]);
14+
15+
main() {
16+
group('explode', () {
17+
benchmark('simple', () {
18+
explode(poly);
19+
});
20+
});
21+
}

lib/bbox.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
library turf_bbox;
2+
3+
export "src/bbox.dart";

lib/bbox_polygon.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
library turf_bbox_polygon.dart;
2+
3+
export 'src/bbox_polygon.dart';

lib/bearing.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
library turf_bearing;
22

33
export 'src/bearing.dart';
4+
export 'src/rhumb_bearing.dart';

lib/center.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
library turf_center;
2+
3+
export 'src/center.dart';

lib/clean_coords.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
library clean_coords.dart;
2+
3+
export 'src/clean_coords.dart';

lib/explode.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
library explode;
2+
3+
export 'src/explode.dart';

0 commit comments

Comments
 (0)