本文整理汇总了C++中LineStringPtr::getArea方法的典型用法代码示例。如果您正苦于以下问题:C++ LineStringPtr::getArea方法的具体用法?C++ LineStringPtr::getArea怎么用?C++ LineStringPtr::getArea使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LineStringPtr
的用法示例。
在下文中一共展示了LineStringPtr::getArea方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void object::test<16>()
{
const std::size_t size = 5;
CoordArrayPtr coords = new geos::geom::CoordinateArraySequence(size);
ensure( coords != 0 );
ensure_equals( coords->getSize(), size );
LineStringPtr line = factory_.createLineString(coords);
ensure( "createLineString() returned null pointer.", line != 0 );
ensure( "createLineString() returned empty point.", !line->isEmpty() );
ensure( line->isSimple() );
ensure( line->getCoordinate() != 0 );
// TODO - mloskot - is this correct?
//ensure( line->isValid() );
ensure_equals( line->getGeometryTypeId(), geos::geom::GEOS_LINESTRING );
ensure_equals( line->getDimension(), geos::geom::Dimension::L );
ensure_equals( line->getBoundaryDimension(), geos::geom::Dimension::False );
ensure_equals( line->getNumPoints(), size );
ensure_equals( line->getLength(), 0.0 );
ensure_equals( line->getArea(), 0.0 );
// FREE MEMORY
factory_.destroyGeometry(line);
}
示例2: coords
void object::test<17>()
{
const std::size_t size = 5;
geos::geom::CoordinateArraySequence coords(size);
ensure_equals( coords.getSize(), size );
LineStringPtr line = factory_.createLineString(coords);
ensure( "createLineString() returned empty point.", !line->isEmpty() );
ensure_equals( line->getNumPoints(), size );
ensure( line->isSimple() );
ensure( line->getCoordinate() != 0 );
ensure_equals( line->getGeometryTypeId(), geos::geom::GEOS_LINESTRING );
ensure_equals( line->getDimension(), geos::geom::Dimension::L );
ensure_equals( line->getBoundaryDimension(), geos::geom::Dimension::False );
ensure_equals( line->getNumPoints(), size );
ensure_equals( line->getLength(), 0.0 );
ensure_equals( line->getArea(), 0.0 );
// FREE MEMORY
factory_.destroyGeometry(line);
}