Package org.geolatte.geom
Interface MeasureGeometryOperations
-
- All Known Implementing Classes:
DefaultMeasureGeometryOperations
public interface MeasureGeometryOperationsA set of operations on measured (2DM/3DM)Geometrys.- Author:
- Karel Maesen, Geovise BVBA creation-date: 4/4/12
-
-
Field Summary
Fields Modifier and Type Field Description static MeasureGeometryOperationsDefaultDefault implementation of this interface
-
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 theGeometryCollectionthat 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 theGeometryCollectionthat matches the specified range of M-coordinate value inclusively.<P extends Position & Measured>
doublemaximumMeasure(Geometry<P> geometry)Creates aGeometryOperationthat returns the maximum measure value of thePositions of the specified Geometry.<P extends C2D & Measured>
doublemeasureAt(Geometry<P> geometry, C2D pos, double tolerance)Creates aGeometryOperationto 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 aGeometryOperationthat creates a new Geometry that has the same 2D/3D-coordinates as the specifiedGeometry, and with measure values that correspond with the length along it (or begin-measure + length).<P extends Position & Measured>
doubleminimumMeasure(Geometry<P> geometry)Creates aGeometryOperationthat returns the minimum measure value of thePositions of the specified Geometry.
-
-
-
Field Detail
-
Default
static final MeasureGeometryOperations Default
Default implementation of this interface
-
-
Method Detail
-
locateBetween
<P extends C2D & Measured> Geometry<P> locateBetween(Geometry<P> geometry, double startMeasure, double endMeasure)
Creates an operation to calculate theGeometryCollectionthat 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 calculationstartMeasure- the start of the specified range of M-coordinate valuesendMeasure- the end of the specified range of M-coordinate values- Returns:
- a
GeometryOperationthat calculates theGeometryCollectionmatching the specified range of M-coordinate values. - Throws:
IllegalArgumentException- if this method is executed on 2-dimensionalGeometrys.
-
locateAlong
<P extends C2D & Measured> Geometry<P> locateAlong(Geometry<P> geometry, double mValue)
Creates an operation to calculate theGeometryCollectionthat 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 calculationmValue- the specified M-coordinate value- Returns:
- a
GeometryOperationthat calculates theGeometryCollectionmatching the specified M-coordinate value. - Throws:
IllegalArgumentException- if this method is executed on 2-dimensionalGeometrys.
-
measureAt
<P extends C2D & Measured> double measureAt(Geometry<P> geometry, C2D pos, double tolerance)
Creates aGeometryOperationto calculate the measure value at the specified point- Parameters:
geometry- a linearGeometrypos- aPositionwithin tolerance of the geometrytolerance- the maximum value allowed for distance between pos and geometry.- Returns:
- a
GeometryOperationthat returns the measure value at the specified point on the specified geometry
-
measureOnLength
<P extends C2D,M extends C2D & Measured> Geometry<M> measureOnLength(Geometry<P> geometry, Class<M> positionTypeMarker, boolean keepBeginMeasure)
Creates aGeometryOperationthat creates a new Geometry that has the same 2D/3D-coordinates as the specifiedGeometry, 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- theGeometryfor which to build measureskeepBeginMeasure- if true, than the measure of the first coordinate is used as start-valuepositionTypeMarker- the type ofPositionfor the result of the created operations- Returns:
- a
GeometryOperationthat returns a Geometry with measures increasing with length
-
minimumMeasure
<P extends Position & Measured> double minimumMeasure(Geometry<P> geometry)
Creates aGeometryOperationthat returns the minimum measure value of thePositions 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 aGeometryOperationthat returns the maximum measure value of thePositions 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
-
-