Opened 12 years ago

Closed 12 years ago

#4681 closed defect (invalid)

gdalwarp produce same images in the different spheroids

Reported by: ajuvolkov Owned by: warmerdam
Priority: normal Milestone:
Component: Utilities Version: 1.9.0
Severity: normal Keywords:
Cc:

Description (last modified by ajuvolkov)


Attachments (1)

example.rar (559.0 KB ) - added by ajuvolkov 12 years ago.

Download all attachments as: .zip

Change History (5)

by ajuvolkov, 12 years ago

Attachment: example.rar added

comment:1 by ajuvolkov, 12 years ago

Description: modified (diff)
Version: unspecified1.9.1

comment:2 by ajuvolkov, 12 years ago

Version: 1.9.11.9.0

comment:3 by ajuvolkov, 12 years ago

Hello.

I have the source srtm3 dataset (90 m/pixel at the equator) and need to reproject it to the ideal sphere. Source dataset is Plate Carree data produced in WGS84 datum. I call to gdalwarp to get an image projected onto the ideal sphere with radius 6378137:

gdalwarp -r cubic -te 0 49 1 50 -ts 2048 2048 -overwrite -s_srs "+proj=longlat +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84" -t_srs "+proj=longlat +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=sphere +R=6378137" N49E000.vrt sphere.tif

I call to gdalwarp to get an image in WGS84 datum:

gdalwarp -r cubic -te 0 49 1 50 -ts 2048 2048 -overwrite -s_srs "+proj=longlat +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84" N49E000.vrt wgs84.tif

and I got the same images! How is it possible? I thought if I use a different target spheroids I will get the different images and difference will increase in North direction (on the northern Hemisphere)

See example.rar in attachment. (I use fwtools to view an images)

comment:4 by Even Rouault, 12 years ago

Resolution: invalid
Status: newclosed

I believe you are running into http://trac.osgeo.org/proj/wiki/FAQ#WhydoIgetdifferentresultswith4.5.0and4.6.0 . Your PlateCarree projection has no +towgs84= parameter, so no ellipsoid transformations occur. You might try adding +towgs84=0,0,0 , but I won't guarantee that you get the result you expect (at least, you should notice some difference in output)

Note: See TracTickets for help on using tickets.