Package org.gvsig.fmap.geom.jts.mgeom
Class MCoordinateSequence
java.lang.Object
org.gvsig.fmap.geom.jts.mgeom.MCoordinateSequence
- All Implemented Interfaces:
com.vividsolutions.jts.geom.CoordinateSequence,Serializable,Cloneable
public class MCoordinateSequence
extends Object
implements com.vividsolutions.jts.geom.CoordinateSequence, Serializable
Implements the CoordinateSequence interface. In this implementation,
Coordinates returned by #toArray and #get are live -- parties that change
them are actually changing the MCoordinateSequence's underlying data.
- See Also:
-
Field Summary
Fields inherited from interface com.vividsolutions.jts.geom.CoordinateSequence
M, X, Y, Z -
Constructor Summary
ConstructorsConstructorDescriptionMCoordinateSequence(int size) Constructs a sequence of a given size, populated with newMCoordinates.MCoordinateSequence(com.vividsolutions.jts.geom.Coordinate[] copyCoords) Constructor that makes a copy of an array of Coordinates.MCoordinateSequence(com.vividsolutions.jts.geom.CoordinateSequence coordSeq) Constructor that makes a copy of a CoordinateSequence.MCoordinateSequence(MCoordinate[] coordinates) Copy constructor -- simply aliases the input array, for better performance. -
Method Summary
Modifier and TypeMethodDescriptionclone()static MCoordinate[]copy(com.vividsolutions.jts.geom.Coordinate[] coordinates) static MCoordinate[]copy(com.vividsolutions.jts.geom.CoordinateSequence coordSeq) com.vividsolutions.jts.geom.EnvelopeexpandEnvelope(com.vividsolutions.jts.geom.Envelope env) com.vividsolutions.jts.geom.CoordinategetCoordinate(int i) voidgetCoordinate(int index, com.vividsolutions.jts.geom.Coordinate coord) com.vividsolutions.jts.geom.CoordinategetCoordinateCopy(int index) intdoublegetM(int index) doublegetOrdinate(int index, int ordinateIndex) doublegetX(int index) doublegetY(int index) voidsetOrdinate(int index, int ordinateIndex, double value) intsize()com.vividsolutions.jts.geom.Coordinate[]toString()
-
Constructor Details
-
MCoordinateSequence
Copy constructor -- simply aliases the input array, for better performance.- Parameters:
coordinates-
-
MCoordinateSequence
public MCoordinateSequence(com.vividsolutions.jts.geom.Coordinate[] copyCoords) Constructor that makes a copy of an array of Coordinates. Always makes a copy of the input array, since the actual class of the Coordinates in the input array may be different from MCoordinate.- Parameters:
copyCoords-
-
MCoordinateSequence
public MCoordinateSequence(com.vividsolutions.jts.geom.CoordinateSequence coordSeq) Constructor that makes a copy of a CoordinateSequence.- Parameters:
coordSeq-
-
MCoordinateSequence
public MCoordinateSequence(int size) Constructs a sequence of a given size, populated with newMCoordinates.- Parameters:
size- the size of the sequence to create
-
-
Method Details
-
copy
-
copy
-
getDimension
public int getDimension()- Specified by:
getDimensionin interfacecom.vividsolutions.jts.geom.CoordinateSequence- See Also:
-
getCoordinate
public com.vividsolutions.jts.geom.Coordinate getCoordinate(int i) - Specified by:
getCoordinatein interfacecom.vividsolutions.jts.geom.CoordinateSequence
-
getCoordinateCopy
public com.vividsolutions.jts.geom.Coordinate getCoordinateCopy(int index) - Specified by:
getCoordinateCopyin interfacecom.vividsolutions.jts.geom.CoordinateSequence- See Also:
-
getCoordinate
public void getCoordinate(int index, com.vividsolutions.jts.geom.Coordinate coord) - Specified by:
getCoordinatein interfacecom.vividsolutions.jts.geom.CoordinateSequence- See Also:
-
getX
public double getX(int index) - Specified by:
getXin interfacecom.vividsolutions.jts.geom.CoordinateSequence- See Also:
-
getY
public double getY(int index) - Specified by:
getYin interfacecom.vividsolutions.jts.geom.CoordinateSequence- See Also:
-
getM
public double getM(int index) - Returns:
- the measure value of the coordinate in the index
-
getOrdinate
public double getOrdinate(int index, int ordinateIndex) - Specified by:
getOrdinatein interfacecom.vividsolutions.jts.geom.CoordinateSequence- See Also:
-
setOrdinate
public void setOrdinate(int index, int ordinateIndex, double value) - Specified by:
setOrdinatein interfacecom.vividsolutions.jts.geom.CoordinateSequence- See Also:
-
clone
-
size
public int size()- Specified by:
sizein interfacecom.vividsolutions.jts.geom.CoordinateSequence
-
toCoordinateArray
public com.vividsolutions.jts.geom.Coordinate[] toCoordinateArray()- Specified by:
toCoordinateArrayin interfacecom.vividsolutions.jts.geom.CoordinateSequence
-
expandEnvelope
public com.vividsolutions.jts.geom.Envelope expandEnvelope(com.vividsolutions.jts.geom.Envelope env) - Specified by:
expandEnvelopein interfacecom.vividsolutions.jts.geom.CoordinateSequence
-
toString
-