[gdal-dev] Process Sentinel-5p netCDF to tiff files but overlapping appears clearly between 2 files?
Pham Huu, Bang
B.PhamHuu at jacobs-university.de
Tue Nov 9 22:21:54 PST 2021
Did someone have the same issue to process Sentinel 5p to tiff file with gdal as well?
** The overlapping image on QGIS 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
Best,
________________________________
From: Pham Huu, Bang
Sent: Monday, November 8, 2021 07:09
To: gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
Subject: Process Sentinel-5p netCDF to tiff files but overlapping appears clearly between 2 files?
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
<VRTDataset rasterXSize="450" rasterYSize="3735">
<Metadata domain="GEOLOCATION">
<MDI key="LINE_OFFSET">0</MDI>
<MDI key="LINE_STEP">1</MDI>
<MDI key="PIXEL_OFFSET">0</MDI>
<MDI key="PIXEL_STEP">1</MDI>
<MDI key="X_BAND">1</MDI>
<MDI
key="X_DATASET">/home/PROJECTS/Sentinel-5P/test_L2_AER_AI/lon.vrt</MDI>
<MDI key="Y_BAND">1</MDI>
<MDI
key="Y_DATASET">/home/PROJECTS/Sentinel-5P/test_L2_AER_AI/lat.vrt</MDI>
</Metadata>
<VRTRasterBand dataType="Float32" band="1">
<Metadata>
<MDI key="STATISTICS_MAXIMUM">9.9692099683869e+36</MDI>
<MDI key="STATISTICS_MEAN">7.78603750784e+35</MDI>
<MDI key="STATISTICS_MINIMUM">-7.209698677063</MDI>
<MDI key="STATISTICS_STDDEV">2.6750402750247e+36</MDI>
</Metadata>
<SimpleSource>
<SourceFilename
relativeToVRT="1">HDF5:S5P_OFFL_L2__AER_AI_20210501T110005_20210501T124135_18388_01_010400_20210503T005051.nc://PRODUCT/aerosol_index_340_380</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="450" RasterYSize="3735"
DataType="Float32" BlockXSize="225" BlockYSize="1868" />
<SrcRect xOff="0" yOff="0" xSize="450" ySize="3735" />
<DstRect xOff="0" yOff="0" xSize="450" ySize="3735" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211110/355ee396/attachment.html>
More information about the gdal-dev
mailing list