Package skyview.geometry.projecter

# Class HpxStraddle

java.lang.Object
skyview.geometry.projecter.HpxStraddle

public class HpxStraddle extends Object
This class handles straddling in the Healpix projection. It is intended to handle small pixel straddling, not so much lines more than a few degrees in size. Recall the normalized version of the HEALPix projection where there are 12 unit tiles arranged so: 3 4 0 8 5 1 9 6 2 10 7 11 The top right corners of tiles 3, 0, 1 and 2 join at the north pole. The bottom left corners of tiles 8,9,10,11 join at the south pole. The line on the right edge of tile 3 is identified with the line at the top edge of tile 0 and so forth. If we simply join lines in in the projection naively the line can easily leave and re-enter the valid legion because of this jaggedness near the pole. The other straddling is similar to what we see in the Car projection since the left edge of tile 3 is identified with the right edge of tile 7 and similarly for tiles 8 and 11.

## Constructor Summary

Constructors
Constructor
Description
`HpxStraddle(Hpx proj)`
Create a straddler associated with the projection

## Method Summary

Modifier and Type
Method
Description
`int[]`
`getStraddleStats()`
Get the statistics on the kind of straddles processed by this objects as an array of {north, south, edge}
`boolean`
`segmentStraddle(double[] x1, double[] x2)`
Does the line between the two points straddle?
`boolean`
`straddle(double[][] points)`
Does any segment in this sequence of points stadddle.
`double[][][]`
`straddleComponents(double[][] vertices)`
Given figure which may straddle, return a set of figures which do not.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HpxStraddle

public HpxStraddle(Hpx proj)
Create a straddler associated with the projection

## Method Details

### getStraddleStats

public int[] getStraddleStats()
Get the statistics on the kind of straddles processed by this objects as an array of {north, south, edge}

### straddle

public boolean straddle(double[][] points)
Does any segment in this sequence of points stadddle. Note that the points array is input as points[2][n] since we want to be able to extract x/y arrays.

### segmentStraddle

public boolean segmentStraddle(double[] x1, double[] x2)
Does the line between the two points straddle?

### straddleComponents

public double[][][] straddleComponents(double[][] vertices)
Given figure which may straddle, return a set of figures which do not. Note that figures are given in [2][n] arrays (i.e, arrays of x and y separately) The returned array is [m][2][*] where m is the number of subfigures the input was broken into, each of which can have a variable number of vertices (>=3).