swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] Input data structure


From: Steve Railsback / Margaret Lang
Subject: Re: [Swarm-Support] Input data structure
Date: Mon, 22 Mar 2004 16:01:56 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

Eric McLeskey wrote:

I am wondering if it is possible to import spatial data with multiple
attributes per node into a SWARM model?  Here's an example of what I mean.
Imagine a text file containing column headers and then corresponding rows
like this:

node, x, y, z, var1, var2, var3
1, 12.3, 20.1, 11.0, 5,6,-9999
2, 12.4, 20.2, 11.1, 7,8,-9999
3, 12.5, 20.3, 11.2, 9,5,-9999

What would I need to do to use this type of data in SWARM?  Is there a swarm
gui that can handle floating point spatial coordinates?  I currenlty have
some routines that Paul Box wrote that create cell objects that can hold
multiple attributes provided from ascii grid files which can then be
displayed on a 2d raster but I don't think this would work for floating
point data.  Any advice or suggestions?

I wouldn't be surprised if Paul's code DID work for float data. The only trick is to divide each coordinate by the total extent of the area in that dimension, and then cast the result to an integer. Offlist, I will send you some code (written by Steve Jackson) that does just that, and puts data very much like yours into an object that is a subclass of Discrete2d.

Steve R.

--
Lang, Railsback & Associates
Arcata, CA
707 822 0453



reply via email to

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