[GRASS-dev] Temporal GIS: best practice to access a map at a specific time?

Laurent C. lrntct at gmail.com
Fri May 22 13:54:28 PDT 2015


Hi all,

I'm working on a python module which compute superficial flows using
simplified shallow water equations. It already works quite well and export
results as temporal data sets.
But I'd like to add the possibility to work with temporal data sets as
input (typically rainfall or other input flows).
I've looked at the documentation of the temporal module, but I haven't
figure out what would be the best way to access a strds at a specified time.
There might be something with get_registered_maps, but I don't know how to
select the map when the simulation time is between 'start-time' and
'end-time'. I don't know is SQL would be of any help here.

currently my program looks like this:

************
load grass maps as numpy arrays

while not sim_clock >= sim_duration:
    calculate time-step duration
    calculate flow and water depth
    write results

register produced maps in space-time dataset
************

I was thinking of checking at the beginning of the while loop if there is
the current input map is still valid for the current time-step, and ielse
loading the new one. Does this approach make sense and how could I do that?

Thanks for your time.

Regards,
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150522/c56227c3/attachment.html>


More information about the grass-dev mailing list