We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#从中提取其中的到离站轨迹 import shapely if line_intersection.is_empty: pass else: #将每一次到站信息放入list中 if type(line_intersection) == shapely.geometry.linestring.LineString: arrive = [line_intersection] else: arrive = list(line_intersection) #构建为DataFrame arrive = pd.DataFrame(arrive) #取每一次到离站时间 arrive['arrivetime']= arrive[0].apply(lambda r:r.coords[0][0]) arrive['leavetime']= arrive[0].apply(lambda r:r.coords[-1][0]) arrive
出现错误:'MultiLineString' object is not iterable怎么解决
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#从中提取其中的到离站轨迹
import shapely
if line_intersection.is_empty:
pass
else:
#将每一次到站信息放入list中
if type(line_intersection) == shapely.geometry.linestring.LineString:
arrive = [line_intersection]
else:
arrive = list(line_intersection)
#构建为DataFrame
arrive = pd.DataFrame(arrive)
#取每一次到离站时间
arrive['arrivetime']= arrive[0].apply(lambda r:r.coords[0][0])
arrive['leavetime']= arrive[0].apply(lambda r:r.coords[-1][0])
arrive
出现错误:'MultiLineString' object is not iterable怎么解决
The text was updated successfully, but these errors were encountered: