dart_jts 0.0.5+2 copy "dart_jts: ^0.0.5+2" to clipboard
dart_jts: ^0.0.5+2 copied to clipboard

outdated

An ongoing effort to port the Java Topology Suite to dart.

example/main.dart

import 'package:dart_jts/dart_jts.dart';

main() {
  String polygon1Wkt = "POLYGON (( 0 0, 100 0, 100 100, 0 100, 0 0 ))";
  String polygon2Wkt = "POLYGON (( 50 50, 150 50, 150 150, 50 150, 50 50 ))";

  WKTReader reader = WKTReader();

  var p1 = reader.read(polygon1Wkt);
  var p2 = reader.read(polygon2Wkt);

  if (p1.intersects(p2)) {
    print("Yeah!");
  } else {
    print("Something's very wrong!");
  }

  print("For many many many examples, have a look at the testcases!");
}
29
likes
0
pub points
90%
popularity

Publisher

verified publisherhydrologis.com

An ongoing effort to port the Java Topology Suite to dart.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, hex, intl

More

Packages that depend on dart_jts