Skip to content

Commit

Permalink
allow BOX2D or BOX3D for writers.gdal bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jan 31, 2017
1 parent 5edf404 commit f703656
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions io/GDALWriter.cpp
Expand Up @@ -129,7 +129,7 @@ void GDALWriter::prepared(PointTableRef table)

void GDALWriter::readyTable(PointTableRef table)
{
if (m_bounds.empty() && !table.supportsView())
if (m_bounds.to2d().empty() && !table.supportsView())
throw pdal_error(getName() + ": 'bounds' option required in "
"streaming mode.");
}
Expand All @@ -140,8 +140,8 @@ void GDALWriter::readyFile(const std::string& filename,
{
m_outputFilename = filename;
m_srs = srs;
if (m_bounds.valid())
createGrid(m_bounds);
if (m_bounds.to2d().valid())
createGrid(m_bounds.to2d());
}


Expand Down Expand Up @@ -176,8 +176,8 @@ void GDALWriter::expandGrid(BOX2D bounds)
void GDALWriter::writeView(const PointViewPtr view)
{
BOX2D bounds;
if (m_bounds.valid())
bounds = m_bounds;
if (m_bounds.to2d().valid())
bounds = m_bounds.to2d();
else
view->calculateBounds(bounds);

Expand Down
2 changes: 1 addition & 1 deletion io/GDALWriter.hpp
Expand Up @@ -73,7 +73,7 @@ class PDAL_DLL GDALWriter : public FlexWriter
std::string m_outputFilename;
std::string m_drivername;
SpatialReference m_srs;
BOX2D m_bounds;
Bounds m_bounds;
BOX2D m_curBounds;
double m_edgeLength;
Arg *m_radiusArg;
Expand Down

0 comments on commit f703656

Please sign in to comment.