# Makefile --- N=Deerfield / Bannockburn, Illinois address grid # Author: Dan Jacobson https://www.jidanni.org/ # Copyright: https://www.gnu.org/licenses/gpl.html # Created: 2024-01-27T00:48:24+0000 # Last-Updated: 2024-01-27T02:45:21+0000 # Update #: 19 U = ../../../../utilities G=egrep export PERLLIB = $U export PATH := $U:$(PATH) B=~/Downloads/PLSSFirstDivision.geojsonl T=deerfield $T.vik: $T.csv:$T0.csv pid2addr ./pid2addr $< > $@ #Let's try two runs, on for each axis $T0.csv:$B $U/PLSS_corners_4.pm #Makefile #First a W-E strip along Lake Cook Rd. $G 'IL030430N0120E0SN3[1234]0' $< |\ intervals=8 sides=1 \ perl -MPLSS_corners_4 $F -we 'PLSS_corners_4::parse_seq;' |\ $G 100$$ > $@.t #Then a S-N strip along the west side of the township block. #I would have used the 0EW axis, but that extends too far into the neighboring city { $G 'IL030430N0120E0SN(30|31|18|19)0' $<; \ $G IL030420N0120E0SN060 $<;} |\ intervals=8 sides=2 \ perl -MPLSS_corners_4 $F -we 'PLSS_corners_4::parse_seq;' |\ $G _100 >> $@.t sort -u -o $@ $@.t && rm $@.t D=~/IL_CadNSDI_V2.gdb.zip # Yes, we found a wonderful file full of sections $B:$D #And learned we didn't need their centers... ogr2ogr -f GeoJSONSeq $@ -progress -sql "SELECT FRSTDIVID FROM PLSSFirstDivision" $? KO = -f LIBKML \ -dsco NAME="$N" \ -dsco DESCRIPTION="Using BLM PLSS data. See $(subst $(HOME)/,https://www.,$(PWD))" CO= -oo HEADERS=NO \ -oo KEEP_GEOM_COLUMNS=NO \ -oo X_POSSIBLE_NAMES=field_1 \ -oo Y_POSSIBLE_NAMES=field_2 \ -sql 'SELECT field_3 AS Name FROM "$(basename $<)"' %.kmz %.kml:%.csv; ogr2ogr $@ $? $(KO) $(CO) %.vik:%.kmz killall -w viking||: cd /tmp && nohup viking -e $(PWD)/$? & sleep 11 .PRECIOUS: %.kmz