Git Product home page Git Product logo

mappostercreator's Introduction

Map Poster Creator

Map Poster Creator - script for creating beautiful road maps of any cities, zones, sections according to OSM data. You can add green areas, roads, rivers, ponds, lakes to the map. There are several ready-made color schemes, but you can easily add your own colors.

The project is provided as-is.

main window

Valriable Colors

white

white

black

black

coral

coral

Install:

pip install map-poster-creator

Deps

Linux

  • apt-get install libgeos-dev

Windows

thanks Lamroy95 for Windows instruction

  • Manually download and install two python packages (GDAL and Fiona):
    • Download GDAL .whl file for your version of python (Python 3.8 - ...cp38....whl)
    • Download Fiona .whl file
    • Install GDAL: pip install path\to\gdal.whl
    • Install Fiona: pip install path\to\fiona.whl
    • Finally, install map-poster-creator: pip install map-poster-creator
  • Or just use Docker =)

MacOS

  • brew install geos

Usage:

  1. Create geojson file with one poly. https://geojson.io/
  2. Download shp archive for region https://download.geofabrik.de/ eq: central-fed-district-latest-free.shp.zip
  3. Unpack *.free.shp.zip archive to some folder PATH_TO_SHP_DIR
$ mapoc poster create --shp_path PATH_TO_SHP_DIR --geojson PATH_TO_GEOJSON --colors white black coral
$ mapoc poster create -h 
usage: Map Poster Creator poster create [-h] --shp_path SHP_PATH --geojson GEOJSON [--colors COLORS [COLORS ...]] [--output_prefix OUTPUT_PREFIX]

Make Poster

optional arguments:
  -h, --help            show this help message and exit
  --shp_path SHP_PATH   Path to shp folder.type "mapoc misc shp" to download
  --geojson GEOJSON     Path to geojson file with boundary polygon.type "mapoc misc geojson" to create and download
  --colors COLORS [COLORS ...]
                        Provide colors. eq "--colors white black coral". Default: "white". Available colors: black, white, red, coral
  --output_prefix OUTPUT_PREFIX
                        Output file prefix. eq. "{OUTPUT_PREFIX}_{COLOR}.png". Default: "map"
$ mapoc misc -h          
usage: Map Poster Creator misc [-h] {shp,geojson} ...

Misc services

optional arguments:
  -h, --help     show this help message and exit

misc management commands:
  misc

  {shp,geojson}  Additional help for available commands

Colors

Add new color scheme

Add a new color scheme or rewrite available color scheme.

usage: mapoc color add [-h] --name NAME --facecolor FACECOLOR --water WATER --greens GREENS --roads ROADS

List available colors

optional arguments:
  -h, --help            show this help message and exit
  --name NAME           Name of color scheme. eq. "blue"
  --facecolor FACECOLOR
                        MatPlot face hex color. eq. "#ffffff"
  --water WATER         MatPlot water hex color. eq. "#ffffff"
  --greens GREENS       MatPlot greens hex color. eq. "#ffffff"
  --roads ROADS         MatPlot roads hex color. eq. "#ffffff"

Example:

$ mapoc color add --name "coffee" --facecolor "#433633" --water "#5c5552" --greens "#8f857d" --roads "#decbb7" 

List available color schemes

$ mapoc color list

TODO

  • Add configurable settings for poster size and quality.
  • Add Docker image

mappostercreator's People

Contributors

k4m454k avatar lamroy95 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.