$ccolour = $&;
next;
}
- if (my ($name, $water) = m{^\t(\S.*\w|L\d?)(?: \[(\d+)\])?$}) {
+ if (my ($name, $water) = m{^\t(\S.*\w|L2?)(?: \[(\d+)\])?$}) {
confess unless defined $ccolour;
my $dname = $c{DisplayNames}{$name} // $name;
$name =~ s{/}{}g;
$cregion = $name;
next;
}
- if (my ($aref, $adikes) = m{^\t\t(\S.*[A-Za-z.]|L\d?)(?: (\+\+?))?$}) {
+ if (my ($aref, $adikes) = m{^\t\t(\S.*[A-Za-z.]|L2?)(?: (\+\+?))?$}) {
my $adj = { Dikes => (length $adikes // 0), L => $. };
if ($aref =~ m{\.}) {
$adj->{Pattern} = $aref;
sub region_cmp {
($a eq 'L' ) <=> ($b eq 'L' ) or
($a eq 'L2') <=> ($b eq 'L2') or
- ($a eq 'L3') <=> ($b eq 'L3') or
($a eq 'NZ') <=> ($b eq 'NZ') or
$a cmp $b
}
sub prs2r ($) {
# bodgery for the sea and land
- return 'NZ' if m/ \| / && !grep { !m{^(?:NZ|L\d?)$} } split / \| /, $_[0];
+ return 'NZ' if m/ \| / && !grep { !m{^(?:NZ|L2?)$} } split / \| /, $_[0];
$prs2region{$_[0]} // confess "@_ ?"
}
sub prs2rr ($) { $region{prs2r($_[0])} }
my $last_ai;
if ($rr->{Name} eq 'NZ') {
# We combined L and NZ; now we must split them again
- # in fact, we just throw away L* entirely.
+ # in fact, we just throw away L and L2 entirely.
# Here, when processing NZ, we keep only vertices that
# are part of NZ.
@edges = grep {
}
$process_rr->();
- $region{$_}{Special} = 1 foreach qw(NZ L L2 L3);
+ $region{$_}{Special} = 1 foreach qw(NZ L L2);
}
#----- geometry mangling -----
sub fill_faces() {
o("clippath ", facepscolour('land'), " fill\n");
foreach my $rr (values %region) {
- next if $rr->{Name} =~ m/^L\d?$/;
+ next if $rr->{Name} =~ m/^L2?$/;
face_path($rr);
o(" ", facepscolour($rr->{Colour}), " eofill\n");
}
sub some_edge_faces (@) {
o("5 setlinewidth 1 setlinejoin 0 setgray\n");
foreach my $rr (@_) {
- next if $rr->{Name} =~ m/^L\d?$/;
+ next if $rr->{Name} =~ m/^L2?$/;
face_path($rr);
o(" stroke\n");
}
some_edge_faces($region{'NZ'});
afsluitdijk();
some_edge_faces(grep {
- $_->{Name} !~ m{^(?:L\d?|NZ|ZZ)$}
+ $_->{Name} !~ m{^(?:L2?|NZ|ZZ)$}
} values %region);
}