Skip to content
Browse files
[processing] Use null instead of nan for invalid stat values in join …
…by location summary
  • Loading branch information
nyalldawson committed Mar 31, 2019
1 parent 52b2a58 commit c3347712bb98cb5fc044969c3e2c0e21c209cbb5
Showing 1 changed file with 3 additions and 1 deletion.
@@ -26,6 +26,7 @@
__revision__ = '$Format:%H$'

import os
import math

from collections import defaultdict

@@ -339,7 +340,8 @@ def addField(original, stat, type):
for s in numeric_fields:
if s[0] in summaries:
attrs.append(getattr(stat, s[2])())
val = getattr(stat, s[2])()
attrs.append(val if not math.isnan(val) else NULL)
elif field_type == 'datetime':
stat = QgsDateTimeStatisticalSummary()

0 comments on commit c334771

Please sign in to comment.