era_geojson 0.1.1+4

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 29

era_geojson.dart #

Geojson dart library

Usage #

A simple usage example:

import 'package:era_geojson/era_geojson.dart';

void main() {
    var json = ...;//geojson data
    var collection = new FeatureCollection.fromJson(json);
    print(collection);
}

Status #

Supports:

  • FeatureCollection

    • Feature
  • Geometry

    • Point
    • Multipoint
    • LineString
    • MultiLineString
    • Polygon
    • MultiPolygon
    • GeometryCollection

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.1.1+4 #

  • Added toString to GeometryCollection, MultiLineString, MultiPolygon and Polygon

0.1.1+3 #

  • Updated README.md

0.1.1+2 #

  • Fixed pub requirements

0.1.1+1 #

  • Added toString method to Feature and FeatureCollection
  • Added example to README.md and in example directory.

0.1.1 #

  • Created Feature and FeatureCollection

0.1.0 #

  • Created GeometryCollection
  • Added fromJson constructor to Geometry

0.0.9 #

  • Created MultiPolygon class

0.0.8 #

  • Created MultiLineString class

0.0.7 #

  • Created Polygon and LineStringListGeometry

0.0.6 #

  • Created MultiPoint class
  • Moved LineString's parsing function to class PointListGeometry
  • Added documentation to LineString class

0.0.5 #

  • Created LineString class

0.0.4+2 #

  • Refactored Point class

0.0.4+1 #

  • Refactored some tests
  • Added documentation to Geometry and Point

0.0.4 #

  • Created Point class

0.0.3 #

  • Moved getCoordinates to Geometry class

0.0.3 #

  • Created getCoordinates method
  • Created Geometry base class

0.0.2+1 #

  • Added toString test for LatLng
  • Increased coverage to 100%
  • Added homepage to pubspec.yaml

0.0.2 #

  • Created LatLng

0.0.1 #

  • Initial version, created by Stagehand

example/era_geojson_example.dart

// Copyright (C) 2016  Andrea Cantafio

//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

library era_geojson.example.era_geojson_example;

import 'package:era_geojson/era_geojson.dart';

void main() {
  final json = {
    "type": "FeatureCollection",
    "features": [
      {
        "geometry": {
          "type": "LineString",
          "coordinates": [
            [
              -74.01503727,
              40.70666089
            ],
            [
              -74.01502119,
              40.70656739
            ],
            [
              -74.01502389,
              40.70649827
            ],
            [
              -74.01504275,
              40.7063966
            ],
            [
              -74.01505344,
              40.70631931
            ],
            [
              -74.01506952,
              40.70622581
            ],
            [
              -74.01519025,
              40.70589846
            ],
            [
              -74.01527024,
              40.70562794
            ]
          ]
        },
        "type": "Feature",
        "properties": {
          "kind": "retaining_wall",
        }
      }
    ]
  };

  final collection = new FeatureCollection.fromJson(json);
  print(collection);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  era_geojson: ^0.1.1+4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:era_geojson/era_geojson.dart';
  
Version Uploaded Documentation Archive
0.1.1+4 Aug 3, 2016 Go to the documentation of era_geojson 0.1.1+4 Download era_geojson 0.1.1+4 archive
0.1.1+3 Aug 2, 2016 Go to the documentation of era_geojson 0.1.1+3 Download era_geojson 0.1.1+3 archive
0.1.1+2 Aug 2, 2016 Go to the documentation of era_geojson 0.1.1+2 Download era_geojson 0.1.1+2 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
59
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
29
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0