1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/type/latlng.proto
3
4package latlng // import "google.golang.org/genproto/googleapis/type/latlng"
5
6import proto "github.com/golang/protobuf/proto"
7import fmt "fmt"
8import math "math"
9
10// Reference imports to suppress errors if they are not otherwise used.
11var _ = proto.Marshal
12var _ = fmt.Errorf
13var _ = math.Inf
14
15// This is a compile-time assertion to ensure that this generated file
16// is compatible with the proto package it is being compiled against.
17// A compilation error at this line likely means your copy of the
18// proto package needs to be updated.
19const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20
21// An object representing a latitude/longitude pair. This is expressed as a pair
22// of doubles representing degrees latitude and degrees longitude. Unless
23// specified otherwise, this must conform to the
24// <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
25// standard</a>. Values must be within normalized ranges.
26//
27// Example of normalization code in Python:
28//
29//     def NormalizeLongitude(longitude):
30//       """Wraps decimal degrees longitude to [-180.0, 180.0]."""
31//       q, r = divmod(longitude, 360.0)
32//       if r > 180.0 or (r == 180.0 and q <= -1.0):
33//         return r - 360.0
34//       return r
35//
36//     def NormalizeLatLng(latitude, longitude):
37//       """Wraps decimal degrees latitude and longitude to
38//       [-90.0, 90.0] and [-180.0, 180.0], respectively."""
39//       r = latitude % 360.0
40//       if r <= 90.0:
41//         return r, NormalizeLongitude(longitude)
42//       elif r >= 270.0:
43//         return r - 360, NormalizeLongitude(longitude)
44//       else:
45//         return 180 - r, NormalizeLongitude(longitude + 180.0)
46//
47//     assert 180.0 == NormalizeLongitude(180.0)
48//     assert -180.0 == NormalizeLongitude(-180.0)
49//     assert -179.0 == NormalizeLongitude(181.0)
50//     assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
51//     assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
52//     assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
53//     assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
54//     assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
55//     assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
56//     assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
57//     assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
58//     assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
59//     assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
60type LatLng struct {
61	// The latitude in degrees. It must be in the range [-90.0, +90.0].
62	Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
63	// The longitude in degrees. It must be in the range [-180.0, +180.0].
64	Longitude            float64  `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
65	XXX_NoUnkeyedLiteral struct{} `json:"-"`
66	XXX_unrecognized     []byte   `json:"-"`
67	XXX_sizecache        int32    `json:"-"`
68}
69
70func (m *LatLng) Reset()         { *m = LatLng{} }
71func (m *LatLng) String() string { return proto.CompactTextString(m) }
72func (*LatLng) ProtoMessage()    {}
73func (*LatLng) Descriptor() ([]byte, []int) {
74	return fileDescriptor_latlng_c1d6506011cbaf0c, []int{0}
75}
76func (m *LatLng) XXX_Unmarshal(b []byte) error {
77	return xxx_messageInfo_LatLng.Unmarshal(m, b)
78}
79func (m *LatLng) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
80	return xxx_messageInfo_LatLng.Marshal(b, m, deterministic)
81}
82func (dst *LatLng) XXX_Merge(src proto.Message) {
83	xxx_messageInfo_LatLng.Merge(dst, src)
84}
85func (m *LatLng) XXX_Size() int {
86	return xxx_messageInfo_LatLng.Size(m)
87}
88func (m *LatLng) XXX_DiscardUnknown() {
89	xxx_messageInfo_LatLng.DiscardUnknown(m)
90}
91
92var xxx_messageInfo_LatLng proto.InternalMessageInfo
93
94func (m *LatLng) GetLatitude() float64 {
95	if m != nil {
96		return m.Latitude
97	}
98	return 0
99}
100
101func (m *LatLng) GetLongitude() float64 {
102	if m != nil {
103		return m.Longitude
104	}
105	return 0
106}
107
108func init() {
109	proto.RegisterType((*LatLng)(nil), "google.type.LatLng")
110}
111
112func init() { proto.RegisterFile("google/type/latlng.proto", fileDescriptor_latlng_c1d6506011cbaf0c) }
113
114var fileDescriptor_latlng_c1d6506011cbaf0c = []byte{
115	// 165 bytes of a gzipped FileDescriptorProto
116	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x48, 0xcf, 0xcf, 0x4f,
117	0xcf, 0x49, 0xd5, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0xcf, 0x49, 0x2c, 0xc9, 0xc9, 0x4b, 0xd7, 0x2b,
118	0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0xc8, 0xe8, 0x81, 0x64, 0x94, 0x9c, 0xb8, 0xd8, 0x7c,
119	0x12, 0x4b, 0x7c, 0xf2, 0xd2, 0x85, 0xa4, 0xb8, 0x38, 0x72, 0x12, 0x4b, 0x32, 0x4b, 0x4a, 0x53,
120	0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x18, 0x83, 0xe0, 0x7c, 0x21, 0x19, 0x2e, 0xce, 0x9c, 0xfc,
121	0xbc, 0x74, 0x88, 0x24, 0x13, 0x58, 0x12, 0x21, 0xe0, 0x94, 0xc0, 0xc5, 0x9f, 0x9c, 0x9f, 0xab,
122	0x87, 0x64, 0xac, 0x13, 0x37, 0xc4, 0xd0, 0x00, 0x90, 0x85, 0x01, 0x8c, 0x51, 0x16, 0x50, 0xb9,
123	0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0xbd, 0xfc, 0xa2, 0x74, 0xfd, 0xf4, 0xd4, 0x3c, 0xb0, 0x73,
124	0xf4, 0x21, 0x52, 0x89, 0x05, 0x99, 0xc5, 0xc8, 0x6e, 0xb5, 0x86, 0x50, 0x8b, 0x98, 0x98, 0xdd,
125	0x43, 0x02, 0x92, 0xd8, 0xc0, 0x4a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x69, 0x12, 0x54,
126	0x1c, 0xd5, 0x00, 0x00, 0x00,
127}
128