| 251 | |
| 252 | |
| 253 | bool NitfWrap::verifyBpf(ILeStream& in, BOX3D& bounds) |
| 254 | { |
| 255 | BpfHeader h; |
| 256 | BpfDimensionList dims; |
| 257 | LogPtr l(Log::makeLog("nitfwrap", "devnull")); |
| 258 | |
| 259 | h.setLog(l); |
| 260 | |
| 261 | if (!h.read(in)) |
| 262 | return false; |
| 263 | if (!h.readDimensions(in, dims, true)) |
| 264 | return false; |
| 265 | for (auto d : dims) |
| 266 | { |
| 267 | if (d.m_id == Dimension::Id::X) |
| 268 | { |
| 269 | bounds.minx = d.m_min; |
| 270 | bounds.maxx = d.m_max; |
| 271 | } |
| 272 | if (d.m_id == Dimension::Id::Y) |
| 273 | { |
| 274 | bounds.miny = d.m_min; |
| 275 | bounds.maxy = d.m_max; |
| 276 | } |
| 277 | if (d.m_id == Dimension::Id::Z) |
| 278 | { |
| 279 | bounds.minz = d.m_min; |
| 280 | bounds.maxz = d.m_max; |
| 281 | } |
| 282 | } |
| 283 | SpatialReference srs = SpatialReference::wgs84FromZone(h.m_coordId); |
| 284 | gdal::reprojectBounds(bounds, srs, "EPSG:4326"); |
| 285 | return true; |
| 286 | } |
| 287 | |
| 288 | } //namespace nitfwrap |
| 289 | } //namespace pdal |
nothing calls this directly
no test coverage detected