A GeoAI-Powered Road RoW Encroachments Detection Platform

In Kenya, encroachment into road corridors poses significant challenges to infrastructure development, resulting in project delays, escalating compensation costs, legal disputes, reduced road safety, and difficulties in enforcing land-use regulations. Rapid urbanization, population growth, and increasing demand for commercial and residential space have intensified pressure on road reserves worldwide. Traditional approaches to monitoring road reserves rely heavily on field inspections and manual interpretation of aerial imagery, processes that are expensive, time-consuming, and often unable to keep pace with the rate of development.

Mapping Road Encroachments
Road Encroachments in Kenya

This study presents an integrated Artificial Intelligence (AI) and Geographic Information System (GIS) solution for automated road encroachment detection using high-resolution satellite imagery. The proposed system combines YOLOv8 instance segmentation for automatic building extraction, PostGIS for spatial data management and analysis, and a Web GIS application built with React and Flask for interactive visualization and decision support. The workflow automates building detection, vectorization, spatial overlay analysis, and encroachment identification, providing road agencies with a scalable and repeatable monitoring framework.

The resulting platform demonstrates how modern computer vision and geospatial technologies can improve infrastructure management by enabling faster identification of encroachments, reducing dependence on manual surveys, and supporting evidence-based planning and enforcement. The common forms of road encroachment that highway authorities monitor include but not limited to:

  1. Buildings constructed within the road reserve – Permanent structures extending into the legally protected corridor.
  2. Roadside kiosks and informal businesses – Temporary or semi-permanent structures occupying road reserve land.
  3. Commercial developments – Shops, walls, and parking areas built too close to the roadway, restricting future road expansion.

Background

Transportation infrastructure is a fundamental driver of economic growth, regional integration, and social development. National highways facilitate trade, tourism, emergency response, and access to markets. To ensure safe operation and accommodate future expansion, governments designate road reserves—legally protected corridors extending beyond the carriageway.

Despite these legal protections, road reserves are increasingly threatened by unauthorized development. Residential buildings, commercial premises, kiosks, perimeter walls, fuel stations, and informal structures are often constructed within reserved corridors. Such encroachments reduce the available space for infrastructure expansion, increase project costs, and complicate maintenance operations.

Traditional monitoring methods rely on periodic field inspections, GPS surveys, and manual interpretation of aerial photographs. While effective for localized assessments, these methods become increasingly inefficient as the size of the road network grows. They are labour-intensive, costly, and incapable of providing continuous nationwide monitoring.

Advances in Earth observation, cloud computing, deep learning, and Web GIS now make it possible to automate much of this process. High-resolution satellite imagery can be analysed using AI models capable of detecting individual buildings with remarkable accuracy, while GIS technologies enable rapid spatial analysis against road reserve boundaries.

Problem Statement

Road authorities frequently encounter challenges such as: illegal developments and construction of structures within road reserves; delays in road construction projects due to land acquisition disputes; increased compensation costs resulting from late identification of encroachments; fragmented spatial information stored across multiple systems; limited capacity for continuous monitoring of extensive highway networks; time-consuming manual digitization of building footprints; difficulties in generating timely reports for planning and legal processes.

These challenges highlight the need for an automated, scalable, and spatially accurate monitoring system capable of detecting encroachments early and supporting informed decision-making.

Study Area

The study area for this project is a section of Likoni town along the Likoni – Lunga Lunga (A7) road section in the coastal region of Kenya. The coordinates of the study area are: 4°05’27.0″S 39°39’00.3″E.

Objectives

  • Develop an automated workflow for extracting building footprints from high-resolution imagery.
  • Detect structures that intersect legally defined road reserves.
  • Store extracted spatial information within an enterprise geospatial database.
  • Provide an interactive Web GIS platform for visualization, querying, and reporting.
  • Improve the efficiency and consistency of road reserve monitoring.
  • Support infrastructure planning, enforcement, and policy formulation.

Literature Review

Recent advances in deep learning have transformed object detection and image segmentation. Convolutional Neural Networks (CNNs) and transformer-based architectures have achieved significant improvements in extracting buildings from remote sensing imagery.

Models such as R-CNN, Faster R-CNN, Mask R-CNN, U-Net, DeepLab, and YOLO have demonstrated success in mapping buildings and other urban features. Among these, YOLOv8 offers a balance between speed, accuracy, and ease of deployment. Its instance segmentation capability produces precise object masks rather than coarse bounding boxes, making it particularly suitable for GIS applications where accurate building footprints are required.

The integration of AI-derived outputs with spatial databases such as PostGIS further enhances analytical capabilities by enabling overlay analysis, proximity calculations, buffering, and spatial statistics.

System Architecture

The application follows a modular architecture consisting of four primary layers:

  • Data Acquisition Layer: Satellite imagery, road reserve datasets, and administrative boundaries.
  • AI Processing Layer: YOLOv8 instance segmentation, OpenCV preprocessing, and polygon extraction.
  • Spatial Analysis Layer: PostgreSQL/PostGIS for data storage, buffering, and overlay analysis.
  • Presentation Layer: Flask REST API and React-based Web GIS dashboard using Leaflet for visualization.

This architecture promotes scalability, maintainability, and integration with other enterprise GIS systems.

Methodology

The methodology comprises several sequential stages:

  1. Acquisition of high-resolution satellite or aerial/drone imagery.
  2. Image preprocessing, including resizing and normalization.
  3. Building detection using a trained YOLOv8 instance segmentation model.
  4. Conversion of segmentation masks into vector polygons.
  5. Storage of extracted building footprints in a PostGIS database.
  6. Generation of road reserve buffers based on engineering specifications.
  7. Spatial overlay analysis to identify intersecting buildings.
  8. Visualization of results through an interactive Web GIS dashboard.
  9. Validation using manually digitized reference data.
  10. Generation of statistics and reports to support planning and enforcement.

AI Model Development

A custom YOLOv8 instance segmentation model was trained using manually labelled building footprints extracted from representative satellite imagery. The training dataset included diverse urban and rural environments to improve the model’s ability to generalize across varying building styles, roof materials, and settlement patterns.

The training workflow involved image annotation, data augmentation, iterative model optimization, and performance evaluation using metrics such as Precision, Recall, F1-score, and Intersection over Union (IoU). These metrics ensured that the model produced reliable building masks suitable for geospatial analysis.

road-encroachments-kenya
GeoAI Powered Road Encroachments Mapping and Reporting Platform

Software Stack

The application combines open-source technologies across the AI, GIS, backend, frontend, and database layers.

Layer Technology
Programming Python, TypeScript
AI Framework YOLOv8 Instance Segmentation
Deep Learning PyTorch
Backend Flask REST API
Frontend React, Vite
GIS Library Leaflet
Spatial Database PostgreSQL, PostGIS
Image Processing OpenCV, GDAL
Spatial Operations Shapely
Web Server Nginx
Operating System Ubuntu Linux
Version Control Git

Results and Discussion

The developed application successfully automated the extraction of building footprints from satellite imagery and identified structures intersecting road reserve boundaries. Results were presented through an interactive Web GIS dashboard where users could visualize roads, detected buildings, encroachments, and summary statistics.

As well, compared with traditional manual workflows, the system significantly reduced processing time while improving the consistency of building extraction. Spatial queries enabled rapid identification of encroaching structures and generation of reports for planning and enforcement activities.

Accuracy Assessment

Model performance was evaluated using an independent validation dataset. Building detections were compared with manually digitized reference data to compute Precision, Recall, F1-score, and Intersection over Union (IoU).

These metrics quantified both the correctness of detected buildings and the completeness of detection. Spatial validation also assessed boundary accuracy and positional agreement between predicted and reference building footprints. Such evaluations are essential before operational deployment to ensure confidence in the AI-generated outputs.

Benefits

  • The automated platform allows faster and more consistent building detection.
  • Early identification of encroachments before construction is completed.
  • Reduced reliance on manual digitization and field inspections.
  • Improved evidence for legal and compensation processes.
  • Centralized geospatial database supporting collaboration across departments.
  • Scalable framework capable of monitoring extensive road networks.
  • Enhanced decision support through interactive visualization and spatial analytics.

Future Work

Future enhancements may include integration of drone imagery, automated change detection using multi-temporal satellite data, real-time alerts for newly detected encroachments, mobile inspection applications, and linkage with cadastral, land administration, and asset management systems. Emerging multimodal AI models and large geospatial foundation models may further improve detection accuracy and support analysis of additional roadside features such as fences, drainage structures, and utility infrastructure.

Conclusion

This study demonstrates how Artificial Intelligence, computer vision, and Geographic Information Systems can be integrated into a practical decision-support platform for road corridor management. By combining YOLOv8 instance segmentation, enterprise geospatial databases, and an interactive online GIS application, the proposed system automates the detection and mapping of road reserve encroachments, providing faster, more consistent, and spatially accurate information than conventional manual methods.

The approach offers a scalable solution for road authorities seeking to improve corridor protection, reduce infrastructure project risks, and support evidence-based planning. Beyond highway management, the methodology can be adapted to monitor railway corridors, utility easements, pipelines, protected areas, and other infrastructure assets requiring continuous spatial surveillance.

Leave a Reply

Your email address will not be published. Required fields are marked *

Create Questionnairres and Surveys Forms

OrbiCollect-Mobile Data Collection App


OrbiCollect: Mobile data collection made easier for organizations and individuals! 

This will close in 20 seconds

Translate »