Skip to content

Commit

Permalink
Fix for #142, actually use the z_offset reference if requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Ramsey committed Jun 24, 2013
1 parent 0676a11 commit 682c2e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/filters/InPlaceReprojection.cpp
Expand Up @@ -206,17 +206,17 @@ void InPlaceReprojection::setDimension( std::string const& name,

void InPlaceReprojection::reprojectOffsets( double& offset_x,
double& offset_y,
double& )
double& offset_z)
{

#ifdef PDAL_HAVE_GDAL
int ret = 0;

double dummy_x(0.0);
double dummy_z(0.0);
bool doOffsetZ = getOptions().getValueOrDefault<bool>("do_offset_z", false);

double* x = doOffsetZ ? &offset_x : &dummy_x;
ret = OCTTransform(m_transform_ptr.get(), 1, &offset_x, &offset_y, x);
double* z = doOffsetZ ? &offset_z : &dummy_z;
ret = OCTTransform(m_transform_ptr.get(), 1, &offset_x, &offset_y, z);
if (!ret)
{
std::ostringstream msg;
Expand Down

0 comments on commit 682c2e1

Please sign in to comment.