Street geometry parsing on Road Disruptions


#1

Hi,

When requesting a RoadDisruption I get a list of affected streets, each street with a list of segments. Are these segments supposed to be interpreted as a single line string? And in that case, are the segments supposed to be in order?

If I do that and construct the line string with the segments in the order given the result is not right. I tried manually ordering an example and the line string is correct so I assume that the data is not being correctly returned. Is my assumption correct?

As and example see the full closure ([A4180] Bury Street (HA4,HA6)) in TIMS-185322:

{
"$type": “Tfl.Api.Presentation.Entities.StreetSegment, Tfl.Api.Presentation.Entities”,
“toid”: “0”,
“lineString”: “[[-0.436368,51.589041],[-0.436547,51.589385]]”,
“sourceSystemId”: 0
},
{
"$type": “Tfl.Api.Presentation.Entities.StreetSegment, Tfl.Api.Presentation.Entities”,
“toid”: “0”,
“lineString”: “[[-0.436547,51.589385],[-0.436821,51.589738]]”,
“sourceSystemId”: 0
},
{
"$type": “Tfl.Api.Presentation.Entities.StreetSegment, Tfl.Api.Presentation.Entities”,
“toid”: “0”,
“lineString”: “[[-0.436162,51.587807],[-0.436368,51.589041]]”,
“sourceSystemId”: 0
},
{
"$type": “Tfl.Api.Presentation.Entities.StreetSegment, Tfl.Api.Presentation.Entities”,
“toid”: “0”,
“lineString”: “[[-0.43371,51.584797],[-0.436162,51.587807]]”,
“sourceSystemId”: 0
},
{
"$type": “Tfl.Api.Presentation.Entities.StreetSegment, Tfl.Api.Presentation.Entities”,
“toid”: “0”,
“lineString”: “[[-0.436821,51.589738],[-0.439678,51.593336]]”,
“sourceSystemId”: 0
}

EDIT: I’ve seen some more examples and realised my approach was wrong. If I import the segments as a multiline string I get more sensible geometries.

But sometimes the geometries don’t look so good

02

Is there any place where I can get more info on what exactly these lines represent?