mirror of
https://github.com/maplibre/martin.git
synced 2024-12-19 04:41:46 +03:00
8 lines
319 B
MySQL
8 lines
319 B
MySQL
|
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);
|