Skip to content

Commit

Permalink
delimited text provider: only add finite points to spatial index (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 10, 2015
1 parent 5f3debd commit 98ca2dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/delimitedtext/qgsdelimitedtextprovider.cpp
Expand Up @@ -520,7 +520,7 @@ void QgsDelimitedTextProvider::scanFile( bool buildIndexes )
mGeometryType = QGis::Point;
}
mNumberFeatures++;
if ( buildSpatialIndex )
if ( buildSpatialIndex && qIsFinite( pt.x() ) && qIsFinite( pt.y() ) )
{
QgsFeature f;
f.setFeatureId( mFile->recordId() );
Expand Down Expand Up @@ -856,6 +856,7 @@ bool QgsDelimitedTextProvider::pointFromXY( QString &sX, QString &sY, QgsPoint &
pt.setY( y );
return true;
}

return false;
}

Expand Down

0 comments on commit 98ca2dc

Please sign in to comment.