se_createsrid.sql 687 B

1234567891011121314151617
  1. -- This example demonstrates how to use the SE_CreateSrid function
  2. -- to create a new entry in the spatial_references table, given
  3. -- the XY extent of a spatial data set.
  4. EXECUTE FUNCTION SE_CreateSrid (166, -48, 180, -34,
  5. "New Zealand: lat/lon coords");
  6. -- SE_CreateSrid will return the srid of the newly created
  7. -- spatial_references table entry. It uses the formula:
  8. -- new_srid = MAX(srid) + 1
  9. -- to choose a new srid. Depending on what other srids are already
  10. -- present in the spatial_references table, you may need to adjust
  11. -- the following query slightly to inspect the new entry:
  12. SELECT * FROM spatial_references WHERE srid = 1001;