diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-01 21:14:04 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-05-01 21:14:04 +0200 |
| commit | 36af62233c9e03e9a064d2f0f68e957f1a979de9 (patch) | |
| tree | afcf3ea928d7adcc7f3200c98419340119c7a55b /grid_tools | |
| parent | 67e7af452cd36e1a2a3926b406831d706e301f56 (diff) | |
| download | PROJ-data-36af62233c9e03e9a064d2f0f68e957f1a979de9.tar.gz PROJ-data-36af62233c9e03e9a064d2f0f68e957f1a979de9.zip | |
check_gtiff_grid.py: fix extent comparison when geotransform has gt[5] > 0
Diffstat (limited to 'grid_tools')
| -rwxr-xr-x | grid_tools/check_gtiff_grid.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/grid_tools/check_gtiff_grid.py b/grid_tools/check_gtiff_grid.py index 3983d02..55b4265 100755 --- a/grid_tools/check_gtiff_grid.py +++ b/grid_tools/check_gtiff_grid.py @@ -522,10 +522,10 @@ class GlobalInfo(object): def get_extent(ds): gt = ds.GetGeoTransform() xmin = gt[0] + gt[1] / 2 - ymax = gt[3] + gt[5] / 2 + ytop = gt[3] + gt[5] / 2 xmax = gt[0] + gt[1] * ds.RasterXSize - gt[1] / 2 - ymin = gt[3] + gt[5] * ds.RasterYSize - gt[5] / 2 - return xmin, ymin, xmax, ymax + ybottom = gt[3] + gt[5] * ds.RasterYSize - gt[5] / 2 + return xmin, min(ytop, ybottom), xmax, max(ytop, ybottom) def validate_ifd(global_info, ds, is_first_subds, first_subds): |
