mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-01 02:23:45 +00:00
@@ -45,7 +45,7 @@ void TypeToOSMTranslator::LoadFromStream(std::istream & s)
|
||||
if (line.empty() || line[0] == '#')
|
||||
continue;
|
||||
|
||||
LOG(LINFO, ("Reading line: ", line));
|
||||
//LOG(LINFO, ("Reading line: ", line));
|
||||
|
||||
std::vector<std::string_view> tokens = strings::Tokenize(line, ";");
|
||||
|
||||
@@ -77,12 +77,13 @@ void TypeToOSMTranslator::LoadFromStream(std::istream & s)
|
||||
|
||||
m_storage.insert({type, {osmTag}});
|
||||
|
||||
LOG(LINFO, ("Simple type: Added type ", type, ":", osmTag.key, "=", osmTag.value));
|
||||
//LOG(LINFO, ("Simple type: Added type ", type, ":", osmTag.key, "=", osmTag.value));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(LINFO, ("Complex type: token size:", tokens.size(), " | osmTags: ", tokens[1]));
|
||||
//LOG(LINFO, ("-------------------"));
|
||||
//LOG(LINFO, ("Complex type line:", line));
|
||||
|
||||
// complex feature type: OSM tags are listed in the entry
|
||||
ASSERT(tokens.size() > 2, ("OSM tags not listed for complex feature type: ", line));
|
||||
@@ -105,6 +106,7 @@ void TypeToOSMTranslator::LoadFromStream(std::istream & s)
|
||||
std::string_view keyValuePair = osmTagList.substr(pos + 1, end - pos - 1);
|
||||
size_t equalSign = keyValuePair.find('=');
|
||||
|
||||
// Skip entries that are not in key=value format
|
||||
if (equalSign != std::string::npos) {
|
||||
OSMTag osmTag;
|
||||
|
||||
@@ -113,10 +115,12 @@ void TypeToOSMTranslator::LoadFromStream(std::istream & s)
|
||||
|
||||
osmTags.push_back(osmTag);
|
||||
|
||||
LOG(LINFO, ("Complex type: Found OSM Tag ", osmTag.key, "=", osmTag.value));
|
||||
//LOG(LINFO, ("Complex type: Found OSM Tag ", osmTag.key, "=", osmTag.value));
|
||||
}
|
||||
else
|
||||
LOG(LINFO, ("Complex type: Skipping OSM key value pair:", keyValuePair));
|
||||
{
|
||||
//LOG(LINFO, ("Complex type: Skipping OSM key value pair:", keyValuePair));
|
||||
}
|
||||
|
||||
pos = end + 1;
|
||||
}
|
||||
@@ -124,8 +128,8 @@ void TypeToOSMTranslator::LoadFromStream(std::istream & s)
|
||||
m_storage.insert({type, osmTags});
|
||||
}
|
||||
|
||||
if (lineNumber > 80)
|
||||
break;
|
||||
//if (lineNumber > 80)
|
||||
//break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user