【SUMO】Convert CSV files to XML files in SUMO

Table of Contents of Series Articles

[SUMO] SUMO runs its own OSM introductory tutorial



1. Enter the CMD command line and enter the sumo file

  1. Find the folder where sumo is located and put the CSV file into the folder in advance
  2. Enter the CMD command line, find the file where sumo is located and enter
cd /d D:\SUMO\sumo-1.17.0

2. dir view

Once you are used to Linux systems, you will think of lscommand statements, but in CMD, you use statements when you need to see all the folders and files in a directory dir. You can see that there is already a CSV file in the directory.
Insert image description here

3. Complete it through sumo’s own statements: convert CSV files into XML files in SUMO

python ./tools/xml/csv2xml.py  vanet-trace-creteil-20130924-0700-0900.csv -x ./data/xsd/fcd_file.xsd -o train.xml

Here ./tools/xml/csv2xml.pyis the tool that comes with the sumo folder; convert vanet-trace-creteil-20130924-0700-0900.csvthe file into an xml file and name the xml file train.xml.
Insert image description here

4. Effect

1.CSV file format

Insert image description here

2. XML file format

Insert image description here

Guess you like

Origin blog.csdn.net/JingYan_Chan/article/details/133137861