コード例 #1
0
void Reader::initialize()
{
    pdal::Reader::initialize();

    std::string const& query = getOptions().getValueOrThrow<std::string>("query");
    std::string const& connection = getOptions().getValueOrThrow<std::string>("connection");


    m_session->set_log_stream(&(log()->get(logDEBUG2)));

    m_schema = fetchSchema(query);

    try
    {
        setSpatialReference(getOptions().getValueOrThrow<pdal::SpatialReference>("spatialreference"));

    }
    catch (pdal::option_not_found const&)
    {
        // If one wasn't set on the options, we'll ignore at this
        setSpatialReference(fetchSpatialReference(query));

    }

}
コード例 #2
0
ファイル: PgReader.cpp プロジェクト: adam-erickson/PDAL
void PgReader::ready(PointTableRef /*table*/)
{
    m_atEnd = false;
    m_cur_row = 0;
    m_cur_nrows = 0;
    m_cur_result = NULL;

    if (getSpatialReference().empty())
        setSpatialReference(fetchSpatialReference());

    CursorSetup();
}
コード例 #3
0
ファイル: PgReader.cpp プロジェクト: rskelly/PDAL
void PgReader::ready(PointContextRef ctx)
{
    m_atEnd = false;
    m_cur_row = 0;
    m_cur_nrows = 0;
    m_cur_result = NULL;

    if (getSpatialReference().empty())
        setSpatialReference(fetchSpatialReference());

    m_point_size = 0;
    for (auto di = m_dims.begin(); di != m_dims.end(); ++di)
        m_point_size += Dimension::size(di->m_dimType.m_type);

    CursorSetup();
}