Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create_QGEP_Drawing_Scheme
CREATE SCHEMA qgep_dr
AUTHORIZATION qgep;
COMMENT ON SCHEMA qgep_dr
IS 'QGEP drawing tools';
/* CREATE TABLE */
CREATE TABLE qgep_dr.constructionpoint (id serial PRIMARY KEY);
COMMENT ON TABLE qgep_dr.constructionpoint IS 'construction points are artificials points to build objects.';
/* columns */
ALTER TABLE qgep_dr.constructionpoint ADD COLUMN altitude decimal(10,3) ;
ALTER TABLE qgep_dr.constructionpoint ADD COLUMN fk_object_reference integer ;
ALTER TABLE qgep_dr.constructionpoint ADD COLUMN code varchar(15) ;
ALTER TABLE qgep_dr.constructionpoint ADD COLUMN measurement_campaign varchar(200) ;
ALTER TABLE qgep_dr.constructionpoint ADD COLUMN remark text ;
/* geometry */
ALTER TABLE qgep_dr.constructionpoint ADD COLUMN geometry geometry('POINTZ',:SRID);
CREATE INDEX constructionpoint_geoidx ON qgep_dr.constructionpoint USING GIST ( geometry );
/* CREATE TABLE */
CREATE TABLE qgep_dr.constructionline (id serial PRIMARY KEY);
COMMENT ON TABLE qgep_dr.constructionline IS 'construction lines are artificials polylines to build objects.';
/* columns */
ALTER TABLE qgep_dr.constructionline ADD COLUMN altitude decimal(10,3) ;
ALTER TABLE qgep_dr.constructionline ADD COLUMN fk_object_reference integer ;
ALTER TABLE qgep_dr.constructionline ADD COLUMN code varchar(15) ;
ALTER TABLE qgep_dr.constructionline ADD COLUMN measurement_campaign varchar(200) ;
ALTER TABLE qgep_dr.constructionline ADD COLUMN remark text ;
/* geometry */
ALTER TABLE qgep_dr.constructionline ADD COLUMN geometry geometry('LINESTRINGZ',:SRID);
CREATE INDEX constructionline_geoidx ON qgep_dr.constructionline USING GIST ( geometry );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment