MCPcopy Create free account
hub / github.com/PDAL/PDAL / verifyBpf

Method verifyBpf

tools/nitfwrap/NitfWrap.cpp:253–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251
252
253bool 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

Callers

nothing calls this directly

Calls 4

reprojectBoundsFunction · 0.85
readDimensionsMethod · 0.80
setLogMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected