From c34488dd7fbd921fa3d0387d536402d29fc7f7fa Mon Sep 17 00:00:00 2001 From: natanox <105999192+natanox@users.noreply.github.com> Date: Fri, 27 Mar 2026 11:12:20 +0100 Subject: [PATCH] Make gdal2gores.py work with Python3 Changed print() syntax and made sure goreWidth variable is an Integer as required, not a Float. --- gdal2Gores/gdal2gores.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdal2Gores/gdal2gores.py b/gdal2Gores/gdal2gores.py index 8a6abed..cf23e43 100644 --- a/gdal2Gores/gdal2gores.py +++ b/gdal2Gores/gdal2gores.py @@ -90,7 +90,7 @@ def Usage(): Usage() if gores is None: gores = 8 - print "Warning: Number of gores defaulting to 8, send -nd VALUE to set a different value." + print("Warning: Number of gores defaulting to 8, send -nd VALUE to set a different value.") #Try to open input image in_dataset = gdal.Open( infile, GA_ReadOnly ) @@ -105,7 +105,7 @@ def Usage(): in_dataset.RasterYSize, in_dataset.RasterCount, type) #gore parameters -goreWidth = in_dataset.RasterXSize/(gores); +goreWidth = in_dataset.RasterXSize // gores; #loop over bands -- probably can handle all bands at once... for band in range (1, in_dataset.RasterCount + 1):