14

Although I have seen many examples about doing this at ArcGIS Desktop, I am still trying to find a how to using QGIS. What I want to do is something like the image below.

example

5
  • 2
    You could probably manipulate the 2.5D polygon style into doing that.
    – csk
    Dec 11, 2019 at 17:04
  • @csk thanks for replying, I would appreciate if you could elaborate more on polygon manipulation.
    – Vinicivs
    Dec 12, 2019 at 3:21
  • 1
    It wouldn't be manipulating polygons, it would be manipulating the 2.5D polygon renderer, which is designed for displaying buildings. You would set up a 2.5d style, which creates a geometry generator style. Then you would need to make some serious changes to the geometry generator expression to introduce your data fields and add the bar graph. As far as I know it's never been done before, so it would be a lot of work in uncharted territory. I expect it would take at least two full days to accomplish. Good luck and please post a new question if you get partway into it and get stuck.
    – csk
    Dec 12, 2019 at 17:08
  • @csk I want to thank you very much by your reply. It is exactly what I hope to find at stack. I'm still a beginner on QGIS and although it will take me much more than 2 days to learn and implement the solution, now I have a clear path to follow.
    – Vinicivs
    Dec 14, 2019 at 1:56
  • 1
    I'm glad it was helpful. I did something similar (but for a different purpose) here: gis.stackexchange.com/questions/337207/… As you can see it's not an easy approach, and I think your desired bar graph outcome will be even more complicated. It seems possible though. Please post your solution as an answer to your own question when you figure it out.
    – csk
    Dec 17, 2019 at 16:51

1 Answer 1

11

One option to do this would be by modifying your data and visualizing it with the excellent qgis2threejs plugin. The idea is to turn your your time to Z coordinates. I tried it out with two GPX tracks I had. After adding the files to QGIS, I ran Set Z value algorithm, where I entered the following expression as the Z value:

second("time"-minimum("time"))

enter image description here

The expression takes the timestamp (stored in my data in a field called "time") from each point feature and compares it to the minimum timestamp in the whole layer. This calculation results in to an interval data type, which can be converted to integer seconds with the second function. For this to work with your data, you might have to use minutes or hours or use some kind of a multiplier.

Next up you should install the qgis2threejs plugin via the plugins dialog. If you have data with Z coordinates in your project it should detect that automatically and you can visualize the results with additional data and a basemap if you want. I also merged the layers and added a extruded polygon from the bounding box as the "cube":

qgis2threejs preview

  • Downside: really hard to build a legend for the space-time cube.
  • Upside: you'll have an interactive space-time cube and you can use all the cool functionalities in qgis2threejs to make the end result more informative.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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