### Makefile N=Highland Park, Illinois address grid ## Author: Dan Jacobson https://www.jidanni.org/ ## Copyright: https://www.gnu.org/licenses/gpl.html ## Created: 2023-09-03T10:52:21+0000 ## Last-Updated: 2024-01-28T05:12:17+0000 ## Update #: 129 # Currently we use PLSS for the straight axis, # and omerc for the tilted one. # We finally got stuff on the map, phew. # For the tilted axis, an affine transformation was a little too complicated for me. # So let's try a good old omerc. AZ=243.7 #Central Av., but not the City Ordinance's definition of the azimuth though. AZ=$$(perl -wle 'print 90 - 243.7') #This gets it right, I find :-) Cx=-87.804546 #Quick reference point, Cy=42.183675 #800 Central Ave. Moraine Township office P=+proj=omerc +lonc=$(Cx) +lat_0=$(Cy) +alpha=$(AZ) +gamma=0 +units=us-mi T=highland_park_il $T.vik: clean:; rm *.csv* #*.kmz $T.csv:cen.csv sn.csv; cat $^ > $@ S=sort -t , -k 3n -o $@ cen.csv:Makefile seq -1.5 .125 1|proj -E -f %.6f -I $P|perl -anwle \ 'print join ",", @F[1,2], ($$F[0] * -800)+800;' | $S U = ../../../../utilities G=egrep export PERLLIB = $U export PATH := $U:$(PATH) sources=Makefile pid2addr B=~/Downloads/PLSSFirstDivision.geojsonl #tu.csv:m.csv t.csv u.csv; cat $^ > $@ control_points.csv:highland_park; grep ^-87 $< | sed 's/,/ /g; s/ /,/;s/ /,/;' > $@ #A S-N strip along the west side of the city: sn.csv:$B $U/PLSS_corners_4.pm $(sources) $G 'IL030430N0120E0SN(09|16|21|28|33)0' $< |\ intervals=8 sides=0 \ perl -MPLSS_corners_4 $F -we 'PLSS_corners_4::parse_seq;' |\ $G _400 > $@.0 ./pid2addr $@.0 | $S 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 ##OLDER: ## Oh, I renamed highland_park.sh to highland_park so need to do something about it city=highland_park state=Illinois id=122066 wik=en:$(city), $(state) ov=http://overpass-api.de/api/interpreter $(city).show: %.show:%.kml; viking --map 13 --zoom 14 --external $? %.kml:%.sh %.bdy.gmt bdyfile=$*.bdy.gmt ./$< > $@ ema:; curl -o .dj.emacs https://www.jidanni.org/comp/configuration/.emacs %.bdy.gmt:%.bdy.kml ogr2ogr $@ $? %.bdy.kml: #%.bdy.osm : curl https://global.mapit.mysociety.org/code/osm_rel/$(id).html curl -o $@ https://global.mapit.mysociety.org/area/999545.kml OLD%.bdy.osm: #need to perfect someday curl -o $@ --get --url $(ov) --data-urlencode \ data='(relation["wikipedia"="$(wik)"];>;);out skel geom;' # Yes, there are plenty of situations that violate the grid, like as # Highland Park, Illinois ordinances says, streets that double back on # themselves, like its Highland Place, continue the numbering # regardless. Yes, smart, as it makes sense to the (post)man in the # street walking down the block. # Then there is even Ridge Road, made with two nearby # overlapping (Y coordinate) pieces with numbers that carefully # don't overlap -- due to plenty of room in the 800 numbers per # mile system.