View gist:41876d95521a784d6af5378c4017291d
gis=# SELECT osm_id, way_area, building FROM planet_osm_polygon WHERE way && st_transform(st_setsrid( st_makebox2d( st_makepoint(11.5842,58.3825), st_makepoint(11.58593,58.38170)), 4326),900913) ORDER BY way_area DESC;
osm_id | way_area | building
----------+-------------+----------
-2978650 | 2.71188e+12 |
-1059668 | 2.71188e+12 |
-52822 | 2.46229e+12 |
-54368 | 4.31129e+11 |
-54367 | 1.2501e+11 |
-935640 | 9.02315e+09 |
-935549 | 2.79446e+09 |
View rebuild-indexes.pl
#!/usr/bin/perl
use strict;
use warnings;
use DBI;
my $table = shift @ARGV;
die "No table specified" unless defined($table);