diff --git a/OsmToDatabase.Peaks/Program.cs b/OsmToDatabase.Peaks/Program.cs index c1e338c..d11008a 100644 --- a/OsmToDatabase.Peaks/Program.cs +++ b/OsmToDatabase.Peaks/Program.cs @@ -5,6 +5,7 @@ using OsmToDatabase.Common; OsmContext db = new OsmContext(); long counter = 0; + using (var fileStream = new FileInfo(args[0]).OpenRead()) { var source = new PBFOsmStreamSource(fileStream); @@ -17,6 +18,12 @@ using (var fileStream = new FileInfo(args[0]).OpenRead()) continue; } + // Skip if elevation is missing. + if (node.TagDoubleValueByKey("ele") is null) + { + continue; + } + Peak peak = new Peak { Id = node.Id.Value,