GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00007 * Copyright (C) 2006 Refractions Research Inc. 00008 * 00009 * This is free software; you can redistribute and/or modify it under 00010 * the terms of the GNU Lesser General Public Licence as published 00011 * by the Free Software Foundation. 00012 * See the COPYING file for more information. 00013 * 00014 **********************************************************************/ 00015 00016 #ifndef GEOS_UTIL_COORDINATEARRAYFILTER_H 00017 #define GEOS_UTIL_COORDINATEARRAYFILTER_H 00018 00019 #include <geos/export.h> 00020 #include <cassert> 00021 00022 #include <geos/geom/CoordinateFilter.h> 00023 #include <geos/geom/CoordinateSequence.h> 00024 #include <geos/geom/Coordinate.h> 00025 00026 namespace geos { 00027 namespace util { // geos::util 00028 00036 class GEOS_DLL CoordinateArrayFilter: public geom::CoordinateFilter { 00037 private: 00038 geom::Coordinate::ConstVect &pts; // target vector reference 00039 public: 00045 CoordinateArrayFilter(geom::Coordinate::ConstVect& target) 00046 : 00047 pts(target) 00048 {} 00049 00050 virtual ~CoordinateArrayFilter() {} 00051 00052 virtual void filter_ro(const geom::Coordinate *coord) 00053 { 00054 pts.push_back(coord); 00055 } 00056 }; 00057 00058 00059 } // namespace geos.util 00060 } // namespace geos 00061 00062 #endif // GEOS_UTIL_COORDINATEARRAYFILTER_H