mirror of
https://onedev.fprog.nl/OsmToDatabase
synced 2025-12-21 19:58:37 +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();
|
OsmContext db = new OsmContext();
|
||||||
long counter = 0;
|
long counter = 0;
|
||||||
|
|
||||||
|
|
||||||
using (var fileStream = new FileInfo(args[0]).OpenRead())
|
using (var fileStream = new FileInfo(args[0]).OpenRead())
|
||||||
{
|
{
|
||||||
var source = new PBFOsmStreamSource(fileStream);
|
var source = new PBFOsmStreamSource(fileStream);
|
||||||
|
|
@ -17,6 +18,12 @@ using (var fileStream = new FileInfo(args[0]).OpenRead())
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip if elevation is missing.
|
||||||
|
if (node.TagDoubleValueByKey("ele") is null)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Peak peak = new Peak
|
Peak peak = new Peak
|
||||||
{
|
{
|
||||||
Id = node.Id.Value,
|
Id = node.Id.Value,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue