|
|
@@ -36,6 +36,7 @@ STATUTS = ['ETUDE PRELIMINAIRE', 'ETUDE DE DIAGNOSTIC', 'AVANT-PROJET PROJET', '
|
|
|
class SiteTelecom(QgsModel):
|
|
|
layername = "SITE_TELECOM"
|
|
|
geom_type = QgsModel.GEOM_POINT
|
|
|
+ crs = CRS
|
|
|
bounding_box = (XMIN,YMIN,XMAX,YMAX)
|
|
|
pk = "ST_CODE"
|
|
|
schema = {'ST_CODE': {'type': 'string', 'empty': False},
|
|
|
@@ -47,23 +48,24 @@ class SiteTelecom(QgsModel):
|
|
|
'NOEUD RACCORDEMENT D ABONNES',
|
|
|
'NOEUD RACCORDEMENT D ABONNES - HAUT DEBIT',
|
|
|
'NOEUD RACCORDEMENT D ABONNES - MONTEE EN DEBIT']},
|
|
|
- 'ST_STATUT': {'type': 'string', 'empty': False, 'allowed': [STATUTS]},
|
|
|
+ 'ST_STATUT': {'type': 'string', 'empty': False, 'allowed': STATUTS},
|
|
|
'ST_NBPRISE': {'empty': False, 'validator': is_positive_int}
|
|
|
}
|
|
|
|
|
|
class SiteClient(QgsModel):
|
|
|
layername = "SITE_CLIENT"
|
|
|
geom_type = QgsModel.GEOM_POINT
|
|
|
+ crs = CRS
|
|
|
bounding_box = (XMIN,YMIN,XMAX,YMAX)
|
|
|
schema = {
|
|
|
'SC_TYPFON': {'type': 'string', 'empty': False, 'allowed': ['RESIDENTIEL', 'PROFESSIONNEL', 'OPERATEUR', 'TECHNIQUE']},
|
|
|
- 'SC_STATUT': {'type': 'string', 'empty': False, 'allowed': [STATUTS]},
|
|
|
+ 'SC_STATUT': {'type': 'string', 'empty': False, 'allowed': STATUTS},
|
|
|
'SC_NBPRISE': {'empty': False, 'validator': is_positive_int},
|
|
|
'SC_NBPRHAB': {'empty': False, 'validator': is_positive_int},
|
|
|
'SC_NBPRPRO': {'empty': False, 'validator': is_positive_int},
|
|
|
'SC_ID_SITE': {'type': 'string', 'empty': False},
|
|
|
'SC_NUM_RUE': {'type': 'string', 'empty': False},
|
|
|
- 'SC_REPET': {'type': 'string', 'empty': False},
|
|
|
+ 'SC_REPET': {'type': 'string', 'empty': True},
|
|
|
'SC_DNUBAT': {'type': 'string', 'empty': False},
|
|
|
'SC_DESC': {'type': 'string', 'empty': False},
|
|
|
'SC_NOM_RUE': {'type': 'string', 'empty': False},
|
|
|
@@ -75,10 +77,11 @@ class SiteClient(QgsModel):
|
|
|
class Cable(QgsModel):
|
|
|
layername = "CABLE"
|
|
|
geom_type = QgsModel.GEOM_LINE
|
|
|
+ crs = CRS
|
|
|
bounding_box = (XMIN,YMIN,XMAX,YMAX)
|
|
|
schema = {'CA_TYPFON': {'type': 'string', 'empty': False, 'allowed': ['COLLECTE TRANSPORT DISTRIBUTION', 'COLLECTE', 'COLLECTE TRANSPORT', 'COLLECTE DISTRIBUTION', 'TRANSPORT DISTRIBUTION', 'TRANSPORT', 'DISTRIBUTION', 'RACCORDEMENT FINAL', 'BOUCLE METROPOLITAINE', 'LONGUE DISTANCE (LONG HAUL)', 'NON COMMUNIQUE']},
|
|
|
'CA_TYPSTR': {'type': 'string', 'empty': False, 'allowed': ['CONDUITE', 'AERIEN', 'COLONNE MONTANTE', 'IMMERGE', 'FACADE']},
|
|
|
- 'CA_STATUT': {'type': 'string', 'empty': False, 'allowed': [STATUTS]},
|
|
|
+ 'CA_STATUT': {'type': 'string', 'empty': False, 'allowed': STATUTS},
|
|
|
'CA_CAPFO': {'empty': False, 'allowed': [720,576,288,144,96,72,48,24,12]},
|
|
|
'CA_MODULO': {'empty': False, 'allowed': [6, 12]},
|
|
|
'CA_SUPPORT': {'type': 'string', 'empty': False, 'allowed': ['0', '1']}
|
|
|
@@ -87,15 +90,17 @@ class Cable(QgsModel):
|
|
|
class Zapbo(QgsModel):
|
|
|
layername = "ZAPBO"
|
|
|
geom_type = QgsModel.GEOM_POLYGON
|
|
|
+ crs = CRS
|
|
|
bounding_box = (XMIN,YMIN,XMAX,YMAX)
|
|
|
schema = {'ZP_NBPRISE': {'empty': False, 'validator': is_positive_int},
|
|
|
'ZP_ISOLE': {'type': 'string', 'empty': False, 'allowed': ['0', '1']},
|
|
|
- 'ZP_STATUT': {'type': 'string', 'empty': False, 'allowed': [STATUTS]}
|
|
|
+ 'ZP_STATUT': {'type': 'string', 'empty': False, 'allowed': STATUTS}
|
|
|
}
|
|
|
|
|
|
class Zasro(QgsModel):
|
|
|
layername = "ZASRO"
|
|
|
geom_type = QgsModel.GEOM_POLYGON
|
|
|
+ crs = CRS
|
|
|
bounding_box = (XMIN,YMIN,XMAX,YMAX)
|
|
|
schema = {'ZS_CODE': {'type': 'string', 'empty': False},
|
|
|
'ZS_NBPRISE': {'empty': False, 'validator': is_positive_int}
|
|
|
@@ -104,6 +109,7 @@ class Zasro(QgsModel):
|
|
|
class Adduction(QgsModel):
|
|
|
layername = "ADDUCTION"
|
|
|
geom_type = QgsModel.GEOM_LINE
|
|
|
+ crs = CRS
|
|
|
bounding_box = (XMIN,YMIN,XMAX,YMAX)
|
|
|
schema = {'AD_ISOLE': {'type': 'string', 'empty': False, 'allowed': ['0', '1']},
|
|
|
'AD_LONG': {'empty': False, 'validator': is_positive_float}
|
|
|
@@ -258,25 +264,25 @@ class Mn3ApdChecker(BaseChecker):
|
|
|
def test_dimension_zasro(self):
|
|
|
""" Contrôle le dimensionnement des ZASRO """
|
|
|
for zasro in self.zasros:
|
|
|
- if zasro.ZS.NBPRISES > 850:
|
|
|
+ if zasro.ZS_NBPRISE > 850:
|
|
|
self.log_error("Le nombre de prises est supérieur à 850", item=zasro)
|
|
|
|
|
|
def test_affaiblissement(self):
|
|
|
""" Contrôle l'affaiblissement """
|
|
|
- for site_client in self.site_clients:
|
|
|
- if site_client.ZS.NBPRISES > 28:
|
|
|
+ for site_client in self.sites_client:
|
|
|
+ if site_client.SC_ATT_PTO > 28:
|
|
|
self.log_error("L'affaiblissement est supérieur à 28", item=site_client)
|
|
|
|
|
|
def test_capacite_modulo(self):
|
|
|
- """ Contrôle l'affaiblissement """
|
|
|
+ """ Cohérence capacité du cable / modulo """
|
|
|
for cable in self.cables:
|
|
|
- if cable.CA_CAPFO in [720,576,288,144,96] and cable.MODULO != 12:
|
|
|
- self.log_error(f"Modulo invalide (capacite: {cable.CA_CAPFO}, modulo: {cable.MODULO})", item=cable)
|
|
|
- elif cable.CA_CAPFO in [48,24,12] and cable.MODULO != 6:
|
|
|
- self.log_error(f"Modulo invalide (capacite: {cable.CA_CAPFO}, modulo: {cable.MODULO})", item=cable)
|
|
|
+ if cable.CA_CAPFO in [720,576,288,144,96] and cable.CA_MODULO != 12:
|
|
|
+ self.log_error(f"Modulo invalide (capacite: {cable.CA_CAPFO}, modulo: {cable.CA_MODULO})", item=cable)
|
|
|
+ elif cable.CA_CAPFO in [48,24,12] and cable.CA_MODULO != 6:
|
|
|
+ self.log_error(f"Modulo invalide (capacite: {cable.CA_CAPFO}, modulo: {cable.CA_MODULO})", item=cable)
|
|
|
|
|
|
def test_longueur_racco(self):
|
|
|
- """ Contrôle la longueur des raccos """
|
|
|
+ """ Contrôle la longueur des raccordements """
|
|
|
for adduction in self.adductions:
|
|
|
if adduction.AD_ISOLE == "1" and adduction.AD_LONG <= 100:
|
|
|
self.log_error("L'adduction ne devrait pas être consiudérée comme isolée (long.: {adduction.AD_LONG})", item=adduction)
|
|
|
@@ -289,16 +295,15 @@ class Mn3ApdChecker(BaseChecker):
|
|
|
Toutes les zapbo contiennent au moins une prise"""
|
|
|
|
|
|
for zapbo in self.zapbos:
|
|
|
- nb_prises = sum([site_client.SC_NBPRISE for site_client in self.site_clients if zapbo.geom.contains(site_client.geom)])
|
|
|
+ nb_prises = sum([site_client.SC_NBPRISE for site_client in self.sites_client if zapbo.geom.contains(site_client.geom)])
|
|
|
if not nb_prises:
|
|
|
self.log_error("La Zapbo ne contient aucune prise", item=zapbo)
|
|
|
|
|
|
- for site_client in self.site_clients:
|
|
|
+ for site_client in self.sites_client:
|
|
|
nb_zapbo = len([zapbo for zapbo in self.zapbos if zapbo.geom.contains(site_client.geom)])
|
|
|
if nb_zapbo == 0:
|
|
|
self.log_error("La prise n'est contenue dans aucune ZAPBO", item=site_client)
|
|
|
elif nb_zapbo > 1:
|
|
|
self.log_error("La prise est contenue dans plus d'une ZAPBO", item=site_client)
|
|
|
|
|
|
-
|
|
|
checkers = [Mn3ApdChecker]
|