This project was developed as part of the Master's in Informatics Engineering at ISCTE-IUL. It addresses the issue of land fragmentation in Portugal by providing a web-based tool that uses mathematical algorithms to propose fair and equitable land exchanges.
The goal is to help regional decision-makers and owners optimize territory distribution, reducing environmental degradation and rural fire risks associated with dispersed, abandoned properties.
- Alexandre Milharado (105946)
- Marco Camargo (128933)
- Pedro Moura (126474)
- Sara Santos (131804)
The application operates as a Minimum Viable Product (MVP) with four main modules:
- Authentication: User session management (login/logout) via cookies.
- Simulation:
- Upload of geographic data (
.gpkgformat). - Simulation of land ownership using Uniform or Poisson distributions.
- Upload of geographic data (
- Defragmentation: Execution of optimization algorithms to reorganize land parcels.
- Visualization: Interactive map views of the initial state versus the optimized result, including statistical reports on exchanges.
The solution utilizes a decoupled architecture
- Backend: Django (Python)
- Handles data processing and algorithm execution.
- Uses GeoPandas for processing geographic datasets
- Frontend: Angular (TypeScript)
- Single-Page Application (SPA) structure.
- Styling: Tailwind CSS.
We developed three distinct algorithms to solve the optimization problem, balancing aggregation error against area preservation.
A heuristic approach that effectively "wipes" the map and redistributes land in consolidated blocks based on the owner's total initial area .
- Pros: Extremely fast execution; maximizes aggregation. Cons: Does not account for original plot locations; requires logic to handle leftover unallocated land.
An evolutionary algorithm combining Beam Search and Simulated Annealing Mechanism: Uses genetic operators (swap, multiple swap, cluster expansion) to mutate states. It maintains a "beam" of best solutions but allows accepting worse states (based on temperature) to escape local minima. Performance: Achieved the lowest aggregation error in testing (best quality results)
Inspired by Tabu Search and Informed Greedy Search. Mechanism: Identifies "pivot" plots (largest/best aggregated) for each owner and attempts to expand around them by trading or "buying" neighboring plots from other owners. Pros: Preserves the logic of the original location better than redistribution
Tests were conducted using IFAP datasets (e.g., Portalegre, Lisboa, Vila Real).
| Algorithm | Speed | Aggregation Quality | Area Preservation |
|---|---|---|---|
| Redistribution | ⚡ Fastest | Low | Consistent |
| Pivots | ⚖️ Balanced | Medium | Good (with outliers) |
| Mutational Beam Annealing | 🐢 Slowest | 🏆 Best | Adjustable (via weights) |
Data based on project report results.
- Value Definition: Incorporate economic factors (soil quality, road access, taxes) rather than just area size for fairer swaps.
- Architecture: Migrate from the current monolithic backend to a microservices architecture using RabbitMQ for asynchronous processing of heavy algorithms.
This project uses data from IFAP (Instituto de Financiamento da Agricultura e Pescas)