[Xastir] reprojection / gdalwarp / geotiff problems

Tapio Sokura oh2kku at iki.fi
Mon Dec 27 21:02:39 EST 2004


Hi,

I have some PNG raster maps that are not in the xastir natural 
projection. So I converted them with gdalwarp along with an esri world 
file (named inputfile.tfw) I created like this:

gdalwarp -s_srs EPSG:2392 -t_srs EPSG:4326 inputfile.png outputfile.tif

The resulting geotiff does not seem to be what Xastir expects as I get 
this printed to the terminal and no map is displayed:

Warning: no PCS in geotiff file outputfile.tif, assuming map is in lat/lon!
*** geoTIFF file /long/path/outpufile.tif is not in the proper format:
***** Has 3 samples per pixel instead of 1
***** Has planarConfig of 2 instead of 1
*** Please reformat it and try again.

gdalinfo outputs this for the geotiff file:

Driver: GTiff/GeoTIFF
Size is 380, 330
Coordinate System is:
GEOGCS["WGS 84",
     DATUM["WGS_1984",
         SPHEROID["WGS 84",6378137,298.2572235629972,
             AUTHORITY["EPSG","7030"]],
         AUTHORITY["EPSG","6326"]],
     PRIMEM["Greenwich",0],
     UNIT["degree (supplier to define representation)",0.01745329251994328],
     AUTHORITY["EPSG","4326"]]
Origin = (24.445081,60.046957)
Pixel Size = (0.00007605,-0.00003844)
Corner Coordinates:
Upper Left  (  24.4450807,  60.0469570) ( 24d26'42.29"E, 60d 2'49.05"N)
Lower Left  (  24.4450807,  60.0342702) ( 24d26'42.29"E, 60d 2'3.37"N)
Upper Right (  24.4739784,  60.0469570) ( 24d28'26.32"E, 60d 2'49.05"N)
Lower Right (  24.4739784,  60.0342702) ( 24d28'26.32"E, 60d 2'3.37"N)
Center      (  24.4595296,  60.0406136) ( 24d27'34.31"E, 60d 2'26.21"N)
Band 1 Block=380x21 Type=Byte, ColorInterp=Red
Band 2 Block=380x21 Type=Byte, ColorInterp=Green
Band 3 Block=380x21 Type=Byte, ColorInterp=Blue

What am I doing wrong? I have never used geotiffs before, I just thought 
that why not put the calibration information right into the same image 
file as well so I don't have a .png and a .geo to keep in sync. And I 
think there might be a problem with getting gdalwarp to output the 
required map calibration information if I went for a BMP or PNG..

Is there a better way of reprojecting raster maps for use in Xastir? I'm 
running CVS Xastir compiled on December 20th.

   Tapio



More information about the Xastir mailing list