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

Method initialize

filters/CropFilter.cpp:111–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109
110
111void CropFilter::initialize()
112{
113 // Set geometry from polygons.
114 if (m_args->m_polys.size())
115 {
116 m_geoms.clear();
117 for (Polygon& poly : m_args->m_polys)
118 {
119 // Throws if invalid.
120 poly.valid();
121 m_geoms.emplace_back(poly);
122 }
123 }
124 // Add geometry from OGR specification
125
126 for (const Polygon& poly : m_args->m_ogr.getPolygons())
127 {
128 m_geoms.push_back(poly);
129 }
130
131 m_boxes.clear();
132 for (auto& bound : m_args->m_bounds)
133 m_boxes.push_back(bound);
134
135 m_distance2 = m_args->m_distance * m_args->m_distance;
136}
137
138
139void CropFilter::ready(PointTableRef table)

Callers

nothing calls this directly

Calls 4

getPolygonsMethod · 0.80
sizeMethod · 0.45
clearMethod · 0.45
validMethod · 0.45

Tested by

no test coverage detected