### Makefile N=Chicago IL Address Grid DESC1=Using PLSS data. ## Author: Dan Jacobson https://www.jidanni.org/ ## Copyright: https://www.gnu.org/licenses/gpl.html ## Created: 2024-04-28T05:29:26+0000 ## Last-Updated: 2024-04-28T09:10:10+0000 ## Update #: 108 ## U = ../../../../../utilities include $U/m1.makefile export PERLLIB = $U export PATH := $U:$(PATH) g=gdaltransform -output_xy $$(sed s/\#.*// $<) #wo.vik: n=printf "$$_, i.e., %.0f %s %.0f St.$$/", abs $$F[0], $$F[0]<0?"W":"E", abs $$F[1]/100 wo.talk:gcps.txt @echo Given the coordinates of three addresses in Chicago, find a fourth, and assign a fifth. cat $< echo -1135 -11200 | $g echo -87.624780 41.700052 |\ $g -i | perl -anwle \ '$n' @echo \(We could get even better results if we correct for north sides of streets being even, south odd, and 60 being the highest number in a block.\) OLDenglish.txt:f.0.txt perl -awlne 'next if $$.> 3; push @o, @F[2..5], $$.==2?"and":(); END{print qq($(\ )Given the coordinates of @o in Chicago, Illinois,)}' $<|sed 's/\./.,/g' gcps.txt:Makefile; perl -nwle '$(pp)' $< > $@ pp=next unless s/^\#(41)/$$1/;$$k++; /^\S+\s+\S+\s(.*)/ or die; $$comment=$$1; @F=split; \ $$x=$$F[2]*($$F[3] eq "E" ? 1 : -1); for($$y){$$_=$$F[4]; s/\D+//;$$_ *= -100}; \ printf "%-4s %5d %6d %s %s \# %s$$/", ($$k<4?"-gcp":"\#"), $$x, $$y, @F[1,0], $$comment; #my data: even numbers are on the south side of streets #41.721961 -87.594129 1215 E 95th St. #41.677858 -87.657268 1416 W 119th St. #41.701344 -87.663995 1654 W 106th St. #41.690218 -87.651048 1135 W 112nd St. #41.700052 -87.624780 38 W 107th St.