1 /********************************************************************** 2 * 3 * GEOS - Geometry Engine Open Source 4 * http://geos.osgeo.org 5 * 6 * Copyright (C) 2019 Daniel Baston <dbaston@gmail.com> 7 * 8 * This is free software; you can redistribute and/or modify it under 9 * the terms of the GNU Lesser General Public Licence as published 10 * by the Free Software Foundation. 11 * See the COPYING file for more information. 12 * 13 **********************************************************************/ 14 15 #ifndef GEOS_OP_VALID_REPEATEDPOINTREMOVER_H 16 #define GEOS_OP_VALID_REPEATEDPOINTREMOVER_H 17 18 #include <geos/geom/CoordinateArraySequence.h> 19 20 namespace geos { 21 namespace operation { 22 namespace valid { 23 24 /// Removes repeated, consecutive equal, coordinates from a CoordinateSequence. 25 class GEOS_DLL RepeatedPointRemover { 26 27 /// \brief 28 /// Returns a new CoordinateSequence being a copy of the input 29 /// with any consecutive equal Coordinate removed. 30 /// 31 /// Equality test is 2D based 32 /// 33 /// Ownership of returned object goes to the caller. 34 /// \param seq 35 /// \return 36 public: 37 static std::unique_ptr<geom::CoordinateArraySequence> removeRepeatedPoints(const geom::CoordinateSequence* seq); 38 }; 39 } 40 } 41 } 42 43 #endif 44