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

Avoid timestamps in trajectory IDs #363

Open
anitagraser opened this issue Jan 26, 2024 · 0 comments
Open

Avoid timestamps in trajectory IDs #363

anitagraser opened this issue Jan 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@anitagraser
Copy link
Collaborator

Currently, e.g. after clipping, the trajectory IDs in the trajectory dfs include timestamp information. This should be replaced with cleaner IDs, like in the to_traj_gdf output:

import geopandas as gpd
import movingpandas as mpd
from shapely.geometry import Polygon

gdf = gpd.read_file("../sample_data/geolife.gpkg")
tc = mpd.TrajectoryCollection(gdf, traj_id_col="trajectory_id", t="t")

poly = Polygon.from_bounds(116.343,39.900,116.373,39.914)
clipped = tc.clip(poly)
clipped.to_point_gdf()

image

clipped.to_traj_gdf()

image

@anitagraser anitagraser added the enhancement New feature or request label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant