MCPcopy Create free account
hub / github.com/PDAL/PDAL / collectPath

Function collectPath

kernels/private/density/OGR.cpp:59–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57{
58
59void collectPath(const hexer::Path& path, OGRGeometryH polygon)
60{
61 OGRGeometryH ring = OGR_G_CreateGeometry(wkbLinearRing);
62
63 for (const hexer::Point& p : path.points())
64 OGR_G_AddPoint_2D(ring, p.m_x, p.m_y);
65
66 if( OGR_G_AddGeometryDirectly(polygon, ring) != OGRERR_NONE )
67 {
68 std::ostringstream oss;
69 oss << "Unable to add geometry with error '" <<
70 CPLGetLastErrorMsg() << "'";
71 throw pdal::pdal_error(oss.str());
72 }
73
74 for (const hexer::Path *path : path.subPaths())
75 collectPath(*path, polygon);
76}
77
78OGRGeometryH collectHexagon(hexer::HexId const& id, hexer::BaseGrid& grid)
79{

Callers 1

writeBoundaryMethod · 0.85

Calls 2

strMethod · 0.80
pointsMethod · 0.45

Tested by

no test coverage detected