

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# So kehren Sie die Geokodierung für eine Position um
<a name="how-to-reverse-geocode-position"></a>

Mit der Reverse Geocode API können Sie einen Geocode auf der Grundlage einer Positionsabfrage in ein geografisches Gebiet konvertieren. Die API-Antwort enthält Ortsdetails und enthält Informationen über den Standort, der bestimmten Koordinaten zugeordnet ist.

## Mögliche Anwendungsfälle
<a name="potential-use"></a>
+ **Ortsinformationen speichern:** Fügen Sie Ortsdetails zu einem Datenspeicher hinzu, der Geokoordinaten enthält.
+ **Kartenvisualisierung:** Verwenden Sie Ortsinformationen, um Daten auf einer Karte anzuzeigen.
+ **Erkennung des Benutzerstandorts:** Identifizieren Sie den Standort des Benutzers anhand seiner Geräteposition.

## Geokodieren Sie eine Position rückwärts
<a name="reverse-geocode-position"></a>

------
#### [ Sample request ]

```
{
  "QueryPosition": [
    -123.11694,
    49.28126
  ]
}
```

------
#### [ Sample response ]

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointAddress",
            "Title": "510 W Georgia St, Vancouver, BC V6B 0M3, Canada",
            "Address": {
                "Label": "510 W Georgia St, Vancouver, BC V6B 0M3, Canada",
                "Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" },
                "Region": { "Code": "BC", "Name": "British Columbia" },
                "SubRegion": { "Name": "Metro Vancouver" },
                "Locality": "Vancouver",
                "District": "Downtown Vancouver",
                "PostalCode": "V6B 0M3",
                "Street": "W Georgia St",
                "StreetComponents": [
                    { "BaseName": "Georgia", "Type": "St", "TypePlacement": "AfterBaseName", "TypeSeparator": " ", "Prefix": "W", "Language": "en" }
                ],
                "AddressNumber": "510"
            },
            "Position": [-123.11694, 49.28126],
            "Distance": 0,
            "MapView": [-123.11813, 49.27786, -123.11076, 49.28246],
            "AccessPoints": [
                { "Position": [-123.11656, 49.28151] }
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://places.geo.eu-central-1.amazonaws.com/v2/reverse-geocode?key=Your_Key' \
  --header 'Content-Type: application/json' \
  --data '{
        "QueryPosition": [
            -123.11694,
            49.28126
        ]
}'
```

------
#### [ AWS CLI ]

```
aws geo-places reverse-geocode --key ${YourKey} --query-position "-123.11694,49.28126"
```

------

## Geokodieren Sie eine Position mit mehreren Ergebnissen rückwärts
<a name="reverse-geocode-position-multiple-results"></a>

------
#### [ Sample request ]

```
{
  "QueryPosition": [
    -123.11694,
    49.28126
  ],
  "MaxResults": "3"
}
```

------
#### [ Sample response ]

```
{
    "ResultItems": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointAddress",
            "Title": "510 W Georgia St, Vancouver, BC V6B 0M3, Canada",
            "Address": { /* Address details */ },
            "Position": [-123.11694, 49.28126],
            "Distance": 0,
            "MapView": [/* Map view details */],
            "AccessPoints": [/* Access point details */]
        },
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "ChargePoint",
            "Address": { /* Address details */ },
            "Position": [-123.11663, 49.28116],
            "Distance": 25,
            "Categories": [/* Category details */],
            "AccessPoints": [/* Access point details */]
        },
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "PointOfInterest",
            "Title": "Zipcar",
            "Address": { /* Address details */ },
            "Position": [-123.11715, 49.28094],
            "Distance": 29,
            "Categories": [/* Category details */],
            "AccessPoints": [/* Access point details */]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request POST \
  --url 'https://places.geo.eu-central-1.amazonaws.com/v2/reverse-geocode?key=Your_Key' \
  --header 'Content-Type: application/json' \
  --data '{
        "QueryPosition": [
            -123.11694,
            49.28126
        ],
        "MaxResults": "3"
}'
```

------
#### [ AWS CLI ]

```
aws geo-places reverse-geocode --key ${YourKey} --query-position "-123.11694,49.28126" --max-results "3"
```

------

## Tipps für Entwickler
<a name="developer-tips"></a>

Verwenden Sie es `IncludePlaceTypes` im Filter, um gezielte Ergebnisse zu erzielen.

```
{
  "QueryPosition": [
    -123.11694,
    49.28126
  ],
  "Filter": { "IncludePlaceTypes": ["PointAddress"] }
}
```