void AttributeFilter::ready(PointContext ctx) { m_gdal_debug = std::shared_ptr<pdal::gdal::Debug>( new pdal::gdal::Debug(isDebug(), log())); for (auto& dim_par : m_dimensions) { Dimension::Id::Enum t = ctx.findDim(dim_par.first); dim_par.second.dim = t; if (dim_par.second.isogr) { OGRDSPtr ds = OGRDSPtr(OGROpen(dim_par.second.datasource.c_str(), 0, 0), OGRDataSourceDeleter()); if (!ds) { std::ostringstream oss; oss << "Unable to open data source '" << dim_par.second.datasource <<"'"; throw pdal_error(oss.str()); } dim_par.second.ds = ds; } } }
virtual void ready(PointContext ctx) { m_dim = ctx.findDim(m_dimName); }