Skip to content

Commit

Permalink
test that GDAL == 1.10 and error if we don't for NITF driver
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jan 4, 2013
1 parent 3c174b3 commit 9a875c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/drivers/nitf/Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
#include "cpl_conv.h"
#include "cpl_string.h"

#if ((GDAL_VERSION_MAJOR == 1 && GDAL_VERSION_MINOR < 10) || (GDAL_VERSION_MAJOR < 1))
#error "NITF support requires GDAL 1.10 or GDAL 2.0+"
#endif



namespace pdal
{
Expand Down
12 changes: 12 additions & 0 deletions src/drivers/nitf/Writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,20 @@

#include <pdal/PointBuffer.hpp>

#ifdef PDAL_HAVE_GDAL
#include "NitfFile.hpp"
#include "nitflib.h"


#include "gdal.h"
#include "cpl_vsi.h"
#include "cpl_conv.h"
#include "cpl_string.h"

#if ((GDAL_VERSION_MAJOR == 1 && GDAL_VERSION_MINOR < 10) || (GDAL_VERSION_MAJOR < 1))
#error "NITF support requires GDAL 1.10 or GDAL 2.0+"
#endif


// NOTES
//
Expand Down Expand Up @@ -146,3 +156,5 @@ boost::property_tree::ptree Writer::toPTree() const
}
}
} // namespaces

#endif

0 comments on commit 9a875c3

Please sign in to comment.