Skip to content

Commit

Permalink
[postgres] Do not discard geometry attributes having no SRID
Browse files Browse the repository at this point in the history
  • Loading branch information
strk authored and nyalldawson committed Mar 6, 2023
1 parent 22626d4 commit 3435fd8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -420,7 +420,11 @@ QgsReferencedGeometry QgsPostgresProvider::fromEwkt( const QString &ewkt, QgsPos

QRegularExpressionMatch regularExpressionMatch = regularExpressionSRID.match( ewkt );
if ( !regularExpressionMatch.hasMatch() )
return QgsReferencedGeometry();
{
QgsGeometry geom = QgsGeometry::fromWkt( ewkt );
QgsCoordinateReferenceSystem crs; // TODO: use projects' crs ?
return QgsReferencedGeometry( geom, crs );
}

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

0 comments on commit 3435fd8

Please sign in to comment.