OSDN Git Service

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