[GRASS5] new vector2

Justin Hickey jhickey at hpcc.nectec.or.th
Mon Jan 8 01:58:40 EST 2001


Hi Michel and Radim

Michel Wurtz wrote:
> I agree with Radim when he says that autoconversion (the "check and
> convert" function suggested by Justin) may be a bad idea in case of
> file shared (NFS, etc...) by different platform (Ex :Sun + Pentium),
> but I think that this may only be a problem if both platforms use the
> file at the same time, which is actually possible, but extremelly
> dangerous, even with the actual file format : there is no file level
> locking mecanism.

Since Grass does not have file level locking, it would be dangerous to
access the same file regardless of the byte order. Simultaneous write
access is much more dangerous than byte order, and file level locking
would eliminate the byte order problem, so I think byte order in this
case is not an issue. Thus, I don't understand why byte order would
cause problems with an NFS network. Simply convert on read if necessary
and write to a native byte order. If performance is an issue, then a
local file should be used since there would be a performance hit from
the network anyway.

Actually, perhaps we could pop up a message (or print for text mode)
saying that the file is being converted and once we read it in
correctly, we write it out in native byte order. Of course this would
depend if we could detect whether the file was a network file since this
would be intended for a one time conversion anyway, which wouldn't be
the case for a network file. This idea is similar to upgrading versions
of files. If the software detects an old file format, it should upgrade
the file to the new format. Just a thought.

> I am more sensible to the second argument : read-only files cannot be
> converted "automagically"... 

This one puzzles me. If the file is read-only, then we can't write the
file, so writing in a different byte order is not an issue. We still
have to convert it to read it properly, so why not do it automatically?

In general byte order decisions need to be done transparent to the user.
Most users probably don't understand the byte order problem and probably
don't want to. Thus I see no reason to have a new module to perform a
conversion. I'm sorry, but I just don't see a reason to write a file in
a non-native byte order when Grass will be able to read the non-native
byte order anyway.

Please don't take this the wrong way. I am not saying that these
proposals are a bad idea. I just don't see why we need all the features
Radim proposed and I am only trying to save whoever will end up coding
this some time and effort. However, if the list wants to include these
features, or if I am missing an issue (please tell me if I am), then
that's OK with me.

-- 
Sincerely,

Jazzman (a.k.a. Justin Hickey)  e-mail: jhickey at hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do.  ---Anonymous

Jazz and Trek Rule!!!
==================================================================

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list