-
Notifications
You must be signed in to change notification settings - Fork 5
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 (option) to run query tww_update_maincover after import #75
Comments
@sjib let me know if and which queries need to be added to complete the import Would this be an option or something that can be run always? |
The new datamodel has a fk_main_cover, so we should not overwrite it if it is existing.
To discuss - do we want to chose the node with the lowest obj_id or the lowest level instead? |
I have reimported again: first got the map with the node-crosses (as shown above). But: in the vw_tww_wastewater_structure form, tab "maincover/mainnode", there is no data in the cover-window. Well, I can edit the covers in the "covers" tab - except when digitizing a new wastewater_structure. Thats the reason, why main_cover_update should run after import (only for wastewater_structure, that have NULL as fk_main_cover. I have also just run the main_cover_update after importing. The result was, that there is no node-data in vw_tww_wastewater_structure, and because there is a not NULL constraint in attribut wn_obj_id, I can not save any changes in the attribut form. So we have to run both updates - main node and main cover. |
#36 inserts a new cover on update if there was none before and at least one attribute is used. So as soon as we merge this, the cover problematic is gone. |
Here the adjusted query for main_node with
|
And for main_cover:
@domi4484 Please check if |
|
should be fixed in last plugin demo, please re-open if needed |
When importing INTERLIS data you cannot select objects on the layer vw_tww_wastewater_structure and symbols are not displayed correctly:
The following query needs to be applied to set a main_cover:
UPDATE tww_od.wastewater_structure WS SET fk_main_cover = structure_cover.co_obj_id FROM ( SELECT WS.obj_id AS obj_id, min(CO.obj_id) AS co_obj_id FROM tww_od.wastewater_structure WS LEFT JOIN tww_od.structure_part SP ON SP.fk_wastewater_structure = WS.obj_id LEFT JOIN tww_od.cover CO ON SP.obj_id = CO.obj_id GROUP BY WS.obj_id ) AS structure_cover WHERE structure_cover.obj_id = WS.obj_id;
@ponceta To discuss in technial group tomorrow how to add this. Also discuss if query update_mainnode is also necessary or not.
The text was updated successfully, but these errors were encountered: