mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Fix import WKT of the format MultiPoint (-20 -90, -20 -88 )
Should technically be MultiPoint ((-20 -90), (-20 -88)), but it's nice to be forgiving and accept as wide a range of WKT formats as possible Fix #16483
This commit is contained in:
parent
5fe6587e0b
commit
ef6c8be16f
@ -34,7 +34,7 @@ bool QgsMultiPointV2::fromWkt( const QString &wkt )
|
||||
{
|
||||
QString collectionWkt( wkt );
|
||||
//test for non-standard MultiPoint(x1 y1, x2 y2) format
|
||||
QRegExp regex( "^\\s*MultiPoint\\s*[ZM]*\\s*\\(\\s*\\d" );
|
||||
QRegExp regex( "^\\s*MultiPoint\\s*[ZM]*\\s*\\(\\s*[-\\d]" );
|
||||
regex.setCaseSensitivity( Qt::CaseInsensitive );
|
||||
if ( regex.indexIn( collectionWkt ) >= 0 )
|
||||
{
|
||||
|
1
tests/testdata/geom_data.csv
vendored
1
tests/testdata/geom_data.csv
vendored
@ -75,6 +75,7 @@ GeometryCollection (PointZ (1 2 3)),GEOMETRYCOLLECTION Z (POINT Z (1 2 3)),1,0,0
|
||||
"MultiPoint(( 1 2 3 ),(4 5 6))","MultiPointZ(( 1 2 3 ),(4 5 6))",2,0,0,0,2,0,0,POINT(2.5 3.5),1,2,4,5,"z coordinate, but geometry not explicitly marked as such. Should be upgraded to have Z dimension"
|
||||
"MultiPoint(( 1 2 3 11),(4 5 6 12))","MultiPointZM(( 1 2 3 11),(4 5 6 12))",2,0,0,0,2,0,0,POINT(2.5 3.5),1,2,4,5,"4d coordinates, but geometry not explicitly marked as such. Should be upgraded to have ZM dimension"
|
||||
"MultiPoint (1 2, 3 4, 5 6)","MULTIPOINT((1 2),(3 4),(5 6))",3,0,0,0,3,0,0,POINT(3 4),1,2,5,6,
|
||||
"MultiPoint (-20 -90, -20 -88 )","MULTIPOINT((-20 -90),(-20 -88))",2,0,0,0,2,0,0,Point (-20 -89),-20,-90,-20,-88,
|
||||
MultiPoint (1 2),MULTIPOINT((1 2)),1,0,0,0,1,0,0,POINT(1 2),1,2,1,2,
|
||||
MultiPoint Z (1 2 3),MULTIPOINT Z ((1 2 3)),1,0,0,0,1,0,0,POINT(1 2),1,2,1,2,
|
||||
"MultiPointM (1 2 3,4 5 0)","MULTIPOINT M ((1 2 3),(4 5 0))",2,0,0,0,2,0,0,POINT(2.5 3.5),1,2,4,5,
|
||||
|
|
Loading…
x
Reference in New Issue
Block a user