Package noaa.coastwatch.util
Interface ResamplingSourceImp
- All Known Implementing Classes:
AVHRRSourceImp
,GenericSourceImp
,MODISSourceImp
,VIIRSSourceImp
public interface ResamplingSourceImp
The ResamplingSourceImp
class provides an extra set
of query methods about the source transform in a resampling
operation.
- Since:
- 3.5.0
- Author:
- Peter Hollemans
-
Method Summary
Modifier and TypeMethodDescriptionGets a context object used to store state between subsequent calls toisValidNearestLocation(noaa.coastwatch.util.EarthLocation,noaa.coastwatch.util.DataLocation,java.lang.Object)
.int
Gets the width and height of the window to search for the next nearest location during resampling.boolean
Determines if a source data location is valid to be used in the resampling operation.boolean
isValidNearestLocation
(EarthLocation earthLoc, DataLocation nearestDataLoc, Object contextObj) Determines if the nearest source transform earth location is valid to be used for resampling to the specified destination earth location.
-
Method Details
-
isValidLocation
Determines if a source data location is valid to be used in the resampling operation.- Parameters:
loc
- the location to determine for use.- Returns:
- true if the location should be used, or false if not.
-
isValidNearestLocation
boolean isValidNearestLocation(EarthLocation earthLoc, DataLocation nearestDataLoc, Object contextObj) Determines if the nearest source transform earth location is valid to be used for resampling to the specified destination earth location. To be valid, the destination earth location must fall within the bounds of the pixel defined by the nearest source location.- Parameters:
earthLoc
- the destination earth location to check.nearestDataLoc
- the nearest source data location to the specified destination earth location.contextObj
- a context object obtained fromgetContext()
.- Returns:
- true if the destination location falls within the area of the nearest source location, or false if not.
-
getWindowSize
int getWindowSize()Gets the width and height of the window to search for the next nearest location during resampling. This is the window inside which the second nearest location may be found.- Returns:
- the window size in pixels.
-
getContext
Object getContext()Gets a context object used to store state between subsequent calls toisValidNearestLocation(noaa.coastwatch.util.EarthLocation,noaa.coastwatch.util.DataLocation,java.lang.Object)
.- Returns:
- the new context object.
-