Saturday 29 December 2018

qgis - GIS file format for space and time data?


I need some advice with GIS file format choice. Here is my problem: I have about 100 stations. At each station water temperature is measured daily for 1 year I want to load this data to QGIS and be able to quickly display a water temperature map for a user-selected day. I came up with following file structure: A shapefile with lat, lon, time, value columns. For each combination of lat, lon, time there is a new point shape. So for each station I have 365 "overlapping shapes". Then I can use the "query" in QGIS to filter out shapes that have the time attribute equal to the selected day. This is OK for 365 days but becomes little inefficient for several years (shapefile becomes huge and QGIS displays it very slowly)


Is there any other GIS format (like Spatialite or Postgis) that I could use to store the time-space data more efficiently and still be able to visualize it in QGIS without extra programming?



Answer



Uhm, you can work in PostGIS to give a better structure to the database.





  1. Create a table S (stations) with the following fields:



    • StationID

    • Location (a point that specifies the coordinates)




  2. Create another M (measurements) table with the fields:




    • StationID

    • MeasurementDT (date and time of the measurement)

    • Value (measured value)




Now, you can show all the values in a GIS executing the query:


SELECT S.*, M.MeasurementDT, M.Value
FROM M
LEFT JOIN S

ON M.StationID=S.StationID
WHERE... (query conditions, by time or other parameters)

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...