We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent e497678 commit 1e1d4e4Copy full SHA for 1e1d4e4
tests/src/providers/testqgspostgresprovider.cpp
@@ -478,6 +478,15 @@ void TestQgsPostgresProvider::testEwktInOut()
478
QCOMPARE( g.crs().authid(), "EPSG:4326" );
479
ewkt_obtained = QgsPostgresProvider::toEwkt( g, conn );
480
QCOMPARE( ewkt_obtained, "SRID=4326;LineString (0 0, -5 2)" );
481
+
482
+ // Test for srid-less geometry
483
+ // See https://github.com/qgis/QGIS/issues/49380#issuecomment-1282913470
484
+ g = QgsPostgresProvider::fromEwkt( "POINT(0 0)", conn );
485
+ QVERIFY( ! g.isNull() );
486
+ ewkt_obtained = QgsPostgresProvider::toEwkt( g, conn );
487
+ QVERIFY( ! g.crs().isValid() ); // is unknown
488
+ QCOMPARE( ewkt_obtained, QString( "SRID=0;Point (0 0)" ) );
489
490
}
491
#endif // ENABLE_PGTEST
492
0 commit comments