I want to extract AOD from the following hd5 file. My objective is to have a tif file projected in EPSG:4326 with values of all 3 bands.
This is its corressponding xml file
I used gdalinfo
on the file.
It's output is
Driver: HDF4/Hierarchical Data Format Release 4
Files: MCD19A2.A2018312.h24v06.006.2018314040314.hdf
Size is 512, 512
Coordinate System is `'
Metadata:
ADDITIONALLAYERS=4
ALGORITHMPACKAGEACCEPTANCEDATE=TBD
ALGORITHMPACKAGEMATURITYCODE=Preliminary
ALGORITHMPACKAGENAME=MOD_PR19
ALGORITHMPACKAGEVERSION=2.0
ASSOCIATEDINSTRUMENTSHORTNAME.1=MODIS
ASSOCIATEDINSTRUMENTSHORTNAME.2=MODIS
ASSOCIATEDPLATFORMSHORTNAME.1=Terra
ASSOCIATEDPLATFORMSHORTNAME.2=Aqua
ASSOCIATEDSENSORSHORTNAME.1=MODIS
ASSOCIATEDSENSORSHORTNAME.2=MODIS
AUTOMATICQUALITYFLAG.1=Passed
AUTOMATICQUALITYFLAGEXPLANATION.1=output file is created and good
CHARACTERISTICBINANGULARSIZE=30.0
CHARACTERISTICBINSIZE=926.625433055556
DATACOLUMNS=1200
DATAROWS=1200
DAYNIGHTFLAG=Day
DESCRREVISION=6.1
EASTBOUNDINGCOORDINATE=80.83866018158
EQUATORCROSSINGDATE.1=2018-11-08
EQUATORCROSSINGLONGITUDE.1=79.0841246879515
EQUATORCROSSINGTIME.1=05:14:00.440452
EXCLUSIONGRINGFLAG.1=N
GEOANYABNORMAL=False
GEOESTMAXRMSERROR=50.0
GLOBALGRIDCOLUMNS=43200
GLOBALGRIDROWS=21600
GRANULEBEGINNINGDATETIME=2018-11-08T05:05:00.000000Z, 2018-11-08T06:40:00.000000Z, 2018-11-08T06:45:00.000000Z
GRANULEDAYNIGHTFLAG=Day, Day, Day
GRANULEENDINGDATETIME=2018-11-08T05:10:00.000000Z, 2018-11-08T06:45:00.000000Z, 2018-11-08T06:50:00.000000Z
GRANULENUMBERARRAY=63, 82, 83, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
GRANULEPOINTERARRAY=0, 1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
GRINGPOINTLATITUDE.1=19.9322184266328, 30.0331140824394, 29.9992886587456, 19.9001686194037
GRINGPOINTLONGITUDE.1=63.6094781281049, 69.0252637066291, 80.8439676662222, 74.4928631354135
GRINGPOINTSEQUENCENO.1=1, 2, 3, 4
HDFEOSVersion=HDFEOS_V2.19
HORIZONTALTILENUMBER=24
identifier_product_doi=10.5067/MODIS/MCD19A2.006
identifier_product_doi=10.5067/MODIS/MCD19A2.006
identifier_product_doi_authority=http://dx.doi.org
identifier_product_doi_authority=http://dx.doi.org
INPUTPOINTER=MODMAIAC1km.A2018312.h24v06.006.2018314035425.hdf, MODMAIAChkm.A2018312.h24v06.006.2018314035439.hdf, MODMAIAC1kmGEO.A2018312.h24v06.006.2018314035444.hdf, MYDMAIAC1km.A2018312.h24v06.006.2018314033528.hdf, MYDMAIAChkm.A2018312.h24v06.006.2018314033537.hdf, MYDMAIAC1kmGEO.A2018312.h24v06.006.2018314033541.hdf
LOCALGRANULEID=MCD19A2.A2018312.h24v06.006.2018314040314.hdf
LOCALVERSIONID=SCF V6.0.32
LONGNAME=MODIS/Terra+Aqua Land Aerosol Optical Depth Daily L2G Global 1km SIN Grid
MAXIMUMLINEINDEX=1562, 2029, 873, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
MAXIMUMOBSERVATIONS=5
MAXIMUMSAMPLEINDEX=262, 1353, 1353, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
MINIMUMLINEINDEX=363, 1599, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
MINIMUMSAMPLEINDEX=0, 1198, 1116, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
NADIRDATARESOLUTION=1km
NORTHBOUNDINGCOORDINATE=29.9999999973059
NUMBEROFINPUTGRANULES=0
NUMBEROFOVERLAPGRANULES=3
ORBITNUMBER.1=100479
ORBITNUMBERARRAY=100479, 100480, 100480, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
Orbit_amount=3
Orbit_time_stamp=20183120505T 20183120645T 20183120815A
PARAMETERNAME.1=MODIS MAIAC file
PGEVERSION=6.0.41
PROCESSINGCENTER=GSFC
PRODUCTIONDATETIME=2018-11-10T04:03:14.000Z
QAPERCENTCLOUDCOVER.1=8
QAPERCENTGOODQUALITY=56
QAPERCENTINTERPOLATEDDATA.1=0
QAPERCENTMISSINGDATA.1=0
QAPERCENTOTHERQUALITY=36
QAPERCENTOUTOFBOUNDSDATA.1=36
RANGEBEGINNINGDATE=2018-11-08
RANGEBEGINNINGTIME=05:05:00.000000
RANGEENDINGDATE=2018-11-08
RANGEENDINGTIME=06:50:00.000000
REFERENCEORBITNUMBER=100479
REPROCESSINGACTUAL=reprocessed
REPROCESSINGPLANNED=further update is anticipated
SCIENCEQUALITYFLAG.1=Not Investigated
SCIENCEQUALITYFLAGEXPLANATION.1=See http://landweb.nascom.nasa.gov/cgi-bin/QA_WWW/qaFlagPage.cgi?sat=Terra+Aqua&ver=C6 for the product Science Quality status.
SHORTNAME=MCD19A2
SOUTHBOUNDINGCOORDINATE=19.9999999982039
SPSOPARAMETERS=END_OBJECT
TileID=51024006
TOTALADDITIONALOBSERVATIONS=1048973
TOTALOBSERVATIONS=7537634
VERSIONID=6
VERTICALTILENUMBER=06
WESTBOUNDINGCOORDINATE=63.8506663420923
Subdatasets:
SUBDATASET_1_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid1km:Optical_Depth_047
SUBDATASET_1_DESC=[3x1200x1200] Optical_Depth_047 grid1km (16-bit integer)
SUBDATASET_2_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid1km:Optical_Depth_055
SUBDATASET_2_DESC=[3x1200x1200] Optical_Depth_055 grid1km (16-bit integer)
SUBDATASET_3_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid1km:AOD_Uncertainty
SUBDATASET_3_DESC=[3x1200x1200] AOD_Uncertainty grid1km (16-bit integer)
SUBDATASET_4_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid1km:FineModeFraction
SUBDATASET_4_DESC=[3x1200x1200] FineModeFraction grid1km (16-bit integer)
SUBDATASET_5_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid1km:Column_WV
SUBDATASET_5_DESC=[3x1200x1200] Column_WV grid1km (16-bit integer)
SUBDATASET_6_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid1km:AOD_QA
SUBDATASET_6_DESC=[3x1200x1200] AOD_QA grid1km (16-bit unsigned integer)
SUBDATASET_7_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid1km:AOD_MODEL
SUBDATASET_7_DESC=[3x1200x1200] AOD_MODEL grid1km (8-bit unsigned integer)
SUBDATASET_8_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid1km:Injection_Height
SUBDATASET_8_DESC=[3x1200x1200] Injection_Height grid1km (32-bit floating-point)
SUBDATASET_9_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid5km:cosSZA
SUBDATASET_9_DESC=[3x240x240] cosSZA grid5km (16-bit integer)
SUBDATASET_10_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid5km:cosVZA
SUBDATASET_10_DESC=[3x240x240] cosVZA grid5km (16-bit integer)
SUBDATASET_11_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid5km:RelAZ
SUBDATASET_11_DESC=[3x240x240] RelAZ grid5km (16-bit integer)
SUBDATASET_12_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid5km:Scattering_Angle
SUBDATASET_12_DESC=[3x240x240] Scattering_Angle grid5km (16-bit integer)
SUBDATASET_13_NAME=HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid5km:Glint_Angle
SUBDATASET_13_DESC=[3x240x240] Glint_Angle grid5km (16-bit integer)
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 512.0)
Upper Right ( 512.0, 0.0)
Lower Right ( 512.0, 512.0)
Center ( 256.0, 256.0)
I want to get a GeoTiff projected in EPSG:4326.
I tried using
gdalwarp -t_srs "EPSG:4326" HDF4_EOS:EOS_GRID:"MCD19A2.A2018312.h24v06.006.2018314040314.hdf":grid1km:
Optical_Depth_055 test.tif
This gave me a tif file which i then visualized in QGIS. You will see a small greenish tint. It looks like the tile has minimized in size.
On checking out the layer properties :
How do i know if the raster is projected as it should have been?
Because when I change the layer properties to the following (Notice setting red band to Band 2)
I get this :
When I use SingleBand Pseudo Colour
for raster rendering :
I get this :
Can anyone explain what is going on and why the Raster expands on changing the RGB bands as any of the AOD Bands?