GeoUtility class

The GeoUtility class is used for performing various transformations on coordinates (ie. re-centering, shifting, scaling, etc.).

Constructors

GeoUtility()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isClockwise(List<GeoCoordinate2D> vertices) bool
Check whether the sequence of paths defined by vertices is moving in clockwise or counter-clockwise direction.
neworigin(GeoCoordinate2D origin, List<GeoCoordinate2D> coords, [bool bInPlace = false]) List<GeoCoordinate2D>
Shift coordinates to a new origin by subtracting each coordinates (x,y) with the new origin. If bInPlace is true, the coords array values will be updated, otherwise a new coordinate array will be returned.
pointFromTo2D(GeoCoordinate2D from, GeoCoordinate2D to, double length) GeoCoordinate2D
Calculate the point length distance from point from, moving towards point to in a 2-dimensional plane.
pointFromTo3D(GeoCoordinate from, GeoCoordinate to, double length) GeoCoordinate
Calculate the point length distance from point from, moving towards point to in a 3-dimensional plane.
recenter(GeoCoordinate2D center, List<GeoCoordinate2D> coords, [bool bInPlace = false]) List<GeoCoordinate2D>
Center the coordinates defined in coords based on new center (or origin). If bInPlace is true, the coords array values will be updated, otherwise a new coordinate array will be returned.
scaleToFit(Size size, BoxFit boxFit, List<GeoCoordinate2D> coords, [bool bRecenter = false, bool bInPlace = false]) List<GeoCoordinate2D>
Adjust coordinates coords within rectangle defined by dimensions size such that it meets boxFit criteria. If bInPlace is true, the coords array values will be updated, otherwise a new coordinate array will be returned.
toOffset(GeoCoordinate2D coord) → dynamic
Convert a 2-dimensional coordinate to Offset
toOffsetList(List<GeoCoordinate2D> coords) → dynamic
Convert a 2-dimensional coordinate array in Offset array