Skip to content

Commit

Permalink
fix up building in non-GDAL situations
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jan 3, 2013
1 parent a2d7fae commit 4c81d0d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -593,6 +593,8 @@ if (WIN32)
else()
target_link_libraries(${APPS_CPP_DEPENDENCIES}
${PDAL_LIB_NAME}
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS}
${TIFF_LIBRARY}
${MRSID_LIBRARY}
${GEOTIFF_LIBRARY}
Expand Down
4 changes: 2 additions & 2 deletions src/GlobalEnvironment.cpp
Expand Up @@ -197,10 +197,10 @@ plang::PythonEnvironment& GlobalEnvironment::getPythonEnvironment()
pdal::gdal::GlobalDebug* GlobalEnvironment::getGDALDebug()
{
getGDALEnvironment();
#ifdef PDAL_HAVE_GDAL
if (m_gdal_debug == 0)
m_gdal_debug = new pdal::gdal::GlobalDebug();

#endif
return m_gdal_debug;
}

Expand Down
9 changes: 6 additions & 3 deletions src/filters/Colorization.cpp
Expand Up @@ -205,6 +205,7 @@ Colorization::Colorization(const pdal::filters::Colorization& filter, PointBuffe
m_forward_transform.assign(0.0);
m_inverse_transform.assign(0.0);

#ifdef PDAL_HAVE_GDAL
std::string filename = filter.getOptions().getValueOrThrow<std::string>("raster");

filter.log()->get(logDEBUG) << "Using " << filename << " for raster" << std::endl;
Expand All @@ -219,18 +220,20 @@ Colorization::Colorization(const pdal::filters::Colorization& filter, PointBuffe

GDALInvGeoTransform(&(m_forward_transform.front()), &(m_inverse_transform.front()));


#endif

return;
}

Colorization::~Colorization()
{

#ifdef PDAL_HAVE_GDAL
if (m_ds != 0)
{
GDALClose(m_ds);
m_ds = 0;
}
#endif

}

Expand Down Expand Up @@ -273,7 +276,7 @@ bool Colorization::getPixelAndLinePosition(double x,
boost::array<double, 6> const& inverse,
boost::int32_t& pixel,
boost::int32_t& line,
GDALDatasetH ds)
void* ds)
{
#ifdef PDAL_HAVE_GDAL
pixel = (boost::int32_t) std::floor(
Expand Down

0 comments on commit 4c81d0d

Please sign in to comment.