Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3700 closed defect (invalid)

gdalwarp raster image doesn't change

Reported by: ScanEx Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.7.0
Severity: normal Keywords: gdalwarp bmp
Cc:

Description

I encountered with following problem, when I tried to use gdalwarp utility to change projection of image:

I wanted to convert BMP image file to different projection, using following command: gdalwarp.exe -of GTiff -t_srs "+proj=utm +ellps=WGS84 +zone=37 +units=m" "D:\Sample_data\GDAL_warp_BMP_problem\LISS_Volga_z38_viewbmp.bmp" "D:\Sample_data\GDAL_warp_BMP_problem\LISS_Volga_z38_viewbmp_OUT0.tif"

.prj file successfully changes: "PROJCS["UTM Zone 37, ..." But gdalwarp doesn't change image itself, while when I tried to convert tif image, raster changes.

I had the same behavior with JPG images.

I attach all images: successfully converted TIF, and failed JPG, BMP .

Attachments (1)

GDAL_warp_BMP_problem.zip (541.7 KB ) - added by ScanEx 14 years ago.
All files for processing

Download all attachments as: .zip

Change History (3)

by ScanEx, 14 years ago

Attachment: GDAL_warp_BMP_problem.zip added

All files for processing

comment:1 by Even Rouault, 14 years ago

Resolution: invalid
Status: newclosed

Not all drivers try to read .prj files.

So you have to specify the source projection explictely for a source image in BMP format by adding -s_srs "D:\Sample_data\GDAL_warp_BMP_problem\LISS_Volga_z38_viewbmp.prj" to the gdalwarp command line.

comment:2 by ScanEx, 14 years ago

Thank you! My bad.

Note: See TracTickets for help on using tickets.