Skip to content

Commit

Permalink
Try catch ignore if some weird relation is problematic
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidKarlas committed Mar 12, 2024
1 parent f953453 commit a50dedc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion OsmGursBuildingImport/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,15 @@ private static STRtree<GeoOsmWithGeometry> LoadOsmData(string path)
foreach (var osmGeo in osmStream)
{
var osmGeoComplete = osmGeo.CreateComplete(db);
var featureCollection = interpreter.Interpret(osmGeoComplete);
NetTopologySuite.Features.FeatureCollection? featureCollection = null;
try
{
featureCollection = interpreter.Interpret(osmGeoComplete);
}
catch (Exception)
{
continue;
}
if (featureCollection.Count != 1)
{
if (osmGeo is not Node)
Expand Down

0 comments on commit a50dedc

Please sign in to comment.