Coder Social home page Coder Social logo

Remove "parent" property? about specs HOT 6 CLOSED

cityjson avatar cityjson commented on August 25, 2024
Remove "parent" property?

from specs.

Comments (6)

hugoledoux avatar hugoledoux commented on August 25, 2024 1

@clausnagel I updated the specs, the datasets, and the Extension description. "parents" is now used, and for Extensions it is mandatory to put a property "toplevel": true/false for each new City Object. I didn't enforce this for the objects of the core model, these can be hardcoded (cjio did this for instance).

If you agree then I'll release v0.9, ok?

from specs.

hugoledoux avatar hugoledoux commented on August 25, 2024

The issue I see is that we identify a 2nd-level CityObject if it has the property "parent"... it's pretty useful when scanning a file to count number of CO (eg Buildings): you just count those not having a "parent" property (and thus BuildingPart not counted as a CO). Of course one can compute these rather easily, but I still think it's elegant and simple.

What we could do is have "parent" be an array. That would solve the problem with Extensions, and it would also harmonise the property with that of "children". Now one is array the other is string, but both arrays of strings would mean less error-prone maybe.

from specs.

clausnagel avatar clausnagel commented on August 25, 2024

Assume an extension that defines a new CityObject called "Parcel" that has "Building" objects located on the parcel as "children". This extension might also add a "parent" extension property to "Building" so that each "Building" references its parcel. In a corresponding dataset, both "Building" and "BuildingPart" would thus have a "parent" property, and you could not just count those not having a "parent" property.

from specs.

hugoledoux avatar hugoledoux commented on August 25, 2024

okay, I had a plan... and you bombed that plan! But you're totally right, I hadn't thought of this...

I still think that parent should be an array (thus it becomes parents) because it's useful for like cjio and in QGIS. Say a user selects with the mouse a BuildingPart, and wants to export that, you would want the whole Building to be exported (we flatten the schema, but the user shouldn't be a victim of this), and not 'split' city objects apart, right? So parents can help us there.

I still think it's useful to know which city objects can "exists-by-themselves", like a Building can, even if it has a Parcel parent, but a BuildingInstallation cannot. So we could just have a property called something intelligent for these (top-object? or something like this). Not for the core city objects, but the ones defined in ADEs.

from specs.

clausnagel avatar clausnagel commented on August 25, 2024

+1 for making parent an array and for renaming it to parents. I think this is the best way to move forward.

In the CityGML 3 development, we also recognize the need to tag top-level feature types. Just as you wrote in your post, one of the reasons is to be able to identify top-level ADE features in software. In a first draft, this was implemented in the conceptual model by introducing another abstract super class, so that a city object could, for instance, be derived from AbstractCityObjectType and AbstractTopLevelFeatureType to denote that it is top-level. However, this led to multiple inheritance. So the current draft uses a UML stereotype instead to tag top-level feature types. This stereotype could be easily mapped to an attribute in an encoding. So your proposal is very inline with this discussion.

from specs.

clausnagel avatar clausnagel commented on August 25, 2024

Sounds great. Thanks.

from specs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.