diff --git a/felt/core/fsl_converter.py b/felt/core/fsl_converter.py index d1fb190..b1a0967 100644 --- a/felt/core/fsl_converter.py +++ b/felt/core/fsl_converter.py @@ -1610,7 +1610,7 @@ def paletted_renderer_to_fsl( colors = [] labels = {} for _class in renderer.classes(): - categories.append(_class.value) + categories.append(str(_class.value)) colors.append(_class.color.name()) labels[str(_class.value)] = _class.label return { diff --git a/felt/core/layer_exporter.py b/felt/core/layer_exporter.py index 62992e4..7b34b86 100644 --- a/felt/core/layer_exporter.py +++ b/felt/core/layer_exporter.py @@ -243,7 +243,7 @@ def representative_layer_style( ) if fsl: - fsl['version'] = '2.1' + fsl['version'] = '2.1.1' return LayerStyle( fsl=fsl diff --git a/felt/test/test_fsl_conversion.py b/felt/test/test_fsl_conversion.py index b63e29a..9d19441 100644 --- a/felt/test/test_fsl_conversion.py +++ b/felt/test/test_fsl_conversion.py @@ -2010,7 +2010,7 @@ def test_convert_paletted_raster(self): self.assertEqual(FslConverter.raster_renderer_to_fsl( renderer, context), - {'config': {'band': 1, 'categories': [120.0, 125.0, 130.0]}, + {'config': {'band': 1, 'categories': ['120.0', '125.0', '130.0']}, 'legend': {'displayName': {'120.0': 'lowest', '125.0': 'mid', '130.0': 'highest'}}, @@ -2026,7 +2026,7 @@ def test_convert_paletted_raster(self): self.assertEqual(FslConverter.raster_renderer_to_fsl( renderer, context), - {'config': {'band': 2, 'categories': [120.0, 125.0, 130.0]}, + {'config': {'band': 2, 'categories': ['120.0', '125.0', '130.0']}, 'legend': {'displayName': {'120.0': 'lowest', '125.0': 'mid', '130.0': 'highest'}},