Skip to content

Commit b2b836c

Browse files
committed
Normalize postal code on import
1 parent 6e68f20 commit b2b836c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

importer/src/hierarchyitem.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "hierarchyitem.h"
2+
#include "postal.h"
23
#include "utils.h"
34

45
#include <boost/algorithm/string/trim.hpp>
@@ -20,7 +21,7 @@ HierarchyItem::HierarchyItem(const pqxx::row &row)
2021
m_country = row["country_code"].as<std::string>("");
2122
m_type = geocoder_type(row["class"].as<std::string>(""), row["type"].as<std::string>(""));
2223
m_housenumber = row["housenumber"].as<std::string>("");
23-
m_postcode = row["postcode"].as<std::string>("");
24+
m_postcode = GeoNLP::Postal::normalize_postalcode(row["postcode"].as<std::string>(""));
2425
m_latitude = row["latitude"].as<float>(0);
2526
m_longitude = row["longitude"].as<float>(0);
2627
m_osm_id = row["osm_id"].as<uint64_t>(0);

0 commit comments

Comments
 (0)