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