close
Skip to content

pafmoura/Land-Defragmentation

Repository files navigation

Land Defragmentation Project (Projeto de Desfragmentação de Território)

📖 Overview

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.

👥 Authors

  • Alexandre Milharado (105946)
  • Marco Camargo (128933)
  • Pedro Moura (126474)
  • Sara Santos (131804)

🚀 Features

The application operates as a Minimum Viable Product (MVP) with four main modules:

  1. Authentication: User session management (login/logout) via cookies.
  2. Simulation:
    • Upload of geographic data (.gpkg format).
    • Simulation of land ownership using Uniform or Poisson distributions.
  3. Defragmentation: Execution of optimization algorithms to reorganize land parcels.
  4. Visualization: Interactive map views of the initial state versus the optimized result, including statistical reports on exchanges.

🛠️ Technology Stack

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.

🧠 Algorithms

We developed three distinct algorithms to solve the optimization problem, balancing aggregation error against area preservation.

1. Redistribution Algorithm

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.

2. Redistribution with Mutational Beam Annealing

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)

3. Pivot Defragmentation (Desfragmentação por Pivôs)

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

📊 Results Summary

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.

🔮 Future Work

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

📄 License & Attribution

This project uses data from IFAP (Instituto de Financiamento da Agricultura e Pescas)

About

Address the issue of Land fragmentation in Portugal by providing a web-based tool that uses mathematical algorithms to propose fair and equitable land exchanges.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors