PDAL/PDAL — pull request #413 by gadomski (2014-08-26 14:37:46+00:00)
Title: Optionally skip high return numbers in the las writer

The las format [is](http://www.asprs.org/a/society/committees/standards/asprs_las_format_v12.pdf) [limited](http://www.asprs.org/a/society/committees/standards/asprs_las_spec_v13.pdf) [to](http://www.asprs.org/a/society/committees/standards/LAS_1_4_r11.pdf) five returns per pulse, but many data sources can produce data that exceed this limitation. By default, the las writer will [throw an exception](https://github.com/PDAL/PDAL/blob/point-context-schema/src/drivers/las/SummaryData.cpp#L88) when asked to write a point with an invalid (for las) return number.

This patch adds two new features. The main feature is a new option on the las writer, clumsily named `discard_high_return_numbers`. This is a boolean option which defaults to `false`. If `false`, no new behavior. If `true`, the las writer skip any points that have a ReturnNumber > 5. Additionally, all points with a NumberOfReturns > 5 will have NumberOfReturns clamped to 5.

The second feature is a new option on the `FauxReader` that adds ReturnNumber and NumberOfReturns to generated points. This is for testing the new las feature.

I've added unit tests for both the FauxReader and the LasWriter improvements — however, ATM the las writer tests [are disabled](https://github.com/PDAL/PDAL/blob/point-context-schema/test/unit/CMakeLists.txt#L31).