resumen_zona
Counts the parcels that match some filters, grouped by one to three fields (municipality, group, class, district,
built…), and adds up the numeric fields requested, with how many parcels have each one. It takes the same
filters, municipalities and centre as buscar.
Arguments
| Argument | Type | What it is |
|---|---|---|
agrupar_por | list of texts, required | 1 to 3 fields to group by, for example ["municipio", "grupo"] |
filtros | text (JSON) | The conditions, as in buscar |
municipios | list of texts | Municipality ids; without them, every municipality your company can query |
lon | number | Longitude of the centre |
lat | number | Latitude of the centre |
radio_m | number | Radius in metres, up to 50,000 |
metricas | list of texts | Numeric fields to add up, for example ["techo_m2t", "superficie_m2"] |
limite | integer | Groups, from 1 to 200 (50 by default) |
coleccion | text | parcelas (default) or ambitos: counts planning areas and sectors and adds up their figures |
Response
total, sin_dato and the groups, from most to fewest parcels. Each group carries its values, filas and, for
each metric, suma and con_dato.