#! /bin/sh

set -v

DB=benelux
GINA=benelux.gia

destroydb $DB

createdb $DB

# Fill the postgres tables

zcat < $GINA.Z | $GEOHOME/conversion/gtopg $DB

$GEOHOME/conversion/make_topo $DB

#monitor -c "define index pol_index on top_polys using rtree (geo_bbox bigbox_ops)" $DB

#monitor -c "define index prop_index on f_prop_bound using rtree (geo_bbox bigbox_ops)" $DB

# Create some GEO sugar tables

$GEOHOME/postgres/makecolors $DB

$GEOHOME/postgres/makepredefs $DB

$GEOHOME/postgres/makeregexp $DB

$GEOHOME/postgres/makemenu $DB

$GEOHOME/postgres/makeicons $DB

$GEOHOME/postgres/makedyninfo $DB

monitor -c "vacuum" $DB
