Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcos Dione StyXman

View GitHub Profile
@StyXman
StyXman / render_svg.py
Created Jun 16, 2019
Render SVG maps with mapnik and Pyhton
View render_svg.py
#! /usr/bin/python2
import mapnik
import cairo
import sys
# a2 = 16.55 x 23.4 inches
# take one inch on each margin
# a2_margin = 14.55 x 21.4
# 300 dpi for printing
View simplify_error.py
#! /usr/bin/python3
import shapely.wkt
import shapely.wkb
import shapely.geometry
import psycopg2
s= open('121897178.wkt').read()
sh= shapely.wkt.loads(s)