swarm-gis
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-GIS] RE: [Swarm-Support] discrete2d output


From: Paul Box
Subject: [Swarm-GIS] RE: [Swarm-Support] discrete2d output
Date: Sat, 7 Feb 2004 15:33:34 -0700

I have placed two examples that read and write arc/info ascii grid files to a 
structure that has a 
discrete2d somewhere in its ancestry.  Both examples are messy and 
undocumented.  I've 
threatened to clean these up and "release" them for so long that it's become a 
joke.  If you're 
willing to wade through these, they might help you out.

One has shrimp swimming up a stream.  It reads a river and a roads file, both 
in arc grid ascii 
format.

http://geohive.nr.usu.edu/~sanduku/swarm/shrimp-swimming.tar.gz

The other is much larger, with weeds infesting an area.  The simulation reads 
6 files representing 
vegetation type, elevation, aspect, a moisture index, and roads, all as arc 
ascii grids.   Once the 
simulation is started, you need to right-click a cell, and call its 
"createPlant" message to actually 
start an infestation.  This will write the results of the infestation at any 
point to an ascii grid file, by 
calling the DataFileSwarm writeTrmi or writeVeg methods (yes, they should be 
renamed 
writeInvestation-- the writeInfestation method will crash the program).  You 
can also use the 
readPlantHurtFile, readPlantRemovalFile, and readPoisonSoilFile methods to 
input ascii grid files 
representing different methods of plant treatment, and set the 
initialInfestation variable to start 
the simulation with an ascii grid file.

This file is part of a student's masters thesis, which is in the writeup stage 
right now.  It has a lot 
of bizarrly written code that was never intended to see the light of day; one 
of the interim 
programmers was especially bad about using variable names like "specialFile2" 
and the like.  
However, if you look hard enough, you can find the bits that do what you were 
asking about 
before.

http://geohive.nr.usu.edu/~sanduku/swarm/infesting-plant.tar.gz

Arc ascii grids can be readily imported into Arc/INFO with the ASCIIGRID 
command, or into Arcview 
using Spatial Analyst.  The plants thing has some avenue scripts that will 
help with the interchange 
between arcview and swarm, but again they are undocumented and have several 
confusing variable 
names.

Any helpful suggestions or derogatory comments can be sent to 
address@hidden

>===== Original Message From Li An <address@hidden> =====
>Hi,
>
>I would like to output some Discrete2D data (e.g., simulation of forest and
>developed land) into a text file that can be read into GIS in Swarm (java). 
Have
>idea how to do it? or examples?
>
>Thanks,
>
>Li
>
>_______________________________________________
>Support mailing list
>address@hidden
>http://www.swarm.org/mailman/listinfo/support

////////////////////////////////////////
// Paul Box
// Aquatic, Watershed, and Earth Resources
// Utah State University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]