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

Method setBounds

plugins/nitf/io/NitfFileWriter.cpp:277–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276
277void NitfFileWriter::setBounds(const BOX3D& bounds)
278{
279 m_bounds = bounds;
280
281 //NITF decimal degree values for corner coordinates only has a
282 // precision of 3 after the decimal. This may cause an invalid
283 // polygon due to rounding errors with a small tile. Therefore
284 // instead of rounding min values will use the floor value and
285 // max values will use the ceiling values.
286 m_bounds.minx = (floor(m_bounds.minx * 1000)) / 1000.0;
287 m_bounds.miny = (floor(m_bounds.miny * 1000)) / 1000.0;
288 m_bounds.maxx = (ceil(m_bounds.maxx * 1000)) / 1000.0;
289 m_bounds.maxy = (ceil(m_bounds.maxy * 1000)) / 1000.0;
290}
291
292
293void NitfFileWriter::wrapData(const char *buf, size_t size)

Callers 1

doneFileMethod · 0.45

Calls 1

ceilFunction · 0.85

Tested by

no test coverage detected