-
Notifications
You must be signed in to change notification settings - Fork 6
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
Interlis update #414
Interlis update #414
Conversation
@domi4484 the Error "SIA405_Base_Abwasser_1_LV95: model(s) not found" has been appearing regularly in CI. I don't know why, but re-running the tests usually helps |
I have also seen it sometimes. It seems that the repository 405.sia.ch is not always available. Maybe we could ask them if they are aware of it? To avoid the issue in future we could download a copy of the needed models to keep within the source of the plugin. ili2db error:
|
2c1a269
to
541a34b
Compare
Needs testing but looks promising! Thank you @domi4484 ! |
I imported the VSA test organisations Got this error message :
Restart QGIS Same error. |
It looks a bit slower than before but it is quite better in terms of visibility (what we import, what we will update,...) |
@ponceta thanks for testing! The error should be fixed with the last commit. But I have seen another glitch, new to be imported objects are displayed as modified instead of new.
In fact on my machine the DSS import take pretty much the same time (around 40 seconds) with both versions |
Bugs on update :
Remaining questions :
|
Check for already existing re_... instances
@ponceta most points should be solved with last commit, but there is one open issue with geometries that I am not sure how to solve. It seems to me that in the model we have sometimes redundant data: for example for
|
The problem lies here: wastewater/datamodel/app/functions/14_geometry_functions.sql Lines 10 to 28 in c7c7e36
|
@ponceta For now, we only Force3D the input situation geometry in Line 1932 in c7c7e36
The smart thing to do imho is to force the |
This sounds the more correct way to me. Ill implement it like that. |
There is no such case. The only reason we have both values is that most users edit in 2.5d while the geometry is 3d and the attribute setup is mirroring the 2.5d INTERLIS structure |
Altitude can come from geometry (3D point import) or attribute (bottom level). That's the best solution we found yet to have both approach working. I'm open to any suggestions on how to do it better. ;-) |
It's just that it can be confusing to have redundant data in the DB. Another possibility would be to remove the quote and bottom_level columns and have a view to expose the Z coordinate as quote/bottom_level. But I am not an expert at all at postgres, maybe is not worth adding additional complexity to the model. Now the suggestion from @cymed are implemented. @ponceta it would be nice if you can test again.
This still looks as modified, can it be that a trigger recompute this to a different value? In that case I don't now what we could do to handle that on import |
Some thoughts from my side: I would like to suggest the following principals: c) As we are coming from the 2.5 D world and are still on the way towards the 3D modelling we should (re-)define some hierarchy on how information is changed:
May be we have to distinguish between
And may be we have to have a tool that updates data to a stage so that we do not have conflicting information in the DB (like level exists, but respective z-value is missing or set to 0.00). For the migration process qgep to tww we have the intermediary points in progression3D that we are not able to transfer with INTERLIS - so we should treat them in an extra issue. Hope this helps |
Except Attributes introduced by TWW that are currently set to NULL
On Import I agree. On Editing I think we should use the Z of the node, transfer it into the level field, and allow overruling it.
From a DB Admin perspective it is smarter to implicitly store 2.5D-values in the Z coordinate of the point and expose them via a view (Single PointZ of truth). We lose no information, but an attribute. This ensures we have no contradictory information
This is only necessary if we continue to save duplicate data
|
@domi4484 does this functionality base on primary keys to check for updates? In the AG-xx extensions we work with views, which means we have no primary keys. |
@cymed it tries to get an existing row by obj_id. If we can select one its an update, otherwise a new object |
Fixes #397
This fixes 2 issues:
flag_dirty
which in turn makes all not new objects look like modified even if they are not.The proposed solution keeps the session/cache but tries to tell sql alchemy which attributes where really changed.
Maybe long term it would be better to build an own cache.
Warning
This could have some performance implications. Need to be tested.
To help me debugging this one I pimped up a bit the import dialog with better display of the importing changes:
*
state in case there is a modified item insideOld value
column with the current DB value