martin/tests/fixtures/points_source.sql

16 lines
466 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
2018-10-12 18:18:34 +03:00
generate_series(1, 10000) as id,
(
ST_DUMP(
ST_GENERATEPOINTS(
ST_GEOMFROMTEXT('POLYGON ((-180 90, 180 90, 180 -90, -180 -90, -180 90))', 4326),
10000
)
)
).geom;
2018-10-09 15:00:25 +03:00
2018-10-12 18:18:34 +03:00
CREATE INDEX ON points USING GIST(geom);
CLUSTER points_geom_idx ON points;