0
Answered

Circle footprints via Javascript API

srcejon 3 months ago updated by Deborah Baines 3 months ago 1

Currently, the Javascript API docs give an example of creating a polygon footprint. E.g:

{event: 'overlayFootprints', content:{'overlaySet': {'type': 'FootprintListOverlay', 'overlayName': 'test footprints', 'cooframe': 'J2000', 'color': 'red', 'lineWidth': 5, 'skyObjectList': [{'name': 'test footprint1', 'id': 1, 'stcs': 'Polygon J2000 187.33912535049 -62.6616054228651 187.343512531474 -62.7116786437002 187.235239903703 -62.7136263115712 187.231036216914 -62.6635488923945', 'ra_deg': '187.287228500645', 'dec_deg': '-62.6876148176328'}]}}}

Is it possible to create a circle (other than by defining it as a polygon)? 


Are there any more docs for the stcs parameter?

Is the ESASky source code available somewhere?

Thanks.

GOOD, I'M SATISFIED

Great, thanks.

Satisfaction mark by srcejon 3 months ago
Answered

Dear ESASky User,

Yes, it is possible to overlay a circle using CIRCLE, the central coordinates and radius (in degrees). E.g.:

{event: 'overlayFootprints', content:{'overlaySet': {'type': 'FootprintListOverlay', 'overlayName': 'test footprints', 'cooframe': 'J2000', 'color': 'red', 'lineWidth': 5, 'skyObjectList': [{'name': 'test footprint1', 'id': 1, 'stcs': 'CIRCLE ICRS 187.33912535049 -62.6616054228651 0.02', 'ra_deg': '187.287228500645', 'dec_deg': '-62.6876148176328'}]}}}

Here are some more examples of STCS strings (taken from the search tools information):

"BOX ICRS 11.421 41.764 10.071 41.765 10.079 40.864 11.411 40.863"

"POLYGON ICRS 9.97 41.04 11.13 41.94 11.45 42.0 11.34 41.51 10.15 40.53 9.79 40.80 9.97 41.03 9.97 41.03"

"CIRCLE ICRS 10.76 41.28 0.8"

In general, a BOX is the following:
BOX ICRS RA(1) DEC(1) RA(2) DEC(2) RA(3) DEC(3) RA(4) DEC(4).

A POLYGON can have more than 4 sets of coordinates: 
POLYGON ICRS RA(1) DEC(1).... RA(n) DEC(n).

And a CIRCLE has the coordinates and radius:

CIRCLE ICRS RA(1) DEC(1) Radius

Finally, I'm afraid the ESASky source code is not currently available.

I hope all this helps.

Kind regards,

Deborah on behalf of the ESASky team