geojson 0.1.0 copy "geojson: ^0.1.0" to clipboard
geojson: ^0.1.0 copied to clipboard

outdated

Manipulate geojson data. Load and parse geojson from a string or a file.

example/main.dart

import 'dart:io';
import 'package:geojson/geojson.dart';

// data is from http://www.naturalearthdata.com

void main() async {
  final file = File("railroads_of_north_america.geojson");
  polygons(file);
  lines(file);
}

void polygons(File file) async {
  final file = File("lakes_of_europe.geojson");
  final geoSeries = await geoSerieFromGeoJsonFile(file, nameProperty: "label");
  for (final geoSerie in geoSeries) {
    print("${geoSerie.name}: ${geoSerie.geoPoints.length} geopoints");
  }
}

void lines(File file) async {
  final file = File("railroads_of_north_america.geojson");
  final geoSeries =
      await geoSerieFromGeoJsonFile(file, nameProperty: "continent");
  for (final geoSerie in geoSeries) {
    print("${geoSerie.name}: ${geoSerie.geoPoints.length} geopoints");
  }
}
61
likes
0
pub points
91%
popularity

Publisher

unverified uploader

Manipulate geojson data. Load and parse geojson from a string or a file.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

geopoint, meta, pedantic

More

Packages that depend on geojson