After you have drawn or uploaded your parcel polygon and optionally previewed the analysis results on the map, GeoViable can produce a complete technical PDF report that consolidates all findings in a printable, submittable format. The report is designed to be attached directly to planning licence applications and preliminary environmental consultation requests in Galicia. It is generated entirely server-side — the backend re-runs the full spatial analysis independently to guarantee that the data in the PDF exactly matches the state of the environmental datasets at the moment of generation.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/danizd/geoviable/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A valid polygon must be present on the map (drawn or uploaded).
- The Nombre del proyecto field in the Project Form must be filled in (3–100 characters).
- Running the layer analysis first (via Cargar capas) is recommended so you can preview results before generating the PDF, but it is not strictly required — the report endpoint runs its own analysis internally.
Generating the report step by step
Fill in the Project Form
In the sidebar, locate the Project Form section and complete the fields:
The project name is used as the report title and in the output filename. The author and description fields are optional but recommended for reports that will be submitted to public administrations.
| Field | Required | Constraints |
|---|---|---|
| Nombre del proyecto | ✅ Yes | 3–100 characters |
| Autor / responsable | ❌ No | 0–100 characters |
| Descripción breve | ❌ No | 0–500 characters |
Select the basemap for the static map
The PDF report includes a static map image of your parcel with all affected layer overlays. Before generating, choose which base layer you want rendered in that image:
- OpenStreetMap — default street-and-topographic basemap.
- PNOA — high-resolution Spanish national aerial orthophoto.
project.basemap field of the request and used by contextily+matplotlib when rendering the static map image.Click 'Generar informe de viabilidad (PDF)'
Click the 📄 Generar informe de viabilidad (PDF) button. It is enabled only when a polygon is loaded and the project name meets the minimum length. While the report is being generated, the button shows a spinner and the label changes to “Generando informe…”. A progress bar is displayed below the button.
GeoViable sends the report request
The frontend calls
POST /api/v1/report/generate with the polygon and project metadata:Backend generates the PDF
The server performs the following steps internally:
- Runs the full spatial analysis against all 7 environmental layers in PostGIS (independent of any earlier
/analyzecall). - Renders a static map image using contextily (tile fetching) and matplotlib (figure composition), including the parcel boundary and all affected layer overlays.
- Populates a Jinja2 HTML template with the analysis results, project metadata, parcel statistics, and the static map image.
- Converts the rendered HTML to a PDF document using WeasyPrint.
- Returns the PDF binary as the HTTP response body.
PDF report contents
The generated PDF is structured as a technical document and includes the following sections:Project metadata
Project name, author, description, and the date and time the report was generated.
Static map image
A rendered map showing the parcel boundary and all affected layer overlays, using the selected basemap (OpenStreetMap or PNOA aerial).
Risk score banner
The overall risk level prominently displayed: ninguno, bajo, medio, alto, or muy alto, with a brief explanation of the conditions that determined it.
Analysis summary
Total layers checked (7), number of layers with at least one intersection, and a high-level summary of the most significant constraints found.
Per-layer detail table
For each of the 7 layers: affected (yes/no), names of intersecting features, overlap area in m², and overlap as a percentage of the parcel area.
Parcel information
Parcel area in m² and hectares, centroid coordinates (longitude/latitude in WGS84), and the CRS used for calculations.
The report endpoint runs the full spatial analysis independently — it does not reuse the results from a previous Cargar capas call. This ensures that the data in the PDF always reflects the state of the environmental datasets at the exact moment the report is generated, even if some time has passed since you last previewed the overlays on the map. If the layers were updated between the preview and the report generation, the PDF will contain the most current data.