mirror of
https://onedev.fprog.nl/OsmToDatabase
synced 2025-12-20 21:58:36 +01:00
Skip nodes with missing elevation data.
This commit is contained in:
parent
921f28d913
commit
1743a04af7
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue