mirror of
https://github.com/maplibre/martin.git
synced 2024-12-25 07:55:12 +03:00
16 lines
463 B
SQL
16 lines
463 B
SQL
CREATE TABLE points(gid SERIAL PRIMARY KEY, geom GEOMETRY(POINT, 4326));
|
|
|
|
INSERT INTO points
|
|
SELECT
|
|
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;
|
|
|
|
CREATE INDEX ON points USING GIST(geom);
|
|
CLUSTER points_geom_idx ON points; |