requesting huge spatial data

06-13-2022 08:57 AM
Occasional Contributor

dears I want to test the spatial index so I want to get a huge spatial data (millions of records) so can any one guide me where i can download these data!

0 Kudos
1 Reply
Esri Esteemed Contributor

You can simulate large datasets ("millions" might not make the cut for "huge" -- I put it at closer to 50M points for "very large") with ten lines of SQL code.  For example, in PostgreSQL (grabbed from my post in GIS SE ) ...

CREATE TABLE example1 (
    idcol   serial      NOT NULL,
    geomcol geometry        NULL,
    CONSTRAINT  example1_pk PRIMARY KEY (idcol),
    CONSTRAINT  enforce_srid CHECK (st_srid(geomcol) = 4326)

INSERT INTO example1(geomcol)
                (random()*360.0) - 180.0,
                (acos(1.0 - 2.0 * random()) * 2.0 - pi()) * 90.0 / pi()),
            4326) as geomcol
FROM  generate_series(1, 1000000) vtab;

CREATE INDEX example1_spx ON example1 USING GIST (geomcol);

The same is possible with ArcPy of course, as a DA InsertCursor.

Finding data is generally more domain-specific than a generic request on a web forum.

- V

0 Kudos