Man page - stilts-sqlskymatch(1)
Packages contas this manual
- stilts-mocshape(1)
- stilts-tskymap(1)
- stilts-calc(1)
- stilts(1)
- stilts-tskymatch2(1)
- stilts-cone(1)
- stilts-funcs(1)
- stilts-tmatchn(1)
- stilts-plot3d(1)
- stilts-taplint(1)
- stilts-tgroup(1)
- stilts-cdsskymatch(1)
- stilts-coneskymatch(1)
- stilts-regquery(1)
- stilts-tapresume(1)
- stilts-tmatch1(1)
- stilts-tcat(1)
- stilts-plot2corner(1)
- stilts-votcopy(1)
- stilts-tpipe(1)
- stilts-tcopy(1)
- stilts-arrayjoin(1)
- stilts-tgridmap(1)
- stilts-pixfoot(1)
- stilts-tmulti(1)
- stilts-plot2plane(1)
- stilts-plot2d(1)
- stilts-sqlupdate(1)
- stilts-tjoin(1)
- stilts-sqlclient(1)
- stilts-tmatch2(1)
- stilts-plot2time(1)
- stilts-datalinklint(1)
- stilts-plot2cube(1)
- stilts-tapquery(1)
- stilts-xsdvalidate(1)
- stilts-tapskymatch(1)
- stilts-votlint(1)
- stilts-plot2sky(1)
- stilts-tloop(1)
- stilts-plothist(1)
- stilts-tcatn(1)
- stilts-plot2sphere(1)
- stilts-pixsample(1)
- stilts-tcube(1)
- stilts-sqlskymatch(1)
- stilts-tmultin(1)
apt-get install stilts
Manual
| STILTS-SQLSKYMATCH(1) | Stilts commands | STILTS-SQLSKYMATCH(1) |
NAME
stilts-sqlskymatch - Crossmatches table on sky position against SQL table
SYNOPSIS
stilts sqlskymatch [ifmt=<in-format>] [istream=true|false] [in=<table>] [icmd=<cmds>] [ocmd=<cmds>] [omode=out|meta|stats|count|checksum|cgi|discard|topcat|samp|tosql|gui] [out=<out-table>] [ofmt=<out-format>] [ra=<expr>] [dec=<expr>] [sr=<expr/deg>] [find=best|all|each] [usefoot=true|false] [footnside=<int-value>] [copycols=<colid-list>] [scorecol=<col-name>] [erract=abort|ignore|retry|retry<n>] [ostream=true|false] [fixcols=none|dups|all] [suffix0=<label>] [suffix1=<label>] [db=<jdbc-url>] [user=<value>] [password=<value>] [dbtable=<table-name>] [dbra=<sql-col>] [dbdec=<sql-col>] [dbunit=deg|rad] [tiling=hpx<K>|healpixnest<K>|healpixring<K>|htm<K>] [dbtile=<sql-col>] [selectcols=<sql-cols>] [where=<sql-condition>] [preparesql=true|false]
DESCRIPTION
sqlskymatch resembles coneskymatch, but instead of sending an HTTP query to a remote cone search service for each match (i.e. each row of the input table), it executes an SQL query directly. The query is a SELECT statement with a WHERE clause which makes restrictions on Right Ascension and Declination columns; the names of these columns must be given as parameters. The effect is that of a spatial join between a client-side table and a table stored in the database.
This command can only be used if you have access to an SQL database via JDBC. The details of how to configure a JDBC connection to a database are discussed in SUN/256 - obviously you will need a database to connect to and appropriate read permissions on it as well as the relevant drivers.
Note: this task was known as sqlcone in its experimental form in STILTS v1.3.
OPTIONS
- A filename.
- A URL.
- The special value "-", meaning standard input. In this case the input format must be given explicitly using the ifmt parameter. Note that not all formats can be streamed in this way.
- A scheme specification of the form :<scheme-name>:<scheme-args>.
- A system command line with either a "<" character at the start, or a "|" character at the end ("<syscmd" or "syscmd|"). This executes the given pipeline and reads from its standard output. This will probably only work on unix-like systems.
In any case, compressed data in one of the supported compression formats (gzip, Unix compress or bzip2) will be decompressed transparently.
Commands may alternatively be supplied in an external file, by using the indirection character '@'. Thus a value of "@filename" causes the file filename to be read for a list of filter commands to execute. The commands in the file may be separated by newline characters and/or semicolons, and lines which are blank or which start with a '#' character are ignored. A backslash character '\fR' at the end of a line joins it with the following line.
Commands may alternatively be supplied in an external file, by using the indirection character '@'. Thus a value of "@filename" causes the file filename to be read for a list of filter commands to execute. The commands in the file may be separated by newline characters and/or semicolons, and lines which are blank or which start with a '#' character are ignored. A backslash character '\fR' at the end of a line joins it with the following line.
Possible values are
- out
- meta
- stats
- count
- checksum
- cgi
- discard
- topcat
- samp
- tosql
- gui
Use the help=omode flag or see SUN/256 for more information.
This parameter must only be given if omode has its default value of "out".
This parameter must only be given if omode has its default value of "out".
- best: Only the matching query table row closest to the input table row will be output. Input table rows with no matches will be omitted. (Note this corresponds to the best1 option in the pair matching commands, and best1 is a permitted alias).
- all: All query table rows which match the input table row will be output. Input table rows with no matches will be omitted.
- each: There will be one output table row for each input table row. If matches are found, the closest one from the query table will be output, and in the case of no matches, the query table columns will be blank.
Currently, the only footprints available are those provided by the CDS MOC (Multi-Order Coverage map) service, which covers VizieR and a few other cone search services.
The value must be a power of 2, and at the time of writing, the MOC service will not supply footprints at resolutions greater than nside=512, so it should be <=512.
Only used if usefoot=true.
- abort: Failure of any query terminates the task.
- ignore: Failure of a query is treated the same as a query which returns no rows.
- retry: Failed queries are retried until they succeed; an increasing delay is introduced for each failure. Use with care - if the failure is for some good, or at least reproducible reason this could prevent the task from ever completing.
- retry<n>: Failed queries are retried at most a fixed number <n> of times; an increasing delay is introduced for each failure. If failures persist the task terminates.
- none: columns are not renamed
- dups: columns which would otherwise have duplicate names in the output will be renamed to indicate which table they came from
- all: all columns will be renamed to indicate which table they came from
If columns are renamed, the new ones are determined by suffix* parameters.
- hpxK: alias for healpixnestK
- healpixnestK: HEALPix using the Nest scheme at order K
- healpixringK: HEALPix using the Ring scheme at order K
- htmK: Hierarchical Triangular Mesh at level K
So for instance hpx5 or healpixnest5 would both indicate the HEALPix NEST tiling scheme at order 5.
At level K, there are 12*4^K HEALPix pixels, or 8*4^K HTM pixels on the sky. More information about these tiling schemes can be found at the HEALPix and HTM web sites.
SEE ALSO
stilts(1)
If the package stilts-doc is installed, the full documentation
SUN/256 is available in HTML format:
file:///usr/share/doc/stilts/sun256/index.html
VERSION
STILTS version 3.5.2-debian
This is the Debian version of Stilts, which lack the support of
some file formats and network protocols. For differences see
file:///usr/share/doc/stilts/README.Debian
AUTHOR
Mark Taylor (Bristol University)
| Mar 2017 |