st_astext.sql 472 B

1234567891011121314
  1. -- The ST_AsText function converts the hazardous_sites location point
  2. -- into its text description.
  3. CREATE TABLE hazardous_sites (site_id integer,
  4. name varchar(40),
  5. location ST_Point);
  6. INSERT INTO hazardous_sites VALUES(
  7. 102, 'W. H. Kleenare Chemical Repository',
  8. ST_PointFromText('point (1020.12 324.02)',1000)
  9. );
  10. SELECT site_id, name, ST_AsText(location) Location
  11. FROM hazardous_sites;