MCPcopy Create free account
hub / github.com/comaps/comaps / GetUKPostcodes

Function GetUKPostcodes

generator/postcode_points_builder.cpp:94–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void GetUKPostcodes(std::string const & filename, storage::CountryId const & countryId,
95 storage::CountryInfoGetter const & infoGetter, std::vector<m2::PointD> & valueMapping,
96 std::vector<ZipIndexValue> & keyValuePairs)
97{
98 // * Follow these steps to prepare GB dataset: https://github.com/osm-search/gb-postcode-data
99 // * Direct from Nominatim: https://nominatim.org/data/gb_postcodes.csv.gz
100
101 FieldIndices ukFieldIndices;
102 ukFieldIndices.m_postcodeIndex = 0;
103 ukFieldIndices.m_latIndex = 1;
104 ukFieldIndices.m_longIndex = 2;
105 ukFieldIndices.m_datasetCount = 3;
106
107 GetPostcodes(filename, countryId, ukFieldIndices, "," /* separator */, true /* hasHeader */, infoGetter, valueMapping,
108 keyValuePairs);
109}
110
111void GetUSPostcodes(std::string const & filename, storage::CountryId const & countryId,
112 storage::CountryInfoGetter const & infoGetter, std::vector<m2::PointD> & valueMapping,

Callers 1

BuildPostcodePointsImplFunction · 0.85

Calls 1

GetPostcodesFunction · 0.85

Tested by

no test coverage detected