46 bool fuzzyHelper(
const QgsAbstractGeometry &other,
double epsilon,
bool useDistance )
const
48 const QgsTriangulatedSurface *otherTriangulatedSurface = qgsgeometry_cast< const QgsTriangulatedSurface * >( &other );
49 if ( !otherTriangulatedSurface )
53 if ( mWkbType != otherTriangulatedSurface->
mWkbType )
56 if ( mPatches.count() != otherTriangulatedSurface->
mPatches.count() )
59 for (
int i = 0; i < mPatches.count(); ++i )
61 if ( ( !mPatches.at( i ) && otherTriangulatedSurface->
mPatches.at( i ) ) ||
62 ( mPatches.at( i ) && !otherTriangulatedSurface->
mPatches.at( i ) ) )
67 if ( mPatches.at( i ) && otherTriangulatedSurface->
mPatches.at( i ) &&
68 !( *mPatches.at( i ) ).fuzzyDistanceEqual( *otherTriangulatedSurface->
mPatches.at( i ), epsilon ) )
73 if ( mPatches.at( i ) && otherTriangulatedSurface->
mPatches.at( i ) &&
74 !( *mPatches.at( i ) ).fuzzyEqual( *otherTriangulatedSurface->
mPatches.at( i ), epsilon ) )
86 return fuzzyHelper( other, epsilon,
false );
90 return fuzzyHelper( other, epsilon,
true );
107 void clear() override;
110 bool fromWkt( const QString &wkt ) override;
114 QString asKml(
int precision = 17 ) const override;
118 QgsTriangulatedSurface *snappedToGrid(
double hSpacing,
double vSpacing,
double dSpacing = 0,
double mSpacing = 0,
bool removeRedundantPoints = false ) const override
SIP_FACTORY;
121 bool deleteVertex(
QgsVertexId position ) override;
153 if ( a0 < 0 || a0 >= sipCpp->numPatches() )
155 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
160 return sipConvertFromType( sipCpp->triangleN( a0 ), sipType_QgsTriangle, NULL );
195 SIP_PYOBJECT __repr__();
197 QString wkt = sipCpp->asWkt();
198 if ( wkt.length() > 1000 )
199 wkt = wkt.left( 1000 ) + QStringLiteral(
"..." );
200 QString str = QStringLiteral(
"<QgsTriangulatedSurface: %1>" ).arg( wkt );
201 sipRes = PyUnicode_FromString( str.toUtf8().constData() );