# Class LinearRing

java.lang.Object
uk.ac.starlink.tfcat.LinearRing

public class LinearRing extends Object
Represents a linear ring as defined in the TFCat specification (from the GeoJSON specification).

Since:
  9 Feb 2022
Author:
  Mark Taylor

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`LinearRing(Position[] distinctPositions)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Position[]`
`getDistinctPositions()`
Returns an array of the positions defining this ring; the last one is not a duplicate of the first.
`boolean`
`isClockwise()`
Indicates the winding direction for this ring.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### LinearRing

protected LinearRing(Position[] distinctPositions)
Constructor.

Parameters:
  `distinctPositions` - positions defining the ring; the last one is not a duplicate of the first

## Method Details

### getDistinctPositions

public Position[] 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