- my ($onex, $oney);
- my @geomarr1 = ();
- while (($onex, $oney) = $sth2->fetchrow_array()) {
- my @onecoord = ( sprintf("%.5f", $onex), sprintf("%.5f", $oney));
- push (@geomarr1, \@onecoord);
+ my @geomarr2 = ();
+ foreach my $nxtway (@waystodecode) {
+ unless ($sth2->execute($nxtway)) {
+ print(STDERR "Sorry, decoding the way data exploded.\n");
+ exit(1);
+ }
+ my ($onex, $oney);
+ my @geomarr1 = ();
+ while (($onex, $oney) = $sth2->fetchrow_array()) {
+ my @onecoord = ( sprintf("%.5f", $onex), sprintf("%.5f", $oney));
+ push (@geomarr1, \@onecoord);
+ }
+ push(@geomarr2, \@geomarr1);
+ $sth2->finish();