On Wed, Dec 18, 2013 at 1:53 AM, Roman Fleysher < roman.fleys...@einstein.yu.edu> wrote:
> Perhaps this is a weird way for me to get deeper knowledge of R trees, and > because I vaguely remember that Tyco refers to a specific epoch in which > coordinates are defined, but would it be possible to search R tree using a > cone, i.e. stars within a cone of certain degree around given star? This > would require a trigonometric calculation before comparison can be made but > can be done in a single comparison. > > Or, since RA and DEC coordinates are not area preserving (nor distance) -- > i.e. angle between stars at DEC =0 is bigger than angle between stars at > DEC=80 when they are the same delta RA apart -- then maybe instead of > defining rectangular FOV in RA and DEC one should be defining rectangular > FOV in DEC, sin(RA)? Then one would not need two searches. > > The goal is to find neighbors to a given star defined roughly by some > metric? Since there's nothing magical in RA , DEC coordinates the metric > could use some other coordinates? Every [RA,DEC] pair resolves to a unit vector in Cartesian coordinate space i.e. an [X,Y,Z] triplet on the surface of a unit sphere; that would be a continuous metric without the RA=0=360 issue. I don't see why the R*Tree could not be set up with X, Y, and Z, plus magnitude limits; the set of nodes is hollow in a 3D sense so the first-level non-leaf nodes would have a lot of empty space, but I don't think that matters; I've been thinking about doing it this way for some time. For my app I already store XYZs in the outer, non-R*Tree table because all final comparisons have to be in Cartesian space anyway. But in general the search region is so small that the cosine[DEC] dependence of distance per degree of RA is effectively constant for any one search, and an [RA,DEC,Mag] tree should be "good enough" because it pares down the search space quickly from 2.5M stars in Tycho=2 to a few hundred very quickly, with the caveat that there is a special case near RA=0=360. In any event the R*Tree is not going to do the final geometric comparison, rather it reduces the number of stars that need that comparison, and that's the goal. Btw, if you want to see something cool, look at chapter 4 of Dustin Lang's thesis (www.astro.princeton.edu/~dstn/lang-thesis.pdf); the whole paper is cool, but I really enjoy that chapter. -b _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users