Go up one levelGo to Previous Go to Next

Catalog Servers Implementation

Remote catalogs (located on a remote host in the network) are accessed via HTTP servers. For each catalog, a simple wrapper application is developed, to be used as an HTTP cgi-bin application. That is, a catalog server is accessed via a standard URL that executes an application with the given arguments and returns the results. These cgi-bin applications are typically perl scripts or simple C programs that access a database.

Local catalogs are implemented as simple ASCII files in tab table format. This is the same format that is used to return query results from remote catalogs. There is also a suite of tools available in the public domain for manipulating tab tables called Starbase . The Astrocat library currently uses some C++ classes ( TabTable, QueryResult, TcsQueryResult ) to implement local catalogs.

The results of catalog queries are always returned in the format of a tab separated table of values. The column headings are separated from the data by a dashed line:

 
Title 
# comments 
Keyword: value 
 
... 
ID           RA         DEC       MORE         PREVIEW 
--           --         ---       ----         ------- 
NGC5457-FD2  210.593704 54.299526 M=http://... P=http://... 
NGC5457-FLD2 210.593704 54.299526 M=http://... P=http://... 
...          ....       ...       ...          ...

The catalog servers hide some of the details of the individual catalogs by following certain conventions. For example, by default the first three columns are ID, RA and DEC (in degrees) and the equinox is J2000. These defaults can be changed in the catalog configuration file or by inserting catalog configuration information in the header of the query results in the same format as in the config file.

The MORE and PREVIEW columns are optional, but are assumed to contain valid URLs if present, pointing to more information (for MORE) or a FITS image or x/y plot data (for PREVIEW). In addition there may be any number of other columns.

The catalog library gets the list of catalog and image servers from a configuration file, which may be a local file or a remote file retrieved via HTTP. The config file lists, for each server, the URL to use to access the catalog. Substitution is performed on the URL to insert the query arguments, such as id , ra , dec , radius range , mag range , cond, etc.

For remote catalogs, the catalog library interface sends the query URL to the HTTP server on the given host and parses the result. Queries in local catalogs are handled internally. Once a query has been made, an application can access the column headings and values via the library interface. More details on this will be presented later in this document.


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org@eso.org.
Copyright © 1998 ESO - European Southern Observatory