stud

study spacejunk
Log | Files | Refs | LICENSE

commit cf726386084b1e97503cfb153ad6987f6f8dedab (tree)
parent 811a714096cf728198b409bea4c401fa7332a967
Author: Motiejus Jakštys <motiejus@uber.com>
Date:   Sun, 18 Apr 2021 23:31:33 +0300

bugfix with scales

Diffstat:
MIV/Makefile | 7++++++-
MIV/layer2img.py | 3+--
MIV/tests-rivers.sql | 2+-
3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/IV/Makefile b/IV/Makefile @@ -24,7 +24,8 @@ FIGURES = \ RIVERS = \ salvis-gdr10 \ - salvis-gdr50 + salvis-gdr50 \ + salvis-gdr250 # paper sizes in mm 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_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 ./db -f $< diff --git a/IV/layer2img.py b/IV/layer2img.py @@ -75,7 +75,6 @@ def read_layer(select, width_in, maybe_wmclip): ) conn = psycopg2.connect(PSQL_CREDS) 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') @@ -103,7 +102,7 @@ def main(): rc('text', usetex=True) fig, ax = plt.subplots() - #fig.set_figwidth(width) + fig.set_figwidth(width) group1 is not None and group1.plot(ax=ax, **c1) group2 is not None and group2.plot(ax=ax, **c2) diff --git a/IV/tests-rivers.sql b/IV/tests-rivers.sql @@ -28,7 +28,7 @@ declare halfX float; halfY float; begin - halfX = projection_scale * projection_width_cm / 2; + halfX = projection_scale * projection_width_cm / 2 / 100; halfY = halfX * sqrt(2); select way from wm_visuals where name=center into gcenter; if gcenter is null then