martin/tests/fixtures/points_source.sql

8 lines
319 B
MySQL
Raw Normal View History

2018-10-09 15:00:25 +03:00
CREATE TABLE points(gid SERIAL PRIMARY KEY, geom GEOMETRY(GEOMETRY, 4326));
INSERT INTO points
SELECT
generate_series(1, 1000) as id,
(ST_DUMP(ST_GENERATEPOINTS(ST_GEOMFROMTEXT('POLYGON ((-180 90, 180 90, 180 -90, -180 -90, -180 90))', 4326), 1000))).geom;
CREATE INDEX ON points USING GIST(geom);