Skip to content
GuidesPlaygroundDashboard

Reverse geocode a coordinate

geocode().reverse(GeocodeReverseParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : ReverseGeocodeResult
GET/api/v1/geocode/reverse

Reverse geocode a coordinate

ParametersExpand Collapse
params: GeocodeReverseParams
lat: Double

Latitude

lng: Double

Longitude

lang: Optional<String>

Language code for localized names (e.g. en, de, fr)

layer: Optional<String>

Filter by layer: house or poi

limit: Optional<Long>

Maximum results (default 1, max 20)

radius: Optional<Long>

Search radius in meters (default 200, max 5000)

ReturnsExpand Collapse
class ReverseGeocodeResult:

GeoJSON FeatureCollection of reverse geocoding results

features: List<GeocodingFeature>
geometry: GeoJsonGeometry
coordinates: Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<Double>
List<List<Double>>
List<List<List<Double>>>
List<List<List<List<Double>>>>
type: Type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
properties: Properties
countryCode: Optional<String>

ISO 3166-1 alpha-2 country code

displayName: Optional<String>

Formatted address or place name

distanceM: Optional<Double>

Distance in meters

osmId: Optional<Long>

OpenStreetMap ID

osmType: Optional<String>

OSM element type

score: Optional<Double>

Match confidence score

source: Optional<String>

Result source (address, place, interpolation)

type: Type
type: Type

Reverse geocode a coordinate

package com.plazafyi.example

import com.plazafyi.client.PlazaClient
import com.plazafyi.client.okhttp.PlazaOkHttpClient
import com.plazafyi.models.geocode.GeocodeReverseParams
import com.plazafyi.models.geocode.ReverseGeocodeResult

fun main() {
    val client: PlazaClient = PlazaOkHttpClient.fromEnv()

    val params: GeocodeReverseParams = GeocodeReverseParams.builder()
        .lat(0.0)
        .lng(0.0)
        .build()
    val reverseGeocodeResult: ReverseGeocodeResult = client.geocode().reverse(params)
}
Returns Examples