Opened 11 years ago

Closed 8 years ago

#4566 closed defect (wontfix) can't handle images with inverse transforms

Reported by: simonf Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:


I'm trying to merge two files in MODIS sinusoidal projection whose Y axis runs north to south. gdalinfo output is:

Upper Left (-8388000.000, 4774000.000) (103d 2'18.11"W, 43d 6'5.53"N) Lower Left (-8388000.000, 4973000.000) (106d11'6.49"W, 44d53'33.07"N) Upper Right (-7989000.000, 4774000.000) ( 98d 8'13.34"W, 43d 6'5.53"N) Lower Right (-7989000.000, 4973000.000) (101d 8'2.86"W, 44d53'33.07"N)

Upper Left (-8388000.000, 4973000.000) (106d11'6.49"W, 44d53'33.07"N) Lower Left (-8388000.000, 5172000.000) (109d38'24.92"W, 46d40'58.58"N) Upper Right (-7989000.000, 4973000.000) (101d 8'2.86"W, 44d53'33.07"N) Lower Right (-7989000.000, 5172000.000) (104d25'29.62"W, 46d40'58.58"N) refuses to merge them: ERROR 1: Attempt to create 798x0 dataset is illegal,sizes must be larger than zero. Creation failed, terminating gdal_merge.

I can specify the output box explicitly and force the issue with

-ul_lr -8388000.0 4774000.0 -7989000.0 4973000.0

Note that uly is less than lry.

The problem is that in the "if ulx is None" branch assumes that the axes run in the same direction as in WGS84.

This does not block anything work-related.

Change History (2)

comment:1 by simonf, 11 years ago

Actually, my image was inverted on the Y axis. Not sure if should handle such an abnormal case.

comment:2 by Jukka Rahkonen, 8 years ago

Resolution: wontfix
Status: newclosed

I would say that images which are inverted on the Y axis must be very uncommon.

Note: See TracTickets for help on using tickets.