@@ -745,33 +745,33 @@ class TestQgsExpression: public QObject
745745 QVariant vYMax = exp9.evaluate ( &fPolygon );
746746 QCOMPARE ( vYMax.toDouble (), 6.0 );
747747 }
748-
748+
749749 void eval_geometry_wkt ()
750750 {
751751 QgsPolyline polyline, polygon_ring;
752752 polyline << QgsPoint ( 0 , 0 ) << QgsPoint ( 10 , 0 );
753753 polygon_ring << QgsPoint ( 2 , 1 ) << QgsPoint ( 10 , 1 ) << QgsPoint ( 10 , 6 ) << QgsPoint ( 2 , 6 ) << QgsPoint ( 2 , 1 );
754-
754+
755755 QgsPolygon polygon;
756756 polygon << polygon_ring;
757-
757+
758758 QgsFeature fPoint , fPolygon , fPolyline ;
759759 fPoint .setGeometry ( QgsGeometry::fromPoint ( QgsPoint ( -1.23456789 , 9.87654321 ) ) );
760760 fPolyline .setGeometry ( QgsGeometry::fromPolyline ( polyline ) );
761761 fPolygon .setGeometry ( QgsGeometry::fromPolygon ( polygon ) );
762-
762+
763763 QgsExpression exp1 ( " geomToWKT($geometry)" );
764764 QVariant vWktLine = exp1.evaluate ( &fPolyline );
765765 QCOMPARE ( vWktLine.toString (), QString ( " LINESTRING(0 0, 10 0)" ) );
766-
766+
767767 QgsExpression exp2 ( " geomToWKT($geometry)" );
768768 QVariant vWktPolygon = exp2.evaluate ( &fPolygon );
769769 QCOMPARE ( vWktPolygon.toString (), QString ( " POLYGON((2 1,10 1,10 6,2 6,2 1))" ) );
770-
770+
771771 QgsExpression exp3 ( " geomToWKT($geometry)" );
772772 QVariant vWktPoint = exp3.evaluate ( &fPoint );
773773 QCOMPARE ( vWktPoint.toString (), QString ( " POINT(-1.23456789 9.87654321)" ) );
774-
774+
775775 QgsExpression exp4 ( " geomToWKT($geometry, 3)" );
776776 QVariant vWktPointSimplify = exp4.evaluate ( &fPoint );
777777 QCOMPARE ( vWktPointSimplify.toString (), QString ( " POINT(-1.235 9.877)" ) );
@@ -834,7 +834,7 @@ class TestQgsExpression: public QObject
834834 QgsGeometry outGeom = out.value <QgsGeometry>();
835835 QCOMPARE ( geom->equals ( &outGeom ), true );
836836 }
837-
837+
838838 void eval_geometry_access_transform_data ()
839839 {
840840 QTest::addColumn<QString>( " string" );
@@ -855,18 +855,18 @@ class TestQgsExpression: public QObject
855855 QTest::newRow ( " geometry Line" ) << " geometry( $currentfeature )" << ( void * ) QgsGeometry::fromPolyline ( line ) << false ;
856856 QTest::newRow ( " geometry Polyline" ) << " geometry( $currentfeature )" << ( void * ) QgsGeometry::fromPolyline ( polyline ) << false ;
857857 QTest::newRow ( " geometry Polygon" ) << " geometry( $currentfeature )" << ( void * ) QgsGeometry::fromPolygon ( polygon ) << false ;
858-
858+
859859 QgsCoordinateReferenceSystem s;
860860 s.createFromOgcWmsCrs ( " EPSG:4326" );
861861 QgsCoordinateReferenceSystem d;
862862 d.createFromOgcWmsCrs ( " EPSG:3857" );
863863 QgsCoordinateTransform t ( s, d );
864-
864+
865865 QgsGeometry* tLine = QgsGeometry::fromPolyline ( line );
866866 tLine->transform ( t );
867867 QgsGeometry* tPolygon = QgsGeometry::fromPolygon ( polygon );
868868 tPolygon->transform ( t );
869-
869+
870870 QTest::newRow ( " transform Line" ) << " transform( geomFromWKT('" + QgsGeometry::fromPolyline ( line )->exportToWkt () + " '), 'EPSG:4326', 'EPSG:3857' )" << ( void * ) tLine << false ;
871871 QTest::newRow ( " transform Polygon" ) << " transform( geomFromWKT('" + QgsGeometry::fromPolygon ( polygon )->exportToWkt () + " '), 'EPSG:4326', 'EPSG:3857' )" << ( void * ) tPolygon << false ;
872872 }
0 commit comments