Class MultiMLineString

java.lang.Object
com.vividsolutions.jts.geom.Geometry
com.vividsolutions.jts.geom.GeometryCollection
com.vividsolutions.jts.geom.MultiLineString
org.gvsig.fmap.geom.jts.mgeom.MultiMLineString
All Implemented Interfaces:
com.vividsolutions.jts.geom.Lineal, Serializable, Cloneable, Comparable, MGeometry

public class MultiMLineString extends com.vividsolutions.jts.geom.MultiLineString implements MGeometry
See Also:
  • Field Summary

    Fields inherited from class com.vividsolutions.jts.geom.GeometryCollection

    geometries

    Fields inherited from class com.vividsolutions.jts.geom.Geometry

    envelope, factory, SRID

    Fields inherited from interface org.gvsig.fmap.geom.jts.mgeom.MGeometry

    CONSTANT, DECREASING, INCREASING, NON_MONOTONE
  • Constructor Summary

    Constructors
    Constructor
    Description
    MultiMLineString(MLineString[] MlineStrings, double mGap, com.vividsolutions.jts.geom.GeometryFactory factory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vividsolutions.jts.geom.Geometry
    Returns this MGeometry as a Geometry.
     
    protected void
     
    com.vividsolutions.jts.geom.Coordinate
    getCoordinateAtM(double m)
    Returns the Coordinate along the Geometry at the measure value
    com.vividsolutions.jts.geom.CoordinateSequence[]
    getCoordinatesBetween(double begin, double end)
    Returns the coordinatesequence(s) containing all coordinates between the begin and end measures.
     
    double
    getMatCoordinate(com.vividsolutions.jts.geom.Coordinate co, double tolerance)
    Returns the measure value at the Coordinate
    double
    Returns the maximum M-value of the MGeometry
    double
     
    double
    Returns the minimum M-value of the MGeometry
    boolean
    isMonotone(boolean strictMonotone)
    Determine whether the LRS measures (not the x,y,z coordinates) in the Coordinate sequence of the geometry is Monotone.
    void
    measureOnLength(boolean keepBeginMeasure)
    Builds measures along the Geometry based on the length from the beginning (first coordinate) of the Geometry.

    Methods inherited from class com.vividsolutions.jts.geom.MultiLineString

    equalsExact, getBoundary, getBoundaryDimension, getDimension, isClosed, reverse

    Methods inherited from class com.vividsolutions.jts.geom.GeometryCollection

    apply, apply, apply, apply, compareToSameClass, compareToSameClass, computeEnvelopeInternal, getArea, getCoordinate, getCoordinates, getGeometryN, getLength, getNumGeometries, getNumPoints, isEmpty, normalize

    Methods inherited from class com.vividsolutions.jts.geom.Geometry

    buffer, buffer, buffer, checkNotGeometryCollection, compare, compareTo, compareTo, contains, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, equal, equals, equals, equalsExact, equalsNorm, equalsTopo, geometryChanged, getCentroid, getEnvelope, getEnvelopeInternal, getFactory, getInteriorPoint, getPrecisionModel, getSRID, getUserData, hashCode, hasNonEmptyElements, hasNullElements, intersection, intersects, isEquivalentClass, isGeometryCollection, isRectangle, isSimple, isValid, isWithinDistance, norm, overlaps, relate, relate, setSRID, setUserData, symDifference, toString, toText, touches, union, union, within

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.gvsig.fmap.geom.jts.mgeom.MGeometry

    getFactory
  • Constructor Details

    • MultiMLineString

      public MultiMLineString(MLineString[] MlineStrings, double mGap, com.vividsolutions.jts.geom.GeometryFactory factory)
      Parameters:
      MlineStrings - the MLineStrings for this MultiMLineString, or null or an empty array to create the empty geometry. Elements may be empty LineStrings, but not nulls.
  • Method Details

    • geometryChangedAction

      protected void geometryChangedAction()
      Overrides:
      geometryChangedAction in class com.vividsolutions.jts.geom.Geometry
    • getGeometryType

      public String getGeometryType()
      Overrides:
      getGeometryType in class com.vividsolutions.jts.geom.MultiLineString
    • getMGap

      public double getMGap()
    • getMatCoordinate

      public double getMatCoordinate(com.vividsolutions.jts.geom.Coordinate co, double tolerance) throws MGeometryException
      Description copied from interface: MGeometry
      Returns the measure value at the Coordinate
      Specified by:
      getMatCoordinate in interface MGeometry
      Parameters:
      co - the Coordinate for which the measure value is sought
      tolerance - distance to the MGeometry within which Coordinate c has to lie
      Returns:
      the measure value if Coordinate c is within tolerance of the Geometry, else Double.NaN

      When the geometry is a ring or is self-intersecting more coordinates may be determined by one coordinate. In that case, the lowest measure is returned.

      Throws:
      MGeometryException - when this MGeometry is not monotone
    • clone

      public Object clone()
      Overrides:
      clone in class com.vividsolutions.jts.geom.GeometryCollection
    • measureOnLength

      public void measureOnLength(boolean keepBeginMeasure)
      Description copied from interface: MGeometry
      Builds measures along the Geometry based on the length from the beginning (first coordinate) of the Geometry.
      Specified by:
      measureOnLength in interface MGeometry
      Parameters:
      keepBeginMeasure - - if true, the measure of the first coordinate is maintained and used as start value, unless this measure is Double.NaN
    • getCoordinateAtM

      public com.vividsolutions.jts.geom.Coordinate getCoordinateAtM(double m) throws MGeometryException
      Description copied from interface: MGeometry
      Returns the Coordinate along the Geometry at the measure value
      Specified by:
      getCoordinateAtM in interface MGeometry
      Parameters:
      m - measure value
      Returns:
      the Coordinate if m is on the MGeometry otherwise null
      Throws:
      MGeometryException - when MGeometry is not monotone
    • getCoordinatesBetween

      public com.vividsolutions.jts.geom.CoordinateSequence[] getCoordinatesBetween(double begin, double end) throws MGeometryException
      Description copied from interface: MGeometry
      Returns the coordinatesequence(s) containing all coordinates between the begin and end measures.
      Specified by:
      getCoordinatesBetween in interface MGeometry
      Parameters:
      begin - begin measure
      end - end measure
      Returns:
      an array containing all coordinatesequences in order between begin and end. Each CoordinateSequence covers a contiguous stretch of the MGeometry.
      Throws:
      MGeometryException - when this MGeometry is not monotone
    • getMinM

      public double getMinM()
      Description copied from interface: MGeometry
      Returns the minimum M-value of the MGeometry
      Specified by:
      getMinM in interface MGeometry
      Returns:
      the minimum M-value
    • getMaxM

      public double getMaxM()
      Description copied from interface: MGeometry
      Returns the maximum M-value of the MGeometry
      Specified by:
      getMaxM in interface MGeometry
      Returns:
      the maximum M-value
    • isMonotone

      public boolean isMonotone(boolean strictMonotone)
      Description copied from interface: MGeometry
      Determine whether the LRS measures (not the x,y,z coordinates) in the Coordinate sequence of the geometry is Monotone. Monotone implies that all measures in a sequence of coordinates are consecutively increasing, decreasing or equal according to the definition of the implementing geometry. Monotonicity is a pre-condition for most operations on MGeometries. The following are examples on Monotone measure sequences on a line string:
      • [0,1,2,3,4] - Monotone Increasing
      • [4,3,2,1] - Monotone Decreasing
      • [0,1,1,2,3] - Non-strict Monotone Increasing
      • [5,3,3,0] - Non-strict Monotone Decreasing
      Specified by:
      isMonotone in interface MGeometry
      Returns:
      true if the coordinates in the CoordinateSequence of the geometry are monotone.
    • asGeometry

      public com.vividsolutions.jts.geom.Geometry asGeometry()
      Description copied from interface: MGeometry
      Returns this MGeometry as a Geometry.

      Modifying the returned Geometry will result in internal state changes.

      Specified by:
      asGeometry in interface MGeometry
      Returns:
      this object as a Geometry.