#!/usr/bin/perl # PLSS point ids to addresses, for Highland Park, Illinois # Well we only do the non-tilted axis # Author: Dan Jacobson https://www.jidanni.org/ # Copyright: https://www.gnu.org/licenses/gpl.htm # Created: 2024-01-27T20:56:51+0000 # Last-Updated: 2024-01-28T04:47:12+0000 # Update #: 92 use strict; use warnings q(all); use PointId2Address; my %grid = ( origin => { id => "IL030430N0120E0_600100" }, #12E and _600 don't matter num_per_mile => [ (800) x 2 ] ); sub f { return if $_[2] > 3600; return $_[2]; } my @o; while (<>) { chomp; my @F = split /,/; $grid{target} = { id => $F[2] }; #we wipe out any previous {target}{miles} my $p = f( PointId2Address::id2addr( \%grid ) ); if ( defined $p ) { push @o, [ @F[ 0, 1 ], $p ]; } } for (@o) { printf "%s,%s,%s\n", @$_; }