19 #ifndef GEOS_LINEARREF_LOCATIONINDEXEDLINE_H 20 #define GEOS_LINEARREF_LOCATIONINDEXEDLINE_H 22 #include <geos/export.h> 23 #include <geos/geom/Coordinate.h> 24 #include <geos/geom/Geometry.h> 25 #include <geos/geom/Lineal.h> 26 #include <geos/linearref/LinearLocation.h> 27 #include <geos/linearref/LocationIndexOfPoint.h> 28 #include <geos/linearref/LocationIndexOfLine.h> 29 #include <geos/util/IllegalArgumentException.h> 45 void checkGeometryType()
47 if ( ! dynamic_cast<const geom::Lineal*>(linearGeom) )
61 : linearGeom(linearGeom)
104 double offsetDistance)
const 107 index.
getSegment(linearGeom)->pointAlongOffset(
149 return LocationIndexOfPoint::indexOf(linearGeom, pt);
179 return LocationIndexOfPoint::indexOfAfter(linearGeom, pt, &minIndex);
212 return LocationIndexOfPoint::indexOf(linearGeom, pt);
246 return index.
isValid(linearGeom);
260 loc.
clamp(linearGeom);
LinearLocation clampIndex(const LinearLocation &index) const
Computes a valid index for this line by clamping the given index to the valid range of index values...
Definition: LocationIndexedLine.h:257
static LinearLocation * indicesOf(const geom::Geometry *linearGeom, const geom::Geometry *subLine)
Determines the location of a subline along a linear Geometry.
LinearLocation * indicesOf(const geom::Geometry *subLine) const
Computes the indices for a subline of the line.
Definition: LocationIndexedLine.h:193
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
geom::Coordinate extractPoint(const LinearLocation &index, double offsetDistance) const
Computes the Coordinate for the point on the line at the given index, offset by the given distance...
Definition: LocationIndexedLine.h:103
geom::Coordinate extractPoint(const LinearLocation &index) const
Computes the Coordinate for the point on the line at the given index.
Definition: LocationIndexedLine.h:79
void clamp(const geom::Geometry *linear)
LocationIndexedLine(const geom::Geometry *linearGeom)
Constructs an object which allows linear referencing along a given linear Geometry.
Definition: LocationIndexedLine.h:60
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
Indicates one or more illegal arguments.
Definition: IllegalArgumentException.h:34
Represents a location along a LineString or MultiLineString.
Definition: LinearLocation.h:43
LinearLocation getStartIndex() const
Returns the index of the start of the line.
Definition: LocationIndexedLine.h:221
LinearLocation project(const geom::Coordinate &pt) const
Computes the index for the closest point on the line to the given point.
Definition: LocationIndexedLine.h:210
LinearLocation getEndIndex() const
Returns the index of the end of the line.
Definition: LocationIndexedLine.h:232
LinearLocation indexOf(const geom::Coordinate &pt) const
Computes the index for a given point on the line.
Definition: LocationIndexedLine.h:147
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geom::Geometry * extractLine(const LinearLocation &startIndex, const LinearLocation &endIndex) const
Computes the LineString for the interval on the line between the given indices.
Definition: LocationIndexedLine.h:125
bool isValidIndex(const LinearLocation &index) const
Tests whether an index is in the valid index range for the line.
Definition: LocationIndexedLine.h:244
static LinearLocation getEndLocation(const geom::Geometry *linear)
std::auto_ptr< geom::LineSegment > getSegment(const geom::Geometry *linearGeom) const
LinearLocation indexOfAfter(const geom::Coordinate &pt, const LinearLocation &minIndex) const
Finds the index for a point on the line which is greater than the given index.
Definition: LocationIndexedLine.h:176
double getSegmentFraction() const
Supports linear referencing along a linear Geometry using LinearLocations as the index.
Definition: LocationIndexedLine.h:40
geom::Coordinate getCoordinate(const geom::Geometry *linearGeom) const
bool isValid(const geom::Geometry *linearGeom) const