diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-02-08 20:29:01 +0000 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-02-08 20:29:01 +0000 |
commit | 7f385c7c11522208bb55bdc600da8b0a6081226a (patch) | |
tree | 008940c0b1e2fd5db0f8e1af88727628c9dba149 | |
parent | f8c9895e98e00a8272fc9b74537e0449a0af79cb (diff) |
converted update-areas script
-rwxr-xr-x | bin/update-areas | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/update-areas b/bin/update-areas index ed463708a..bbc933faf 100755 --- a/bin/update-areas +++ b/bin/update-areas @@ -33,11 +33,11 @@ BEGIN { } print "Fetching problems...\n"; -my $ids = select_all("select id, easting, northing from problem where areas=''"); +my $ids = select_all("select id, latitude, longitude from problem where areas=''"); print "Updating areas...\n"; my $c = 0; foreach (@$ids) { - my $areas = mySociety::MaPit::get_voting_areas_by_location({easting=>$_->{easting}, northing=>$_->{northing}}, 'polygon'); + my $areas = mySociety::MaPit::get_voting_areas_by_location({latitude=>$_->{latitude}, longitude=>$_->{longitude}}, 'polygon'); $areas = ',' . join(',', sort keys %$areas) . ','; dbh()->do('update problem set areas=? where id=?', {}, $areas, $_->{id}); dbh()->commit(); |