Query features by spatial predicate, bounding box, or H3 cell
elements.query(ElementQueryParams**kwargs) -> FeatureCollection
GET/api/v1/features
Query features by spatial predicate, bounding box, or H3 cell
Parameters
bbox: Optional[str]
Legacy shorthand. Bounding box: south,west,north,east. Use spatial predicates (near, within, intersects) instead.
format: Optional[str]
Response format. json (default) returns paginated GeoJSON. geojson/csv/ndjson stream via chunked transfer encoding.
Query features by spatial predicate, bounding box, or H3 cell
import os
from plaza import Plaza
client = Plaza(
api_key=os.environ.get("PLAZA_API_KEY"), # This is the default and can be omitted
)
feature_collection = client.elements.query()
print(feature_collection.features){
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"@id": "bar",
"@type": "bar",
"amenity": "bar",
"cuisine": "bar",
"name": "bar"
},
"type": "Feature",
"id": "node/21154906"
}
],
"type": "FeatureCollection"
}Returns Examples
{
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"@id": "bar",
"@type": "bar",
"amenity": "bar",
"cuisine": "bar",
"name": "bar"
},
"type": "Feature",
"id": "node/21154906"
}
],
"type": "FeatureCollection"
}