This probably needs more testing! Opened PR for critique and conversation while continuing to test.
Based on the test data I've used so far, this results in an overall data size on disk that is roughly 1/3rd of the original. This was achieved by removing as much metadata as possible from the SpatialRecord's.
Do not serialize Representation objects inside SpatialRecord's. These should already exist on WorkingData.Representation.
Do not serialize UnitOfMeasure objects inside SpatialRecord's. These should already exist on WorkingData.Representation (and if they don't, we can copy them there). Note: If the UnitOfMeasure for a particular WorkingData changes partway through the SpatialRecord's, we convert to keep the unit consistent. This requires we maintain the same class of unit. It will break if WorkingData.UnitOfMeasure is kilograms and the associated NumericRepresentationValue.UnitOfMeasure is meters.
Change the file containing SpatialRecords from OperationData{0}.adm to SpatialRecords{0}.adm. This lets us look for the new filename and, if it exists, deserialize to the new object (else do what we did before for backwards compatibility).
This probably needs more testing! Opened PR for critique and conversation while continuing to test.
Based on the test data I've used so far, this results in an overall data size on disk that is roughly 1/3rd of the original. This was achieved by removing as much metadata as possible from the SpatialRecord's.