| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System.Collections.Generic; |
| | 5 | |
|
| | 6 | | namespace Azure.Core.GeoJson |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// Represents a point geometry. |
| | 10 | | /// </summary> |
| | 11 | | public sealed class GeoPoint : GeoObject |
| | 12 | | { |
| | 13 | | /// <summary> |
| | 14 | | /// Initializes new instance of <see cref="GeoPoint"/>. |
| | 15 | | /// </summary> |
| | 16 | | /// <param name="longitude">The longitude of the point.</param> |
| | 17 | | /// <param name="latitude">The latitude of the point.</param> |
| 2 | 18 | | public GeoPoint(double longitude, double latitude): this(new GeoPosition(longitude, latitude), null, DefaultProp |
| | 19 | | { |
| 2 | 20 | | } |
| | 21 | |
|
| | 22 | | /// <summary> |
| | 23 | | /// Initializes new instance of <see cref="GeoPoint"/>. |
| | 24 | | /// </summary> |
| | 25 | | /// <param name="longitude">The longitude of the point.</param> |
| | 26 | | /// <param name="latitude">The latitude of the point.</param> |
| | 27 | | /// <param name="altitude">The altitude of the point.</param> |
| 0 | 28 | | public GeoPoint(double longitude, double latitude, double? altitude): this(new GeoPosition(longitude, latitude, |
| | 29 | | { |
| 0 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes new instance of <see cref="GeoPoint"/>. |
| | 34 | | /// </summary> |
| | 35 | | /// <param name="position">The position of the point.</param> |
| 0 | 36 | | public GeoPoint(GeoPosition position): this(position, null, DefaultProperties) |
| | 37 | | { |
| 0 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> |
| | 41 | | /// Initializes new instance of <see cref="GeoPoint"/>. |
| | 42 | | /// </summary> |
| | 43 | | /// <param name="position">The position of the point.</param> |
| | 44 | | /// <param name="boundingBox">The <see cref="GeoBoundingBox"/> to use.</param> |
| | 45 | | /// <param name="additionalProperties">The set of additional properties associated with the <see cref="GeoObject |
| 98 | 46 | | public GeoPoint(GeoPosition position, GeoBoundingBox? boundingBox, IReadOnlyDictionary<string, object?> addition |
| | 47 | | { |
| 98 | 48 | | Position = position; |
| 98 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Gets position of the point. |
| | 53 | | /// </summary> |
| 98 | 54 | | public GeoPosition Position { get; } |
| | 55 | | } |
| | 56 | | } |