00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEOS_LINEARREF_LENGTHLOCATIONMAP_H
00022 #define GEOS_LINEARREF_LENGTHLOCATIONMAP_H
00023
00024 #include <geos/geom/Coordinate.h>
00025 #include <geos/geom/Geometry.h>
00026 #include <geos/linearref/LinearLocation.h>
00027
00028 namespace geos
00029 {
00030 namespace linearref
00031 {
00032
00039 class LengthLocationMap
00040 {
00041
00042
00043 private:
00044 const geom::Geometry *linearGeom;
00045
00046 LinearLocation getLocationForward(double length) const;
00047
00048 public:
00049
00050
00051
00052
00053
00062 static LinearLocation getLocation(const geom::Geometry *linearGeom, double length);
00063
00072 static double getLength(const geom::Geometry *linearGeom, const LinearLocation& loc);
00073
00074 LengthLocationMap(const geom::Geometry *linearGeom);
00075
00084 LinearLocation getLocation(double length) const;
00085
00086 double getLength(const LinearLocation& loc) const;
00087
00088 };
00089 }
00090 }
00091 #endif