Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Fwd: Help needed! I am trying to convert the full disk HSD (Himawari Standard Data) file from Himawari-8 to a WGS84 TIFF. When using Satpy Scene, it only outputs a disk-shaped TIFF with an unknown geographic coordinate system. I need assistance from

35 views
Skip to first unread message

ll ll

unread,
Nov 29, 2024, 5:36:09 AM11/29/24
to pyt...@googlegroups.com


---------- 转发的邮件 ---------
发件人:ll ll <li1562...@gmail.com>
日期:2024年11月29日星期五UTC+8 10:40:53
主题:Help needed! I am trying to convert the full disk HSD (Himawari Standard Data) file from Himawari-8 to a WGS84 TIFF. When using Satpy Scene, it only outputs a disk-shaped TIFF with an unknown geographic coordinate system. I need assistance from expe
收件人: satpy.readers.ahi_hsd convert to wgs84 tif <satpyreadersahi_hsd-...@googlegroups.com>


import sys
from datetime import datetime
from datetime import timedelta
import glob
from satpy.scene import Scene
import numpy as np


scen = Scene(filenames=[r'**\HS_H08_20210309_0500_B01_FLDK_R10_S0110.DAT',
                        r'**\HS_H08_20210309_0500_B01_FLDK_R10_S0210.DAT',
                        r'**\HS_H08_20210309_0500_B01_FLDK_R10_S0310.DAT',
                        r'**\HS_H08_20210309_0500_B01_FLDK_R10_S0410.DAT',
                        r'**\HS_H08_20210309_0500_B01_FLDK_R10_S0510.DAT',
                        r'**\HS_H08_20210309_0500_B01_FLDK_R10_S0610.DAT',
                        r'**\HS_H08_20210309_0500_B01_FLDK_R10_S0710.DAT',
                        r'**\HS_H08_20210309_0500_B01_FLDK_R10_S0810.DAT',
                        r'**\HS_H08_20210309_0500_B01_FLDK_R10_S0910.DAT',
                        r'**\HS_H08_20210309_0500_B01_FLDK_R10_S1010.DAT',
                        ],
                        reader='ahi_hsd',
                        reader_kwargs={'mask_space': False})#reader_kwargs={'calib_mode': 'update'}
scen.load(['B01'])
scen.load(scen.available_dataset_ids())


# band_data = scen['B01'].compute()
# band_data_array = band_data.values
scen.save_datasets(writer='geotiff', dtype= np.float32, enhance= False, base_dir=r"**")
Snipaste_2024-11-29_10-40-29.png

Raspaud Martin

unread,
Nov 29, 2024, 7:59:52 AM11/29/24
to pyt...@googlegroups.com
Hi,

Can you check what gdal-info says about the file?

Best regards,
Martin
________________________________________
From: pyt...@googlegroups.com <pyt...@googlegroups.com> on behalf of ll ll <li1562...@gmail.com>
Sent: 29 November 2024 07:14:53
To: pyt...@googlegroups.com
Subject: [pytroll] Fwd: Help needed! I am trying to convert the full disk HSD (Himawari Standard Data) file from Himawari-8 to a WGS84 TIFF. When using Satpy Scene, it only outputs a disk-shaped TIFF with an unknown geographic coordinate system. I need assistan...
[Snipaste_2024-11-29_10-40-29.png]

--
You received this message because you are subscribed to the Google Groups "pytroll" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pytroll+u...@googlegroups.com<mailto:pytroll+u...@googlegroups.com>.
To view this discussion, visit https://groups.google.com/d/msgid/pytroll/8ebd83fb-5f9a-4ee9-be3c-c3bfb75c4eaen%40googlegroups.com<https://groups.google.com/d/msgid/pytroll/8ebd83fb-5f9a-4ee9-be3c-c3bfb75c4eaen%40googlegroups.com?utm_medium=email&utm_source=footer>.
Snipaste_2024-11-29_10-40-29.png

ll ll

unread,
Dec 4, 2024, 2:54:56 AM12/4/24
to pyt...@googlegroups.com
Thank you for your response, this is the information about the TIFF image mentioned earlier. I have been trying to project this TIFF to the WGS84 coordinate system, but I have not been successful, so I am seeking help here.

Driver: GTiff/GeoTIFF
Size: 11000 x 11000 (columns x rows)
Projection: PROJCS["unknown",GEOGCS["unknown",DATUM["unknown",SPHEROID["unknown",6378137,298.257024882273]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]],PROJECTION["Geostationary_Satellite"],PARAMETER["central_meridian",140.7],PARAMETER["satellite_height",35785863],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]
GeoTransform: (-5500000.035542117, 1000.0000064622031, 0.0, 5500000.035542117, 0.0, -1000.0000064622031)
Number of Bands: 1
Band Type: Float32
Band Size: 11000 x 11000
NoData Value: nan
Min Value: None, Max Value: None
Top-left corner (x, y): (-5500000.035542117, 5500000.035542117)
Pixel size (x, y): (1000.0000064622031, -1000.0000064622031)


From: pyt...@googlegroups.com <pyt...@googlegroups.com> on behalf of Raspaud Martin <martin....@smhi.se>
Sent: Friday, November 29, 2024 12:59 PM
To: pyt...@googlegroups.com <pyt...@googlegroups.com>
Subject: Re: [pytroll] Fwd: Help needed! I am trying to convert the full disk HSD (Himawari Standard Data) file from Himawari-8 to a WGS84 TIFF. When using Satpy Scene, it only outputs a disk-shaped TIFF with an unknown geographic coordinate system. I need assista
 
To unsubscribe from this group and stop receiving emails from it, send an email to pytroll+u...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pytroll/387bd0a704c14abd9b2757b04cfd4c68%40smhi.se.

Raspaud Martin

unread,
Dec 4, 2024, 3:11:25 AM12/4/24
to pyt...@googlegroups.com
OK so the geotiff has a crs with a projection defined, namely the geostationary projection. I understand you want that in lonlat projection, so you hade two choices:
- resample before you save to geotiff, with satpy: check the satpy documentation on how to do that
- or resample the geotiff you already have, with eg gdal_warp

Best regards
Martin
________________________________________
From: pyt...@googlegroups.com <pyt...@googlegroups.com> on behalf of ll ll <li1562...@gmail.com>
Sent: 02 December 2024 03:02:40
To: pyt...@googlegroups.com
To view this discussion, visit https://groups.google.com/d/msgid/pytroll/PUWP216MB2523195A1D55EC2ADB0805DDF5352%40PUWP216MB2523.KORP216.PROD.OUTLOOK.COM<https://groups.google.com/d/msgid/pytroll/PUWP216MB2523195A1D55EC2ADB0805DDF5352%40PUWP216MB2523.KORP216.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages