Skip to content

Add Porto taxi trajectory rasterization example with custom log-sum merge#1022

Merged
brendancol merged 5 commits into
masterfrom
issue-1021
Mar 18, 2026
Merged

Add Porto taxi trajectory rasterization example with custom log-sum merge#1022
brendancol merged 5 commits into
masterfrom
issue-1021

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

@brendancol brendancol commented Mar 17, 2026

Closes #1021

Summary

  • Adds examples/user_guide/33_Porto_Taxi_Trajectories.ipynb with line rasterization on real GPS taxi trajectories
  • Downloads 200K trips from the ECML/PKDD 2015 Porto taxi dataset (UCI ML Repository, ~509 MB). Each trip is a full GPS trace with readings every 15 seconds, not just pickup/dropoff points
  • Parses polyline JSON into ~197K LineStrings, computes trip duration from GPS point count
  • Rasterizes onto an 800x600 grid three ways: trip count, total duration (sum), and a custom @ngjit log-duration merge
  • The log merge compresses dynamic range so side streets show up alongside major highways

Test plan

  • Run the notebook end-to-end (requires ~509 MB download from UCI)
  • Verify all three raster panels render on a dark background
  • Check that ~59% of pixels have non-zero values (good trajectory coverage across Porto)

@github-actions github-actions Bot added the performance PR touches performance-sensitive code label Mar 17, 2026
Replace NYC zone-centroid lines with actual GPS traces from the
ECML/PKDD 2015 Porto taxi dataset (196K multi-point trajectories).
@brendancol brendancol changed the title Add NYC taxi line rasterization example with custom log-sum merge Add Porto taxi trajectory rasterization example with custom log-sum merge Mar 17, 2026
- hydrology.rst: point autosummary entries to actual module paths
  (xrspatial.hydro.*.* instead of non-existent xrspatial.*.*)
- multispectral.rst: fix Built=Up typo to Built-Up
- multispectral.py: fix ndvi plot directive indentation
- emerging_hotspots.py: fix RST table indentation and add blank line
- zonal.py: fix crop example using zones_ids=[0] on terrain with no
  zeros; create a proper binary zone raster instead
@brendancol brendancol merged commit 45ecdb9 into master Mar 18, 2026
11 checks passed
@brendancol brendancol deleted the issue-1021 branch May 4, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Porto taxi trajectory rasterization example with custom non-linear merge

1 participant