aboutsummaryrefslogtreecommitdiffstats
path: root/bin/update-areas
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@fury.ukcod.org.uk>2011-02-10 19:52:24 +0000
committerMatthew Somerville <matthew@fury.ukcod.org.uk>2011-02-10 19:52:24 +0000
commit73c9ca597e083354d0ea9843ebea319096ce5111 (patch)
tree4fa5864b35365e3a8dd5df7cc438b9530827abd5 /bin/update-areas
parent4ebfa74ad83b23c253090f682d9bbfa36e2c63f6 (diff)
parentcf347f8fbce0fefa4f8da01a867bfe523bbe5dc0 (diff)
Merge commit 'remotes/origin/migrate_from_osgb36_to_wgs84'
Diffstat (limited to 'bin/update-areas')
-rwxr-xr-xbin/update-areas4
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();