Skip to content
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

Create hierarchical DELFI attribute data structure #11

Closed
Robbendebiene opened this issue Jun 14, 2021 · 2 comments
Closed

Create hierarchical DELFI attribute data structure #11

Robbendebiene opened this issue Jun 14, 2021 · 2 comments

Comments

@Robbendebiene
Copy link
Member

The goal of this data structure is to easily allow the addition/removal of new attributes and its corresponding information. The UI should be generated from this dataset.

Every attribute should contain things like:

  • DELFI id
  • Name and description/question.
  • The corresponding OSM tag
  • Allowed values and value type
  • Values contain optionally a list of child attributes that will be shown if the particular value is selected (attributes are referenced via DEFLI id)
  • The order of the values describes the usage of the value (high usage means low index)

In question:

  • Always provide a value selection but also always allow custom values?

Example JSON data structure

{
  id: 2,
  name: "Bahnsteig Typ",
  details: "",
  tag: "amenity",
  values: [
   {
     value: "1",
     name: "item 1",
     image: "nameoftheimage.svg",
     details: "some further details that describe this attribute",
     children: [3, 5]
   },
   {
     value: "2",
     name: "item 2",
     image: "nameoftheimage2.svg",
     details: "some further details that describe this attribute"
   },
   ...
  ]
}
@Robbendebiene
Copy link
Member Author

Robbendebiene commented Jun 30, 2021

For consistency, inherit documentation and error prevention/validation ideally a JSON schema (http://json-schema.org/) should be worked out here.

Each value should also contain a boolean attribute that indicates if the data/tag is an official OSM tag and can therefore be directly transferred to OSM.

@7h30n3
Copy link
Member

7h30n3 commented Sep 15, 2021

Solved by #26

@7h30n3 7h30n3 closed this as completed Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants