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

Method prepared

filters/PMFFilter.cpp:109–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void PMFFilter::prepared(PointTableRef table)
110{
111 const PointLayoutPtr layout(table.layout());
112
113 if ((m_groundClass == m_otherClass) && !m_onlyGround)
114 {
115 throwError("Ground and non-ground class cannot be"
116 "equal when only_ground is false.");
117 }
118
119 for (auto& r : m_args->m_ignored)
120 {
121 r.m_id = layout->findDim(r.m_name);
122 if (r.m_id == Id::Unknown)
123 throwError("Invalid dimension name in 'ignored' option: '" +
124 r.m_name + "'.");
125 }
126
127 if (m_args->m_returns.size())
128 {
129 for (auto& r : m_args->m_returns)
130 {
131 Utils::trim(r);
132 if ((r != "first") && (r != "intermediate") && (r != "last") &&
133 (r != "only"))
134 {
135 throwError("Unrecognized 'returns' value: '" + r + "'.");
136 }
137 }
138
139 if (!layout->hasDim(Id::ReturnNumber) ||
140 !layout->hasDim(Id::NumberOfReturns))
141 {
142 log()->get(LogLevel::Warning) << "Could not find ReturnNumber and "
143 "NumberOfReturns. Skipping "
144 "segmentation of last returns and "
145 "proceeding with all returns.\n";
146 m_args->m_returns.clear();
147 }
148 }
149}
150
151PointViewSet PMFFilter::run(PointViewPtr input)
152{

Callers

nothing calls this directly

Calls 7

trimFunction · 0.85
hasDimMethod · 0.80
logFunction · 0.50
findDimMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected