Pervasive Systems Centre Electrocnic and Computer Systems, University of Southampton

 

Create new streetlight network

Note: This guide assumes that you have successfully installed OMNeT++ and SUMO, and both tools are installed at "C:\Users\user\scr".  Do not process with this guide if you yet to import StreetlightSim into OMNeT++.

Step 1:  Download the desired area of interest from OpenStreetMap

  • Select the area of interest by click on the green "Export" button on the top left of the web page then the link "Manually select a different area" to define the size of the area of interest.  
  • Export the defined area by click on the blue "Export" button on the left and save the data to  "<SUMO root directory>\bin\".
               

Step 2:  Identify the streetlight locations using JOSM.

  •  Open the downloaded area of interest with JOSM and load the satellite image from Bing Sat by selecting Imagery-> Bing Sat from JOSM's menu bar.
               

  • Draw a polygon on the main road and normal to the actual streetlight geographical location.  Then, set the values of the polygon as shown in the figure below.
               
>

Step 3:  Add pedestrian footpath.

  • Add the pedestrian footpaths using the draw tool.  Then, set the values of these foothpaths as shown in the figure below.
               

Step 4:  Generate the XML file for Streetlight locations and traffic routes.

Note:  The xml file "typemap_building.xml" can be found in StreetlightSim/AdditionalTools/SUMO.  This xml file needs to be copied to "<SUMO root directory>\bin\" before "polyconvert" command is executed.

  • In an OMNeT++ MinGW command window, set the path of the command prompt to "<SUMO root directory>\bin\"
  • Run the command "netconvert.exe --osm-files <OpenStreetMap_file_name>.osm -o <OpenStreetMap_file_name>.net.xml".
  • Run the command "polyconvert.exe --net-file <OpenStreetMap_file_name>.net.xml --osm-files <OpenStreetMap_file_name>.osm --type-file typemap_building.xml -o <OpenStreetMap_file_name>.poly.xml".  

Final step:  Generate / Convert the XML into StreetlightSim Format.

Note:  Both the "sumo_file_gen.sh" and "streetlightSimRouteGen.exe" can be found in StreetlightSim/AdditionalTools/SUMO and  StreetlightSim/AdditionalTools/streetlightSimRouteGen/bin/Release, respectively.  These tools need to be copied to "<SUMO root directory>\tools\assign" before "sumo_file_gen.sh" is executed.

  • Copy the <OpenStreetMap_file_name>.osm, <OpenStreetMap_file_name>.net.xml and <OpenStreetMap_file_name>.poly.xml from step 4 to "<SUMO root directory>\tools\assign". 
  • In an OMNeT++ MinGW command window, set the path of the command prompt to "<SUMO root directory>\tools\assign" and run the command "sumo_file_gen.sh <OpenStreetMap_file_name> <number of different paths>".   For example,  "sumo_file_gen.sh streetlight_map 10" will generate 10 different routes based on the streetlight_map.osm file.
  • All the necessary files for the new streetlight network are located in "<SUMO root directory>\tools\assign\OpenStreetMap_file_name".