nens / threedi-schema

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

Control measure map geometry is reversed #96

Closed leendertvanwolfswinkel closed 4 weeks ago

leendertvanwolfswinkel commented 1 month ago

The structure control migration should generate a line from control_measure_location.geom to table_control.geom or from control_measure_location.geom to memory_control.geom, but the geometry that is created is reversed.

And please draw the line to the start connection node of the v2_pumpstation, not to "in between start and end node"

margrietpalm commented 1 month ago

@leendertvanwolfswinkel

The Excel states that the table_control.geom or memory_control.geom should be:

Use the center point (ST_InterpolatePoint(the_geom, 0.5)) of the object indicated by the value in target_type with the ID target_id

Because control_measure_map.geom is the line from control_measure_location.geom to *_control.geom. So given the definition above, this is why for v2_pumpstation one of the line ends is "in between start and end node". The easy fix would be to change the definition for v2_pumpstation.geom to the start node of v2_pumpstation. Is this ok?

Conclusion: write new code to use only start_node, don't modify v2_pumpstation

margrietpalm commented 1 month ago

Ensure that control_measure_map.geom is a valid geom (https://github.com/nens/threedi-schema/issues/102)

leendertvanwolfswinkel commented 1 month ago

Tested and it works as expected