Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gestion des labels dans subdivision fiscale #168

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,44 @@ private List<Map<String, Object>> infoOngletSubdivision(String parcelle, HttpHea
StringBuilder subDivisionqueryBuilder = new StringBuilder();

// Select information from view proprietenonbatie
subDivisionqueryBuilder.append("select pnb.ccosub, pnb.dcntsf, pnb.cgrnum, pnb.drcsuba as drcsub from ");
subDivisionqueryBuilder.append("(");
subDivisionqueryBuilder.append("select pnb.ccosub, pnb.dcntsf, gnc.cgrnum_lib||', '||sga.dsgrpf_lib||', '||cncs.cnatsp_lib as cgrnum, pnb.drcsuba as drcsub from ");
subDivisionqueryBuilder.append(databaseSchema);
subDivisionqueryBuilder.append(".proprietenonbatie pnb ");
subDivisionqueryBuilder.append(" where pnb.parcelle = ? ");
subDivisionqueryBuilder.append(".proprietenonbatie pnb, ");
subDivisionqueryBuilder.append(databaseSchema);
subDivisionqueryBuilder.append(".sf_cgrnum gnc, ");
subDivisionqueryBuilder.append(databaseSchema);
subDivisionqueryBuilder.append(".sf_dsgrpf sga, ");
subDivisionqueryBuilder.append(databaseSchema);
subDivisionqueryBuilder.append(".sf_cnatsp cncs ");
subDivisionqueryBuilder.append(" where pnb.parcelle = ? and gnc.cgrnum = pnb.cgrnum and sga.dsgrpf = pnb.dsgrpf and cncs.cnatsp = pnb.cnatsp");
subDivisionqueryBuilder.append(addAuthorizationFiltering(headers, "pnb."));
subDivisionqueryBuilder.append(") union (");
subDivisionqueryBuilder.append("select pnb.ccosub, pnb.dcntsf, gnc.cgrnum_lib||', '||sga.dsgrpf_lib as cgrnum, pnb.drcsuba as drcsub from ");
subDivisionqueryBuilder.append(databaseSchema);
subDivisionqueryBuilder.append(".proprietenonbatie pnb, ");
subDivisionqueryBuilder.append(databaseSchema);
subDivisionqueryBuilder.append(".sf_cgrnum gnc, ");
subDivisionqueryBuilder.append(databaseSchema);
subDivisionqueryBuilder.append(".sf_dsgrpf sga ");
subDivisionqueryBuilder.append(" where pnb.parcelle = ? and gnc.cgrnum = pnb.cgrnum and sga.dsgrpf = pnb.dsgrpf and pnb.cnatsp IS NULL");
subDivisionqueryBuilder.append(addAuthorizationFiltering(headers, "pnb."));
subDivisionqueryBuilder.append(") union (");
subDivisionqueryBuilder.append("select pnb.ccosub, pnb.dcntsf, gnc.cgrnum_lib as cgrnum, pnb.drcsuba as drcsub from ");
subDivisionqueryBuilder.append(databaseSchema);
subDivisionqueryBuilder.append(".proprietenonbatie pnb, ");
subDivisionqueryBuilder.append(databaseSchema);
subDivisionqueryBuilder.append(".sf_cgrnum gnc ");
subDivisionqueryBuilder.append(" where pnb.parcelle = ? and gnc.cgrnum = pnb.cgrnum and pnb.dsgrpf IS NULL and pnb.cnatsp IS NULL");
subDivisionqueryBuilder.append(addAuthorizationFiltering(headers, "pnb."));
subDivisionqueryBuilder.append(")");


// init jdbc template
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);

// return list to service
return jdbcTemplate.queryForList(subDivisionqueryBuilder.toString(), parcelle);
return jdbcTemplate.queryForList(subDivisionqueryBuilder.toString(), new String[] {parcelle,parcelle,parcelle});
}

/**
Expand Down
4 changes: 4 additions & 0 deletions script/arcopole/createDBUsingArcopoleModel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ replaceAndLaunch ../commun/tables/prop_dnatpr.sql
replaceAndLaunch ../commun/tables/prop_dmatto.sql
replaceAndLaunch ../commun/tables/prop_dmatgm.sql

replaceAndLaunch ../commun/tables/sf_cgrnum.sql
replaceAndLaunch ../commun/tables/sf_cnatsp.sql
replaceAndLaunch ../commun/tables/sf_dsgrpf.sql

# Launch views creation (views will use DBLINK extension, make sure it is enable on your database)
echo "--------------------------------";
echo " Create views ";
Expand Down
23 changes: 23 additions & 0 deletions script/commun/tables/sf_cgrnum.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE TABLE #schema_cadastrapp.sf_cgrnum (
cgrnum character varying(2) NOT NULL,
cgrnum_lib character varying
);

ALTER TABLE #schema_cadastrapp.sf_cgrnum OWNER TO #user_cadastrapp;

ALTER TABLE ONLY #schema_cadastrapp.sf_cgrnum
ADD CONSTRAINT cgrnum_pkey PRIMARY KEY (cgrnum);

INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('01', 'Terres');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('02', 'Prés');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('03', 'Vergers');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('04', 'Vignes');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('05', 'Bois');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('06', 'Landes');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('07', 'Carrières');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('08', 'Eaux');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('09', 'Jardins');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('10', 'Terrains à bâtir');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('11', 'Terrains d''agrément');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('12', 'Chemin de fer');
INSERT INTO #schema_cadastrapp.sf_cgrnum VALUES ('13', 'Sol');
163 changes: 163 additions & 0 deletions script/commun/tables/sf_cnatsp.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
CREATE TABLE #schema_cadastrapp.sf_cnatsp (
cnatsp character varying(5) NOT NULL,
cnatsp_lib character varying
);

ALTER TABLE #schema_cadastrapp.sf_cnatsp OWNER TO #user_cadastrapp;

ALTER TABLE ONLY #schema_cadastrapp.sf_cnatsp
ADD CONSTRAINT cnatsp_pkey PRIMARY KEY (cnatsp);

INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ABREU', 'Abreuvoirs');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ABRIC', 'Abricotiers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ACACI', 'Acacias');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('AEROD', 'Aérodromes');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('AIRE', 'Aire ou Airial');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ALLEE', 'Allée (no groupe)');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ALLUV', 'Alluvions');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('AMAND', 'Amandiers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ARDOI', 'Ardoiseries');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ARGIL', 'Argilière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ASPER', 'Aspergeraie');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('AULNE', 'Aulnaie');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('AVENU', 'Avenue');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('BALLA', 'Ballastière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('BAMBO', 'Bambouseraie');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('BASS', 'Bassins');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('BIEF', 'Bief');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('BOUL', 'Boulaie');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('BROUS', 'Broussailles ou buissons');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('BRUY', 'Bruyères');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('BTIGE', 'Verger exploite en basses tiges');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('BUIS', 'Buissière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CAMP', 'Terrain de camping');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CANAL', 'Canal');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CASS', 'Cassis');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CEDRA', 'Cédratiers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CERCL', 'Cerclières');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CERIS', 'Cerisaie ou cerisiers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CHASS', 'Terrain de chasse');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CHAT', 'Châtaigneraie');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CHEM', 'Chemin de remembrement');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CHENE', 'Chênes');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CHLIE', 'Chênes-lièges');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CHTRU', 'Chênes truffiers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CHVER', 'Chênes verts');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CIDRE', 'Cidre');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CITRO', 'Citronniers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CLAIR', 'Claires');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('COING', 'Cognassiers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('COULE', 'Bois de couleur');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CRAY', 'Crayère');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CRESS', 'Cressonnière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('CRYPT', 'Cryptomeria');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('DIGUE', 'Digues');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('DUNE', 'Dunes');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('EAU', 'Pièce d''eau');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ECOLE', 'Ecole');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('EPICE', 'Epicéas');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ESPAL', 'Verger exploite en espaliers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ETANG', 'Etangs');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('EUCAL', 'Eucalyptus');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FALAI', 'Falaises');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FAMIL', 'Verger familial');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FER', 'Chemin de fer');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FILAO', 'Filao');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FLOR', 'Jardin floral');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FONT', 'Fontaine');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FOSSE', 'Fosse');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FOUG', 'Fougeraie');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FRAMB', 'Framboisiers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('FRICH', 'Friche');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('GAREN', 'Garenne');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('GENET', 'Genets');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('GLAIS', 'Glaisière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('GRAVE', 'Gravière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('HAIES', 'Haies fruitières');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('HERB', 'Herbage');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('HETRE', 'Hêtres');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('HIST', 'Dépendances de monuments historiques');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('HORT', 'Jardins horticoles');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('HOUBL', 'Houblon');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('HTIGE', 'Vergers exploités en hautes tiges');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('HUITR', 'Parc à huîtres');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('IMM', 'Dépendances d''ensemble immobilier');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('IMPRO', 'Lande improductive');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('INTEN', 'Verger industriel');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('JARD', 'Jardin d’agrément');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('JETT', 'Jettins');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('JOUAL', 'Joualle');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('KIWIS', 'Kiwis');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('LAC', 'Lac');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('LAGUN', 'Lagune');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('LAVOI', 'Lavoir');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('LEGUM', 'Légumière de plein champ');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MAQUI', 'Maquis');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MARAI', 'Pré marais');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MARAM', 'Jardin maraîcher aménagé');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MARE', 'Mare');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MAREC', 'Marécage');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MARN', 'Marnière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MARNA', 'Jardin maraîcher non aménagé');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MELEZ', 'Mélèzes');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MOTTE', 'Mottes');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('MUR', 'Mûraies ou mûriers (vergers)');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('NATUR', 'Bois naturel');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('NOISE', 'Noiseraie ou noisetiers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('NOYER', 'Noyeraie ou noyers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('NPECH', 'Etang non potable');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('OLIVE', 'Olivaies ou oliviers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ORANG', 'Orangers (vergers)');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ORME', 'Ormaie ou ormes');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PACAG', 'Pacage');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PAFEU', 'Pare-feux');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PALMI', 'Bois palmiste');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PARC', 'Parc');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PASS', 'Passage (non groupe)');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PATIS', 'Pâtis');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PATUR', 'Pâture plantée');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PECH', 'Etangs pêchables');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PECHE', 'Pêchers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PEPIN', 'Pépinières');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PIEDS', 'Pieds-mères (vignes)');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PIERR', 'Pierraille, pierrier');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PIN', 'Pins');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PLAGE', 'Plage');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PLATR', 'Plâtrière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PLVEN', 'Vergers de plein vent');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('POIRE', 'Poiriers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('POMME', 'Pommiers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('POTAG', 'Potagers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PROTE', 'Bois de protection');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('PRUNE', 'Pruniers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('RAIS', 'Raisins de table');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('RESER', 'Réservoir');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('RESIN', 'Résineux');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('RIVAG', 'Rivage (bois de)');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('RIZ', 'Rizière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ROC', 'Rocs ou rochers');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('ROUI', 'Routoir ou roussoir');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('RUE', 'Rue');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('RUINE', 'Ruines');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('SABLE', 'Sablière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('SALIN', 'Marais salant');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('SAPIN', 'Sapins ou sapinière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('SART', 'Sartières');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('SAULE', 'Saulaie ou saussaie');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('SERRE', 'Serre');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('SOL', 'Sols');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('SOURC', 'Source');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('SPORT', 'Terrain de sport');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('TAMAR', 'Tamarin');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('TAUZ', 'Taillis tauzin');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('TERRI', 'Terrils');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('TOURB', 'Tourbière');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('TOUYA', 'Touyas');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('VADC', 'Vins d''appellation d''origine contrôlée');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('VAGUE', 'Terrain vague');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('VANIL', 'Vanille');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('VAOC', 'Vins d''appellation d''origine contrôlée');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('VCHAS', 'Chasselas');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('VDQS', 'Vins délimités de qualité supérieure');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('VIGNE', 'Vigne');
INSERT INTO #schema_cadastrapp.sf_cnatsp VALUES ('VIVIE', 'Vivier');
37 changes: 37 additions & 0 deletions script/commun/tables/sf_dsgrpf.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
CREATE TABLE #schema_cadastrapp.sf_dsgrpf (
dsgrpf character varying(2) NOT NULL,
dsgrpf_lib character varying
);

ALTER TABLE #schema_cadastrapp.sf_dsgrpf OWNER TO #user_cadastrapp;

ALTER TABLE ONLY #schema_cadastrapp.sf_dsgrpf
ADD CONSTRAINT dsgrpf_pkey PRIMARY KEY (dsgrpf);

INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('AB', 'Terrains à bâtir');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('AG', 'Terrains d’agrément');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('B', 'Bois');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('BF', 'Futaies Feuillues');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('BM', 'Futaies Mixtes');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('BO', 'Oseraies');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('BP', 'Peupleraies');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('BR', 'Futaies résineuses');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('BS', 'Taillis sous Futaies');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('BT', 'Taillis simples');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('CA', 'Carrières');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('CH', 'Chemins de fer, Canaux de Navigation');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('E', 'Eaux');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('J', 'Jardins');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('L', 'Landes');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('LB', 'Landes Boisées');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('P', 'Prés');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('PA', 'Pâtures ou Pâturages');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('PC', 'Pacages ou Pâtis');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('PE', 'Prés d''embouche');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('PH', 'Herbages');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('PP', 'Prés, Pâtures ou Herbages plantes');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('S', 'Sols');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('T', 'Terre');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('TP', 'Terres plantées');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('VE', 'Vergers');
INSERT INTO #schema_cadastrapp.sf_dsgrpf VALUES ('VI', 'Vignes');
4 changes: 4 additions & 0 deletions script/qgis/createDBUsingQgisModel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ replaceAndLaunch ../commun/tables/prop_dnatpr.sql
replaceAndLaunch ../commun/tables/prop_dmatto.sql
replaceAndLaunch ../commun/tables/prop_dmatgm.sql

replaceAndLaunch ../commun/tables/sf_cgrnum.sql
replaceAndLaunch ../commun/tables/sf_cnatsp.sql
replaceAndLaunch ../commun/tables/sf_dsgrpf.sql

# Launch views creation (views will use DBLINK extension, make sure it is enable on your database)
replaceAndLaunch ./views/qgisCommune.sql
replaceAndLaunch ./views/qgisParcelle.sql
Expand Down