Sfoglia il codice sorgente

Révision des schémas mn1_rec et mn2_rec

omassot 7 anni fa
parent
commit
9c86caa4c7
2 ha cambiato i file con 94 aggiunte e 91 eliminazioni
  1. 34 33
      schemas/mn1_rec.py
  2. 60 58
      schemas/mn2_rec.py

+ 34 - 33
schemas/mn1_rec.py

@@ -10,7 +10,8 @@ from qgis.core import QgsProject
 
 from core.cerberus_ import is_float, is_multi_int, is_int, \
     is_modern_french_date, CerberusValidator, CerberusErrorHandler, \
-    _translate_messages, is_positive_float
+    _translate_messages, is_positive_float, is_positive_int, \
+    is_strictly_positive_float, is_strictly_positive_int
 from core.checking import BaseChecker
 from core.mncheck import QgsModel
 
@@ -33,20 +34,20 @@ class Artere(QgsModel):
               'AR_LONG': {'empty': False, 'validator': is_positive_float},
               'AR_ETAT': {'type': 'string', 'empty': False, 'allowed': ['0', '1', '2', '3', '4']}, 
               'AR_OCCP': {'type': 'string', 'empty': False, 'allowed': ['0', '1.1', '1.2', '2', '3', '4']}, 
-              'AR_NOEUD_A': {'type': 'string', 'empty': False, 'maxlength': 20}, 
-              'AR_NOEUD_B': {'type': 'string', 'empty': False, 'maxlength': 20}, 
+              'AR_NOEUD_A': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'AR_NOEUD_B': {'type': 'string', 'empty': False, 'maxlength': 30}, 
               'AR_NB_FOUR': {'empty': False, 'validator': is_multi_int}, 
               'AR_FOU_DIS': {'empty': False, 'validator': is_int}, 
               'AR_TYPE_FO': {'type': 'string', 'multiallowed': ['PVC', 'PEHD', 'SOUS-TUBAGE PEHD', 'SOUS-TUBAGE  SOUPLE', 'FACADE', 'AERIEN', 'ENCORBELLEMENT', 'AUTRE']}, 
-              'AR_DIAM_FO': {'type': 'string', 'multiallowed': ['10', '14', '18', '25', '28', '32', '40', '45', '60', '80', '150', 'NUL']}, 
+              'AR_DIAM_FO': {'type': 'string', 'multiallowed': ['10', '14', '18', '25', '28', '32', '40', '45', '60', '80', '150', 'NUL', '']}, 
               'AR_PRO_FOU': {'type': 'string', 'multiallowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'PRIVE', 'ERDF', 'AUTRE (à préciser)']}, 
               'AR_PRO_CAB': {'type': 'string', 'empty': False, 'allowed': ['MANCHE NUMERIQUE']}, 
               'AR_GEST_FO': {'type': 'string', 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'PRIVE', 'ERDF', 'AUTRE (à préciser)', 'NUL']}, 
-              'AR_UTIL_FO': {'type': 'string', 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'PRIVE', 'AUTRE (à préciser)', 'NUL']}, 
-              'AR_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
-              'AR_DATE_RE': {'empty': False, 'validator': is_modern_french_date}, 
+              'AR_UTIL_FO': {'type': 'string', 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'PRIVE', 'AUTRE (à préciser)', 'NUL', '']}, 
+              'AR_DATE_IN': {'empty': True, 'validator': is_modern_french_date}, 
+              'AR_DATE_RE': {'empty': True, 'validator': is_modern_french_date}, 
               'AR_REF_PLA': {'type': 'string', 'maxlength': 100}, 
-              'AR_SRC_GEO': {'type': 'string', 'maxlength': 50}, 
+              'AR_SRC_GEO': {'type': 'string', 'empty': False, 'maxlength': 50}, 
               'AR_QLT_GEO': {'type': 'string', 'empty': False, 'allowed': ['A', 'B', 'C']}, 
               'AR_PRO_MD': {'type': 'string', 'empty': False, 'default': 'MANCHE NUMERIQUE', 'allowed': ['MANCHE NUMERIQUE']}, 
               'AR_COMMENT': {'type': 'string', 'maxlength': 300, 'empty': True}, 
@@ -67,15 +68,15 @@ class Cable(QgsModel):
     schema = {'CA_NUMERO': {'type': 'string', 'maxlength': 30}, 
               'CA_TYPE': {'type': 'string', 'maxlength': 10, 'empty': False, 'allowed': ['AERIEN', 'IMMEUBLE', 'FACADE', 'MIXTE', 'SOUTERRAIN']}, 
               'CA_ETAT': {'type': 'string', 'maxlength': 1, 'empty': False, 'allowed': ['0', '1', '2', '3', '4']}, 
-              'CA_LONG': {'validator': is_float}, 
-              'CA_EQ_A': {'type': 'string', 'maxlength': 18}, 
-              'CA_EQ_B': {'type': 'string', 'maxlength': 18}, 
-              'CA_DIAMETR': {'empty': False, 'validator': is_float}, 
+              'CA_LONG': {'validator': is_strictly_positive_float}, 
+              'CA_EQ_A': {'type': 'string', 'maxlength': 30}, 
+              'CA_EQ_B': {'type': 'string', 'maxlength': 30}, 
+              'CA_DIAMETR': {'empty': False, 'validator': is_positive_float}, 
               'CA_COULEUR': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['NOIR', 'BLEU', 'BLANC']}, 
               'CA_TECHNOL': {'type': 'string', 'maxlength': 17, 'empty': False, 'allowed': ['G657A2_M6', 'G657A2_M12']}, 
-              'CA_NB_FO': {'validator': is_int}, 
-              'CA_NB_FO_U': {'empty': False, 'validator': is_int}, 
-              'CA_NB_FO_D': {'empty': False, 'validator': is_int}, 
+              'CA_NB_FO': {'empty': False, 'validator': is_strictly_positive_int}, 
+              'CA_NB_FO_U': {'empty': False, 'validator': is_positive_int}, 
+              'CA_NB_FO_D': {'empty': False, 'validator': is_positive_int}, 
               'CA_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE']}, 
               'CA_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE FIBRE']}, 
               'CA_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
@@ -103,7 +104,7 @@ class Equipement(QgsModel):
               'EQ_TYPE_PH': {'type': 'string', 'maxlength': 24, 'empty': False, 'allowed': ['PBO 6', 'PBO 12', 'BPE 12EP', 'BPE 24EP', 'BPE 48EP', 'BPE 72EP', 'BPE 96EP', 'BPE 144EP', 'BPE 288EP', 'BPE 576EP', 'BPE 720EP', 'BAI']}, 
               'EQ_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'PRIVE', 'AUTRE (à préciser)', 'NUL']}, 
               'EQ_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'PRIVE', 'AUTRE (à préciser)', 'NUL']}, 
-              'EQ_HAUT': {'empty': False, 'validator': is_float}, 
+              'EQ_HAUT': {'empty': True, 'validator': is_positive_float}, 
               'EQ_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
               'EQ_COMMENT': {'type': 'string', 'maxlength': 300, 'empty': True}, 
               'EQ_STATUT': {'type': 'string', 'maxlength': 14, 'empty': False, 'allowed': ['APS', 'APD', 'EXE', 'REC']}}
@@ -116,7 +117,7 @@ class Noeud(QgsModel):
     pk = "NO_NOM"
     schema = {'NO_NOM': {'type': 'string', 'maxlength': 30}, 
               'NO_ID_INSE': {'type': 'string', 'empty': False, 'regex': r'50\d{3}'}, 
-              'NO_VOIE': {'type': 'string', 'maxlength': 100}, 
+              'NO_VOIE': {'type': 'string', 'empty': False, 'maxlength': 100}, 
               'NO_ETAT': {'type': 'string', 'maxlength': 1, 'empty': False, 'allowed': ['0', '1', '2', '3', '4']}, 
               'NO_OCCP': {'type': 'string', 'maxlength': 3, 'empty': False, 'allowed': ['0', '1.1', '1.2', '2', '3', '4']}, 
               'NO_TYPE': {'type': 'string', 'maxlength': 3, 'empty': False, 'allowed': ['CHA', 'POT', 'LTE', 'SEM', 'FAC', 'OUV', 'IMM']}, 
@@ -124,16 +125,16 @@ class Noeud(QgsModel):
               'NO_TYPE_PH': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['CHAMBRE', 'POTEAU', 'ARMOIRE', 'SHELTER', 'BATIMENT', 'SITE MIMO', 'FACADE', 'OUVRAGE', 'IMMEUBLE']}, 
               'NO_CODE_PH': {'type': 'string', 'maxlength': 20}, 
               'NO_TECH_PS': {'type': 'string', 'maxlength': 20, 'multiallowed': ['COAX', 'CUT', 'ECL', 'ELEC', 'VP', 'OPT', 'NC']}, 
-              'NO_AMO': {'type': 'string', 'maxlength': 20}, 
-              'NO_PLINOX': {'required':False, 'type': 'string', 'maxlength': 3, 'allowed': ['OUI', 'NON']}, 
-              'NO_X': {'empty': False, 'validator': is_float}, 
-              'NO_Y': {'empty': False, 'validator': is_float}, 
+              'NO_AMO': {'type': 'string', 'maxlength': 30}, 
+              'NO_PLINOX': {'required': False, 'type': 'string', 'maxlength': 3, 'allowed': ['OUI', 'NON']}, 
+              'NO_X': {'empty': True, 'validator': is_float}, 
+              'NO_Y': {'empty': True, 'validator': is_float}, 
               'NO_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'ERDF', 'PRIVE', 'ENEDIS', 'AUTRE (à préciser)', 'NUL']}, 
               'NO_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'ERDF', 'ENEDIS', 'MANCHE FIBRE', 'PRIVE', 'AUTRE (à préciser)', 'NUL']}, 
-              'NO_HAUT': {'empty': False, 'validator': is_float}, 
+              'NO_HAUT': {'empty': True, 'validator': is_positive_float}, 
               'NO_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
               'NO_REF_PLA': {'type': 'string', 'maxlength': 100}, 
-              'NO_SRC_GEO': {'type': 'string', 'maxlength': 50}, 
+              'NO_SRC_GEO': {'type': 'string', 'empty': False, 'maxlength': 50}, 
               'NO_QLT_GEO': {'type': 'string', 'maxlength': 1, 'empty': False, 'allowed': ['A', 'B', 'C']}, 
               'NO_PRO_MD': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE']}, 
               'NO_COMMENT': {'type': 'string', 'maxlength': 300, 'empty': True}, 
@@ -145,23 +146,23 @@ class Tranchee(QgsModel):
     crs = CRS
     bounding_box = (XMIN,YMIN,XMAX,YMAX)
     schema = {'TR_ID_INSE': {'type': 'string', 'empty': False, 'regex': r'50\d{3}'}, 
-              'TR_VOIE': {'type': 'string', 'maxlength': 200}, 
+              'TR_VOIE': {'type': 'string', 'empty': False, 'maxlength': 200}, 
               'TR_TYP_IMP': {'type': 'string', 'empty': False, 'allowed': ['ACCOTEMENT STABILISE', 'ACCOTEMENT NON STABILISE', 'CHAUSSEE LOURDE', 'CHAUSSEE LEGERE', 'FOSSE', 'TROTTOIR', 'ESPACE VERT', 'ENCORBELLEMENT']}, 
               'TR_MOD_POS': {'type': 'string', 'empty': False, 'allowed': ['TRADITIONNEL', 'MICRO TRANCHEE', 'FONCAGE 60', 'FONCAGE 90', 'FONCAGE 120', 'TRANCHEUSE', 'FORAGE URBAIN', 'FORAGE RURAL', 'ENCORBELLEMENT']}, 
-              'TR_LONG': {'empty': False, 'validator': is_float}, 
-              'TR_LARG': {'empty': False, 'validator': is_float}, 
+              'TR_LONG': {'empty': False, 'validator': is_strictly_positive_float}, 
+              'TR_LARG': {'empty':True, 'validator': is_strictly_positive_float}, 
               'TR_REVET': {'empty':True, 'type': 'string', 'allowed': ['SABLE', 'BICOUCHE', 'ENROBE', 'BETON', 'PAVE', 'TERRAIN NATUREL']}, 
-              'TR_CHARGE': {'empty': False, 'validator': is_float}, 
-              'TR_GRILLAG': {'empty':True, 'validator': is_float}, 
-              'TR_REMBLAI': {'type': 'string'}, 
+              'TR_CHARGE': {'empty':True, 'validator': is_positive_float}, 
+              'TR_GRILLAG': {'empty':True, 'validator': is_positive_float}, 
+              'TR_REMBLAI': {'type': 'string', 'maxlength': 50}, 
               'TR_PLYNOX': {'type': 'string', 'empty': False, 'allowed': ['OUI', 'NON']}, 
               'TR_PRO_VOI': {'type': 'string', 'empty': False, 'allowed': ['COMMUNE', 'COMMUNAUTE DE COMMUNES', 'DEPARTEMENT', 'ETAT', 'PRIVE']}, 
               'TR_GEST_VO': {'type': 'string', 'empty': False, 'allowed': ['COMMUNE', 'COMMUNAUTE DE COMMUNES', 'DEPARTEMENT', 'ETAT', 'PRIVE']}, 
-              'TR_SCHEMA': {'maxlength': 100, 'type': 'string'}, 
+              'TR_SCHEMA': {'maxlength': 100, 'empty': False, 'type': 'string'}, 
               'TR_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
-              'TR_SRC_GEO': {'type': 'string', 'maxlength': 50}, 
+              'TR_SRC_GEO': {'type': 'string', 'empty': False, 'maxlength': 50}, 
               'TR_QLT_GEO': {'type': 'string', 'empty': False, 'allowed': ['A', 'B', 'C']}, 
-              'TR_PRO_MD': {'type': 'string', 'maxlength': 20}, 
+              'TR_PRO_MD': {'type': 'string', 'empty': False, 'maxlength': 20, 'allowed': ['MANCHE NUMERIQUE']}, 
               'TR_COMMENT': {'type': 'string', 'maxlength': 300, 'empty': True}, 
               'TR_STATUT': {'type': 'string', 'empty': False, 'allowed': ['APS', 'APD', 'EXE', 'REC']}}
 
@@ -177,7 +178,7 @@ class Zapbo(QgsModel):
     crs = CRS
     bounding_box = (XMIN,YMIN,XMAX,YMAX)
     pk = "ID_ZAPBO"
-    schema = {'ID_ZAPBO': {'type': 'string', 'maxlength': 30, 'contains_any_of': ['PBO', 'BPE']}, 
+    schema = {'ID_ZAPBO': {'type': 'string', 'empty': False, 'maxlength': 30, 'contains_any_of': ['PBO', 'BPE', 'PEC']}, 
               'COMMENTAIR': {'type': 'string', 'maxlength': 254, 'empty': True}, 
               'STATUT': {'type': 'string', 'empty': False, 'allowed': ['APS', 'APD', 'EXE', 'REC']}}
     

+ 60 - 58
schemas/mn2_rec.py

@@ -10,7 +10,8 @@ from qgis.core import QgsProject
 
 from core.cerberus_ import is_float, is_multi_int, is_int, \
     is_modern_french_date, CerberusValidator, CerberusErrorHandler, \
-    _translate_messages
+    _translate_messages, is_positive_int, is_strictly_positive_float, \
+    is_positive_float, is_strictly_positive_int
 from core.checking import BaseChecker
 from core.mncheck import QgsModel
 
@@ -19,7 +20,8 @@ logger = logging.getLogger("mncheck")
 
 SCHEMA_NAME = "Schéma MN v2 REC"
 
-STATUTS = ['EN ETUDE', 'EN REALISATION', 'EN SERVICE', 'HORS SERVICE']
+STATUTS = ['EN ETUDE', 'EN REALISATION', 'EN SERVICE', 'HORS SERVICE',
+           'En étude', 'En réalisation', 'En service', 'Hors service']
 
 XMIN, XMAX, YMIN, YMAX = 1341999, 1429750, 8147750, 8294000
 CRS = 'EPSG:3949' # Coordinate Reference System
@@ -35,32 +37,32 @@ class Artere(QgsModel):
     crs = CRS
     bounding_box = (XMIN,YMIN,XMAX,YMAX)
     pk = "AR_CODE"
-    schema = {'AR_CODE': {'type': 'string', 'maxlength': 30},
-              'AR_NOM': {'type': 'string', 'maxlength': 30}, 
+    schema = {'AR_CODE': {'type': 'string', 'empty': False, 'maxlength': 30},
+              'AR_NOM': {'type': 'string', 'empty': False, 'maxlength': 30}, 
               'AR_ID_INSE': {'type': 'string', 'empty': False, 'regex': r'50\d{3}'}, 
               'AR_LONG': {'empty': False, 'validator': is_float},
               'AR_ETAT': {'type': 'string', 'empty': False, 'allowed': ['0', '1', '2', '3', '4']}, 
               'AR_OCCP': {'type': 'string', 'empty': False, 'allowed': ['0', '1.1', '1.2', '2', '3', '4']}, 
-              'AR_NOEUD_A': {'type': 'string', 'empty': False, 'maxlength': 20}, 
-              'AR_NOEUD_B': {'type': 'string', 'empty': False, 'maxlength': 20}, 
+              'AR_NOEUD_A': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'AR_NOEUD_B': {'type': 'string', 'empty': False, 'maxlength':  30}, 
               'AR_NB_FOUR': {'empty': False, 'validator': is_multi_int}, 
               'AR_FOU_DIS': {'empty': False, 'validator': is_int}, 
-              'AR_TYPE_FO': {'type': 'string', 'multiallowed': ['PVC', 'PEHD', 'SOUS-TUBAGE PEHD', 'SOUS-TUBAGE  SOUPLE', 'FACADE', 'AERIEN', 'ENCORBELLEMENT', 'AUTRE']}, 
-              'AR_TYFO_AI': {'type': 'string', 'multiallowed': ['PVC', 'PEH', 'TUB', 'FAC', 'ENC', 'APP']}, 
-              'AR_DIAM_FO': {'type': 'string', 'multiallowed': ['10', '14', '18', '25', '28', '32', '40', '45', '60', '80', '150', 'NUL']}, 
-              'AR_PRO_FOU': {'type': 'string', 'multiallowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'PRIVE', 'ERDF', 'AUTRE (à préciser)']}, 
+              'AR_TYPE_FO': {'type': 'string', 'empty': False, 'multiallowed': ['PVC', 'PEHD', 'SOUS-TUBAGE PEHD', 'SOUS-TUBAGE  SOUPLE', 'FACADE', 'AERIEN', 'ENCORBELLEMENT', 'AUTRE']}, 
+              'AR_TYFO_AI': {'type': 'string', 'empty': False, 'multiallowed': ['PVC', 'PEH', 'TUB', 'FAC', 'ENC', 'APP']}, 
+              'AR_DIAM_FO': {'type': 'string', 'multiallowed': ['10', '14', '18', '25', '28', '32', '40', '45', '60', '80', '150', 'NUL', '']}, 
+              'AR_PRO_FOU': {'type': 'string', 'empty': False, 'multiallowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'PRIVE', 'ERDF', 'AUTRE (à préciser)']}, 
               'AR_FAB': {'type': 'string', 'empty': False, 'maxlength': 100},
               'AR_REFFAB': {'type': 'string', 'empty': False, 'maxlength': 100},
               'AR_COULEUR': {'type': 'string', 'empty': False, 'maxlength': 20},
               'AR_AIGUIL': {'type': 'string', 'empty': False, 'maxlength': 3, 'allowed': ['OUI', 'NON']},
-              'AR_NBCABL': {'empty': False, 'validator': is_int},
+              'AR_NBCABL': {'empty': False, 'validator': is_positive_int},
               'AR_PRO_CAB': {'type': 'string', 'empty': False, 'allowed': ['MANCHE NUMERIQUE']}, 
               'AR_GEST_FO': {'type': 'string', 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'PRIVE', 'ERDF', 'AUTRE (à préciser)', 'NUL']}, 
-              'AR_UTIL_FO': {'type': 'string', 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'PRIVE', 'AUTRE (à préciser)', 'NUL']}, 
-              'AR_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
-              'AR_DATE_RE': {'empty': False, 'validator': is_modern_french_date}, 
+              'AR_UTIL_FO': {'type': 'string', 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'PRIVE', 'AUTRE (à préciser)', 'NUL', '']}, 
+              'AR_DATE_IN': {'empty': True, 'validator': is_modern_french_date}, 
+              'AR_DATE_RE': {'empty': True, 'validator': is_modern_french_date}, 
               'AR_REF_PLA': {'type': 'string', 'maxlength': 100}, 
-              'AR_SRC_GEO': {'type': 'string', 'maxlength': 50}, 
+              'AR_SRC_GEO': {'type': 'string', 'empty': False, 'maxlength': 50}, 
               'AR_QLT_GEO': {'type': 'string', 'empty': False, 'allowed': ['A', 'B', 'C']}, 
               'AR_PRO_MD': {'type': 'string', 'empty': False, 'default': 'MANCHE NUMERIQUE', 'allowed': ['MANCHE NUMERIQUE']}, 
               'AR_COMMENT': {'type': 'string', 'maxlength': 300, 'empty': True}, 
@@ -72,24 +74,24 @@ class Cable(QgsModel):
     crs = CRS
     bounding_box = (XMIN,YMIN,XMAX,YMAX)
     pk = "CA_CODE"
-    schema = {'CA_CODE': {'type': 'string', 'maxlength': 30}, 
-              'CA_NOM': {'type': 'string', 'maxlength': 30}, 
-              'CA_NUMERO': {'type': 'string', 'maxlength': 17},  
-              'CA_EMPRISE': {'type': 'string', 'maxlength': 10}, 
-              'CA_FAB': {'type': 'string', 'maxlength': 100}, 
-              'CA_REFFAB': {'type': 'string', 'maxlength': 100}, 
-              'CA_MODELE': {'type': 'string', 'maxlength': 10}, 
+    schema = {'CA_CODE': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'CA_NOM': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'CA_NUMERO': {'type': 'string', 'empty': False, 'maxlength': 30},  
+              'CA_EMPRISE': {'type': 'string', 'empty': False, 'maxlength': 10}, 
+              'CA_FAB': {'type': 'string', 'empty': False, 'maxlength': 100}, 
+              'CA_REFFAB': {'type': 'string', 'empty': False, 'maxlength': 100}, 
+              'CA_MODELE': {'type': 'string', 'empty': False, 'maxlength': 10}, 
               'CA_TYPE': {'type': 'string', 'maxlength': 10, 'empty': False, 'allowed': ['AERIEN', 'IMMEUBLE', 'FACADE', 'MIXTE', 'SOUTERRAIN']},
               'CA_TYPFCT': {'type': 'string', 'maxlength': 3, 'empty': False, 'allowed': ['CDI', 'CTR', 'CBM', 'RAC', 'CBO']},
               'CA_ETAT': {'type': 'string', 'maxlength': 1, 'empty': False, 'allowed': ['0', '1', '2', '3', '4']}, 
-              'CA_LONG': {'validator': is_float}, 
-              'CA_EQ_A': {'type': 'string', 'maxlength': 18}, 
-              'CA_EQ_B': {'type': 'string', 'maxlength': 18}, 
-              'CA_DIAMETR': {'empty': False, 'validator': is_float}, 
+              'CA_LONG': {'empty': False, 'validator': is_strictly_positive_float}, 
+              'CA_EQ_A': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'CA_EQ_B': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'CA_DIAMETR': {'empty': False, 'validator': is_positive_float}, 
               'CA_COULEUR': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['NOIR', 'BLEU', 'BLANC']}, 
               'CA_TECHNOL': {'type': 'string', 'maxlength': 17, 'empty': False, 'allowed': ['G657A2_M6', 'G657A2_M12']}, 
-              'CA_NB_FO_U': {'empty': False, 'validator': is_int}, 
-              'CA_NB_FO_D': {'empty': False, 'validator': is_int}, 
+              'CA_NB_FO_U': {'empty': False, 'validator': is_positive_int}, 
+              'CA_NB_FO_D': {'empty': False, 'validator': is_positive_int}, 
               'CA_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE']}, 
               'CA_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE FIBRE']}, 
               'CA_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
@@ -102,17 +104,17 @@ class Equipement(QgsModel):
     crs = CRS
     bounding_box = (XMIN,YMIN,XMAX,YMAX)
     pk = "EQ_CODE"
-    schema = {'EQ_CODE': {'type': 'string', 'maxlength': 30}, 
-              'EQ_NOM': {'type': 'string', 'maxlength': 30, 'contains_any_of': ['PBO', 'BPE', 'BAI']}, 
-              'EQ_NOM_NOE': {'type': 'string', 'maxlength': 30}, 
-              'EQ_REF': {'type': 'string', 'maxlength': 100}, 
-              'EQ_EMPRISE': {'type': 'string', 'maxlength': 7}, 
-              'EQ_FABR': {'type': 'string', 'maxlength': 100}, 
-              'EQ_CAPFO': {'empty': False, 'validator': is_int}, 
-              'EQ_NBMXEQ': {'empty': False, 'validator': is_int}, 
-              'EQ_NBCAB': {'empty': False, 'validator': is_int}, 
-              'EQ_DIMENS': {'type': 'string', 'maxlength': 50}, 
-              'EQ_TYPEQ': {'type': 'string', 'maxlength': 100}, 
+    schema = {'EQ_CODE': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'EQ_NOM': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'EQ_NOM_NOE': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'EQ_REF': {'type': 'string', 'empty': False, 'maxlength': 100}, 
+              'EQ_EMPRISE': {'type': 'string', 'empty': False, 'maxlength': 7}, 
+              'EQ_FABR': {'type': 'string', 'empty': False, 'maxlength': 100}, 
+              'EQ_CAPFO': {'empty': False, 'validator': is_strictly_positive_int}, 
+              'EQ_NBMXEQ': {'empty': False, 'validator': is_strictly_positive_int}, 
+              'EQ_NBCAB': {'empty': False, 'validator': is_strictly_positive_int}, 
+              'EQ_DIMENS': {'type': 'string', 'empty': False, 'maxlength': 50}, 
+              'EQ_TYPEQ': {'type': 'string', 'empty': False, 'maxlength': 100}, 
               'EQ_ETAT': {'type': 'string', 'empty': False, 'allowed': ['0', '1', '2', '3', '4']}, 
               'EQ_OCCP': {'type': 'string', 'empty': False, 'allowed': ['0', '1.1', '1.2', '2', '3', '4']}, 
               'EQ_TYPE': {'type': 'string', 'empty': False, 'allowed': ['PBO', 'PBOE', 'BPE', 'BAI']},
@@ -121,7 +123,7 @@ class Equipement(QgsModel):
               'EQ_TYPE_PH': {'type': 'string', 'empty': False, 'allowed': ['PBO 6', 'PBO 12', 'BPE 12EP', 'BPE 24EP', 'BPE 48EP', 'BPE 72EP', 'BPE 96EP', 'BPE 144EP', 'BPE 288EP', 'BPE 576EP', 'BPE 720EP', 'BAI']}, 
               'EQ_PRO': {'type': 'string', 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'PRIVE', 'AUTRE (à préciser)', 'NUL']}, 
               'EQ_GEST': {'type': 'string', 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'PRIVE', 'AUTRE (à préciser)', 'NUL']}, 
-              'EQ_HAUT': {'empty': False, 'validator': is_float}, 
+              'EQ_HAUT': {'empty': True, 'validator': is_positive_float}, 
               'EQ_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
               'EQ_COMMENT': {'type': 'string', 'maxlength': 300, 'empty': True}, 
               'EQ_STATUT': {'type': 'string', 'empty': False, 'allowed': STATUTS}}
@@ -133,11 +135,11 @@ class Noeud(QgsModel):
     crs = CRS
     bounding_box = (XMIN,YMIN,XMAX,YMAX)
     pk = "NO_CODE"
-    schema = {'NO_CODE': {'type': 'string', 'maxlength': 30}, 
-              'NO_NOM': {'type': 'string', 'maxlength': 30}, 
+    schema = {'NO_CODE': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'NO_NOM': {'type': 'string', 'empty': False, 'maxlength': 30}, 
               'NO_ID_INSE': {'type': 'string', 'empty': False, 'regex': r'50\d{3}'}, 
-              'NO_VOIE': {'type': 'string', 'maxlength': 100}, 
-              'NO_EMPRISE': {'type': 'string', 'maxlength': 10}, 
+              'NO_VOIE': {'type': 'string', 'empty': False, 'maxlength': 100}, 
+              'NO_EMPRISE': {'type': 'string', 'empty': False, 'maxlength': 7}, 
               'NO_ETAT': {'type': 'string', 'empty': False, 'allowed': ['0', '1', '2', '3', '4']}, 
               'NO_OCCP': {'type': 'string', 'empty': False, 'allowed': ['0', '1.1', '1.2', '2', '3', '4']}, 
               'NO_TYPE': {'type': 'string', 'empty': False, 'allowed': ['CHA', 'POT', 'LTE', 'SEM', 'FAC', 'OUV', 'IMM']}, 
@@ -146,13 +148,13 @@ class Noeud(QgsModel):
               'NO_TYPE_PH': {'type': 'string', 'empty': False, 'allowed': ['CHAMBRE', 'POTEAU', 'ARMOIRE', 'SHELTER', 'BATIMENT', 'SITE MIMO', 'FACADE', 'OUVRAGE', 'IMMEUBLE']}, 
               'NO_CODE_PH': {'type': 'string', 'maxlength': 20}, 
               'NO_TECH_PS': {'type': 'string', 'maxlength': 20, 'multiallowed': ['COAX', 'CUT', 'ECL', 'ELEC', 'VP', 'OPT', 'NC']}, 
-              'NO_AMO': {'type': 'string', 'maxlength': 20}, 
+              'NO_AMO': {'type': 'string', 'maxlength': 30}, 
               'NO_PLINOX': {'required':False, 'type': 'string', 'maxlength': 3, 'allowed': ['OUI', 'NON']}, 
-              'NO_X': {'empty': False, 'validator': is_float}, 
-              'NO_Y': {'empty': False, 'validator': is_float}, 
+              'NO_X': {'validator': is_float}, 
+              'NO_Y': {'validator': is_float}, 
               'NO_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'ERDF', 'PRIVE', 'ENEDIS', 'AUTRE (à préciser)', 'NUL']}, 
               'NO_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'ERDF', 'ENEDIS', 'MANCHE FIBRE', 'PRIVE', 'AUTRE (à préciser)', 'NUL']}, 
-              'NO_HAUT': {'empty': False, 'validator': is_float}, 
+              'NO_HAUT': {'validator': is_positive_float}, 
               'NO_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
               'NO_REF_PLA': {'type': 'string', 'maxlength': 100}, 
               'NO_SRC_GEO': {'type': 'string', 'maxlength': 50}, 
@@ -168,19 +170,19 @@ class Tranchee(QgsModel):
     crs = CRS
     bounding_box = (XMIN,YMIN,XMAX,YMAX)
     pk = "TR_CODE"
-    schema = {'TR_CODE': {'type': 'string', 'maxlength': 30}, 
-              'TR_NOM': {'type': 'string', 'maxlength': 30}, 
+    schema = {'TR_CODE': {'type': 'string', 'empty': False, 'maxlength': 30}, 
+              'TR_NOM': {'type': 'string', 'empty': False, 'maxlength': 30}, 
               'TR_ID_INSE': {'type': 'string', 'empty': False, 'regex': r'50\d{3}'}, 
-              'TR_VOIE': {'type': 'string', 'maxlength': 200}, 
+              'TR_VOIE': {'type': 'string', 'empty': False, 'maxlength': 200}, 
               'TR_TYP_IMP': {'type': 'string', 'empty': False, 'allowed': ['ACCOTEMENT STABILISE', 'ACCOTEMENT NON STABILISE', 'CHAUSSEE LOURDE', 'CHAUSSEE LEGERE', 'FOSSE', 'TROTTOIR', 'ESPACE VERT', 'ENCORBELLEMENT']}, 
               'TR_MOD_POS': {'type': 'string', 'empty': False, 'allowed': ['TRADITIONNEL', 'MICRO TRANCHEE', 'FONCAGE 60', 'FONCAGE 90', 'FONCAGE 120', 'TRANCHEUSE', 'FORAGE URBAIN', 'FORAGE RURAL', 'ENCORBELLEMENT']}, 
               'TR_MPOS_AI': {'type': 'string', 'empty': False, 'allowed': ['TRA', 'ALL', 'FONCAGE 60', 'FON', 'FOR', 'ENC']}, 
-              'TR_LONG': {'empty': False, 'validator': is_float}, 
-              'TR_LARG': {'empty': False, 'validator': is_float}, 
+              'TR_LONG': {'empty': True, 'validator': is_strictly_positive_float}, 
+              'TR_LARG': {'empty': True, 'validator': is_strictly_positive_float}, 
               'TR_REVET': {'empty':True, 'type': 'string', 'allowed': ['SABLE', 'BICOUCHE', 'ENROBE', 'BETON', 'PAVE', 'TERRAIN NATUREL']}, 
-              'TR_CHARGE': {'empty': False, 'validator': is_float}, 
-              'TR_GRILLAG': {'empty':True, 'validator': is_float}, 
-              'TR_REMBLAI': {'type': 'string'}, 
+              'TR_CHARGE': {'empty': True, 'validator': is_positive_float}, 
+              'TR_GRILLAG': {'empty':True, 'validator': is_positive_float}, 
+              'TR_REMBLAI': {'type': 'string', 'maxlength': 50}, 
               'TR_PLYNOX': {'type': 'string', 'empty': False, 'allowed': ['OUI', 'NON']}, 
               'TR_PRO_VOI': {'type': 'string', 'empty': False, 'allowed': ['COMMUNE', 'COMMUNAUTE DE COMMUNES', 'DEPARTEMENT', 'ETAT', 'PRIVE']}, 
               'TR_GEST_VO': {'type': 'string', 'empty': False, 'allowed': ['COMMUNE', 'COMMUNAUTE DE COMMUNES', 'DEPARTEMENT', 'ETAT', 'PRIVE']}, 
@@ -188,7 +190,7 @@ class Tranchee(QgsModel):
               'TR_DATE_IN': {'empty': False, 'validator': is_modern_french_date}, 
               'TR_SRC_GEO': {'type': 'string', 'maxlength': 50}, 
               'TR_QLT_GEO': {'type': 'string', 'empty': False, 'allowed': ['A', 'B', 'C']}, 
-              'TR_PRO_MD': {'type': 'string', 'maxlength': 20}, 
+              'TR_PRO_MD': {'type': 'string', 'empty': False, 'maxlength': 20, 'allowed': ['MANCHE NUMERIQUE']}, 
               'TR_COMMENT': {'type': 'string', 'maxlength': 300, 'empty': True}, 
               'TR_STATUT': {'type': 'string', 'empty': False, 'allowed': STATUTS}}
 
@@ -198,7 +200,7 @@ class Zapbo(QgsModel):
     crs = CRS
     bounding_box = (XMIN,YMIN,XMAX,YMAX)
     pk = "ID_ZAPBO"
-    schema = {'ID_ZAPBO': {'type': 'string', 'maxlength': 30, 'contains_any_of': ['PBO', 'BPE']}, 
+    schema = {'ID_ZAPBO': {'type': 'string', 'empty': False, 'maxlength': 30, 'contains_any_of': ['PBO', 'BPE', 'PEC']}, 
               'COMMENTAIR': {'type': 'string', 'maxlength': 254, 'empty': True}, 
               'STATUT': {'type': 'string', 'empty': False, 'allowed': STATUTS}}