From 5cdba58ea47823ef003722157c2ea76df0b65671 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 19 Feb 2024 13:47:11 +0000 Subject: [PATCH] Added new coverage results for develop --- ...Itinero.Geo_AttributesTableExtensions.html | 4 +- develop/Itinero.Geo_CoordinateExtensions.html | 4 +- develop/Itinero.Geo_RouteExtensions.html | 4 +- .../Itinero.Geo_RoutingNetworkEnumerator.html | 4 +- .../Itinero.Geo_RoutingNetworkExtensions.html | 4 +- develop/Itinero.Geo_RoutingNetworkStream.html | 4 +- .../Itinero.IO.Osm.Tiles_DataProvider.html | 4 +- ...ero.IO.Osm.Tiles_DataProviderSettings.html | 4 +- .../Itinero.IO.Osm.Tiles_DownloadHelper.html | 4 +- develop/Itinero.IO.Osm.Tiles_Extensions.html | 4 +- develop/Itinero.IO.Osm.Tiles_GlobalIdMap.html | 4 +- ...inero.IO.Osm.Tiles_RouterDbExtensions.html | 4 +- ...Itinero.IO.Osm.Tiles_StreamExtensions.html | 4 +- develop/Itinero.IO.Osm.Tiles_TagMapper.html | 4 +- .../Itinero.IO.Osm.Tiles_TagMapperConfig.html | 4 +- ...ro.IO.Osm.Tiles_TagMapperConfigParser.html | 4 +- develop/Itinero.IO.Osm.Tiles_Tile.html | 4 +- develop/Itinero.IO.Osm.Tiles_TileParser.html | 4 +- develop/Itinero.IO.Osm.Tiles_TileRange.html | 4 +- .../Itinero.IO.Osm_AttributesExtensions.html | 4 +- ...inero.IO.Osm_CompleteOsmGeoExtensions.html | 4 +- ...ero.IO.Osm_CompleteOsmGeoPreprocessor.html | 4 +- .../Itinero.IO.Osm_DataProviderSettings.html | 4 +- ...Itinero.IO.Osm_GlobalEdgeIdExtensions.html | 4 +- .../Itinero.IO.Osm_NetworkRestriction.html | 4 +- develop/Itinero.IO.Osm_NodeIndex.html | 4 +- develop/Itinero.IO.Osm_OsmBarrier.html | 4 +- .../Itinero.IO.Osm_OsmBarrierExtensions.html | 4 +- develop/Itinero.IO.Osm_OsmBarrierParser.html | 4 +- ...Itinero.IO.Osm_OsmGeoTagsPreprocessor.html | 4 +- ...nero.IO.Osm_OsmStreamSourceExtensions.html | 4 +- .../Itinero.IO.Osm_OsmTurnRestriction.html | 4 +- ...o.IO.Osm_OsmTurnRestrictionExtensions.html | 4 +- ...inero.IO.Osm_OsmTurnRestrictionParser.html | 4 +- develop/Itinero.IO.Osm_QuickSort.html | 4 +- ...inero.IO.Osm_RelationTagsPreprocessor.html | 4 +- .../Itinero.IO.Osm_RouterDbExtensions.html | 4 +- .../Itinero.IO.Osm_RouterDbStreamTarget.html | 4 +- develop/Itinero.IO.Osm_RoutingTagsFilter.html | 4 +- ...StandaloneNetworkTileWriterExtensions.html | 521 +- develop/Itinero.IO.Osm_TagsFilter.html | 4 +- develop/Itinero.IO.Osm_UniqueIdMap_1.html | 4 +- develop/Itinero.IO.Osm_UnsignedNodeIndex.html | 4 +- .../Itinero.Instructions_AllGenerators.html | 4 +- .../Itinero.Instructions_BaseInstruction.html | 4 +- ...Instructions_BaseInstructionGenerator.html | 4 +- develop/Itinero.Instructions_Box_1.html | 4 +- ...tinero.Instructions_ConditionalToText.html | 4 +- ...nero.Instructions_ConfigurationParser.html | 4 +- .../Itinero.Instructions_EndInstruction.html | 4 +- ....Instructions_EndInstructionGenerator.html | 4 +- ...ero.Instructions_FollowAlongGenerator.html | 4 +- ...o.Instructions_FollowAlongInstruction.html | 4 +- ...nero.Instructions_FollowBendGenerator.html | 4 +- ...ro.Instructions_FollowBendInstruction.html | 4 +- ...s_IRouteAndBaseInstructionsExtensions.html | 4 +- ...tions_IRouteAndInstructionsExtensions.html | 4 +- .../Itinero.Instructions_IndexedRoute.html | 4 +- develop/Itinero.Instructions_Instruction.html | 4 +- ....Instructions_IntersectionInstruction.html | 4 +- ...ions_IntersectionInstructionGenerator.html | 4 +- ...ctions_LinearInstructionListGenerator.html | 4 +- ...ro.Instructions_RoundaboutInstruction.html | 4 +- ...ctions_RoundaboutInstructionGenerator.html | 4 +- ...Instructions_RouteAndBaseInstructions.html | 4 +- ...ero.Instructions_RouteAndInstructions.html | 4 +- ...tinero.Instructions_RouteExtensions.2.html | 4 +- .../Itinero.Instructions_RouteExtensions.html | 4 +- ...nstructions_RouteInstructionGenerator.html | 4 +- ...ons_RouteInstructionGeneratorSettings.html | 4 +- ...Itinero.Instructions_StartInstruction.html | 4 +- ...nstructions_StartInstructionGenerator.html | 4 +- .../Itinero.Instructions_SubstituteText.html | 4 +- .../Itinero.Instructions_TurnGenerator.html | 4 +- .../Itinero.Instructions_TurnInstruction.html | 4 +- develop/Itinero.Instructions_Utils.html | 4 +- develop/Itinero.Profiles.Lua_LuaProfile.html | 4 +- ...inero.Profiles.Lua_LuaTableExtensions.html | 4 +- develop/Itinero.Profiles.Lua_OsmProfiles.html | 4 +- .../Itinero_AlternativeRouteCostFunction.html | 4 +- develop/Itinero_AlternativeRouteSettings.html | 4 +- develop/Itinero_ArrayBaseExtensions.2.html | 4 +- develop/Itinero_ArrayBaseExtensions.html | 4 +- develop/Itinero_AttributeExtensions.html | 4 +- .../Itinero_AttributeSetDictionaryIndex.html | 4 +- .../Itinero_AttributeSetEqualityComparer.html | 4 +- develop/Itinero_AttributeSetMap.html | 4 +- develop/Itinero_BinaryHeap_1.html | 4 +- develop/Itinero_BitCoder.html | 4 +- develop/Itinero_BitCoderStream.html | 4 +- develop/Itinero_BoundaryEdgeId.html | 4 +- develop/Itinero_BoundaryOrLocalEdgeId.html | 4 +- develop/Itinero_DataHelpers.html | 4 +- develop/Itinero_DataUseNotifier.html | 4 +- develop/Itinero_DefaultProfile.html | 4 +- develop/Itinero_Dijkstra.2.html | 4 +- develop/Itinero_Dijkstra.html | 4 +- develop/Itinero_DirectionCalculator.html | 4 +- develop/Itinero_EdgeEnumerator_1.html | 4 +- develop/Itinero_EdgeFactor.html | 4 +- develop/Itinero_EdgeFactorCache.html | 4 +- develop/Itinero_EdgeId.html | 4 +- develop/Itinero_EdgeSearch.html | 4 +- develop/Itinero_ElevationHandler.html | 4 +- .../Itinero_ElevationHandlerExtensions.html | 4 +- develop/Itinero_Extensions.html | 4 +- develop/Itinero_GeoExtensions.html | 4 +- develop/Itinero_GeoJsonExtensions.html | 4 +- develop/Itinero_GlobalEdgeIdSet.html | 4 +- develop/Itinero_GlobalNetworkManager.html | 4 +- develop/Itinero_GlobalVertexIdSet.html | 4 +- .../Itinero_ICostFunctionExtensions.2.html | 4 +- develop/Itinero_ICostFunctionExtensions.html | 4 +- .../Itinero_IEdgeEnumeratorExtensions.html | 4 +- develop/Itinero_IHasSourceExtensions.html | 4 +- develop/Itinero_IHasSourcesExtensions.html | 4 +- develop/Itinero_IRoutePositionExtensions.html | 4 +- develop/Itinero_IRouterExtensions.html | 4 +- .../Itinero_IRouterManyToManyExtensions.html | 4 +- .../Itinero_IRouterManyToOneExtensions.html | 4 +- .../Itinero_IRouterOneToManyExtensions.html | 4 +- .../Itinero_IRouterOneToOneExtensions.2.html | 4 +- .../Itinero_IRouterOneToOneExtensions.html | 4 +- ...terOneToOneWithAlternativesExtensions.html | 4 +- develop/Itinero_IRouterWeightsExtensions.html | 4 +- develop/Itinero_ISnapperExtensions.html | 4 +- develop/Itinero_IslandBuilder.html | 4 +- develop/Itinero_IslandBuilderExtensions.html | 4 +- develop/Itinero_IslandLabelGraph.html | 4 +- develop/Itinero_IslandLabels.html | 4 +- develop/Itinero_Islands.html | 4 +- develop/Itinero_IslandsExtensions.html | 4 +- develop/Itinero_Logger.html | 4 +- develop/Itinero_LruCacheItem_2.html | 4 +- develop/Itinero_LruCache_2.html | 4 +- develop/Itinero_NetworkTile.html | 4 +- develop/Itinero_NetworkTileEnumerator.html | 4 +- develop/Itinero_NetworkTileExtensions.html | 4 +- develop/Itinero_OrderCoder.html | 4 +- develop/Itinero_Path.html | 4 +- develop/Itinero_PathExtensions.html | 4 +- develop/Itinero_PathTree.html | 4 +- develop/Itinero_PathTreeExtensions.html | 4 +- develop/Itinero_Profile.html | 4 +- develop/Itinero_ProfileCached.html | 4 +- develop/Itinero_ProfileCostFunction.html | 4 +- .../Itinero_ProfileCostFunctionCached.html | 4 +- .../Itinero_ProfileEdgeTypeSetMinimizer.html | 4 +- develop/Itinero_ProfileExtensions.html | 4 +- develop/Itinero_ProfilesEdgeTypeMap.html | 4 +- develop/Itinero_RelativeDirection.html | 4 +- develop/Itinero_RestrictionExtensions.html | 4 +- develop/Itinero_Result_1.html | 4 +- develop/Itinero_Route.html | 4 +- develop/Itinero_RouteBuilder.html | 4 +- develop/Itinero_RouteEnumerator.html | 4 +- develop/Itinero_RouteExtensions.2.html | 4 +- develop/Itinero_RouteExtensions.3.html | 4 +- develop/Itinero_RouteExtensions.html | 4 +- develop/Itinero_RoutePosition.html | 4 +- develop/Itinero_Router.html | 4 +- develop/Itinero_RouterDb.html | 4 +- develop/Itinero_RouterDbConfiguration.html | 4 +- develop/Itinero_RouterDbExtensions.2.html | 4 +- develop/Itinero_RouterDbExtensions.3.html | 4 +- develop/Itinero_RouterDbExtensions.html | 4 +- .../Itinero_RouterDbProfileConfiguration.html | 4 +- develop/Itinero_RouterDbReadSettings.html | 4 +- develop/Itinero_RouterExtensions.html | 4 +- develop/Itinero_RouterWeights_1.html | 4 +- develop/Itinero_RoutingNetwork.html | 4 +- .../Itinero_RoutingNetworkEdgeEnumerator.html | 4 +- ...outingNetworkEdgeEnumeratorExtensions.html | 4 +- .../Itinero_RoutingNetworkExtensions.2.html | 4 +- develop/Itinero_RoutingNetworkExtensions.html | 4 +- .../Itinero_RoutingNetworkIslandManager.html | 4 +- ...inero_RoutingNetworkMutableExtensions.html | 4 +- develop/Itinero_RoutingNetworkMutator.html | 4 +- ...o_RoutingNetworkMutatorEdgeEnumerator.html | 4 +- ...inero_RoutingNetworkMutatorExtensions.html | 4 +- ...o_RoutingNetworkProfilesConfiguration.html | 4 +- develop/Itinero_RoutingNetworkQuery.html | 4 +- develop/Itinero_RoutingNetworkSerializer.html | 4 +- ...nero_RoutingNetworkSnapshotExtensions.html | 4 +- ...tinero_RoutingNetworkVertexEnumerator.html | 4 +- develop/Itinero_RoutingNetworkWriter.html | 4 +- ...tinero_RoutingNetworkWriterExtensions.html | 4 +- develop/Itinero_RoutingSettings.html | 4 +- develop/Itinero_SnapPoint.html | 4 +- develop/Itinero_SnapPointExtensions.2.html | 4 +- develop/Itinero_SnapPointExtensions.3.html | 4 +- develop/Itinero_SnapPointExtensions.html | 4 +- develop/Itinero_Snapper.html | 4 +- develop/Itinero_SnapperSettings.html | 4 +- develop/Itinero_SparseArrayExtensions.html | 4 +- develop/Itinero_SparseArray_1.html | 4 +- develop/Itinero_StandaloneNetworkTile.html | 4 +- ...inero_StandaloneNetworkTileExtensions.html | 4 +- .../Itinero_StandaloneNetworkTileWriter.html | 4 +- develop/Itinero_StreamExtensions.2.html | 4 +- develop/Itinero_StreamExtensions.html | 4 +- develop/Itinero_TileStatic.html | 4 +- develop/Itinero_TilesVertexEnumerator.html | 4 +- develop/Itinero_TurnCostFactor.html | 4 +- develop/Itinero_TurnCostFactorCache.html | 4 +- develop/Itinero_VertexEdgeEnumerator.html | 4 +- develop/Itinero_VertexId.html | 4 +- develop/Itinero_VertexSearch.html | 4 +- .../coverage.cobertura.xml | 48572 ++++++++++++++++ develop/index.htm | 26 +- develop/index.html | 26 +- develop/main.js | 4 +- 212 files changed, 49275 insertions(+), 702 deletions(-) create mode 100644 develop/d1d45f97-9470-4bc4-b2fa-52520ac646ea/coverage.cobertura.xml diff --git a/develop/Itinero.Geo_AttributesTableExtensions.html b/develop/Itinero.Geo_AttributesTableExtensions.html index 0b3b0b07b..5e94e58ed 100644 --- a/develop/Itinero.Geo_AttributesTableExtensions.html +++ b/develop/Itinero.Geo_AttributesTableExtensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:6 Branch coverage:0% (0 of 6) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -82,7 +82,7 @@

 39} - +

Methods/Properties

diff --git a/develop/Itinero.Geo_CoordinateExtensions.html b/develop/Itinero.Geo_CoordinateExtensions.html index 403bd7f80..f5a0165aa 100644 --- a/develop/Itinero.Geo_CoordinateExtensions.html +++ b/develop/Itinero.Geo_CoordinateExtensions.html @@ -24,7 +24,7 @@

< Summary

Line coverage:0% (0 of 6) Covered branches:0 Total branches:0 -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -72,7 +72,7 @@

/home  30} -

+

Methods/Properties

diff --git a/develop/Itinero.Geo_RouteExtensions.html b/develop/Itinero.Geo_RouteExtensions.html index 728478fe4..02ca73089 100644 --- a/develop/Itinero.Geo_RouteExtensions.html +++ b/develop/Itinero.Geo_RouteExtensions.html @@ -24,7 +24,7 @@

< Summary

Line coverage:0% (0 of 3) Covered branches:0 Total branches:0 -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -65,7 +65,7 @@

/home/runn  24} -

+

Methods/Properties

diff --git a/develop/Itinero.Geo_RoutingNetworkEnumerator.html b/develop/Itinero.Geo_RoutingNetworkEnumerator.html index 147f81e7e..e56d5e008 100644 --- a/develop/Itinero.Geo_RoutingNetworkEnumerator.html +++ b/develop/Itinero.Geo_RoutingNetworkEnumerator.html @@ -25,7 +25,7 @@

< Summary

Covered branches:13 Total branches:16 Branch coverage:81.2% (13 of 16) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -165,7 +165,7 @@

/  118} -

+

Methods/Properties

diff --git a/develop/Itinero.Geo_RoutingNetworkExtensions.html b/develop/Itinero.Geo_RoutingNetworkExtensions.html index 919410948..9cf460486 100644 --- a/develop/Itinero.Geo_RoutingNetworkExtensions.html +++ b/develop/Itinero.Geo_RoutingNetworkExtensions.html @@ -24,7 +24,7 @@

< Summary

Line coverage:50% (6 of 12) Covered branches:0 Total branches:0 -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -94,7 +94,7 @@

/  50} -

+

Methods/Properties

diff --git a/develop/Itinero.Geo_RoutingNetworkStream.html b/develop/Itinero.Geo_RoutingNetworkStream.html index 1df08d1d1..38d7fa31a 100644 --- a/develop/Itinero.Geo_RoutingNetworkStream.html +++ b/develop/Itinero.Geo_RoutingNetworkStream.html @@ -24,7 +24,7 @@

< Summary

Line coverage:76.9% (10 of 13) Covered branches:0 Total branches:0 -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -79,7 +79,7 @@

/home  36} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_DataProvider.html b/develop/Itinero.IO.Osm.Tiles_DataProvider.html index 570eb4a04..ec952e413 100644 --- a/develop/Itinero.IO.Osm.Tiles_DataProvider.html +++ b/develop/Itinero.IO.Osm.Tiles_DataProvider.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:22 Branch coverage:0% (0 of 22) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -237,7 +237,7 @@

/home/  189} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_DataProviderSettings.html b/develop/Itinero.IO.Osm.Tiles_DataProviderSettings.html index efef28ee9..2fbadc2f6 100644 --- a/develop/Itinero.IO.Osm.Tiles_DataProviderSettings.html +++ b/develop/Itinero.IO.Osm.Tiles_DataProviderSettings.html @@ -24,7 +24,7 @@

< Summary

Line coverage:0% (0 of 2) Covered branches:0 Total branches:0 -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -61,7 +61,7 @@

 19} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_DownloadHelper.html b/develop/Itinero.IO.Osm.Tiles_DownloadHelper.html index 590eed402..c0161b69d 100644 --- a/develop/Itinero.IO.Osm.Tiles_DownloadHelper.html +++ b/develop/Itinero.IO.Osm.Tiles_DownloadHelper.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:2 Branch coverage:0% (0 of 2) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -86,7 +86,7 @@

 44} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_Extensions.html b/develop/Itinero.IO.Osm.Tiles_Extensions.html index dd5399ab9..d238a30d5 100644 --- a/develop/Itinero.IO.Osm.Tiles_Extensions.html +++ b/develop/Itinero.IO.Osm.Tiles_Extensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:4 Branch coverage:0% (0 of 4) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -69,7 +69,7 @@

/home/ru  26} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_GlobalIdMap.html b/develop/Itinero.IO.Osm.Tiles_GlobalIdMap.html index 7433d9ae0..99007bfc5 100644 --- a/develop/Itinero.IO.Osm.Tiles_GlobalIdMap.html +++ b/develop/Itinero.IO.Osm.Tiles_GlobalIdMap.html @@ -25,7 +25,7 @@

< Summary

Covered branches:6 Total branches:10 Branch coverage:60% (6 of 10) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -152,7 +152,7 @@

/home/r  104} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_RouterDbExtensions.html b/develop/Itinero.IO.Osm.Tiles_RouterDbExtensions.html index 538940a2e..bcd5b1c87 100644 --- a/develop/Itinero.IO.Osm.Tiles_RouterDbExtensions.html +++ b/develop/Itinero.IO.Osm.Tiles_RouterDbExtensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:2 Branch coverage:0% (0 of 2) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -65,7 +65,7 @@

 23} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_StreamExtensions.html b/develop/Itinero.IO.Osm.Tiles_StreamExtensions.html index ab7ca868c..9fdc51f82 100644 --- a/develop/Itinero.IO.Osm.Tiles_StreamExtensions.html +++ b/develop/Itinero.IO.Osm.Tiles_StreamExtensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:21 Total branches:108 Branch coverage:19.4% (21 of 108) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -743,7 +743,7 @@

/h  667} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_TagMapper.html b/develop/Itinero.IO.Osm.Tiles_TagMapper.html index 5f97287ae..54f292975 100644 --- a/develop/Itinero.IO.Osm.Tiles_TagMapper.html +++ b/develop/Itinero.IO.Osm.Tiles_TagMapper.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:8 Branch coverage:0% (0 of 8) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -82,7 +82,7 @@

 40} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_TagMapperConfig.html b/develop/Itinero.IO.Osm.Tiles_TagMapperConfig.html index 7ef10ca8c..5312334f6 100644 --- a/develop/Itinero.IO.Osm.Tiles_TagMapperConfig.html +++ b/develop/Itinero.IO.Osm.Tiles_TagMapperConfig.html @@ -24,7 +24,7 @@

< Summary

Line coverage:0% (0 of 3) Covered branches:0 Total branches:0 -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -67,7 +67,7 @@

 24} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_TagMapperConfigParser.html b/develop/Itinero.IO.Osm.Tiles_TagMapperConfigParser.html index 066eb255f..030dc0a28 100644 --- a/develop/Itinero.IO.Osm.Tiles_TagMapperConfigParser.html +++ b/develop/Itinero.IO.Osm.Tiles_TagMapperConfigParser.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:18 Branch coverage:0% (0 of 18) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -127,7 +127,7 @@

 85} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_Tile.html b/develop/Itinero.IO.Osm.Tiles_Tile.html index 303307dc1..cc0cf4c4c 100644 --- a/develop/Itinero.IO.Osm.Tiles_Tile.html +++ b/develop/Itinero.IO.Osm.Tiles_Tile.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:6 Branch coverage:0% (0 of 6) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -240,7 +240,7 @@

/home/runner/w  181} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_TileParser.html b/develop/Itinero.IO.Osm.Tiles_TileParser.html index 038f28d96..bc58c86b4 100644 --- a/develop/Itinero.IO.Osm.Tiles_TileParser.html +++ b/develop/Itinero.IO.Osm.Tiles_TileParser.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:88 Branch coverage:0% (0 of 88) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -399,7 +399,7 @@

/  354} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm.Tiles_TileRange.html b/develop/Itinero.IO.Osm.Tiles_TileRange.html index 7581f771e..5c1f7c962 100644 --- a/develop/Itinero.IO.Osm.Tiles_TileRange.html +++ b/develop/Itinero.IO.Osm.Tiles_TileRange.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:10 Branch coverage:0% (0 of 10) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -159,7 +159,7 @@

/home/run  104} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_AttributesExtensions.html b/develop/Itinero.IO.Osm_AttributesExtensions.html index c5ec93cda..a56730074 100644 --- a/develop/Itinero.IO.Osm_AttributesExtensions.html +++ b/develop/Itinero.IO.Osm_AttributesExtensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:2 Total branches:2 Branch coverage:100% (2 of 2) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -60,7 +60,7 @@

 18} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_CompleteOsmGeoExtensions.html b/develop/Itinero.IO.Osm_CompleteOsmGeoExtensions.html index 771d1e8ee..fb0723be1 100644 --- a/develop/Itinero.IO.Osm_CompleteOsmGeoExtensions.html +++ b/develop/Itinero.IO.Osm_CompleteOsmGeoExtensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:2 Branch coverage:0% (0 of 2) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -60,7 +60,7 @@

 18} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_CompleteOsmGeoPreprocessor.html b/develop/Itinero.IO.Osm_CompleteOsmGeoPreprocessor.html index 96635e507..ed3ee5c13 100644 --- a/develop/Itinero.IO.Osm_CompleteOsmGeoPreprocessor.html +++ b/develop/Itinero.IO.Osm_CompleteOsmGeoPreprocessor.html @@ -25,7 +25,7 @@

< Summary

Covered branches:21 Total branches:26 Branch coverage:80.7% (21 of 26) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -168,7 +168,7 @@

 118} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_DataProviderSettings.html b/develop/Itinero.IO.Osm_DataProviderSettings.html index 365f9447f..ad743c186 100644 --- a/develop/Itinero.IO.Osm_DataProviderSettings.html +++ b/develop/Itinero.IO.Osm_DataProviderSettings.html @@ -24,7 +24,7 @@

< Summary

Line coverage:100% (2 of 2) Covered branches:0 Total branches:0 -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -62,7 +62,7 @@

/ho  20} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_GlobalEdgeIdExtensions.html b/develop/Itinero.IO.Osm_GlobalEdgeIdExtensions.html index 95bf3a1ff..51e665c05 100644 --- a/develop/Itinero.IO.Osm_GlobalEdgeIdExtensions.html +++ b/develop/Itinero.IO.Osm_GlobalEdgeIdExtensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:2 Total branches:6 Branch coverage:33.3% (2 of 6) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -90,7 +90,7 @@

 44} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_NetworkRestriction.html b/develop/Itinero.IO.Osm_NetworkRestriction.html index b9865a94b..cc716a422 100644 --- a/develop/Itinero.IO.Osm_NetworkRestriction.html +++ b/develop/Itinero.IO.Osm_NetworkRestriction.html @@ -25,7 +25,7 @@

< Summary

Covered branches:1 Total branches:2 Branch coverage:50% (1 of 2) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -115,7 +115,7 @@

 67} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_NodeIndex.html b/develop/Itinero.IO.Osm_NodeIndex.html index 279f85f63..e40691f5f 100644 --- a/develop/Itinero.IO.Osm_NodeIndex.html +++ b/develop/Itinero.IO.Osm_NodeIndex.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:16 Branch coverage:0% (0 of 16) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -190,7 +190,7 @@

/ho  140} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_OsmBarrier.html b/develop/Itinero.IO.Osm_OsmBarrier.html index 5df5d73c8..895780912 100644 --- a/develop/Itinero.IO.Osm_OsmBarrier.html +++ b/develop/Itinero.IO.Osm_OsmBarrier.html @@ -24,7 +24,7 @@

< Summary

Line coverage:0% (0 of 10) Covered branches:0 Total branches:0 -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -81,7 +81,7 @@

 37} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_OsmBarrierExtensions.html b/develop/Itinero.IO.Osm_OsmBarrierExtensions.html index 84111c961..d57205243 100644 --- a/develop/Itinero.IO.Osm_OsmBarrierExtensions.html +++ b/develop/Itinero.IO.Osm_OsmBarrierExtensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:10 Branch coverage:0% (0 of 10) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -92,7 +92,7 @@

 50} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_OsmBarrierParser.html b/develop/Itinero.IO.Osm_OsmBarrierParser.html index a42094409..ea1295a69 100644 --- a/develop/Itinero.IO.Osm_OsmBarrierParser.html +++ b/develop/Itinero.IO.Osm_OsmBarrierParser.html @@ -25,7 +25,7 @@

< Summary

Covered branches:4 Total branches:6 Branch coverage:66.6% (4 of 6) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -85,7 +85,7 @@

 42} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_OsmGeoTagsPreprocessor.html b/develop/Itinero.IO.Osm_OsmGeoTagsPreprocessor.html index 85936f481..9a3042b1b 100644 --- a/develop/Itinero.IO.Osm_OsmGeoTagsPreprocessor.html +++ b/develop/Itinero.IO.Osm_OsmGeoTagsPreprocessor.html @@ -25,7 +25,7 @@

< Summary

Covered branches:5 Total branches:6 Branch coverage:83.3% (5 of 6) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -100,7 +100,7 @@

 54} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_OsmStreamSourceExtensions.html b/develop/Itinero.IO.Osm_OsmStreamSourceExtensions.html index 337388d50..2026b7839 100644 --- a/develop/Itinero.IO.Osm_OsmStreamSourceExtensions.html +++ b/develop/Itinero.IO.Osm_OsmStreamSourceExtensions.html @@ -24,7 +24,7 @@

< Summary

Line coverage:68.7% (11 of 16) Covered branches:0 Total branches:0 -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -98,7 +98,7 @@

 55} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_OsmTurnRestriction.html b/develop/Itinero.IO.Osm_OsmTurnRestriction.html index ca7577cdd..5e42364b4 100644 --- a/develop/Itinero.IO.Osm_OsmTurnRestriction.html +++ b/develop/Itinero.IO.Osm_OsmTurnRestriction.html @@ -25,7 +25,7 @@

< Summary

Covered branches:4 Total branches:4 Branch coverage:100% (4 of 4) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -140,7 +140,7 @@

 91} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_OsmTurnRestrictionExtensions.html b/develop/Itinero.IO.Osm_OsmTurnRestrictionExtensions.html index 25735649e..a28a069b2 100644 --- a/develop/Itinero.IO.Osm_OsmTurnRestrictionExtensions.html +++ b/develop/Itinero.IO.Osm_OsmTurnRestrictionExtensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:56 Total branches:112 Branch coverage:50% (56 of 112) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -392,7 +392,7 @@

 342} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_OsmTurnRestrictionParser.html b/develop/Itinero.IO.Osm_OsmTurnRestrictionParser.html index 19d87cdd9..f17533404 100644 --- a/develop/Itinero.IO.Osm_OsmTurnRestrictionParser.html +++ b/develop/Itinero.IO.Osm_OsmTurnRestrictionParser.html @@ -25,7 +25,7 @@

< Summary

Covered branches:47 Total branches:86 Branch coverage:54.6% (47 of 86) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -299,7 +299,7 @@

 253} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_QuickSort.html b/develop/Itinero.IO.Osm_QuickSort.html index 806ff487e..890f9354e 100644 --- a/develop/Itinero.IO.Osm_QuickSort.html +++ b/develop/Itinero.IO.Osm_QuickSort.html @@ -25,7 +25,7 @@

< Summary

Covered branches:0 Total branches:42 Branch coverage:0% (0 of 42) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -244,7 +244,7 @@

/ho  194} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_RelationTagsPreprocessor.html b/develop/Itinero.IO.Osm_RelationTagsPreprocessor.html index 451183157..eb624254e 100644 --- a/develop/Itinero.IO.Osm_RelationTagsPreprocessor.html +++ b/develop/Itinero.IO.Osm_RelationTagsPreprocessor.html @@ -25,7 +25,7 @@

< Summary

Covered branches:15 Total branches:16 Branch coverage:93.7% (15 of 16) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -146,7 +146,7 @@

 98} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_RouterDbExtensions.html b/develop/Itinero.IO.Osm_RouterDbExtensions.html index e4313b189..babf6bc5e 100644 --- a/develop/Itinero.IO.Osm_RouterDbExtensions.html +++ b/develop/Itinero.IO.Osm_RouterDbExtensions.html @@ -25,7 +25,7 @@

< Summary

Covered branches:7 Total branches:10 Branch coverage:70% (7 of 10) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -107,7 +107,7 @@

/home  65} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_RouterDbStreamTarget.html b/develop/Itinero.IO.Osm_RouterDbStreamTarget.html index d3ab2c3cb..71d5dfb42 100644 --- a/develop/Itinero.IO.Osm_RouterDbStreamTarget.html +++ b/develop/Itinero.IO.Osm_RouterDbStreamTarget.html @@ -25,7 +25,7 @@

< Summary

Covered branches:34 Total branches:82 Branch coverage:41.4% (34 of 82) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -332,7 +332,7 @@

/ho  284} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_RoutingTagsFilter.html b/develop/Itinero.IO.Osm_RoutingTagsFilter.html index 5cd5bebfe..998e4137d 100644 --- a/develop/Itinero.IO.Osm_RoutingTagsFilter.html +++ b/develop/Itinero.IO.Osm_RoutingTagsFilter.html @@ -25,7 +25,7 @@

< Summary

Covered branches:35 Total branches:50 Branch coverage:70% (35 of 50) -Tag:211_7934055228 +Tag:212_7960533257

Metrics

@@ -137,7 +137,7 @@

 92} -

+

Methods/Properties

diff --git a/develop/Itinero.IO.Osm_StandaloneNetworkTileWriterExtensions.html b/develop/Itinero.IO.Osm_StandaloneNetworkTileWriterExtensions.html index 4d8b9d743..7abd0ee1b 100644 --- a/develop/Itinero.IO.Osm_StandaloneNetworkTileWriterExtensions.html +++ b/develop/Itinero.IO.Osm_StandaloneNetworkTileWriterExtensions.html @@ -17,23 +17,23 @@

< Summary

Class:Itinero.IO.Osm.Tiles.StandaloneNetworkTileWriterExtensions Assembly:Itinero.IO.Osm File(s):/home/runner/work/routing2/routing2/src/Itinero.IO.Osm/Tiles/StandaloneNetworkTileWriterExtensions.cs -Covered lines:197 +Covered lines:198 Uncovered lines:61 -Coverable lines:258 -Total lines:412 -Line coverage:76.3% (197 of 258) -Covered branches:123 -Total branches:170 -Branch coverage:72.3% (123 of 170) -Tag:211_7934055228 +Coverable lines:259 +Total lines:413 +Line coverage:76.4% (198 of 259) +Covered branches:125 +Total branches:172 +Branch coverage:72.6% (125 of 172) +Tag:212_7960533257

Metrics

- - + +
MethodBranch coverage Cyclomatic complexity Line coverage
AddTileData(...)72.35%17076.07%
GetEnumerator(...)100%1100%
AddTileData(...)72.67%17276.17%
GetEnumerator(...)100%1100%

File(s)

@@ -206,261 +206,262 @@

 163                    }  164                case Relation relation:  1165                    if (!restrictionParser.IsRestriction(relation, out _)) continue;166167                    // log ways that are members, we need to keep their edge ids ready168                    // or store their global ids when the restriction crosses tile boundaries. - 9169                    foreach (var relationMember in relation.Members) - 3170                    { - 4171                        if (relationMember.Type != OsmGeoType.Way) continue;172 - 2173                        restrictionMembers[relationMember.Id] = null; - 2174                    }175 - 1176                    break;177            } - 12178        }179180        // a second pass where we add all vertices, core nodes and edges.181        // we also keep an index of edges that were added and are part of a restriction. - 3182        var vertices = new Dictionary<long, VertexId>(); - 3183        enumerator.Reset(); - 15184        while (enumerator.MoveNext()) - 12185        { - 12186            var current = enumerator.Current;187 - 12188            switch (current)189            {190                case Node node: - 7191                    if (node.Id == null) throw new Exception("Id cannot be null"); - 7192                    if (node.Longitude == null) throw new Exception("Longitude cannot be null"); - 7193                    if (node.Latitude == null) throw new Exception("Latitude cannot be null");194195                    // add all core nodes as vertices. - 7196                    if (coreNodes.Contains(node.Id.Value)) - 6197                    { - 6198                        if (!writer.IsInTile(node.Longitude.Value, node.Latitude.Value)) continue; - 6199                        vertices[node.Id.Value] = writer.AddVertex(node.Longitude.Value, node.Latitude.Value);200201                        // a core not can be a barrier, check here. - 6202                        if (barrierParser.TryParse(node, out var barrier)) - 0203                        { - 0204                            osmBarriers.Add(barrier); - 0205                        } - 6206                    }207 - 7208                    break; - 4209                case Way way when way.Nodes.Length == 0: - 0210                    continue;211                case Way way: - 4212                    { - 6213                        if (restrictionMembers.ContainsKey(way.Id.Value)) restrictionMembers[way.Id.Value] = way;214 - 8215                        var attributes = way.Tags?.Select(tag => (tag.Key, tag.Value)).ToArray() ?? - 4216                                         ArraySegment<(string key, string value)>.Empty; - 4217                        var edgeTypeId = edgeTypeMap(attributes); - 4218                        if (edgeTypeId == emptyEdgeType) continue;219220                        // add all boundaries, if any. - 16221                        for (var n = 1; n < way.Nodes.Length; n++) - 4222                        { - 4223                            var from = way.Nodes[n - 1]; - 4224                            var to = way.Nodes[n]; - 4225                            var globalEdgeId = way.GenerateGlobalEdgeId(n - 1, n);226 - 4227                            var fromLocation = nodeLocations[from]; - 4228                            var toLocation = nodeLocations[to];229 - 4230                            var length = (uint)((fromLocation.longitude, fromLocation.latitude, (float?)null) - 4231                                .DistanceEstimateInMeter( - 4232                                    (toLocation.longitude, toLocation.latitude, (float?)null)) * 100);233 - 4234                            if (boundaryNodes.Contains(from) && - 4235                                vertices.TryGetValue(to, out var vertexId)) - 0236                            { - 0237                                var boundaryEdgeId = writer.AddBoundaryCrossing(from, (vertexId, to), - 0238                                    edgeTypeId, attributes.Concat(globalEdgeId), length); - 0239                                if (restrictionMembers.ContainsKey(way.Id.Value)) - 0240                                    restrictedEdges[globalEdgeId] = new BoundaryOrLocalEdgeId(boundaryEdgeId); - 0241                            } - 4242                            else if (boundaryNodes.Contains(to) && - 4243                                     vertices.TryGetValue(from, out vertexId)) - 1244                            { - 1245                                var boundaryEdgeId = writer.AddBoundaryCrossing((vertexId, from), to, - 1246                                    edgeTypeId, attributes.Concat(globalEdgeId), length); - 1247                                if (restrictionMembers.ContainsKey(way.Id.Value)) - 0248                                    restrictedEdges[globalEdgeId] = new BoundaryOrLocalEdgeId(boundaryEdgeId); - 1249                            } - 4250                        }251252                        // add regular edges, if any. - 4253                        var shape = new List<(double longitude, double latitude, float? e)>(); - 4254                        VertexId? previousVertex = null; - 4255                        var previousNode = -1;256 - 24257                        for (var n = 0; n < way.Nodes.Length; n++) - 8258                        { - 8259                            var wayNode = way.Nodes[n];260 - 8261                            if (boundaryNodes.Contains(wayNode)) - 1262                            { - 1263                                previousVertex = null; - 1264                                shape.Clear(); - 1265                                continue;266                            }267 - 7268                            if (!vertices.TryGetValue(wayNode, out var vertexId)) - 0269                            { - 0270                                var (longitude, latitude, _) = nodeLocations[wayNode];271 - 0272                                shape.Add((longitude, latitude, null)); - 0273                                continue;274                            }275 - 7276                            if (previousVertex != null) - 3277                            { - 3278                                var globalEdgeId = way.GenerateGlobalEdgeId(previousNode, n); - 3279                                var edgeId = writer.AddEdge(previousVertex.Value, vertexId, edgeTypeId, shape, - 3280                                    attributes.Concat(globalEdgeId)); - 3281                                shape.Clear();282 - 3283                                if (restrictionMembers.ContainsKey(way.Id.Value)) - 2284                                    restrictedEdges[globalEdgeId] = new BoundaryOrLocalEdgeId(edgeId); - 3285                            }286 - 7287                            previousVertex = vertexId; - 7288                            previousNode = n; - 7289                        }290 - 4291                        break;292                    }293                case Relation relation: - 1294                    var result = restrictionParser.TryParse(relation, (wayId) => - 2295                            restrictionMembers.TryGetValue(wayId, out var member) ? member : null, - 1296                        out var osmTurnRestriction);297 - 1298                    if (result.IsError) continue; - 1299                    if (!result.Value) continue; - 1300                    if (osmTurnRestriction == null) - 0301                        throw new Exception("Parsing restriction was successful but not returned");302 - 1303                    osmTurnRestrictions.Add(osmTurnRestriction);304 - 1305                    break;306            } - 12307        }308309        // add barriers as turn weights. - 3310        var tileEnumerator = writer.GetEnumerator(); - 3311        var networkRestrictions = new List<NetworkRestriction>(); - 9312        foreach (var osmBarrier in osmBarriers) - 0313        { - 0314            var networkBarriersResult = osmBarrier.ToNetworkRestrictions(n => - 0315            { - 0316                if (!vertices.TryGetValue(n, out var v)) throw new Exception("Node should exist as vertex"); - 0317                tileEnumerator.MoveTo(v); - 0318                return tileEnumerator; - 0319            }); - 0320            if (networkBarriersResult.IsError) continue;321 - 0322            networkRestrictions.AddRange(networkBarriersResult.Value); - 0323        }324325        // add restrictions as turn weights. - 11326        foreach (var osmTurnRestriction in osmTurnRestrictions) - 1327        { - 1328            var networkRestrictionsResult = osmTurnRestriction.ToNetworkRestrictions((wayId, node1, node2) => - 2329            { - 2330                var (globalId, forward) = GlobalEdgeIdExtensions.GenerateGlobalEdgeIdAndDirection(wayId, node1, node2); - 1331 - 2332                if (!restrictedEdges.TryGetValue(globalId, out var boundaryOrLocalEdgeId)) return null; - 1333 - 4334                if (boundaryOrLocalEdgeId?.LocalId != null) return (boundaryOrLocalEdgeId.Value.LocalId.Value, forward); - 1335 - 0336                return null; - 3337            }); - 1338            if (networkRestrictionsResult.IsError) continue;339 - 1340            networkRestrictions.AddRange(networkRestrictionsResult.Value); - 1341        }342343        // convert network restrictions to turn costs. - 11344        foreach (var networkRestriction in networkRestrictions) - 1345        { - 1346            if (networkRestriction.Count < 2) - 0347            {348                // TODO: log something? - 0349                continue;350            }351352            // get last edge and turn cost vertex. - 1353            var last = networkRestriction[^1]; - 1354            var lastEdge = writer.GetEdge(last.edge, last.forward); - 1355            var turnCostVertex = lastEdge.Tail;356357            // only add turn costs around vertices that are in the current tile. - 1358            if (turnCostVertex.TileId != writer.TileId) continue;359 - 1360            var secondToLast = networkRestriction[^2]; - 1361            if (networkRestriction.IsProhibitory) - 1362            {363                // easy, we only add a single cost. - 1364                var costs = new uint[,] { { 0, 1 }, { 0, 0 } }; - 1365                writer.AddTurnCosts(turnCostVertex, networkRestriction.Attributes, - 1366                    new[] { secondToLast.edge, last.edge }, costs, - 1367                    networkRestriction.Take(networkRestriction.Count - 2).Select(x => x.edge)); - 1368            }369            else - 0370            {371                // hard, we need to add a cost for every *other* edge than then one in the restriction. - 0372                tileEnumerator.MoveTo(secondToLast.edge, secondToLast.forward); - 0373                var to = tileEnumerator.Head; - 0374                tileEnumerator.MoveTo(to);375 - 0376                while (tileEnumerator.MoveNext()) - 0377                { - 0378                    if (tileEnumerator.EdgeId == secondToLast.edge || - 0379                        tileEnumerator.EdgeId == lastEdge.EdgeId) continue;380381                    // easy, we only add a single cost. - 0382                    var costs = new uint[,] { { 0, 1 }, { 0, 0 } }; - 0383                    writer.AddTurnCosts(turnCostVertex, networkRestriction.Attributes, - 0384                        new[] { secondToLast.edge, tileEnumerator.EdgeId }, costs, - 0385                        networkRestriction.Take(networkRestriction.Count - 2).Select(x => x.edge)); - 0386                } - 0387            } - 1388        }389390        // add global ids. - 13391        foreach (var (globalEdgeId, restrictedEdge) in restrictedEdges) - 2392        { - 2393            if (restrictedEdge?.LocalId != null) - 2394            { - 2395                writer.AddGlobalIdFor(restrictedEdge.Value.LocalId.Value, globalEdgeId); - 2396            } - 0397            else if (restrictedEdge?.BoundaryId != null) - 0398            { - 0399                writer.AddGlobalIdFor(restrictedEdge.Value.BoundaryId.Value, globalEdgeId); - 0400            } - 2401        }402403        // we can only add turn restrictions when all their edges404        // are full within a single tile, when they are not we add them405        // to the tile as boundary restrictions using global edge ids. - 6406    }407408    internal static IStandaloneNetworkTileEnumerator GetEnumerator(this StandaloneNetworkTileWriter writer) - 3409    { - 3410        return writer.GetResultingTile().GetEnumerator(); - 3411    }412} + 1166                    if (relation.Members == null) continue;167168                    // log ways that are members, we need to keep their edge ids ready169                    // or store their global ids when the restriction crosses tile boundaries. + 9170                    foreach (var relationMember in relation.Members) + 3171                    { + 4172                        if (relationMember.Type != OsmGeoType.Way) continue;173 + 2174                        restrictionMembers[relationMember.Id] = null; + 2175                    }176 + 1177                    break;178            } + 12179        }180181        // a second pass where we add all vertices, core nodes and edges.182        // we also keep an index of edges that were added and are part of a restriction. + 3183        var vertices = new Dictionary<long, VertexId>(); + 3184        enumerator.Reset(); + 15185        while (enumerator.MoveNext()) + 12186        { + 12187            var current = enumerator.Current;188 + 12189            switch (current)190            {191                case Node node: + 7192                    if (node.Id == null) throw new Exception("Id cannot be null"); + 7193                    if (node.Longitude == null) throw new Exception("Longitude cannot be null"); + 7194                    if (node.Latitude == null) throw new Exception("Latitude cannot be null");195196                    // add all core nodes as vertices. + 7197                    if (coreNodes.Contains(node.Id.Value)) + 6198                    { + 6199                        if (!writer.IsInTile(node.Longitude.Value, node.Latitude.Value)) continue; + 6200                        vertices[node.Id.Value] = writer.AddVertex(node.Longitude.Value, node.Latitude.Value);201202                        // a core not can be a barrier, check here. + 6203                        if (barrierParser.TryParse(node, out var barrier)) + 0204                        { + 0205                            osmBarriers.Add(barrier); + 0206                        } + 6207                    }208 + 7209                    break; + 4210                case Way way when way.Nodes.Length == 0: + 0211                    continue;212                case Way way: + 4213                    { + 6214                        if (restrictionMembers.ContainsKey(way.Id.Value)) restrictionMembers[way.Id.Value] = way;215 + 8216                        var attributes = way.Tags?.Select(tag => (tag.Key, tag.Value)).ToArray() ?? + 4217                                         ArraySegment<(string key, string value)>.Empty; + 4218                        var edgeTypeId = edgeTypeMap(attributes); + 4219                        if (edgeTypeId == emptyEdgeType) continue;220221                        // add all boundaries, if any. + 16222                        for (var n = 1; n < way.Nodes.Length; n++) + 4223                        { + 4224                            var from = way.Nodes[n - 1]; + 4225                            var to = way.Nodes[n]; + 4226                            var globalEdgeId = way.GenerateGlobalEdgeId(n - 1, n);227 + 4228                            var fromLocation = nodeLocations[from]; + 4229                            var toLocation = nodeLocations[to];230 + 4231                            var length = (uint)((fromLocation.longitude, fromLocation.latitude, (float?)null) + 4232                                .DistanceEstimateInMeter( + 4233                                    (toLocation.longitude, toLocation.latitude, (float?)null)) * 100);234 + 4235                            if (boundaryNodes.Contains(from) && + 4236                                vertices.TryGetValue(to, out var vertexId)) + 0237                            { + 0238                                var boundaryEdgeId = writer.AddBoundaryCrossing(from, (vertexId, to), + 0239                                    edgeTypeId, attributes.Concat(globalEdgeId), length); + 0240                                if (restrictionMembers.ContainsKey(way.Id.Value)) + 0241                                    restrictedEdges[globalEdgeId] = new BoundaryOrLocalEdgeId(boundaryEdgeId); + 0242                            } + 4243                            else if (boundaryNodes.Contains(to) && + 4244                                     vertices.TryGetValue(from, out vertexId)) + 1245                            { + 1246                                var boundaryEdgeId = writer.AddBoundaryCrossing((vertexId, from), to, + 1247                                    edgeTypeId, attributes.Concat(globalEdgeId), length); + 1248                                if (restrictionMembers.ContainsKey(way.Id.Value)) + 0249                                    restrictedEdges[globalEdgeId] = new BoundaryOrLocalEdgeId(boundaryEdgeId); + 1250                            } + 4251                        }252253                        // add regular edges, if any. + 4254                        var shape = new List<(double longitude, double latitude, float? e)>(); + 4255                        VertexId? previousVertex = null; + 4256                        var previousNode = -1;257 + 24258                        for (var n = 0; n < way.Nodes.Length; n++) + 8259                        { + 8260                            var wayNode = way.Nodes[n];261 + 8262                            if (boundaryNodes.Contains(wayNode)) + 1263                            { + 1264                                previousVertex = null; + 1265                                shape.Clear(); + 1266                                continue;267                            }268 + 7269                            if (!vertices.TryGetValue(wayNode, out var vertexId)) + 0270                            { + 0271                                var (longitude, latitude, _) = nodeLocations[wayNode];272 + 0273                                shape.Add((longitude, latitude, null)); + 0274                                continue;275                            }276 + 7277                            if (previousVertex != null) + 3278                            { + 3279                                var globalEdgeId = way.GenerateGlobalEdgeId(previousNode, n); + 3280                                var edgeId = writer.AddEdge(previousVertex.Value, vertexId, edgeTypeId, shape, + 3281                                    attributes.Concat(globalEdgeId)); + 3282                                shape.Clear();283 + 3284                                if (restrictionMembers.ContainsKey(way.Id.Value)) + 2285                                    restrictedEdges[globalEdgeId] = new BoundaryOrLocalEdgeId(edgeId); + 3286                            }287 + 7288                            previousVertex = vertexId; + 7289                            previousNode = n; + 7290                        }291 + 4292                        break;293                    }294                case Relation relation: + 1295                    var result = restrictionParser.TryParse(relation, (wayId) => + 2296                            restrictionMembers.TryGetValue(wayId, out var member) ? member : null, + 1297                        out var osmTurnRestriction);298 + 1299                    if (result.IsError) continue; + 1300                    if (!result.Value) continue; + 1301                    if (osmTurnRestriction == null) + 0302                        throw new Exception("Parsing restriction was successful but not returned");303 + 1304                    osmTurnRestrictions.Add(osmTurnRestriction);305 + 1306                    break;307            } + 12308        }309310        // add barriers as turn weights. + 3311        var tileEnumerator = writer.GetEnumerator(); + 3312        var networkRestrictions = new List<NetworkRestriction>(); + 9313        foreach (var osmBarrier in osmBarriers) + 0314        { + 0315            var networkBarriersResult = osmBarrier.ToNetworkRestrictions(n => + 0316            { + 0317                if (!vertices.TryGetValue(n, out var v)) throw new Exception("Node should exist as vertex"); + 0318                tileEnumerator.MoveTo(v); + 0319                return tileEnumerator; + 0320            }); + 0321            if (networkBarriersResult.IsError) continue;322 + 0323            networkRestrictions.AddRange(networkBarriersResult.Value); + 0324        }325326        // add restrictions as turn weights. + 11327        foreach (var osmTurnRestriction in osmTurnRestrictions) + 1328        { + 1329            var networkRestrictionsResult = osmTurnRestriction.ToNetworkRestrictions((wayId, node1, node2) => + 2330            { + 2331                var (globalId, forward) = GlobalEdgeIdExtensions.GenerateGlobalEdgeIdAndDirection(wayId, node1, node2); + 1332 + 2333                if (!restrictedEdges.TryGetValue(globalId, out var boundaryOrLocalEdgeId)) return null; + 1334 + 4335                if (boundaryOrLocalEdgeId?.LocalId != null) return (boundaryOrLocalEdgeId.Value.LocalId.Value, forward); + 1336 + 0337                return null; + 3338            }); + 1339            if (networkRestrictionsResult.IsError) continue;340 + 1341            networkRestrictions.AddRange(networkRestrictionsResult.Value); + 1342        }343344        // convert network restrictions to turn costs. + 11345        foreach (var networkRestriction in networkRestrictions) + 1346        { + 1347            if (networkRestriction.Count < 2) + 0348            {349                // TODO: log something? + 0350                continue;351            }352353            // get last edge and turn cost vertex. + 1354            var last = networkRestriction[^1]; + 1355            var lastEdge = writer.GetEdge(last.edge, last.forward); + 1356            var turnCostVertex = lastEdge.Tail;357358            // only add turn costs around vertices that are in the current tile. + 1359            if (turnCostVertex.TileId != writer.TileId) continue;360 + 1361            var secondToLast = networkRestriction[^2]; + 1362            if (networkRestriction.IsProhibitory) + 1363            {364                // easy, we only add a single cost. + 1365                var costs = new uint[,] { { 0, 1 }, { 0, 0 } }; + 1366                writer.AddTurnCosts(turnCostVertex, networkRestriction.Attributes, + 1367                    new[] { secondToLast.edge, last.edge }, costs, + 1368                    networkRestriction.Take(networkRestriction.Count - 2).Select(x => x.edge)); + 1369            }370            else + 0371            {372                // hard, we need to add a cost for every *other* edge than then one in the restriction. + 0373                tileEnumerator.MoveTo(secondToLast.edge, secondToLast.forward); + 0374                var to = tileEnumerator.Head; + 0375                tileEnumerator.MoveTo(to);376 + 0377                while (tileEnumerator.MoveNext()) + 0378                { + 0379                    if (tileEnumerator.EdgeId == secondToLast.edge || + 0380                        tileEnumerator.EdgeId == lastEdge.EdgeId) continue;381382                    // easy, we only add a single cost. + 0383                    var costs = new uint[,] { { 0, 1 }, { 0, 0 } }; + 0384                    writer.AddTurnCosts(turnCostVertex, networkRestriction.Attributes, + 0385                        new[] { secondToLast.edge, tileEnumerator.EdgeId }, costs, + 0386                        networkRestriction.Take(networkRestriction.Count - 2).Select(x => x.edge)); + 0387                } + 0388            } + 1389        }390391        // add global ids. + 13392        foreach (var (globalEdgeId, restrictedEdge) in restrictedEdges) + 2393        { + 2394            if (restrictedEdge?.LocalId != null) + 2395            { + 2396                writer.AddGlobalIdFor(restrictedEdge.Value.LocalId.Value, globalEdgeId); + 2397            } + 0398            else if (restrictedEdge?.BoundaryId != null) + 0399            { + 0400                writer.AddGlobalIdFor(restrictedEdge.Value.BoundaryId.Value, globalEdgeId); + 0401            } + 2402        }403404        // we can only add turn restrictions when all their edges405        // are full within a single tile, when they are not we add them406        // to the tile as boundary restrictions using global edge ids. + 6407    }408409    internal static IStandaloneNetworkTileEnumerator GetEnumerator(this StandaloneNetworkTileWriter writer) + 3410    { + 3411        return writer.GetResultingTile().GetEnumerator(); + 3412    }413} -

+