BaltradDex
BALTRAD Data Exchange System
Loading...
Searching...
No Matches
eu.baltrad.dex.db.util.BltDataProcessor Class Reference

Public Member Functions

 BltDataProcessor ()
 
Dataset getH5Dataset ()
 
Attribute getH5Attribute ()
 
H5File openH5File (String fileName) throws RuntimeException
 
void closeH5File (H5File h5File) throws RuntimeException
 
Group getH5Root (H5File h5File) throws RuntimeException
 
void getH5DatasetPaths (Group root, List< String > paths) throws RuntimeException
 
void getH5Dataset (Group root, String path) throws RuntimeException
 
void getH5Attribute (Group root, String groupPath, String attributeName) throws RuntimeException
 
Object getH5AttributeValue ()
 
BltAttribute findAttribute (Group root, String groupPath, String attributeName) throws RuntimeException
 
BufferedImage polar2Image (long nbins, double rscale, double nodata, double undetect, double offset, double gain, Dataset dataset, Color[] palette, int outputImageSize, boolean rangeRings, boolean rangeMask) throws RuntimeException
 
BufferedImage cart2Image (long width, long height, double noData, Dataset dataset, Color[] palette, int outputImageWidth, int outputImageHeight, boolean rangeMask) throws RuntimeException
 
Color[] createColorPalette (String fileName) throws RuntimeException
 
boolean saveImageToFile (BufferedImage image, String fileName) throws RuntimeException
 

Static Public Attributes

static final String H5_FILE_EXT = ".h5"
 
static final String IMAGE_FILE_EXT = ".png"
 
static final String H5_OBJECT_ATTR = "object"
 
static final String H5_QUANTITY_ATTR = "quantity"
 
static final String H5_NODATA_ATTR = "nodata"
 
static final String H5_UNDETECT_ATTR = "undetect"
 
static final String H5_OFFSET_ATTR = "offset"
 
static final String H5_GAIN_ATTR = "gain"
 
static final String H5_NBINS_ATTR = "nbins"
 
static final String H5_NRAYS_ATTR = "nrays"
 
static final String H5_RSCALE_ATTR = "rscale"
 
static final String H5_A1GATE_ATTR = "a1gate"
 
static final String H5_ELANGLE_ATTR = "elangle"
 
static final String H5_NODES_ATTR = "nodes"
 
static final String H5_PROJDEF_ATTR = "projdef"
 
static final String H5_LAT_0_ATTR = "lat"
 
static final String H5_LON_0_ATTR = "lon"
 
static final String H5_UL_LAT_ATTR = "UL_lat"
 
static final String H5_UL_LON_ATTR = "UL_lon"
 
static final String H5_UR_LAT_ATTR = "UR_lat"
 
static final String H5_UR_LON_ATTR = "UR_lon"
 
static final String H5_LR_LAT_ATTR = "LR_lat"
 
static final String H5_LR_LON_ATTR = "UR_lon"
 
static final String H5_LL_LAT_ATTR = "LL_lat"
 
static final String H5_LL_LON_ATTR = "LL_lon"
 
static final String H5_XSIZE_ATTR = "xsize"
 
static final String H5_YSIZE_ATTR = "ysize"
 
static final String H5_PATH_SEPARATOR = "/"
 
static final String H5_WHERE_GROUP_PREFIX = "where"
 
static final String H5_WHAT_GROUP_PREFIX = "what"
 
static final String H5_HOW_GROUP_PREFIX = "how"
 
static final String H5_DATASET_PREFIX = "dataset"
 
static final String DATASET_PATHS_KEY = "dataset_paths"
 
static final String GROUP_PATHS_KEY = "group_paths"
 
static final String ODIMH5_PVOL_OBJ = "PVOL"
 
static final String ODIMH5_CVOL_OBJ = "CVOL"
 
static final String ODIMH5_SCAN_OBJ = "SCAN"
 
static final String ODIMH5_RAY_OBJ = "RAY"
 
static final String ODIMH5_AZIM_OBJ = "AZIM"
 
static final String ODIMH5_IMAGE_OBJ = "IMAGE"
 
static final String ODIMH5_COMP_OBJ = "COMP"
 
static final String ODIMH5_XSEC_OBJ = "XSEC"
 
static final String ODIMH5_VP_OBJ = "VP"
 
static final String ODIMH5_PIC_OBJ = "PIC"
 
static final float DELTA_ANGLE = 0.004f
 
static final int RANGE_RINGS_DISTANCE = 50
 

Protected Member Functions

byte[] convertShortToByte (short[] polarData, long nbins, double nodata, double undetect, double offset, double gain)
 
byte[] convertIntToByte (int[] polarData, long nbins, double nodata, double undetect, double offset, double gain)
 

Detailed Description

Class implements radar data processing methods.

Author
Maciej Szewczykowski | macie.nosp@m.j@ba.nosp@m.ltrad.nosp@m..eu
Version
1.7.0
Since
0.1.6

Constructor & Destructor Documentation

◆ BltDataProcessor()

eu.baltrad.dex.db.util.BltDataProcessor.BltDataProcessor ( )
inline

Default constructor.

Member Function Documentation

◆ cart2Image()

BufferedImage eu.baltrad.dex.db.util.BltDataProcessor.cart2Image ( long width,
long height,
double noData,
Dataset dataset,
Color[] palette,
int outputImageWidth,
int outputImageHeight,
boolean rangeMask ) throws RuntimeException
inline

Transform Cartesian dataset into image.

Parameters
widthDataset width
heightDataset height
noDataOut of range areas
datasetDataset
paletteColor palette
outputImageWidthOutput image width
outputImageHeightOutput image height
Returns
Cartesian image
Exceptions
RuntimeException

◆ closeH5File()

void eu.baltrad.dex.db.util.BltDataProcessor.closeH5File ( H5File h5File) throws RuntimeException
inline

Close HDF5 file.

Parameters
h5FileH5File object
Exceptions
Runtimeexception

◆ createColorPalette()

Color[] eu.baltrad.dex.db.util.BltDataProcessor.createColorPalette ( String fileName) throws RuntimeException
inline

Creates color palette from file.

Parameters
fileNameAbsolute path to palette file
Returns
palette Color palette
Exceptions
Runtimeexception

◆ getH5Attribute() [1/2]

Attribute eu.baltrad.dex.db.util.BltDataProcessor.getH5Attribute ( )
inline

Get HDF5 attribute object.

Returns
Attribute object

◆ getH5Attribute() [2/2]

void eu.baltrad.dex.db.util.BltDataProcessor.getH5Attribute ( Group root,
String groupPath,
String attributeName ) throws RuntimeException
inline

Gets HDF5 attribute identified by path and name.

Parameters
rootHDF5 file's root group
groupPathPath pointing to a given group
attributeNameAttribute's name
Exceptions
Runtimeexception

◆ getH5AttributeValue()

Object eu.baltrad.dex.db.util.BltDataProcessor.getH5AttributeValue ( )
inline

Gets attribute value.

Returns
Attribute value

◆ getH5Dataset() [1/2]

Dataset eu.baltrad.dex.db.util.BltDataProcessor.getH5Dataset ( )
inline

Get HDF5 dataset object.

Returns
Dataset object

◆ getH5Dataset() [2/2]

void eu.baltrad.dex.db.util.BltDataProcessor.getH5Dataset ( Group root,
String path ) throws RuntimeException
inline

Seeks for a given dataset in HDF5 file

Parameters
rootHDF5 file's root group
pathDataset path
Exceptions
Runtimeexception

◆ getH5DatasetPaths()

void eu.baltrad.dex.db.util.BltDataProcessor.getH5DatasetPaths ( Group root,
List< String > paths ) throws RuntimeException
inline

Parses HDF5 file.

Parameters
rootHDF5 file's root group
pathsDataset paths
Exceptions
Runtimeexception

◆ getH5Root()

Group eu.baltrad.dex.db.util.BltDataProcessor.getH5Root ( H5File h5File) throws RuntimeException
inline

Gets reference to HDF5 file's root group.

Parameters
h5FileHDF5 file object
Returns
HDF5 file's root group
Exceptions
Runtimeexception

◆ openH5File()

H5File eu.baltrad.dex.db.util.BltDataProcessor.openH5File ( String fileName) throws RuntimeException
inline

Open HDF5 file.

Parameters
nameFile name
Returns
H5File object if successful
Exceptions
Runtimeexception

◆ polar2Image()

BufferedImage eu.baltrad.dex.db.util.BltDataProcessor.polar2Image ( long nbins,
double rscale,
double nodata,
double undetect,
double offset,
double gain,
Dataset dataset,
Color[] palette,
int outputImageSize,
boolean rangeRings,
boolean rangeMask ) throws RuntimeException
inline

Transform polar dataset into Cartesian image.

Parameters
nbinsNumber of range samples per ray
rscaleRange sample size in meters
datasetPolar dataset
paletteColor palette
outputImageSizeOutput image size
rangeRingsRange rings toggle
rangeMaskRange mask toggle
Returns
Cartesian image
Exceptions
RuntimeException

◆ saveImageToFile()

boolean eu.baltrad.dex.db.util.BltDataProcessor.saveImageToFile ( BufferedImage image,
String fileName ) throws RuntimeException
inline

Saves product image to PNG file.

Parameters
imageSource image
fileNameOutput file name
Returns
True upon success
Exceptions
Runtimeexception

The documentation for this class was generated from the following file: