I have trajectory data in LineStringM format and visualize relevant results via Leaflet on street map tiles. I was wondering whether it is possible to visualize spatiotemporal plots on OSM tiles.

I understand that there are commercial software solutions providing what I am interested in but I was wondering whether it is possible to achieve similar results in a simple manner without drastically changing my workflow using open-source alternatives. It looks like a similar question has been asked here before though the answers might be outdated.

  • 2
    You could simply visualize in a similar way using MapBox GL JS V1 and set a z value for each hour, since you are using 3 dimensional data (with time instead of height) that might work. You could also try using the R plotly to combine its 3D and map plots – Dror Bogin Dec 9 '20 at 19:39

This might not be exactly what you are looking for, but you could use QGIS for something similar, for example, I created a points layer with a date-time field which was filled with now() as the default value when I added each point. I then set a z field and populated it with this expression (test being my layer):

(epoch( "time" ) - epoch(attribute( get_feature_by_id('test',1),'time')))/1000

This gave me a table looking something like the first picture, where every second adds another meter of elevation (or another z anyway)

enter image description here

I then used the Set Z Value processing tool and with a z value set I could visualize my layer in a 3D map view.

I would recommend maybe adding an additional ~50 meters to set a base height above the terrain, but that's up to you.

enter image description here

You could probably get something similar with a maplibre js map but if want a relatively simpler solution, this might work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.