23 #ifndef LSST_SPHGEOM_CHUNKER_H_ 24 #define LSST_SPHGEOM_CHUNKER_H_ 69 int32_t numSubStripesPerStripe);
72 return _numStripes == c._numStripes &&
73 _numSubStripesPerStripe == c._numSubStripesPerStripe;
77 return _numStripes != c._numStripes ||
78 _numSubStripesPerStripe != c._numSubStripesPerStripe;
90 return _numSubStripesPerStripe;
110 bool valid(int32_t chunkId)
const;
115 int32_t numChunksPerStripe;
116 int32_t numSubChunksPerChunk;
120 numChunksPerStripe(0),
121 numSubChunksPerChunk(0)
127 int32_t numSubChunksPerChunk;
129 SubStripe() : subChunkWidth(), numSubChunksPerChunk(0) {}
132 int32_t _getStripe(int32_t chunkId)
const {
133 return chunkId / (2 * _numStripes);
136 int32_t _getChunk(int32_t chunkId, int32_t stripe)
const {
137 return chunkId - stripe*2*_numStripes;
140 int32_t _getChunkId(int32_t stripe, int32_t chunk)
const {
141 return stripe * 2 * _numStripes + chunk;
144 int32_t _getSubChunkId(int32_t stripe, int32_t subStripe,
145 int32_t chunk, int32_t subChunk)
const {
146 int32_t
y = subStripe - stripe * _numSubStripesPerStripe;
147 int32_t
x = subChunk -
148 chunk * _subStripes[subStripe].numSubChunksPerChunk;
149 return y * _maxSubChunksPerSubStripeChunk +
x;
158 int32_t maxSS)
const;
159 Box _getChunkBoundingBox(int32_t stripe, int32_t chunk)
const;
160 Box _getSubChunkBoundingBox(int32_t subStripe, int32_t subChunk)
const;
163 int32_t _numSubStripesPerStripe;
164 int32_t _numSubStripes;
165 int32_t _maxSubChunksPerSubStripeChunk;
166 Angle _subStripeHeight;
173 #endif // LSST_SPHGEOM_CHUNKER_H_
This file declares a class for representing longitude/latitude angle boxes on the unit sphere...
std::vector< int32_t > subChunkIds
Box represents a rectangle in spherical coordinate space that contains its boundary.
bool operator==(Chunker const &c) const
bool operator!=(Chunker const &c) const
This file declares a class for representing angles.
A base class for image defects.
Region is a minimal interface for 2-dimensional regions on the unit sphere.
int32_t getNumSubStripesPerStripe() const
getNumSubStripesPerStripe returns the number of fixed-height latitude sub-intervals in each stripe...
NormalizedAngleInterval represents closed intervals of normalized angles, i.e.
int32_t getNumStripes() const
getNumStripes returns the number of fixed-height latitude intervals in the sky subdivision.
Angle represents an angle in radians.
Chunker subdivides the unit sphere into longitude-latitude boxes.
SubChunks represents a set of sub-chunks of a particular chunk.