Changes between Version 3 and Version 4 of FGDBSpecification


Ignore:
Timestamp:
Oct 8, 2013, 4:18:31 PM (11 years ago)
Author:
Even Rouault
Comment:

Fix null fields flag

Legend:

Unmodified
Added
Removed
Modified
  • FGDBSpecification

    v3 v4  
    6565||'''Format'''||'''Content'''||
    6666|| int32 || maximum length of string ||
    67 || ubyte || unknown role ||
     67|| ubyte || flag ||
    6868|| ubyte || unknown role ||
    6969
     
    114114||'''Format'''||'''Content'''||
    115115|| ubyte || width : 38 ||
    116 || ubyte || unknown role ||
     116|| ubyte || flag ||
    117117
    118118
     
    121121||'''Format'''||'''Content'''||
    122122|| ubyte || width in bytes (e.g. 2 for int16, 4 for int32, 4 for float32, 8 for float64, 8 for datetime) ||
    123 || ubyte || unknown role ||
    124 || ubyte || unknown role ||
     123|| ubyte || flag ||
     124|| ubyte || unknown role ||
     125
     126If the lsb of the flag field (when present) is set to 1, then the field can be null.
     127
     128FIXME: find which byte is the flag field for geometry fields. They are supposed to be nullable for now.
     129
    125130
    126131== Rows section ==
     
    138143||'''Format'''||'''Content'''||
    139144|| int32 || length in bytes of the row blob ( this field excluded) ||
    140 || ceil(number_fields / 8) * ubyte || flags describing if a field is null. See below explanation ||
     145|| ceil(number_nullable_fields / 8) * ubyte || flags describing if a field is null. See below explanation ||
    141146
    142147=== Null fields flags ===
    143148
    144 Each bit of the flags field encode for the presence or absence of the field content for the row.
     149Each bit of the flags field encode for the presence or absence of the field content, for a nullable field, for the row.
    145150The flag is set to 1 if the field is missing/null, or 0 if the field is present/non-null (0 is used as well for spare bytes).
    146151The flag for the first field, in the order of the fields of the field description section (typically the geometry),
    147152is the least significant bit of the first byte of the flags field.
    148153
    149 Note: there's no explicit data for OBJECTID and no flag bit for it. It must be ignored when considering
    150 the list of fields (for number_fields value in particular).
     154There are no bits reserved for non-nullable fields.
     155
     156If all fields are non-nullable, the flag field is absent.
     157
     158Note: there's no explicit data for OBJECTID and no reserved flag bit for it.
    151159
    152160For each non-null field, the field content is appended in the order of the fields of the field