public class MultiSpectralDataSource extends HydraDataSource
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,MultiSpectralData> |
adapterMap |
protected MultiDimensionAdapter[] |
adapters |
private java.util.List |
categories |
private ComboDataChoice |
comboChoice |
private static int |
count |
private static java.lang.String |
DATA_DESCRIPTION |
private java.util.Map<java.lang.String,double[]> |
defaultSubset |
private boolean |
doAggregation |
protected java.lang.String |
filename
Sources file
|
private boolean |
hasChannelSelect |
private boolean |
hasImagePreview |
private static org.slf4j.Logger |
logger |
private MultiSpectralData |
multiSpectData |
private java.util.List<MultiSpectralData> |
multiSpectData_s |
static java.lang.String |
paramKey |
private FlatField |
previewImage |
private PreviewSelection |
previewSelection |
protected MultiDimensionReader |
reader |
private SpectrumAdapter |
spectrumAdapter |
private SwathAdapter |
swathAdapter |
oldSourceFromBundles, request, sourceschangeDataPathsCbx, dataCacheKey, dataChoices, geoSelectionPanel, haveBeenUnPersisted, okToContinue, PARAM_SHOW_HIDE, PARAM_SHOW_NO, PARAM_SHOW_YESDATAPATH_DATE_FORMAT, DATAPATH_DATE_PATTERN, MOST_RECENT, ordinalNames, PROP_AUTOCREATEDISPLAY, PROP_BASEDIRECTORY, PROP_CACHEABLE, PROP_DATACHOICENAME, PROP_DISPLAYPROPERTIES, PROP_DOCUMENTLINKS, PROP_FILEPATTERN, PROP_GEOLOCATION, PROP_ICON, PROP_NAME, PROP_POLLINFO, PROP_RESOLVERURL, PROP_SERVICE_HTTP, PROP_SUBPROPERTIES, PROP_TIMELABELS, PROP_TITLE| Constructor and Description |
|---|
MultiSpectralDataSource()
Zero-argument constructor for construction via unpersistence.
|
MultiSpectralDataSource(ucar.unidata.data.DataSourceDescriptor descriptor,
java.util.List newSources,
java.util.Hashtable properties)
Construct a new HYDRA hdf data source.
|
MultiSpectralDataSource(ucar.unidata.data.DataSourceDescriptor descriptor,
java.lang.String fileName,
java.util.Hashtable properties)
Construct a new HYDRA hdf data source.
|
MultiSpectralDataSource(java.lang.String fileName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChoice(java.lang.String name,
Data data) |
protected Data |
applyProperties(Data data,
java.util.Hashtable requestProperties,
java.util.Map<java.lang.String,double[]> subset) |
private ucar.unidata.data.DataChoice |
doMakeDataChoice(int idx,
MultiSpectralData adapter) |
void |
doMakeDataChoices()
Make and insert the
DataChoices for this DataSource. |
boolean |
equals(java.lang.Object o)
Check to see if this
HDFHydraDataSource is equal to the object
in question. |
ComboDataChoice |
getComboDataChoice() |
Data |
getData(ucar.unidata.data.DataChoice dataChoice,
ucar.unidata.data.DataCategory category,
ucar.unidata.data.DataSelection dataSelection,
java.util.Hashtable requestProperties) |
Data |
getData(java.lang.String name,
java.util.Map<java.lang.String,double[]> subset)
public HashMap getSubsetFromLonLatRect(MultiDimensionSubset select, GeoSelection geoSelection) {
GeoLocationInfo ginfo = geoSelection.getBoundingBox();
return adapters[0].getSubsetFromLonLatRect(select.getSubset(), ginfo.getMinLat(), ginfo.getMaxLat(),
ginfo.getMinLon(), ginfo.getMaxLon());
}
|
protected Data |
getDataInner(ucar.unidata.data.DataChoice dataChoice,
ucar.unidata.data.DataCategory category,
ucar.unidata.data.DataSelection dataSelection,
java.util.Hashtable requestProperties)
Get the data for the given DataChoice and selection criteria.
|
java.util.List |
getDataPaths()
Called by the IDV's persistence manager in an effort to collect all of
the files that should be included in a zipped bundle.
|
static MapProjection |
getDataProjection(FlatField fltField) |
MapProjection |
getDataProjection(java.util.Map<java.lang.String,double[]> subset) |
java.lang.String |
getDatasetName() |
MultiSpectralData |
getMultiSpectralData() |
MultiSpectralData |
getMultiSpectralData(ucar.unidata.data.DataChoice choice) |
MultiSpectralData |
getMultiSpectralData(int idx) |
MultiSpectralData |
getMultiSpectralData(java.lang.String name) |
static MapProjection |
getSwathProjection(FlatField image,
float[][] corners) |
void |
initAfterUnpersistence() |
protected void |
initDataSelectionComponents(java.util.List<ucar.unidata.data.DataSelectionComponent> components,
ucar.unidata.data.DataChoice dataChoice) |
static Linear2DSet |
makeGrid(MapProjection mp,
double res) |
static Linear2DSet |
makeGrid(MapProjection mp,
float[][] corners,
float res) |
void |
setDatasetName(java.lang.String name) |
void |
setup() |
static FlatField |
swathToGrid(Linear2DSet grid,
FlatField[] swaths,
double mode)
Resolution of grid should match the loweset of swaths.
|
static FlatField |
swathToGrid(Linear2DSet grid,
FlatField[] swaths,
RealTupleType newRangeType,
double mode)
Resolution of grid should match the loweset of swaths.
|
static FlatField |
swathToGrid(Linear2DSet grid,
FlatField swath,
double mode)
Grid and swath must both have a CoordinateSystem with an Earth Reference.
|
static boolean |
validLonLat(float[][] lonlat) |
addPropertiesTabs, canSaveDataToLocalDisk, clearCachedData, doMakeDateTimes, getAdapters, isFileBasedaddActions, addDataChangeListener, addDataChoice, addReloadTab, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canAddCurrentName, canCacheDataToDisk, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, doRemove, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, getCache, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDefaultSave, getDescription, getDescriptor, getErrorMessage, getEverChangedName, getExtraGeoSelectionComponent, getExtraTimesComponent, getFileFilterForPolling, getFullDescription, getid, getIdv, getInError, getLocalDirectory, getLocationForPolling, getLocationsForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPartialDescription, getPassword, getPathsThatCanBeRelative, getPollingInfo, getProperties, getPropertiesComponents, getPropertiesHeader, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRelativePaths, getSampleDataProjection, getSaveDataFileLabel, getSelectedDateTimes, getSelectedDateTimes, getTimesFromDataSelection, getTmpPaths, getTypeName, getUserName, handlePropertiesAction, hasPollingInfo, holdsDateTimes, holdsIndices, identifiedBy, identifiedByName, incrOutstandingGetDataCalls, initAfter, initAfterCreation, initDataChoice, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFileFromPolling, newFilesFromPolling, notifyDataChange, propertiesChanged, putCache, putCache, reloadData, reloadData, reloadProperties, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, saveDataToLocalDisk, selectTimesFromList, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDefaultSave, setDescription, setDescriptor, setDirectory, setEverChangedName, setInError, setInError, setInError, setName, setNewFiles, setObjectProperties, setObjectProperty, setPassword, setPollingInfo, setPollLocation, setProperties, setProperty, setProperty, setRelativePaths, setTemplateName, setTmpPaths, setUserName, shouldCache, shouldCache, showPasswordDialog, showPropertiesDialog, showPropertiesDialog, showPropertiesDialog, showWaitDialog, tick, toString, toStringTruncated, updateDetailsText, updateState, writeFieldMaskFile, writeFieldMaskFileapplySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialogprivate static final org.slf4j.Logger logger
protected java.lang.String filename
protected MultiDimensionReader reader
protected MultiDimensionAdapter[] adapters
private static final java.lang.String DATA_DESCRIPTION
private java.util.Map<java.lang.String,double[]> defaultSubset
private SwathAdapter swathAdapter
private SpectrumAdapter spectrumAdapter
private MultiSpectralData multiSpectData
private java.util.List<MultiSpectralData> multiSpectData_s
private java.util.Map<java.lang.String,MultiSpectralData> adapterMap
private java.util.List categories
private boolean hasImagePreview
private boolean hasChannelSelect
private boolean doAggregation
private ComboDataChoice comboChoice
private PreviewSelection previewSelection
private FlatField previewImage
public static final java.lang.String paramKey
private static int count
public MultiSpectralDataSource()
public MultiSpectralDataSource(java.lang.String fileName) throws VisADException
VisADExceptionpublic MultiSpectralDataSource(ucar.unidata.data.DataSourceDescriptor descriptor, java.lang.String fileName, java.util.Hashtable properties) throws VisADException
descriptor - descriptor for this DataSourcefileName - name of the hdf file to readproperties - hashtable of propertiesVisADException - problem creating datapublic MultiSpectralDataSource(ucar.unidata.data.DataSourceDescriptor descriptor, java.util.List newSources, java.util.Hashtable properties) throws VisADException
descriptor - descriptor for this DataSourcenewSources - List of filenamesproperties - hashtable of propertiesVisADException - problem creating datapublic void setup() throws java.lang.Exception
java.lang.Exceptionpublic void initAfterUnpersistence()
initAfterUnpersistence in interface ucar.unidata.data.DataSourceinitAfterUnpersistence in class ucar.unidata.data.DataSourceImplpublic void doMakeDataChoices()
DataChoices for this DataSource.doMakeDataChoices in class ucar.unidata.data.DataSourceImplprivate ucar.unidata.data.DataChoice doMakeDataChoice(int idx, MultiSpectralData adapter) throws java.lang.Exception
java.lang.Exceptionpublic boolean equals(java.lang.Object o)
HDFHydraDataSource is equal to the object
in question.equals in class ucar.unidata.data.DataSourceImplo - object in questionpublic MultiSpectralData getMultiSpectralData()
public MultiSpectralData getMultiSpectralData(ucar.unidata.data.DataChoice choice)
public MultiSpectralData getMultiSpectralData(java.lang.String name)
public MultiSpectralData getMultiSpectralData(int idx)
public java.lang.String getDatasetName()
public void setDatasetName(java.lang.String name)
public ComboDataChoice getComboDataChoice()
public java.util.List getDataPaths()
getDataPaths in interface ucar.unidata.data.DataSourcegetDataPaths in class ucar.unidata.data.DataSourceImplpublic Data getData(java.lang.String name, java.util.Map<java.lang.String,double[]> subset) throws VisADException, java.rmi.RemoteException
VisADExceptionjava.rmi.RemoteExceptionpublic Data getData(ucar.unidata.data.DataChoice dataChoice, ucar.unidata.data.DataCategory category, ucar.unidata.data.DataSelection dataSelection, java.util.Hashtable requestProperties) throws VisADException, java.rmi.RemoteException
getData in interface ucar.unidata.data.DataSourcegetData in class ucar.unidata.data.DataSourceImplVisADExceptionjava.rmi.RemoteExceptionprotected Data getDataInner(ucar.unidata.data.DataChoice dataChoice, ucar.unidata.data.DataCategory category, ucar.unidata.data.DataSelection dataSelection, java.util.Hashtable requestProperties) throws VisADException, java.rmi.RemoteException
HydraDataSourcegetDataInner in class HydraDataSourcedataChoice - DataChoice for selectioncategory - DataCategory for the DataChoice (not used)dataSelection - subsetting criteriarequestProperties - extra request propertiesVisADException - couldn't create the datajava.rmi.RemoteException - couldn't create a remote data objectpublic MapProjection getDataProjection(java.util.Map<java.lang.String,double[]> subset)
protected Data applyProperties(Data data, java.util.Hashtable requestProperties, java.util.Map<java.lang.String,double[]> subset) throws VisADException, java.rmi.RemoteException
VisADExceptionjava.rmi.RemoteExceptionprotected void initDataSelectionComponents(java.util.List<ucar.unidata.data.DataSelectionComponent> components, ucar.unidata.data.DataChoice dataChoice)
initDataSelectionComponents in class ucar.unidata.data.DataSourceImplpublic static MapProjection getDataProjection(FlatField fltField) throws java.lang.Exception
java.lang.Exceptionpublic static MapProjection getSwathProjection(FlatField image, float[][] corners) throws VisADException, java.rmi.RemoteException
VisADExceptionjava.rmi.RemoteExceptionpublic static Linear2DSet makeGrid(MapProjection mp, double res) throws java.lang.Exception
java.lang.Exceptionpublic static Linear2DSet makeGrid(MapProjection mp, float[][] corners, float res) throws java.lang.Exception
java.lang.Exceptionpublic static FlatField swathToGrid(Linear2DSet grid, FlatField[] swaths, double mode) throws java.lang.Exception
grid - the new domain (target of reproject).swaths - one or more swaths to be reprojected.mode - See ReprojectSwath for details.java.lang.Exceptionpublic static FlatField swathToGrid(Linear2DSet grid, FlatField[] swaths, RealTupleType newRangeType, double mode) throws java.lang.Exception
grid - the new domain (target of reproject).swaths - one or more swaths to be reprojected.newRangeType - user must supply.mode - See ReprojectSwath for details.java.lang.Exceptionpublic static FlatField swathToGrid(Linear2DSet grid, FlatField swath, double mode) throws java.lang.Exception
grid - the new domain (target of reproject).swath - swath to be reprojected.mode - See ReprojectSwath for details.java.lang.Exceptionpublic static boolean validLonLat(float[][] lonlat)