Closed FLO-2DKaren closed 2 months ago
Hi @FLO-2DKaren, Just to eliminate a possible cause of first error 1.: Did you create a new FLO-2D Project? It is needed because the dropbox area is a new field in the Storm Drain Nodes table:
@FLO-2DJJ @rpachaly
OK let's get some help from Robson then because maybe we can add this to the auto port or maybe add it as an afterthought with a trigger.
Hi Robson,
Can we explore updating the GeoPackage for the Drop Box? There may be additional things too. I'm not sure what the structure check is for the Auto Port to kick in. I think you are also working with some other GeoPackage tables that may also need auto port from v1.0.0.
Hi all,
I'm going to add it to the autoport code. Is there any other field or layer that was added?
The autoport code works like this:
If a layer of a table was updated on the db_structure, it should be ported with the default value and work fine. I just tested here and the dropboxarea field is ported correctly and I did not get any errors.
Karen, your project was ported before or after the dropboxarea field was added to the code? If it was ported before, it will show an error. Can you check this?
Hi @rpachaly,
Also, there is a new table user_swmm_storage_units.
Hope that helps.
Field drboxarea is the only field added to the user_swmm_nodes table.
It works on the autoport.
Consider that file SWMMFLODROPBOX.DAT is imported/exported to/from user_swmm_nodes.
I saw that it is exported when I was working on exporting the sd data to hdf5. I did not test the import though. Probably I will do it when coding the import from hdf5.
Also, there is a new table user_swmm_storage_units.
Just checked here and it is ported correctly.
Hi Robson,
It wasn't ported. It was started from version 1.0.0. Is that something I can fix?
Hi Robson,
It wasn't ported. It was started from version 1.0.0. Is that something I can fix?
Did you start before the dropboxarea was added? The dropboxarea is not something that is used to evaluate if a gpkg is outdated.
The gpkg port should be done after the dropboxarea is added.
I'm going to close this issue but just in case someone else sees this who isn't with us, I want to note that I did an midline fix for this by adding drboxarea field real to the SD Inlets layer in the User Layer Group.
There remains a sub-task that needs to be investigated:
2. Drop boxes cannot be assigned to junctions.
I'll do it in a separate issue #1296.
Oh right!!! Thanks JJ
Drop Box Area Errors
https://github.com/FLO-2DSoftware/qgis-flo-2d-plugin/assets/20424460/dfca4a12-ac08-4d30-ace8-a4ed3cc79c20
ERROR 070618.0451: creation of Storm Drain Nodes (Inlets) layer failed after reading 0 inlets!
Error: KeyError: 'drboxarea'
In file: C:\Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\flo2d\gui\dlg_stormdrain_shapefile.py
In function: load_inlets_from_shapefile
On line 1151: feat.setAttribute("drboxarea",drboxarea)