From fa24810214fcfa203f17443fa55387aaff24d5f1 Mon Sep 17 00:00:00 2001 From: Bert Temme Date: Tue, 23 Jul 2024 15:33:16 +0200 Subject: [PATCH] fix empty property values --- src/GPUTileHandler.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/GPUTileHandler.cs b/src/GPUTileHandler.cs index 7dce7f6..b232c14 100644 --- a/src/GPUTileHandler.cs +++ b/src/GPUTileHandler.cs @@ -161,9 +161,13 @@ private static PropertyTable GetPropertyTable(StructuralMetadataClass schemaClas // todo: use other types than string var strings = values.Select(s => s.ToString()).ToArray(); - propertyTable - .UseProperty(nameProperty) - .SetValues(strings); + // if all values are empty strings, then do not add the property + if (!strings.All(s => string.IsNullOrEmpty(s))) + { + propertyTable + .UseProperty(nameProperty) + .SetValues(strings); + } } return propertyTable;