swarm-support
[Top][All Lists]
Advanced

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

Re: .pgm files


From: Matt Aylward
Subject: Re: .pgm files
Date: Wed, 09 Dec 1998 10:57:37 +0800

Matt,
I use .pgm files a great deal in my simulations for transfering GIS data
in and out of Swarm. I usually use "xv" or a plain text editor for
editing. 
There are some problems you should be aware of:

1) Most editing programs, including xv, add comment lines beginning with
a "#". The Swarm pgm-to-Discrete2d methods do not deal with these
comments at all, so they cause an error and your simulation will bail
out. I have been meaning to write a fix for this but havn't had time.
For now I just delete all comment lines before using the pgm file in
Swarm.

2) Many programs automatically convert an ASCII pgm to a RAW (binary)
pgm when you open it (e.g., ImageMagik does this). Again this will kill
your simulation. So be sure to specifically save as ASCII, and remove
the comment lines.

Netpbm are definately has the best C libraries and command-line programs
for manipulating ASCII pgms, but of course the do not have the
interactive interfaces.

If you have any specific problems, let me know.
I have written a number of methods to work between pgm's and
Duscrete2d's, e.g., to set the world size of the simulation to the size
of an input pgm file. If anything like this might be useful then let me
know.

Cheers,
Matt
ps if you don't get an immediate reply from me be patient, I am doing a
lot of writing at home at the moment where I have no internet
connection. So I may not see email for a few days.
-- 
Matt Aylward: <address@hidden> or <address@hidden>
         Linux Lover - OS for the people by the people.
        ******~~~~~May the Swarm be with you.~~~~~******
       Depts of Geography (GIS) and Botany (Marine), UWA

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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