|
HTM Index 1.0![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jhu.htmIndex.SpatialDomain
A SpatialDomain manages a list of SpatialConvexes. This is the data structure that can define any area on the sphere. With the intersect method, the htm index returns the triangle nodes that intersect with the area specified by the current SpatialDomain instance. There are two lists returned: one for the nodes fully contained in the area and one for the triangles which lie only partially in the domain.
Constructor Summary | |
SpatialDomain()
Default constructor |
|
SpatialDomain(SpatialIndex idx)
Constructor: needs SpatialIndex |
Method Summary | |
void |
add(SpatialConvex c)
Add a convex |
void |
clear()
Clear domain, empty convex list |
SpatialConvex |
getConvex(int i)
Fetch the convex number i |
int |
getNumberOfConvexes()
Return the number of convexes in this domain |
boolean |
intersect(java.util.List partial,
java.util.List full)
Same intersection, but return vectors of ids instead of bitlists. |
boolean |
intersect(SpatialIndex idx,
java.util.BitSet partial,
java.util.BitSet full)
Intersect with index. |
boolean |
intersect(SpatialIndex idx,
java.util.List partial,
java.util.List full)
Same intersection, but return vectors of ids instead of bitlists. |
void |
read(java.io.Reader in)
Read in a domain from a Reader (input stream). |
void |
setIndex(SpatialIndex idx)
Set index pointer and initialize markup if not done with constructor |
java.lang.String |
toString()
Convert domain to a string. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public SpatialDomain()
public SpatialDomain(SpatialIndex idx)
Method Detail |
public void setIndex(SpatialIndex idx)
public void add(SpatialConvex c)
public boolean intersect(SpatialIndex idx, java.util.BitSet partial, java.util.BitSet full)
public boolean intersect(SpatialIndex idx, java.util.List partial, java.util.List full)
public boolean intersect(java.util.List partial, java.util.List full)
public SpatialConvex getConvex(int i)
public int getNumberOfConvexes()
public java.lang.String toString()
public void clear()
public void read(java.io.Reader in) throws java.io.IOException
A constraint is represented in the file as a set of 4 floatingpoint numbers x y z d where a=(x,y,z). Example:
1 0 0 0.5
A convex is the area defined by several constraints on the sphere that is common to all constraints. Of course such an area has to be convex.
A convex in the file is defined by a number (number of constraints in the convex) followed by as many convexes (each on one line.) Example:
4 0.5 0.707107 0.5 0.58077530122080200 0.5 0.707107 0.5 0.84077530122080200 -0.5 -0.907107 0.3 -0.87530122080200 0.2 -0.907107 0.3 -0.77530122080200
A domain is an accumulation of convexes. A domain in the domainfile is represented by a number (number of convexes) followed by that many convexes. A domainfile may only contain one domain. It may contain comment lines, starting with #.
The domain file accepts several special convex identifiers to read in special formats. These identifiers must come as a single comment line before the data, and no additional comments are allowed These are
#TRIANGLE - the next three lines are triangle corners #TRIANGLE_RADEC - same, given in ra/dec #RECTANGLE - the next four lines are rectangle corners #RECTANGLE_RADEC - same, given in ra/dec #CONVEX - read convex in default format #CONVEX_RADEC - read the convex in ra/dec format
#DOMAIN 1 #CONVEX 3 0.5 0.707107 0.5 0.58077530122080200 0.5 0.5 0.707107 0.63480775301220802 0.707107 -0.5 0.5 0.8480775301220802
Example 2:#DOMAIN 2 #CONVEX 4 0 0 1 0.3 -1 -3 -5 -0.97 5 -3 -10 -0.97 2 2 -5 -0.97 #CONVEX_RADEC 1 25.23 -55.9 0.99Example 3:#DOMAIN 1 #RECTANGLE_RADEC 54 29 54 30 55 29 55 30Example 4:#DOMAIN 1 #TRIANGLE 0 0 1 0 0.9 0.9 0.9 0 0.9
|
HTM Index 1.0![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |