The general description of of the compression by coordinate subsampling is given in section [compression-by-coordinate-subsampling]. This appendix provides details on the available methods for compression by coordinate subsampling.
The definitions and guidance given here allow an application to compress an existing data set using coordinate subsampling, while letting the creator of the compressed dataset control the accuracy of the reconstituted coordinates through the degree of subsampling, the choice of interpolation method and by setting the computational precision.
Futhermore, the definitions given here allow an application to uncompress coordinate and auxiliary coordinate variables that have been compressed using coordinate subsampling. The key element of this process is the reconstitution of the full resolution coordinates in the domain of the data by interpolation between the subsampled coordinates, the tie points, stored in the compressed dataset.
The appendix is organised in a sections on Section J.1, "Common Definitions and Notation", Section J.2, "Common Conversions and Formulas", Section J.3, "Interpolation Methods" and finally two sections with step procedures Section J.4, "Coordinate Compression Steps" and Section J.5, "Coordinate Uncompression Steps".
The coordinate interpolation methods are named to indicate the number of dimensions they interpolate as well as the type of interpolation provided. For example, the interpolation method named linear
provides linear interpolation in one dimension and the method named bi_linear
provides linear interpolation in two dimensions. Equivalently, the interpolation method named quadratic
provides quadratic interpolation in one dimension and the interpolation method named bi_quadratic
provides quadratic interpolation in two dimensions.
When an interpolation method is referred to as linear or quadratic, it means that the method is linear or quadratic in the indices of the interpolated dimensions. Consequently, for a linear interpolation, the coordinates of the interpolated points are evenly spaced.
For convenience, an interpolation argument s
is introduced, calculated as a function of the index in the target domain of the coordinate value to be reconstituted. In the case of one dimensional interpolation the variable is computed as
s = s(ia, ib, i) = (i - ia)/(ib - ia)
where ia
and ib
are the indices in the target domain of the tie points A
and B
and i
is the index in the target domain of the coordinate value to be reconstituted.
Note that the value of s
varies from 0.0
at the tie point A
to 1.0
at tie point B
. For example, if ia = 100
and ib = 110
and the index in the target domain of the coordinate value to be reconstituted is i = 105
, then s = (105 - 100)/(110 - 100) = 0.5
.
In the case of two dimensional interpolation, the interpolation arguments are similarly computed as
s1 = s(ia1, ib1, i1) = (i1 - ia1)/(ib1 - ia1)
s2 = s(ia2, ic2, i2) = (i2 - ia2)/(ic2 - ia2)
where ia1
and ib1
are the first dimension indices in the target domain of the tie points A
and B
respectively, ia2
and ic2
are the second dimension indices in the target domain of the tie points A
and C
respectively and the indices i1
and i2
are the first and second dimension indices respectively in the target domain of the coordinate value to be reconstituted.
The target domain is segmented into smaller interpolation subareas as described in [compression-by-coordinate-subsampling-tie-points-and-interpolation-subareas].
For one-dimensional interpolation, an interpolation subarea is defined by two tie points, one at each end of the interpolation subarea. However, the tie points may be inside or outside the interpolation subareas as shown in Figure 1. When interpolation methods are applied for a given interpolation subarea, it must be ensured that reconstituted coordinate points are only generated inside the interpolation subarea being processed, even if some of the tie point coordinates lie outside of that interpolation subarea. See also description in [compression-by-coordinate-subsampling-tie-points-and-interpolation-subareas].
For two-dimensional interpolation, an interpolation subarea is defined by four tie points, one at each corner of a rectangular area aligned with the domain axes, see Figure 2.
For the reconstitution of the uncompressed coordinate and auxiliary coordinate variables the interpolation method can be applied independently for each interpolation subarea, making it possible to parallelize the computational process.
The following notation is used:
A variable staring with v
denotes a vector and v.x
, v.y
and v.z
refer to the three coordinates of that vector.
A variable staring with ll
denotes a latitude-longitude coordinate pair and ll.lat
and ll.lon
refer to the latitude and longitude coordinates.
For one dimensional interpolation, i
is an index in the interpolated dimension, tpi
is an index in the subsampled dimension and is
is an index in the interpolation subarea dimensions.
For two dimensional interpolation, i1
and i2
are indices in the interpolated dimensions, tpi1
and tpi2
are indices in the subsampled dimensions and is1
and is2
are indices in the interpolation subarea dimensions.
Note that, for simplicity of notation, the descriptions of the interpolation methods in most places leave out the indices of tie point related variables and refer to these with a
and b
in the one dimensional case and with a
, b
, c
and d
in the two dimensional case. In the two dimensional case, a = tp(tpi2, tpi1)
, b = tp(tpi2, tpi1+1)
, c = tp(tpi2+1, tpi1)
and d = tp(tpi2+1, tpi1+1)
would reflect the way the tie point data would be stored in the data set, see also [interpolation].
Description | Formula | |
---|---|---|
fll2v |
Conversion from geocentric |
|
fv2ll |
Conversion from cartesian vector |
|
faz2v |
Conversion from |
|
fv2az |
Conversion from cartesian vector |
|
fsqrt |
Square Root |
|
fplus |
Vector Sum |
|
fminus |
Vector Difference |
|
fmultiply |
Vector multiplied by Scalar |
|
fcross |
Vector Cross Product |
|
norm |
Normalised Vector |
|
fdot |
Vector Dot Product |
|
Name |
|
Description |
General purpose one dimensional linear interpolation method for one or more coordinates |
Interpolation Parameter terms |
None |
Coordinate Compression Calculations |
None |
Coordinate Uncompression Calculations |
The coordinate value |
Name |
|
Description |
General purpose two dimensional linear interpolation method for one or more coordinates |
Interpolation Parameter terms |
None |
Coordinate Compression Calculations |
None |
Coordinate Uncompression Calculations |
The interpolation function fl() defined for linear interpolation above is first applied twice in the interpolated dimension 2, once between tie points |
Name |
|
Description |
General purpose one dimensional quadratic interpolation method for one coordinate. |
Interpolation Parameter terms |
Optionally coefficient |
Coordinate Compression Calculations |
The expression |
Coordinate Uncompression Calculations |
The coordinate value |
Name |
|
Description |
A one dimensional quadratic method for interpolation of the geographic coordinates latitude and longitude, typically used for remote sensing products with geographic coordinates on the reference ellipsoid. Requires a pair of latitude and longitude tie point variables, as defined unambiguously in [latitude-coordinate] and [longitude-coordinate]. For each interpolation subarea, none of the tie points defining the interpolation subarea are permitted to coincide. By default, interpolation is performed directly in the latitude and longitude coordinates, but may be performed in cartesian coordinates where required for achieving the desired accuracy. This must be indicated by setting the The quadratic interpolation coefficients Although equivalent to a tie point, the coefficients The coefficients may be represented in three different ways: For storage in the dataset as the non-dimensional coefficients For interpolation in cartesian coordinates as the coefficients For interpolation in geographic coordinates latitude and longitude as the coefficients The functions |
Interpolation Parameter terms |
Any subset of interpolation coefficients |
Coordinate Compression Calculations |
First calculate the tie point vector representations from the tie point latitude-longitude representations |
Coordinate Uncompression Calculations |
First calculate the tie point vector representations from the tie point latitude-longitude representations |
Name |
|
Description |
A two dimensional quadratic method for interpolation of the geographic coordinates latitude and longitude, typically used for remote sensing products with geographic coordinates on the reference ellipsoid. Requires a pair of latitude and longitude tie point variables, as defined unambiguously in [latitude-coordinate] and [longitude-coordinate]. For each interpolation subarea, none of the tie points defining the interpolation subarea are permitted to coincide. The functions The parametric representation of the interpolation coefficients, stored in the interpolation parameters |
Interpolation Parameter terms |
Any subset of interpolation coefficients Optionally the flag variable |
Coordinate Compression Calculations |
First calculate the tie point vector representations from the tie point latitude-longitude representations |
Coordinate Uncompression Calculations |
First calculate the tie point vector representations from the tie point latitude-longitude representations |
Step | Description | Link |
---|---|---|
1 |
Identify the coordinate and auxillary coordinate variables for which tie point and interpolation variables are required. |
|
2 |
Identify non-overlapping subsets of the coordinate variables to be interpolated by the same interpolation method. For each coordinate variable subset, create an interpolation variable and specify the selected interpolation method using the |
[compression-by-coordinate-subsampling-interpolation-variable] |
3 |
For each coordinate variable subset, add the coordinates variable subset and the corresponding interpolation variable name to the the |
[compression-by-coordinate-subsampling-coordinate-interpolation-attribute] |
4 |
For each coordinate variable subset, identify the set of interpolated dimensions and the set of non-interpolated dimensions. |
|
5 |
For each set of the interpolated dimensions, identify the continuous areas and select the interpolation subareas and the tie points, taking into account the required coordinate reconstitution accuracy when selecting the density of tie points. |
[compression-by-coordinate-subsampling-tie-points-and-interpolation-subareas] |
6 |
For each of the interpolated dimensions, add the interpolated dimension, the corresponding subsampled dimension and, if required by the selected interpolation method, its corresponding interpolation subarea dimension to the |
[compression-by-coordinate-subsampling-tie-point-mapping-attribute] |
7 |
For each of the interpolated dimensions, record the location of each identified tie point in a tie point index variable. For each interpolated dimension, add the tie point index variable name to the |
[compression-by-coordinate-subsampling-tie-point-mapping-attribute] |
8 |
For each of the target coordinate and auxillary coordinate variables, create the corresponding tie point coordinate variable and copy the coordinate values from the target domain coordinate variables to the tie point variables for the target domain indices identified by the tie point index variable. Repeat this step for each combination of indices of the non-interpolated dimensions. |
[compression-by-coordinate-subsampling-tie-point-mapping-attribute] |
9 |
For each of the target coordinate and auxillary coordinate variable having a |
[compression-by-coordinate-subsampling-interpolation-of-cell-boundaries] |
10 |
If required by the selected interpolation method, follow the steps defined for the method in Section J.3, "Interpolation Methods" to create any required interpolation parameter variables. As relevant, create the |
[compression-by-coordinate-subsampling-interpolation-variable] |
11 |
Optionally, check the consistency of the original coordinates and the reconstructed coordinates and add a |
Step | Description | Link |
---|---|---|
1 |
From the |
[compression-by-coordinate-subsampling-coordinate-interpolation-attribute] |
2 |
For each coordinate variable subset, identify the interpolation method from the
|
[compression-by-coordinate-subsampling-interpolation-variable] |
3 |
For each coordinate variable subset, identify the set of interpolated dimensions and the set of non-interpolated dimensions from the |
[compression-by-coordinate-subsampling-tie-point-mapping-attribute] |
4 |
From the |
[compression-by-coordinate-subsampling-tie-point-mapping-attribute] |
5 |
From the tie point index variables referenced in the |
[compression-by-coordinate-subsampling-tie-point-mapping-attribute] |
6 |
For each of the interpolated dimensions, identify pairs of adjacent indices in the tie point index variable with index values differing by more than one, each index pair defining the extend of an interpolation subarea in that dimension. A full interpolation subarea is defined by one such index pair per interpolated dimension, with combinations of one index from each pair defining the interpolation subarea tie points. |
[compression-by-coordinate-subsampling-tie-points-and-interpolation-subareas] |
7 |
As required by the selected interpolation method, identify the interpolation parameter variables from the interpolation variable attribute |
[compression-by-coordinate-subsampling-interpolation-parameters] |
8 |
For each of the tie point coordinate and auxillary coordinate variables, create the corresponding target coordinate variable. For each interpolation subarea, apply the interpolation method, as described in Section J.3, "Interpolation Methods", to reconstitute the target domain coordinate values and store these in the target domain coordinate variables. Repeat this step for each combination of indices of the non-interpolated dimensions. |
[compression-by-coordinate-subsampling-tie-point-mapping-attribute] |
9 |
For each of the tie point coordinate and auxillary coordinate variables having a |
[compression-by-coordinate-subsampling-interpolation-of-cell-boundaries] |
10 |
If auxiliary coordinate variables have been reconstituted, then, if not already present, add a |