<div dir="ltr">Hi Rudger<div><br></div><div style>I have a similar problem like Laure in the former thread "MODIS reprojection".</div><div style>I'd like to process the most recent, high resolution and free cloud data of middle Europe. </div>
<div style>=> I think it's MODIS Terra and Acqua, right?</div><div style><br></div><div style>Below you see the result of rhe metadata of my input file.</div><div style><div>How can I convert this to say EPSG:3857 (Mercator/Google)?<br>
</div><div style>When I try gdalwarp and gdal_translate the resulting image is distorted and shifted. <br></div><div style>=> Do I need to preprocess this swath first using <span style="font-size:13px;font-family:arial,sans-serif">MRT Swath? </span><br>
</div></div><div style><br></div><div style>Yours, Stefan</div><div style><br></div><div style><br></div><div style><div>$ gdalinfo -nogcp HDF4_EOS:EOS_SWATH:"modis.hdf":mod35:Cloud_Mask</div><div>Driver: HDF4Image/HDF4 Dataset</div>
<div>Files: test1.hdf</div><div>Size is 1354, 2030</div><div>Coordinate System is `'</div><div>Metadata:</div><div>  _FillValue=0</div><div>  add_offset=0</div><div>  ALGORITHMPACKAGEACCEPTANCEDATE=June 1997</div><div>
  ALGORITHMPACKAGEMATURITYCODE=at-launch</div><div>  ALGORITHMPACKAGENAME=ATBD-MOD-06</div><div>  ALGORITHMPACKAGEVERSION=2</div><div>  ANCILLARYINPUTPOINTER=MOD03.A2013112.1055.005.2013112115237.NRT.hdf</div><div>  ANCILLARYINPUTTYPE=Geolocation</div>
<div>  ASSOCIATEDINSTRUMENTSHORTNAME=MODIS</div><div>  ASSOCIATEDPLATFORMSHORTNAME=Terra</div><div>  ASSOCIATEDSENSORSHORTNAME=MODIS</div><div>  AUTOMATICQUALITYFLAG=Passed</div><div>  AUTOMATICQUALITYFLAGEXPLANATION=Passed if useable, Failed if not useable</div>
<div>  Cell_Across_Swath_Sampling=1, 1354, 1</div><div>  Cell_Along_Swath_Sampling=1, 2030, 1</div><div>  ClearPct250m=   33.62</div><div>  CLOUD_MASK_ALGORITHM_VERSION_NUMBER=    1.00</div><div>  CloudCoverPct250m=   66.38</div>
<div>  DAYNIGHTFLAG=Day</div><div>  DayProcessedPct=  100.00</div><div>  description=</div><div>                                                                                   </div><div>                                                                                    </div>
<div> Bit fields within each byte are numbered from the left:                            </div><div> 7, 6, 5, 4, 3, 2, 1, 0.                                                            </div><div> The left-most bit (bit 7) is the most significant bit.                             </div>
<div> The right-most bit (bit 0) is the least significant bit.                           </div><div>                                                                                    </div><div> bit field       Description                             Key                        </div>
<div> ---------       -----------                             ---                        </div><div>                                                                                    </div><div> 0               Cloud Mask Flag                      0 = Not  determined           </div>
<div>                                                      1 = Determined                </div><div>                                                                                    </div><div> 2, 1            Unobstructed FOV Quality Flag        00 = Cloudy                   </div>
<div>                                                      01 = Uncertain                </div><div>                                                      10 = Probably  Clear          </div><div>                                                      11 = Confident  Clear         </div>
<div>                 PROCESSING PATH                                                    </div><div>                 ---------------                                                    </div><div> 3               Day or Night Path                    0 = Night  / 1 = Day          </div>
<div> 4               Sunglint Path                        0 = Yes    / 1 = No           </div><div> 5               Snow/Ice Background Path             0 = Yes    / 1 = No           </div><div> 7, 6            Land or Water Path                   00 = Water                    </div>
<div>                                                      01 = Coastal                  </div><div>                                                      10 = Desert                   </div><div>                                                      11 = Land                     </div>
<div> ____ END BYTE 1 ______________ ___________________________________________         </div><div>                                                                                    </div><div> bit field       Description                             Key                        </div>
<div> ---------       -----------                             ---                        </div><div>                                                                                    </div><div>                 ADDITIONAL INFORMATION                                             </div>
<div>                 ----------------------                                             </div><div> 0               Non- cloud obstruction Flag              0 = Yes / 1 = No          </div><div> 1               Thin Cirrus Detected  (Solar)           0 =  Yes / 1 = No          </div>
<div> 2               Shadow Found                            0 =  Yes / 1 = No          </div><div> 3               Thin Cirrus Detected  (Infrared)        0 =  Yes / 1 = No          </div><div> 4               Adjacent Cloud Detected **              0 =  Yes / 1 = No          </div>
<div>                 ** Implemented Post Launch to                                      </div><div>                    Indicate cloud found within                                     </div><div>                    surrounding 1 km pixels *                                       </div>
<div>                                                                                    </div><div>                 1-km CLOUD FLAGS                                                   </div><div>                 ----------------                                                   </div>
<div> 5               Cloud Flag -  IR Threshold               0 = Yes / 1 = No          </div><div> 6               High Cloud Flag -  CO2 Test              0 = Yes / 1 = No          </div><div> 7               High Cloud Flag -  6.7 micron Test       0 = Yes / 1 = No          </div>
<div> ____ END BYTE 2 ______________ ___________________________________________         </div><div>                                                                                    </div><div> bit field       Description                             Key                        </div>
<div> ---------       -----------                             ---                        </div><div>                                                                                    </div><div> 0               High Cloud Flag -  1.38 micron Test      0 = Yes / 1 = No          </div>
<div> 1               High Cloud Flag - 3.7- 12 micron Test    0 = Yes / 1 = No          </div><div> 2               Cloud Flag -  IR Temperature             0 = Yes / 1 = No          </div><div>                              Difference                                            </div>
<div> 3               Cloud Flag - 3.7- 11 micron Test         0 = Yes / 1 = No          </div><div> 4               Cloud Flag -  Visible Reflectance Test   0 = Yes / 1 = No          </div><div> 5               Cloud Flag -  Visible Reflectance        0 = Yes / 1 = No          </div>
<div>                              Ratio Test                                            </div><div> 6               Cloud Flag -  NDVI Final Confidence      0 = Yes / 1 = No          </div><div>                              Confirmation Test                                     </div>
<div> 7               Cloud Flag - Night 7.3- 11 micron Test   0 = Yes / 1 = No          </div><div> ____ END BYTE 3 ______________ ___________________________________________         </div><div>                                                                                    </div>
<div> bit field       Description                             Key                        </div><div> ---------       -----------                             ---                        </div><div>                                                                                    </div>
<div>                 ADDITIONAL TESTS                                                   </div><div>                 ----------------                                                   </div><div> 0               Cloud Flag -  Spare                      0 = Yes / 1 = No          </div>
<div> 1               Cloud Flag -  Spatial Variability        0 = Yes / 1 = No          </div><div> 2               Final Confidence Confirmation Test      0 =  Yes / 1 = No          </div><div> 3               Cloud Flag -  Night Water                0 = Yes / 1 = No          </div>
<div>                              Spatial Variability                                   </div><div> 4               Suspended Dust Flag                     0 =  Yes / 1 = No          </div><div>                                                                                    </div>
<div> 5-7             Spares                                                             </div><div> ____ END BYTE 4 ______________ ___________________________________________         </div><div>                                                                                    </div>
<div> bit field       Description                             Key                        </div><div> ---------       -----------                             ---                        </div><div>                                                                                    </div>
<div>                 250-m Cloud Flag - Visible Tests                                   </div><div>                 --------------------------------                                   </div><div> 0               Element(1,1)                            0 =  Yes / 1 = No          </div>
<div> 1               Element(1,2)                            0 =  Yes / 1 = No          </div><div> 2               Element(1,3)                            0 =  Yes / 1 = No          </div><div> 3               Element(1,4)                            0 =  Yes / 1 = No          </div>
<div> 4               Element(2,1)                            0 =  Yes / 1 = No          </div><div> 5               Element(2,2)                            0 =  Yes / 1 = No          </div><div> 6               Element(2,3)                            0 =  Yes / 1 = No          </div>
<div> 7               Element(2,4)                            0 =  Yes / 1 = No          </div><div> ____ END BYTE 5 ______________ ___________________________________________         </div><div>                                                                                    </div>
<div> bit field       Description                             Key                        </div><div> ----------      -----------                             ---                        </div><div>                                                                                    </div>
<div> 0               Element(3,1)                            0 =  Yes / 1 = No          </div><div> 1               Element(3,2)                            0 =  Yes / 1 = No          </div><div> 2               Element(3,3)                            0 =  Yes / 1 = No          </div>
<div> 3               Element(3,4)                            0 =  Yes / 1 = No          </div><div> 4               Element(4,1)                            0 =  Yes / 1 = No          </div><div> 5               Element(4,2)                            0 =  Yes / 1 = No          </div>
<div> 6               Element(4,3)                            0 =  Yes / 1 = No          </div><div> 7               Element(4,4)                            0 =  Yes / 1 = No          </div><div> ____ END BYTE 6 ______________ ___________________________________________         </div>
<div><br></div><div>  DESCRREVISION=5.0</div><div>  EASTBOUNDINGCOORDINATE=27.983792228394</div><div>  EQUATORCROSSINGDATE=2013-04-22</div><div>  EQUATORCROSSINGLONGITUDE=-10.5355310197622</div><div>  EQUATORCROSSINGTIME=11:12:10.638063</div>
<div>  EXCLUSIONGRINGFLAG=N</div><div>  Geolocation_Pointer=External MODIS geolocation product</div><div>  GRINGPOINTLATITUDE=63.2076139095873, 57.1960273665282, 41.0114451068176, 44.9126646972378</div><div>  GRINGPOINTLONGITUDE=-14.1048478023953, 27.9851830412684, 14.6542811157768, -14.2028294853094</div>
<div>  GRINGPOINTSEQUENCENO=1, 2, 3, 4</div><div>  HDFEOSVersion=HDFEOS_V2.9</div><div>  HighConfidentClearPct=    2.09</div><div>  history=$Id: MOD35.V2.CDL,v 1.1.2.5 2002/09/16 18:24:50 raf Exp $                           </div>
<div><br></div><div>  INPUTPOINTER=MOD03.A2013112.1055.005.2013112115237.NRT.hdf, MOD021KM.A2013112.1055.005.2013112115616.NRT.hdf, MOD02QKM.A2013112.1055.005.2013112115616.NRT.hdf, goge1_2_img.v1, ecosystem.img.v1, thresholds.dat.terra.v13, gfs.t06.130422.pgrbf06, oisst.20130417, eng.130421, NISE_SSMISF17_20130421.HDFEOS, destripe_config_terra.dat.v2</div>
<div>  INSTRUMENTNAME=Moderate Resolution Imaging Spectroradiometer</div><div>  LandProcessedPct=   56.56</div><div>  LOCALGRANULEID=MOD35_L2.A2013112.1055.005.2013112115902.NRT.hdf</div><div>  LOCALINPUTGRANULEID=MOD03.A2013112.1055.005.2013112115237.NRT.hdf, MOD021KM.A2013112.1055.005.2013112115616.NRT.hdf, MOD02QKM.A2013112.1055.005.2013112115616.NRT.hdf, goge1_2_img.v1, ecosystem.img.v1, thresholds.dat.terra.v13, gfs.t06.130422.pgrbf06, oisst.20130417, eng.130421, NISE_SSMISF17_20130421.HDFEOS</div>
<div>  LOCALVERSIONID=005</div><div>  long_name=MODIS Cloud Mask and Spectral Test Results</div><div>  LONGNAME=MODIS/Terra Cloud Mask and Spectral Test Results 5-Min L2 Swath 250m and 1km</div><div>  LowConfidentClearPct=   71.01</div>
<div>  Maximum_Number_of_1km_Frames=1354</div><div>  MaxSolarZenithAngle=   54.95</div><div>  MinSolarZenithAngle=   28.82</div><div>  NightProcessedPct=    0.00</div><div>  NonCloudObstructionFoundPct=    0.64</div><div>
  NORTHBOUNDINGCOORDINATE=63.2313776766876</div><div>  Number_of_Instrument_Scans=2030</div><div>  ORBITNUMBER=70979</div><div>  Parameter_Type=Output</div><div>  PARAMETERNAME=Cloud_Mask</div><div>  PGEVERSION=PGE03:5.3.11</div>
<div>  PROCESSINGENVIRONMENT=Linux nrt1min104 2.6.18-238.19.1.el5PAE #1 SMP Fri Jul 15 08:15:44 EDT 2011 i686 i686 i386 GNU/Linux</div><div>  PRODUCTIONDATETIME=2013-04-22T11:59:02.000Z</div><div>  PRODUCTIONHISTORY=PGE03:5.3.11</div>
<div>  QAPERCENTMISSINGDATA=0</div><div>  RANGEBEGINNINGDATE=2013-04-22</div><div>  RANGEBEGINNINGTIME=10:55:00.000000</div><div>  RANGEENDINGDATE=2013-04-22</div><div>  RANGEENDINGTIME=11:00:00.000000</div><div>  RCS_Id= $Id: thresholds.dat.terra.v13,v 1.1 2005/02/22 22:05:40 gumley Exp $           </div>
<div>  REPROCESSINGACTUAL=Near Real Time</div><div>  REPROCESSINGPLANNED=further update is anticipated</div><div>  scale_factor=1</div><div>  SCIENCEQUALITYFLAG=Not Investigated</div><div>  SCIENCEQUALITYFLAGEXPLANATION=See <a href="http://modis-atmos.gsfc.nasa.gov/validation.html">http://modis-atmos.gsfc.nasa.gov/validation.html</a> for more details on MODIS Atmosphere data quality.</div>
<div>  ShadowFoundPct=    0.03</div><div>  SHORTNAME=MOD35_L2</div><div>  Snow_IceSurfaceProcessedPct=    0.16</div><div>  SOUTHBOUNDINGCOORDINATE=41.1487274178468</div><div>  SuccessfulRetrievalPct=  100.00</div><div>  SunglintProcessedPct=   13.53</div>
<div>  ThinCirrusIR_FoundPct=    6.77</div><div>  ThinCirrusSolarFoundPct=   27.58</div><div>  title=MODIS Level 2 Cloud Mask                                                            </div><div><br></div><div>  UncertainConfidentClearPct=    2.96</div>
<div>  units=none</div><div>  UW_DESTRIPE_CONFIG=# Terra MODIS destriping configuration $Id: destripe_config_terra.dat.v2,v 1.2 2007/12/20 gumley Exp $</div><div>  UW_DESTRIPE_LWIR=$Id: hdf_destripe_new.f90,v 1.8 2004/06/24 14:25:27 gumley Exp $</div>
<div>  valid_range=0, 255</div><div>  VERSIONID=5</div><div>  VeryHighConfidentClearPct=   23.94</div><div>  WaterProcessedPct=   43.44</div><div>  WESTBOUNDINGCOORDINATE=-14.2008628227747</div><div>Geolocation:</div><div>
  LINE_OFFSET=2</div><div>  LINE_STEP=5</div><div>  PIXEL_OFFSET=2</div><div>  PIXEL_STEP=5</div><div>  X_BAND=1</div><div>  X_DATASET=HDF4_EOS:EOS_SWATH_GEOL:"test1.hdf":mod35:Longitude</div><div>  Y_BAND=1</div>
<div>  Y_DATASET=HDF4_EOS:EOS_SWATH_GEOL:"test1.hdf":mod35:Latitude</div><div>Corner Coordinates:</div><div>Upper Left  (    0.0,    0.0)</div><div>Lower Left  (    0.0, 2030.0)</div><div>Upper Right ( 1354.0,    0.0)</div>
<div>Lower Right ( 1354.0, 2030.0)</div><div>Center      (  677.0, 1015.0)</div><div>Band 1 Block=1354x738 Type=Byte, ColorInterp=Gray</div><div>  Description = MODIS Cloud Mask and Spectral Test Results</div><div>  NoData Value=0</div>
<div>  Unit Type: none</div><div>Band 2 Block=1354x738 Type=Byte, ColorInterp=Gray</div><div>  Description = MODIS Cloud Mask and Spectral Test Results</div><div>  NoData Value=0</div><div>  Unit Type: none</div><div>Band 3 Block=1354x738 Type=Byte, ColorInterp=Gray</div>
<div>  Description = MODIS Cloud Mask and Spectral Test Results</div><div>  NoData Value=0</div><div>  Unit Type: none</div><div>Band 4 Block=1354x738 Type=Byte, ColorInterp=Gray</div><div>  Description = MODIS Cloud Mask and Spectral Test Results</div>
<div>  NoData Value=0</div><div>  Unit Type: none</div><div>Band 5 Block=1354x738 Type=Byte, ColorInterp=Gray</div><div>  Description = MODIS Cloud Mask and Spectral Test Results</div><div>  NoData Value=0</div><div>  Unit Type: none</div>
<div>Band 6 Block=1354x738 Type=Byte, ColorInterp=Gray</div><div>  Description = MODIS Cloud Mask and Spectral Test Results</div><div>  NoData Value=0</div><div>  Unit Type: none</div><div><br></div></div></div>