Closed StefanCiesilski closed 3 years ago
Hi @StefanCiesilski
Thanks for reporting this. That's a good point! I've missed that.
Will fix it asap.
Thanks. Do you know when approx.
Probably today. Otherwise, for sure by the end of the week.
Thanks. Great
The version 0.7.0 now supports parents and children.
Hi @liberostelios I have test it. It works, but is it possible to create the Attribute without "[' ']"
The children id is not set. And its possible if the parents id is NULL, to add the uid to parents id? So I can sort by a building.
For me children
works fine, but there was an ambiguity regarding the field size so it might be fixed now. Which version of QGIS are you using?
parents
is supposed to be an array, hence the [' ']
wrapping. But since the most common case is to have one parent, I made an exception so when one parent is present it treats it as a single value.
Can you please try this version: CityJSON-loader.zip? If it works for you, I'll push it as version 0.7.1.
I have test it. Parents id is correct. And children works also fine.
I have QGIS 3.18.0
How can I best sort it. So that all parts of the building stand one below the other.
Glad that it works. I've pushed this as version 0.7.1.
I am not sure if I can help you with your question. There is a way to setup relationships between different layers. I've tried setting a relationship between parents
and uuid
but QGIS crashed.
I solved my problem.. I have create a new attribute "building". With field calculator copy "parents" into "buildings". They are still missing copy "uid" into "building" . Is this possible by load the CityJSON file?
Sounds like a very specific case to me. I'd refrain from doing so, because this would introduce too much redundancy and end up creating data that are much altered compared to the initial file. Plus, parents
is supposed to be an array and not a single value.
I don't get exactly what you did. Sounds to me like all you need is to copy the uuid in parents when it's null, right? So you can make it with this formula: if ( "parents" is null, "uuid", "parents" )
. Then you can use this to sort. But this only works if you know you have one parent.
that's true Thank you anyway
Is it possible to pass the parent attribute in QGIS as an attribute when loading. Otherwise I have entries and do not know which main entry they belong to.
"CityObjects": { "UUID_fab50c6d-4cc0-45c7-ae1d-994de421c72c": { "type": "BuildingPart", "attributes": { "measuredHeight": 7.251, "creationDate": "2020-01-20", "DatenquelleDachhoehe": "1000", "Grundrissaktualitaet": "2020-01-01", "DatenquelleLage": "1000", "DatenquelleBodenhoehe": "1200", "BezugspunktDach": "1000" }, "parents": [ "DETHL57P0000QHJG" ],
CityJson.zip