Hello,
Is there any way to project to product I get with VIIRS EDR(NDVI, LST, SURREF...), I tried to use gdal with vrt files, GMTCO and GITCO files that I get using the VIIRS SDR tool, that works sometime and sometime not.
VIIRS EDR PROJECTION
Re: VIIRS EDR PROJECTION
Can you clarify, what are vrt files? What file format are they and where did you get them?
Geoff P. Cureton, PhD
Cooperative Institute for Meteorological Satellite Studies
University of Wisconsin-Madison
1225 W. Dayton St.
Madison WI 53706, USA
Phone: +1 608 890 0706
Cooperative Institute for Meteorological Satellite Studies
University of Wisconsin-Madison
1225 W. Dayton St.
Madison WI 53706, USA
Phone: +1 608 890 0706
Re: VIIRS EDR PROJECTION
Hello,
I used the CSPP VIIRS EDR tool, that is used to convert the VIIRS Sensor Data Records(SDR) to Data Environment Records (EDR), by using this tool I had different products like NDVI, Surface Reflectance, Land Surface Temperature as hdf5 files, but they are not projected, so I used this two commands based on gdal so I can get them as geotiff images:
1.gdal_translate -of VRT HDF5:IVISR_npp_d20150419_t1400325_e1401567_b18007_c20161130133638402235_cspp_dev.h5://All_Data/VIIRS-Surf-Refl-IP_All/i1 SRi1.vrt
after that I open the VRT file and I add this lines(in bold) to METADATA:
<VRTDataset rasterXSize="6400" rasterYSize="1536">
<Metadata domain="GEOLOCATION">
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_Instrument_Short_Name">VIIRS</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Anc_Type_Tasked">Official</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Collection_Short_Name">VIIRS-Surf-Refl-IP</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Dataset_Type_Tag">IP</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Instrument_Flight_SW_Version">22 </MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Processing_Domain">OPS</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_Operational_Mode">NPP Normal Operations, VIIRS Operational</MDI>
<MDI key="Distributor">cspp</MDI>
<MDI key="Mission_Name">NPP</MDI>
<MDI key="N_Dataset_Source">noaa</MDI>
<MDI key="N_HDF_Creation_Date">20161130</MDI>
<MDI key="N_HDF_Creation_Time">133638.402235Z</MDI>
<MDI key="Platform_Short_Name">NPP</MDI>
<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">HDF5:GITCO_npp_d20150419_t1359071_e1404475_b18007_c20160812142156980852_cspp_dev.h5://All_Data/VIIRS-IMG-GEO-TC_All/Longitude</MDI>
<MDI key="Y_BAND">1</MDI>
<MDI key="Y_DATASET">HDF5:GITCO_npp_d20150419_t1359071_e1404475_b18007_c20160812142156980852_cspp_dev.h5://All_Data/VIIRS-IMG-GEO-TC_All/Latitude</MDI>
</Metadata>
<VRTRasterBand dataType="Float32" band="1">
<Metadata />
<SimpleSource>
<SourceFilename relativeToVRT="0">HDF5:IVISR_npp_d20150419_t1400325_e1401567_b18007_c20161130133638402235_cspp_dev.h5://All_Data/VIIRS-Surf-Refl-IP_All/i1</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="6400" RasterYSize="1536" DataType="Float32" BlockXSize="6400" BlockYSize="1536" />
<SrcRect xOff="0" yOff="0" xSize="6400" ySize="1536" />
<DstRect xOff="0" yOff="0" xSize="6400" ySize="1536" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
NB: I get the GITCO files by suing the tool POLAR2GRID on SDR files.
2.gdalwarp -geoloc -t_srs EPSG:4326 SRi1.vrt SRi1_warped.tif -overwrite -dstnodata 50
I used the CSPP VIIRS EDR tool, that is used to convert the VIIRS Sensor Data Records(SDR) to Data Environment Records (EDR), by using this tool I had different products like NDVI, Surface Reflectance, Land Surface Temperature as hdf5 files, but they are not projected, so I used this two commands based on gdal so I can get them as geotiff images:
1.gdal_translate -of VRT HDF5:IVISR_npp_d20150419_t1400325_e1401567_b18007_c20161130133638402235_cspp_dev.h5://All_Data/VIIRS-Surf-Refl-IP_All/i1 SRi1.vrt
after that I open the VRT file and I add this lines(in bold) to METADATA:
<VRTDataset rasterXSize="6400" rasterYSize="1536">
<Metadata domain="GEOLOCATION">
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_Instrument_Short_Name">VIIRS</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Anc_Type_Tasked">Official</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Collection_Short_Name">VIIRS-Surf-Refl-IP</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Dataset_Type_Tag">IP</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Instrument_Flight_SW_Version">22 </MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_N_Processing_Domain">OPS</MDI>
<MDI key="Data_Products_VIIRS-Surf-Refl-IP_Operational_Mode">NPP Normal Operations, VIIRS Operational</MDI>
<MDI key="Distributor">cspp</MDI>
<MDI key="Mission_Name">NPP</MDI>
<MDI key="N_Dataset_Source">noaa</MDI>
<MDI key="N_HDF_Creation_Date">20161130</MDI>
<MDI key="N_HDF_Creation_Time">133638.402235Z</MDI>
<MDI key="Platform_Short_Name">NPP</MDI>
<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">HDF5:GITCO_npp_d20150419_t1359071_e1404475_b18007_c20160812142156980852_cspp_dev.h5://All_Data/VIIRS-IMG-GEO-TC_All/Longitude</MDI>
<MDI key="Y_BAND">1</MDI>
<MDI key="Y_DATASET">HDF5:GITCO_npp_d20150419_t1359071_e1404475_b18007_c20160812142156980852_cspp_dev.h5://All_Data/VIIRS-IMG-GEO-TC_All/Latitude</MDI>
</Metadata>
<VRTRasterBand dataType="Float32" band="1">
<Metadata />
<SimpleSource>
<SourceFilename relativeToVRT="0">HDF5:IVISR_npp_d20150419_t1400325_e1401567_b18007_c20161130133638402235_cspp_dev.h5://All_Data/VIIRS-Surf-Refl-IP_All/i1</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="6400" RasterYSize="1536" DataType="Float32" BlockXSize="6400" BlockYSize="1536" />
<SrcRect xOff="0" yOff="0" xSize="6400" ySize="1536" />
<DstRect xOff="0" yOff="0" xSize="6400" ySize="1536" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
NB: I get the GITCO files by suing the tool POLAR2GRID on SDR files.
2.gdalwarp -geoloc -t_srs EPSG:4326 SRi1.vrt SRi1_warped.tif -overwrite -dstnodata 50