Package noaa.coastwatch.util.sensor
Class GenericSourceImp
java.lang.Object
noaa.coastwatch.util.sensor.GenericSourceImp
- All Implemented Interfaces:
ResamplingSourceImp
- Direct Known Subclasses:
AVHRRSourceImp
,MODISSourceImp
The GenericSourceImp
helps resample generic sensor
satellite data.
- Since:
- 3.5.0
- Author:
- Peter Hollemans
-
Constructor Summary
ModifierConstructorDescriptionprotected
GenericSourceImp
(EarthTransform sourceTrans) Creates a new Generic resampling helper using the specified transform. -
Method Summary
Modifier and TypeMethodDescriptionGets a context object used to store state between subsequent calls toResamplingSourceImp.isValidNearestLocation(noaa.coastwatch.util.EarthLocation,noaa.coastwatch.util.DataLocation,java.lang.Object)
.static GenericSourceImp
getInstance
(EarthTransform sourceTrans) Creates a new generic resampling helper using the specified transform.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.
-
Constructor Details
-
GenericSourceImp
Creates a new Generic resampling helper using the specified transform.- Parameters:
sourceTrans
- the source transform to use for Generic swath location data.
-
-
Method Details
-
getInstance
Creates a new generic resampling helper using the specified transform.- Parameters:
sourceTrans
- the source transform to use for generic swath location data.- Returns:
- the new resampling helper.
-
isValidLocation
Description copied from interface:ResamplingSourceImp
Determines if a source data location is valid to be used in the resampling operation.- Specified by:
isValidLocation
in interfaceResamplingSourceImp
- Parameters:
loc
- the location to determine for use.- Returns:
- true if the location should be used, or false if not.
-
getWindowSize
public int getWindowSize()Description copied from interface:ResamplingSourceImp
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.- Specified by:
getWindowSize
in interfaceResamplingSourceImp
- Returns:
- the window size in pixels.
-
getContext
Description copied from interface:ResamplingSourceImp
Gets a context object used to store state between subsequent calls toResamplingSourceImp.isValidNearestLocation(noaa.coastwatch.util.EarthLocation,noaa.coastwatch.util.DataLocation,java.lang.Object)
.- Specified by:
getContext
in interfaceResamplingSourceImp
- Returns:
- the new context object.
-
isValidNearestLocation
public boolean isValidNearestLocation(EarthLocation earthLoc, DataLocation nearestDataLoc, Object contextObj) Description copied from interface:ResamplingSourceImp
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.- Specified by:
isValidNearestLocation
in interfaceResamplingSourceImp
- 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 fromResamplingSourceImp.getContext()
.- Returns:
- true if the destination location falls within the area of the nearest source location, or false if not.
-