[GRASS5] new vector2

Radim Blazek Radim.Blazek at dhv.cz
Fri Jan 5 08:02:53 EST 2001


Justin Hickey wrote:
> Hi Radim
> 
> Radim Blazek wrote:
> > 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)
> 
> Hmmm. I don't understand why you need to maintain the byte-order of a
> file, or provide the users with a new module. It seems to me that it
> would be easier (less work) to write a conversion function in the vector
> library that checks the byte-order and converts it to the machine
> byte-order if necessary. Write will always write in native format. Then
> the conversion is only performed when necessary, the user never knows
> the difference, and grass will always be able to read either format
> making the files platform independent. It seems to me that in this case
> the only task here is to write a single "check and convert" function for
> reading vector files. Am I missing something?

Yes.  That is what I mean by: vector modules will work with both orders.

Conversion module may be used to increase speed if files are not in native
order.  

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