Determining Appropriate DBDB-V Subdataset

by OrangeWombat   Last Updated February 21, 2019 16:22 PM - source

I am using DBDB-V v6.2 and GDAL, specifically the dbdbv6_level0c.h5 HDF5 file and the GDAL 2.3.3 C# binaries.

Using these lines of code I can easily find the full list of Subdatasets used in the raster:

var path = @"F:\test\dbdbv6_level0c.h5";
var raster = Gdal.Open(path, Access.GA_ReadOnly);
var metadata = raster.GetMetadata("SUBDATASETS");

This produces an array of strings, pairs of which contain subdataset names and descriptions, for example:

SUBDATASET_150_DESC=[600x600] //geo/0.05000/229_543/depth (32-bit floating-point)

This then allows me to apply Gdal.Open(...) to any of Subdataset NAMEs and open up that particular raster for processing.

It can also be correlated with the basic metadata, which has information such as:


Note that 229_543 is the shared identifier between the Subdataset Name and the metadata, which provides the geographic coordinates of interest.

My question is, can I start with known geo coordinates (e.g., 24.75N 271.75E) and somehow determine that the correct Subdataset to open is the one identified with 229_543?

Please note, I am able to open the Subdataset just fine, but what I want is to be able to determine which Subdataset to open based on geo coordinates of interest, without having to iterate the entire metadata collection for every new coordinate of interest... ideally, some sort of algorithm that takes in geo coordinates and spits out DBDB-V Subdataset identifiers.

Tags : gdal osgeo hdf5

Related Questions

reprojecting a tif file

Updated December 01, 2017 07:22 AM

projecting INSAT3D L1B data from HDF5 to Geotiff

Updated August 31, 2017 05:22 AM