Package org.esa.snap.core.datamodel
Class ConstantTimeCoding
- java.lang.Object
-
- org.esa.snap.core.datamodel.ConstantTimeCoding
-
- All Implemented Interfaces:
TimeCoding
public class ConstantTimeCoding extends Object implements TimeCoding
Time coding which returns a constant value.
-
-
Constructor Summary
Constructors Constructor Description ConstantTimeCoding(double time)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canGetPixelPos()
Determines whether thisTimeCoding
is capable of converting time values into pixel positions.double
getMJD(PixelPos pixelPos)
Gets the time for a given pixel position as Modified Julian Day 2000 (MJD2000).PixelPos
getPixelPos(double mjd, PixelPos pixelPos)
Gets a pixel position associated with a time value given as Modified Julian Day 2000 (MJD2000).
-
-
-
Method Detail
-
getMJD
public double getMJD(PixelPos pixelPos)
Description copied from interface:TimeCoding
Gets the time for a given pixel position as Modified Julian Day 2000 (MJD2000).- Specified by:
getMJD
in interfaceTimeCoding
- Parameters:
pixelPos
- The pixel position in units of a given raster data node- Returns:
- The time as Modified Julian Day 2000 (MJD2000).
- See Also:
ProductData.UTC.getMJD()
,TimeCoding.getPixelPos(double, PixelPos)
-
canGetPixelPos
public boolean canGetPixelPos()
Description copied from interface:TimeCoding
Determines whether thisTimeCoding
is capable of converting time values into pixel positions.- Specified by:
canGetPixelPos
in interfaceTimeCoding
- Returns:
true
, if so.- See Also:
TimeCoding.getPixelPos(double, PixelPos)
-
getPixelPos
public PixelPos getPixelPos(double mjd, PixelPos pixelPos)
Description copied from interface:TimeCoding
Gets a pixel position associated with a time value given as Modified Julian Day 2000 (MJD2000).- Specified by:
getPixelPos
in interfaceTimeCoding
- Parameters:
mjd
- The time as Modified Julian Day 2000 (MJD2000).pixelPos
- The pixel position to be modified and returned. Ifnull
a new instance will be created and returned.- Returns:
- The pixel position, or
null
if thisTimeCoding
cannot compute pixel positions from time values. - See Also:
TimeCoding.canGetPixelPos()
,TimeCoding.getMJD(PixelPos)
-
-