Skip to content

Commit

Permalink
Fix fallback coord on geocoding fails #591
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Sep 2, 2019
1 parent e5a0c02 commit 5ee3431
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion analysers/analyser_merge_heritage_FR_merimee.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@ def parseDPRO(dpro):

def coord_fallback(self, fields):
if not fields['longitude'] and fields['Coordonnées INSEE']:
fields['latitude'], fields['longitude'] = list(map(lambda s: float(s.strip()), fields['Coordonnées INSEE'].split(',')))
# It is too late to write to fields['longitude'] and fields['latitude']
fields['_y'], fields['_x'] = list(map(lambda s: float(s.strip()), fields['Coordonnées INSEE'].split(',')))
return fields

0 comments on commit 5ee3431

Please sign in to comment.