Skip to content
GuidesPlaygroundDashboard

Query features by bounding box or H3 cell

elements().query(ElementQueryParamsparams = ElementQueryParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : FeatureCollection
GET/api/v1/features

Query features by bounding box or H3 cell

ParametersExpand Collapse
params: ElementQueryParams
bbox: Optional<String>

Bounding box: south,west,north,east. At least one of bbox or h3 is required.

cursor: Optional<String>

Cursor for pagination

h3: Optional<String>

H3 cell index. At least one of bbox or h3 is required.

limit: Optional<Long>

Maximum results (default 100, max 10000)

type: Optional<String>

Element types (comma-separated: node,way,relation)

ReturnsExpand Collapse
class FeatureCollection:

Bare GeoJSON FeatureCollection. Pagination metadata is returned in HTTP headers (X-Limit, X-Has-More, X-Next-Cursor, X-Next-Offset, Link).

features: List<GeoJsonFeature>
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
type: Type
id: Optional<String>

Feature identifier (type/osm_id)

osmId: Optional<Long>

OpenStreetMap ID

type: Type

Query features by bounding box or H3 cell

package com.plazafyi.example

import com.plazafyi.client.PlazaClient
import com.plazafyi.client.okhttp.PlazaOkHttpClient
import com.plazafyi.models.FeatureCollection
import com.plazafyi.models.elements.ElementQueryParams

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

    val featureCollection: FeatureCollection = client.elements().query()
}
Returns Examples