geocode.proto 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.maps.addressvalidation.v1;
  16. import "google/geo/type/viewport.proto";
  17. import "google/type/latlng.proto";
  18. option cc_enable_arenas = true;
  19. option csharp_namespace = "Google.Maps.AddressValidation.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/maps/addressvalidation/v1;addressvalidation";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "GeocodeProto";
  23. option java_package = "com.google.maps.addressvalidation.v1";
  24. option objc_class_prefix = "GMPAVV1";
  25. option php_namespace = "Google\\Maps\\AddressValidation\\V1";
  26. option ruby_package = "Google::Maps::AddressValidation::V1";
  27. // Contains information about the place the input was geocoded to.
  28. message Geocode {
  29. // The geocoded location of the input.
  30. //
  31. // Using place IDs is preferred over using addresses,
  32. // latitude/longitude coordinates, or plus codes. Using coordinates when
  33. // routing or calculating driving directions will always result in the point
  34. // being snapped to the road nearest to those coordinates. This may not be a
  35. // road that will quickly or safely lead to the destination and may not be
  36. // near an access point to the property. Additionally, when a location is
  37. // reverse geocoded, there is no guarantee that the returned address will
  38. // match the original.
  39. google.type.LatLng location = 1;
  40. // The plus code corresponding to the `location`.
  41. PlusCode plus_code = 2;
  42. // The bounds of the geocoded place.
  43. google.geo.type.Viewport bounds = 4;
  44. // The size of the geocoded place, in meters. This is another measure of the
  45. // coarseness of the geocoded location, but in physical size rather than in
  46. // semantic meaning.
  47. float feature_size_meters = 5;
  48. // The PlaceID of the place this input geocodes to.
  49. //
  50. // For more information about Place IDs see
  51. // [here](https://developers.google.com/maps/documentation/places/web-service/place-id).
  52. string place_id = 6;
  53. // The type(s) of place that the input geocoded to. For example,
  54. // `['locality', 'political']`. The full list of types can be found
  55. // [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
  56. repeated string place_types = 7;
  57. }
  58. // Plus code (http://plus.codes) is a location reference with two formats:
  59. // global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle,
  60. // and compound code, replacing the prefix with a reference location.
  61. message PlusCode {
  62. // Place's global (full) code, such as "9FWM33GV+HQ", representing an
  63. // 1/8000 by 1/8000 degree area (~14 by 14 meters).
  64. string global_code = 1;
  65. // Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
  66. // the suffix of the global code and replacing the prefix with a formatted
  67. // name of a reference entity.
  68. string compound_code = 2;
  69. }