Class DefaultMeasureGeometryOperations

    • Constructor Detail

      • DefaultMeasureGeometryOperations

        public DefaultMeasureGeometryOperations()
    • Method Detail

      • locateAlong

        public <P extends C2D & MeasuredGeometry<P> locateAlong​(Geometry<P> geometry,
                                                                  double mValue)
        Description copied from interface: MeasureGeometryOperations
        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.

        Specified by:
        locateAlong in interface MeasureGeometryOperations
        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.
      • locateBetween

        public <P extends C2D & MeasuredGeometry<P> locateBetween​(Geometry<P> geometry,
                                                                    double startMeasure,
                                                                    double endMeasure)
        Description copied from interface: MeasureGeometryOperations
        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.

        Specified by:
        locateBetween in interface MeasureGeometryOperations
        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.
      • measureAt

        public <P extends C2D & Measured> double measureAt​(Geometry<P> geometry,
                                                           C2D pos,
                                                           double tolerance)
        Description copied from interface: MeasureGeometryOperations
        Creates a GeometryOperation to calculate the measure value at the specified point
        Specified by:
        measureAt in interface MeasureGeometryOperations
        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

        public <P extends C2D,​M extends C2D & MeasuredGeometry<M> measureOnLength​(Geometry<P> geometry,
                                                                                          Class<M> positionTypeMarker,
                                                                                          boolean keepBeginMeasure)
        Description copied from interface: MeasureGeometryOperations
        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.

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

        public <P extends Position & Measured> double minimumMeasure​(Geometry<P> geometry)
        Description copied from interface: MeasureGeometryOperations
        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
        Specified by:
        minimumMeasure in interface MeasureGeometryOperations
        Parameters:
        geometry - the geometry for which the minimum measure is sought
        Returns:
        the minimum measure
      • maximumMeasure

        public <P extends Position & Measured> double maximumMeasure​(Geometry<P> geometry)
        Description copied from interface: MeasureGeometryOperations
        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
        Specified by:
        maximumMeasure in interface MeasureGeometryOperations
        Parameters:
        geometry - the geometry for which the maximum measure is sought
        Returns:
        the minimum measure