| | | 1 | | namespace Itinero.Network.Tiles.Standalone; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// An id that can represent edge that are part of tiles or boundary edges. |
| | | 5 | | /// </summary> |
| | | 6 | | public readonly struct BoundaryOrLocalEdgeId |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Creates an id using an edge id. |
| | | 10 | | /// </summary> |
| | | 11 | | /// <param name="edgeId"></param> |
| | | 12 | | public BoundaryOrLocalEdgeId(EdgeId edgeId) |
| | 2 | 13 | | { |
| | 2 | 14 | | this.LocalId = edgeId; |
| | 2 | 15 | | this.BoundaryId = null; |
| | 2 | 16 | | } |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Creates an id using a boundary edge id. |
| | | 20 | | /// </summary> |
| | | 21 | | /// <param name="boundaryEdgeId"></param> |
| | | 22 | | public BoundaryOrLocalEdgeId(BoundaryEdgeId boundaryEdgeId) |
| | 0 | 23 | | { |
| | 0 | 24 | | this.BoundaryId = boundaryEdgeId; |
| | 0 | 25 | | this.LocalId = null; |
| | 0 | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// The local id, an edge that is fully inside the tile. |
| | | 30 | | /// </summary> |
| | 8 | 31 | | public EdgeId? LocalId { get; } |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// A boundary edge, an edge that crosses tile boundaries. |
| | | 35 | | /// </summary> |
| | 0 | 36 | | public BoundaryEdgeId? BoundaryId { get; } |
| | | 37 | | } |