Newer
Older
osmCoverage / doc / sql.txt
@yuuhayashi yuuhayashi on 29 Jan 2017 709 bytes first
CREATE TABLE t_busstop (
	gid SERIAL PRIMARY KEY,
	osm_id bigint,
	name text,
	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));