GEOS
3.3.7
|
00001 /********************************************************************** 00002 * $Id: InteriorPointArea.h 3746 2013-01-14 11:08:51Z strk $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2013 Sandro Santilli <strk@keybit.net> 00008 * Copyright (C) 2005-2006 Refractions Research Inc. 00009 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00010 * 00011 * This is free software; you can redistribute and/or modify it under 00012 * the terms of the GNU Lesser General Public Licence as published 00013 * by the Free Software Foundation. 00014 * See the COPYING file for more information. 00015 * 00016 ********************************************************************** 00017 * 00018 * Last port: algorithm/InteriorPointArea.java r728 (JTS-1.13+) 00019 * 00020 **********************************************************************/ 00021 00022 #ifndef GEOS_ALGORITHM_INTERIORPOINTAREA_H 00023 #define GEOS_ALGORITHM_INTERIORPOINTAREA_H 00024 00025 #include <geos/export.h> 00026 #include <geos/geom/Coordinate.h> 00027 00028 // Forward declarations 00029 namespace geos { 00030 namespace geom { 00031 class Geometry; 00032 class LineString; 00033 class GeometryFactory; 00034 class GeometryCollection; 00035 } 00036 } 00037 00038 00039 namespace geos { 00040 namespace algorithm { // geos::algorithm 00041 00059 class GEOS_DLL InteriorPointArea { 00060 00061 private: 00062 00063 bool foundInterior; 00064 00065 const geom::GeometryFactory *factory; 00066 00067 geom::Coordinate interiorPoint; 00068 00069 double maxWidth; 00070 00071 void add(const geom::Geometry *geom); 00072 00073 const geom::Geometry *widestGeometry(const geom::Geometry *geometry); 00074 00075 const geom::Geometry *widestGeometry(const geom::GeometryCollection *gc); 00076 00077 geom::LineString *horizontalBisector(const geom::Geometry *geometry); 00078 00079 public: 00080 00081 InteriorPointArea(const geom::Geometry *g); 00082 00083 ~InteriorPointArea(); 00084 00085 bool getInteriorPoint(geom::Coordinate& ret) const; 00086 00094 void addPolygon(const geom::Geometry *geometry); 00095 00096 }; 00097 00098 } // namespace geos::algorithm 00099 } // namespace geos 00100 00101 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H 00102 00103 /********************************************************************** 00104 * $Log$ 00105 * Revision 1.1 2006/03/09 16:46:48 strk 00106 * geos::geom namespace definition, first pass at headers split 00107 * 00108 **********************************************************************/ 00109