Skip to content
Permalink
Browse files

Fix clearing multilinestring should reset dimensionality

  • Loading branch information
nyalldawson committed Sep 25, 2017
1 parent d4ec09c commit ed72e37f0bd40e2e6f8de15b90c6fc0b4e8eed9a
@@ -25,6 +25,8 @@ class QgsMultiLineString: QgsMultiCurve
virtual QgsMultiLineString *clone() const /Factory/;


virtual void clear();

virtual bool fromWkt( const QString &wkt );


@@ -38,6 +38,12 @@ QgsMultiLineString *QgsMultiLineString::clone() const
return new QgsMultiLineString( *this );
}

void QgsMultiLineString::clear()
{
QgsGeometryCollection::clear();
mWkbType = QgsWkbTypes::MultiLineString;
}

bool QgsMultiLineString::fromWkt( const QString &wkt )
{
return fromCollectionWkt( wkt, QList<QgsAbstractGeometry *>() << new QgsLineString, QStringLiteral( "LineString" ) );
@@ -32,11 +32,9 @@ class CORE_EXPORT QgsMultiLineString: public QgsMultiCurve
QString geometryType() const override;
QgsMultiLineString *clone() const override SIP_FACTORY;

void clear() override;
bool fromWkt( const QString &wkt ) override;

// inherited: int wkbSize() const;
// inherited: unsigned char* asWkb( int& binarySize ) const;
// inherited: QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const override;
QDomElement asGML3( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

0 comments on commit ed72e37

Please sign in to comment.
You can’t perform that action at this time.