Next Previous Up Contents
Next: Tab-Separated Table
Up: Supported Input Formats
Previous: Comma-Separated Values

#### 4.1.1.8 GBIN

GBIN format is a special-interest file format used within DPAC, the Data Processing and Analysis Consortium working on data from the Gaia astrometry satellite. It is based on java serialization, and in all of its various forms has the peculiarity that you only stand any chance of decoding it if you have the Gaia data model classes on your java classpath at runtime. Since the set of relevant classes is very large, and also depends on what version of the data model your GBIN file corresponds to, those classes will not be packaged as part of the standard TOPCAT distribution, so some additional setup is required to read GBIN files.

As well as the data model classes, you must provide on the runtime classpath the GaiaTools classes required for GBIN reading. The table input handler accesses these by reflection, partly because GaiaTools is targeted at java 7 while STIL is at time of writing java 1.5 compatible, and partly to avoid an additional large library dependency for a rather niche requirement. It is likely that since you have to supply the required data model classes you will also have the required GaiaTools classes to hand as well, so this shouldn't constitute much of an additional burden for usage.

In practice, if you have a jar file or files for pretty much any java library or application which is capable of reading a given GBIN file, just adding it or them to TOPCAT's classpath at run time ought to do the trick. Examples of such jar files are the `MDBExplorerStandalone.jar` file available from http://gaia.esac.esa.int/mdbexp/, or the `gbcat.jar` file you can build from the CU9/software/gbcat/ directory in the DPAC subversion repository.

Suppose you have the `MDBExplorerStandalone.jar` file mentioned above, you can do it by starting TOPCAT like this:

       topcat -classpath MDBExplorerStandalone.jar

or like this:

       java -classpath topcat-full.jar:MDBExplorerStandalone.jar uk.ac.starlink.topcat.Driver

Note you will need to be using whatever version of java is required by GaiaTools, probably java 7.

The GBIN format is recognised automatically, so you do not need to explicitly set the file type when loading GBIN files.

The GBIN format doesn't really store tables, it stores arrays of java objects, so the input handler has to make some decisions about how to flatten these into table rows. It basically looks for public instance methods of the form `getXxx()` and uses the `Xxx` as column names. If the corresponding values are themselves objects with suitable getter methods, those objects are added as new columns instead. This more or less follows the practice of the `gaia.cu1.tools.util.GbinInterogator`/`gbcat` tool. Method names are sorted alphabetically. Arrays of complex objects are not handled well, and various other things may trip it up. See the source code (e.g. `uk.ac.starlink.gbin.GbinTableProfile`) for more details.

Note that support for GBIN files is somewhat experimental. Please contact the author (who is not a GBIN expert) if it doesn't seem to be working properly or you think it should do things differently.

Next Previous Up Contents
Next: Tab-Separated Table
Up: Supported Input Formats
Previous: Comma-Separated Values

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@bristol.ac.uk