visualize_policy_target_tool
Preview policy target area by visualizing affected road segments on a map before applying changes. Confirm which roads within a specified radius will be impacted.
Instructions
Visualize policy target area using SUMO's built-in visualization.
Only use when user EXPLICITLY requests to preview policy area!
- User says "show me which roads will be affected" → Use this
- User just wants to apply policy → Do NOT use, proceed with policy tool
This tool helps visualize which road segments will be affected by a policy
before actually applying it. Essential for confirming policy target area!
VISUALIZATION:
- Shows ONLY the selected road segments within the specified radius
- Uses SUMO's standard plot_net_selection.py for consistent styling
- Clean, focused view of the policy target area
USE CASES:
1. "Show me which part of 테헤란로 near 강남역 within 300m will be affected"
2. "Visualize policy target before deleting road segments"
3. "Preview lane reduction area before applying"
REALISTIC WORKFLOW:
Step 1: Use this tool to visualize policy area
Step 2: Confirm the target area is correct
Step 3: Apply policy using edge_edit_tool/reduce_lanes_tool/speed_limit_edit_tool
Args:
net_file: Network file path
target_road_name: Road name (e.g., "테헤란로", "Teheran-ro")
reference_location: Reference point (e.g., "강남역", "Gangnam Station")
radius_km: Radius in km (e.g., 0.3 for 300m)
output_dir: Output directory
Returns:
PNG file showing selected road segments only
EXAMPLE:
visualize_policy_target_tool(
net_file="gangnam_station.net.xml",
target_road_name="테헤란로",
reference_location="강남역 교차로",
radius_km=0.3
)
-> Shows: Only the 300m segment of Teheran-ro near Gangnam Station (selected segments)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net_file | Yes | ||
| radius_km | No | ||
| output_dir | No | output/visualizations | |
| target_road_name | Yes | ||
| reference_location | No |