本文整理汇总了C++中PipelineManager::views方法的典型用法代码示例。如果您正苦于以下问题:C++ PipelineManager::views方法的具体用法?C++ PipelineManager::views怎么用?C++ PipelineManager::views使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PipelineManager
的用法示例。
在下文中一共展示了PipelineManager::views方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: table
TEST(FerryFilterTest, test_ferry_copy_xml)
{
PipelineManager mgr;
mgr.readPipeline(Support::configuredpath("filters/ferry.xml"));
mgr.execute();
ConstPointTableRef table(mgr.pointTable());
PointViewSet viewSet = mgr.views();
EXPECT_EQ(viewSet.size(), 1u);
PointViewPtr view = *viewSet.begin();
EXPECT_EQ(view->size(), 1065u);
Dimension::Id::Enum state_plane_x = table.layout()->findDim("StatePlaneX");
Dimension::Id::Enum state_plane_y = table.layout()->findDim("StatePlaneY");
double lon = view->getFieldAs<double>(Dimension::Id::X, 0);
double lat = view->getFieldAs<double>(Dimension::Id::Y, 0);
double x = view->getFieldAs<double>(state_plane_x, 0);
double y = view->getFieldAs<double>(state_plane_y, 0);
EXPECT_DOUBLE_EQ(-117.2501328350574, lon);
EXPECT_DOUBLE_EQ(49.341077824192915, lat);
EXPECT_DOUBLE_EQ(637012.24, x);
EXPECT_DOUBLE_EQ(849028.31, y);
}
示例2:
TEST(MergeTest, test4)
{
using namespace pdal;
PipelineManager mgr;
mgr.readPipeline(Support::configuredpath("filters/merge.json"));
mgr.execute();
PointViewSet viewSet = mgr.views();
EXPECT_EQ(1u, viewSet.size());
PointViewPtr view = *viewSet.begin();
EXPECT_EQ(2130u, view->size());
}
示例3: specReader
TEST(MergeTest, test2)
{
using namespace pdal;
PipelineManager mgr;
PipelineReader specReader(mgr);
specReader.readPipeline(Support::configuredpath("filters/merge2.xml"));
mgr.execute();
PointViewSet viewSet = mgr.views();
EXPECT_EQ(viewSet.size(), 1u);
PointViewPtr view = *viewSet.begin();
EXPECT_EQ(view->size(), 2130u);
}
示例4:
TEST_F(PythonFilterTest, pipelineJSON)
{
PipelineManager manager;
manager.readPipeline(
Support::configuredpath("plang/programmable-update-y-dims.json"));
manager.execute();
PointViewSet viewSet = manager.views();
EXPECT_EQ(viewSet.size(), 1u);
PointViewPtr view = *viewSet.begin();
for (PointId idx = 0; idx < 10; ++idx)
{
int32_t y = view->getFieldAs<int32_t>(Dimension::Id::Y, idx);
EXPECT_EQ(y, 314);
}
}
示例5:
// Make sure we handle repeated options properly
TEST(json, issue_1941)
{
PipelineManager manager;
std::string file;
file = Support::configuredpath("pipeline/range_multi_limits.json");
manager.readPipeline(file);
EXPECT_EQ(manager.execute(), (point_count_t)5);
const PointViewSet& s = manager.views();
EXPECT_EQ(s.size(), 1U);
PointViewPtr view = *s.begin();
EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 0), 3);
EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 1), 4);
EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 2), 5);
EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 3), 8);
EXPECT_EQ(view->getFieldAs<int>(Dimension::Id::X, 4), 9);
PipelineManager manager2;
file = Support::configuredpath("pipeline/range_bad_limits.json");
EXPECT_THROW(manager2.readPipeline(file), pdal_error);
}