| 208 | |
| 209 | |
| 210 | void NitfWrap::verify(BOX3D& bounds) |
| 211 | { |
| 212 | std::istream *stream = FileUtils::openFile(m_inputFile); |
| 213 | |
| 214 | if (!stream) |
| 215 | { |
| 216 | std::ostringstream oss; |
| 217 | |
| 218 | oss << "Couldn't open input file '" << m_inputFile << "'."; |
| 219 | throw error(oss.str()); |
| 220 | } |
| 221 | |
| 222 | bool compression; |
| 223 | ILeStream in(stream); |
| 224 | IStreamMarker mark(in); |
| 225 | if (!verifyLas(in, bounds, compression)) |
| 226 | { |
| 227 | mark.rewind(); |
| 228 | if (!verifyBpf(in, bounds)) |
| 229 | throw error("Input file must be LAS/LAZ or BPF."); |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | |
| 234 | bool NitfWrap::verifyLas(ILeStream& in, BOX3D& bounds, bool& compressed) |