Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e497678

Browse files
strknyalldawson
authored andcommittedMar 5, 2023
[postgres] Do not discard geometry attributes having no SRID
See #49380 (comment)
1 parent 4fb98a1 commit e497678

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,11 @@ QgsReferencedGeometry QgsPostgresProvider::fromEwkt( const QString &ewkt, QgsPos
420420

421421
QRegularExpressionMatch regularExpressionMatch = regularExpressionSRID.match( ewkt );
422422
if ( !regularExpressionMatch.hasMatch() )
423-
return QgsReferencedGeometry();
423+
{
424+
QgsGeometry geom = QgsGeometry::fromWkt( ewkt );
425+
QgsCoordinateReferenceSystem crs; // TODO: use projects' crs ?
426+
return QgsReferencedGeometry( geom, crs );
427+
}
424428

425429
QString wkt = ewkt.mid( regularExpressionMatch.captured( 0 ).size() );
426430
int srid = regularExpressionMatch.captured( 1 ).toInt();

0 commit comments

Comments
 (0)
Please sign in to comment.