diff options
author | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-10 19:52:24 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-10 19:52:24 +0000 |
commit | 73c9ca597e083354d0ea9843ebea319096ce5111 (patch) | |
tree | 4fa5864b35365e3a8dd5df7cc438b9530827abd5 /bin/update-areas | |
parent | 4ebfa74ad83b23c253090f682d9bbfa36e2c63f6 (diff) | |
parent | cf347f8fbce0fefa4f8da01a867bfe523bbe5dc0 (diff) |
Merge commit 'remotes/origin/migrate_from_osgb36_to_wgs84'
Diffstat (limited to 'bin/update-areas')
-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(); |