From 2fbbc78233c4b2787cac838ede2e5cfb199e3dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 21 May 2020 22:19:04 +0300 Subject: [PATCH] wip layer-to-pdf --- II/Referatas/layer2pdf.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 II/Referatas/layer2pdf.py diff --git a/II/Referatas/layer2pdf.py b/II/Referatas/layer2pdf.py new file mode 100755 index 0000000..0fb2626 --- /dev/null +++ b/II/Referatas/layer2pdf.py @@ -0,0 +1,16 @@ +#!/usr/bin/python3 +# https://gis.stackexchange.com/questions/131716/plot-shapefile-with-matplotlib + +import argparse +import fiona +import matplotlib.pyplot as plt + +def main(): + parser = argparse.ArgumentParser(description='Convert layer to a nice PDF') + parser.add_argument('infile', type=argparse.FileType('r')) + parser.add_argument('layer', type=str) + parser.add_argument('-o', metavar='OUTFILE', type=argparse.FileType('w')) + args = parser.parse_args() + +if __name__ == '__main__': + main()