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

    Constructors
    Constructor
    Description
    Constructs a sequence of a given size, populated with new MCoordinates.
    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.
    Copy constructor -- simply aliases the input array, for better performance.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static MCoordinate[]
    copy(com.vividsolutions.jts.geom.Coordinate[] coordinates)
     
    static MCoordinate[]
    copy(com.vividsolutions.jts.geom.CoordinateSequence coordSeq)
     
    com.vividsolutions.jts.geom.Envelope
    expandEnvelope(com.vividsolutions.jts.geom.Envelope env)
     
    com.vividsolutions.jts.geom.Coordinate
     
    void
    getCoordinate(int index, com.vividsolutions.jts.geom.Coordinate coord)
     
    com.vividsolutions.jts.geom.Coordinate
    getCoordinateCopy(int index)
     
    int
     
    double
    getM(int index)
     
    double
    getOrdinate(int index, int ordinateIndex)
     
    double
    getX(int index)
     
    double
    getY(int index)
     
    void
    setOrdinate(int index, int ordinateIndex, double value)
     
    int
     
    com.vividsolutions.jts.geom.Coordinate[]
     
     

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MCoordinateSequence

      public MCoordinateSequence(MCoordinate[] coordinates)
      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 new MCoordinates.
      Parameters:
      size - the size of the sequence to create
  • Method Details

    • copy

      public static MCoordinate[] copy(com.vividsolutions.jts.geom.Coordinate[] coordinates)
    • copy

      public static MCoordinate[] copy(com.vividsolutions.jts.geom.CoordinateSequence coordSeq)
    • getDimension

      public int getDimension()
      Specified by:
      getDimension in interface com.vividsolutions.jts.geom.CoordinateSequence
      See Also:
      • CoordinateSequence.getDimension()
    • getCoordinate

      public com.vividsolutions.jts.geom.Coordinate getCoordinate(int i)
      Specified by:
      getCoordinate in interface com.vividsolutions.jts.geom.CoordinateSequence
    • getCoordinateCopy

      public com.vividsolutions.jts.geom.Coordinate getCoordinateCopy(int index)
      Specified by:
      getCoordinateCopy in interface com.vividsolutions.jts.geom.CoordinateSequence
      See Also:
      • CoordinateSequence.getCoordinateCopy(int)
    • getCoordinate

      public void getCoordinate(int index, com.vividsolutions.jts.geom.Coordinate coord)
      Specified by:
      getCoordinate in interface com.vividsolutions.jts.geom.CoordinateSequence
      See Also:
      • CoordinateSequence.getCoordinate(int, com.vividsolutions.jts.geom.Coordinate)
    • getX

      public double getX(int index)
      Specified by:
      getX in interface com.vividsolutions.jts.geom.CoordinateSequence
      See Also:
      • CoordinateSequence.getX(int)
    • getY

      public double getY(int index)
      Specified by:
      getY in interface com.vividsolutions.jts.geom.CoordinateSequence
      See Also:
      • CoordinateSequence.getY(int)
    • 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:
      getOrdinate in interface com.vividsolutions.jts.geom.CoordinateSequence
      See Also:
      • CoordinateSequence.getOrdinate(int, int)
    • setOrdinate

      public void setOrdinate(int index, int ordinateIndex, double value)
      Specified by:
      setOrdinate in interface com.vividsolutions.jts.geom.CoordinateSequence
      See Also:
      • CoordinateSequence.setOrdinate(int, int, double)
    • clone

      public Object clone()
      Specified by:
      clone in interface com.vividsolutions.jts.geom.CoordinateSequence
      Overrides:
      clone in class Object
    • size

      public int size()
      Specified by:
      size in interface com.vividsolutions.jts.geom.CoordinateSequence
    • toCoordinateArray

      public com.vividsolutions.jts.geom.Coordinate[] toCoordinateArray()
      Specified by:
      toCoordinateArray in interface com.vividsolutions.jts.geom.CoordinateSequence
    • expandEnvelope

      public com.vividsolutions.jts.geom.Envelope expandEnvelope(com.vividsolutions.jts.geom.Envelope env)
      Specified by:
      expandEnvelope in interface com.vividsolutions.jts.geom.CoordinateSequence
    • toString

      public String toString()
      Overrides:
      toString in class Object