generate rectangle

This commit is contained in:
Motiejus Jakštys 2020-05-27 10:26:59 +03:00
parent 97cd7a5807
commit d1555091b4
3 changed files with 8 additions and 1 deletions

View File

@ -37,6 +37,9 @@ $(eval $(call gpkg2pdf,zeimena,crossing,--size=105x74 --clip $(CROSSING)))
sinewave.gpkg: fig2layer.py sinewave.gpkg: fig2layer.py
./fig2layer.py -o $@ sine ./fig2layer.py -o $@ sine
rectangle.gpkg: fig2layer.py
./fig2layer.py -o $@ rectangle --bounds $(CROSSING)
db/.faux_ready: zeimena.gpkg sinewave.gpkg managedb db/.faux_ready: zeimena.gpkg sinewave.gpkg managedb
-./managedb stop; rm -fr db -./managedb stop; rm -fr db
./managedb init ./managedb init

View File

@ -5,7 +5,8 @@ import argparse
import geopandas import geopandas
import psycopg2 import psycopg2
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import matplotlib.patches as patches
from matplotlib import rc, patches
INCH = 25.4 # mm INCH = 25.4 # mm
BOUNDS = ('xmin', 'ymin', 'xmax', 'ymax') BOUNDS = ('xmin', 'ymin', 'xmax', 'ymax')
@ -45,6 +46,8 @@ def main():
f = geopandas.read_postgis(sql, con=conn, geom_col='geom') f = geopandas.read_postgis(sql, con=conn, geom_col='geom')
else: else:
f = geopandas.read_file(args.infile) f = geopandas.read_file(args.infile)
rc('text', usetex=True)
fig, ax = plt.subplots() fig, ax = plt.subplots()
if args.size: if args.size:
fig.set_size_inches(args.size) fig.set_size_inches(args.size)

View File

@ -83,6 +83,7 @@ Zeimena extents: [606922,6097557,627230,6126362]
\vspace{10mm} \vspace{10mm}
Version: \VCDescribe \\ \vspace{4mm} Version: \VCDescribe \\ \vspace{4mm}
Generated At: \GeneratedAt Generated At: \GeneratedAt
} }
\begin{document} \begin{document}