wrong physical coords mapping for specific VNF case
See the attached field (written with VisNow). This is a regular 3D field with coords. Thus, no affine or extents are written to VNF. However, user extents (preferred) are written.
It has no physical mapping, thus when reading back to VisNow it should have geometry extents equal to physical extents:
However when read into VisNow it has:
Current behaviouar is in the RegularFieldHeaderParser:
- line 143: regular field is initialized with dims (proper extents)
- line 148: an empty coords array is added what causes ext<ents recompute to improper [-0.5,0.5]
- line 257: as userExtents is read it is set to the field using current (wrong) extents and setting user_extents as preferred physical extents (is this correct?)
Looking at VNF writer, user extent is preferred physical extent (FieldWriter line 153). So it gets complicated when reading as mapping coeffs cannot be properly computed on schema level. They can be recomputed when coords array is actually read and proper extents are set...
Thus, it seems that the actual bug is while writing VNF, not reading... As VNF header should lead to full recreation of proper schema, in this case also extents should be written. If so, RegularFieldHeaderParser can use it in line 257. Alternatively, we should not write/read user extents at all, rather than write/read the very physical mapping coefficients.