A method of processing a primary data record comprising location data, time data and measurement data, a spatial tree index comprising spatial tree nodes (S n) linked by pointers into a hierarchical structure with a first number of levels, the spatial tree nodes (S n) including a spatial tree root node (S 1), spatial tree branch nodes (S 2... S N-1) and spatial tree leaf nodes (S N), each spatial tree node (S n) corresponding to a given spatial region (R n) and further including a pointer to a root node (T 1) of a respective time tree index, and a plurality of time tree indexes, each time tree index corresponding to a respective spatial tree node (S n) and comprising time tree nodes (T m) linked by pointers into a hierarchical structure with a second number of levels, the time tree nodes (T m) including a time tree root node (T 1), time tree branch nodes (T 2... T M-1) and time tree leaf nodes (T M), wherein each time tree node (T m) corresponds to a given time period (P m), the method comprising: writing the primary data record to a primary data table; determining whether a spatial tree leaf node (S N) exists which corresponds to the spatial region (R N) that includes the location data; on a negative determination, generating the spatial tree leaf node (S N) which corresponds to the spatial region (R N) that includes the location data, and creating or updating spatial tree branch nodes (S 2... S N-1) connecting the spatial tree leaf node (S N) to the spatial tree root node (S 1); for each spatial tree node (S n) which corresponds to a spatial region (R n) that includes the location data, updating the respective time tree index by: determining whether a time tree leaf node (T M) exists which corresponds to the time period (P M) that includes the time data; on a negative determination, generating the time tree leaf node (T M) which corresponds to the time period (P M) that includes the time data, and creating or updating time tree branch nodes (T 2... T M-1) connecting the time tree leaf node (T M) to the time tree root node (T 1); and updating the time tree leaf node (T M) to include a pointer to the primary data record. writing the primary data record to a primary data table; determining whether a spatial tree leaf node (S N) exists which corresponds to the spatial region (R N) that includes the location data; on a negative determination, generating the spatial tree leaf node (S N) which corresponds to the spatial region (R N) that includes the location data, and creating or updating spatial tree branch nodes (S 2... S N-1) connecting the spatial tree leaf node (S N) to the spatial tree root node (S 1); for each spatial tree node (S n) which corresponds to a spatial region (R n) that includes the location data, updating the respective time tree index by: determining whether a time tree leaf node (T M) exists which corresponds to the time period (P M) that includes the time data; on a negative determination, generating the time tree leaf node (T M) which corresponds to the time period (P M) that includes the time data, and creating or updating time tree branch nodes (T 2... T M-1) connecting the time tree leaf node (T M) to the time tree root node (T 1); and updating the time tree leaf node (T M) to include a pointer to the primary data record. determining whether a time tree leaf node (T M) exists which corresponds to the time period (P M) that includes the time data; on a negative determination, generating the time tree leaf node (T M) which corresponds to the time period (P M) that includes the time data, and creating or updating time tree branch nodes (T 2... T M-1) connecting the time tree leaf node (T M) to the time tree root node (T 1); and updating the time tree leaf node (T M) to include a pointer to the primary data record.