Boxes and Polygons in ADQL/STC. Questions and recommendation.

David Berry d.berry at jach.hawaii.edu
Tue Oct 27 07:31:11 PDT 2009


2009/10/26 Patrick Dowler <patrick.dowler at nrc-cnrc.gc.ca>:
> On Monday 26 October 2009 06:58:51 you wrote:
>> Patrick Dowler wrote:
>> > Note that postgresql+pg_sphere has the same limitations (except sbox, so
>> > have to use spoly directly); I also found that both STC-S and pg_sphere
>> > are limited to simple polygons and do not support unions of disjoint
>> > regions or holes inside polygons.
>>
>> Hi Pat,
>>
>> Could you expand on this?  That's not surprising for PgSphere which
>> doesn't purport to do anything more than circles and polygons (and its
>> boxes in a limited way), but I had understood that REGION's could be
>> quite complex.  Is that not the case?
>
>> I think I still need the first type, but from your comments it sounds
>> like any REGION currently specifiable can be represented as a single
>> polygon.  Is that right?
>
> STC in general does allow for such complex regions, but the STC-S
> serialisation does not support the "operators" (add,subtract, etc). so you
> cannot describe something like several disjoint shapes as a single region.
>
> See the last paragraph of Section 3 in
>
> http://www.ivoa.net/Documents/Notes/STC-S/STC-S-20071205.html

There's a more recent version of the STC-S document
(http://hea-www.harvard.edu/~arots/nvometa/STC/STC-S-20090724.pdf)
that does support boolean operators
(Union,Intersection,Not,Difference). So disjoint regions, and regions
with holes are in fact possible.

The AST library supports these complex STC-S operations. See my recent
ADASS poster.
http://starlink.jach.hawaii.edu/starlink/AST?action=AttachFile&do=view&target=adass2009.pdf.

David

> So while you could have such FOV in your system (we do, with a 1-n join
> between the main table and a "PositionSamples" table with the spoly column)
> you cannot write them out as a single STC-S value in the result VOTable. That
> was what I meant.
>
> --
>
> Patrick Dowler
> Tel/Tél: (250) 363-0044
> Canadian Astronomy Data Centre
> National Research Council Canada
> 5071 West Saanich Road
> Victoria, BC V9E 2M7
>
> Centre canadien de donnees astronomiques
> Conseil national de recherches Canada
> 5071, chemin West Saanich
> Victoria (C.-B.) V9E 2M7
>



More information about the dal mailing list