### Makefile --- Label skew: we compare where ## the TWD value a pole's label tells us, with its ## opendata coordinates. ## Author: Dan Jacobson https://www.jidanni.org/ ## Copyright: https://www.gnu.org/licenses/gpl.html ## Created: 2024-04-19T01:13:53+0000 ## Last-Updated: 2024-04-19T04:36:54+0000 ## Update #: 39 # I could make a 'earthquake displacement' map, # With each point starting at the TWD97xy, and ending up at the normalized twd67 x,y # where by normalized I mean -803m etc. # Or I can take the length of that line, and use it as Z, in a "DTM", where dips and heights will be # be where discrepancies from the norm lay. D=~/Downloads/Taichung_City.csv # https://data.gov.tw/dataset/122738 d=all.db s=sqlite3 tpg=../taipowergrid all.csv:i97.csv 67.csv paste --delimiters=, $^ > $@ clean:; rm *.csv *.db 67.csv:i97.csv $(tpg) { echo x67,y67;\ sed 1d $< | tr -d \" |\ perl -F, -anwle 'print $$F[0];'|$(tpg)|sed '/#/d; s/ /,/;';} > $@ i97.csv:$D #We'll round the TWD97s, as most of the labels are only 10x10 meters anyway sed 1d $< | tr -d \" | perl -F, -awnle \ 'BEGIN{print "id,x97,y97";} printf "%s,%.0f,%.0f$$/", @F[3,-2,-1];' > $@ %.db:%.csv; echo .import --csv $< t1 | $s $@ -bail ii:$d echo "SELECT * FROM t1 LIMIT 3;"|$s $d