Hi guys, here's some plans on reorganizing the database regarding wfslayers:
I'm working on removing transport related server code and I'm suggesting that all relevant info in portti_wfs_layer table is moved to oskari_maplayer.attributes.
Currently:
portti_wfs_layer.selected_feature_params (these are lists of feature data to show to the user)
{
"default": ["kunta_fi", ...]
"fi": ["kunta_fi", ... ],
"sv": ["kunta_se", ...]
}
portti_wfs_layer.feature_params_locales (localization for said data NOTE! They need to be in sync with the arrays in selected_feature_params):
{
"fi": ["Kunta","Ruutu-ID","ID-nro","X-koordinaatti","Y-koordinaatti","Väestö","Miehet","Naiset","Ikä 0-14","Ikä 15-64","Ikä 65+"],
"sv": ["Kommun","Rut-ID","ID-nr","X-koordinat","Y-koordinat","Folkmängd","Män","Kvinnor","Ålder 0-14","Ålder 15-64","Ålder 65+"],
"en": ["Municipality","Grid ID","ID No.","X-coordinate","Y-coordinate","Population","Male","Female","Age 0-14","Age 15-64","Age 65+"]
}
My thought is to combine these in oskari_maplayer.attributes:
{
data: {
// portti_wfs_layer.selected_feature_params (defaults to geoportal default language when requested):
selected: {
fi: ["kunta_fi", ...],
en: ["kunta_en", ...]
},
// portti_wfs_layer.feature_params_locales (changing the model so these are not tied to selected data. These will be used to switch the UI name IF said feature data attribute should be shown to user):
locale: {
fi: {
"kunta_fi": "Kunta",
...
},
en: {
"kunta_en": "Municipality",
...
}
}
},
// portti_wfs_layer.feature_namespace_url (Looks like this is the only required data from portti_wfs_layer in addition to the 2 above)
namespaceURL: 'http://jotain'
...
}
Looks like
oskari_maplayer.name == portti_wfs_layer.feature_namespace + portti_wfs_layer.feature_element already
And these tables can be removed since we don't support SLD or digging/normalizing data from complex features currently on the server side:
Any thoughts on this?