Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

LengthIndexOfPoint.h

00001 /**********************************************************************
00002  * $Id: LengthIndexOfPoint.h 3012 2010-06-19 11:14:21Z strk $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2005-2006 Refractions Research Inc.
00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00009  *
00010  * This is free software; you can redistribute and/or modify it under
00011  * the terms of the GNU Lesser General Public Licence as published
00012  * by the Free Software Foundation.
00013  * See the COPYING file for more information.
00014  *
00015  **********************************************************************
00016  *
00017  * Last port: linearref/LengthIndexOfPoint.java rev. 1.10
00018  *
00019  **********************************************************************/
00020 
00021 #ifndef GEOS_LINEARREF_LENGTHINDEXOFPOINT_H
00022 #define GEOS_LINEARREF_LENGTHINDEXOFPOINT_H
00023 
00024 #include <string>
00025 
00026 #include <geos/geom/Coordinate.h>
00027 #include <geos/geom/Geometry.h>
00028 #include <geos/geom/LineSegment.h>
00029 #include <geos/linearref/LinearLocation.h>
00030 
00031 
00032 namespace geos
00033 {
00034 namespace linearref   // geos::linearref
00035 {
00036 
00046 class LengthIndexOfPoint
00047 {
00048 
00049 private:
00050         const geom::Geometry *linearGeom;
00051 
00052         double indexOfFromStart(const geom::Coordinate& inputPt, const double minIndex) const;
00053 
00054         double segmentNearestMeasure(const geom::LineSegment *seg, 
00055                                const geom::Coordinate& inputPt,
00056                                double segmentStartMeasure) const;
00057 public:
00058         static double indexOf(const geom::Geometry *linearGeom, const geom::Coordinate& inputPt);
00059 
00060         static double indexOfAfter(const geom::Geometry *linearGeom, const geom::Coordinate& inputPt, double minIndex);
00061 
00062         LengthIndexOfPoint(const geom::Geometry *linearGeom);
00063 
00070         double indexOf(const geom::Coordinate& inputPt) const;
00071 
00087         double indexOfAfter(const geom::Coordinate& inputPt, double minIndex) const;
00088 
00089 };
00090 }
00091 }
00092 #endif

Generated on Wed Jul 4 09:00:03 2012 for GEOS by  doxygen 1.3.9.1