QgsAbstractGeometryV2* QgsGeometryImport::fromMultiPoint( const QgsMultiPoint& multipoint ) { QgsMultiPointV2* mp = new QgsMultiPointV2(); QgsMultiPoint::const_iterator ptIt = multipoint.constBegin(); for ( ; ptIt != multipoint.constEnd(); ++ptIt ) { QgsPointV2* pt = new QgsPointV2( ptIt->x(), ptIt->y() ); mp->addGeometry( pt ); } return mp; }
std::unique_ptr<QgsMultiPointV2> QgsGeometryFactory::fromMultiPoint( const QgsMultiPoint &multipoint ) { std::unique_ptr< QgsMultiPointV2 > mp( new QgsMultiPointV2() ); QgsMultiPoint::const_iterator ptIt = multipoint.constBegin(); for ( ; ptIt != multipoint.constEnd(); ++ptIt ) { QgsPoint *pt = new QgsPoint( ptIt->x(), ptIt->y() ); mp->addGeometry( pt ); } return mp; }