- make initial data set
CREATE TABLE tmp_test (
name character varying(255),
lat1 numeric(8,5),
lng1 numeric(8,5),
lat2 numeric(8,5),
lng2 numeric(8,5)
)
INSERT INTO tmp_test VALUES
('tokyo-shinjuku',35.680605, 139.767351,35.689862,139.700253);
select * from tmp_test ;
name | lat1 | lng1 | lat2 | lng2
----------------+----------+-----------+----------+-----------
tokyo-shinjuku | 35 ...