[GRASS5] new vector2
Radim Blazek
Radim.Blazek at dhv.cz
Fri Jan 5 05:52:14 EST 2001
Michel Wurtz wrote:
>
> "Eric G . Miller" wrote:
> > As was mentioned, maybe it is possible to always write data in native
> > format, but perform a byte swap conversion on read if necessary. It
> > would require a bitfield or such to specify endianness. I don't know if
> > this would cause more headache than it's worth, since partial
> > updates/writes would also need a conversion check. Maybe it's just
> > better to choose one and live with the conversion slow down.
> >
> > > 2) It is possible to compile version 4 vector library with #define
> > > NO_PORTABLE and all vector files will be written in native format
> > > instead of portable. Speed on little endian machine is increased but
> > > such non portable vector files may be not be used on big endian
> > > computer then. Somebody ever used such option? Should be this
> > > feature keept in new vector format/library? My suggestion is do not
> > > support that option and be sure that all vector files in the world are
> > > always portable.
> >
> > I agree with dropping it.
>
> Another solution is always write data in native format with a flag to
> specify endianness and have a program for converting from one format
> to another. This means also that we must detect if a file doesn't fit
> the machine endianness, in order to to call the conversion program
> inside the open function. The slow down is then limited to the first
> open...
Thank you for your comments.
My conclusion is:
- vector file may ben written in big or little endian (no pdp or other)
and byte order is specified in header
- by default new file will be written in machine native byte order
(later add optional byte order for new files by enviroment
variable GRASS_VECTOR_ENDIAN)
- vector modules (library) will work with both little and big endian vector files
- write new module for conversion little <=> big
- no auto conversion into native format (read only files, files shared by
more platforms)
- vector written in one byte order (big for example) will be updated in that byte order
(big) even on machine with some other byte order (little)
OK?
Radim
----------------------------------------
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