GEOS: LengthIndexOfPoint.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

LengthIndexOfPoint.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2005-2006 Refractions Research Inc.
7 * Copyright (C) 2001-2002 Vivid Solutions Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************
15 *
16 * Last port: linearref/LengthIndexOfPoint.java rev. 1.10
17 *
18 **********************************************************************/
19
20 #ifndef GEOS_LINEARREF_LENGTHINDEXOFPOINT_H
21 #define GEOS_LINEARREF_LENGTHINDEXOFPOINT_H
22
23 #include <string>
24
25 #include <geos/geom/Coordinate.h>
26 #include <geos/geom/Geometry.h>
27 #include <geos/geom/LineSegment.h>
28 #include <geos/linearref/LinearLocation.h>
29
30
31 namespace geos
32 {
33 namespace linearref // geos::linearref
34 {
35
45 class LengthIndexOfPoint
46 {
47
48 private:
49 const geom::Geometry *linearGeom;
50
51 double indexOfFromStart(const geom::Coordinate& inputPt, const double minIndex) const;
52
53 double segmentNearestMeasure(const geom::LineSegment *seg,
54 const geom::Coordinate& inputPt,
55 double segmentStartMeasure) const;
56 public:
57 static double indexOf(const geom::Geometry *linearGeom, const geom::Coordinate& inputPt);
58
59 static double indexOfAfter(const geom::Geometry *linearGeom, const geom::Coordinate& inputPt, double minIndex);
60
61 LengthIndexOfPoint(const geom::Geometry *linearGeom);
62
69 double indexOf(const geom::Coordinate& inputPt) const;
70
86 double indexOfAfter(const geom::Coordinate& inputPt, double minIndex) const;
87
88 };
89 }
90 }
91 #endif
geos::geom::LineSegment
Definition: LineSegment.h:57
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
geos::linearref::LengthIndexOfPoint
Computes the length index of the point on a linear Geometry nearest a given Coordinate.
Definition: LengthIndexOfPoint.h:45
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25