mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-26 15:53:36 +00:00
@@ -47,19 +47,16 @@ void TypeToOSMTranslator::LoadFromStream(std::istream & s)
|
||||
|
||||
std::vector<std::string_view> tokens = strings::Tokenize(line, ";");
|
||||
|
||||
ASSERT(tokens.size() >= 2, ("TODO1"));
|
||||
ASSERT(tokens.size() >= 2, ("Invalid type definition:", line));
|
||||
|
||||
LOG(LINFO, ("simple type: ", tokens[0]));
|
||||
|
||||
std::string type_name(tokens[0]);
|
||||
replace(type_name.begin(), type_name.end(), '|', '-');
|
||||
|
||||
uint32_t type = classif().GetTypeByReadableObjectName(type_name);
|
||||
uint32_t type = classif().GetTypeByPathSafe(strings::Tokenize(tokens[0], "|"));
|
||||
|
||||
if (tokens.size() == 2)
|
||||
{
|
||||
// OSM tags can be derived from type name
|
||||
std::vector<std::string_view> typeTokens = strings::Tokenize(type_name, "-");
|
||||
std::vector<std::string_view> typeTokens = strings::Tokenize(tokens[0], "|");
|
||||
|
||||
ASSERT(typeTokens.size() <= 2, ("OSM tags can not be derived from 3-arity/complex types"));
|
||||
ASSERT(!typeTokens.empty(), ("No type name found"));
|
||||
|
||||
Reference in New Issue
Block a user