Metadata-Version: 2.4
Name: MapProjectionAnimator
Version: 0.1.0a0
Summary: A command line tool to compare map projections and render animations from such comparisons
Home-page: https://github.com/mocnik-science/map-projection-animator
Author: Franz-Benjamin Mocnik
Author-email: mail@mocnik-science.net
License: MIT
Keywords: map projections,comparison,animation
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Requires-Dist: geopandas
Requires-Dist: matplotlib
Requires-Dist: multiprocess
Requires-Dist: pillow
Requires-Dist: pyproj
Requires-Dist: requests
Requires-Dist: shapely
Dynamic: license-file

# MapProjectionAnimator

The command line tool `MapProjectionAnimator` makes possible to compare map projections and render animations from such comparisons.

## Scientific Publications

An overview of the package and the ideas behind it can be found in:

* FB Mocnik: [**An Empirically Derived Structure Theorem for the Relative Distortion of Cartographic Projections, and a Visual Method for Comparing Them**](http://doi.org/10.1080/00087041.2026.2726602) The Cartographic Journal, 2026

## Installation

To install `MapProjectionAnimator`, you will need `python3` and `pip` ([How to install pip](https://pip.pypa.io/en/stable/installing/)). Then execute:
```bash
pip install MapProjectionAnimator
```
On some operating systems, `pip` for `python3` is named `pip3`:
```bash
pip3 install MapProjectionAnimator
```

Optionally, the font Helvetica can be added to the root directory in case the operating system does not offer this font.  The file must be named `Helvetica.ttc`.

## Usage

```bash
mpa clean
mpa --verbose codomain # 20s # 1m 8s
mpa projection # 13m 38s # 132m 31s
mpa video --high-quality # 6m 27s # 294m 50s

mpa clean
mkdir _output-logs
{ time mpa --verbose codomain > _output-logs/log-codomain.txt 2> _output-logs/log-codomain-error.txt ; } 2> _output-logs/log-codomain-time.txt

mkdir _output
{ time mpa projection > _output/log-projection.txt 2> _output/log-projection-error.txt ; } 2> _output/log-projection-time.txt
{ time mpa video --high-quality > _output/log-video.txt 2> _output/log-video-error.txt ; } 2> _output/log-video-time.txt
mv _output _output-rescale-by-codomains

mkdir _output
{ time mpa projection --no-rescale > _output/log-projection.txt 2> _output/log-projection-error.txt ; } 2> _output/log-projection-time.txt
{ time mpa video --high-quality > _output/log-video.txt 2> _output/log-video-error.txt ; } 2> _output/log-video-time.txt
mv _output _output-no-rescale

mkdir _output
{ time mpa projection --rescale-by-geometries > _output/log-projection.txt 2> _output/log-projection-error.txt ; } 2> _output/log-projection-time.txt
{ time mpa video --high-quality > _output/log-video.txt 2> _output/log-video-error.txt ; } 2> _output/log-video-time.txt
mv _output _output-rescale-by-geometries
```

## Maintanance Notice

This software should not be considered stable.  In particular, the algorithm can result in slightly different results on different platforms due to rounding errors, and adding additional map projections might not work as expected.

## Author

This application is written and maintained by Franz-Benjamin Mocnik, <mail@mocnik-science.net>.

(c) by Franz-Benjamin Mocnik, 2023–2026.

## License

The code is licensed under the [MIT license](https://github.com/mocnik-science/map-projection-animator/blob/master/LICENSE).
