github.com/dolthub/go-mysql-server@v0.18.0/enginetest/scriptgen/setup/scripts/spatial (about)

     1  exec
     2  create table stringtogeojson_table (i bigint primary key, s blob)
     3  ----
     4  
     5  exec
     6  insert into stringtogeojson_table values
     7          (0, '{"type": "Point", "coordinates": [1,2]}'),
     8          (1, '{"type": "Point", "coordinates": [123.45,56.789]}'),
     9          (2, '{"type": "LineString", "coordinates": [[1,2],[3,4]]}'),
    10          (3, '{"type": "LineString", "coordinates": [[1.23,2.345],[3.56789,4.56]]}'),
    11          (4, '{"type": "Polygon", "coordinates": [[[1.1,2.2],[3.3,4.4],[5.5,6.6],[1.1,2.2]]]}'),
    12          (5, '{"type": "Polygon", "coordinates": [[[0,0],[1,1],[2,2],[0,0]]]}'),
    13          (6, '{"type": "MultiPoint", "coordinates": [[1,2],[3,4]]}'),
    14          (7, '{"type": "MultiPoint", "coordinates": [[1.23,2.345],[3.56789,4.56]]}'),
    15          (8, '{"type": "MultiLineString", "coordinates": [[[1.1,2.2],[3.3,4.4]],[[5.5,6.6],[7.7,8.8]]]}'),
    16          (9, '{"type": "MultiPolygon", "coordinates": [[[[0.0, 0.0],[1.1,2.2],[3.3,4.4],[0.0,0.0]]],[[[1.1,1.1],[1.1,2.2],[3.3,4.4],[1.1,1.1]]]]}'),
    17          (10, '{"type": "GeometryCollection", "geometries": [{"type": "GeometryCollection", "geometries":[]}]}')
    18  ----
    19  
    20  exec
    21  create table geometry_table (i bigint primary key, g geometry NOT NULL)
    22  ----
    23  
    24  exec
    25  insert into geometry_table values
    26          (1, ST_GeomFromText('Point(1 2)')),
    27          (2, ST_SRID(ST_GeomFromText('Point(1 2)'), 4326)),
    28  		(3, ST_GeomFromText('Linestring(1 2,3 4)')),
    29  		(4, ST_SRID(ST_GeomFromText('Linestring(1 2,3 4)'), 4326)),
    30          (5, ST_GeomFromText('POLYGON((0 0,0 1,1 1,0 0))')),
    31          (6, ST_SRID(ST_GeomFromText('POLYGON((0 0,0 1,1 1,0 0))'), 4326)),
    32          (7, ST_GeomFromText('MultiPoint(1 2,3 4)')),
    33  		(8, ST_SRID(ST_GeomFromText('MultiPoint(1 2,3 4)'), 4326)),
    34  		(9, ST_GeomFromText('MULTILINESTRING((1 2,3 4))')),
    35          (10, ST_SRID(ST_GeomFromText('MULTILINESTRING((1 2,3 4))'), 4326)),
    36          (11, ST_GeomFromText('MultiPolygon(((0 0,1 2,3 4,0 0)))')),
    37          (12, ST_SRID(ST_GeomFromText('MultiPolygon(((0 0,1 2,3 4,0 0)))'), 4326)),
    38          (13, ST_GeomFromText('GeometryCollection(GeometryCollection())')),
    39          (14, ST_SRID(ST_GeomFromText('GeometryCollection(GeometryCollection())'), 4326))
    40  ----
    41  
    42  exec
    43  create table point_table (i bigint primary key, p point NOT NULL);
    44  ----
    45  
    46  exec
    47  insert into point_table values (5, ST_GeomFromText('Point(1 2)'))
    48  ----
    49  
    50  exec
    51  create table line_table (i bigint primary key, l linestring NOT NULL);
    52  ----
    53  
    54  exec
    55  insert into line_table values
    56      (0, ST_GeomFromText('Linestring(1 2,3 4)')),
    57      (1, ST_GeomFromText('Linestring(1 2,3 4,5 6)'))
    58  ----
    59  
    60  exec
    61  create table polygon_table (i bigint primary key, p polygon NOT NULL);
    62  ----
    63  
    64  exec
    65  insert into polygon_table values
    66      (0, ST_GeomFromText('Polygon((0 0,0 1,1 1,0 0))')),
    67      (1, ST_GeomFromText('Polygon((0 0,0 1,1 1,0 0),(0 0,0 1,1 1,0 0))'))
    68  ----
    69  
    70  exec
    71  create table mpoint_table (i bigint primary key, p multipoint NOT NULL);
    72  ----
    73  
    74  exec
    75  insert into mpoint_table values
    76      (0, ST_GeomFromText('MultiPoint(1 2,3 4)')),
    77      (1, ST_GeomFromText('MultiPoint(1 2,3 4,5 6)'))
    78  ----
    79  
    80  exec
    81  create table mline_table (i bigint primary key, l multilinestring NOT NULL);
    82  ----
    83  
    84  exec
    85  insert into mline_table values
    86      (0, ST_GeomFromText('MultiLineString((1 2,3 4))')),
    87      (1, ST_GeomFromText('MultiLineString((1 2,3 4,5 6))'))
    88  ----
    89  
    90  exec
    91  create table mpoly_table (i bigint primary key, p multipolygon NOT NULL);
    92  ----
    93  
    94  exec
    95  insert into mpoly_table values
    96      (0, ST_GeomFromText('MultiPolygon(((0 0,1 2,3 4,0 0)))')),
    97      (1, ST_GeomFromText('MultiPolygon(((0 0,1 2,3 4,0 0)),((1 1,2 3,4 5,1 1)))'))
    98  ----
    99  
   100  exec
   101  create table geom_coll_table (i bigint primary key, g geometrycollection NOT NULL);
   102  ----
   103  
   104  exec
   105  insert into geom_coll_table values
   106      (0, ST_GeomFromText('GeometryCollection(GeometryCollection())'))
   107  ----