Class BinaryPointDataProvider

java.lang.Object
gaiasky.data.group.BinaryPointDataProvider
All Implemented Interfaces:
BinaryIO, IParticleGroupDataProvider

public class BinaryPointDataProvider extends Object implements IParticleGroupDataProvider, BinaryIO
Loads and writes binary data into particle groups (ParticleRecord.ParticleRecordType.PARTICLE_EXT). The format is:
  • int (4 bytes) -- number of records
  • byte (1 byte [0|1]) -- particle record type: true - PARTICLE_EXT, false - PARTICLE
  • for each record:
    • long (8 bytes) -- id
    • short (2 bytes) -- nameLength
    • char (2 bytes) * nameLength -- name characters
    • double (8 bytes) -- alpha [deg]
    • double (8 bytes) -- delta [deg]
    • double (8 bytes) -- distance [pc]
    • if type == PARTICLE_EXT
      • float (4 bytes) -- mu alpha
      • float (4 bytes) -- mu delta
      • float (4 bytes) -- radial velocity
      • float (4 bytes) -- apparent magnitude
      • float (4 bytes) -- packed color
      • float (4 bytes) -- size