summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-12-26 09:33:50 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-12-26 09:33:50 +0100
commit4605867cc5677541b1048b6b53401b28fffa7956 (patch)
tree25aa8327bb2fc45698cf39809b4402d8e7abc226 /share
parent1093071049dbc9d881fe3c60cb67d1ca2fd0c89a (diff)
xml2json: migrate geo coordinates to old_stations
Diffstat (limited to 'share')
-rwxr-xr-xshare/xml2json11
1 files 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} );
}
}