STC box to polygon
David Berry
d.berry at jach.hawaii.edu
Wed Jan 4 12:19:30 PST 2012
For what it's worth, the code that the AST library (the StcsChan
class) uses for this is in function "BoxCorners" in the file
stcschan.c:
http://starlink.jach.hawaii.edu/git/?p=starlink.git;a=blob;f=libraries/ast/stcschan.c;h=b9ee19394b30af7d560a26b39e14346ca3ebfb5f;hb=HEAD
David
On 4 January 2012 19:03, Patrick Dowler <patrick.dowler at nrc-cnrc.gc.ca> wrote:
>
> 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
More information about the dm
mailing list