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

Method get_edges

generative/noding/geometry-graph.cpp:71–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71std::vector<std::unique_ptr<geos::geom::LineString>> GeometryGraph::get_edges() const
72{
73 const auto pairs = this->get_edge_pairs();
74 std::vector<std::unique_ptr<geos::geom::LineString>> edges;
75 edges.reserve(pairs.size());
76
77 for (const auto& pair : pairs)
78 {
79 auto coords = std::make_unique<geos::geom::CoordinateSequence>(0, false, false, false);
80 coords->add(pair.first.coord());
81 coords->add(pair.second.coord());
82 auto edge = m_factory.createLineString(std::move(coords));
83 edges.push_back(std::move(edge));
84 }
85
86 return edges;
87}
88
89GeometryGraph::Node&
90GeometryGraph::find_or_insert(Nodes_t& inserted_coords, const geos::geom::Coordinate& coord)

Callers 2

TESTFunction · 0.80
polygonizeFunction · 0.80

Calls 2

get_edge_pairsMethod · 0.95
coordMethod · 0.80

Tested by 1

TESTFunction · 0.64