Interface MeasureGeometryOperations

  • All Known Implementing Classes:
    DefaultMeasureGeometryOperations

    public interface MeasureGeometryOperations
    A set of operations on measured (2DM/3DM) Geometrys.
    Author:
    Karel Maesen, Geovise BVBA creation-date: 4/4/12
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <P extends C2D & Measured>
      Geometry<P>
      locateAlong​(Geometry<P> geometry, double mValue)
      Creates an operation to calculate the GeometryCollection that matches the specified M-coordinate value.
      <P extends C2D & Measured>
      Geometry<P>
      locateBetween​(Geometry<P> geometry, double startMeasure, double endMeasure)
      Creates an operation to calculate the GeometryCollection that matches the specified range of M-coordinate value inclusively.
      <P extends Position & Measured>
      double
      maximumMeasure​(Geometry<P> geometry)
      Creates a GeometryOperation that returns the maximum measure value of the Positions of the specified Geometry.
      <P extends C2D & Measured>
      double
      measureAt​(Geometry<P> geometry, C2D pos, double tolerance)
      Creates a GeometryOperation to calculate the measure value at the specified point
      <P extends C2D,​M extends C2D & Measured>
      Geometry<M>
      measureOnLength​(Geometry<P> geometry, Class<M> positionTypeMarker, boolean keepBeginMeasure)
      Creates a GeometryOperation that creates a new Geometry that has the same 2D/3D-coordinates as the specified Geometry, and with measure values that correspond with the length along it (or begin-measure + length).
      <P extends Position & Measured>
      double
      minimumMeasure​(Geometry<P> geometry)
      Creates a GeometryOperation that returns the minimum measure value of the Positions of the specified Geometry.
    • Method Detail

      • locateBetween

        <P extends C2D & MeasuredGeometry<P> locateBetween​(Geometry<P> geometry,
                                                             double startMeasure,
                                                             double endMeasure)
        Creates an operation to calculate the GeometryCollection that matches the specified range of M-coordinate value inclusively.

        This method is only valid if executed on 0- or 1-dimensional objects or collections thereof.

        The semantics implemented here are specified by SFA 1.2.1, section 6.1.2.6.

        Parameters:
        geometry - the geometry on which to perform the calculation
        startMeasure - the start of the specified range of M-coordinate values
        endMeasure - the end of the specified range of M-coordinate values
        Returns:
        a GeometryOperation that calculates the GeometryCollection matching the specified range of M-coordinate values.
        Throws:
        IllegalArgumentException - if this method is executed on 2-dimensional Geometrys.
      • locateAlong

        <P extends C2D & MeasuredGeometry<P> locateAlong​(Geometry<P> geometry,
                                                           double mValue)
        Creates an operation to calculate the GeometryCollection that matches the specified M-coordinate value.

        This method is only valid if executed on 0- or 1-dimensional objects or collections thereof.

        The semantics implemented here are specified by SFA 1.2.1, section 6.1.2.6.

        Parameters:
        geometry - the geometry on which to perform the calculation
        mValue - the specified M-coordinate value
        Returns:
        a GeometryOperation that calculates the GeometryCollection matching the specified M-coordinate value.
        Throws:
        IllegalArgumentException - if this method is executed on 2-dimensional Geometrys.
      • measureAt

        <P extends C2D & Measured> double measureAt​(Geometry<P> geometry,
                                                    C2D pos,
                                                    double tolerance)
        Creates a GeometryOperation to calculate the measure value at the specified point
        Parameters:
        geometry - a linear Geometry
        pos - a Position within tolerance of the geometry
        tolerance - the maximum value allowed for distance between pos and geometry.
        Returns:
        a GeometryOperation that returns the measure value at the specified point on the specified geometry
      • measureOnLength

        <P extends C2D,​M extends C2D & MeasuredGeometry<M> measureOnLength​(Geometry<P> geometry,
                                                                                   Class<M> positionTypeMarker,
                                                                                   boolean keepBeginMeasure)
        Creates a GeometryOperation that creates a new Geometry that has the same 2D/3D-coordinates as the specified Geometry, and with measure values that correspond with the length along it (or begin-measure + length).

        The positionTypeMarker is needed because the compiler can't figure our the relationship between the input CRS and its measured variant.

        Parameters:
        geometry - the Geometry for which to build measures
        keepBeginMeasure - if true, than the measure of the first coordinate is used as start-value
        positionTypeMarker - the type of Position for the result of the created operations
        Returns:
        a GeometryOperation that returns a Geometry with measures increasing with length
      • minimumMeasure

        <P extends Position & Measured> double minimumMeasure​(Geometry<P> geometry)
        Creates a GeometryOperation that returns the minimum measure value of the Positions of the specified Geometry. If the geometry is empty, this method returns Double.NaN
        Parameters:
        geometry - the geometry for which the minimum measure is sought
        Returns:
        the minimum measure
        Throws:
        IllegalArgumentException - if the geometry is not a measured geometry
      • maximumMeasure

        <P extends Position & Measured> double maximumMeasure​(Geometry<P> geometry)
        Creates a GeometryOperation that returns the maximum measure value of the Positions of the specified Geometry. If the geometry is empty, this method returns Double.NaN
        Parameters:
        geometry - the geometry for which the maximum measure is sought
        Returns:
        the minimum measure
        Throws:
        IllegalArgumentException - if the geometry is not a measured geometry