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

Method validateSwitches

kernels/TIndexKernel.cpp:237–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235
236
237void TIndexKernel::validateSwitches(ProgramArgs& args)
238{
239 if (m_subcommand == "merge")
240 {
241 if (!m_wkt.empty() && !m_bounds.empty())
242 throw pdal_error("Can't specify both 'polygon' and "
243 "'bounds' options.");
244 if (!m_bounds.empty())
245 m_wkt = m_bounds.toWKT();
246 }
247 else
248 {
249 int argc = static_cast<int>(!m_filespec.empty()) +
250 static_cast<int>(!m_listfile.empty()) + static_cast<int>(m_usestdin);
251 if (argc > 1)
252 throw pdal_error("Can't specify more than one of --glob, "
253 "--filelist or --stdin.");
254 if (!argc)
255 throw pdal_error("Must specify either --glob, --filelist or"
256 " --stdin.");
257 if (m_prefix.size() && m_absPath)
258 throw pdal_error("Can't specify both --write_absolute_path and "
259 "--path_prefix options.");
260 if (args.set("a_srs"))
261 m_overrideASrs = true;
262 if (m_driverName == "ESRI Shapefile")
263 m_maxFieldSize = 254;
264 }
265}
266
267
268int TIndexKernel::execute()

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
toWKTMethod · 0.45
sizeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected