mapAI: Positional Accuracy Improvement for Historical Maps
mapAI.Rd
The mapAI
package provides a cohesive, end-to-end toolkit in R
for the Positional Accuracy Improvement (PAI) and distortion analysis of
historical vector maps. It uses a suite of statistical and machine learning
models to learn the complex geometric distortions inherent in historical
cartographic documents and applies a correction to use in modern GIS
applications.
Details
The package is designed for researchers and practitioners in geomatics, GIS, and the digital humanities. It provides a complete, modular workflow that guides the user from data ingestion to final analysis and visualization.
The Core Workflow
The main workflow follows a logical sequence:
Data Handling: Imports spatial data and control points using
read_map()
andread_gcps()
. The package also includes functions to generate synthetic data (create_demo_data()
) and save results (write_map()
).Model Training & Validation: Train a correction model using
train_pai_model()
with a choice of methods ("helmert"
,"lm"
,"rf"
,"gam"
). Robustly evaluate model performance using spatial cross-validation withassess_pai_model()
.Geometric Correction: Apply the trained model to the full vector map to get a geometrically corrected version using
apply_pai_model()
.Distortion Analysis & Visualization: Go beyond correction to quantify and understand the distortion itself.
Use
analyze_distortion()
to compute detailed metrics based on Tissot's indicatrix theory (e.g., areal scale, angular distortion).Use the dedicated plotting functions (
plot_displacement()
,plot_residuals()
,plot_distortion_surface()
,plot_indicatrices()
) to create compelling, publication-quality visualizations of the error and distortion patterns.
See also
To get started with a practical example, see the introductory
vignette: vignette("getting-started", package = "mapAI")
For a more in-depth look at comparing models and validation strategies, see
the advanced vignette: vignette("swiss-analysis", package = "mapAI")
The project's source code and issue tracker can be found on GitHub: https://github.com/kvantas/mapAI
Author
Maintainer: Konstantinos Vantas kon.vantas@gmail.com (ORCID)