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

# InteriorPointLine.h

    00001 /**********************************************************************
    00002  * $Id: InteriorPointLine.h 1880 2006-10-27 11:54:17Z 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 #ifndef GEOS_ALGORITHM_INTERIORPOINTLINE_H
    00018 #define GEOS_ALGORITHM_INTERIORPOINTLINE_H
    00019
    00020 #include <geos/geom/Coordinate.h>
    00021
    00022 // Forward declarations
    00023 namespace geos {
    00024         namespace geom {
    00025                 class Geometry;
    00026                 class CoordinateSequence;
    00027         }
    00028 }
    00029
    00030
    00031 namespace geos {
    00032 namespace algorithm { // geos::algorithm
    00033
    00045 class InteriorPointLine {
    00046 public:
    00047
    00048         InteriorPointLine(const geom::Geometry *g);
    00049
    00050         ~InteriorPointLine();
    00051
    00052         //Coordinate* getInteriorPoint() const;
    00053
    00054         bool getInteriorPoint(geom::Coordinate& ret) const;
    00055
    00056 private:
    00057
    00058         bool hasInterior;
    00059
    00060         geom::Coordinate centroid;
    00061
    00062         double minDistance;
    00063
    00064         geom::Coordinate interiorPoint;
    00065
    00066         void addInterior(const geom::Geometry *geom);
    00067
    00068         void addInterior(const geom::CoordinateSequence *pts);
    00069
    00070         void addEndpoints(const geom::Geometry *geom);
    00071
    00072         void addEndpoints(const geom::CoordinateSequence *pts);
    00073
    00074         void add(const geom::Coordinate& point);
    00075
    00076 };
    00077
    00078 } // namespace geos::algorithm
    00079 } // namespace geos
    00080
    00081 #endif // GEOS_ALGORITHM_INTERIORPOINTLINE_H
    00082
    00083 /**********************************************************************
    00084  * $Log$
    00085  * Revision 1.1  2006/03/09 16:46:48  strk
    00086  * geos::geom namespace definition, first pass at headers split
    00087  *
    00088  **********************************************************************/
    00089