[gdal-dev] gdalwarp on a file + world file - different limits
Joaquim Luis
jluis at ualg.pt
Sun Jan 25 16:24:31 EST 2009
Hi,
For the next version of GMT we have extended the ability of the ps2raster program
to take a postscript file generated by GMT either create a world file, or even further,
to call gdalwarp to create a true geotiff file.
Next is an example on how it will work
pscoast -JS-55/-60/15c -R-77/-55/-57.5/-48r -Df -Gred -P -Bg2 --BASEMAP_TYPE=plain --FRAME_PEN=0.1p > out.ps
ps2raster out.ps -Tt -W+ -V
(which executes this command)
gdalwarp -s_srs "+proj=stere +lat_0=-60 +lon_0=-55 +k=1 +x_0=0 +y_0=0 +a=6378137.000 +b=6356752.314245" out.tif out.tiff
But when I compare the gdalinfo output of the two files they do not agree.
Why are the LR coords from the geotiff file different from the tif + .tfw?
And where do they come from?
Thanks
Joaquim Luis
# ---------- THE .TFW CONTENTS
677.678633953751 # x_inc
0.0
0.0
-677.201365837256 # y_inc
-1389588.373683023000 # X-UL
1335922.909317081300 # Y-UL
# -------------------------------------------
# WHAT DOES GDALINFO SAY ABOUT THE .TIF + .TFW
gdalinfo out.tif
Upper Left (-1389927.213, 1336261.510)
Lower Left (-1389927.213, 329263.079)
Upper Right ( -188402.995, 1336261.510)
Lower Right ( -188402.995, 329263.079)
# -------------------------------------------
# WHAT DOES GDALINFO SAY ABOUT THE (GEO).TIFF
gdalinfo out.tiff
Upper Left (-1389927.213, 1336261.510)
Lower Left (-1389927.213, 329523.865)
Upper Right ( -188074.869, 1336261.510)
Lower Right ( -188074.869, 329523.865)
More information about the gdal-dev
mailing list