/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (c) 2024 Martin Davis * Copyright (C) 2024 Paul Ramsey * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as published * by the Free Software Foundation. * See the COPYING file for more information. * **********************************************************************/ #pragma once #include #include #include #include // Forward declarations namespace geos { namespace geom { class LineString; class Geometry; } } using geos::geom::LineString; using geos::geom::Geometry; using geos::geom::GeometryFilter; namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng class GEOS_DLL LineStringExtracter : public GeometryFilter { private: std::vector& comps; public: LineStringExtracter(std::vector& p_comps) : comps(p_comps) {} void filter_ro(const geom::Geometry* geom) override; static void getLines(const Geometry* geom, std::vector& lines); static std::vector getLines(const Geometry* geom); /** * Extracts the {@link LineString} elements from a single {@link Geometry} * and returns them as either a {@link LineString} or {@link MultiLineString}. * * @param geom the geometry from which to extract * @return a linear geometry */ // static std::unique_ptr getGeometry(const Geometry* geom); }; } // namespace geos.operation.relateng } // namespace geos.operation } // namespace geos