[GRASS5] new vector2

Radim Blazek Radim.Blazek at dhv.cz
Wed Jan 10 02:17:25 EST 2001

Justin Hickey wrote:

> Ahh. OK I see what you are thinking now. I agree that this would be
> dangerous. However, this is not the type of automatic conversion I was
> thinking about. Here is an example:
>  - user downloads a BE file (v1) from the internet into own mapset (ie
>    has write access)
>  - user is using a LE machine
>  - user tries d.vect v1
>  - read function in vector library detects wrong BO
>  - message appears saying something like "file will be converted ...
>    please wait"
>  - read function reads in file, swaps bytes, and then overwrites file v1
>    (BE file no longer exists)
>  - read function passes swapped data to d.vect
> Thus, the automatic conversion will only overwrite a file. It will never
> copy it. The only problem is a possible lack of disk space for a
> temporary file to perform the conversion. However, I'm not sure if we
> would need to have a copy on disk. Perhaps grass reads the whole file
> into memory, I don't know. But if we do need to create a temporary copy,
> then we provide a check for disk space and if there is not enough, we
> skip the write out phase and only swap the bytes in memory.
> In other words, the automatic conversion will only occur if the file is
> writable. Thus, the read function will have to test if the file is
> writable before it tries the automatic conversion.

That is possible.  

(XDR uses big endian and fixed word length n*4 bytes. That is not
useful for us.)


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