Skip to content

Commit

Permalink
Merge pull request #67 from Geodan/fix_expty_property_values
Browse files Browse the repository at this point in the history
fix empty property values
  • Loading branch information
bertt authored Jul 23, 2024
2 parents 3af548d + fa24810 commit 4deffc2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/GPUTileHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4deffc2

Please sign in to comment.