void Reader::initialize() { pdal::Reader::initialize(); setNumPoints(m_numPoints); setPointCountType(PointCount_Fixed); setBounds(m_bounds); }
Reader::Reader(const Options& options, const PointBuffer& buffer) : pdal::Reader(options) , m_buffer(buffer) { setNumPoints(buffer.getNumPoints()); setBounds(buffer.getSpatialBounds()); setSchema(buffer.getSchema()); setPointCountType(PointCount_Fixed); return; }
void Reader::initialize() { pdal::Reader::initialize(); Schema& schema = getSchemaRef(); schema = Schema(getDefaultDimensions()); setNumPoints(m_numPoints); setPointCountType(PointCount_Fixed); setBounds(m_bounds); }
void Reader::initialize() { pdal::Reader::initialize(); boost::scoped_ptr<PipelineManager> tmp(new PipelineManager()); m_manager.swap(tmp); PipelineReader xmlreader(*m_manager); bool isWriter = xmlreader.readPipeline(m_filename); if (isWriter) { throw pdal_error("pipeline file is not a Reader"); } m_stage = m_manager->getStage(); m_stage->initialize(); setNumPoints(m_stage->getNumPoints()); setPointCountType(m_stage->getPointCountType()); setBounds(m_stage->getBounds()); return; }
void Mosaic::initialize() { MultiFilter::initialize(); const std::vector<Stage*>& stages = getPrevStages(); const Stage& stage0 = *stages[0]; const SpatialReference& srs0 = stage0.getSpatialReference(); const Schema& schema0 = stage0.getSchema(); PointCountType pointCountType0 = stage0.getPointCountType(); boost::uint64_t totalPoints = stage0.getNumPoints(); Bounds<double> bigbox(stage0.getBounds()); // we will only mosaic if all the stages have the same core properties: SRS, schema, etc for (boost::uint32_t i=1; i<stages.size(); i++) { Stage& stage = *(stages[i]); if (stage.getSpatialReference() != srs0) throw impedance_invalid("mosaicked stages must have same srs"); if (stage.getSchema() != schema0) throw impedance_invalid("mosaicked stages must have same schema"); if (stage.getPointCountType() == PointCount_Unknown) pointCountType0 = PointCount_Unknown; totalPoints += stage.getNumPoints(); bigbox.grow(stage.getBounds()); } if (pointCountType0 == PointCount_Unknown) totalPoints = 0; setCoreProperties(stage0); setPointCountType(pointCountType0); setNumPoints(totalPoints); return; }