#!/bin/bash # Evanston, IL, USA House addressing grids. # # Author: Dan Jacobson https://www.jidanni.org/ # Copyright: https://www.gnu.org/licenses/gpl.html # Created: 2023-06-30T18:43:30+0000 # Last-Updated: 2024-02-23T23:51:57+0000 # Update #: 32 # https://library.municode.com/il/evanston/codes/code_of_ordinances?nodeId=TIT7PUWA_CH6NUBU # CHAPTER 6 - NUMBERING BUILDINGS 7-6-1. - PLAN ADOPTED. # 800 per mile N/S, 1200 per mile E/W # https://www.cityofevanston.org/about-evanston/maps highly grid aware maps!! set -ue -x numbers_per_mile=(1200 800) if false #downtown then #Choose a meridian and origin center=($ChicagoAv_DavisSt) pointB=($ChicagoAv_SheridanRd) offset_numbers=(-600 1500) grat_args="-800 -200 1300 2000 100" widen=(1.14 0.94) #widen distance between lines by this factor: tweaking by observation boundary_file=$inner else #Rest of Evanston #Choose a meridian, and origin center=($HowardStAsburyAv) pointB=($CentralStAsburyAv) offset_numbers=(-1300 100) widen=(1 1) #Just make this big enough... no I can't figure out how to #make the box more tidy... grat_args="-4000 0 0 4500 100" boundary_file=$super fi azimuth=$(echo ${center[@]} ${pointB[@]} | gmt mapproject -AF+v -fg -o4) for i in 0 1 do numbers_per_mile[$i]=$(gmt math -Q ${numbers_per_mile[$i]} ${widen[$i]} DIV =) done numbers_per_meter=($(echo ${numbers_per_mile[@]} | gmt math -Ca STDIN 1609.344 DIV =)) for i in 0 1 do set -- +proj=omerc \ +lonc=${center[0]} +lat_0=${center[1]} \ +alpha=$azimuth +gamma=0 \ +x_0=${offset_numbers[0]} +y_0=${offset_numbers[1]} \ +k_0=${numbers_per_meter[$i]} projs[$i]=$@ #proj string done cat < EOF for i in 0 1 do ../grat $grat_args $i | gmt mapproject -J"${projs[$i]}" -I | gmt spatial -T$boundary_file | tee /tmp/gg.gmt | # file:///home/chronos/u-540f3275445bda1a199959404068e9a6be63399b/MyFiles/Downloads/gmt-docs-dev/cookbook/ogrgmt-format.html#polygon-topologies gmt 2kml -Fl -K -O -Wthick,red cat /tmp/gg.gmt done #gmt 2kml -K -O -Fl -W5p,blue $boundary_file cat < EOF # https://github.com/dwtkns/gdal-cheat-sheet