public class MeasureInterpolatingVisitor extends Object implements GeometryVisitor
GeometryVisitor
that derives a Geometry
by interpolating on the measure values of the visited Geometries
.
TODO -- rewrite (is copied from SQL/MM specs)
Interpolation is used to determine any points on the 1-dimensional geometry with an m coordinate value between SM and EM inclusively. The implementation-defined interpolation algorithm is used to estimate values between measured values, usually using a mathematical function. For example, given a measure of 6 and a 2-point linestring where the m coordinate value of the start point is 4 and the m coordinate value of the end point is 8, since 6 is halfway between 4 and 8, the interpolation algorithm would be a point on the linestring halfway between the start and end points. The interpolation is within a line segment and not across line segments in an ST_Curve. The interpolation is within an ST_Curve element and not across ST_Curve elements in an ST_MultiCurve. The results are produced in a geometry collection. If there are consecutive points in the 1-dimensional geometry with an m coordinate value between SM and EM inclusively, then a curve value element is added to the geometry collection to represent the curve elements between these consecutive points. Any disconnected points in the 1-dimensional geometry value with m coordinate values between SM and EM inclusively are also added to the geometry collection. If no matching m coordinate values are found, then an empty set of type ST_Point is returned.
Constructor and Description |
---|
MeasureInterpolatingVisitor(Geometry geometry,
double startMeasure,
double endMeasure) |
Modifier and Type | Method and Description |
---|---|
Geometry |
result() |
void |
visit(GeometryCollection collection)
Visits a
GeometryCollection . |
void |
visit(LinearRing linearRing)
Visits a
LinearRing . |
void |
visit(LineString lineString)
Visits a
LineString . |
void |
visit(Point point)
Visits a
Point |
void |
visit(Polygon polygon)
Visits a
Polygon . |
void |
visit(PolyHedralSurface surface)
Visits a
PolyHedralSurface . |
public MeasureInterpolatingVisitor(Geometry geometry, double startMeasure, double endMeasure)
public void visit(Point point)
GeometryVisitor
Point
visit
in interface GeometryVisitor
public void visit(LineString lineString)
GeometryVisitor
LineString
.visit
in interface GeometryVisitor
public void visit(Polygon polygon)
GeometryVisitor
Polygon
.visit
in interface GeometryVisitor
public void visit(GeometryCollection collection)
GeometryVisitor
GeometryCollection
.
The collection will pass the visitor to it constituent parts.
visit
in interface GeometryVisitor
public void visit(LinearRing linearRing)
GeometryVisitor
LinearRing
.visit
in interface GeometryVisitor
public void visit(PolyHedralSurface surface)
GeometryVisitor
PolyHedralSurface
.visit
in interface GeometryVisitor
public Geometry result()
Copyright © 2015 geolatte.org. All rights reserved.