LinearRing.random constructor
LinearRing.random()
Creates a random LinearRing with 3 Coordinates.
Example:
LinearRing.random(); // LinearRing([Coordinate(0.0, 0.0), Coordinate(0.0, 0.0), Coordinate(0.0, 0.0)])
Implementation
factory LinearRing.random() {
List<Coordinate> coordinates = [];
coordinates.add(Coordinate.random());
coordinates.add(Coordinate.random());
coordinates.add(Coordinate.random());
coordinates.add(coordinates[0]);
return LinearRing(coordinates);
}