<div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Well, I did say "less than half the sphere"... Anyway, we didn't chose that definition and went with the CCW instead. Now we all have to implement it correctly. If you mean "what do I do?" I don't have any polygons that are exactly half the sphere to worry about.<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Pat<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 June 2018 at 11:34, Arnold Rots <span dir="ltr"><<a href="mailto:arots@cfa.harvard.edu" target="_blank">arots@cfa.harvard.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So, what do you do when you have exactly half a sphere?<br></div><div class="gmail_extra"><span class=""><br clear="all"><div><div class="m_4579442330506947999gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>-------------------<br>Arnold H. Rots <wbr> Chandra X-ray Science Center<br>Smithsonian Astrophysical Observatory tel: +1 617 496 7701<br>60 Garden Street, MS 67 fax: +1 617 495 7356<br>Cambridge, MA 02138 <a href="mailto:arots@cfa.harvard.edu" target="_blank">arots@cfa.harvard.edu</a><br>USA <wbr> <a href="http://hea-www.harvard.edu/~arots/" target="_blank">http://hea-www.harvard.edu/~<wbr>arots/</a><br>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>--------------------<br><br></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Wed, Jun 13, 2018 at 2:19 PM, Patrick Dowler <span dir="ltr"><<a href="mailto:pdowler.cadc@gmail.com" target="_blank">pdowler.cadc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">The intent of DALI was that the butterfly polygon is not valid. We didn't say it explicitly and maybe should have. <br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">More generally, the DALI xtype="polygon" is a simple polygon (convex or concave) with no crossing segments. We had to decide between picking a winding direction or for the polygon to be limited to less that half the sphere. At the Capetown interop the decision was to pick CCW winding direction and that definition went into DALI-1.1. <br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Pat<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">PS-In my experience, that construct was always a bug in the polygon generation s/w</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">PPS-Anyone using postgresql+pgsphere should note that winding direction doesn't matter for spoly because that library chose the "less than half the sphere" definition<br></div></div><div class="gmail_extra"><div><div class="m_4579442330506947999h5"><br><div class="gmail_quote">On 13 June 2018 at 01:05, Francois-Xavier PINEAU <span dir="ltr"><<a href="mailto:francois-xavier.pineau@astro.unistra.fr" target="_blank">francois-xavier.pineau@astro.<wbr>unistra.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Dear Marco, DAL,</p>
<p>I may be wrong, but I think that the STC definition of the inside
of a polygon is not compatible with "complex" shapes.</p>
<p>Example: if we take the case of a simple 4 vertices's polygon
having a butterfly shape (i.e. having two crossing great-circle
arcs), then the inside of one "wing" is in the counter-clockwise
sense while the inside of the other "wing" is in the clockwise
sense.<br>
</p>
<p>How to deal easily with such a case while remaining compatible
with the STC definition?</p>
<p><br>
</p>
<p>A polygon is just a sequence of vertices with great-circle arcs
connecting the consecutive vertices (plus the last vertex
connection the first one).</p>
<p>The great-circle arc connecting two vertices's is the smallest of
the two complementary great-arcs (and hence is always <= pi (we
have a degeneracy with vertices having an angular separation of
pi)).</p>
<p>There is no ambiguity on the inside and we have fast
implementations for polygons having possibly very complex shapes
(ray-tracing method).</p>
<p>It is true that then the definition does not allow to describe
the "exterior" (the complement on the sphere) of a polygon as
being itself a polygon. Is it a problem in practice?</p>
<p>From my (biased) point-of-view, it is more important to support
complex polygons (with a simple and fast algorithm), and to
possibly ask for an extra boolean parameter in use cases requiring
the complement of a polygon.</p>
<p>Do you agree / disagree?<br>
</p>
<p><br>
</p>
<p>Kind regards,</p>
<p><br>
</p>
<p>François-Xavier<br>
</p><div><div class="m_4579442330506947999m_1811313810517634015h5">
<p><br>
</p>
<br>
<div class="m_4579442330506947999m_1811313810517634015m_7475597954916928517moz-cite-prefix">Le 12/06/2018 à 17:45, Marco Molinaro a
écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr"><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Dear
DAL members,</span><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">
<span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">at
the recent IVOA Interop in Victoria it was pointed out</span><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">
<span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">by
Alberto</span><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">
<br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">
<a href="http://wiki.ivoa.net/internal/IVOA/InterOpMayy2018DAL/ivoa_201805_micol_polygons.pdf" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">http://wiki.ivoa.net/internal/<wbr>IVOA/InterOpMayy2018DAL/ivoa_2<wbr>01805_micol_polygons.pdf</a><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">
<br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">
<span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">that
not all the data providers follow the STC specification</span><br style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">
<span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">about
the winding direction of polygons stored in their</span>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">archives.<br>
<br>
STC states that "The inside of the region is defined as
<div>that part of coordinate space that is encircled by the </div>
<div>polygon in a counter-clockwise sense".</div>
<div>And this is to be considered when looking at the</div>
<div>celestial sphere from the inside.</div>
<div><br>
</div>
<div>The different behaviour of the polygons stored at </div>
<div>different sites creates an interoperability issue.</div>
<div><br>
</div>
<div>This email is a request on data providers to check</div>
<div>on their data and implementations (when dealing</div>
</div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">with
polygons) to solve the presented issue.</div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br>
</div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">James
also put together a python code snippet </div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">implementing
a simple test, it is available here:</div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br>
</div>
<div style="text-decoration-style:initial;text-decoration-color:initial"><span style="font-size:12.8px"><a href="https://gist.github.com/jd-au/45d1cdc0c6e2a7bc848a4be8f46c8958" target="_blank">https://gist.github.com/jd-au/<wbr>45d1cdc0c6e2a7bc848a4be8f46c89<wbr>58</a></span><br>
</div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial"><br>
</div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">Thank
you in advance!</div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">Cheers,</div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">
Marco & James</div>
<div style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial">
(your DAL chair & vice)</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br><br clear="all"><br></div></div><span class="m_4579442330506947999HOEnZb"><font color="#888888">-- <br><div class="m_4579442330506947999m_1811313810517634015gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Patrick Dowler<br></div>Canadian Astronomy Data Centre<br></div>Victoria, BC, Canada<br></div></div>
</font></span></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Patrick Dowler<br></div>Canadian Astronomy Data Centre<br></div>Victoria, BC, Canada<br></div></div>
</div>