-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add extra attributes to all city objects #204
Comments
No it's not currently allowed nor supported. The CityObjects of CityJSON are hard-coded in cjval, see https://github.com/cityjson/cjval/blob/main/schemas/extensions/20/extension.schema.json#L51 The question this raises is: should it be? I think this is a rather extreme example, and adding this to the validator would mean adding a lot of code. But I see the reasoning for it, since in Extensions you're allowed to reuse the Geometry Primitives... |
I'm currently mapping a CityGML ADE to a CityJSON Extension. There are 21 attributes defined for Would using {
"type": "CityJSONExtension",
...
"extraAttributes": {
"Building": {
"+myBuildingAttr": { "type": "string" },
"allOf": [
{
"$ref": "#/$defs/my21Attributes"
}
]
}
}
} |
I don't think I understand that at the moment you need to copy a lot, but this is the only way I reckon. I spoke to @balazsdukai and what we thought could help -- in the next release -- would be to add a For the 21 attributes, I don't think there's an easy solution; I'll think about it. But nice that you report those (it's for CHEK, right?), we haven't had many serious users of Extensions who dived into the details, so it's very useful. |
In CityGML, you can define ADE attributes for abstract CityGML classes, and these attributes are inherited and available for all subclasses. For example, when you add an attribute
myAdeAttribute
to the abstract root classAbstractCityObject
, you can automatically use this attribute for all derived instances likeBuilding
,CityFurniture
, orLandUse
.In a CityJSON extension schema, you can assign additional attributes to city objects through the
"extraAttributes"
object. The CityJSON schema itself uses some sort of "abstract" definitions like, for example,"_AbstractCityObject"
(see https://3d.bk.tudelft.nl/schemas/cityjson/2.0.1/cityobjects.schema.json).Is it allowed and supported to reference this
"_AbstractCityObject"
in an extension schema like shown below?The text was updated successfully, but these errors were encountered: