Opened 12 years ago

Last modified 5 years ago

#4850 closed defect

gdalwarp discards data when the target extent is too large — at Version 3

Reported by: sfllaw Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: 1.9.1
Severity: normal Keywords:
Cc: simon.law@…, mdupuis@…

Description (last modified by sfllaw)

gdalwarp discards 25 pixels longitudinally, shown as black borders, on the west or east side if the target extent is too large on that side.

We have a sample 512×512 EPSG:3785 image called bluemarble.tif, attached to this ticket.

bluemarble-warped.tif is the output generated when we run the following command:

gdalwarp -q -of GTiff -t_srs EPSG:3785 -te -20037508.3428 -20037508.34 20037508.34 20037508.34 -ts 512 512 bluemarble.tif bluemarble-warped.tif

As you can see, there are 25 pixels cropped from the western edge of the picture, replaced with (0, 0, 0). This is because -20037508.3428 m for the western extent is supposed to be -20037508.342789244.

Illustration of problem

If we pass in a -dstnovalue option to the command, it behaves correctly.

Change History (6)

comment:1 by sfllaw, 12 years ago

Description: modified (diff)
Summary: ugdalwarp discards data when the target extent is too large

comment:2 by sfllaw, 12 years ago

Description: modified (diff)

by sfllaw, 12 years ago

Attachment: bluemarble.tif added

Source image

by sfllaw, 12 years ago

Attachment: bluemarble-warped.tif added

by sfllaw, 12 years ago

Attachment: bluemarble.gif added

Illustration of problem

comment:3 by sfllaw, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.