Skip to content

Commit

Permalink
Merge pull request #149 from pramsey/master
Browse files Browse the repository at this point in the history
Bounds update in Reprojection should min/max crossover
  • Loading branch information
hobu committed Jul 3, 2013
2 parents 2484dd4 + f227d70 commit a179ee1
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/filters/InPlaceReprojection.cpp
Expand Up @@ -557,20 +557,24 @@ void IteratorBase::updateBounds(PointBuffer& buffer)
return;
}

try
{
Bounds<double> newBounds(minx, miny, minz, maxx, maxy, maxz);

buffer.setSpatialBounds(newBounds);

}
catch (pdal::bounds_error&)
{
Bounds<double> newBounds(minx, miny, oldBounds.getMinimum(2), maxx, maxy, oldBounds.getMaximum(2));

buffer.setSpatialBounds(newBounds);

}
try
{
Bounds<double> newBounds(minx, miny, minz, maxx, maxy, maxz);
buffer.setSpatialBounds(newBounds);
}
catch (pdal::bounds_error&)
{
try
{
Bounds<double> newBounds(minx, miny, oldBounds.getMinimum(2), maxx, maxy, oldBounds.getMaximum(2));
buffer.setSpatialBounds(newBounds);
}
catch (pdal::bounds_error&)
{
Bounds<double> newBounds = buffer.calculateBounds(true);
buffer.setSpatialBounds(newBounds);
}
}

return;
}
Expand Down

0 comments on commit a179ee1

Please sign in to comment.