Stackexchange,
I am looking at
ftp://ladsftp.nascom.nasa.gov/allDa..._L2.A2012222.0800.006.2015062054108.hdfTrying to get the SDS (in WGS84 Projection and as GeoTiff):
HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cloud_Mask_1kmFor some reasons the MRTSwathTool is not an option.
How do I do this?
I think the following questions are close to mine, but I could not figure it out:https://trac.osgeo.org/gdal/ticket/1900How to reproject MODIS Swath data to WGS84
My approach so far:
gdalinfo MOD06_L2.A2012222.0800.006.2015062054108.hdf >> test.logNow I find the SDS of interesst:
SUBDATASET_14_NAME=HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Brightness_TemperatureSUBDATASET_14_DESC=[7x406x270] Brightness_Temperature mod06 (16-bit integer)
SUBDATASET_107_NAME=HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cirrus_ReflectanceSUBDATASET_107_DESC=[2030x1354] Cirrus_Reflectance mod06 (16-bit integer)
SUBDATASET_111_NAME=HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cloud_Mask_1kmSUBDATASET_111_DESC=[2030x1354x2] Cloud_Mask_1km mod06 (8-bit integer)
Ok nice SDS lets extract them:
gdalwarp -t_srs EPSG:4326 -of GTIFF HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Brightness_Temperature Brightness_Temperature.tifgdalwarp -t_srs EPSG:4326 -of GTIFF HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cirrus_Reflectance Cirrus_Reflectance.tifgdalwarp -t_srs EPSG:4326 -of GTIFF HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cloud_Mask_1km Cloud_Mask_1km.tifFirst and second one terminates. The third one however gives the following error:
ERROR 1: Unable to compute a transformation between pixel/line and georeferenced coordinates for HDF4_EOS:EOS_SWATH:MOD06_L2.A2012222.0800.006.2015062054108.hdf:mod06:Cloud_Mask_1km. There is no affine transformation and no GCPs.If I look at the results:
First Problem: GDAL thinks that SDS14 consists of 7 Bands a 406x270, which is right. Less right is that it thinks SDS111 consists of 2030 Bands a 1354x2... (see support ticket)
Second Problem: Gdal makes the pixel size of SDS14 and SDS107 identical even though this is not the case. Pixel Size is supposed to be 1km or 5km.
Third Problem: The projection is somewhat off. Everything seem to be shifted west.
My last problem has been answered quickly and competently, thank you for that. I have high hopes, somebody can help me with this question as well.
Thanks Timm
أكثر...
I am looking at
ftp://ladsftp.nascom.nasa.gov/allDa..._L2.A2012222.0800.006.2015062054108.hdfTrying to get the SDS (in WGS84 Projection and as GeoTiff):
HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cloud_Mask_1kmFor some reasons the MRTSwathTool is not an option.
How do I do this?
I think the following questions are close to mine, but I could not figure it out:https://trac.osgeo.org/gdal/ticket/1900How to reproject MODIS Swath data to WGS84
My approach so far:
gdalinfo MOD06_L2.A2012222.0800.006.2015062054108.hdf >> test.logNow I find the SDS of interesst:
SUBDATASET_14_NAME=HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Brightness_TemperatureSUBDATASET_14_DESC=[7x406x270] Brightness_Temperature mod06 (16-bit integer)
SUBDATASET_107_NAME=HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cirrus_ReflectanceSUBDATASET_107_DESC=[2030x1354] Cirrus_Reflectance mod06 (16-bit integer)
SUBDATASET_111_NAME=HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cloud_Mask_1kmSUBDATASET_111_DESC=[2030x1354x2] Cloud_Mask_1km mod06 (8-bit integer)
Ok nice SDS lets extract them:
gdalwarp -t_srs EPSG:4326 -of GTIFF HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Brightness_Temperature Brightness_Temperature.tifgdalwarp -t_srs EPSG:4326 -of GTIFF HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cirrus_Reflectance Cirrus_Reflectance.tifgdalwarp -t_srs EPSG:4326 -of GTIFF HDF4_EOS:EOS_SWATH:"MOD06_L2.A2012222.0800.006.2015062054108.hdf":mod06:Cloud_Mask_1km Cloud_Mask_1km.tifFirst and second one terminates. The third one however gives the following error:
ERROR 1: Unable to compute a transformation between pixel/line and georeferenced coordinates for HDF4_EOS:EOS_SWATH:MOD06_L2.A2012222.0800.006.2015062054108.hdf:mod06:Cloud_Mask_1km. There is no affine transformation and no GCPs.If I look at the results:
First Problem: GDAL thinks that SDS14 consists of 7 Bands a 406x270, which is right. Less right is that it thinks SDS111 consists of 2030 Bands a 1354x2... (see support ticket)
Second Problem: Gdal makes the pixel size of SDS14 and SDS107 identical even though this is not the case. Pixel Size is supposed to be 1km or 5km.
Third Problem: The projection is somewhat off. Everything seem to be shifted west.
My last problem has been answered quickly and competently, thank you for that. I have high hopes, somebody can help me with this question as well.
Thanks Timm
أكثر...