public class DefaultMeasureGeometryOperations extends Object implements MeasureGeometryOperations
MeasureGeometryOperations.
This implementation conforms to the SQL/MM and SFA 1.2.1 specifications. See Simple Feature Access - Part 1: common architecture, sec. 6.1.2.6
Default| Constructor and Description |
|---|
DefaultMeasureGeometryOperations() |
| Modifier and Type | Method and Description |
|---|---|
<P extends C2D & Measured> |
locateAlong(Geometry<P> geometry,
double mValue)
Creates an operation to calculate the
GeometryCollection that matches the specified M-coordinate value. |
<P extends C2D & Measured> |
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> |
maximumMeasure(Geometry<P> geometry)
Creates a
GeometryOperation that returns the maximum measure value of the Positions
of the specified Geometry. |
<P extends C2D & Measured> |
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> |
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> |
minimumMeasure(Geometry<P> geometry)
Creates a
GeometryOperation that returns the minimum measure value of the Positions
of the specified Geometry. |
public <P extends C2D & Measured> Geometry<P> locateAlong(Geometry<P> geometry, double mValue)
MeasureGeometryOperationsGeometryCollection 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.
locateAlong in interface MeasureGeometryOperationsgeometry - the geometry on which to perform the calculationmValue - the specified M-coordinate valueGeometryOperation that calculates the GeometryCollection matching
the specified M-coordinate value.public <P extends C2D & Measured> Geometry<P> locateBetween(Geometry<P> geometry, double startMeasure, double endMeasure)
MeasureGeometryOperationsGeometryCollection 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.
locateBetween in interface MeasureGeometryOperationsgeometry - 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 valuesGeometryOperation that calculates the GeometryCollection matching the
specified range of M-coordinate values.public <P extends C2D & Measured> double measureAt(Geometry<P> geometry, C2D pos, double tolerance)
MeasureGeometryOperationsGeometryOperation to calculate the measure value
at the specified pointmeasureAt in interface MeasureGeometryOperationsgeometry - a linear Geometrypos - a Position within tolerance of the geometrytolerance - the maximum value allowed for distance between pos and geometry.GeometryOperation that returns the measure value at the specified point on the specified geometrypublic <P extends C2D,M extends C2D & Measured> Geometry<M> measureOnLength(Geometry<P> geometry, Class<M> positionTypeMarker, boolean keepBeginMeasure)
MeasureGeometryOperationsGeometryOperation 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.
measureOnLength in interface MeasureGeometryOperationsgeometry - the Geometry for which to build measurespositionTypeMarker - the type of Position for the result of the created operationskeepBeginMeasure - if true, than the measure of the first coordinate is used as start-valueGeometryOperation that returns a Geometry with measures increasing with lengthpublic <P extends Position & Measured> double minimumMeasure(Geometry<P> geometry)
MeasureGeometryOperationsGeometryOperation that returns the minimum measure value of the Positions
of the specified Geometry.
If the geometry is empty, this method returns Double.NaNminimumMeasure in interface MeasureGeometryOperationsgeometry - the geometry for which the minimum measure is soughtpublic <P extends Position & Measured> double maximumMeasure(Geometry<P> geometry)
MeasureGeometryOperationsGeometryOperation that returns the maximum measure value of the Positions
of the specified Geometry.
If the geometry is empty, this method returns Double.NaNmaximumMeasure in interface MeasureGeometryOperationsgeometry - the geometry for which the maximum measure is soughtCopyright © 2023 geolatte.org. All rights reserved.