A python script to generate country shapes in multiple projections compatible in size with world maps (i.e. meant to be used as layers). Output as png files. Designed to be used as an alternative to server-side JS libraries for world map rendering in some use-cases. Rendered files may be found here.
Put all files into folder, for example at 'countries-shapes-generator'. Since every figure will be shown on the GUI, it's recommended to use an IDE which allows to show plots on its own window, like spyder-ide. Otherwise run on python:
python countriesShapesGenerator.py
As output multiple sub-folders will be created at the root, one per projection (should take +20 min):
Every country will have an associated file by its ISO 3166-1 alfa-3 code (i.e. Canada -> CAN). Also 2 world maps image files will be available: 'worldmap_shapes' and 'worldmap_natural'. They should be size-compatible with all the other files.
Python docstrings are available for all the functions. Output may be configured for any projection when importing the file as module and running the main function manually.
import countriesShapesGenerator as csg
import cartopy.crs as ccrs
csg.main(toPath = 'countries-Mercator\\', proj = ccrs.Mercator())
Selectable country shapes are used as layers over a world map background here:
- World-Map-SMP: displays current artist's country on the world map and lets you generate autoplaylists based on selection.