ADQL geometries in AP

Markus Demleitner msdemlei at ari.uni-heidelberg.de
Mon Jun 29 06:23:10 PDT 2009


Dear DAL folks,

Though I like the note in 2.3.4 on coordinate systems much better
than before (when it would have forced you to create an artificial
column for each coordinate system), I still think we should offer
users a sensible "default".  So, here's a suggestion on what I'd like
this note to look like.

In 1.0-20090607, it is

"""
Note: Although it is allowed by the ADQL syntax, clients should be
careful when mixing constants and column references for coordinate
system and coordinate values. For example, POINT('ICRS', t.ra, t.dec)
does not cause t.ra and t.dec to be transformed to ICRS; it simply
tells the service to treat the values as being expressed in that
coordinate system.
"""

My suggestion:

"""
Note: Although it is allowed by the ADQL syntax, clients should be
careful when mixing constants and column references for coordinate
system and coordinate values. For example, POINT('ICRS', t.ra, t.dec)
does not cause t.ra and t.dec to be transformed to ICRS; it simply
tells the service to treat the values as being expressed in that
coordinate system.

In general, when using column references in ADQL geometry
specifications, pass an empty coordinate system, e.g., POINT('',
t.ra, t.dec).  This tells the service to insert the coordinate system
from its own metadata.  The behavior of an empty coordinate system on
geometries with literal coordinate values remains unspecified by this
document.
"""

Rationale: Without this amendment, users would have to look up the
system for each pair of coordinates and each service to properly
construct geometries.  The service, on the other hand, has this
information (or should have it).

Alternatives I could see: 

(1) It would be nicer if we could use NULL instead of an
empty string, but that's forbidden by the ADQL grammar (by the way,
it also forbids column references there, only stringValueExpressions
are allowed).  

(2) One could use a literal like 'AUTO' instead of an empty string.
I don't think it's much clearer but wouldn't mind.

(3) The best solution would be to kick out the coordinate systems
altogether and then communicate coordinate systems in metadata rather
than data.  But I agree it's much too late for that now.  Maybe in
ADQL2...

Cheers,

       Markus



More information about the dal mailing list