8
8
<br >
9
9
10
10
[ ![ pub package] ( https://img.shields.io/pub/v/turf.svg )] ( https://pub.dev/packages/turf )
11
+ ![ dart unit tests] ( https://github.com/dartclub/turf_dart/actions/workflows/dart-unit-tests.yml/badge.svg )
12
+ ![ dart publish] ( https://github.com/dartclub/turf_dart/actions/workflows/dart-pub-publish.yml/badge.svg )
13
+ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )
11
14
12
- THIS PROJECT IS WORK IN PROCESS
15
+ TurfDart is a Dart library for [ spatial analysis ] ( https://en.wikipedia.org/wiki/Spatial_analysis ) . It includes traditional spatial operations, helper functions for creating GeoJSON data, and data classification and statistics tools. You can use TurfDart in your Flutter applications on the web, mobile and desktop or in pure Dart applications running on the server.
13
16
14
- A [ turf.js ] ( https://github.com/Turfjs/turf ) -like geospatial analysis library working with GeoJSON, written in pure Dart .
17
+ As the foundation, we are using [ Geotypes ] ( https://github.com/dartclub/geotypes ) , a lightweight dart library that provides a strong GeoJSON object model and fully [ RFC 7946 ] ( https://tools.ietf.org/html/rfc7946 ) compliant serializers .
15
18
16
- This includes a fully [ RFC 7946] ( https://tools.ietf.org/html/rfc7946 ) -compliant object-representation and serialization for GeoJSON.
17
-
18
- Most of the implementation is a direct translation from [ turf.js] ( https://github.com/Turfjs/turf ) .
19
+ Most of the functionality is a translation from [ turf.js] ( https://github.com/Turfjs/turf ) , the progress can be found [ here] ( Progress.md ) .
19
20
20
21
## Get started
21
22
@@ -66,7 +67,7 @@ void main() {
66
67
67
68
![ polymorphism] ( https://user-images.githubusercontent.com/10634693/159876354-f9da2f37-02b3-4546-b32a-c0f82c372272.png )
68
69
69
- ## Notable Design Decisions
70
+ ### Notable Design Decisions
70
71
71
72
- Nested ` GeometryCollections ` (as described in
72
73
[ RFC 7946 section 3.1.8] ( https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.8 ) )
@@ -80,181 +81,3 @@ Tests are run with `dart test` and benchmarks can be run with
80
81
81
82
Any new benchmarks must be named ` *_benchmark.dart ` and reside in the
82
83
` ./benchmark ` folder.
83
-
84
- ## Components
85
-
86
- ### Measurement
87
-
88
- - [x] [ along] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/along.dart )
89
- - [x] [ area] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/area.dart )
90
- - [x] [ bbox] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/bbox.dart )
91
- - [x] [ bboxPolygon] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/bbox_polygon.dart )
92
- - [x] [ bearing] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/bearing.dart )
93
- - [x] [ center] ( https://github.com/Dennis-Mwea/turf_dart/blob/main/lib/src/center.dart )
94
- - [ ] centerOfMass
95
- - [x] [ centroid] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/centroid.dart )
96
- - [x] [ destination] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/destination.dart )
97
- - [x] [ distance] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/distance.dart )
98
- - [ ] envelope
99
- - [x] [ length] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/length.dart )
100
- - [x] [ midpoint] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/midpoint.dart )
101
- - [ ] pointOnFeature
102
- - [ ] polygonTangents
103
- - [ ] pointToLineDistance
104
- - [x] [ rhumbBearing] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/rhumb_bearing.dart )
105
- - [x] [ rhumbDestination] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/rhumb_destination.dart )
106
- - [x] [ rhumbDistance] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/rhumb_distance.dart )
107
- - [ ] square
108
- - [ ] greatCircle
109
-
110
- ### Coordinate Mutation
111
-
112
- - [x] [ cleanCoords] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/clean_coords.dart )
113
- - [ ] flip
114
- - [ ] rewind
115
- - [ ] round
116
- - [x] [ truncate] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/truncate.dart )
117
-
118
- ### Transformation
119
-
120
- - [ ] bboxClip
121
- - [ ] bezierSpline
122
- - [ ] buffer
123
- - [ ] circle
124
- - [x] clone - implemented as a member function of each [ GeoJSONObject]
125
- - [ ] concave
126
- - [ ] convex
127
- - [ ] difference
128
- - [ ] dissolve
129
- - [ ] intersect
130
- - [ ] lineOffset
131
- - [x] [ polygonSmooth] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/polygon_smooth.dart )
132
- - [ ] simplify
133
- - [ ] tesselate
134
- - [x] [ transformRotate] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/transform_rotate.dart )
135
- - [ ] transformTranslate
136
- - [ ] transformScale
137
- - [ ] union
138
- - [ ] voronoi
139
- - [x] [ polyLineDecode] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/polyline.dart )
140
-
141
- ### Feature Conversion
142
-
143
- - [ ] combine
144
- - [x] [ explode] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/explode.dart )
145
- - [ ] flatten
146
- - [x] [ lineToPolygon] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/line_to_polygon.dart )
147
- - [ ] polygonize
148
- - [x] [ polygonToLine] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/polygon_to_line.dart )
149
-
150
- ### MISC
151
-
152
- - [ ] ellipse
153
- - [ ] kinks
154
- - [ ] lineArc
155
- - [ ] lineChunk
156
- - [ ] [ lineIntersect] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/line_intersect.dart )
157
- - [x] [ lineOverlap] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/line_overlap.dart )
158
- - [x] [ lineSegment] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/line_segment.dart )
159
- - [x] [ lineSlice] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/line_slice.dart )
160
- - [ ] lineSliceAlong
161
- - [ ] lineSplit
162
- - [ ] mask
163
- - [x] [ nearestPointOnLine] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/nearest_point_on_line.dart )
164
- - [ ] sector
165
- - [ ] shortestPath
166
- - [ ] unkinkPolygon
167
-
168
- ### Random
169
-
170
- - [ ] randomPosition
171
- - [ ] randomPoint
172
- - [ ] randomLineString
173
- - [ ] randomPolygon
174
-
175
- ### Data
176
-
177
- - [ ] sample
178
-
179
- ### Interpolation
180
-
181
- - [ ] interpolate
182
- - [ ] isobands
183
- - [ ] isolines
184
- - [ ] planepoint
185
- - [ ] tin
186
-
187
- ### Joins
188
-
189
- - [ ] pointsWithinPolygon
190
- - [ ] tag
191
-
192
- ### Grids
193
-
194
- - [ ] hexGrid
195
- - [ ] pointGrid
196
- - [ ] squareGrid
197
- - [ ] triangleGrid
198
-
199
- ### Classification
200
-
201
- - [x] [ nearestPoint] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/nearest_point.dart )
202
-
203
- ### Aggregation
204
-
205
- - [ ] collect
206
- - [ ] clustersDbscan
207
- - [ ] clustersKmeans
208
-
209
- ### META
210
-
211
- - [x] [ coordAll] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart )
212
- - [x] [ coordEach] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart )
213
- - [x] [ coordReduce] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart )
214
- - [x] [ featureEach] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/feature.dart )
215
- - [x] [ featureReduce] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/feature.dart )
216
- - [x] [ flattenEach] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/flatten.dart )
217
- - [x] [ flattenReduce] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/flatten.dart )
218
- - [x] [ geomEach] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/geom.dart )
219
- - [x] [ geomReduce] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/geom.dart )
220
- - [x] [ propEach] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/prop.dart )
221
- - [x] [ propReduce] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/prop.dart )
222
- - [x] [ segmentEach] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/line_segment.dart )
223
- - [x] [ segmentReduce] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/line_segment.dart )
224
- - [x] [ getCluster] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/cluster.dart )
225
- - [x] [ clusterEach] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/cluster.dart )
226
- - [x] [ clusterReduce] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/cluster.dart )
227
-
228
- ### Invariants
229
-
230
- - [x] [ getCoord] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/meta/coord.dart )
231
- - [x] [ getCoords] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/invariant.dart )
232
- - [x] [ getGeom] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/invariant.dart )
233
-
234
- ### Booleans
235
-
236
- - [x] [ booleanClockwise] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_clockwise.dart )
237
- - [x] [ booleanConcave] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_concave.dart )
238
- - [x] [ booleanContains] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_contains.dart )
239
- - [x] [ booleanCrosses] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_crosses.dart )
240
- - [x] [ booleanDisjoint] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_disjoint.dart )
241
- - [x] [ booleanEqual] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_equal.dart )
242
- - [x] [ booleanIntersects] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_intersects.dart )
243
- - [x] [ booleanOverlap] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_overlap.dart )
244
- - [x] [ booleanParallel] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_parallel.dart )
245
- - [x] [ booleanPointInPolygon] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_point_in_polygon.dart )
246
- - [x] [ booleanPointOnLine] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_point_on_line.dart )
247
- - [x] [ booleanWithin] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/booleans/boolean_within.dart )
248
-
249
- ### Unit Conversion
250
-
251
- - [x] [ bearingToAzimuth] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart )
252
- - [x] [ convertArea] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart )
253
- - [x] [ convertLength] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart )
254
- - [x] [ degreesToRadians] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart )
255
- - [x] [ lengthToRadians] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart )
256
- - [x] [ lengthToDegrees] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart )
257
- - [x] [ radiansToLength] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart )
258
- - [x] [ radiansToDegrees] ( https://github.com/dartclub/turf_dart/blob/main/lib/src/helpers.dart )
259
- - [ ] toMercator
260
- - [ ] toWgs84
0 commit comments