st_srid.sql 532 B

123456789101112131415161718
  1. -- The following table is created:
  2. CREATE TABLE srid_test(g1 ST_Geometry);
  3. -- In the next statement a ST_Point geometry located at
  4. -- coordinate (10.01,50.76) is inserted into the geometry column g1.
  5. -- When the ST_Point geometry was created by the ST_PointFromText
  6. -- function it was assigned the SRID value of 1000.
  7. INSERT INTO srid_test VALUES(
  8. ST_PointFromText('point(10.01 50.76)',1000)
  9. );
  10. -- The ST_SRID function returns the spatial reference ID of the geometry
  11. -- just entered.
  12. SELECT ST_SRID(g1)
  13. FROM srid_test;