| 249 | |
| 250 | |
| 251 | void GDALWriter::writeView(const PointViewPtr view) |
| 252 | { |
| 253 | m_expandByPoint = false; |
| 254 | |
| 255 | // When we're running in standard mode, it's better to get the bounds and |
| 256 | // expand once, rather than have to do this for every point, since an |
| 257 | // expansion causes data to move. |
| 258 | if (!m_fixedGrid) |
| 259 | { |
| 260 | BOX2D bounds; |
| 261 | view->calculateBounds(bounds); |
| 262 | // If the view has no points, skip to avoid an error in createGrid |
| 263 | if (!bounds.valid()) |
| 264 | return; |
| 265 | else if (!m_grid) |
| 266 | createGrid(bounds); |
| 267 | else |
| 268 | { |
| 269 | m_grid->expandToInclude(bounds.minx, bounds.miny); |
| 270 | m_grid->expandToInclude(bounds.maxx, bounds.maxy); |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | PointRef point(*view, 0); |
| 275 | for (PointId idx = 0; idx < view->size(); ++idx) |
| 276 | { |
| 277 | point.setPointId(idx); |
| 278 | processOne(point); |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | |
| 283 | bool GDALWriter::processOne(PointRef& point) |
nothing calls this directly
no test coverage detected