martin/tests/fixtures/tables/table_source_multiple_geom.sql
Yuri Astrakhan c1b65796f6
Require PostGIS 3 and use ST_TileEnvelope (#497)
* All tests and internal code now uses ST_TileEnvelope function
* Remove `tile_bbox`
* Rename test function sources for clarity - this will be needed in a
subsequent PR to add other function tests
2022-11-30 18:57:27 +02:00

18 lines
764 B
SQL

CREATE TABLE table_source_multiple_geom (
gid serial PRIMARY KEY,
geom1 GEOMETRY(point, 4326),
geom2 GEOMETRY(point, 4326)
);
INSERT INTO table_source_multiple_geom
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,
(ST_DUMP (ST_GENERATEPOINTS (ST_GEOMFROMTEXT ('POLYGON ((-180 90, 180 90, 180 -90, -180 -90, -180 90))', 4326), 10000))).geom;
CREATE INDEX ON table_source_multiple_geom USING GIST (geom1);
CREATE INDEX ON table_source_multiple_geom USING GIST (geom2);
CLUSTER table_source_multiple_geom_geom1_idx ON table_source_multiple_geom;
CLUSTER table_source_multiple_geom_geom2_idx ON table_source_multiple_geom;