Ensures that a CoordinateSequence forms a valid ring, returning a new closed sequence of the correct length if required. If the input sequence is already a valid ring, it is returned without modification. If the input sequence is too short or is not closed, it is extended with one or more copies of the start point.
-
Parameters:
-
fact - fact the CoordinateSequenceFactory to use to create the new sequence
-
seq - seq the sequence to test
-
Returns:
-
the original sequence, if it was a valid ring, or a new sequence which is valid.