Skip to content

Commit

Permalink
Allow SRS to be ignored in Mosaic filter
Browse files Browse the repository at this point in the history
Ignoring the SRS is useful when pdal has been compiled without gdal
support, and the user knows the inputs have a shared spatial reference
system.  (Attempting SRS comparison in this case would otherwise result
in an exception.)
  • Loading branch information
c42f committed Jun 29, 2013
1 parent 27ed088 commit bf6b982
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/filters/Mosaic.cpp
Expand Up @@ -59,6 +59,7 @@ void Mosaic::initialize()

const Stage& stage0 = *stages[0];
const SpatialReference& srs0 = stage0.getSpatialReference();
const bool ignoreSrs = getOptions().getValueOrDefault<bool>("ignore_srs", false);
const Schema& schema0 = stage0.getSchema();
PointCountType pointCountType0 = stage0.getPointCountType();
boost::uint64_t totalPoints = stage0.getNumPoints();
Expand All @@ -68,7 +69,7 @@ void Mosaic::initialize()
for (boost::uint32_t i=1; i<stages.size(); i++)
{
Stage& stage = *(stages[i]);
if (stage.getSpatialReference() != srs0)
if (!ignoreSrs && stage.getSpatialReference() != srs0)
throw impedance_invalid("mosaicked stages must have same srs");
if (stage.getSchema() != schema0)
throw impedance_invalid("mosaicked stages must have same schema");
Expand Down

0 comments on commit bf6b982

Please sign in to comment.