Skip to content

Instantly share code, notes, and snippets.

@Bhacaz
Bhacaz / shp2png.py
Created June 25, 2017 19:28
Generate image (PNG) preview of a Shapefile
'''
Big thanks and inspiration from : https://github.com/mfurlend/shp2png
Addapted to have:
- random fill color
- shapeType = Points to pentagone
'''
import shapefile, math
import Image, ImageDraw