<div dir="ltr"><div><div><div><div><div><div><div><div>I was going to ask: doesn't it make more sense to define two functions:<br></div>1. return the intersection of two regions<br></div>2. return the area of a region<br></div>The combination of the two provides Alberto's area of the intersection<br></div>and separately they provide more functionality.<br></div>One might of course want to add:<br></div>3. return the union of two regions<br><br></div>Cheers,<br><br></div> - Arnold<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-------------------------------------------------------------------------------------------------------------<br>Arnold H. Rots Chandra X-ray Science Center<br>Smithsonian Astrophysical Observatory tel: +1 617 496 7701<br>60 Garden Street, MS 67 fax: +1 617 495 7356<br>Cambridge, MA 02138 <a href="mailto:arots@cfa.harvard.edu" target="_blank">arots@cfa.harvard.edu</a><br>USA <a href="http://hea-www.harvard.edu/~arots/" target="_blank">http://hea-www.harvard.edu/~arots/</a><br>--------------------------------------------------------------------------------------------------------------<br><br></div></div></div>
<br><div class="gmail_quote">On Wed, Jun 7, 2017 at 1:15 PM, Walter Landry <span dir="ltr"><<a href="mailto:wlandry@caltech.edu" target="_blank">wlandry@caltech.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">alberto micol <<a href="mailto:amicol.ivoa@googlemail.com">amicol.ivoa@googlemail.com</a>> wrote:<br>
> Dear All,<br>
</span>> cc: Bruno, for the Standing Committee on Science Priorities <<a href="http://wiki.ivoa.net/twiki/bin/view/IVOA/IvoaSciencePriorities" rel="noreferrer" target="_blank">http://wiki.ivoa.net/twiki/<wbr>bin/view/IVOA/<wbr>IvoaSciencePriorities</a>><br>
<span class="">><br>
> The following science use case cannot be accomplished without a new ADQL function:<br>
><br>
> I want to find images of the Galactic Centre in two bands (J and H) provided that the images<br>
> in the 2 bands overlap, in order to get the colours (J-H) of the sources imaged by both.<br>
> The overlapping region must be big enough so that I can detect sources<br>
> in both images: an overlap of, say, 0.001 square degrees would be irrelevant for my science case.<br>
><br>
> I’ll show in the PS how this can be achieved using ObsCore with a user-defined function.<br>
><br>
> The issue is that, to avoid images just “touching” each other, we had to create a user-defined function<br>
> that computes the area of the intersection of the two regions.<br>
><br>
> Issues: (1) only those users that read the documentation or the TAPRegExt will know<br>
> that such functionality exists, and (2) this function cannot be used when querying other data centres.<br>
><br>
> Can I suggest to introduced a new function in ADQL 2.1 which can be used to compute<br>
> the area of the intersections between two regions?<br>
<br>
</span>It sounds like what you actually want is the distance to the edge, not<br>
the overlap area. I needed something like that. We wanted the "most<br>
centered" image, so we sort results by the distance to the edge. It<br>
required a bit of hacking on our end.<br>
<br>
With that said, I am not a fan of new functions that can not be<br>
implemented via simple rewriting on GIS backends.<br>
<br>
Cheers,<br>
Walter Landry<br>
</blockquote></div><br></div>