mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-27 07:18:57 -06:00
Fix: allow loading multiple features with same name in geojson file
This commit is contained in:
@@ -649,8 +649,16 @@ void GeoJsonComponent::parseSingleFeature(const geos::io::GeoJSONFeature& featur
|
||||
_geometryFeatures.push_back(std::move(g));
|
||||
|
||||
std::string name = _geometryFeatures.back().key();
|
||||
std::string identifier = makeIdentifier(name);
|
||||
|
||||
// If there is already an owner with that name as an identifier, make a
|
||||
// unique one
|
||||
if (_featuresPropertyOwner.hasPropertySubOwner(identifier)) {
|
||||
identifier = fmt::format("Feature{}-", index, identifier);
|
||||
}
|
||||
|
||||
properties::PropertyOwner::PropertyOwnerInfo info = {
|
||||
makeIdentifier(name),
|
||||
identifier,
|
||||
name
|
||||
// @TODO: Use description from file, if any
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user