I'm continue working on my Planetarium software and I have a doubt.

At this moment my star catalogue is very small, but I'm planning to use a bigger one. To optimize the search inside this catalogue I think I have to divide it in regions.

These regions will be delimited by right ascension and declination.

Using stars' right ascension and declination, how can I divide the sky to optimize my search?

I want to retrieve all stars visible at this moment. Maybe not all of them, only the visible by the user. For example, if user is looking to the North, he/she won't see the stars at the South. The region will be the area visible by the user at this moment, and I want to get all stars for that given region using also a limit magnitude.

  • $\begingroup$ Binary tree would be one obvious approach, but there are many others. You could even use a full fledged embedded database like SQLite3, or non-embedded db like MySQL. $\endgroup$
    – user21
    Commented Nov 17, 2015 at 18:00
  • $\begingroup$ What are the parameters of your search? Are you trying to find all of the stars in a given region? $\endgroup$ Commented Nov 18, 2015 at 19:00
  • $\begingroup$ I have updated my question with more details. $\endgroup$
    – VansFannel
    Commented Nov 19, 2015 at 10:29

1 Answer 1


This is really a computing problem, but I suppose the only point from an astronomical perspective is what the RA, Dec distributions of your catalogues look like.

I'm not that familiar with optimal search techniques but I guess that you want roughly similar numbers of stars in each region.

If your catalogue is just of the brightest stars, then these are fairly uniformly distributed around the sky, so splitting them up in equal bands of right ascension would probably do.

However, if you are dealing with much larger catalogues then there is likely to be a significant concentration towards the galactic plane. In these circumstance you might be better off splitting your regions in terms of their galactic latitude. So you would calculate galactic coordinates by transforming the RA, Dec and then plot the distribution of number of stars versus galactic latitude to see where you would split your regions.

  • 1
    $\begingroup$ Thanks. I've been testing Tycho 2 catalogue and it has a index file to search more quickly where a star is. But I don't know how this catalogue has divided the sky to make this search faster. I think it has divided as triangles, but I don't know why a triangle is an optimal approach to divide the sky. $\endgroup$
    – VansFannel
    Commented Nov 17, 2015 at 19:54
  • $\begingroup$ @VansFannel Sounds off-topic for this SE. $\endgroup$
    – ProfRob
    Commented Nov 17, 2015 at 20:42
  • $\begingroup$ Thanks. Where is the right place to ask this question? $\endgroup$
    – VansFannel
    Commented Nov 20, 2015 at 7:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .