00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEOS_LINEARREF_LENGTHINDEXEDLINE_H
00022 #define GEOS_LINEARREF_LENGTHINDEXEDLINE_H
00023
00024 #include <geos/export.h>
00025 #include <geos/geom/Coordinate.h>
00026 #include <geos/geom/Geometry.h>
00027 #include <geos/linearref/LinearLocation.h>
00028
00029 namespace geos
00030 {
00031 namespace linearref
00032 {
00033
00045 class GEOS_DLL LengthIndexedLine
00046 {
00047 private:
00048 const geom::Geometry *linearGeom;
00049 LinearLocation locationOf(double index) const;
00050
00051 public:
00052
00060 LengthIndexedLine(const geom::Geometry *linearGeom);
00061
00073 geom::Coordinate extractPoint(double index) const;
00074
00075
00092 geom::Coordinate extractPoint(double index, double offsetDistance) const;
00093
00104 geom::Geometry *extractLine(double startIndex, double endIndex) const;
00105
00106
00124 double indexOf(const geom::Coordinate& pt) const;
00125
00148 double indexOfAfter(const geom::Coordinate& pt, double minIndex) const;
00149
00159 double* indicesOf(const geom::Geometry *subLine) const;
00160
00161
00171 double project(const geom::Coordinate& pt) const;
00172
00177 double getStartIndex() const;
00178
00183 double getEndIndex() const;
00184
00191 bool isValidIndex(double index) const;
00192
00193
00200 double clampIndex(double index) const;
00201 };
00202 }
00203 }
00204 #endif