#!/usr/bin/perl # Ford Co. Illinois addressing / road naming grids # Author: Dan Jacobson https://www.jidanni.org/ # Copyright: https://www.gnu.org/licenses/gpl.html # Created: 2024-05-10T08:21:24+0000 # Last-Updated: 2024-05-11T16:28:53+0000 # Update #: 142 # use warnings q!all!; use strict; use PointId2Address; ## We are dealing with two principal meridians here my %grids = ( 2 => { origin => { id => "IL020230N0140W0_100100", address => [ 2500, 0 ], } }, 3 => { origin => { id => "IL030230N0070E0_100100" } } ); for ( keys %grids ) { $grids{$_}{num_per_mile} = [ (100) x 2 ]; } ## We make an effort to place grid ticks in congruence with the ## County's quite special shape. my %strips = ( 2 => [ [ [ 2550, 50 ], [ 2750, 50 ] ], #S edge (E) [ [ 2750, 150 ], [ 2750, 550 ] ] #E edge (S) ], 3 => [ [ [ 50, 50 ], [ 2350, 50 ] ], #S edge (W) [ [ 50, 50 ], [ 50, 1450 ] ], #W edge (S) [ [ 1250, 1550 ], [ 1250, 3950 ] ], #W edge (N) ] ); my %o; for ( 2, 3 ) { my %h = PointId2Address::sec_center_strips( $grids{$_}, $strips{$_} ); @o{ keys %h } = values %h; } for ( sort keys %o ) { print join ",", $_, $o{$_}{label}; print $/; }