| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using System.Collections.Generic; |
| | | 5 | | using System.Linq; |
| | | 6 | | |
| | | 7 | | namespace Azure.Core.GeoJson |
| | | 8 | | { |
| | | 9 | | /// <summary> |
| | | 10 | | /// Represents a line geometry that consists of multiple coordinates. |
| | | 11 | | /// </summary> |
| | | 12 | | public sealed class GeoLine : GeoObject |
| | | 13 | | { |
| | | 14 | | /// <summary> |
| | | 15 | | /// Initializes new instance of <see cref="GeoLine"/>. |
| | | 16 | | /// </summary> |
| | | 17 | | /// <param name="coordinates">The collection of <see cref="GeoPosition"/> that make up the line.</param> |
| | 0 | 18 | | public GeoLine(IEnumerable<GeoPosition> coordinates): this(coordinates, null, DefaultProperties) |
| | | 19 | | { |
| | 0 | 20 | | } |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// Initializes new instance of <see cref="GeoLine"/>. |
| | | 24 | | /// </summary> |
| | | 25 | | /// <param name="coordinates">The collection of <see cref="GeoPosition"/> that make up the line.</param> |
| | | 26 | | /// <param name="boundingBox">The <see cref="GeoBoundingBox"/> to use.</param> |
| | | 27 | | /// <param name="additionalProperties">The set of additional properties associated with the <see cref="GeoObject |
| | 144 | 28 | | public GeoLine(IEnumerable<GeoPosition> coordinates, GeoBoundingBox? boundingBox, IReadOnlyDictionary<string, ob |
| | | 29 | | { |
| | 144 | 30 | | Positions = coordinates.ToArray(); |
| | 144 | 31 | | } |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets the list of <see cref="GeoPosition"/> that compose this line. |
| | | 35 | | /// </summary> |
| | 148 | 36 | | public IReadOnlyList<GeoPosition> Positions { get; } |
| | | 37 | | } |
| | | 38 | | } |