Skip to main content

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.

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.

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

1

Fill in the Project Form

In the sidebar, locate the Project Form section and complete the fields:
FieldRequiredConstraints
Nombre del proyecto✅ Yes3–100 characters
Autor / responsable❌ No0–100 characters
Descripción breve❌ No0–500 characters
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.
2

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.
The basemap preference is sent to the backend in the project.basemap field of the request and used by contextily+matplotlib when rendering the static map image.
3

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.
4

GeoViable sends the report request

The frontend calls POST /api/v1/report/generate with the polygon and project metadata:
POST /api/v1/report/generate
Content-Type: application/json

{
  "geojson": {
    "type": "Feature",
    "geometry": { ... },
    "properties": {}
  },
  "project": {
    "name": "Ampliación nave industrial — Parcela 234",
    "author": "Estudio Técnico López",
    "description": "Evaluación previa para licencia urbanística",
    "basemap": "PNOA"
  }
}
5

Backend generates the PDF

The server performs the following steps internally:
  1. Runs the full spatial analysis against all 7 environmental layers in PostGIS (independent of any earlier /analyze call).
  2. Renders a static map image using contextily (tile fetching) and matplotlib (figure composition), including the parcel boundary and all affected layer overlays.
  3. Populates a Jinja2 HTML template with the analysis results, project metadata, parcel statistics, and the static map image.
  4. Converts the rendered HTML to a PDF document using WeasyPrint.
  5. Returns the PDF binary as the HTTP response body.
6

PDF download

When the response is received, the browser triggers an automatic file download. The filename follows the pattern:
GeoViable_Informe_{project_name}_{date}.pdf
For example: GeoViable_Informe_Parcela_234_2025-06-15.pdfA success modal also appears confirming the download.

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 also includes a data timestamp indicating when the environmental layers loaded into GeoViable’s PostGIS database were last updated — this is important for demonstrating the currency of the data to planning authorities.
The Nombre del proyecto field is required and must be between 3 and 100 characters. The 📄 Generar informe de viabilidad (PDF) button remains disabled and shows the tooltip “Introduce un nombre para el proyecto (mínimo 3 caracteres).” until this condition is met. Reports cannot be generated without a project name.
Select PNOA as the basemap when generating reports intended for submission to planning authorities or public administrations. The high-resolution Spanish national orthophoto provides a much clearer reference image than the default street map, making it easier for reviewers to visually locate the parcel and understand its immediate surroundings.
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.

Build docs developers (and LLMs) love