Guest User

Untitled

a guest
Oct 23rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. CREATE TABLE terrain_points (
  2. ogc_fid serial NOT NULL,
  3. elevation double precision,
  4. );
  5.  
  6. SELECT AddGeometryColumn('terrain_points', 'wkb_geometry', 3725, 'POINT', 3 );
  7.  
  8. CREATE TABLE terrain_points
  9. (
  10. ogc_fid serial NOT NULL,
  11. wkb_geometry geometry,
  12. elevation double precision,
  13. CONSTRAINT terrain_points_pk PRIMARY KEY (ogc_fid),
  14. CONSTRAINT enforce_dims_wkb_geometry CHECK (st_ndims(wkb_geometry) = 3),
  15. CONSTRAINT enforce_geotype_wkb_geometry CHECK (geometrytype(wkb_geometry) = 'POINT'::text OR wkb_geometry IS NULL),
  16. CONSTRAINT enforce_srid_wkb_geometry CHECK (st_srid(wkb_geometry) = 3725)
  17. )
  18. WITH (
  19. OIDS=FALSE
  20. );
  21. ALTER TABLE terrain_points OWNER TO postgres;
  22.  
  23. -- Index: terrain_points_geom_idx
  24.  
  25. -- DROP INDEX terrain_points_geom_idx;
  26.  
  27. CREATE INDEX terrain_points_geom_idx
  28. ON terrain_points
  29. USING gist
  30. (wkb_geometry);
  31.  
  32. -- points in geographic wgs84 coordinates (epsg:4326)
  33. create table mypoints (id serial, name varchar, geom geometry(Point, 4326));
  34.  
  35. -- lines in spherical mercator (epsg:3857)
  36. create table mylines (id serial, name varchar, geom geometry(LineString, 3857));
  37.  
  38. -- polygons in Dutch national coordinate system (epsg:28992)
  39. create table mypolygons (id serial, name varchar, geom geometry(Polygon, 28992));
  40.  
  41. -- multipolygons in British National Grid (epsg:27700)
  42. create table
  43. mymultipolygons(id serial, name varchar, geom geometry(Multipolygon, 27700));
Add Comment
Please, Sign In to add comment