st_wkttosql.sql 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. -- The following CREATE TABLE statement creates the geometry_test table,
  2. -- which contains two columns: the GID column of type integer, which uniquely
  3. -- identifies each row, and the G1 column, which stores the geometry.
  4. CREATE TABLE geometry_test (gid integer,
  5. g1 ST_Geometry);
  6. -- The following INSERT statements insert the data into the gid
  7. -- and g1 columns of the geometry_test table. The ST_WKTToSQL
  8. -- function converts the text representation of each geometry into
  9. -- its corresponding Informix Spatial DataBlade instantiable subclass.
  10. INSERT INTO geometry_test VALUES(
  11. 1,
  12. ST_WKTToSQL('point (10.02 20.01)')
  13. );
  14. INSERT INTO geometry_test VALUES(
  15. 2,
  16. ST_WKTToSQL('linestring (10.02 20.01,10.01 30.01,10.01 40.01)')
  17. );
  18. INSERT INTO geometry_test VALUES(
  19. 3,
  20. ST_WKTToSQL('polygon ((10.02 20.01,11.92 35.64,25.02 34.15,19.15 33.94,10.02 20.01))')
  21. );
  22. INSERT INTO geometry_test VALUES(
  23. 4,
  24. ST_WKTToSQL('multipoint (10.02 20.01,10.32 23.98,11.92 35.64)')
  25. );
  26. INSERT INTO geometry_test VALUES(
  27. 5,
  28. ST_WKTToSQL('multilinestring ((10.02 20.01,10.32 23.98,11.92 25.64),(9.55 23.75,15.36 30.11))')
  29. );
  30. INSERT INTO geometry_test VALUES(
  31. 6,
  32. ST_WKTToSQL('multipolygon (((10.02 20.01,11.92 35.64,25.02 34.15,19.15 33.94,10.02 20.01)),((51.71 21.73,73.36 27.04,71.52 32.87,52.43 31.90,51.71 21.73)))')
  33. );