You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version of the osm_fill_function assigns the wrong values to some short links.
Here there is a small example from the network in Hull where the function assigns the ref A1033 to the links on the A1079.
The problem seems to happen when the values in the highway attribute are compared. In this particular case, the U-turn links have a different type than the main links of the A1079, so the refs of the nearest links are skipped in this part of the function
for(k in 1:2){
for(i in 1:nrow(lines_major)){
if(is.na(lines_major$ref[i])){ #find the item whose ref equals to NA
for(j in 2:nearest_neighbour){ #starts from 2 because j=1 is the point itself
idx <- nn$nn.idx[i,j] # allocate the row number of the nearest centroid
if(lines_major$highway[idx] == lines_major$highway[i]){
if(!is.na(lines_major$ref[idx])){
lines_major$ref[i] <- lines_major$ref[idx]
break
}
}
}
}
}
}
As the nearest trunk road is the A1033, it uses that ref to fill the missing value.
Nonetheless, it does not seem to affect the main links.
The text was updated successfully, but these errors were encountered:
The current version of the
![image](https://github.com/ITSLeeds/MinorRoadTraffic/assets/69847296/34981c2b-f77a-4971-ab17-eecadc130a48)
osm_fill_function
assigns the wrong values to some short links.Here there is a small example from the network in Hull where the function assigns the ref
A1033
to the links on theA1079
.The problem seems to happen when the values in the
highway
attribute are compared. In this particular case, the U-turn links have a different type than the main links of theA1079
, so the refs of the nearest links are skipped in this part of the functionAs the nearest
trunk
road is the A1033, it uses that ref to fill the missing value.Nonetheless, it does not seem to affect the main links.
The text was updated successfully, but these errors were encountered: