STC box to polygon

Patrick Dowler patrick.dowler at nrc-cnrc.gc.ca
Wed Jan 4 11:03:12 PST 2012


With links this time :-)

On 2012-01-04 10:56:07 you wrote:
> Has anyone ever written down the complete conversion from an STC box to a
> polygon? e.g. the computation of the 4 vertices from the centre and sizes.
> 
> We may have been too lazy when we did it back when trying to get complete
> STC support into our TAP code.
> 
> The relevant text from STC:

http://www.ivoa.net/Documents/REC/DM/STC-20071030.html#_Toc181531825

My lazy/approximate code to make a polygon from a box is in here:

http://code.google.com/p/opencadc/source/browse/trunk/projects/cadcTAP/src/ca/nrc/cadc/stc/Polygon.java

The code does not look at all like the text description. It just tries to make 
a polygon that is ~square.

-- 

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ivoa.net/pipermail/dm/attachments/20120104/c65a30be/attachment.html>


More information about the dm mailing list