STC box to polygon

Arnold Rots arots at head.cfa.harvard.edu
Wed Jan 4 12:18:42 PST 2012


Yes, this most certainly is not right.

Jonathan undoubtedly has code that does it correctly, but for now I
would suggest the following:

Define you box as a rectangle in the tangent plane where the tangent
point is the center of the box
There your corner points will be (+/-hw,+/-hh).
Then transform these corners to sky coordinates with the usual tangent
plane-to-spherical coordinates transformation, using the box center as
tangent point, and you have your vertices.

  - Arnold


Patrick Dowler wrote:
[ Charset ISO-8859-1 unsupported, converting... ]
> 
> 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
--------------------------------------------------------------------------
Arnold H. Rots                                Chandra X-ray Science Center
Smithsonian Astrophysical Observatory                tel:  +1 617 496 7701
60 Garden Street, MS 67                              fax:  +1 617 495 7356
Cambridge, MA 02138                             arots at head.cfa.harvard.edu
USA                                     http://hea-www.harvard.edu/~arots/
--------------------------------------------------------------------------


More information about the dm mailing list