Generate SVG maps with customizable grid overlays for continents, countries, and states using Python.
Quick setup commands below - CHECK GDAL FIRST
Watch the video demonstration here:
- Install GDAL using Homebrew:
brew install gdal
- Verify installation:
gdal-config --version
- Install GDAL:
- Download the OSGeo4W installer from https://trac.osgeo.org/osgeo4w/.
- Select "Advanced Install" and install the latest version of GDAL.
- Add GDAL to PATH:
- Add
C:\OSGeo4W\bin
to your system PATH:- Open System Properties → Advanced → Environment Variables.
- Edit the
Path
variable to includeC:\OSGeo4W\bin
.
- Add
- Verify installation:
gdalinfo --version
- Clone the repository:
git clone https://github.com/colin-lawless/SVGMAP.git cd SVGMAP
- Create and activate a virtual environment:
python -m venv env source env/bin/activate
- Navigate to the
src
folder:cd src
- Install dependencies:
pip install -r requirements.txt
- Run the script:
python svgmap.py
- Clone the repository:
git clone https://github.com/colin-lawless/SVGMAP.git cd SVGMAP
- Create and activate a virtual environment:
python -m venv env env\Scripts\activate
- Navigate to the
src
folder:cd src
- Install dependencies:
pip install -r requirements.txt
- Run the script:
python svgmap.py
-
Enter a Region: Enter the name of a continent, country, or state when prompted (e.g.,
mexico
). -
Choose a Dot Color: Enter a color name (e.g.,
red
) or a hex color code (e.g.,#FF5733
). -
Set Grid Density: Provide a grid density between 1 (sparse) and 100 (dense).
-
Output: The generated SVG file will be saved in the
src
folder with the name{region}-map.svg
.
brew install gdal
git clone https://github.com/colin-lawless/SVGMAP.git
cd SVGMAP
python -m venv env
source env/bin/activate
cd src
pip install -r requirements.txt
python svgmap.py
Download and install GDAL from https://trac.osgeo.org/osgeo4w/.
git clone https://github.com/colin-lawless/SVGMAP.git
cd SVGMAP
python -m venv env
env\Scripts\activate
cd src
pip install -r requirements.txt
python svgmap.py
This project uses Natural Earth's 1:110m Cultural Vectors. You can check it out here.
MIT License