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 Position s
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 Position s
of the specified Geometry. |
public <P extends C2D & Measured> Geometry<P> locateAlong(Geometry<P> geometry, double mValue)
MeasureGeometryOperations
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.
locateAlong
in interface MeasureGeometryOperations
geometry
- 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)
MeasureGeometryOperations
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.
locateBetween
in interface MeasureGeometryOperations
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 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)
MeasureGeometryOperations
GeometryOperation
to calculate the measure value
at the specified pointmeasureAt
in interface MeasureGeometryOperations
geometry
- a linear Geometry
pos
- 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)
MeasureGeometryOperations
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.
measureOnLength
in interface MeasureGeometryOperations
geometry
- 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)
MeasureGeometryOperations
GeometryOperation
that returns the minimum measure value of the Position
s
of the specified Geometry.
If the geometry is empty, this method returns Double.NaNminimumMeasure
in interface MeasureGeometryOperations
geometry
- the geometry for which the minimum measure is soughtpublic <P extends Position & Measured> double maximumMeasure(Geometry<P> geometry)
MeasureGeometryOperations
GeometryOperation
that returns the maximum measure value of the Position
s
of the specified Geometry.
If the geometry is empty, this method returns Double.NaNmaximumMeasure
in interface MeasureGeometryOperations
geometry
- the geometry for which the maximum measure is soughtCopyright © 2021 geolatte.org. All rights reserved.