From 4605867cc5677541b1048b6b53401b28fffa7956 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 26 Dec 2022 09:33:50 +0100 Subject: xml2json: migrate geo coordinates to old_stations --- share/xml2json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/share/xml2json b/share/xml2json index 2137d24..84e7684 100755 --- a/share/xml2json +++ b/share/xml2json @@ -73,11 +73,12 @@ sub add_station { } sub add_old_station { - my ( $name, $ds100, $eva ) = @_; + my ( $name, $ds100, $eva, $latlong ) = @_; my $station = { - name => $name, - ds100 => $ds100, - eva => $eva, + name => $name, + ds100 => $ds100, + eva => $eva, + latlong => $latlong }; push( @{$old_stations}, $station ); $old_station_by_eva{$eva} = $station; @@ -230,7 +231,7 @@ for my $i ( 0 .. $#{$stations} ) { if ( not( $xml_by_name{$j_name} or $xml_by_eva{$j_eva} ) ) { say "station no longer exists: $j_eva $j_ds100 \"$j_name\""; unshift( @to_delete, $i ); - add_old_station( $j_name, $j_ds100, $j_eva ); + add_old_station( $j_name, $j_ds100, $j_eva, $j_station->{latlong} ); } } -- cgit v1.2.3