VOQL-TEG Meeting #3
kea at roe.ac.uk
Fri Jan 26 03:53:23 PST 2007
> +VOQL-TEG-2/AI#1 on ALL: to send to the list real code examples of how
> we deal with REGION constructs _and_ special constructs (like the CROSS
On the subject of REGION, at the moment in the AstroGrid DSA we
disallow REGION queries in ADQL. However, the way we deal with
conesearches (essentially a CIRCLE region) is indicative of the
approach we would take to support (at least some) REGION constructs.
At present, to construct a conesearch ADQL query from input
conesearch parameters (RA, Dec, radius), we use an ADQL/xml
template system. These templates are ADQL/xml queries with
placeholder variables into which the relevant table names
and coordinate values can be inserted (the actual calculations
of these values are done in java).
We have two sets of templates, one for the great-circle formula
(for larger search radii), and one for the haversine formula
(for smaller radii). There are actually four distinct templates
in each set (8 in total), one for each possible combination of
RDBMS trig function units (radians or degrees) and dataset coordinate
units (radians or degrees).
At the moment, the templates are in ADQL/xml, but I am about
to convert them to ADQL/sql as the xml templates are very hard
to work with and maintaining 8 of them is a pain.
For general REGION queries, as long as the queries were expressible
by some standard template, we would probably take a similar approach
(i.e. make some templated queries which can be populated with the
right column names and values). Dealing with things like arbitrary
complex polygon regions would not be possible by this approach, and
we haven't yet settled on a way to deal with those.
All the best,
Kona Andrews kea at roe.ac.uk
AstroGrid Project http://www.astrogrid.org
IfA, Royal Observatory, Blackford Hill, Edinburgh EH9 3HJ
More information about the voql-teg