本文整理汇总了C++中PointTableRef::clearSpatialReferences方法的典型用法代码示例。如果您正苦于以下问题:C++ PointTableRef::clearSpatialReferences方法的具体用法?C++ PointTableRef::clearSpatialReferences怎么用?C++ PointTableRef::clearSpatialReferences使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointTableRef
的用法示例。
在下文中一共展示了PointTableRef::clearSpatialReferences方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
PointViewSet Stage::execute(PointTableRef table)
{
table.finalize();
PointViewSet views;
// If the inputs are empty, we're a reader.
if (m_inputs.empty())
{
views.insert(PointViewPtr(new PointView(table)));
}
else
{
for (size_t i = 0; i < m_inputs.size(); ++i)
{
Stage *prev = m_inputs[i];
PointViewSet temp = prev->execute(table);
views.insert(temp.begin(), temp.end());
}
}
PointViewSet outViews;
std::vector<StageRunnerPtr> runners;
// Put the spatial references from the views onto the table.
// The table's spatial references are only valid as long as the stage
// is running.
// ABELL - Should we clear the references once the stage run has
// completed? Wondering if that would break something where a
// writer wants to check a table's SRS.
SpatialReference srs;
table.clearSpatialReferences();
for (auto const& it : views)
table.addSpatialReference(it->spatialReference());
// Do the ready operation and then start running all the views
// through the stage.
ready(table);
for (auto const& it : views)
{
StageRunnerPtr runner(new StageRunner(this, it));
runners.push_back(runner);
runner->run();
}
// As the stages complete (synchronously at this time), propagate the
// spatial reference and merge the output views.
srs = getSpatialReference();
for (auto const& it : runners)
{
StageRunnerPtr runner(it);
PointViewSet temp = runner->wait();
// If our stage has a spatial reference, the view takes it on once
// the stage has been run.
if (!srs.empty())
for (PointViewPtr v : temp)
v->setSpatialReference(srs);
outViews.insert(temp.begin(), temp.end());
}
done(table);
return outViews;
}