CREATE TABLE points3857 ( gid SERIAL PRIMARY KEY, geom GEOMETRY(POINT, 3857) ); -- INSERT INTO points3857 -- SELECT generate_series(1, 3) as id, -- (ST_DUMP(ST_GENERATEPOINTS(st_tileenvelope(18, 235085, 122323), 3))).geom; -- INSERT INTO points3857 -- SELECT generate_series(4, 30) as id, -- (ST_DUMP(ST_GENERATEPOINTS(st_tileenvelope(0, 0, 0), 27))).geom; INSERT INTO points3857 values (1, '0101000020110F0000208AFF3226546E41C84F65383E683441'), (2, '0101000020110F00002C8A109F1B546E41A2E6C2B64E683441'), (3, '0101000020110F0000EE7AA3D31B546E41B166FE6638683441'), (4, '0101000020110F00009A480E9917B96C41922C7B04914562C1'), (5, '0101000020110F000078FF726538CB5E41152FFC1AF27E57C1'), (6, '0101000020110F0000304C78D340B770C119ADCD8AD6445441'), (7, '0101000020110F00004C86889FCB9B3A41F0AB6D9D635B5FC1'), (8, '0101000020110F0000FE84FE2F1F9F6CC1DC325036FF286BC1'), (9, '0101000020110F0000EC8E35B4ECDC68C11CBB8EC86D923241'), (10, '0101000020110F00009B46FD7EFFD15A411418509C299D4741'), (11, '0101000020110F0000A20E4CBA1469484119086B669D466741'), (12, '0101000020110F00004A55251576586C41AC274E3A89EB5741'), (13, '0101000020110F00008B8B5442A8CC58C1E0100928BF9753C1'), (14, '0101000020110F00007C3FF5E2F6AD65C1C09A48A26FFEE7C0'), (15, '0101000020110F00001E5DCA1281AB674130CB88B4D37C0FC1'), (16, '0101000020110F0000402E3515AC216AC168F17ABCA9286941'), (17, '0101000020110F0000A619450A8F5072414F62F95DB65F7141'), (18, '0101000020110F00006EBF8AE0243B5AC165CFBBF145A26FC1'), (19, '0101000020110F000054D8A8407ECA5DC11470E8DAE9696141'), (20, '0101000020110F0000D367655933744DC1EEFBC3B2B7276BC1'), (21, '0101000020110F0000B65DE9B69E454041ECAC82B2B0AC3441'), (22, '0101000020110F0000046B677462BA714136A3D1753D1667C1'), (23, '0101000020110F0000DE4E3D79E50158C14DC7142F5F307241'), (24, '0101000020110F0000284EAADA8EF03041468A8FB7E7CC6541'), (25, '0101000020110F00008276EA59054F6241727B468F5BE26E41'), (26, '0101000020110F0000A1FF6E77A02271C169E29727FD3351C1'), (27, '0101000020110F00003F5D8F7E2BB05441224CC4A8D1A96541'), (28, '0101000020110F0000E479ACB3ABD05041D886ECFAF5CF6BC1'), (29, '0101000020110F00001386BD74F42E724112A10AF19ADA60C1'), (30, '0101000020110F00009E4B1FD4C345574120DFFEC70B0A51C1'); CREATE INDEX ON points3857 USING GIST (geom); CLUSTER points3857_geom_idx ON points3857;