[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: R-tree indexing, RA wrap and LISTENing
Rob,
I think that's the way to go, create a new data type called
"Sky Coordinate" that is defined as an "RA" and a "DEC"
and then define the types RA and DEC and the operators
that would be required like <, >, +, -, *, "between"
and so on.
Later you define a set of special astrometric operators
over the set of (RA,DEC) Certainly we'd need a "anglar dstance"
maybe a "precess" operator, The more functions you can add
to the database the more powerfull the querries can be.
You could even define "constellation" that returns the name
of the constallation that a given (RA, DEC) falls into
so you'd be able to querry on "all stars in Orion with mag < 6"
or whatever.
Think carfully before signing up for e-mail notifications.
If someone impoorts 15 million observation pairs it could trigger
a real flood of e-mail. I would want something that insures no
more then say one e-mail an hour no matter how many hits.
--- "Creager, Robert S" <CreagRS@LOUISVILLE.STORTEK.COM> wrote:
>
>
> > -----Original Message-----
> > From: Doug Welch [mailto:welch@physics.mcmaster.ca]
> > Subject: R-tree indexing
> >
> > Two questions:
> >
> > 1) Is R-tree indexing being used on coordinate boxes of type
> > box? If not, this would be a superb idea since R-tree indexed
> > coordinate box queries (overlap, contained-within, etc) are
> > viciously efficient and PostgreSQL implements this index.
>
> I'm using B-Tree indexes to manage my RA/Dec searches, and it works
> quite
> well. My query uses circle_contains_pt, but I've also bound the
> RA/DEC by
> using BETWEEN. I may have to take a look at this. Maybe I can do
> away with
> the BETWEEN.
>
> Any thoughts on how to handle the stars that sit at 0 RA (or very
> close)?
> I've been toying with creating a new PostgreSQL type which manages
> this wrap
> automatically, but only got a very little way into that one.
>
> >
> > 2) Is anyone considering implementing an "alert" query which
> > would be triggered by a object being added outside previous
> > object positions (if they exist for that part of the sky)
> > and/or not in the Tycho list? This would be a way of
> > detecting moving objects, flare stars, novae, etc.
>
> PostgreSQL has NOTIFY/LISTEN, which is used for just this purpose. A
> set of
> NOTIFY events would be created, and folks could sign up to receive
> e-mail of
> these events. Then the LISTEN would query the dB to see who wanted
> notification, and then send e-mail.
>
> >
> > Cheers,
> > Doug
> >
>
> Later,
> Rob
>
=====
Chris Albertson
Home: 310-376-1029 chrisalbertson90278@yahoo.com
Cell: 310-990-7550
Office: 310-336-5189 Christopher.J.Albertson@aero.org
KG6OMK
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com