---<< postgis: postgres >>---
db_driver=org.postgresql.Driver
db_url=jdbc:postgresql://surveyor.mydns.jp:5432/gisdb
db_user=gisuser
db_passwd=gisuser
-------------------------
CREATE TABLE t_busstop (
	gid SERIAL PRIMARY KEY,
	name text,
        fixed integer,
        area integer,
	geom GEOMETRY(POINT, 4612)
);
CREATE INDEX ix_busstop_geom ON t_busstop USING GiST (geom);

insert into t_busstop(osm_id,name,geom) select osm_id, st_transform(way,4612) FROM planet_osm_point WHERE (highway='bus_stop');
insert into t_busstop(osm_id,name,geom) VALUES(884, 'なまえ', ST_GeomFromText('POINT(139.4110836 35.4341053)', 4612));

----
CREATE TABLE t_test (
	gid SERIAL PRIMARY KEY,
	osm_id bigint,
	name text,
	geom GEOMETRY(POINT, 4612)
);

CREATE INDEX ix_test_geom ON t_test USING GiST (geom);

insert into t_test(osm_id,name,geom) VALUES(884, 'なまえ', ST_GeomFromText('POINT(139.4110836 35.4341053)', 4612));

----

---<< database: hsqldb >>---
CREATE TABLE bus_stop (
    idref VARCHAR(12) NOT NULL, 
    name VARCHAR(128), 
    kana VARCHAR(128), 
    lat DOUBLE, 
    lon DOUBLE, 
    fixed INT, 
    fixed1 INT, 
    area INT, 
    ifile VARCHAR(128), 
    up INT, 
    CONSTRAINT bus_stop_pk PRIMARY KEY(idref));

CREATE TABLE existing_data (
    idref VARCHAR(12) NOT NULL, 
    name VARCHAR(128), 
    lat DOUBLE, 
    lon DOUBLE, 
    score INT, 
    CONSTRAINT existing_pk PRIMARY KEY(idref, lat, lon));

CREATE TABLE coverage (
    area INT, 
    name VARCHAR(128), 
    denominator BIGINT, 
    lv1 BIGINT, 
    lv2 BIGINT, 
    lv3 BIGINT);

-------------------------