stay_points 0.10.1 copy "stay_points: ^0.10.1" to clipboard
stay_points: ^0.10.1 copied to clipboard

Stay points/meaningful locations identification

example/stay_points_example.dart

import 'package:stay_points/stay_points.dart';
import 'package:units/units.dart';

main() {
    Threshold threshold = new Threshold(minimumTime: new Duration(minutes: 4), minimumDistance: new Length.fromMeters(value: 20.0));

    var extractor = new StayPointIdentification(threshold);
    DateTime date1 = new DateTime(2017, 9, 27, 13, 06, 29);
    Location location1 = new Location.fromDegrees(
        latitude: 41.141903,
        longitude: 1.401316,
        timestamp: date1
    );

    DateTime date2 = new DateTime(2017, 9, 27, 13, 12, 11);
    Location location2 = new Location.fromDegrees(
        latitude: 41.141183,
        longitude: 1.401788,
        timestamp: date2);

    List<StayPoint> stayPoints = extractor.process(locations: [location1, location2]);
    StayPoint first = stayPoints.first;
    int detected = stayPoints.length;
    print("Stay-points detected for the provided location path: ${detected}");
    print("First Stay-point detected centroid: ${first.latitude.degrees},${first.longitude.degrees}, arrival: ${first.arrival}, departurde: ${first.departure}");
}
0
likes
30
pub points
0%
popularity

Publisher

verified publisheryeradis.com

Stay points/meaningful locations identification

Homepage

License

MIT (LICENSE)

Dependencies

great_circle_distance, units

More

Packages that depend on stay_points