## Makefile --- Highland Park Ill address grid, using contour method ## Author: Dan Jacobson https://www.jidanni.org/ ## Copyright: https://www.gnu.org/licenses/gpl.html ## Created: 2024-06-09T04:03:59+0000 ## Last-Updated: 2024-07-19T02:27:31+0000 ## Update #: 158 ## ## See also ../../../../../poster.html tiny.V.vik: hp.V.vik: tiny.%.xyz:Makefile; W=-500 E=0 N=500 S=-20; $(Wedge) > $@ tiny.%.optfile.txt:; echo -clipsrc -500 0 0 500 > $@ #sloppy hp.%.optfile.txt:; touch $@ #sloppy hp.%.xyz:; W=-900 E=-200 N=1200 S=300; $(Wedge) > $@ %.kml: %.csv gcps.txt %.optfile.txt ogr2ogr $@ $< -sql 'SELECT Name FROM "$(basename $<)"' --optfile gcps.txt \ -f LIBKML -simplify 999999 -a_srs 'EPSG:4326' -order 1 --optfile $*.optfile.txt numbers_per_grid=100 remote=n3 v=viking %.V.kmz: %.0.lines.kml %.1.lines.kml; ogrmerge -f LIBKML -overwrite_ds -o $@ $^ %.vik:%.kmz cd /tmp && nohup ssh $(remote) \ 'if pidof -q $v; then killall --wait --signal SIGHUP $v; fi; \ $v -e $(PWD)/$< & sleep 11' %.lines.A.csv:%.xyz # Drape contours over the wedge. Our own version of "gdal_create -outsize 2 2": gdal_contour -i $(numbers_per_grid) -q -a Name $< $@ -lco GEOMETRY=AS_WKT %.lines.csv:%.lines.A.csv # make all addresses positive: perl -pwle 's/,-(\d+)$$/,$$1/ unless $$ENV{science};' $< > $@ Wedge = perl -wle "for([$$W,$$N],[$$E,$$N],[$$W,$$S],[$$E,$$S]){print qq(@\$$_ @\$$_[$*])}" gcps.txt: @echo \ -1165 15 -87.791278 42.152759 \ -885 15 -87.783741 42.152643 \ -707 15 -87.778851 42.152692 \ -537 15 -87.774174 42.152714 \ -335 15 -87.768689 42.152658 \ -559 730 -87.784428 42.165601 \ -643 730 -87.786863 42.165647 \ -710 500 -87.785613 42.161583 \ -400 645 -87.779076 42.164165 \ -400 984 -87.783561 42.170129 \ -700 957 -87.791713 42.170122 \ -559 730 -87.784428 42.165601 \ |xargs -n 4|sed s/^/-gcp\ / > $@ A0-poster_scale:; perl -wle "print $${pic?} * 841 / 1189;" #milimeters kclean:; for i in txt xyz csv kml kmz; do find -maxdepth 1 -name \*.$$i -delete; done .SECONDARY: # The following are some half-GCPs, made from # the crosshairs in Viking, # where I only noted the "west" value. # Maybe they will be of use some day. # Central Av. # 500 42.185860 -87.798048 # 800 42.183338 -87.804324 # 999 42.182372 -87.809368 # Half Day # 1000 42.199581 -87.822576 # Hill # 633 42.211529 -87.820908 # Lakeview # 39 42.160580 -87.766214 # Lakewood # 67 42.163664 -87.769365 # Roger Williams # 85 42.165610 -87.771618 # 197 42.165744 -87.774316 # 334 42.165200 -87.778250 # 475 42.165575 -87.782182 # 680 42.165306 -87.787827 # TH # 936 42.169017 -87.797677 # S # 1091 42.172253 -87.799361 # bol # 1131 42.176341 -87.808088 # df # 970 42.181377 -87.807698 # lau # 861 42.182416 -87.804944 # 290 42.186192 -87.792477 # 80 42.187814 -87.787880 # park # 199 42.189703 -87.792642 # 385 42.188343 -87.796582 # elm # 734 42.186681 -87.805086 # 469 42.188750 -87.799129 # 344 42.189177 -87.796189 # lpp # 190 42.191435 -87.793419 # vine # 42 42.193939 -87.792023 # 287 42.192741 -87.796981 # 385 42.192515 -87.799587 # sko # 604 42.194489 -87.807578 # chi # 580 42.195828 -87.807905 # mic # 556 42.196919 -87.808041 # orc # 451 42.197123 -87.804899 # mor # 217 42.198299 -87.799077 # 439 42.198795 -87.805732 # blo # 419 42.200260 -87.806570 # 146 42.201215 -87.799558 # wal # 86 42.203167 -87.799408 # 386 42.203090 -87.807896 # cla # 739 42.160047 -87.785239 # bla # 571 42.159862 -87.780517 # ltr # 459 42.159932 -87.777307 # 327 42.159935 -87.773744 # goo park # 1940 42.18853065875489 -87.84063210364212 # she # 1870 42.19848060639902 -87.84594572249065 # others # 1034 42.2175062260034 -87.83748134384686 # 638 42.21779763458161 -87.82619356808316 # 530 42.217751598452004 -87.82307340560253