Skip to content

Commit

Permalink
allow specifying the 'Z' dimension name with an option for interpolat…
Browse files Browse the repository at this point in the history
…ion #124
  • Loading branch information
hobu committed Jul 25, 2013
1 parent 69708ec commit c1b99ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/drivers/p2g/Writer.cpp
Expand Up @@ -150,7 +150,8 @@ Options Writer::getDefaultOptions()
Option radius("radius", default_radius);

Option fill_window_size("fill_window_size", 3);

Option dim_z("Z", "Z", "Name of Z dimension to interpolate");
options.add(dim_z);
options.add(grid_x);
options.add(grid_y);
options.add(radius);
Expand Down Expand Up @@ -225,10 +226,11 @@ void Writer::writeEnd(boost::uint64_t /*actualNumPointsWritten*/)
boost::uint32_t Writer::writeBuffer(const PointBuffer& data)
{
const Schema& schema = data.getSchema();


std::string z_name = getOptions().getValueOrDefault<std::string>("Z", "Z");
pdal::Dimension const& dimX = schema.getDimension("X");
pdal::Dimension const& dimY = schema.getDimension("Y");
pdal::Dimension const& dimZ = schema.getDimension("Z");
pdal::Dimension const& dimZ = schema.getDimension(z_name);


boost::uint32_t numPoints = 0;
Expand Down

0 comments on commit c1b99ee

Please sign in to comment.