|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.geom.CoordinateSequences
public class CoordinateSequences
Utility functions for manipulating CoordinateSequence
s
Constructor Summary | |
---|---|
CoordinateSequences()
|
Method Summary | |
---|---|
static void |
copy(CoordinateSequence src,
int srcPos,
CoordinateSequence dest,
int destPos,
int length)
Copies a section of a CoordinateSequence to another CoordinateSequence . |
static void |
copyCoord(CoordinateSequence src,
int srcPos,
CoordinateSequence dest,
int destPos)
Copies a coordinate of a CoordinateSequence to another CoordinateSequence . |
static CoordinateSequence |
ensureValidRing(CoordinateSequenceFactory fact,
CoordinateSequence seq)
Ensures that a CoordinateSequence forms a valid ring, returning a new closed sequence of the correct length if required. |
static CoordinateSequence |
extend(CoordinateSequenceFactory fact,
CoordinateSequence seq,
int size)
|
static boolean |
isRing(CoordinateSequence seq)
Tests whether a CoordinateSequence forms a valid LinearRing ,
by checking the sequence length and closure
(whether the first and last points are identical in 2D). |
static void |
reverse(CoordinateSequence seq)
Reverses the coordinates in a sequence in-place. |
static void |
swap(CoordinateSequence seq,
int i,
int j)
Swaps two coordinates in a sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CoordinateSequences()
Method Detail |
---|
public static void reverse(CoordinateSequence seq)
public static void swap(CoordinateSequence seq, int i, int j)
seq
- i
- j
- public static void copy(CoordinateSequence src, int srcPos, CoordinateSequence dest, int destPos, int length)
CoordinateSequence
to another CoordinateSequence
.
The sequences must have the same dimension.
src
- srcPos
- dest
- destPos
- length
- public static void copyCoord(CoordinateSequence src, int srcPos, CoordinateSequence dest, int destPos)
CoordinateSequence
to another CoordinateSequence
.
The sequences must have the same dimension.
src
- srcPos
- dest
- destPos
- public static boolean isRing(CoordinateSequence seq)
CoordinateSequence
forms a valid LinearRing
,
by checking the sequence length and closure
(whether the first and last points are identical in 2D).
Self-intersection is not checked.
seq
- the sequence to test
LinearRing
public static CoordinateSequence ensureValidRing(CoordinateSequenceFactory fact, CoordinateSequence seq)
fact
- the CoordinateSequenceFactory to use to create the new sequenceseq
- the sequence to test
public static CoordinateSequence extend(CoordinateSequenceFactory fact, CoordinateSequence seq, int size)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |