Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

RE: spatial dynamics

New Message Reply Date view Thread view Subject view Author view

Subject: RE: spatial dynamics
From: Nicolas (nicolas.becu@gmail.com)
Date: Wed May 09 2007 - 16:15:21 CEST

Dear Mira

Here is the st file containing the method to save your asc files at each
step.
To load this file, you should do a "File In" directly from Visual Works.
After having open Cormas, go back to the Visual Works Launcher window and
use the file browser from Visual Works. Browse to the folder in which you
saved the st file. Right click the st file and then select "File In".

Cheers

Nicolas

PS: doesn't matter that the st file is 3kb. It's still valid. The point is
that it can only be open by visual works using this "File In" function

-----Original Message-----
From: owner-cormas@cirad.cirad.fr [mailto:owner-cormas@cirad.cirad.fr] On
Behalf Of Miao Wang
Sent: mercredi 9 mai 2007 08:22
To: cormas@cirad.fr
Subject: spatial dynamics

Dear Mira

You can use the original method of Cormas used to save asc file.

It's in the spaceModel class, and it's called "saveAttributesASC: attributes
fileParameters: aList".

The idea is to call this method at the end of each step of your model.
The problem is that this method saves the files under the same name for each
attribute "ex: landUseCormas.asc"
Thus at each step it will overwrite the same file.
So, I've changed a bit the method so that it saves one file per step with
different names as so (landUseCormas1.asc landUseCormas2.asc
landUseCormas3.asc etc...) the number represents the timeStep

The method is now called "saveCurrentStepAttributesASC: attributes
fileParameters: aList"
 

To use it :
- first import this new method in your cormas Kernel (File In).
- then add the 3 following lines at the end of the step of your model

paramatersList := #('1' '100' '2' '0') asList. "with x the xllcorner value,
y the yllcorner value, c the cell size value and n the no data value /
numbers should be between commas!"
attributesList := #(#landUse #area). "or whatever list of attribute you want
to save at each step"
self spaceModel saveCurrentStepAttributesASC: attributesList fileParameters:
paramatersList.

Run your model and check your model/maps folders it should contain a whole
set of asc files now.

Good luck

Nicolas

-----Original Message-----
From: owner-cormas@cirad.cirad.fr [mailto:owner-cormas@cirad.cirad.fr] On
Behalf Of Miao Wang
Sent: mercredi 9 mai 2007 08:22
To: cormas@cirad.fr
Subject: spatial dynamics

Hi all!
 
I know cormas can save 1 final simulation result as a ASCII file. In order
to study the spatial dynamics of a study area, it is important for me to
save the spatial entity simulation result of each time step(or some key time
steps)as ASCII file or some other file types that can be imported to GIS .
Is it possible? I don't think snapshot's JPG files are easy to be processed
by GIS.
 
Great thanks for your help!
 
Mira
 
 
 
 
Miao Wang at Geomatics
School of Civil Engineering and Geosciences G.19, Cassie Building,
University of Newcastle Upon Tyne, NE1 7RU England
Email: miao.wang1@ncl.ac.uk

 
 
 
________________________________

 

New Message Reply Date view Thread view Subject view Author view
 

Back to home