-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathLocation.cs
72 lines (62 loc) · 2.01 KB
/
Location.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Copyright © 2023 Textkernel BV. All rights reserved.
// This file is provided for use by, or on behalf of, Textkernel licensees
// within the terms of their license of Textkernel products or Textkernel customers
// within the Terms of Service pertaining to the Textkernel SaaS products.
using System.Collections.Generic;
namespace Textkernel.Tx.Models
{
/// <summary>
/// Represents a physical location on Earth (mostly used for addresses)
/// </summary>
public class Location
{
/// <summary>
/// The 2-letter ISO 3166 country code
/// </summary>
public string CountryCode { get; set; }
/// <summary>
/// The Postal or Zip code
/// </summary>
public string PostalCode { get; set; }
/// <summary>
/// The Regions/Districts/States
/// </summary>
public List<string> Regions { get; set; }
/// <summary>
/// The City/Municipality/Town
/// </summary>
public string Municipality { get; set; }
/// <summary>
/// Street address lines
/// </summary>
public List<string> StreetAddressLines { get; set; }
/// <summary>
/// If geocoding has been done, this is the lat/lon for the location
/// </summary>
public GeocodedCoordinates GeoCoordinates { get; set; }
}
/// <summary>
/// Represents a lat/lon provided by a 3rd party service
/// </summary>
public class GeocodedCoordinates : GeoCoordinates
{
/// <summary>
/// The geocoding source, such as Google or Bing
/// </summary>
public string Source { get; set; }
}
/// <summary>
/// Represents a lat/lon
/// </summary>
public class GeoCoordinates
{
/// <summary>
/// The latitude, in degrees
/// </summary>
public double Latitude { get; set; }
/// <summary>
/// The longitude, in degrees
/// </summary>
public double Longitude { get; set; }
}
}