void to::test<20>() { // Construct copy of 2nd point record from tested file Point pt; pt.SetCoordinates(630282.45, 4834500, 51.63); pt.SetIntensity(350); pt.SetClassification(1); pt.SetScanAngleRank(0); pt.SetUserData(3); pt.SetScanFlags(9); pt.SetTime(413665.52880000003); ensure(pt.IsValid()); test_file10_point2(pt); lasreader_iterator it(reader_); lasreader_iterator end; // find 2nd point data record lasreader_iterator fit; fit = std::find(it, end, pt); ensure(fit != end); test_file10_point2(*fit); }
void to::test<18>() { // Construct copy of 2nd point record from tested file Point pt; pt.SetCoordinates(630282.45, 4834500, 51.63); pt.SetIntensity(350); pt.SetClassification(1); pt.SetScanAngleRank(0); pt.SetUserData(3); pt.SetScanFlags(9); pt.SetTime(413665.52880000003); ensure(pt.IsValid()); test_file10_point2(pt); lasreader_iterator it(reader_); lasreader_iterator end; // Count records equal to given point object typedef lasreader_iterator::difference_type difference_type; difference_type const expected = 1; difference_type n = std::count(it, end, pt); ensure_equals(n, expected); }