Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q dealing with NaN in map-matched vertex sequence #1

Open
Qinzixin opened this issue Oct 8, 2022 · 1 comment
Open

Q dealing with NaN in map-matched vertex sequence #1

Qinzixin opened this issue Oct 8, 2022 · 1 comment

Comments

@Qinzixin
Copy link

Qinzixin commented Oct 8, 2022

Hi there. Sorry to bother again. First of all, I would like to express my gratitude for sharing your amazing work and responding the previous questions! I am trying to understand the codes for map matching part so I added the following codes to STmatching_distribution_ver.py. Hope it is correct by logic.

if __name__ == '__main__':
    import pickle
    import pandas
    fr = open("data/tdrive/st_traj/tdrive.pkl",'rb')
    trs = pickle.load(fr) 
    traj_df = pd.DataFrame([])
    for col, values in trs.iterrows():
        traj_i = pd.DataFrame(data=values['trajectory'], columns=['LON', 'LAT'])
        traj_i['TRAJ_ID'] = values['id']
        trajectory = values['trajectory']
        traj_df = pd.concat([traj_df, traj_i], axis=0)
    print("end")
    traj_task_list = data_convert(traj_df)
    mmtr_list = []
    for traj in traj_task_list:
        mmtr = trajectory_matching(traj)
        mmtr_list.append(mmtr)
    print(mmtr_list)

However, most matched vertex sequences in mmtr_list contain some nan vertices. Should I ignore nan values or just eliminate those trajectories?

Also, Could you explain a little bit more about how to get the ultimate matching_result.csv file? Maybe I'm missing something.

Thanks so much!

Zixin Qin
BJTU

@cactuser-Lu
Copy link

May I ask if you have solved this problem? I am troubled by this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants