Turf_dart

A turf.js-like geospatial analysis library working with GeoJSON, written in pure Dart.
Alternatives To Turf_dart
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Turf8,322411911a day ago75November 09, 2022308mitJavaScript
A modular geospatial engine written in JavaScript
Php Crud Api3,3994121 days ago232August 15, 202383mitPHP
Single file PHP script that adds a REST API to a SQL database
L73,190277a day ago549August 09, 2023134mitTypeScript
🌎 Large-scale WebGL-powered Geospatial Data Visualization analysis engine
Vizicities2,686
15 years agoNovember 02, 2014106bsd-3-clauseJavaScript
A framework for 3D geospatial visualization in the browser
Supercluster1,8582,4582882 months ago26April 27, 202331iscJavaScript
A very fast geospatial point clustering library for browsers and Node.
Geotools1,545
4 days ago2February 21, 202119lgpl-2.1Java
Official GeoTools repository
Geoswift1,384
136 months ago41March 19, 20237mitSwift
The Swift Geometry Engine.
Orb6929932 months ago27May 16, 202211mitGo
Types and utilities for working with 2d geometry in Golang
Go Geom67110536 months ago28June 02, 20219bsd-2-clauseGo
Package geom implements efficient geometry types for geospatial applications.
Koop597
3 days ago23otherJavaScript
Transform, query, and download geospatial data on the web.
Alternatives To Turf_dart
Select To Compare


Alternative Project Comparisons
Readme

turf.dart

Looking for maintainers as a work student position in Germany: Write an email to [email protected]

pub package

THIS PROJECT IS WORK IN PROCESS

A turf.js-like geospatial analysis library working with GeoJSON, written in pure Dart.

This includes a fully RFC 7946-compliant object-representation and serialization for GeoJSON.

Most of the implementation is a direct translation from turf.js.

Get started

  • Get the Dart tools
  • Install the library with dart pub add turf
  • Import the library in your code and use it. For example:
import 'package:turf/helpers.dart';
import 'package:turf/src/line_segment.dart';

Feature<Polygon> poly = Feature<Polygon>(
  geometry: Polygon(coordinates: [
    [
      Position(0, 0),
      Position(2, 2),
      Position(0, 1),
      Position(0, 0),
    ],
    [
      Position(0, 0),
      Position(1, 1),
      Position(0, 1),
      Position(0, 0),
    ],
  ]),
);

void main() {
  var total = segmentReduce<int>(
    poly,
    (previousValue, currentSegment, initialValue, featureIndex,
        multiFeatureIndex, geometryIndex, segmentIndex) {
      if (previousValue != null) {
        previousValue++;
      }
      return previousValue;
    },
    0,
    combineNestedGeometries: false,
  );
  print(total);
  // total ==  6
}

GeoJSON Object Model

polymorphism

Notable Design Decisions

  • Nested GeometryCollections (as described in RFC 7946 section 3.1.8) are not supported which takes a slightly firmer stance than the "should avoid" language in the specification

Tests and Benchmarks

Tests are run with dart test and benchmarks can be run with dart run benchmark

Any new benchmarks must be named *_benchmark.dart and reside in the ./benchmark folder.

Components

Measurement

Coordinate Mutation

Transformation

  • [ ] bboxClip
  • [ ] bezierSpline
  • [ ] buffer
  • [ ] circle
  • [x] clone - implemented as a member function of each [GeoJSONObject]
  • [ ] concave
  • [ ] convex
  • [ ] difference
  • [ ] dissolve
  • [ ] intersect
  • [ ] lineOffset
  • [x] polygonSmooth
  • [ ] simplify
  • [ ] tesselate
  • [x] transformRotate
  • [ ] transformTranslate
  • [ ] transformScale
  • [ ] union
  • [ ] voronoi
  • [x] polyLineDecode

Feature Conversion

MISC

  • [ ] ellipse
  • [ ] kinks
  • [ ] lineArc
  • [ ] lineChunk
  • [ ] lineIntersect
  • [ ] lineOverlap
  • [x] lineSegment
  • [ ] lineSlice
  • [ ] lineSliceAlong
  • [ ] lineSplit
  • [ ] mask
  • [x] nearestPointOnLine
  • [ ] sector
  • [ ] shortestPath
  • [ ] unkinkPolygon

Random

  • [ ] randomPosition
  • [ ] randomPoint
  • [ ] randomLineString
  • [ ] randomPolygon

Data

  • [ ] sample

Interpolation

  • [ ] interpolate
  • [ ] isobands
  • [ ] isolines
  • [ ] planepoint
  • [ ] tin

Joins

  • [ ] pointsWithinPolygon
  • [ ] tag

Grids

  • [ ] hexGrid
  • [ ] pointGrid
  • [ ] squareGrid
  • [ ] triangleGrid

Classification

Aggregation

  • [ ] collect
  • [ ] clustersDbscan
  • [ ] clustersKmeans

META

Invariants

Booleans

Unit Conversion

Popular Geojson Projects
Popular Geospatial Projects
Popular Mapping Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Dart
Flutter
Geojson
Geospatial