DALI 1.1 and Ellipse

Walter Landry wlandry at caltech.edu
Mon May 9 12:29:04 CEST 2016


Hi Everyone,

I noticed the question in DALI 1.1 about whether we should add an
Ellipse type.  We already sort of support ellipses in our TAP service
because we have users that need it.  So it would be nice to add it to
the spec.

However, I think we might have a problem with how to define it.
pgSphere defines an ellipse as

  If the center of any spherical ellipse is the North Pole, the
  perpendicular projection into the x-y-plane gives an ellipse as in
  two-dimensional space.

  http://pgsphere.projects.pgfoundry.org/types.html#dt.sellipse

On the other hand, q3c and our tinyhtm-based service define an ellipse
as an intersection of an elliptical cone with the unit sphere.
Essentially, it is the difference between projecting an ellipse
perpendicularly or radially.

To distinguish between these two choices, we can look at how the two
implementations answer various questions about ellipses.

1) Does ellipse E CONTAIN point P?

   This is expressible in closed form for both formulations.  If you
   are feeling adventurous, you can write the expressions in ADQL.

2) Does an ellipse E1 INTERSECT or CONTAIN ellipse E2?

   pgSphere uses an iterative algorithm.  It is not in closed form.
   In contrast, I think (but have not implemented) that q3c/tinyhtm can
   compute it by finding the null spaces of 3x3 matrices.  This is, in
   principle, expressible in closed form.  But for numerical
   stability, you probably want to use something like QR or SVD.

3) Does a polygon intersect/overlap with ellipse E?

   No one implements this.

Just to make things more complicated, we also use PostGIS, which does
not have ellipses at all.

Cheers,
Walter Landry


More information about the dal mailing list