本文整理汇总了C++中geos::io::WKTWriter::write方法的典型用法代码示例。如果您正苦于以下问题:C++ WKTWriter::write方法的具体用法?C++ WKTWriter::write怎么用?C++ WKTWriter::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geos::io::WKTWriter
的用法示例。
在下文中一共展示了WKTWriter::write方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isEqual
bool isEqual(const Geom& a, const Geom& b)
{
using std::cout;
using std::endl;
GeomPtr a2 = normalize(a);
GeomPtr b2 = normalize(b);
bool eq = a2->equalsExact(b2.get());
if ( ! eq ) {
cout << "OBTAINED: " << wktwriter.write(b2.get()) << endl;
}
return eq;
}
示例2: isEqual
bool isEqual(const Geom& a, const Geom& b, double tolerance=0)
{
using std::cout;
using std::endl;
bool eq;
// TODO: use HausdorffDistance ?
GeomPtr a2 = normalize(a);
GeomPtr b2 = normalize(b);
eq = a2->equalsExact(b2.get(), tolerance);
if ( ! eq ) {
cout << "OBTAINED: " << wktwriter.write(b2.get()) << endl;
}
return eq;
}
示例3: compare
bool compare( T& ex, S& ob)
{
using std::cout;
using std::endl;
if ( ex.size() != ob.size() ) {
cout << "Expected " << ex.size() << " polygons, obtained "
<< ob.size() << endl;
return false;
}
for (typename T::iterator i=ex.begin(), e=ex.end(); i!=e; ++i) {
if ( ! contains(ob, *i) ) {
cout << "Expected " << wktwriter.write(*i)
<< " not found" << endl;
return false;
}
}
return true;
}
示例4: checkExpected
void checkExpected(Geometry* result, const Geometry* expected)
{
bool isEqual = result->equalsExact(expected, 1.0e-5);
ensure_equals("Expect: "+writer.write(expected)+" Obtained: "+writer.write(result), isEqual, true);
}