GEOS: InteriorPointArea.h Source File

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

# InteriorPointArea.h

    00001 /**********************************************************************
    00002  * $Id: InteriorPointArea.h 1820 2006-09-06 16:54:23Z 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 #ifndef GEOS_ALGORITHM_INTERIORPOINTAREA_H
    00018 #define GEOS_ALGORITHM_INTERIORPOINTAREA_H
    00019
    00020 #include <geos/geom/Coordinate.h>
    00021
    00022 // Forward declarations
    00023 namespace geos {
    00024         namespace geom {
    00025                 class Geometry;
    00026                 class LineString;
    00027                 class GeometryFactory;
    00028                 class GeometryCollection;
    00029         }
    00030 }
    00031
    00032
    00033 namespace geos {
    00034 namespace algorithm { // geos::algorithm
    00035
    00053 class InteriorPointArea {
    00054
    00055 private:
    00056
    00057         bool foundInterior;
    00058
    00059         const geom::GeometryFactory *factory;
    00060
    00061         geom::Coordinate interiorPoint;
    00062
    00063         double maxWidth;
    00064
    00065         void add(const geom::Geometry *geom);
    00066
    00067         const geom::Geometry *widestGeometry(const geom::Geometry *geometry);
    00068
    00069         const geom::Geometry *widestGeometry(const geom::GeometryCollection *gc);
    00070
    00071         geom::LineString *horizontalBisector(const geom::Geometry *geometry);
    00072
    00073 public:
    00074
    00075         InteriorPointArea(const geom::Geometry *g);
    00076
    00077         ~InteriorPointArea();
    00078
    00079         bool getInteriorPoint(geom::Coordinate& ret) const;
    00080
    00088         void addPolygon(const geom::Geometry *geometry);
    00089
    00090 };
    00091
    00092 } // namespace geos::algorithm
    00093 } // namespace geos
    00094
    00095 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
    00096
    00097 /**********************************************************************
    00098  * $Log$
    00099  * Revision 1.1  2006/03/09 16:46:48  strk
    00100  * geos::geom namespace definition, first pass at headers split
    00101  *
    00102  **********************************************************************/
    00103