|
@@ -3,25 +3,24 @@
|
|
|
@author: olivier.massot, 2018
|
|
@author: olivier.massot, 2018
|
|
|
'''
|
|
'''
|
|
|
from core import gis
|
|
from core import gis
|
|
|
-from core.cerberus_extend import is_french_date
|
|
|
|
|
|
|
+from core.cerberus_extend import is_french_date, is_float, is_int
|
|
|
from core.validation import BaseGeoModel
|
|
from core.validation import BaseGeoModel
|
|
|
from schemas.common import INSEE_VALIDES, XMIN, YMIN, XMAX, YMAX
|
|
from schemas.common import INSEE_VALIDES, XMIN, YMIN, XMAX, YMAX
|
|
|
|
|
|
|
|
|
|
|
|
|
class Artere(BaseGeoModel):
|
|
class Artere(BaseGeoModel):
|
|
|
filename = "artere_geo.shp"
|
|
filename = "artere_geo.shp"
|
|
|
- pk = "AR_CODE"
|
|
|
|
|
schema = {'geom': {'geometry': (gis.POLYLINE, (XMIN, YMIN, XMAX, YMAX))},
|
|
schema = {'geom': {'geometry': (gis.POLYLINE, (XMIN, YMIN, XMAX, YMAX))},
|
|
|
- 'AR_CODE': {'required': False, 'type': 'string', 'maxlength': 26},
|
|
|
|
|
|
|
+ 'AR_CODE': {'type': 'string', 'maxlength': 26},
|
|
|
'AR_NOM': {'type': 'string', 'maxlength': 26},
|
|
'AR_NOM': {'type': 'string', 'maxlength': 26},
|
|
|
'AR_ID_INSE': {'type': 'string', 'empty': False, 'allowed': INSEE_VALIDES},
|
|
'AR_ID_INSE': {'type': 'string', 'empty': False, 'allowed': INSEE_VALIDES},
|
|
|
- 'AR_LONG': {'type': 'float'},
|
|
|
|
|
|
|
+ 'AR_LONG': {'validator': is_float},
|
|
|
'AR_ETAT': {'type': 'string', 'empty': False, 'allowed': ['0', '1', '2', '3', '4']},
|
|
'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_OCCP': {'type': 'string', 'empty': False, 'allowed': ['0', '1.1', '1.2', '2', '3', '4']},
|
|
|
'AR_NOEUD_A': {'type': 'string', 'maxlength': 20},
|
|
'AR_NOEUD_A': {'type': 'string', 'maxlength': 20},
|
|
|
'AR_NOEUD_B': {'type': 'string', 'maxlength': 20},
|
|
'AR_NOEUD_B': {'type': 'string', 'maxlength': 20},
|
|
|
- 'AR_NB_FOUR': {'type': 'string', 'maxlength': 20},
|
|
|
|
|
- 'AR_FOU_DIS': {'coerce': int, 'type': 'integer'},
|
|
|
|
|
|
|
+ 'AR_NB_FOUR': {'type': 'string', 'maxlength': 10},
|
|
|
|
|
+ 'AR_FOU_DIS': {'validator': is_int},
|
|
|
'AR_TYPE_FO': {'type': 'string', 'empty': False, 'multiallowed': ['PVC', 'PEHD', 'SOUS-TUBAGE PEHD', 'SOUS-TUBAGE SOUPLE', 'FACADE', 'AERIEN', 'ENCORBELLEMENT', 'AUTRE']},
|
|
'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_TYFO_AI': {'type': 'string', 'empty': False, 'multiallowed': ['PVC', 'PEH', 'TUB', 'FAC', 'ENC', 'APP']},
|
|
|
'AR_DIAM_FO': {'type': 'string', 'empty': False, 'multiallowed': ['10', '14', '18', '25', '28', '32', '40', '45', '60', 'NUL']},
|
|
'AR_DIAM_FO': {'type': 'string', 'empty': False, 'multiallowed': ['10', '14', '18', '25', '28', '32', '40', '45', '60', 'NUL']},
|
|
@@ -30,7 +29,7 @@ class Artere(BaseGeoModel):
|
|
|
'AR_REFFAB': {'type': 'string', 'maxlength': 100},
|
|
'AR_REFFAB': {'type': 'string', 'maxlength': 100},
|
|
|
'AR_COULEUR': {'type': 'string', 'maxlength': 20},
|
|
'AR_COULEUR': {'type': 'string', 'maxlength': 20},
|
|
|
'AR_AIGUIL': {'type': 'string', 'empty': False, 'allowed': ['OUI', 'NON']},
|
|
'AR_AIGUIL': {'type': 'string', 'empty': False, 'allowed': ['OUI', 'NON']},
|
|
|
- 'AR_NBCABL': {'type': 'integer'},
|
|
|
|
|
|
|
+ 'AR_NBCABL': {'validator': is_int},
|
|
|
'AR_PRO_CAB': {'type': 'string', 'empty': False, 'allowed': ['MANCHE NUMERIQUE']},
|
|
'AR_PRO_CAB': {'type': 'string', 'empty': False, 'allowed': ['MANCHE NUMERIQUE']},
|
|
|
'AR_GEST_FO': {'type': 'string', 'empty': False, 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'AUTRE (à préciser)', 'NUL']},
|
|
'AR_GEST_FO': {'type': 'string', 'empty': False, 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'AUTRE (à préciser)', 'NUL']},
|
|
|
'AR_UTIL_FO': {'type': 'string', 'empty': False, 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'AUTRE (à préciser)', 'NUL']},
|
|
'AR_UTIL_FO': {'type': 'string', 'empty': False, 'multiallowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'AUTRE (à préciser)', 'NUL']},
|
|
@@ -45,7 +44,6 @@ class Artere(BaseGeoModel):
|
|
|
|
|
|
|
|
class Cable(BaseGeoModel):
|
|
class Cable(BaseGeoModel):
|
|
|
filename = "cable_geo.shp"
|
|
filename = "cable_geo.shp"
|
|
|
- pk = "CA_CODE"
|
|
|
|
|
schema = {'geom': {'geometry': (gis.POLYLINE, (XMIN, YMIN, XMAX, YMAX))},
|
|
schema = {'geom': {'geometry': (gis.POLYLINE, (XMIN, YMIN, XMAX, YMAX))},
|
|
|
'CA_CODE': {'type': 'string', 'maxlength': 18},
|
|
'CA_CODE': {'type': 'string', 'maxlength': 18},
|
|
|
'CA_NOM': {'type': 'string', 'maxlength': 18},
|
|
'CA_NOM': {'type': 'string', 'maxlength': 18},
|
|
@@ -57,13 +55,14 @@ class Cable(BaseGeoModel):
|
|
|
'CA_TYPE': {'type': 'string', 'maxlength': 10, 'empty': False, 'allowed': ['AERIEN', 'IMMEUBLE', 'FACADE', 'MIXTE', 'SOUTERRAIN']},
|
|
'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_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_ETAT': {'type': 'string', 'maxlength': 1, 'empty': False, 'allowed': ['0', '1', '2', '3', '4']},
|
|
|
- 'CA_LONG': {'type': 'float'}, 'CA_EQ_A': {'type': 'string', 'maxlength': 18},
|
|
|
|
|
|
|
+ 'CA_LONG': {'validator': is_float},
|
|
|
|
|
+ 'CA_EQ_A': {'type': 'string', 'maxlength': 18},
|
|
|
'CA_EQ_B': {'type': 'string', 'maxlength': 18},
|
|
'CA_EQ_B': {'type': 'string', 'maxlength': 18},
|
|
|
- 'CA_DIAMETR': {'coerce': int, 'type': 'integer'},
|
|
|
|
|
|
|
+ 'CA_DIAMETR': {'validator': is_int},
|
|
|
'CA_COULEUR': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['NOIR', 'BLEU', 'BLANC']},
|
|
'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_TECHNOL': {'type': 'string', 'maxlength': 17, 'empty': False, 'allowed': ['G657A2_M6', 'G657A2_M12']},
|
|
|
- 'CA_NB_FO_U': {'coerce': int, 'type': 'integer'},
|
|
|
|
|
- 'CA_NB_FO_D': {'coerce': int, 'type': 'integer'},
|
|
|
|
|
|
|
+ 'CA_NB_FO_U': {'validator': is_int},
|
|
|
|
|
+ 'CA_NB_FO_D': {'validator': is_int},
|
|
|
'CA_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE']},
|
|
'CA_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE']},
|
|
|
'CA_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['NUL']},
|
|
'CA_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['NUL']},
|
|
|
'CA_DATE_IN': {'empty': False, 'validator': is_french_date},
|
|
'CA_DATE_IN': {'empty': False, 'validator': is_french_date},
|
|
@@ -72,7 +71,6 @@ class Cable(BaseGeoModel):
|
|
|
|
|
|
|
|
class Equipement(BaseGeoModel):
|
|
class Equipement(BaseGeoModel):
|
|
|
filename = "equipement_passif.shp"
|
|
filename = "equipement_passif.shp"
|
|
|
- pk = "EQ_CODE"
|
|
|
|
|
schema = {'geom': {'geometry': (gis.POINT, (XMIN, YMIN, XMAX, YMAX))},
|
|
schema = {'geom': {'geometry': (gis.POINT, (XMIN, YMIN, XMAX, YMAX))},
|
|
|
'EQ_CODE': {'type': 'string', 'maxlength': 18},
|
|
'EQ_CODE': {'type': 'string', 'maxlength': 18},
|
|
|
'EQ_NOM': {'type': 'string', 'maxlength': 18},
|
|
'EQ_NOM': {'type': 'string', 'maxlength': 18},
|
|
@@ -80,9 +78,9 @@ class Equipement(BaseGeoModel):
|
|
|
'EQ_REF': {'type': 'string', 'maxlength': 100},
|
|
'EQ_REF': {'type': 'string', 'maxlength': 100},
|
|
|
'EQ_EMPRISE': {'type': 'string', 'maxlength': 7},
|
|
'EQ_EMPRISE': {'type': 'string', 'maxlength': 7},
|
|
|
'EQ_FABR': {'type': 'string', 'maxlength': 100},
|
|
'EQ_FABR': {'type': 'string', 'maxlength': 100},
|
|
|
- 'EQ_CAPFO': {'type': 'integer'},
|
|
|
|
|
- 'EQ_NBMXEQ': {'coerce': int, 'type': 'integer'},
|
|
|
|
|
- 'EQ_NBCAB': {'coerce': int, 'type': 'integer'},
|
|
|
|
|
|
|
+ 'EQ_CAPFO': {'validator': is_int},
|
|
|
|
|
+ 'EQ_NBMXEQ': {'validator': is_int},
|
|
|
|
|
+ 'EQ_NBCAB': {'validator': is_int},
|
|
|
'EQ_DIMENS': {'type': 'string', 'maxlength': 50},
|
|
'EQ_DIMENS': {'type': 'string', 'maxlength': 50},
|
|
|
'EQ_TYPEQ': {'type': 'string', 'maxlength': 100},
|
|
'EQ_TYPEQ': {'type': 'string', 'maxlength': 100},
|
|
|
'EQ_ETAT': {'type': 'string', 'maxlength': 1, 'empty': False, 'allowed': ['0', '1', '2', '3', '4']},
|
|
'EQ_ETAT': {'type': 'string', 'maxlength': 1, 'empty': False, 'allowed': ['0', '1', '2', '3', '4']},
|
|
@@ -93,14 +91,13 @@ class Equipement(BaseGeoModel):
|
|
|
'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']},
|
|
'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']},
|
|
|
'EQ_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'AUTRE (à préciser)', 'NUL']},
|
|
'EQ_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'AUTRE (à préciser)', 'NUL']},
|
|
|
'EQ_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'AUTRE (à préciser)', 'NUL']},
|
|
'EQ_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'MANCHE FIBRE', 'AUTRE (à préciser)', 'NUL']},
|
|
|
- 'EQ_HAUT': {'type': 'float'},
|
|
|
|
|
|
|
+ 'EQ_HAUT': {'validator': is_float},
|
|
|
'EQ_DATE_IN': {'empty': False, 'validator': is_french_date},
|
|
'EQ_DATE_IN': {'empty': False, 'validator': is_french_date},
|
|
|
'EQ_COMMENT': {'type': 'string', 'maxlength': 300, 'empty': True},
|
|
'EQ_COMMENT': {'type': 'string', 'maxlength': 300, 'empty': True},
|
|
|
'EQ_STATUT': {'type': 'string', 'maxlength': 14, 'empty': False, 'allowed': ['EN ETUDE', 'EN REALISATION', 'EN SERVICE', 'HORS SERVICE']}}
|
|
'EQ_STATUT': {'type': 'string', 'maxlength': 14, 'empty': False, 'allowed': ['EN ETUDE', 'EN REALISATION', 'EN SERVICE', 'HORS SERVICE']}}
|
|
|
|
|
|
|
|
class Noeud(BaseGeoModel):
|
|
class Noeud(BaseGeoModel):
|
|
|
filename = "noeud_geo.shp"
|
|
filename = "noeud_geo.shp"
|
|
|
- pk = "NO_CODE"
|
|
|
|
|
schema = {'geom': {'geometry': (gis.POINT, (XMIN, YMIN, XMAX, YMAX))},
|
|
schema = {'geom': {'geometry': (gis.POINT, (XMIN, YMIN, XMAX, YMAX))},
|
|
|
'NO_CODE': {'type': 'string', 'maxlength': 18},
|
|
'NO_CODE': {'type': 'string', 'maxlength': 18},
|
|
|
'NO_ID_INSE': {'type': 'string', 'empty': False, 'allowed': INSEE_VALIDES},
|
|
'NO_ID_INSE': {'type': 'string', 'empty': False, 'allowed': INSEE_VALIDES},
|
|
@@ -117,11 +114,11 @@ class Noeud(BaseGeoModel):
|
|
|
'NO_TECH_PS': {'type': 'string', 'maxlength': 4, 'empty': False, 'multiallowed': ['COAX', 'CUT', 'ECL', 'ELEC', 'VP', 'OPT', 'NC']},
|
|
'NO_TECH_PS': {'type': 'string', 'maxlength': 4, 'empty': False, 'multiallowed': ['COAX', 'CUT', 'ECL', 'ELEC', 'VP', 'OPT', 'NC']},
|
|
|
'NO_AMO': {'type': 'string', 'maxlength': 20},
|
|
'NO_AMO': {'type': 'string', 'maxlength': 20},
|
|
|
'NO_PLINOX': {'type': 'string', 'maxlength': 3, 'empty': False, 'allowed': ['OUI', 'NON']},
|
|
'NO_PLINOX': {'type': 'string', 'maxlength': 3, 'empty': False, 'allowed': ['OUI', 'NON']},
|
|
|
- 'NO_X': {'coerce': float, 'type': 'float'},
|
|
|
|
|
- 'NO_Y': {'coerce': float, 'type': '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', 'AUTRE (à préciser)', 'NUL']},
|
|
'NO_PRO': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'COLLECTIVITE', 'ORANGE', 'ERDF', 'AUTRE (à préciser)', 'NUL']},
|
|
|
'NO_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'ERDF', 'MANCHE FIBRE', 'AUTRE (à préciser)', 'NUL']},
|
|
'NO_GEST': {'type': 'string', 'maxlength': 20, 'empty': False, 'allowed': ['MANCHE NUMERIQUE', 'MANCHE TELECOM', 'COLLECTIVITE', 'ORANGE', 'ERDF', 'MANCHE FIBRE', 'AUTRE (à préciser)', 'NUL']},
|
|
|
- 'NO_HAUT': {'type': 'float'},
|
|
|
|
|
|
|
+ 'NO_HAUT': {'validator': is_float},
|
|
|
'NO_DATE_IN': {'empty': False, 'validator': is_french_date},
|
|
'NO_DATE_IN': {'empty': False, 'validator': is_french_date},
|
|
|
'NO_REF_PLA': {'type': 'string', 'maxlength': 100},
|
|
'NO_REF_PLA': {'type': 'string', 'maxlength': 100},
|
|
|
'NO_SRC_GEO': {'type': 'string', 'maxlength': 50},
|
|
'NO_SRC_GEO': {'type': 'string', 'maxlength': 50},
|
|
@@ -132,7 +129,6 @@ class Noeud(BaseGeoModel):
|
|
|
|
|
|
|
|
class Tranchee(BaseGeoModel):
|
|
class Tranchee(BaseGeoModel):
|
|
|
filename = "tranchee_geo.shp"
|
|
filename = "tranchee_geo.shp"
|
|
|
- pk = "TR_CODE"
|
|
|
|
|
schema = {'geom': {'geometry': (gis.POLYLINE, (XMIN, YMIN, XMAX, YMAX))},
|
|
schema = {'geom': {'geometry': (gis.POLYLINE, (XMIN, YMIN, XMAX, YMAX))},
|
|
|
'TR_CODE': {'type': 'string', 'maxlength': 23},
|
|
'TR_CODE': {'type': 'string', 'maxlength': 23},
|
|
|
'TR_NOM': {'type': 'string', 'maxlength': 23},
|
|
'TR_NOM': {'type': 'string', 'maxlength': 23},
|
|
@@ -141,11 +137,11 @@ class Tranchee(BaseGeoModel):
|
|
|
'TR_TYP_IMP': {'type': 'string', 'empty': False, 'allowed': ['ACCOTEMENT STABILISE', 'ACCOTEMENT NON STABILISE', 'CHAUSSEE LOURDE', 'CHAUSSEE LEGERE', 'FOSSE', 'TROTTOIR', 'ESPACE VERT', 'ENCORBELLEMENT']},
|
|
'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_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_MPOS_AI': {'type': 'string', 'empty': False, 'allowed': ['TRA', 'ALL', 'FONCAGE 60', 'FON', 'FOR', 'ENC']},
|
|
|
- 'TR_LONG': {'coerce': float, 'type': 'float'},
|
|
|
|
|
- 'TR_LARG': {'coerce': float, 'type': 'float'},
|
|
|
|
|
|
|
+ 'TR_LONG': {'validator': is_float},
|
|
|
|
|
+ 'TR_LARG': {'validator': is_float},
|
|
|
'TR_REVET': {'type': 'string', 'empty': False, 'allowed': ['SABLE', 'BICOUCHE', 'ENROBE', 'BETON', 'PAVE', 'TERRAIN NATUREL']},
|
|
'TR_REVET': {'type': 'string', 'empty': False, 'allowed': ['SABLE', 'BICOUCHE', 'ENROBE', 'BETON', 'PAVE', 'TERRAIN NATUREL']},
|
|
|
- 'TR_CHARGE': {'coerce': float, 'type': 'float'},
|
|
|
|
|
- 'TR_GRILLAG': {'coerce': float, 'type': 'float'},
|
|
|
|
|
|
|
+ 'TR_CHARGE': {'validator': is_float},
|
|
|
|
|
+ 'TR_GRILLAG': {'validator': is_float},
|
|
|
'TR_REMBLAI': {'type': 'string'},
|
|
'TR_REMBLAI': {'type': 'string'},
|
|
|
'TR_PLYNOX': {'type': 'string', 'empty': False, 'allowed': ['OUI', 'NON']},
|
|
'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_PRO_VOI': {'type': 'string', 'empty': False, 'allowed': ['COMMUNE', 'COMMUNAUTE DE COMMUNES', 'DEPARTEMENT', 'ETAT', 'PRIVE']},
|
|
@@ -160,8 +156,7 @@ class Tranchee(BaseGeoModel):
|
|
|
|
|
|
|
|
class Zapbo(BaseGeoModel):
|
|
class Zapbo(BaseGeoModel):
|
|
|
filename = "zapbo_geo.shp"
|
|
filename = "zapbo_geo.shp"
|
|
|
- pk = "ID_ZAPBO"
|
|
|
|
|
schema = {'geom': {'geometry': (gis.POLYGON, (XMIN, YMIN, XMAX, YMAX))},
|
|
schema = {'geom': {'geometry': (gis.POLYGON, (XMIN, YMIN, XMAX, YMAX))},
|
|
|
- 'ID_ZAPBO': {'type': 'string', 'maxlength': 10},
|
|
|
|
|
|
|
+ 'ID_ZAPBO': {'type': 'string', 'maxlength': 30},
|
|
|
'COMMENTAIR': {'type': 'string', 'maxlength': 254, 'empty': True},
|
|
'COMMENTAIR': {'type': 'string', 'maxlength': 254, 'empty': True},
|
|
|
'STATUT': {'type': 'string', 'empty': False, 'allowed': ['EN ETUDE', 'EN REALISATION', 'EN SERVICE', 'HORS SERVICE']}}
|
|
'STATUT': {'type': 'string', 'empty': False, 'allowed': ['EN ETUDE', 'EN REALISATION', 'EN SERVICE', 'HORS SERVICE']}}
|