GEOS 3.3.8

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

- File List

LengthIndexedLine.h
1 /**********************************************************************
2 * $Id: LengthIndexedLine.h 3255 2011-03-01 17:56:10Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: linearref/LengthIndexedLine.java rev. 1.10
18 *
19 **********************************************************************/
20
21 #ifndef GEOS_LINEARREF_LENGTHINDEXEDLINE_H
22 #define GEOS_LINEARREF_LENGTHINDEXEDLINE_H
23
24 #include <geos/export.h>
25 #include <geos/geom/Coordinate.h>
26 #include <geos/geom/Geometry.h>
27 #include <geos/linearref/LinearLocation.h>
28
29 namespace geos
30 {
31 namespace linearref // geos::linearref
32 {
33
45 class GEOS_DLL LengthIndexedLine
46 {
47 private:
48 const geom::Geometry *linearGeom;
49 LinearLocation locationOf(double index) const;
50
51 public:
52
60 LengthIndexedLine(const geom::Geometry *linearGeom);
61
73 geom::Coordinate extractPoint(double index) const;
74
75
92 geom::Coordinate extractPoint(double index, double offsetDistance) const;
93
104 geom::Geometry *extractLine(double startIndex, double endIndex) const;
105
106
124 double indexOf(const geom::Coordinate& pt) const;
125
148 double indexOfAfter(const geom::Coordinate& pt, double minIndex) const;
149
159 double* indicesOf(const geom::Geometry *subLine) const;
160
161
171 double project(const geom::Coordinate& pt) const;
172
177 double getStartIndex() const;
178
183 double getEndIndex() const;
184
191 bool isValidIndex(double index) const;
192
193
200 double clampIndex(double index) const;
201 };
202 }
203 }
204 #endif