bcn.query_resource_geo
bcn_query_resource_geoRun bounded geospatial queries on Open Data BCN resources using near, bbox, within_place, contains, and group_by with WGS84 coordinates.
Instructions
Run a bounded geospatial query over an Open Data BCN resource with WGS84 latitude/longitude columns. Works for DataStore-active resources and safe BCN-hosted CSV/JSON downloads; active near/bbox calls use generated CKAN SQL internally. Use near for distance queries, bbox for rectangular areas, within_place for district/neighborhood polygons returned by bcn_resolve_place.area_ref, contains for street/name text filters, and group_by for counts such as species by street. Coordinate fields are inferred from common BCN names such as latitud/longitud, geo_epgs_4326_lat/geo_epgs_4326_lon, and geo_epgs_4326_y/geo_epgs_4326_x; pass lat_field/lon_field when ambiguous.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | ||
| near | No | ||
| limit | No | Rows to return. Server maximum: 100. | |
| fields | No | ||
| offset | No | ||
| filters | No | ||
| contains | No | ||
| group_by | No | ||
| lat_field | No | ||
| lon_field | No | ||
| group_limit | No | ||
| resource_id | Yes | ||
| within_place | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error | No | ||
| provenance | Yes |