Quantization‎ > ‎

Raster Data

Methods

PYXIS DGGS SDK provides 2 methods to read, sample, and quantize data values from conventional raster (coverage) data files into DGGS cells:
  1. Native Resolution Pixel Sampling - This process determines the optimal cell size to represent the native pixel of the coverage, samples the native coverage for every cell center, and assigns that value to the DGGS Cell. Coarser DGGS resolutions are also sampled at the coordinate of the DGGS cell centers from image values that are interpolated using either nearest, bi-linear or bi-cubic filters.  The resulting geometric tree forms a raster GeoSource.
  2. Low Resolution Cell Aggregation - This process determines the optimal cell size to represent the native pixel of the coverage, samples the native coverage for every cell center, and assigns that value to the DGGS Cell. Data values at coarser DGGS resolutions are calculated by using the ZoomOutProcess and applying statistics to aggregated native DGGS cell values: average, max, min, nearest pixel and sum. The resulting geometric tree forms a raster GeoPacket.

Pixel Sampling

At the code level, every native raster is represented as an IXYCoverage interface. IXYCoverage provides efficient operations to sample values from the coverage data. 

The first step of pixel sampling is to open the native coverage file and extract the following from the file:
  1. Spatial Domain Information - Information about the native coordinate system, native bbox and step size. Step size is used to estimate the native resolution of the coverage data. (Note: May not be valid when native projection add large distortion on pixel area.)
  2. Data Definition - Describes the value domain and value type return from the coverage.
The second step is fetch data values.  IXYCoverage provides a streaming interface with a choice of either the XYCoverageValueGetter or  XYAsyncValueGetter methods. The async value getter batches value fetching requests into native tiles (256x256 pixels tiles) and schedules IO operations to optimize performance both on CPU and DISK.  The PYXIS DGGS SDK provides a number of custom readers and supports for GDAL file formatsThe GDAL File reader process provide IXYCoverage output to allow reading data from supported GDAL file formats. 

To meet the requirements to interpolate of images  at coarser DGGS resolutions, the PYXIS DGGS SDK provides several built in pixel samplers, and a mechanism to add others as plugins:
  1. NearestSampler - Each value extracted as the nearest native pixel by using cell center and pixel centers.
  2. BilinearSampler - Performs bi-linear sampling of native pixels using cell centers.
  3. BicubicSampler - Performs bi-cubic sampling of native pixels using cell centers.
  4. NullBicubicSampler - Performs relaxed version of bicubic sampling to support smooth interpolation for sparse datasets. 
If using the Low Resolution Cell Aggregation, a third step is added to aggregate the spatial statistics on the data values to each of the coarser cell resolutions.

Comments