MCPcopy Create free account
hub / github.com/Notgnoshi/generative / GeometryNoder

Class GeometryNoder

generative/include/generative/noding/geometry-noder.h:25–53  ·  view source on GitHub ↗

@brief Nodes a geometry using the specified geos::noding::Noder. @note The process of "noding" a geometry is finding all pairs intersections, and breaking the geometry into a sequence of non-intersecting (except at the endpoints) geos::noding::SegmentString's. @details The implementation of generative::noding::GeometryNoder is the same as geos::noding::GeometryNoder, with the sole exception that y

Source from the content-addressed store, hash-verified

23//! geos::noding::Noder.
24//! @see geos::noding::GeometryNoder
25class GeometryNoder
26{
27public:
28 //! @brief Create a GeometryNoder for the given geometry.
29 //! @param geometry The geometry to node. Likely a GEOMETRYCOLLECTION.
30 //! @param noder The Noder to use. If not specified, GeometryNoder will fall back on a
31 //! geos::noding::IteratedNoder.
32 GeometryNoder(const geos::geom::Geometry& geometry,
33 std::unique_ptr<geos::noding::Noder> noder = nullptr);
34 GeometryNoder(GeometryNoder const&) = delete;
35 GeometryNoder& operator=(GeometryNoder const&) = delete;
36
37 std::unique_ptr<geos::geom::Geometry> get_noded();
38 //! @brief A helper method to create a GeometryNoder and node the given geometry.
39 static std::unique_ptr<geos::geom::Geometry>
40 node(const geos::geom::Geometry& geometry,
41 std::unique_ptr<geos::noding::Noder> noder = nullptr);
42
43private:
44 const geos::geom::Geometry& m_geometry;
45 geos::noding::SegmentString::NonConstVect m_lines;
46 std::unique_ptr<geos::noding::Noder> m_noder;
47
48 static void extract_segment_strings(const geos::geom::Geometry& geometry,
49 geos::noding::SegmentString::NonConstVect& out);
50 geos::noding::Noder& get_noder();
51 std::unique_ptr<geos::geom::Geometry>
52 to_geometry(geos::noding::SegmentString::NonConstVect& noded);
53};
54} // namespace generative::noding

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected