From b26c2b21b23f76fd57a188870d1529816a3ca640 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Eddy=20Petri=C8=99or?= Date: Tue, 14 Jul 2009 20:12:22 +0300 Subject: [PATCH] always add the census data from 2002 --- OsmLocImport.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmLocImport.py b/OsmLocImport.py index 312eab8..da63c2a 100644 --- a/OsmLocImport.py +++ b/OsmLocImport.py @@ -201,9 +201,7 @@ the existing data which is present in 'oldnode'""" node = oldnode tags = oldnode[u"tag"] - if u"population" in tags: - tags[u"population:census:2002"] = sirutadict[u"population2002"] - else: + if not u"population" in tags: tags[u"population"] = sirutadict[u"population2002"] if u"postal_code" in tags: @@ -220,6 +218,9 @@ the existing data which is present in 'oldnode'""" node[u"lon"] = float(sirutadict[u"lon"]) tags[u"population"] = sirutadict[u"population2002"] + # consistently add the 2002 census data + tags[u"population:census:2002"] = sirutadict[u"population2002"] + # this should probably be ran even for existing nodes tags[u"place"] = sirutaRankToPlace(sirutadict[u"siruta:type"], tags[u"population"]) -- 2.11.4.GIT