reverse_geocode
¶
reverse_geocode(
query_position: Position,
*,
config_overrides: Optional[GeoPlacesClientConfig] = None,
query_radius: Optional[DistanceMeters] = None,
max_results: Optional[int] = None,
filter: Optional[ReverseGeocodeFilter] = None,
additional_features: Optional[ReverseGeocodeAdditionalFeatureList] = None,
language: Optional[LanguageTag] = None,
political_view: Optional[CountryCode] = None,
intended_use: Optional[ReverseGeocodeIntendedUse] = None,
key: Optional[ApiKey] = None,
heading: Optional[Heading] = None,
address_names_mode: Optional[ReverseGeocodeAddressNamesMode] = None,
) -> ReverseGeocodeResponse
ReverseGeocode converts geographic coordinates into a human-readable address or place. You can obtain address component, and other related information such as place type, category, street information. The Reverse Geocode API supports filtering to on place type so that you can refine result based on your need. Also, The Reverse Geocode API can also provide additional features such as time zone information and the inclusion of political views.
For more information, see Reverse Geocode in the Amazon Location Service Developer Guide.
Parameters:
-
query_position(Position) –The position in World Geodetic System (WGS 84) format: [longitude, latitude] for which you are querying nearby results for. Results closer to the position will be ranked higher then results further away from the position
-
query_radius(Optional[DistanceMeters], default:None) –The maximum distance in meters from the QueryPosition from which a result will be returned. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions support only up to a maximum value of 100,000. -
max_results(Optional[int], default:None) –An optional limit for the number of results returned in a single call.
Default value: 1
-
filter(Optional[ReverseGeocodeFilter], default:None) –A structure which contains a set of inclusion/exclusion properties that results must possess in order to be returned as a result.
-
additional_features(Optional[ReverseGeocodeAdditionalFeatureList], default:None) –A list of optional additional parameters, such as time zone that can be requested for each result. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions support only theTimeZonevalue. -
language(Optional[LanguageTag], default:None) –A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry. For GrabMaps customers,
ap-southeast-1andap-southeast-5regions support only the following codes:en, id, km, lo, ms, my, pt, th, tl, vi, zh -
political_view(Optional[CountryCode], default:None) –The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country. Not supported in
ap-southeast-1andap-southeast-5regions for GrabMaps customers. -
intended_use(Optional[ReverseGeocodeIntendedUse], default:None) –Indicates if the query results will be persisted in customer infrastructure. Defaults to
SingleUse(not stored).When storing
ReverseGeocoderesponses, you must set this field toStorageto comply with the terms of service. These requests will be charged at a higher rate. Please review the user agreement and service pricing structure to determine the correct setting for your use case. -
key(Optional[ApiKey], default:None) –Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
-
heading(Optional[Heading], default:None) –The heading in degrees from true north in a navigation context. The heading is measured as the angle clockwise from the North direction.
Example: North is
0degrees, East is90degrees, South is180degrees, and West is270degrees. -
address_names_mode(Optional[ReverseGeocodeAddressNamesMode], default:None) –Specifies how address names are returned. When set to
Administrative, the service returns the official administrative names for address components.Administrativecurrently applies only to addresses in the United States.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action.
-
InternalServerException–The request processing has failed because of an unknown error, exception or failure.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by an AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_geo_places/_services/geo_places.py
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | |