Class: Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1Geocode
- Inherits:
-
Object
- Object
- Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1Geocode
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/addressvalidation_v1/classes.rb,
lib/google/apis/addressvalidation_v1/representations.rb,
lib/google/apis/addressvalidation_v1/representations.rb
Overview
Contains information about the place the input was geocoded to.
Instance Attribute Summary collapse
-
#bounds ⇒ Google::Apis::AddressvalidationV1::GoogleGeoTypeViewport
A latitude-longitude viewport, represented as two diagonally opposite
low
andhigh
points. -
#feature_size_meters ⇒ Float
The size of the geocoded place, in meters.
-
#location ⇒ Google::Apis::AddressvalidationV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair.
-
#place_id ⇒ String
The PlaceID of the place this input geocodes to.
-
#place_types ⇒ Array<String>
The type(s) of place that the input geocoded to.
-
#plus_code ⇒ Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1PlusCode
Plus code (http://plus.codes) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsAddressvalidationV1Geocode
constructor
A new instance of GoogleMapsAddressvalidationV1Geocode.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsAddressvalidationV1Geocode
Returns a new instance of GoogleMapsAddressvalidationV1Geocode.
350 351 352 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 350 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bounds ⇒ Google::Apis::AddressvalidationV1::GoogleGeoTypeViewport
A latitude-longitude viewport, represented as two diagonally opposite low
and high
points. A viewport is considered a closed region, i.e. it includes
its boundary. The latitude bounds must range between -90 to 90 degrees
inclusive, and the longitude bounds must range between -180 to 180 degrees
inclusive. Various cases include: - If low
= high
, the viewport consists
of that single point. - If low.longitude
> high.longitude
, the longitude
range is inverted (the viewport crosses the 180 degree longitude line). - If
low.longitude
= -180 degrees and high.longitude
= 180 degrees, the viewport
includes all longitudes. - If low.longitude
= 180 degrees and high.
longitude
= -180 degrees, the longitude range is empty. - If low.latitude
>
high.latitude
, the latitude range is empty. Both low
and high
must be
populated, and the represented box cannot be empty (as specified by the
definitions above). An empty viewport will result in an error. For example,
this viewport fully encloses New York City: "low":
"latitude": 40.477398, "
longitude": -74.259087 , "high":
"latitude": 40.91618, "longitude": -73.
70018
Corresponds to the JSON property
bounds
312 313 314 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 312 def bounds @bounds end |
#feature_size_meters ⇒ Float
The size of the geocoded place, in meters. This is another measure of the
coarseness of the geocoded location, but in physical size rather than in
semantic meaning.
Corresponds to the JSON property featureSizeMeters
319 320 321 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 319 def feature_size_meters @feature_size_meters end |
#location ⇒ Google::Apis::AddressvalidationV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair. This is expressed as a
pair of doubles to represent degrees latitude and degrees longitude. Unless
specified otherwise, this object must conform to the WGS84 standard. Values
must be within normalized ranges.
Corresponds to the JSON property location
327 328 329 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 327 def location @location end |
#place_id ⇒ String
The PlaceID of the place this input geocodes to. For more information about
Place IDs see here.
Corresponds to the JSON property placeId
334 335 336 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 334 def place_id @place_id end |
#place_types ⇒ Array<String>
The type(s) of place that the input geocoded to. For example, ['locality', '
political']
. The full list of types can be found here.
Corresponds to the JSON property placeTypes
341 342 343 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 341 def place_types @place_types end |
#plus_code ⇒ Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1PlusCode
Plus code (http://plus.codes) is a location reference with two formats: global
code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and
compound code, replacing the prefix with a reference location.
Corresponds to the JSON property plusCode
348 349 350 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 348 def plus_code @plus_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
355 356 357 358 359 360 361 362 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 355 def update!(**args) @bounds = args[:bounds] if args.key?(:bounds) @feature_size_meters = args[:feature_size_meters] if args.key?(:feature_size_meters) @location = args[:location] if args.key?(:location) @place_id = args[:place_id] if args.key?(:place_id) @place_types = args[:place_types] if args.key?(:place_types) @plus_code = args[:plus_code] if args.key?(:plus_code) end |