read<T extends Geometry> method
T
read<
T extends Geometry>( - String wellKnownText
)
Implementation
T read<T extends Geometry>(String wellKnownText) {
final formatterWKT = wellKnownText.toUpperCase();
if (formatterWKT.startsWith(Point.wktType))
return _readPoint(formatterWKT) as T;
else if (formatterWKT.startsWith(LineString.wktType))
return _readLineString(formatterWKT) as T;
else if (formatterWKT.startsWith(Polygon.wktType))
return _readPolygon(formatterWKT) as T;
else
throw ArgumentError("Unknown geometry type: $wellKnownText");
}