| 184 | { |
| 185 | |
| 186 | void optionsWrite(const Options& writerOps) |
| 187 | { |
| 188 | StageFactory f; |
| 189 | Stage* reader(f.createStage("readers.las")); |
| 190 | |
| 191 | const std::string file(Support::datapath("las/1.2-with-color.las")); |
| 192 | Options options; |
| 193 | options.add("filename", file); |
| 194 | reader->setOptions(options); |
| 195 | |
| 196 | Stage* writer(f.createStage("writers.pgpointcloud")); |
| 197 | writer->setOptions(writerOps); |
| 198 | writer->setInput(*reader); |
| 199 | |
| 200 | PointTable table; |
| 201 | writer->prepare(table); |
| 202 | |
| 203 | PointViewSet written = writer->execute(table); |
| 204 | |
| 205 | point_count_t count(0); |
| 206 | for(auto i = written.begin(); i != written.end(); ++i) |
| 207 | count += (*i)->size(); |
| 208 | EXPECT_EQ(written.size(), 1U); |
| 209 | EXPECT_EQ(count, 1065U); |
| 210 | } |
| 211 | |
| 212 | } // unnamed namespace |
| 213 |
no test coverage detected