[GRASS5] Maximum number of categories

Moritz Lennert mlennert at club.worldonline.be
Mon Apr 26 06:41:40 EDT 2004


Radim Blazek said:
> On Saturday 24 April 2004 08:43, Moritz Lennert wrote:
>> Radim Blazek said:
>> > Bad news!
>> >
>> > I have discovered, that number of categories for each element is
>> stored
>> > as 1byte. It was enough when only one cat of each field was allowed.
>> > Now each field may have many cats and 256 is not enough.
>> >
>> > I think that there are already too many 5.7 vector files in use,
>> > so I must increase 'coor' format version (5.0->5.1) [1], and to handle
>> > more versions
>> > for reading. Unfortunately it will not be possible to read new files
>> in
>> > older versions
>> > of GRASS 5.7. I'll add first the code for reading and after some 1-2
>> > months also for writing,
>> > to minimize problems.
>> >
>> > Do you have other suggestions?
>>
>> If the 'coor' format solution is a "second-best" solution in form of a
>> hack (please coorect me if it isn't), I would think that since 5.7 is
>> officially declared as development version, people have to live with the
>> risk of things being broken. So, I think it would be better to revise
>> the
>> format completely and cleanly to include all necessary changes, instead
>> of
>> finding other solutions that might be not as clean and then carry this
>> around for the next years.
>>
>> Moritz
>
> The 'coor' format was designed for 5.7 without any compromises.
> AFAIK, the suggested change (number of cats 1 byte -> 2(4) bytes)
> is the only required.
> I know that 5.7 is devel version and it is devel version exactly
> for these reasons. However, we (including me, I think) said
> few times that 5.7 can be used already for work.
> To have support (reading) for both 5.0 and 5.1 'coor' formats
> means only few rows of code.
>
> I think that I'll do both steps of the change (i.e. first reading,
> then writing) without long delay but in 2 cvs commits.
> The problem may appear only for groups using more installation
> of GRASS and sharing the data. In that case, they can either:
> 1) make first update for reading on all machines and then
>    also for writing
> or
> 2) stop the work for a while and update all installations directly
>    to reading+writing.
> Is it OK?
>

Sounds good to me !

Moritz




More information about the grass-dev mailing list