21 #ifndef GEOS_LINEARREF_LINEARLOCATION_H
22 #define GEOS_LINEARREF_LINEARLOCATION_H
27 #include <geos/geom/Coordinate.h>
28 #include <geos/geom/Geometry.h>
29 #include <geos/geom/LineSegment.h>
46 unsigned int componentIndex;
47 unsigned int segmentIndex;
48 double segmentFraction;
88 LinearLocation(
unsigned int segmentIndex = 0,
double segmentFraction = 0.0);
90 LinearLocation(
unsigned int componentIndex,
unsigned int segmentIndex,
double segmentFraction);
97 void clamp(
const geom::Geometry* linear);
107 void snapToVertex(
const geom::Geometry* linearGeom,
double minDistance);
124 void setToEnd(
const geom::Geometry* linear);
162 geom::Coordinate
getCoordinate(
const geom::Geometry* linearGeom)
const;
171 std::auto_ptr<geom::LineSegment>
getSegment(
const geom::Geometry* linearGeom)
const;
180 bool isValid(
const geom::Geometry* linearGeom)
const;
201 int compareLocationValues(
unsigned int componentIndex1,
unsigned int segmentIndex1,
double segmentFraction1)
const;
217 unsigned int componentIndex0,
unsigned int segmentIndex0,
double segmentFraction0,
218 unsigned int componentIndex1,
unsigned int segmentIndex1,
double segmentFraction1);
237 bool isEndpoint(
const geom::Geometry& linearGeom)
const;
239 friend std::ostream& operator<< (std::ostream& out,
const LinearLocation& obj );
unsigned int getComponentIndex() const
int compareTo(const LinearLocation &other) const
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
bool isOnSameSegment(const LinearLocation &loc) const
bool isEndpoint(const geom::Geometry &linearGeom) const
Tests whether this location is an endpoint of the linear component it refers to.
void snapToVertex(const geom::Geometry *linearGeom, double minDistance)
double getSegmentFraction() const
int compareLocationValues(unsigned int componentIndex1, unsigned int segmentIndex1, double segmentFraction1) const
std::auto_ptr< geom::LineSegment > getSegment(const geom::Geometry *linearGeom) const
double getSegmentLength(const geom::Geometry *linearGeom) const
static LinearLocation getEndLocation(const geom::Geometry *linear)
unsigned int getSegmentIndex() const
void setToEnd(const geom::Geometry *linear)
geom::Coordinate getCoordinate(const geom::Geometry *linearGeom) const
LinearLocation(unsigned int segmentIndex=0, double segmentFraction=0.0)
static geom::Coordinate pointAlongSegmentByFraction(const geom::Coordinate &p0, const geom::Coordinate &p1, double frac)
void clamp(const geom::Geometry *linear)
bool isValid(const geom::Geometry *linearGeom) const