File: regress_lots_of_points.sql

package info (click to toggle)
postgis 3.3.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 87,748 kB
  • sloc: ansic: 158,671; sql: 91,546; xml: 54,004; cpp: 12,339; sh: 5,187; perl: 5,100; makefile: 3,085; python: 1,205; yacc: 447; lex: 151; javascript: 6
file content (13 lines) | stat: -rw-r--r-- 306 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- Generate 50000 deterministic pseudorandom points

CREATE TABLE "test" (
	"num" bigint,
	"the_geom" geometry
);

INSERT INTO "test" ("num", "the_geom")
  SELECT path[1], ST_AsText(geom, 6)
  FROM (
    SELECT (ST_DumpPoints(ST_GeneratePoints(ST_MakeEnvelope(0, 0, 1000, 1000), 50000, 654321))).*
  ) f;