Toponaming: Transfer in getHigherElement

This commit is contained in:
Zheng, Lei
2024-07-18 17:20:01 -04:00
committed by bgbsww
parent a600952665
commit 38269241e6
4 changed files with 97 additions and 2 deletions

View File

@@ -269,7 +269,7 @@ const std::vector<std::string>& GeoFeature::searchElementCache(const std::string
return none;
}
std::vector<const char*> GeoFeature::getElementTypes(bool /*all*/) const
const std::vector<const char*>& GeoFeature::getElementTypes(bool /*all*/) const
{
static std::vector<const char*> nil;
auto prop = getPropertyOfGeometry();
@@ -279,4 +279,13 @@ std::vector<const char*> GeoFeature::getElementTypes(bool /*all*/) const
return prop->getComplexData()->getElementTypes();
}
std::vector<Data::IndexedName>
GeoFeature::getHigherElements(const char *element, bool silent) const
{
auto prop = getPropertyOfGeometry();
if (!prop)
return {};
return prop->getComplexData()->getHigherElements(element, silent);
}
#endif