diff --git a/enmapboxprocessing/algorithm/editrastersourcebandpropertiesalgorithm.py b/enmapboxprocessing/algorithm/editrastersourcebandpropertiesalgorithm.py index 80f34eaa..ea8010c8 100644 --- a/enmapboxprocessing/algorithm/editrastersourcebandpropertiesalgorithm.py +++ b/enmapboxprocessing/algorithm/editrastersourcebandpropertiesalgorithm.py @@ -73,11 +73,12 @@ def processAlgorithm( assert ds is not None # allow counter variables for band names (see issue #539) - if '{bandNo}' in parameters[self.P_NAMES] or '{bandName}' in parameters[self.P_NAMES]: - reader = RasterReader(source) - bandNames = [reader.bandName(bandNo) for bandNo in reader.bandNumbers()] - parameters[self.P_NAMES] = \ - f"[f'{parameters[self.P_NAMES]}' for bandNo, bandName in enumerate({bandNames}, 1)]" + if self.P_NAMES in parameters: + if '{bandNo}' in parameters[self.P_NAMES] or '{bandName}' in parameters[self.P_NAMES]: + reader = RasterReader(source) + bandNames = [reader.bandName(bandNo) for bandNo in reader.bandNumbers()] + parameters[self.P_NAMES] = \ + f"[f'{parameters[self.P_NAMES]}' for bandNo, bandName in enumerate({bandNames}, 1)]" names = self.parameterAsStringValues(parameters, self.P_NAMES, context) wavelengths = self.parameterAsFloatValues(parameters, self.P_WAVELENGTHS, context) diff --git a/enmapboxprocessing/algorithm/importenmapl2aalgorithm.py b/enmapboxprocessing/algorithm/importenmapl2aalgorithm.py index d6a08328..ee990cbe 100644 --- a/enmapboxprocessing/algorithm/importenmapl2aalgorithm.py +++ b/enmapboxprocessing/algorithm/importenmapl2aalgorithm.py @@ -124,14 +124,18 @@ def processAlgorithm( int(text) for text in root.find('specific/swirProductQuality/expectedChannelsList').text.split(',') ] + overlapStart = wavelength[swirBandNumbers[0]] + overlapEnd = wavelength[vnirBandNumbers[-1]] if detectorOverlap == self.OrderByDetectorOverlapOption: bandList = vnirBandNumbers + swirBandNumbers elif detectorOverlap == self.OrderByWavelengthOverlapOption: bandList = list(range(1, len(wavelength) + 1)) elif detectorOverlap == self.VnirOnlyOverlapOption: bandList = vnirBandNumbers + bandList.extend([bandNo for bandNo in swirBandNumbers if wavelength[bandNo - 1] > overlapEnd]) elif detectorOverlap == self.SwirOnlyOverlapOption: - bandList = swirBandNumbers + bandList = [bandNo for bandNo in vnirBandNumbers if wavelength[bandNo - 1] < overlapStart] + bandList.extend(swirBandNumbers) else: raise ValueError() diff --git a/scripts/EnFireMAP/ingest_data.py b/scripts/EnFireMAP/ingest_data.py index 62851c63..939be8ab 100644 --- a/scripts/EnFireMAP/ingest_data.py +++ b/scripts/EnFireMAP/ingest_data.py @@ -9,7 +9,7 @@ from enmapboxprocessing.algorithm.importenmapl2aalgorithm import ImportEnmapL2AAlgorithm from enmapboxprocessing.driver import Driver from enmapboxprocessing.rasterreader import RasterReader -from qgis._core import QgsVectorLayer +from qgis.core import QgsVectorLayer rootData = r'D:\data\EnFireMap\data' rootCube = r'D:\data\EnFireMap\cube' @@ -48,7 +48,7 @@ def ingestData(): try: prefix, datestamp, sceneNo = scene.split('_') assert prefix == 'nc' - except: + except Exception: continue scenesByDate[datestamp].append(scene) diff --git a/tests/enmap-box/enmapbox/coreapps/decorrelationstretchapp/test_decorrelationstretchrenderer.py b/tests/enmap-box/enmapbox/coreapps/decorrelationstretchapp/test_decorrelationstretchrenderer.py index bd15d137..ff9613fa 100644 --- a/tests/enmap-box/enmapbox/coreapps/decorrelationstretchapp/test_decorrelationstretchrenderer.py +++ b/tests/enmap-box/enmapbox/coreapps/decorrelationstretchapp/test_decorrelationstretchrenderer.py @@ -5,7 +5,7 @@ from sklearn.decomposition import PCA from sklearn.preprocessing import RobustScaler, MinMaxScaler -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.rasterreader import RasterReader from enmapboxprocessing.testcase import TestCase from enmapboxprocessing.utils import Utils diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_AggregateRasterBandsAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_AggregateRasterBandsAlgorithm.py index 9b816dbe..0edea6e2 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_AggregateRasterBandsAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_AggregateRasterBandsAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.aggregaterasterbandsalgorithm import AggregateRasterBandsAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_ApplyMaskAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_ApplyMaskAlgorithm.py index 557737af..aabce55d 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_ApplyMaskAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_ApplyMaskAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap, landcover_polygon +from enmapboxtestdata import enmap, landcover_polygon from enmapboxprocessing.algorithm.applymaskalgorithm import ApplyMaskAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_Build3dCubeAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_Build3dCubeAlgorithm.py index 64e6352c..edc35664 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_Build3dCubeAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_Build3dCubeAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.build3dcubealgorithm import Build3dCubeAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassFractionFromCategorizedVectorAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassFractionFromCategorizedVectorAlgorithm.py index da083c33..632181eb 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassFractionFromCategorizedVectorAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassFractionFromCategorizedVectorAlgorithm.py @@ -80,7 +80,7 @@ def test_50p_coverage(self): } self.runalg(alg, parameters) reader = RasterReader(parameters[alg.P_OUTPUT_FRACTION_RASTER]) - self.assertAlmostEqual(247.589, np.mean(reader.array()), 3) + self.assertAlmostEqual(249.092, np.mean(reader.array()), 3) def test_100p_coverage(self): alg = ClassFractionFromCategorizedVectorAlgorithm() @@ -93,4 +93,4 @@ def test_100p_coverage(self): } self.runalg(alg, parameters) reader = RasterReader(parameters[alg.P_OUTPUT_FRACTION_RASTER]) - self.assertAlmostEqual(247.589, np.mean(reader.array()), 3) + self.assertAlmostEqual(250.711, np.mean(reader.array()), 3) diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationPerformanceSimpleAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationPerformanceSimpleAlgorithm.py index 1c387ee7..dd6cccd8 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationPerformanceSimpleAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationPerformanceSimpleAlgorithm.py @@ -1,6 +1,6 @@ from math import isnan -from enmapbox.exampledata import landcover_polygon +from enmapboxtestdata import landcover_polygon from enmapboxprocessing.algorithm.classificationperformancesimplealgorithm import \ ClassificationPerformanceSimpleAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationPerformanceStratifiedAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationPerformanceStratifiedAlgorithm.py index 223812d9..b7c334e2 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationPerformanceStratifiedAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationPerformanceStratifiedAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import landcover_polygon +from enmapboxtestdata import landcover_polygon from enmapboxprocessing.algorithm.classificationperformancestratifiedalgorithm import ( stratifiedAccuracyAssessment, ClassificationPerformanceStratifiedAlgorithm ) diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationWorkflowAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationWorkflowAlgorithm.py index 1953e929..f3ac947f 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationWorkflowAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_ClassificationWorkflowAlgorithm.py @@ -1,6 +1,6 @@ from sklearn.base import ClassifierMixin -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.classificationworkflowalgorithm import ClassificationWorkflowAlgorithm from enmapboxprocessing.algorithm.fitclassifieralgorithmbase import FitClassifierAlgorithmBase from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_ConvexHullAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_ConvexHullAlgorithm.py index bc3f35ef..56445a7e 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_ConvexHullAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_ConvexHullAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.convexhullalgorithm import ConvexHullAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.algorithm.translaterasteralgorithm import TranslateRasterAlgorithm diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_ConvolutionFilterAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_ConvolutionFilterAlgorithm.py index 494ca746..15695ca0 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_ConvolutionFilterAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_ConvolutionFilterAlgorithm.py @@ -1,6 +1,6 @@ import unittest -from enmapbox.exampledata import hires +from enmapboxtestdata import hires from enmapboxprocessing.algorithm.convolutionfilteralgorithmbase import ConvolutionFilterAlgorithmBase from enmapboxprocessing.algorithm.spatialconvolutionairydisk2dalgorithm import SpatialConvolutionAiryDisk2DAlgorithm from enmapboxprocessing.algorithm.spatialconvolutionbox2dalgorithm import SpatialConvolutionBox2DAlgorithm diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateGridAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateGridAlgorithm.py index 4076ffdd..6c5b8bf1 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateGridAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateGridAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.creategridalgorithm import CreateGridAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from qgis.core import QgsRasterLayer diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateMaskAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateMaskAlgorithm.py index 4a4853a0..0be14d5a 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateMaskAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateMaskAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import hires +from enmapboxtestdata import hires from enmapboxprocessing.algorithm.createmaskalgorithm import CreateMaskAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateRgbImageFromClassProbabilityAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateRgbImageFromClassProbabilityAlgorithm.py index a5c8675b..1a512be8 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateRgbImageFromClassProbabilityAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateRgbImageFromClassProbabilityAlgorithm.py @@ -1,7 +1,7 @@ import numpy as np from sklearn.base import ClassifierMixin -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.creatergbimagefromclassprobabilityalgorithm import \ CreateRgbImageFromClassProbabilityAlgorithm from enmapboxprocessing.algorithm.fitclassifieralgorithmbase import FitClassifierAlgorithmBase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateSpectralIndicesAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateSpectralIndicesAlgorithm.py index bd8e035c..64a77e5e 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateSpectralIndicesAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_CreateSpectralIndicesAlgorithm.py @@ -3,7 +3,7 @@ from osgeo import gdal -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.createspectralindicesalgorithm import CreateSpectralIndicesAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_FitClustererAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_FitClustererAlgorithm.py index e700df3c..bfba8611 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_FitClustererAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_FitClustererAlgorithm.py @@ -1,6 +1,6 @@ from sklearn.base import ClusterMixin, TransformerMixin -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.fitaffinitypropagationalgorithm import FitAffinityPropagationAlgorithm from enmapboxprocessing.algorithm.fitbirchalgorithm import FitBirchAlgorithm from enmapboxprocessing.algorithm.fitclustereralgorithmbase import FitClustererAlgorithmBase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_FitTransformerAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_FitTransformerAlgorithm.py index b9eb9a5b..fb0a339b 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_FitTransformerAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_FitTransformerAlgorithm.py @@ -1,6 +1,6 @@ from sklearn.base import TransformerMixin -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.fitfactoranalysisalgorithm import FitFactorAnalysisAlgorithm from enmapboxprocessing.algorithm.fitfasticaalgorithm import FitFastIcaAlgorithm from enmapboxprocessing.algorithm.fitfeatureagglomerationalgorithm import FitFeatureAgglomerationAlgorithm diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_ImportEnmapL2AAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_ImportEnmapL2AAlgorithm.py index 8f6a7be5..05f9616c 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_ImportEnmapL2AAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_ImportEnmapL2AAlgorithm.py @@ -20,8 +20,8 @@ def test(self): } result = self.runalg(alg, parameters) self.assertAlmostEqual( - -11535788939.968838, - np.sum(RasterReader(result[alg.P_OUTPUT_RASTER]).array(bandList=[1]), dtype=float) + -11535788939.969, + np.sum(RasterReader(result[alg.P_OUTPUT_RASTER]).array(bandList=[1]), dtype=float), 3 ) def test_OrderByDetectorOverlapOption(self): @@ -65,7 +65,7 @@ def test_VnirOnlyOverlapOption(self): } result = self.runalg(alg, parameters) reader = RasterReader(result[alg.P_OUTPUT_RASTER]) - self.assertEqual(91, reader.bandCount()) + self.assertEqual(214, reader.bandCount()) def test_SwirOnlyOverlapOption(self): if sensorProductsRoot() is None: @@ -80,7 +80,7 @@ def test_SwirOnlyOverlapOption(self): } result = self.runalg(alg, parameters) reader = RasterReader(result[alg.P_OUTPUT_RASTER]) - self.assertEqual(133, reader.bandCount()) + self.assertEqual(212, reader.bandCount()) def test_MovingAverageFilterOverlapOption(self): if sensorProductsRoot() is None: diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_LayerToMaskAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_LayerToMaskAlgorithm.py index cc5f375c..d1756c90 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_LayerToMaskAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_LayerToMaskAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap, landcover_polygon +from enmapboxtestdata import enmap, landcover_polygon from enmapboxprocessing.algorithm.layertomaskalgorithm import LayerToMaskAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictClassProbabilityAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictClassProbabilityAlgorithm.py index 1942a708..7f369756 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictClassProbabilityAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictClassProbabilityAlgorithm.py @@ -1,7 +1,7 @@ import numpy as np from sklearn.base import ClassifierMixin -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.fitclassifieralgorithmbase import FitClassifierAlgorithmBase from enmapboxprocessing.algorithm.predictclassprobabilityalgorithm import PredictClassPropabilityAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictClassificationAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictClassificationAlgorithm.py index 487bb9a6..08fb5911 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictClassificationAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictClassificationAlgorithm.py @@ -1,7 +1,7 @@ import numpy as np from sklearn.base import ClassifierMixin -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.fitclassifieralgorithmbase import FitClassifierAlgorithmBase from enmapboxprocessing.algorithm.predictclassificationalgorithm import PredictClassificationAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictRegressionAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictRegressionAlgorithm.py index a39affbb..90cd4645 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictRegressionAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PredictRegressionAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.predictregressionalgorithm import PredictRegressionAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedLibraryAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedLibraryAlgorithm.py index 73c1c969..267936ad 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedLibraryAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedLibraryAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import library_gpkg +from enmapboxtestdata import library_gpkg from enmapboxprocessing.algorithm.prepareclassificationdatasetfromcategorizedlibraryalgorithm import \ PrepareClassificationDatasetFromCategorizedLibraryAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedRasterAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedRasterAlgorithm.py index 632ff91e..5275c2cc 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedRasterAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedRasterAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap_potsdam +from enmapboxtestdata import enmap_potsdam from enmapboxprocessing.algorithm.prepareclassificationdatasetfromcategorizedrasteralgorithm import \ PrepareClassificationDatasetFromCategorizedRasterAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedVectorAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedVectorAlgorithm.py index a017c39d..a7666d65 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedVectorAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareClassificationDatasetFromCategorizedVectorAlgorithm.py @@ -1,10 +1,10 @@ -from enmapbox.exampledata import enmap_potsdam, landcover_potsdam_polygon from enmapboxprocessing.algorithm.prepareclassificationdatasetfromcategorizedvectoralgorithm import \ PrepareClassificationDatasetFromCategorizedVectorAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.typing import ClassifierDump from enmapboxprocessing.utils import Utils -from enmapboxtestdata import points_in_no_data_region, enmap, landcover_polygon, landcover_point +from enmapboxtestdata import points_in_no_data_region, enmap, landcover_polygon, landcover_point, enmap_potsdam, \ + landcover_potsdam_polygon class TestPrepareClassificationSampleFromCategorizedVectorAlgorithm(TestCase): diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousLibraryAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousLibraryAlgorithm.py index c65ec334..7ebadfb1 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousLibraryAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousLibraryAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import library_gpkg +from enmapboxtestdata import library_gpkg from enmapboxprocessing.algorithm.prepareregressiondatasetfromcontinuouslibraryalgorithm import \ PrepareRegressionDatasetFromContinuousLibraryAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousRasterAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousRasterAlgorithm.py index 66f50afa..36a5ff56 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousRasterAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousRasterAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap_potsdam +from enmapboxtestdata import enmap_potsdam from enmapboxprocessing.algorithm.prepareregressiondatasetfromcontinuousrasteralgorithm import \ PrepareRegressionDatasetFromContinuousRasterAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousVectorAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousVectorAlgorithm.py index 8c95f273..77db567e 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousVectorAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareRegressionDatasetFromContinuousVectorAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap_potsdam, landcover_potsdam_point +from enmapboxtestdata import enmap_potsdam, landcover_potsdam_point from enmapboxprocessing.algorithm.prepareregressiondatasetfromcontinuousvectoralgorithm import \ PrepareRegressionDatasetFromContinuousVectorAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareUnsupervisedDatasetFromLibraryAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareUnsupervisedDatasetFromLibraryAlgorithm.py index 97514822..4cc71a3f 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareUnsupervisedDatasetFromLibraryAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareUnsupervisedDatasetFromLibraryAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import library_gpkg +from enmapboxtestdata import library_gpkg from enmapboxprocessing.algorithm.prepareunsuperviseddatasetfromlibraryalgorithm import \ PrepareUnsupervisedDatasetFromLibraryAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareUnsupervisedDatasetFromRasterAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareUnsupervisedDatasetFromRasterAlgorithm.py index c2c2af55..69bb3e3e 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareUnsupervisedDatasetFromRasterAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_PrepareUnsupervisedDatasetFromRasterAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap_potsdam +from enmapboxtestdata import enmap_potsdam from enmapboxprocessing.algorithm.prepareunsuperviseddatasetfromrasteralgorithm import \ PrepareUnsupervisedDatasetFromRasterAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_RandomPointsInMaskAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_RandomPointsInMaskAlgorithm.py index 9f0eae88..eb1c553e 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_RandomPointsInMaskAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_RandomPointsInMaskAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.randompointsfrommaskrasteralgorithm import RandomPointsFromMaskRasterAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from qgis.core import QgsRasterLayer diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterLayerZonalAggregationAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterLayerZonalAggregationAlgorithm.py index a0e1b10b..5f290449 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterLayerZonalAggregationAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterLayerZonalAggregationAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.rasterlayerzonalaggregationalgorithm import RasterLayerZonalAggregationAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxtestdata import landcover_map_l3 diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterizeCategorizedVectorAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterizeCategorizedVectorAlgorithm.py index 249d0104..174fc4c5 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterizeCategorizedVectorAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterizeCategorizedVectorAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap, landcover_polygon +from enmapboxtestdata import enmap, landcover_polygon from enmapboxprocessing.algorithm.rasterizecategorizedvectoralgorithm import RasterizeCategorizedVectorAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterizeVectorAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterizeVectorAlgorithm.py index e630ba6a..13a232df 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterizeVectorAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_RasterizeVectorAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap, landcover_polygon +from enmapboxtestdata import enmap, landcover_polygon from enmapboxprocessing.algorithm.rasterizevectoralgorithm import RasterizeVectorAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_RegressionBasedUnmixingAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_RegressionBasedUnmixingAlgorithm.py index f516dcbb..45073e8f 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_RegressionBasedUnmixingAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_RegressionBasedUnmixingAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.fitrandomforestregressoralgorithm import FitRandomForestRegressorAlgorithm from enmapboxprocessing.algorithm.regressionbasedunmixingalgorithm import RegressionBasedUnmixingAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_RegressionWorkflowAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_RegressionWorkflowAlgorithm.py index 5c8e5fa6..1c612517 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_RegressionWorkflowAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_RegressionWorkflowAlgorithm.py @@ -1,6 +1,6 @@ from sklearn.base import RegressorMixin -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.fitclassifieralgorithmbase import FitClassifierAlgorithmBase from enmapboxprocessing.algorithm.regressionworkflowalgorithm import RegressionWorkflowAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_RocCurveAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_RocCurveAlgorithm.py index c787ee30..2004102e 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_RocCurveAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_RocCurveAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import landcover_polygon +from enmapboxtestdata import landcover_polygon from enmapboxprocessing.algorithm.roccurvealgorithm import RocCurveAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxtestdata import fraction_map_l3, fraction_polygon_l3, landcover_polygon_3classes diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_SampleRasterValuesAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_SampleRasterValuesAlgorithm.py index b1b0a0eb..1c5dd54a 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_SampleRasterValuesAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_SampleRasterValuesAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap, landcover_polygon +from enmapboxtestdata import enmap, landcover_polygon from enmapboxprocessing.algorithm.samplerastervaluesalgorithm import SampleRasterValuesAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxtestdata import landcover_points_singlepart_epsg3035 diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_SaveLibraryAsGeoJsonAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_SaveLibraryAsGeoJsonAlgorithm.py index c700b9b9..098222d6 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_SaveLibraryAsGeoJsonAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_SaveLibraryAsGeoJsonAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import library_gpkg +from enmapboxtestdata import library_gpkg from enmapboxprocessing.algorithm.savelibraryasgeojsonalgorithm import SaveLibraryAsGeoJsonAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_SaveRasterAsAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_SaveRasterAsAlgorithm.py index 8100df18..16f5cadb 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_SaveRasterAsAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_SaveRasterAsAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap, hires +from enmapboxtestdata import enmap, hires from enmapboxprocessing.algorithm.saverasterlayerasalgorithm import SaveRasterAsAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_SpatialFilterFunctionAlgorithmBase.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_SpatialFilterFunctionAlgorithmBase.py index d84576cf..403d8abb 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_SpatialFilterFunctionAlgorithmBase.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_SpatialFilterFunctionAlgorithmBase.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import hires +from enmapboxtestdata import hires from enmapboxprocessing.algorithm.spatialgaussiangradientmagnitudealgorithm import \ SpatialGaussianGradientMagnitudeAlgorithm from enmapboxprocessing.algorithm.spatiallaplacealgorithm import SpatialLaplaceAlgorithm diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingByResponseFunctionConvolutionAlgorithmBase.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingByResponseFunctionConvolutionAlgorithmBase.py index 75f8b786..dcfbb0a6 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingByResponseFunctionConvolutionAlgorithmBase.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingByResponseFunctionConvolutionAlgorithmBase.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.spectralresamplingtodesisalgorithm import SpectralResamplingToDesisAlgorithm from enmapboxprocessing.algorithm.spectralresamplingtoenmapalgorithm import SpectralResamplingToEnmapAlgorithm from enmapboxprocessing.algorithm.spectralresamplingtolandsat5algorithm import SpectralResamplingToLandsat5Algorithm diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingByResponseFunctionLibraryAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingByResponseFunctionLibraryAlgorithm.py index 61db28a0..79116e11 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingByResponseFunctionLibraryAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingByResponseFunctionLibraryAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap, enmap_srf_library +from enmapboxtestdata import enmap, enmap_srf_library from enmapboxprocessing.algorithm.spectralresamplingbyresponsefunctionlibraryalgorithm import \ SpectralResamplingByResponseFunctionLibraryAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingBySpectralRasterWavelengthAndFwhmAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingBySpectralRasterWavelengthAndFwhmAlgorithm.py index f80cdc75..f41f1a7c 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingBySpectralRasterWavelengthAndFwhmAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_SpectralResamplingBySpectralRasterWavelengthAndFwhmAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.spectralresamplingbyspectralrasterwavelengthandfwhmalgorithm import \ SpectralResamplingBySpectralRasterWavelengthAndFwhmAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_StackRasterLayersAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_StackRasterLayersAlgorithm.py index 8dc2a1e1..b7126d07 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_StackRasterLayersAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_StackRasterLayersAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap, hires +from enmapboxtestdata import enmap, hires from enmapboxprocessing.algorithm.stackrasterlayersalgorithm import StackRasterLayersAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_SubsetRasterBandsAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_SubsetRasterBandsAlgorithm.py index 3473af00..743202fe 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_SubsetRasterBandsAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_SubsetRasterBandsAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.subsetrasterbandsalgorithm import SubsetRasterBandsAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.driver import Driver diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_TransformRasterAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_TransformRasterAlgorithm.py index 722d42b1..499702ee 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_TransformRasterAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_TransformRasterAlgorithm.py @@ -1,7 +1,7 @@ import numpy as np from sklearn.base import TransformerMixin -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.fittransformeralgorithmbase import FitTransformerAlgorithmBase from enmapboxprocessing.algorithm.inversetransformrasteralgorithm import InverseTransformRasterAlgorithm from enmapboxprocessing.algorithm.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_TranslateClassificationAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_TranslateClassificationAlgorithm.py index 393cc21e..153a9978 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_TranslateClassificationAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_TranslateClassificationAlgorithm.py @@ -1,6 +1,6 @@ import numpy as np -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.algorithm.translatecategorizedrasteralgorithm import TranslateCategorizedRasterAlgorithm from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_TranslateRasterAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_TranslateRasterAlgorithm.py index 61e892d4..99563178 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_TranslateRasterAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_TranslateRasterAlgorithm.py @@ -3,7 +3,7 @@ import numpy as np from osgeo import gdal -from enmapbox.exampledata import enmap, hires +from enmapboxtestdata import enmap, hires from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.algorithm.translaterasteralgorithm import TranslateRasterAlgorithm from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_VrtBandMathAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_VrtBandMathAlgorithm.py index 4c347379..e62604bd 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_VrtBandMathAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_VrtBandMathAlgorithm.py @@ -1,4 +1,4 @@ -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.algorithm.vrtbandmathalgorithm import VrtBandMathAlgorithm diff --git a/tests/enmap-box/enmapboxprocessing/algorithm/test_WriteEnviHeaderAlgorithm.py b/tests/enmap-box/enmapboxprocessing/algorithm/test_WriteEnviHeaderAlgorithm.py index b0fdffba..556badce 100644 --- a/tests/enmap-box/enmapboxprocessing/algorithm/test_WriteEnviHeaderAlgorithm.py +++ b/tests/enmap-box/enmapboxprocessing/algorithm/test_WriteEnviHeaderAlgorithm.py @@ -1,6 +1,6 @@ from osgeo import gdal -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.algorithm.testcase import TestCase from enmapboxprocessing.algorithm.writeenviheaderalgorithm import WriteEnviHeaderAlgorithm from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/enmap-box/enmapboxprocessing/test_rasterdriver.py b/tests/enmap-box/enmapboxprocessing/test_rasterdriver.py index a932af83..dcc32c4b 100644 --- a/tests/enmap-box/enmapboxprocessing/test_rasterdriver.py +++ b/tests/enmap-box/enmapboxprocessing/test_rasterdriver.py @@ -1,7 +1,8 @@ import numpy as np from osgeo import gdal -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap + from enmapboxprocessing.driver import Driver from enmapboxprocessing.rasterreader import RasterReader from enmapboxprocessing.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/test_rasterreader.py b/tests/enmap-box/enmapboxprocessing/test_rasterreader.py index e139436b..9aa7cf05 100644 --- a/tests/enmap-box/enmapboxprocessing/test_rasterreader.py +++ b/tests/enmap-box/enmapboxprocessing/test_rasterreader.py @@ -1,7 +1,7 @@ import numpy as np from osgeo import gdal -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.rasterblockinfo import RasterBlockInfo from enmapboxprocessing.rasterreader import RasterReader from enmapboxprocessing.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/test_rasterwriter.py b/tests/enmap-box/enmapboxprocessing/test_rasterwriter.py index 6f9ab5a2..22bc488d 100644 --- a/tests/enmap-box/enmapboxprocessing/test_rasterwriter.py +++ b/tests/enmap-box/enmapboxprocessing/test_rasterwriter.py @@ -1,7 +1,7 @@ import numpy as np from osgeo import gdal -from enmapbox.exampledata import enmap +from enmapboxtestdata import enmap from enmapboxprocessing.rasterreader import RasterReader from enmapboxprocessing.rasterwriter import RasterWriter from enmapboxprocessing.testcase import TestCase diff --git a/tests/enmap-box/enmapboxprocessing/test_utils.py b/tests/enmap-box/enmapboxprocessing/test_utils.py index 694bdf6f..8bd443c4 100644 --- a/tests/enmap-box/enmapboxprocessing/test_utils.py +++ b/tests/enmap-box/enmapboxprocessing/test_utils.py @@ -3,7 +3,7 @@ import numpy as np from osgeo import gdal -from enmapbox.exampledata import landcover_polygon, enmap, hires +from enmapboxtestdata import landcover_polygon, enmap, hires from enmapbox.qgispluginsupport.qps.utils import SpatialPoint, SpatialExtent from enmapbox.testing import start_app from enmapboxprocessing.rasterreader import RasterReader diff --git a/tests/src/enmapboxtestdata.py b/tests/src/enmapboxtestdata.py index 75241d75..58a56957 100644 --- a/tests/src/enmapboxtestdata.py +++ b/tests/src/enmapboxtestdata.py @@ -4,18 +4,34 @@ from os.path import join, dirname, abspath from typing import Optional -import enmapboxexampledata.berlin +import enmapbox.exampledata _root = abspath(join(dirname(dirname(__file__)), 'testdata')) -root2 = dirname(enmapboxexampledata.berlin.__file__) + +# Berlin example data +# ...this is the old example dataset, which we still need for unittests +_subdir = 'exampledata/berlin' +enmap_berlin = join(_root, _subdir, 'enmap_berlin.bsq') +enmap_srf_library = join(dirname(__file__), 'enmap_srf_library.gpkg') +hires_berlin = join(_root, _subdir, 'hires_berlin.bsq') +landcover_berlin_point = join(_root, _subdir, 'landcover_berlin_point.gpkg') +landcover_berlin_polygon = join(_root, _subdir, 'landcover_berlin_polygon.gpkg') +library_berlin = join(_root, _subdir, 'library_berlin.gpkg') +veg_cover_fraction_berlin_point = join(_root, _subdir, 'veg-cover-fraction_berlin_point.gpkg') + +# Potsdam example data +# ...current example dataset is placed under enmapbox.exampledata +enmap_potsdam = enmapbox.exampledata.enmap_potsdam +landcover_potsdam_polygon = enmapbox.exampledata.landcover_potsdam_polygon +landcover_potsdam_point = enmapbox.exampledata.landcover_potsdam_point + +# connect old shortcuts (requested by @jakimow) +enmap = enmap_berlin +hires = hires_berlin +library_gpkg = library_berlin # RASTER _subdir = 'raster' - -# - spectral raster -enmap = join(root2, 'enmap_berlin.bsq') -hires = join(root2, 'hires_berlin.bsq') - # - rasterized landcover polygons landcover_polygon_1m = join(_root, _subdir, 'landcover_polygon_1m.tif') landcover_polygon_1m_3classes = join(_root, _subdir, 'landcover_polygon_1m_3classes.tif') @@ -43,13 +59,13 @@ _subdir = 'vector' # - landcover polygons -landcover_polygon = join(root2, 'landcover_berlin_polygon.gpkg') +landcover_polygon = landcover_berlin_polygon landcover_polygon_3classes = join(_root, _subdir, 'landcover_polygon_3classes.gpkg') landcover_polygon_3classes_id = join(_root, _subdir, 'landcover_polygon_3classes_id.gpkg') landcover_polygon_3classes_epsg4326 = join(_root, _subdir, 'landcover_polygon_3classes_EPSG4326.gpkg') # - landcover points -landcover_point = join(root2, 'landcover_berlin_point.gpkg') +landcover_point = landcover_berlin_point landcover_points_singlepart_epsg3035 = join(_root, _subdir, 'landcover_point_singlepart_3035.gpkg') landcover_points_multipart_epsg3035 = join(_root, _subdir, 'landcover_point_multipart_3035.gpkg') diff --git a/tests/testdata/exampledata/berlin/enmap_berlin.bsq b/tests/testdata/exampledata/berlin/enmap_berlin.bsq new file mode 100644 index 00000000..a9445a60 Binary files /dev/null and b/tests/testdata/exampledata/berlin/enmap_berlin.bsq differ diff --git a/tests/testdata/exampledata/berlin/enmap_berlin.hdr b/tests/testdata/exampledata/berlin/enmap_berlin.hdr new file mode 100644 index 00000000..faac451c --- /dev/null +++ b/tests/testdata/exampledata/berlin/enmap_berlin.hdr @@ -0,0 +1,98 @@ +ENVI +description = {EnMAP02_Berlin_Urban_Gradient_2009.bsq, http://doi.org/10.5880/enmap.2016.008, spectral and spatial subset} +samples = 220 +lines = 400 +bands = 177 +header offset = 0 +file type = ENVI Standard +data type = 2 +interleave = bsq +sensor type = Unknown +acquisition time = 2009-08-20T09:44:50 +byte order = 0 +y start = 24 +map info = {UTM, 1.000, 1.000, 380952.370, 5820372.350, 3.0000000000e+001, 3.0000000000e+001, 33, North, WGS-84, units=Meters} +coordinate system string = {PROJCS["UTM_Zone_33N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",15.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]} +wavelength units = Micrometers +z plot titles = {wavelength [!7l!3m]!N, reflectance [*10000]} +data ignore value = -99 +band names = { +band 8, band 9, band 10, band 11, band 12, band 13, band 14, band 15, +band 16, band 17, band 18, band 19, band 20, band 21, band 22, band 23, +band 24, band 25, band 26, band 27, band 28, band 29, band 30, band 31, +band 32, band 33, band 34, band 35, band 36, band 37, band 38, band 39, +band 40, band 41, band 42, band 43, band 44, band 45, band 46, band 47, +band 48, band 49, band 50, band 51, band 52, band 53, band 54, band 55, +band 56, band 57, band 58, band 59, band 60, band 61, band 62, band 63, +band 64, band 65, band 66, band 67, band 68, band 69, band 70, band 71, +band 72, band 73, band 74, band 75, band 76, band 77, band 91, band 92, +band 93, band 94, band 95, band 96, band 97, band 98, band 99, band 100, +band 101, band 102, band 103, band 104, band 105, band 106, band 107, +band 108, band 109, band 110, band 111, band 112, band 113, band 114, +band 115, band 116, band 117, band 118, band 119, band 120, band 121, +band 122, band 123, band 124, band 125, band 126, band 127, band 144, +band 145, band 146, band 147, band 148, band 149, band 150, band 151, +band 152, band 153, band 154, band 155, band 156, band 157, band 158, +band 159, band 160, band 161, band 162, band 163, band 164, band 165, +band 166, band 167, band 168, band 195, band 196, band 197, band 198, +band 199, band 200, band 201, band 202, band 203, band 204, band 205, +band 206, band 207, band 208, band 209, band 210, band 211, band 212, +band 213, band 214, band 215, band 216, band 217, band 218, band 219, +band 220, band 221, band 222, band 223, band 224, band 225, band 226, +band 227, band 228, band 229, band 230, band 231, band 232, band 233, +band 234, band 235, band 236, band 237, band 238, band 239} +wavelength = { + 0.460000, 0.465000, 0.470000, 0.475000, 0.479000, 0.484000, 0.489000, + 0.494000, 0.499000, 0.503000, 0.508000, 0.513000, 0.518000, 0.523000, + 0.528000, 0.533000, 0.538000, 0.543000, 0.549000, 0.554000, 0.559000, + 0.565000, 0.570000, 0.575000, 0.581000, 0.587000, 0.592000, 0.598000, + 0.604000, 0.610000, 0.616000, 0.622000, 0.628000, 0.634000, 0.640000, + 0.646000, 0.653000, 0.659000, 0.665000, 0.672000, 0.679000, 0.685000, + 0.692000, 0.699000, 0.706000, 0.713000, 0.720000, 0.727000, 0.734000, + 0.741000, 0.749000, 0.756000, 0.763000, 0.771000, 0.778000, 0.786000, + 0.793000, 0.801000, 0.809000, 0.817000, 0.824000, 0.832000, 0.840000, + 0.848000, 0.856000, 0.864000, 0.872000, 0.880000, 0.888000, 0.896000, + 0.915000, 0.924000, 0.934000, 0.944000, 0.955000, 0.965000, 0.975000, + 0.986000, 0.997000, 1.007000, 1.018000, 1.029000, 1.040000, 1.051000, + 1.063000, 1.074000, 1.086000, 1.097000, 1.109000, 1.120000, 1.132000, + 1.144000, 1.155000, 1.167000, 1.179000, 1.191000, 1.203000, 1.215000, + 1.227000, 1.239000, 1.251000, 1.263000, 1.275000, 1.287000, 1.299000, + 1.311000, 1.323000, 1.522000, 1.534000, 1.545000, 1.557000, 1.568000, + 1.579000, 1.590000, 1.601000, 1.612000, 1.624000, 1.634000, 1.645000, + 1.656000, 1.667000, 1.678000, 1.689000, 1.699000, 1.710000, 1.721000, + 1.731000, 1.742000, 1.752000, 1.763000, 1.773000, 1.783000, 2.044000, + 2.053000, 2.062000, 2.071000, 2.080000, 2.089000, 2.098000, 2.107000, + 2.115000, 2.124000, 2.133000, 2.141000, 2.150000, 2.159000, 2.167000, + 2.176000, 2.184000, 2.193000, 2.201000, 2.210000, 2.218000, 2.226000, + 2.234000, 2.243000, 2.251000, 2.259000, 2.267000, 2.275000, 2.283000, + 2.292000, 2.300000, 2.308000, 2.315000, 2.323000, 2.331000, 2.339000, + 2.347000, 2.355000, 2.363000, 2.370000, 2.378000, 2.386000, 2.393000, + 2.401000, 2.409000} +fwhm = { + 0.005800, 0.005800, 0.005800, 0.005800, 0.005800, 0.005800, 0.005800, + 0.005800, 0.005800, 0.005800, 0.005900, 0.005900, 0.006000, 0.006000, + 0.006100, 0.006100, 0.006200, 0.006200, 0.006300, 0.006400, 0.006400, + 0.006500, 0.006600, 0.006600, 0.006700, 0.006800, 0.006900, 0.006900, + 0.007000, 0.007100, 0.007200, 0.007300, 0.007300, 0.007400, 0.007500, + 0.007600, 0.007700, 0.007800, 0.007900, 0.007900, 0.008000, 0.008100, + 0.008200, 0.008300, 0.008400, 0.008400, 0.008500, 0.008600, 0.008700, + 0.008700, 0.008800, 0.008900, 0.008900, 0.009000, 0.009100, 0.009100, + 0.009200, 0.009300, 0.009300, 0.009400, 0.009400, 0.009500, 0.009500, + 0.009600, 0.009600, 0.009600, 0.009600, 0.009700, 0.009700, 0.009700, + 0.011800, 0.011900, 0.012100, 0.012200, 0.012400, 0.012500, 0.012700, + 0.012800, 0.012900, 0.013100, 0.013200, 0.013300, 0.013400, 0.013500, + 0.013600, 0.013700, 0.013800, 0.013900, 0.014000, 0.014000, 0.014100, + 0.014100, 0.014200, 0.014200, 0.014300, 0.014300, 0.014300, 0.014400, + 0.014400, 0.014400, 0.014400, 0.014400, 0.014400, 0.014400, 0.014400, + 0.014400, 0.014400, 0.013700, 0.013600, 0.013600, 0.013500, 0.013500, + 0.013400, 0.013400, 0.013300, 0.013200, 0.013200, 0.013100, 0.013100, + 0.013000, 0.012900, 0.012900, 0.012800, 0.012800, 0.012700, 0.012700, + 0.012600, 0.012500, 0.012500, 0.012400, 0.012400, 0.012300, 0.010900, + 0.010800, 0.010800, 0.010700, 0.010700, 0.010600, 0.010600, 0.010500, + 0.010500, 0.010400, 0.010400, 0.010400, 0.010300, 0.010300, 0.010200, + 0.010200, 0.010100, 0.010100, 0.010100, 0.010000, 0.010000, 0.009900, + 0.009900, 0.009900, 0.009800, 0.009800, 0.009700, 0.009700, 0.009700, + 0.009600, 0.009600, 0.009600, 0.009500, 0.009500, 0.009400, 0.009400, + 0.009400, 0.009300, 0.009300, 0.009300, 0.009200, 0.009200, 0.009100, + 0.009100, 0.009100} +reflectance scale factor = 10000 \ No newline at end of file diff --git a/tests/testdata/exampledata/berlin/enmap_berlin.qml b/tests/testdata/exampledata/berlin/enmap_berlin.qml new file mode 100644 index 00000000..4723a1c8 --- /dev/null +++ b/tests/testdata/exampledata/berlin/enmap_berlin.qml @@ -0,0 +1,54 @@ + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + CumulativeCut + WholeRaster + Exact + 0.02 + 0.98 + 2 + + + 183 + 1370 + StretchToMinimumMaximum + + + 279 + 1275 + StretchToMinimumMaximum + + + 174 + 1055 + StretchToMinimumMaximum + + + + + + resamplingFilter + + 0 + diff --git a/tests/testdata/exampledata/berlin/enmap_srf_library.gpkg b/tests/testdata/exampledata/berlin/enmap_srf_library.gpkg new file mode 100644 index 00000000..dfad700f Binary files /dev/null and b/tests/testdata/exampledata/berlin/enmap_srf_library.gpkg differ diff --git a/tests/testdata/exampledata/berlin/hires_berlin.bsq b/tests/testdata/exampledata/berlin/hires_berlin.bsq new file mode 100644 index 00000000..9d1a01ce Binary files /dev/null and b/tests/testdata/exampledata/berlin/hires_berlin.bsq differ diff --git a/tests/testdata/exampledata/berlin/hires_berlin.hdr b/tests/testdata/exampledata/berlin/hires_berlin.hdr new file mode 100644 index 00000000..43eb5777 --- /dev/null +++ b/tests/testdata/exampledata/berlin/hires_berlin.hdr @@ -0,0 +1,16 @@ +ENVI +description = {Create New File Result [Tue Oct 23 00:22:35 2018]} +samples = 800 +lines = 3327 +bands = 3 +header offset = 0 +file type = ENVI Standard +data type = 1 +interleave = bsq +byte order = 0 +map info = {UTM, 1.000, 1.000, 382857.970, 5820373.550, 3.6000000000e+000, 3.6000000000e+000, 33, North, WGS-84, units=Meters} +coordinate system string = {PROJCS["UTM_Zone_33N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",15.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]} +band names = {Red, Green, Blue} +data ignore value = 0 +wavelength = {665, 560, 490} +wavelength units = nanometers \ No newline at end of file diff --git a/tests/testdata/exampledata/berlin/landcover_berlin_point.gpkg b/tests/testdata/exampledata/berlin/landcover_berlin_point.gpkg new file mode 100644 index 00000000..be6770c8 Binary files /dev/null and b/tests/testdata/exampledata/berlin/landcover_berlin_point.gpkg differ diff --git a/tests/testdata/exampledata/berlin/landcover_berlin_polygon.gpkg b/tests/testdata/exampledata/berlin/landcover_berlin_polygon.gpkg new file mode 100644 index 00000000..2e0c8066 Binary files /dev/null and b/tests/testdata/exampledata/berlin/landcover_berlin_polygon.gpkg differ diff --git a/tests/testdata/exampledata/berlin/library_berlin.qml b/tests/testdata/exampledata/berlin/library_berlin.qml new file mode 100644 index 00000000..8df5aec3 --- /dev/null +++ b/tests/testdata/exampledata/berlin/library_berlin.qml @@ -0,0 +1,741 @@ + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + "level_1_id" + + 0 + diff --git a/tests/testdata/exampledata/berlin/readme_enmapboxtestdata.pdf b/tests/testdata/exampledata/berlin/readme_enmapboxtestdata.pdf new file mode 100644 index 00000000..97cd9d32 Binary files /dev/null and b/tests/testdata/exampledata/berlin/readme_enmapboxtestdata.pdf differ diff --git a/tests/testdata/exampledata/berlin/veg-cover-fraction_berlin_point.gpkg b/tests/testdata/exampledata/berlin/veg-cover-fraction_berlin_point.gpkg new file mode 100644 index 00000000..a967e86f Binary files /dev/null and b/tests/testdata/exampledata/berlin/veg-cover-fraction_berlin_point.gpkg differ