Opened 15 years ago

Closed 15 years ago

#3198 closed defect (fixed)

gdalbuildvrt -resolution lowest/highest does not work correcty for y pixel size

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 1.6.3
Component: Utilities Version: 1.6.2
Severity: normal Keywords: gdalbuildvrt
Cc:

Description

I try to use gdalbuilvrt  with images having different resolutions. I 
use it with argument -resolution highest and I find (I think) a bug.

The highest resolution is set with these lines of code in gdalbuildvrt.cpp :

                else if (resolutionStrategy == HIGHEST_RESOLUTION)
                {
                    we_res = MIN(we_res, 
psDatasetProperties[i].adfGeoTransform[GEOTRSFRM_WE_RES]);
                    ns_res = MIN(ns_res, 
psDatasetProperties[i].adfGeoTransform[GEOTRSFRM_NS_RES]);
                }
and MIN macro if define as :

../port/cpl_port.h:# define MIN(a,b) ((a<b) ? a : b)

But if resolution is negative MIN(-15,-1) is -15 not -1. I am right ?

Regards

Change History (1)

comment:1 by Even Rouault, 15 years ago

Resolution: fixed
Status: newclosed

r17861 /trunk/gdal/apps/gdalbuildvrt.cpp: Make gdalbuildvrt -resolution lowest/highest work correctly with negative y pixel size

r17862 /branches/1.6/gdal/apps/gdalbuildvrt.cpp: Make gdalbuildvrt -resolution lowest/highest work correctly with negative y pixel size

Note: See TracTickets for help on using tickets.