Commit 81193c8d authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added bandnames to predicted image.

parent 1bf9881f
Pipeline #3048 passed with stage
in 21 minutes and 13 seconds
......@@ -40,6 +40,7 @@ from ..misc.logging import GMS_logger
from ..misc.definition_dicts import datasetid_to_sat_sen, sat_sen_to_datasetid
from ..misc.exceptions import ClassifierNotAvailableError
from ..misc.logging import close_logger
from ..model.gms_object import GMS_object
from ..model.metadata import get_LayerBandsAssignment
from .L2A_P import L2A_object
from ..model.gms_object import GMS_identifier
......@@ -1575,7 +1576,8 @@ class RSImage_ClusterPredictor(object):
# apply prediction
# NOTE: prediction is applied in 1000 x 1000 tiles to save memory (because classifier.predict returns float32)
image_predicted = GeoArray(np.empty((image.rows, image.cols, classifier.tgt_n_bands), dtype=image.dtype),
geotransform=image.gt, projection=image.prj, nodata=image.nodata)
geotransform=image.gt, projection=image.prj, nodata=image.nodata,
bandnames=GMS_object.LBA2bandnames(classifier.tgt_LBA))
t0 = time.time()
for ((rS, rE), (cS, cE)), im_tile in image.tiles(tilesize=(1000, 1000)):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment