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
if path is None:
resulting_path, p_off, n_off = [], 0, 0
else:
resulting_path = path[:]
print('resulting_path:', resulting_path)
print('first link length:', resulting_path[0].length)
print('poffs length:', p_off)
while resulting_path[0].length < p_off:
p_off -= resulting_path[0].length
debug(f"removing {resulting_path[0]} because p_off is {p_off}")
resulting_path.pop(0)
while resulting_path[-1].length < n_off:
n_off -= resulting_path[-1].length
debug(f"removing {resulting_path[-1]} because n_off is {n_off}")
resulting_path.pop()
debug(
f"path[n-1] ({resulting_path[-1]}) seems to be longer than n_off {n_off}"
)
return resulting_path, p_off, n_off
This is result:
openlr_code: C0oLuRXRVSKUCf3P/0EiZugA
openlr: LineLocation(points=[LocationReferencePoint(lon=104.12688374519348, lat=30.681134462356567, frc=<FRC.FRC4: 4>, fow=<FOW.MULTIPLE_CARRIAGEWAY: 2>, bear=231, lfrcnp=<FRC.FRC4: 4>, dnp=557), LocationReferencePoint(lon=104.12127374519348, lat=30.67922446235657, frc=<FRC.FRC4: 4>, fow=<FOW.MULTIPLE_CARRIAGEWAY: 2>, bear=73, lfrcnp=<FRC.FRC7: 7>, dnp=0)], poffs=0.908203125, noffs=0.001953125)
poffs: 0.908203125
noffs: 0.001953125
resulting_path: [Line with id=42760895 of length 527.836750457563, Line with id=42760896 of length 48.9481183079635, Line with id=42783097 of length 8.50953763106263]
first link length: 527.836750457563
poffs length: 505.869140625
match links: (42760895, 42760896, 42783097)
total dnp is 557, poffs is 0.908203125, so poffs-length is 505 meters
, but first link is 527 meters(other links total about 60 meters) more than poffs-length 505, so first link doesn't remove, but it is not reasonable.
guyanf
changed the title
May
Maybe need to add tolerance at poffs and noffs.
May 6, 2020
Hi.
Sorry, Please read next record.
Thanks!
The text was updated successfully, but these errors were encountered: