se_is3d.sql 539 B

12345678910111213141516171819
  1. -- This example demonstrates how to use the SE_Is3D function to determine
  2. -- if a geometry has three dimensional coordinates
  3. CREATE TABLE threed_test (gid smallint,
  4. g1 ST_Geometry);
  5. -- Insert a three dim and a two dim coordinates
  6. INSERT INTO threed_test VALUES(
  7. 1, ST_PointFromText('point (10 10)',1000)
  8. );
  9. INSERT INTO threed_test VALUES(
  10. 1, ST_PointFromText('point z(10.92 10.12 5)',1000)
  11. );
  12. -- The query lists all the columns being 3d or not
  13. SELECT gid, SE_Is3D (g1) is_it_3d from threed_test;