Re: POLYGON

From: Jeff Lusted <jl99-at-star.le.ac.uk>
Date: Thu, 18 Oct 2007 11:49:16 +0100


Hi Pat!

Apologies for the delay. Regarding...

POLYGON(coordsys, x1, y1, x2, y2, x3, y3 [, ....])

As you rightly say, this is not a problem for parsing. More of an implementation problem.

As I see it, user defined functions (indeed all the BNF constructs within ADQL) have a certain degree of virtuality about them, since whatever construct is there (after parsing the ADQL) is subsequently translated within a server side implementation to SQL using XSLT.

(In the latest AG implementation we also have a listener interface, so programmers can get their hands on the XML prior to any XSLT step. I'm hoping to develop this idea further so that a programmer can register for a particular construct like region and manipulate specific constructs prior translation).

In short, it means POLYGON(...) could be translated into, for instance

Polygon3(...)
Polygon4(...)
Polygon5(...)

where these are true user defined functions, and so on up to some acceptable limit of sided polygons. It's a crude solution, admittedly. I suspect there might be more sophisticated ways.

Regards
Jeff

-- 
Jeff Lusted               tel: +44 (0)116 252 3581
Astrogrid Project         mob: +44 (0)7973 492290
Dept Physics & Astronomy  email: jl99-at-star.le.ac.uk
University of Leicester   web: http://www.astrogrid.org
Received on 2007-10-18Z10:47:08