nens / threedi-schema

The schema of 3Di schematization files
MIT License
0 stars 0 forks source link

Warning instead of error for schematisations that have structure controls that reference non-existing connection nodes #91

Closed leendertvanwolfswinkel closed 4 weeks ago

leendertvanwolfswinkel commented 1 month ago

This schematisation Third_time_the_charm.zip has a table control that references a non-existent connection node. More precisely, the v2_control_measure map.object_id references a connection_node.id that does not exist. Therefore, a geometry cannot be created during the migration to schema 224

It would be good to treat this the same way as we do with surface_map rows that reference non-existent connection nodes. Catch the error and raise a warning instead

margrietpalm commented 1 month ago

Propose to skip creation of rows in control_measure_location where connection_node_id refers to a non-existing connection node. Subsequently, control_measure_map rows refering to non-existing control_measure_location_id should be skipped as well.

This could result in rows in table_control and memory_control with id's that are not present in control_measure_map. Schematisations with this fail the modelchecker, so the migration should also remove those rows.

leendertvanwolfswinkel commented 1 month ago

Tested and works as expected