Skip to content

Commit 5a148a1

Browse files
authored
Merge pull request #19 from antarctica/mg-imagery-bands-fix-0
Corrected bug for missing band
2 parents b907e97 + 661af18 commit 5a148a1

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

wfsai/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
AI workflow stages of detecting Wildlife from Space.
55
"""
66

7-
__version__ = "1.0.0"
7+
__version__ = "1.0.1"

wfsai/imagery.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,14 @@ def orthorectify(self,
286286
gdal.UseExceptions()
287287
with gdal.Open(self.src) as dataset:
288288
numbands = dataset.RasterCount
289-
bandlist = [i for i in range(numbands)]
290-
bandlist = list(set([1 if i == 0 else i for i in bandlist]))
289+
bandlist = [i+1 for i in range(numbands)]
290+
#bandlist = list(set([1 if i == 0 else i for i in bandlist]))
291291
src_bands = dst_bands = bandlist
292292
elif src_bands is not None and dst_bands is None:
293293
dst_bands = src_bands
294294
else:
295295
pass
296+
logger.info("dataset.RasterCount: %s", str(numbands))
296297
logger.info("source bands: %s", str(src_bands))
297298
logger.info("destination bands: %s", str(dst_bands))
298299

0 commit comments

Comments
 (0)