[postgis-devel] Astronomical extensions

Jim Bosch jfbosch at ucdavis.edu
Wed Oct 25 14:19:34 PDT 2006


I'm exploring the possibility of extending PostGIS to make it more
useful for astronomers (i.e. me), and I was interested in seeing if
anyone has any advice on how best to proceed (particularly in terms of
how to organize such things with the PostGIS internals).

There are two primary issues:

-    Astronomers deal with ellipses, and often care very much about
ellipse-specific things.  While approximating ellipses as polygons is
perfectly fine for topological operations (so there's no need to worry
about multi-ellipses, etc.), being able to extract things like
ellipticity and orientation angle from individual ellipses is of utmost
importance.  So I'd need to make an ellipse data type, and add the
necessary operators for it to interact sensibly with existing PostGIS
types.  I'm not sure, however, whether I should make this a new subtype
of the PostGIS Geometry type, or a new PostgreSQL type altogether.
There are probably a host of other more subtle questions as well.

-    Astronomers use a totally different set of coordinate systems.  A
very basic gnomonic projection is by far the most common, but it is
described very differently (not to mention the fact that everything is
inside-out, since we look at the sky, not the ground).  The astronomical
community already has a large set of standard coordinate systems and
standard representations for them, as well as several libraries (similar
to PROJ4 in nature) to do the actual transformations.  This step, then,
at least seems straightforward: add one of these libraries as an
alternate backend for transforms, and find a way to put the astronomical
coordinate systems in the spatial reference table.


There are also two primary strategies I can think of:
-    Make an entirely separate library that requires PostGIS to be
installed as well.
-    Try to integrate my extensions with PostGIS itself, making my
additions as optional compile-time options or something (would anyone
want them?)


Any thoughts?


Thanks in advance,

Jim Bosch





More information about the postgis-devel mailing list