Class ChunkResampler

java.lang.Object
noaa.coastwatch.util.chunk.ChunkResampler

public class ChunkResampler extends Object
The ChunkResampler class performs a resampling of 2D chunk data from a source coordinate system to a destination. Each resampler objects holds onto a coordinate ResamplingMap and the map is used to resample data chunks from a ChunkProducer into a ChunkConsumer.
Since:
3.5.0
Author:
Peter Hollemans
  • Constructor Details

    • ChunkResampler

      public ChunkResampler(ResamplingMap map)
      Creates a new chunk resampler that uses the specified map for converting 2D coordinates.
      Parameters:
      map - the map to use for converting 2D coordinates.
  • Method Details

    • resample

      public void resample(ChunkProducer producer, ChunkConsumer consumer, ChunkPosition pos)
      Resamples chunk data from a producer to a consumer at the specified chunk position.
      Parameters:
      producer - the producer to use for requesting chunk data.
      consumer - the consumer to push resampled chunk data to.
      pos - the position within the chunking scheme of the consumer to create and push a resampled chunk.
      Throws:
      IllegalStateException - if either the consumer or producer have no valid chunking scheme.