GEOS: LengthIndexedLine.h Source File

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

- File List

# LengthIndexedLine.h

    00001 /**********************************************************************
    00002  * $Id: LengthIndexedLine.h 3255 2011-03-01 17:56:10Z mloskot $
    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/LengthIndexedLine.java rev. 1.10
    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   // geos::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