The mapAI package provides a cohesive, end-to-end toolkit in R
for the Positional Accuracy Improvement (PAI) and distortion analysis of
vector maps.
Details
The package is designed for researchers and practitioners in geomatics and GIS, It provides a complete, modular workflow that guides the user from importing data 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 methodshelmert,tps,gam,lm,rf,svmRadialandsvmLinear. 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 that learns a PAI model 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)