Skip to content

Commit

Permalink
Use single to get localized text
Browse files Browse the repository at this point in the history
  • Loading branch information
tschumpr committed Apr 30, 2024
1 parent 51ccf10 commit ccb98a3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Geodatenbezug/Processors/NutzungsflaechenProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Xml;
using System.Xml;
using System.Xml.Serialization;
using Geodatenbezug.Models;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -231,12 +231,12 @@ private async Task CreateNutzungsartLayerAsync()
using var feature = new Feature(nutzungsartLayer.GetLayerDefn());
feature.SetField(lnfCodeName, entry.LnfCode);
feature.SetField(istBffQiName, entry.IstBFFQI ? 1 : 0);
feature.SetField(hauptkategorieDeName, entry.Hauptkategorie.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.FirstOrDefault(t => t.Language == "de").Text);
feature.SetField(hauptkategorieFrName, entry.Hauptkategorie.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.FirstOrDefault(t => t.Language == "fr").Text);
feature.SetField(hauptkategorieItName, entry.Hauptkategorie.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.FirstOrDefault(t => t.Language == "it").Text);
feature.SetField(nutzungDeName, entry.Nutzung.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.FirstOrDefault(t => t.Language == "de").Text);
feature.SetField(nutzungFrName, entry.Nutzung.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.FirstOrDefault(t => t.Language == "fr").Text);
feature.SetField(nutzungItName, entry.Nutzung.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.FirstOrDefault(t => t.Language == "it").Text);
feature.SetField(hauptkategorieDeName, entry.Hauptkategorie.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.Single(t => t.Language == "de").Text);
feature.SetField(hauptkategorieFrName, entry.Hauptkategorie.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.Single(t => t.Language == "fr").Text);
feature.SetField(hauptkategorieItName, entry.Hauptkategorie.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.Single(t => t.Language == "it").Text);
feature.SetField(nutzungDeName, entry.Nutzung.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.Single(t => t.Language == "de").Text);
feature.SetField(nutzungFrName, entry.Nutzung.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.Single(t => t.Language == "fr").Text);
feature.SetField(nutzungItName, entry.Nutzung.LocalisationCHV1MultilingualText.LocalisedText.LocalisationCHV1LocalisedText.Single(t => t.Language == "it").Text);
nutzungsartLayer.CreateFeature(feature);
});
}
Expand Down

0 comments on commit ccb98a3

Please sign in to comment.