Next Previous Up Contents
Next: Input Schemes
Up: Table I/O
Previous: Wide FITS

### 5.2 Input Locations

The location of a serialized input table, usually given using the `in` parameter or similar, may be given in one of the forms listed below.

Filename
  Very often, you will simply specify a filename as location, and the tool will just read from it in the usual way.
URL
  Tables can be read from URLs directly. Some non-standard URL protocols are supported as well as the usual ones. The list is:
  `http:`
    Read from HTTP resources.
  `https:`
    Read from HTTPS resources.
  `ftp:`
    Read from anonymous FTP resources.
  `file:`
    Read from local files, using the syntax `file:///path/to/file`. This is similar to specifying the filename directly, but there is a difference: using this form forces reads to be sequential rather than random access, which may allow you to experience a different set of performance characteristics and bugs.
  `jar:`
    Specialised protocol for looking inside Java Archive files - see JarURLConnection documentation.
  `myspace:`
    (Obsolete?) Accesses files in the AstroGrid "MySpace" virtual file store. These URLs look something like "`myspace:/survey/iras_psc.xml`", and can access files in the myspace are that the user is currently logged into. These URLs can be used for both input and output of tables. To use them you must have an AstroGrid account and the AstroGrid WorkBench or similar must be running; if you're not currently logged in a dialogue will pop up to ask you for name and password.
  `ivo:`
    (Obsolete?) Understands ivo-type URLs which signify files in the AstroGrid "MySpace" virtual file store. These URLs look something like "`ivo://uk.ac.le.star/filemanager#node-2583`". These URLs can be used for both input and output of tables. To use them you must have an AstroGrid account and the AstroGrid WorkBench or similar must be running; if you're not currently logged in a dialogue will pop up to ask you for name and password.
  `jdbc:`
    JDBC URLs may be used, but they don't work in the same way as the others listed here, since they do not reference an input byte stream. See instead Section 5.3.3.
Minus sign ("`-`")
  The special location "-" (minus sign) indicates standard input. This allows you to use STILTS commands in a normal Unix pipeline.
System command ("`<`syscmd" or "syscmd`|`")
  If the location starts with a "`<`" character or ends with a "`|`" character, the rest of the string is taken as a command line to be executed by the system shell. For instance a location like "`<cat header.txt data.txt`" (or equivalently "`cat header.txt data.txt|`") could be used to prepend a header line to an ASCII data file before it is passed to the STILTS ASCII-format input handler. Note this syntax will probably only work on Unix-like systems.

In any of these cases, for input locations compression is taken care of automatically. That means that you can give the filename or URL of a file which is compressed using `gzip`, `bzip2` or Unix `compress` and the program will uncompress it on the fly.

For file formats that can contain multiple tables, the one required, if it's not the first in the file, can generally be specified by a position indicator string appended to the basic location following a "`#`". For instance "cat.fits#3" references HDU 3 in a multi-extension FITS file. The details of this syntax depend on the file format, and are given in the relevant subsection of Section 5.1.1.

Note that tables can also be supplied from non-serialized sources, as described in Input Schemes.

Next Previous Up Contents
Next: Input Schemes
Up: Table I/O
Previous: Wide FITS

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk