Package uk.ac.starlink.tfcat
Class LinearRing
java.lang.Object
uk.ac.starlink.tfcat.LinearRing
Represents a linear ring as defined in the TFCat specification
(from the GeoJSON specification).
- Since:
- 9 Feb 2022
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPosition[]
Returns an array of the positions defining this ring; the last one is not a duplicate of the first.boolean
Indicates the winding direction for this ring.
-
Constructor Details
-
LinearRing
Constructor.- Parameters:
distinctPositions
- positions defining the ring; the last one is not a duplicate of the first
-
-
Method Details
-
getDistinctPositions
Returns an array of the positions defining this ring; the last one is not a duplicate of the first.- Returns:
- array of distinct positions, length of the number of vertices
-
isClockwise
public boolean isClockwise()Indicates the winding direction for this ring.- Returns:
- true for clockwise winding direction, false for anticlockwise
-