0

I am using OSMNX to gather OSM map data to create a road network. I have real time flow data from HERE, and it is in this format:

<TRAFFICML_REALTIME xmlns="http://traffic.nokia.com/trafficml-flow-3.2" CREATED_TIMESTAMP="2021-10-26T21:42:30Z" MAP_VERSION="" UNITS="metric" VERSION="3.2">
<link type="text/css" rel="stylesheet" id="dark-mode-custom-link"/>
<link type="text/css" rel="stylesheet" id="dark-mode-general-link"/>
<style lang="en" type="text/css" id="dark-mode-custom-style"/>
<style lang="en" type="text/css" id="dark-mode-native-style"/>
<RWS TY="TMC" MAP_VERSION="202103" EBU_COUNTRY_CODE="3" EXTENDED_COUNTRY_CODE="E3" TABLE_ID="39" UNITS="metric">
<RW LI="339-01403" DE="Abdülezelpaşa Caddesi/Kadir Has Caddesi" PBT="2021-10-26T21:42:30Z" mid="e7816666-0334-48a9-b15b-673a10edf88f">
<FIS>
<FI>
<TMC PC="30026" DE="Atatürk Bulvarı/Atatürk Köprüsü" QD="+" LE="0.10589"/>
<SHP FC="3">41.02248,28.96148 41.02258,28.96139 </SHP>
<SHP FC="3">41.02258,28.96139 41.02268,28.9613 </SHP>
<SHP FC="3">41.02268,28.9613 41.02274,28.96123 41.02279,28.96119 41.02284,28.96116 </SHP>
<SHP FC="3">41.02284,28.96116 41.0229,28.96114 41.02296,28.96113 41.02303,28.96112 </SHP>
<SHP FC="3">41.02303,28.96112 41.02309,28.96111 41.02313,28.9611 41.02318,28.96108 41.02323,28.96105 41.02328,28.96101 41.02333,28.96097 </SHP>
<CF CN="0.93" FF="39.0" JF="0.0" SP="41.45" SU="41.45" TY="TR"/>
</FI>

I am trying to pair the OSM roads with this data. Is using road names the only option or is there a way I can achieve this with shape coordinates?

Xia
  • 156
  • 2
  • 9
  • Please provide a minimal reproducible code snippet of what you're doing plus what your research so far has revealed, so we can fill in the remaining gaps. – gboeing Oct 27 '21 at 05:14
  • @gboeing Currently I don't have many things revelead. I want to feed the flow data to the traffic network as an initial flow and simulate what's going on. To be able to do this, I am importing a network with OSMNX and I import the XML file from here in the format that I provided. To be able to do this, I need to match the nodes of the network that I acquired by OSMNX with the data. I will be writing the simulation code after I match the roads so I only have the code that I import the network and data right now. – Xia Oct 27 '21 at 07:07

1 Answers1

0

HERE Traffic supports 3 types of map matching mechanism (Reference).

  1. TMC (Traffic Message Channel) - You need HERE map data content to get the location codes to mapping traffic flow to the map. But OSM doesn't bundled Traffic Location Tables which is used to mapping between HERE Traffic and map content, so it's not possible to do this way.
  2. OLR (OpenLR Location Referencing) - You can use OLR to mapping to any map data geometries but you will need to decode OLR base64 string and mapping to the map with your algorithm because OLR only indicates start and end of road segments, you need to calculate the roads between them. Basically, it's very difficult because you need to write your own decoder first, then write your routing algorithm to perform this job.
  3. SHP (Shape Points)- Use the shape points, however the coverage is limited and variable from time to time because it's an addition to TMC coverage.

If your requirement is to display level of congestion on the map, I would suggest to use HERE Traffic Tile instead