Class ResamplingPreset
- java.lang.Object
-
- org.esa.snap.core.gpf.common.resample.ResamplingPreset
-
public class ResamplingPreset extends Object
Created by obarrile on 13/04/2019.
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILENAME_EXTENSION
static String
STRING_SEPARATOR
-
Constructor Summary
Constructors Constructor Description ResamplingPreset(String resamplingPresetName, ArrayList<BandResamplingPreset> bandResamplingPresets)
ResamplingPreset(String resamplingPresetName, BandResamplingPreset[] bandResamplingPresets)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BandResamplingPreset
getBandResamplingPreset(String bandName)
ArrayList<BandResamplingPreset>
getBandResamplingPresets()
String
getResamplingPresetName()
boolean
isCompatibleWithProduct(Product product)
static ResamplingPreset
loadResamplingPreset(File file)
Loads a resampling preset from the given filestatic ResamplingPreset
loadResamplingPreset(String string, String presetName)
Loads a resampling preset from an Stringboolean
saveToFile(File file)
Save the resampling preset to a fileboolean
saveToFile(File file, Product product)
Save resampling preset to a file, but copying only the bandresampling presets for the bands contained in product.
-
-
-
Field Detail
-
FILENAME_EXTENSION
public static final String FILENAME_EXTENSION
- See Also:
- Constant Field Values
-
STRING_SEPARATOR
public static final String STRING_SEPARATOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ResamplingPreset
public ResamplingPreset(String resamplingPresetName, ArrayList<BandResamplingPreset> bandResamplingPresets)
-
ResamplingPreset
public ResamplingPreset(String resamplingPresetName, BandResamplingPreset[] bandResamplingPresets)
-
-
Method Detail
-
loadResamplingPreset
public static ResamplingPreset loadResamplingPreset(File file) throws IOException
Loads a resampling preset from the given file- Parameters:
file
- the file- Returns:
- the resampling preset, never null
- Throws:
IOException
- if an I/O error occurs
-
loadResamplingPreset
public static ResamplingPreset loadResamplingPreset(String string, String presetName)
Loads a resampling preset from an String- Parameters:
string
- the string- Returns:
- the resampling preset, never null
-
getResamplingPresetName
public String getResamplingPresetName()
-
getBandResamplingPresets
public ArrayList<BandResamplingPreset> getBandResamplingPresets()
-
getBandResamplingPreset
public BandResamplingPreset getBandResamplingPreset(String bandName)
-
saveToFile
public boolean saveToFile(File file)
Save the resampling preset to a file- Parameters:
file
-- Returns:
- true if success
-
saveToFile
public boolean saveToFile(File file, Product product)
Save resampling preset to a file, but copying only the bandresampling presets for the bands contained in product.- Parameters:
file
-product
-- Returns:
-
isCompatibleWithProduct
public boolean isCompatibleWithProduct(Product product)
-
-