Use this file to discover all available pages before exploring further.
The /analyze endpoint accepts a GeoJSON Feature with a Polygon or MultiPolygon geometry, validates it, runs the full spatial analysis against all 7 environmental layers stored in PostGIS, and returns the results as JSON. It is primarily used by the frontend to preview layer intersections on the map before the user decides to generate a PDF report.Method and path:POST /api/v1/analyze
Coordinate ring array in EPSG:4326 (WGS84). Coordinates are ordered as [longitude, latitude]. The first and last positions in each ring must be identical (closed ring).
List of intersecting features. Empty array when affected is false. Each feature object may contain: nombre, tipo, codigo, categoria, area_interseccion_m2, porcentaje_solape, and additional layer-specific fields such as periodo_retorno, nombre_cauce, anchura_legal_m, estado_ecologico, estado_quimico, or estado_cuantitativo.
The overall_risk field is derived from the layer intersection results. It is an indicative assessment and does not substitute a formal environmental study.
Condition
overall_risk
0 layers affected
ninguno
1–2 layers affected, all with < 10% overlap
bajo
1–2 layers affected, any with ≥ 10% overlap
medio
3+ layers affected, or Red Natura 2000 / ENP with ≥ 50% overlap
alto
Any intersection with Dominio Público Hidráulico, or flood zone with periodo_retorno = "T100"
The frontend uses this endpoint to render a live preview of layer intersections on the map as the user draws a polygon. The /report/generate endpoint runs the full analysis independently when producing the PDF — it does not consume or cache the response from a prior /analyze call.