I have tried to used gdalwarp to project set of images(from hdf4 files to tif) before merging them using gdal_merge. But then the merge output has spaces/blanks. They're not merge properly, and I don't know why'd it happened like that. So I thought of merging first before projecting, when I tried to project the merge hdf files an error like this always appears:
ERROR 1: Unable to compute a transformation between pixel/line and georeferenced coordinates for merge.tif. There is no affine transformation and no GCPs.
Command line code: gdalwarp -te 109.975 3.475 135.025 25.025 merge.tif new.tif
Here is the gdalinfo:
Driver: HDF4Image/HDF4 Dataset
Files: A2014348055000.L2_LAC.SeAHABS.hdf
Size is 1160, 1990
Coordinate System is `'
Metadata:
bad_value_scaled=-32767
bad_value_unscaled=-32767
Calibration Data=A2014348055000.L1A_LAC.eAHAB.hdf, MYD02_Reflective_LUTs.V6.1.17.24_OC.hdf, MYD02_Emissive_LUTs.V6.1.1
7.24_OC.hdf, MYD02_QA_LUTs.V6.1.17.24_OC.hdf
cdm_data_type=swath
Conventions=CF-1.6
creator email=data@oceancolor.gsfc.nasa.gov
creator name=NASA/GSFC/OBPG
creator url=http://oceandata.sci.gsfc.nasa.gov
date_created=20141214T092342Z
Day or Night=Day
Earth-Sun Distance Correction=1.03201282024384
Easternmost Longitude=125.8173065
End Center Latitude=25.38609505
End Center Longitude=112.290802
End Day=348
End Millisec=21301577
End Node=Ascending
End Time=2014348055501577
End Year=2014
Flag Percentages=0.0001732801902, 22.30172539, 0.001126321382, 15.12727451, 80.96486664, 3.97266531, 5.644948959, 0, 1
5.79899502, 81.37419891, 0.1860162914, 0.8686535954, 0, 0, 0.2047305405, 0.01342921611, 0, 0, 0, 0.08087852597, 43.33668
518, 0.0002599202853, 0.1081701592, 0, 0, 0, 0, 68.54501343, 22.30384445, 0.1022786349, 94.91210175, 0
geospatial_lat_max=26.48568916
geospatial_lat_min=6.694877148
geospatial_lat_units=degrees_north
geospatial_lon_max=125.8173065
geospatial_lon_min=105.5096741
geospatial_lon_units=degrees_east
Input Files=A2014348055000.L1B_LAC.SeAHABS.hdf,S201434718_NCEP.MET,S201434718_NCEP.MET,S201434718_NCEP.MET,N201434500_
O3_AURAOMI_24h.hdf,N201434500_O3_AURAOMI_24h.hdf,N201434500_O3_AURAOMI_24h.hdf,,xcal_modisa_axc26f,polcor_modisa_2010b,m
odisa_ocr_vc_nn,,landmask.dat,watermask.dat,digital_elevation_map.hdf,ETOPO1_ocssw.nc,,N201434600_SEAICE_NSIDC_24h.hdf,s
st_climatology.hdf,sss_climatology_woa2009.hdf,no2_climatology.hdf,alpha510_climatology.hdf,taua865_climatology.hdf,A201
4348055000.GEO,owmc_lut.hdf,
Geolocation:
LINE_OFFSET=0
LINE_STEP=1
PIXEL_OFFSET=0
PIXEL_STEP=1
SRS=GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0
,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHOR
ITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]
-te
you provide does not fit to the geospatial metadata of the file.