grdimage with Gtiff

Added by takaya 4 months ago

Dear Sir

I want to merge two Gtiff files of eastern part(160-180E)) and western part(180-200E) of the photo.

psbasemap -Jl180/-62.5/-70/-52/1:23500000 -R160/200/-70/-50 -Ba10/5SWne -K -P >
grdimage -Jl180/-62.5/-70/-52/1:23500000 -R160/180/-70/-50 -Ba10/5SWn -Dr 881W.tif -O -K -P >>
grdimage -Jl180/-62.5/-70/-52/1:23500000 -R180/200/-70/-50 -Ba10/5Sne -Dr 881E.tif -O -P >>

however, "" is not I expected as attached. I just want to merge the western and the eastern part into 160-200E.

I made 881W.tif and 881E.tif by the bellowed
gdal_translate -of GTiff -outsize 923 1000 -projwin 160 -50 180 -70 GIBS_Terra_MODIS_true_881.xml 881W.tif
gdal_translate -of GTiff -outsize 923 1000 -projwin -180 -50 -160 -70 GIBS_Terra_MODIS_true_881.xml 881E.tif

Could you tell me how to solve the problem?


Takaya Namba (3.43 MB)

Replies (2)

RE: grdimage with Gtiff - Added by Joaquim 4 months ago

Best is that you use gdalwarp to make a mosaic of the two images. Otherwise you should revisit GMT manual about -X option and the difference between making a map with a scale factor (1:xxxx) or selecting a map width. If you plot the two images with the same paper origin they obviously wont be shown side by side.
If you want them side by side the second image must be horizontally shifted by exactly the width of the first image.

RE: grdimage with Gtiff - Added by takaya 4 months ago

Thank you very much for your suggestion.
I used gdalwarp to merge two files.

Thank you again.


takaya namba