feat(sensor): 返回候选节点最大管径

This commit is contained in:
2026-08-03 19:00:00 +08:00
parent b0e9d480ef
commit 1432934f12
8 changed files with 203 additions and 5 deletions
+14
View File
@@ -80,6 +80,11 @@ def _sensor_points(
points.append(
{
"node_id": node_id,
"max_pipe_diameter": (
float(node["max_pipe_diameter"])
if node["max_pipe_diameter"] is not None
else None
),
"project_x": project_x,
"project_y": project_y,
"map_x": map_x,
@@ -92,6 +97,15 @@ def _sensor_points(
return points
def get_sensor_placement_candidate(
network: str,
node_id: str,
) -> dict[str, Any]:
"""Return the authoritative editable point data for one junction."""
return _sensor_points(network, _normalize_locations([node_id]))[0]
def validate_sensor_placement_nodes(
network: str,
sensor_location: list[str],