本文整理汇总了C++中geom::Geometry::getDimension方法的典型用法代码示例。如果您正苦于以下问题:C++ Geometry::getDimension方法的具体用法?C++ Geometry::getDimension怎么用?C++ Geometry::getDimension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geom::Geometry
的用法示例。
在下文中一共展示了Geometry::getDimension方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
/* Could be an XMLTester class private but oh well.. */
static int
checkBufferSuccess(geom::Geometry const& gRes, geom::Geometry const& gRealRes, double dist)
{
int success = 1;
do
{
if ( gRes.getGeometryTypeId() != gRealRes.getGeometryTypeId() )
{
std::cerr << "Expected result is of type "
<< gRes.getGeometryType()
<< "; obtained result is of type "
<< gRealRes.getGeometryType()
<< std::endl;
success=0;
break;
}
// Is a buffer always an area ?
if ( gRes.getDimension() != 2 )
{
std::cerr << "Don't know how to validate "
<< "result of buffer operation "
<< "when expected result is not an "
<< "areal type."
<< std::endl;
}
geos::xmltester::BufferResultMatcher matcher;
if ( ! matcher.isBufferResultMatch(gRealRes,
gRes,
dist) )
{
std::cerr << "BufferResultMatcher FAILED" << std::endl;
success=0;
break;
}
}
while (0);
return success;
}