From 882a303cc2464f298fc04bd52c59a41c31af87ba Mon Sep 17 00:00:00 2001 From: Lukas Himsel Date: Mon, 20 Jun 2022 09:28:33 +0200 Subject: [PATCH] start new signing mechanism from #46 --- lib/src/geojson.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/src/geojson.dart b/lib/src/geojson.dart index 75f2e3b..93669d4 100644 --- a/lib/src/geojson.dart +++ b/lib/src/geojson.dart @@ -68,9 +68,13 @@ abstract class GeoJSONObject { /// Coordinate types, following https://tools.ietf.org/html/rfc7946#section-4 abstract class CoordinateType implements Iterable { + final bool isSigned; final List _items; - CoordinateType(List list) : _items = List.of(list, growable: false); + CoordinateType( + List list, + this.isSigned, + ) : _items = List.of(list, growable: false); @override num get first => _items.first; @@ -180,7 +184,7 @@ abstract class CoordinateType implements Iterable { CoordinateType toSigned(); - bool get isSigned; + CoordinateType toUnsigned(); _untilSigned(val, limit) { if (val > limit) {