net.aerith.misao.database
Class CelestialDivisionMap

java.lang.Object
  |
  +--net.aerith.misao.database.CelestialDivisionMap

public class CelestialDivisionMap
extends java.lang.Object

The CelestialDivisionMap represents a flag map of the celestial globe divided per 10 minutes in R.A. and per 1 degree in Decl.


Field Summary
private static Coor[] center_coor
          The central R.A.
private static Coor[] end_coor
          The R.A.
protected  boolean[] flag_map
          The flag map.
private static double mesh_radius
          The radius of each cell.
private static Coor[] start_coor
          The R.A.
 
Constructor Summary
CelestialDivisionMap()
          Constructs a CelestialDivisionMap.
 
Method Summary
(package private) static void ()
          Sets the R.A.
 CelestialDivisionMap expand(double radius)
          Expands the filled areas.
 void fill(Coor coor, double radius)
          Fills areas which overlaps on the circle represented by the specified R.A.
 void fillAll()
          Fills all areas.
static java.util.Vector getCoorFolderHierarchy(Coor coor)
          Creates the database folder hierarchy of the specified R.A.
 int getFirstIndex()
          Gets the first index where the flag is set as true.
 java.util.Vector getFolderHierarchyAt(int index)
          Gets the folder hierarchy at the specified index.
 int getNextIndex(int last_index)
          Gets the next index where the flag is set as true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

flag_map

protected boolean[] flag_map
The flag map.

start_coor

private static Coor[] start_coor
The R.A. and Decl. at first corner of each cell.

end_coor

private static Coor[] end_coor
The R.A. and Decl. at second corner of each cell.

center_coor

private static Coor[] center_coor
The central R.A. and Decl. of each cell.

mesh_radius

private static double mesh_radius
The radius of each cell.
Constructor Detail

CelestialDivisionMap

public CelestialDivisionMap()
Constructs a CelestialDivisionMap.
Method Detail

fill

public void fill(Coor coor,
                 double radius)
Fills areas which overlaps on the circle represented by the specified R.A. and Decl. and the radius.
Parameters:
coor - the center position of the circle.
radius - the radius of the circle in degree.

fillAll

public void fillAll()
Fills all areas.

expand

public CelestialDivisionMap expand(double radius)
Expands the filled areas.
Parameters:
radius - the radius to expand in degree.
Returns:
the new map.

getFirstIndex

public int getFirstIndex()
Gets the first index where the flag is set as true.
Returns:
the first index where the flag is set as true.

getNextIndex

public int getNextIndex(int last_index)
Gets the next index where the flag is set as true.
Parameters:
last_index - the last index.
Returns:
the next index where the flag is set as true.

getFolderHierarchyAt

public java.util.Vector getFolderHierarchyAt(int index)
Gets the folder hierarchy at the specified index.
Parameters:
index - the index.
Returns:
the folder hierarchy.

getCoorFolderHierarchy

public static java.util.Vector getCoorFolderHierarchy(Coor coor)
Creates the database folder hierarchy of the specified R.A. and Decl.
Parameters:
coor - the R.A. and Decl.
Returns:
the database folder hierarchy.

static void ()
Sets the R.A. and Decl. of center and at corners of each cell.