GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2009 Sandro Santilli <strk@keybit.net> 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 ********************************************************************** 00014 * 00015 * Last port: noding/BasicSegmentString.java rev. 1.1 (JTS-1.9) 00016 * 00017 **********************************************************************/ 00018 00019 #ifndef GEOS_NODING_BASICSEGMENTSTRING_H 00020 #define GEOS_NODING_BASICSEGMENTSTRING_H 00021 00022 #include <geos/export.h> 00023 #include <geos/noding/SegmentString.h> // for inheritance 00024 #include <geos/geom/CoordinateSequence.h> // for inlines (size()) 00025 00026 #include <geos/inline.h> 00027 00028 #include <vector> 00029 00030 // Forward declarations 00031 namespace geos { 00032 namespace algorithm { 00033 //class LineIntersector; 00034 } 00035 } 00036 00037 namespace geos { 00038 namespace noding { // geos.noding 00039 00050 class GEOS_DLL BasicSegmentString : public SegmentString { 00051 00052 public: 00053 00055 // 00060 BasicSegmentString(geom::CoordinateSequence *newPts, 00061 const void* newContext) 00062 : 00063 SegmentString(newContext), 00064 pts(newPts) 00065 {} 00066 00067 virtual ~BasicSegmentString() 00068 {} 00069 00071 virtual unsigned int size() const 00072 { 00073 return pts->size(); 00074 } 00075 00077 virtual const geom::Coordinate& getCoordinate(unsigned int i) const; 00078 00080 virtual geom::CoordinateSequence* getCoordinates() const; 00081 00083 virtual bool isClosed() const; 00084 00086 virtual std::ostream& print(std::ostream& os) const; 00087 00095 int getSegmentOctant(unsigned int index) const; 00096 00097 private: 00098 00099 geom::CoordinateSequence *pts; 00100 00101 }; 00102 00103 } // namespace geos.noding 00104 } // namespace geos 00105 00106 #endif // ndef GEOS_NODING_BASICSEGMENTSTRING_H 00107