Skip to content

colin-lawless/SVGMAP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

SVGMAP

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:

Watch the video

Prerequisites

Ensure GDAL is Installed

macOS

  1. Install GDAL using Homebrew:
    brew install gdal
  2. Verify installation:
    gdal-config --version

Windows

  1. Install GDAL:
  2. Add GDAL to PATH:
    • Add C:\OSGeo4W\bin to your system PATH:
      • Open System PropertiesAdvancedEnvironment Variables.
      • Edit the Path variable to include C:\OSGeo4W\bin.
  3. Verify installation:
    gdalinfo --version

Setup Instructions

macOS

  1. Clone the repository:
    git clone https://github.com/colin-lawless/SVGMAP.git
    cd SVGMAP
  2. Create and activate a virtual environment:
    python -m venv env
    source env/bin/activate
  3. Navigate to the src folder:
    cd src
  4. Install dependencies:
    pip install -r requirements.txt
  5. Run the script:
    python svgmap.py

Windows

  1. Clone the repository:
    git clone https://github.com/colin-lawless/SVGMAP.git
    cd SVGMAP
  2. Create and activate a virtual environment:
    python -m venv env
    env\Scripts\activate
  3. Navigate to the src folder:
    cd src
  4. Install dependencies:
    pip install -r requirements.txt
  5. Run the script:
    python svgmap.py

Usage

  1. Enter a Region: Enter the name of a continent, country, or state when prompted (e.g., mexico).

  2. Choose a Dot Color: Enter a color name (e.g., red) or a hex color code (e.g., #FF5733).

  3. Set Grid Density: Provide a grid density between 1 (sparse) and 100 (dense).

  4. Output: The generated SVG file will be saved in the src folder with the name {region}-map.svg.


COPY AND PASTE THESE COMMANDS - CHECK GDAL FIRST

macOS

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

Windows

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.


License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published