Skip to content

Commit 98ca2dc

Browse files
committed
delimited text provider: only add finite points to spatial index (fixes #11708)
1 parent 5f3debd commit 98ca2dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/providers/delimitedtext/qgsdelimitedtextprovider.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ void QgsDelimitedTextProvider::scanFile( bool buildIndexes )
520520
mGeometryType = QGis::Point;
521521
}
522522
mNumberFeatures++;
523-
if ( buildSpatialIndex )
523+
if ( buildSpatialIndex && qIsFinite( pt.x() ) && qIsFinite( pt.y() ) )
524524
{
525525
QgsFeature f;
526526
f.setFeatureId( mFile->recordId() );
@@ -856,6 +856,7 @@ bool QgsDelimitedTextProvider::pointFromXY( QString &sX, QString &sY, QgsPoint &
856856
pt.setY( y );
857857
return true;
858858
}
859+
859860
return false;
860861
}
861862

0 commit comments

Comments
 (0)