Skip to content

Commit

Permalink
Error if axis ordering is used without GDAL 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Feb 13, 2020
1 parent 9e52f76 commit e7604f0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions filters/ReprojectionFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ void ReprojectionFilter::addArgs(ProgramArgs& args)
{
args.add("out_srs", "Output spatial reference", m_outSRS).setPositional();
args.add("in_srs", "Input spatial reference", m_inSRS);
args.add("in_axis_ordering", "Axis ordering override for in_srs", m_inAxisOrderingArg, {} );
args.add("out_axis_ordering", "Axis ordering override for out_srs", m_outAxisOrderingArg, {} );
args.add("in_axis_ordering", "Axis ordering override for in_srs",
m_inAxisOrderingArg);
args.add("out_axis_ordering", "Axis ordering override for out_srs",
m_outAxisOrderingArg);
}


Expand Down Expand Up @@ -106,6 +108,10 @@ void ReprojectionFilter::prepared(PointTableRef table)

};

#if (GDAL_VERSION_MAJOR < 3)
if (m_inAxisOrderingArg.size()) || m_outAxisOrderingArg.size())
throwError("Axis ordering not supported with GDAL 2.");
#endif
// Check that the sorted vector is 1,2 or 1,2,3
auto check = [this] (const std::vector<int>& in)
{
Expand Down

0 comments on commit e7604f0

Please sign in to comment.