We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6200bc commit f8af84cCopy full SHA for f8af84c
importer/src/main.cpp
@@ -970,8 +970,15 @@ int main(int argc, char* argv[])
970
if (cells.size() != 4 || cells[0] == "id")
971
continue;
972
std::string code = cells[1];
973
- double latitude = std::stod(cells[2]);
974
- double longitude = std::stod(cells[3]);
+ double latitude, longitude;
+ try {
975
+ latitude = std::stod(cells[2]);
976
+ longitude = std::stod(cells[3]);
977
+ }
978
+ catch (const std::invalid_argument &e) {
979
+ continue; // skip this line, it probably doesn't have coordinates
980
981
+
982
osmscout::GeoCoord coordinates(latitude, longitude);
983
std::list<osmscout::LocationDescriptionService::ReverseLookupResult> results;
984
{
0 commit comments