Hello,
I've used 2 Sentinel-5p scenes in hdf5 / netCDF to geoTiff by gdal
version 2.2.4 like example below:
First, I extract the lat and lon coordinates from one HDF5 file
gdal_translate -of VRT
HDF5:"S5P_OFFL_L2__AER_AI_20210501T110005_20210501T124135_18388_01_010400_20210503T005051.nc"://PRODUCT/latitude
lat.vrt
gdal_translate -of VRT
HDF5:"S5P_OFFL_L2__AER_AI_20210501T110005_20210501T124135_18388_01_010400_20210503T005051.nc"://PRODUCT/longitude
lon.vrt
Then, I create the product.vrt like below
0
1
0
1
1
/home/PROJECTS/Sentinel-5P/test_L2_AER_AI/lon.vrt
1
/home/PROJECTS/Sentinel-5P/test_L2_AER_AI/lat.vrt
9.9692099683869e+36
7.78603750784e+35
-7.209698677063
2.6750402750247e+36
HDF5:S5P_OFFL_L2__AER_AI_20210501T110005_20210501T124135_18388_01_010400_20210503T005051.nc://PRODUCT/aerosol_index_340_380
1
And finally, I extract the data inside the HDF5 to geoTiff and project
it to EPSG:4326 CRS.
gdalwarp -geoloc -t_srs EPSG:4326 -srcnodata 9.96921e+36f
product.vrt aerosol_index_340_380.tiff -tr 0.069 0.069 -tap -of GTiff
I did that for 2 files which are neighbor to extract the wanted
sub_dataset to tiff files and then opened them on QGIS.
** The image looks like below https://imgur.com/uu6pS5n
** The two extracted tiff files can be found from
https://drive.google.com/drive/folders/1lOXyJXhhzmfs5e_WTsKPOj96CHEEIyhP?usp=sharing
I wonder, why there are clear borders (the line in the middle) between
the 2 overlapping files?
Thanks,
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev