Closed jariarkko closed 4 years ago
Good idea.
Our data contains prefixed tags, such as Rock-Sandstone, Rock-Limestone, ... (IF we change activityJSON and our DB a bit, then those might become Environment-Rock-Sandstone, Environment-Rock-Limestone, Environment-Ice, ...; note the two/three level structure).
The Simple Cave Types, however, are generated/reinterpreted in psgeo. Instead they could be in the data itself: Type-Boulders, Type-Karst...
Having a prefix (environment, type, others), a category, and a member would make this a generic system that could be data driven and automated. There may be better and more clever ways to do it, this is but a quick draft.
The code is now largely data-driven. Swimming, skiing, and sauna subtypes are all automatically handled by the new general code and the table at the beginning of the psgeo.js file. Tomorrow I will put the rock type and morphology under the new system as well. This should not change the behaviour.
I believe this is now done.
This window should be entirely data-driven. Now there's too much code here, and it is error-prone. We are making mistakes as we change the code, because of this complexity.