CartA is a web app and REST API for reprojecting SVG world maps and extracting regional map sections with alternative cartographic projections.
- Reproject SVG maps between Plate Carree, Equal Earth, and Wagner VII
- Extract regions by corner bounds or center/span
- Apply centered regional projections including AEQD, LAEA, Orthographic, Stereographic, LCC, and Transverse Mercator
- Preview inputs and outputs in a React frontend
- Browse downloadable sample files through the API
- Explore the API through Swagger UI
.
├── backend/ Flask API and projection logic
├── frontend/ React + TypeScript UI
├── examples/ API usage examples
├── docker-compose.dev.yml Local development stack
├── docker-compose.prod.yml Production-style stack
├── docker-compose.dokploy.yml
├── requirements.txt Python dependencies
└── Weltkarte.svg Sample input map
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r ../requirements.txt
python api_main.pyBackend URLs:
cd frontend
npm install
npm run devFrontend URL:
The Vite dev server proxies /api requests to http://localhost:5100.
Development stack:
docker compose -f docker-compose.dev.yml up --buildProduction-style stack:
docker compose -f docker-compose.prod.yml up --buildDefault URLs:
- Frontend: http://localhost
- Backend docs: http://localhost:5100/docs
Backend environment variables:
CORS_ORIGINS: Comma-separated allowlist for browser origins. Defaults to*.LOG_LEVEL: Python log level. Defaults toINFO.FLASK_DEBUG: Set to1for local debug mode.
GET /api/health/GET /api/files/GET /api/files/<filename>POST /api/reproject/POST /api/extract/cornersPOST /api/extract/center
Example reprojection request:
{
"input_svg": "Weltkarte.svg",
"direction": "plate-to-equal",
"output_width": 1800,
"padding": 0.0,
"orientation": "normal"
}Example extraction request:
{
"input_svg": "Weltkarte.svg",
"top_left": [-10, 70],
"bottom_right": [40, 35],
"output_width": 800,
"reproject": true,
"projection": "aeqd"
}- Generated files, caches, and local runtime artifacts are ignored.
- The frontend no longer points at a private external download host.
- Only the documented app and API assets remain in the repository root.
MIT. See LICENSE.