How to save a map to a file at a given time ?

50 views
Skip to first unread message

Patrick Giraudoux

unread,
Aug 5, 2014, 7:49:15 AM8/5/14
to gama-p...@googlegroups.com
Dear listers,

During the experiment of a model, I produce a map as following:

display map{    
            grid cell lines:#white;
            species fondVallee aspect:geom;
            species zoneFav aspect:geom;
            species ater aspect:base;
            grid cellPred lines:#red;
            species pred aspect:base;
            }

I would like to save into a file (bitmap, jpeg, or whatever) the image obtained say every time a variable myMonth (defined in global) is equal to 10 (october).

I cannot find out whether it is possible in the doc (paper and on line). save does other things (text, csv, shp)  and no clear example is provided with save_batch

Has anybody some hint about it ?

Best,

Patrick




Srirama Bhamidipati

unread,
Aug 5, 2014, 9:29:25 AM8/5/14
to gama-p...@googlegroups.com
As far as I know, it is not possible from the code. There is a button on the right top corner of display and to be done manual is possible, 

Alexis Drogoul

unread,
Aug 5, 2014, 9:30:02 AM8/5/14
to gama-p...@googlegroups.com
Hi,

You can achieve what you want by combining the autosave and refresh_every facets of display. See http://code.google.com/p/gama-platform/wiki/G__DefiningDisplays for more information

Cheers 

Alexis 

--
Senior Researcher
UMI UMMISCO 209
IRD & UPMC, France.

Invited Researcher
DREAM, Can Tho Univ., Vietnam.
--
alexis....@gmail.com
--
--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To post to this group, send email to gama-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/gama-platform.
For more options, visit https://groups.google.com/d/optout.

Patrick Giraudoux

unread,
Aug 5, 2014, 10:44:21 AM8/5/14
to gama-p...@googlegroups.com
Great, I can manage with autosave indeed. "Refresh_every" can be interesting but has a big limitation since no offset is admitted. This means e.g. if the time step is one month starting simulating in January (month 1), it looks like being impossible to refresh every "october". For that  an offset of 9 months would be necessary save at 10, and then refresh every twelve... Suggestion for a new facet ?

Anyway, thanks for the hint. I will probably refresh_every:1 (the default) and then read the file list from R and automate the selection of files corresponding to a given month..

Best,

Patrick
Reply all
Reply to author
Forward
0 new messages