bugfix with scales

This commit is contained in:
Motiejus Jakštys 2021-04-18 23:31:33 +03:00
parent 811a714096
commit cf72638608
3 changed files with 8 additions and 4 deletions

View File

@ -24,7 +24,8 @@ FIGURES = \
RIVERS = \ RIVERS = \
salvis-gdr10 \ salvis-gdr10 \
salvis-gdr50 salvis-gdr50 \
salvis-gdr250
# paper sizes in mm # paper sizes in mm
A4p = 210x297 A4p = 210x297
@ -141,6 +142,10 @@ salvis-gdr10_WMCLIP = salcia-visincia:GDR10
salvis-gdr50_1SELECT = wm_rivers where name='Šalčia' OR name='Visinčia' salvis-gdr50_1SELECT = wm_rivers where name='Šalčia' OR name='Visinčia'
salvis-gdr50_WMCLIP = salcia-visincia:GDR50 salvis-gdr50_WMCLIP = salcia-visincia:GDR50
salvis-gdr250_1SELECT = wm_rivers where name='Šalčia' OR name='Visinčia'
salvis-gdr250_WMCLIP = salcia-visincia:GDR250
.faux_test-rivers: tests-rivers.sql wm.sql .faux_db .faux_test-rivers: tests-rivers.sql wm.sql .faux_db
./db -f $< ./db -f $<

View File

@ -75,7 +75,6 @@ def read_layer(select, width_in, maybe_wmclip):
) )
conn = psycopg2.connect(PSQL_CREDS) conn = psycopg2.connect(PSQL_CREDS)
sql = "SELECT {way} as way1 FROM {select}".format(way=way, select=select) sql = "SELECT {way} as way1 FROM {select}".format(way=way, select=select)
print("sql: %s" % sql)
return geopandas.read_postgis(sql, con=conn, geom_col='way1') return geopandas.read_postgis(sql, con=conn, geom_col='way1')
@ -103,7 +102,7 @@ def main():
rc('text', usetex=True) rc('text', usetex=True)
fig, ax = plt.subplots() fig, ax = plt.subplots()
#fig.set_figwidth(width) fig.set_figwidth(width)
group1 is not None and group1.plot(ax=ax, **c1) group1 is not None and group1.plot(ax=ax, **c1)
group2 is not None and group2.plot(ax=ax, **c2) group2 is not None and group2.plot(ax=ax, **c2)

View File

@ -28,7 +28,7 @@ declare
halfX float; halfX float;
halfY float; halfY float;
begin begin
halfX = projection_scale * projection_width_cm / 2; halfX = projection_scale * projection_width_cm / 2 / 100;
halfY = halfX * sqrt(2); halfY = halfX * sqrt(2);
select way from wm_visuals where name=center into gcenter; select way from wm_visuals where name=center into gcenter;
if gcenter is null then if gcenter is null then