Transform a grid of positions astTranGrid
"
ncoord_in"
elements, containing the coordinates
of the centre of the first pixel in the input grid along each dimension. "
ncoord_in"
elements, containing
the coordinates of the centre of the last pixel in the input grid along each
dimension.
Note that "
lbnd"
and "
ubnd"
together define the shape and size of
the input grid, its extent along a particular (j’
th) dimension being
ubnd[j]-lbnd[j]1
(assuming the index "
j"
to be zero-based). They also define the input grid’
s
coordinate system, each pixel having unit extent along each dimension with integral
coordinate values at its centre.
If piece-wise linear approximation is not required, a value of zero may be given. This will ensure that the Mapping is used without any approximation, but may increase execution time.
If the value is too high, discontinuities between the linear approximations used in adjacent panel will be higher. If this is a problem, reduce the tolerance value used.
If a smaller value is used, the input region will first be divided into sub-regions
whose size does not exceed "
maxpix"
grid points in any dimension. Only at this point
will attempts at approximation commence.
This value may occasionally be useful in preventing false convergence of the adaptive algorithm in cases where the Mapping appears approximately linear on large scales, but has irregularities (e.g. holes) on smaller scales. A value of, say, 50 to 100 grid points can also be employed as a safeguard in general-purpose software, since the effect on performance is minimal.
If too small a value is given, it will have the effect of inhibiting linear
approximation altogether (equivalent to setting "
tol"
to zero). Although this may
degrade performance, accurate results will still be obtained.
’
s forward coordinate transformation is to be applied,
while a zero value indicates that the inverse transformation should be used. "
ncoord_in"
. "
out"
array (which will contain the output
coordinates). The value given should not be less than the number of points in
the grid. "
[ncoord_out][outdim]"
, into which the coordinates of the output
(transformed) points will be written. These will be stored such that the value
of coordinate number "
coord"
for output point number "
point"
will be found
in element "
out[coord][point]"
. The points are ordered such that the first
axis of the input grid changes most rapidly. For example, if the input grid
is 2-dimensional and extends from (2,-1) to (3,1), the output points will be
stored in the order (2,-1), (3, -1), (2,0), (3,0), (2,1), (3,1). "
8-byte"
interface for this
function should be used. This alternative interface uses 8 byte integer arguments
(instead of 4-byte) to hold pixel indices and pixel counts. Specifically, the
arguments "
lbnd"
, "
ubnd"
, "
outdim"
are changed from type "
int"
to type "
int64_t"
(defined in header file stdint.h). The function name is changed by
appending the digit "
8"
to the name. Thus, astTranGrid becomes astTranGrid8.