Compare commits
2 commits
8afa68e066
...
4823d55f08
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4823d55f08 | ||
|
|
cebe496617 |
2 changed files with 1028 additions and 0 deletions
517
loko/assets/management/commands/seed_schuman_bollards.py
Normal file
517
loko/assets/management/commands/seed_schuman_bollards.py
Normal file
|
|
@ -0,0 +1,517 @@
|
|||
"""
|
||||
Management command to seed the 11 Bollard Installations (ITSBollardSystem)
|
||||
and 8 CCTV Cameras (ITSGeoAsset) at Rond-point Schuman and Korte Wetstraat,
|
||||
based on the official POLBRU-approved plan from 'draft_fiche reflex bollards Schuman_20261006.docx'.
|
||||
"""
|
||||
|
||||
import json
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.contrib.gis.geos import LineString, Point, Polygon, MultiPolygon
|
||||
from django.db import transaction
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
from common.models import Thematic
|
||||
from assets.models import (
|
||||
AssetCategory,
|
||||
ITSAssetModel,
|
||||
ITSLocation,
|
||||
ITSGeoAsset,
|
||||
ITSBollardSystem,
|
||||
ITSBollardSystemAsset,
|
||||
)
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Crée ou met à jour les 11 installations de bollards et les 8 caméras CCTV du rond-point Schuman."
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument(
|
||||
'--dry-run',
|
||||
action='store_true',
|
||||
help="Simule l'exécution sans enregistrer en base de données.",
|
||||
)
|
||||
parser.add_argument(
|
||||
'--export-geojson',
|
||||
type=str,
|
||||
help="Exporte les entités générées dans un fichier GeoJSON (ex: schuman_assets.geojson).",
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
dry_run = options.get('dry_run', False)
|
||||
geojson_path = options.get('export_geojson')
|
||||
|
||||
self.stdout.write(self.style.MIGRATE_HEADING("=== Déploiement des Assets Bollards & CCTV Schuman ==="))
|
||||
|
||||
if dry_run:
|
||||
self.stdout.write(self.style.WARNING("[ATTENTION] Mode DRY-RUN actif : aucune modification ne sera enregistree en base."))
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 1. Données de référence géographiques et attributaires
|
||||
# ---------------------------------------------------------
|
||||
# SRID: 3812 (Belgian Lambert 2008)
|
||||
bollards_data = [
|
||||
{
|
||||
"code": "WET_235",
|
||||
"name_fr": "Bornes Schuman - Korte Wetstraat n°235",
|
||||
"name_nl": "Verzinkbare palen Schuman - Korte Wetstraat nr. 235",
|
||||
"direction": "unidirectional",
|
||||
"width": 5.0,
|
||||
"coords_3812": [(651198.5, 670158.0), (651201.5, 670163.0)],
|
||||
"description": "Voie sud Korte Wetstraat face au n°235 en direction du Cinquantenaire",
|
||||
"plots_count": 2,
|
||||
},
|
||||
{
|
||||
"code": "WET_SIAMU",
|
||||
"name_fr": "Bornes Schuman - Korte Wetstraat SIAMU",
|
||||
"name_nl": "Verzinkbare palen Schuman - Korte Wetstraat SIAMU",
|
||||
"direction": "bidirectional",
|
||||
"width": 7.5,
|
||||
"coords_3812": [(651165.0, 670172.5), (651168.5, 670180.0)],
|
||||
"description": "Voie nord Korte Wetstraat (accès prioritaire secours SIAMU)",
|
||||
"plots_count": 4,
|
||||
},
|
||||
{
|
||||
"code": "EEAS_INT",
|
||||
"name_fr": "Bornes Schuman - EEAS Intérieur",
|
||||
"name_nl": "Verzinkbare palen Schuman - EED Binnen",
|
||||
"direction": "bidirectional",
|
||||
"width": 6.0,
|
||||
"coords_3812": [(651090.0, 670222.0), (651090.0, 670228.0)],
|
||||
"description": "Esplanade piétonne est, traverse intérieure près de la canopée",
|
||||
"plots_count": 2,
|
||||
},
|
||||
{
|
||||
"code": "EEAS_EXT",
|
||||
"name_fr": "Bornes Schuman - EEAS Extérieur",
|
||||
"name_nl": "Verzinkbare palen Schuman - EED Buiten",
|
||||
"direction": "bidirectional",
|
||||
"width": 6.0,
|
||||
"coords_3812": [(651125.0, 670222.0), (651125.0, 670228.0)],
|
||||
"description": "Esplanade piétonne est, traverse extérieure face au bâtiment Capital / EEAS",
|
||||
"plots_count": 2,
|
||||
},
|
||||
{
|
||||
"code": "BERL_EXT",
|
||||
"name_fr": "Bornes Schuman - Berlaymont Extérieur",
|
||||
"name_nl": "Verzinkbare palen Schuman - Berlaymont Buiten",
|
||||
"direction": "unidirectional",
|
||||
"width": 8.0,
|
||||
"coords_3812": [(650936.0, 670273.0), (650933.0, 670281.0)],
|
||||
"description": "Chaussée sortie Schuman vers Rue de la Loi direction centre (traverse extérieure)",
|
||||
"plots_count": 4,
|
||||
},
|
||||
{
|
||||
"code": "BERL_INT",
|
||||
"name_fr": "Bornes Schuman - Berlaymont Intérieur",
|
||||
"name_nl": "Verzinkbare palen Schuman - Berlaymont Binnen",
|
||||
"direction": "unidirectional",
|
||||
"width": 8.0,
|
||||
"coords_3812": [(650956.0, 670267.0), (650953.0, 670275.0)],
|
||||
"description": "Chaussée sortie Schuman vers Rue de la Loi direction centre (traverse intérieure)",
|
||||
"plots_count": 4,
|
||||
},
|
||||
{
|
||||
"code": "FROI_OUT",
|
||||
"name_fr": "Bornes Schuman - Froissart Sortie",
|
||||
"name_nl": "Verzinkbare palen Schuman - Froissart Uitrit",
|
||||
"direction": "unidirectional",
|
||||
"width": 4.5,
|
||||
"coords_3812": [(651027.0, 670185.0), (651031.0, 670183.0)],
|
||||
"description": "Voie de sortie du rond-point vers la Rue Froissart (voie ouest)",
|
||||
"plots_count": 2,
|
||||
},
|
||||
{
|
||||
"code": "FROI_IN",
|
||||
"name_fr": "Bornes Schuman - Froissart Entrée",
|
||||
"name_nl": "Verzinkbare palen Schuman - Froissart Inrit",
|
||||
"direction": "unidirectional",
|
||||
"width": 4.5,
|
||||
"coords_3812": [(651032.5, 670189.0), (651036.5, 670186.5)],
|
||||
"description": "Voie d'entrée dans le rond-point depuis la Rue Froissart (voie est)",
|
||||
"plots_count": 2,
|
||||
},
|
||||
{
|
||||
"code": "OUD_OUT",
|
||||
"name_fr": "Bornes Schuman - Auderghem Sortie",
|
||||
"name_nl": "Verzinkbare palen Schuman - Oudergem Uitrit",
|
||||
"direction": "unidirectional",
|
||||
"width": 4.5,
|
||||
"coords_3812": [(651082.0, 670160.0), (651086.0, 670161.5)],
|
||||
"description": "Voie de sortie du rond-point vers l'Avenue d'Auderghem (voie ouest)",
|
||||
"plots_count": 2,
|
||||
},
|
||||
{
|
||||
"code": "OUD_IN",
|
||||
"name_fr": "Bornes Schuman - Auderghem Entrée",
|
||||
"name_nl": "Verzinkbare palen Schuman - Oudergem Inrit",
|
||||
"direction": "unidirectional",
|
||||
"width": 4.5,
|
||||
"coords_3812": [(651087.5, 670161.8), (651092.0, 670163.5)],
|
||||
"description": "Voie d'entrée dans le rond-point depuis l'Avenue d'Auderghem (voie est)",
|
||||
"plots_count": 2,
|
||||
},
|
||||
{
|
||||
"code": "J_LIPS",
|
||||
"name_fr": "Bornes Schuman - Justus Lipsius",
|
||||
"name_nl": "Verzinkbare palen Schuman - Justus Lipsius",
|
||||
"direction": "bidirectional",
|
||||
"width": 5.5,
|
||||
"coords_3812": [(650996.0, 670226.0), (651000.0, 670231.0)],
|
||||
"description": "Esplanade piétonne ouest en face du bâtiment Justus Lipsius",
|
||||
"plots_count": 2,
|
||||
},
|
||||
]
|
||||
|
||||
cameras_data = [
|
||||
{
|
||||
"code": "CAM-N23-BLIJDE-INKOMSTEN",
|
||||
"name_fr": "CCTV N23 - Blijde Inkomsten",
|
||||
"name_nl": "CCTV N23 - Blijde Inkomst",
|
||||
"coords_3812": (651218.0, 670163.0),
|
||||
"target_systems": ["WET_235", "WET_SIAMU"],
|
||||
"description": "Caméra CCTV carrefour N23 / Blijde Inkomst avec vue sur bollards WET_235 et WET_SIAMU",
|
||||
},
|
||||
{
|
||||
"code": "CAM-SCHUMAN-EEAS",
|
||||
"name_fr": "CCTV Schuman - EEAS",
|
||||
"name_nl": "CCTV Schuman - EED",
|
||||
"coords_3812": (651085.0, 670215.0),
|
||||
"target_systems": ["EEAS_INT", "EEAS_EXT"],
|
||||
"description": "Caméra CCTV esplanade est avec vue sur bollards EEAS_INT et EEAS_EXT",
|
||||
},
|
||||
{
|
||||
"code": "CAM-SCHUMAN-BERLAYMONT",
|
||||
"name_fr": "CCTV Schuman - Berlaymont",
|
||||
"name_nl": "CCTV Schuman - Berlaymont",
|
||||
"coords_3812": (650965.0, 670260.0),
|
||||
"target_systems": ["BERL_INT", "BERL_EXT"],
|
||||
"description": "Caméra CCTV nord-ouest avec vue sur bollards BERL_INT et BERL_EXT",
|
||||
},
|
||||
{
|
||||
"code": "CAM-SCHUMAN-LIPSIUS",
|
||||
"name_fr": "CCTV Schuman - Lipsius",
|
||||
"name_nl": "CCTV Schuman - Lipsius",
|
||||
"coords_3812": (650995.0, 670223.0),
|
||||
"target_systems": ["J_LIPS"],
|
||||
"description": "Caméra CCTV ouest avec vue sur bollards J_LIPS (Justus Lipsius)",
|
||||
},
|
||||
{
|
||||
"code": "CAM-SCHUMAN-FROISSART",
|
||||
"name_fr": "CCTV Schuman - Froissart",
|
||||
"name_nl": "CCTV Schuman - Froissart",
|
||||
"coords_3812": (651040.0, 670198.0),
|
||||
"target_systems": ["FROI_IN", "FROI_OUT"],
|
||||
"description": "Caméra CCTV sud-ouest avec vue sur bollards FROI_IN et FROI_OUT",
|
||||
},
|
||||
{
|
||||
"code": "CAM-SCHUMAN-OUDERGEM",
|
||||
"name_fr": "CCTV Schuman - Oudergem",
|
||||
"name_nl": "CCTV Schuman - Oudergem",
|
||||
"coords_3812": (651082.0, 670190.0),
|
||||
"target_systems": ["OUD_IN", "OUD_OUT"],
|
||||
"description": "Caméra CCTV sud avec vue sur bollards OUD_IN et OUD_OUT",
|
||||
},
|
||||
{
|
||||
"code": "CAM-SCHUMAN-KORTENBERG",
|
||||
"name_fr": "CCTV Schuman - Kortenberg",
|
||||
"name_nl": "CCTV Schuman - Kortenberg",
|
||||
"coords_3812": (651095.0, 670250.0),
|
||||
"target_systems": [],
|
||||
"description": "Caméra CCTV nord-est avec vue sur l'Avenue de Cortenbergh / Kortenberglaan",
|
||||
},
|
||||
{
|
||||
"code": "CAM-SCHUMAN-KLEINE-WETSTRAAT",
|
||||
"name_fr": "CCTV Schuman - Kleine Wetstraat",
|
||||
"name_nl": "CCTV Schuman - Korte Wetstraat",
|
||||
"coords_3812": (651105.0, 670205.0),
|
||||
"target_systems": ["WET_SIAMU", "WET_235"],
|
||||
"description": "Caméra CCTV est avec vue sur la Korte Wetstraat vers l'est",
|
||||
},
|
||||
]
|
||||
|
||||
# Export GeoJSON optionnel
|
||||
if geojson_path:
|
||||
self.export_geojson(bollards_data, cameras_data, geojson_path)
|
||||
|
||||
if dry_run:
|
||||
self.stdout.write(self.style.SUCCESS(
|
||||
f"[OK] Simulation terminee : {len(bollards_data)} bollards et {len(cameras_data)} cameras verifies."
|
||||
))
|
||||
return
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 2. Exécution des créations / mises à jour en DB
|
||||
# ---------------------------------------------------------
|
||||
with transaction.atomic():
|
||||
# A) Thématique ITS
|
||||
thematic_its, _ = Thematic.objects.get_or_create(
|
||||
code='its',
|
||||
defaults={
|
||||
'name_fr': 'Systèmes de Transport Intelligents (ITS)',
|
||||
'name_nl': 'Intelligente Transportsystemen (ITS)',
|
||||
}
|
||||
)
|
||||
|
||||
# B) Catégories d'assets
|
||||
ct_bollard_system = ContentType.objects.get_for_model(ITSBollardSystem)
|
||||
ct_geo_asset = ContentType.objects.get_for_model(ITSGeoAsset)
|
||||
|
||||
cat_bollards, _ = AssetCategory.objects.update_or_create(
|
||||
code='ITS_BOLLARDS',
|
||||
defaults={
|
||||
'name_fr': 'Systèmes de bornes escamotables',
|
||||
'name_nl': 'Verzinkbare palen systemen',
|
||||
'thematic': thematic_its,
|
||||
}
|
||||
)
|
||||
cat_bollards.allowed_models.add(ct_bollard_system)
|
||||
|
||||
cat_cctv, _ = AssetCategory.objects.update_or_create(
|
||||
code='ITS_CCTV',
|
||||
defaults={
|
||||
'name_fr': 'Caméras de surveillance (CCTV)',
|
||||
'name_nl': "CCTV-bewakingscamera's",
|
||||
'thematic': thematic_its,
|
||||
}
|
||||
)
|
||||
cat_cctv.allowed_models.add(ct_geo_asset)
|
||||
|
||||
# C) Modèles de matériel (ITSAssetModel)
|
||||
model_bollards, _ = ITSAssetModel.objects.update_or_create(
|
||||
code='MODEL_BOLLARD_SYSTEM_SCHUMAN',
|
||||
defaults={
|
||||
'name_fr': 'Système de bornes escamotables Schuman',
|
||||
'name_nl': 'Verzinkbare palen systeem Schuman',
|
||||
'brand': 'Lowist',
|
||||
'category': cat_bollards,
|
||||
'description': 'Système de bornes escamotables automatisées sur rail coulissant au sol (Beliris / Lowist).',
|
||||
}
|
||||
)
|
||||
|
||||
model_camera, _ = ITSAssetModel.objects.update_or_create(
|
||||
code='MODEL_CCTV_CAMERA_SCHUMAN',
|
||||
defaults={
|
||||
'name_fr': 'Caméra CCTV Schuman (Genetec/MANBRU)',
|
||||
'name_nl': 'CCTV-camera Schuman (Genetec/MANBRU)',
|
||||
'brand': 'Genetec / MANBRU',
|
||||
'category': cat_cctv,
|
||||
'description': 'Caméra de vidéosurveillance urbaine haute définition connectée au réseau MANBRU.',
|
||||
}
|
||||
)
|
||||
|
||||
# D) Localisation ITS Schuman (ITSLocation)
|
||||
# Périmètre Schuman sous forme de polygone Lambert 2008
|
||||
schuman_poly = Polygon((
|
||||
(650880.0, 670260.0),
|
||||
(650940.0, 670310.0),
|
||||
(651120.0, 670300.0),
|
||||
(651260.0, 670180.0),
|
||||
(651230.0, 670130.0),
|
||||
(651070.0, 670140.0),
|
||||
(651000.0, 670170.0),
|
||||
(650880.0, 670260.0),
|
||||
), srid=3812)
|
||||
schuman_multipoly = MultiPolygon([schuman_poly], srid=3812)
|
||||
|
||||
loc_schuman, _ = ITSLocation.objects.update_or_create(
|
||||
code='LOC-SCHUMAN',
|
||||
defaults={
|
||||
'name_fr': 'Rond-point Robert Schuman et Korte Wetstraat',
|
||||
'name_nl': 'Robert Schumanplein en Korte Wetstraat',
|
||||
'is_main_location': True,
|
||||
'geom': schuman_multipoly,
|
||||
}
|
||||
)
|
||||
self.stdout.write(f"[INFO] Localisation ITS prete : {loc_schuman}")
|
||||
|
||||
# E) Création des 11 ITSBollardSystem
|
||||
created_bollards = 0
|
||||
updated_bollards = 0
|
||||
bollard_system_objs = {}
|
||||
|
||||
common_bollard_extra_data = {
|
||||
"source": "draft_fiche reflex bollards Schuman_20261006.docx",
|
||||
"contract_beliris": "2.1.1.2 - Réaménagement du rond-point Schuman et de ses abords",
|
||||
"warranty_end_date": "2029-09-15",
|
||||
"future_contract": "E26.174 (BM-ITS)",
|
||||
"installer": "Lowist (Mathie Lowist, ml@lowist.be)",
|
||||
"civil_works": "Colas (Glenn Verhasselt)",
|
||||
"beliris_contact": "Fabian Bossut (fabian.bossut@mobilit.fgov.be)",
|
||||
"software": "Centrigo (level 27)",
|
||||
"whitelist_sync": "GDA (Ville de Bruxelles) -> Centrigo",
|
||||
"monitoring": "Genetec / MANBRU",
|
||||
"deviation_plan": "Signalisation de déviation + blocs de béton (Trafiroad)",
|
||||
}
|
||||
|
||||
for item in bollards_data:
|
||||
geom_line = LineString(item['coords_3812'], srid=3812)
|
||||
extra = dict(common_bollard_extra_data)
|
||||
extra["centrigo_name"] = item["code"]
|
||||
extra["plots_count"] = item.get("plots_count", 2)
|
||||
extra["description"] = item["description"]
|
||||
|
||||
system, created = ITSBollardSystem.objects.update_or_create(
|
||||
code=item['code'],
|
||||
defaults={
|
||||
'name_fr': item['name_fr'],
|
||||
'name_nl': item['name_nl'],
|
||||
'external_reference': item['code'],
|
||||
'direction': item['direction'],
|
||||
'width': item['width'],
|
||||
'status': 'active',
|
||||
'validation_status': 'validated',
|
||||
'inspection_status': 'compliant',
|
||||
'category': cat_bollards,
|
||||
'model': model_bollards,
|
||||
'location': loc_schuman,
|
||||
'geom': geom_line,
|
||||
'extra_data': extra,
|
||||
'brand': 'Lowist',
|
||||
}
|
||||
)
|
||||
bollard_system_objs[item['code']] = system
|
||||
if created:
|
||||
created_bollards += 1
|
||||
else:
|
||||
updated_bollards += 1
|
||||
|
||||
self.stdout.write(self.style.SUCCESS(
|
||||
f"[OK] Systemes de bornes : {created_bollards} crees, {updated_bollards} mis a jour."
|
||||
))
|
||||
|
||||
# F) Création des 8 Caméras CCTV (ITSGeoAsset)
|
||||
created_cameras = 0
|
||||
updated_cameras = 0
|
||||
camera_objs = {}
|
||||
|
||||
for cdata in cameras_data:
|
||||
geom_pt = Point(cdata['coords_3812'], srid=3812)
|
||||
c_extra = {
|
||||
"source": "draft_fiche reflex bollards Schuman_20261006.docx",
|
||||
"cctv_network": "MANBRU",
|
||||
"vms": "Genetec",
|
||||
"monitored_bollards": cdata['target_systems'],
|
||||
"description": cdata['description'],
|
||||
}
|
||||
|
||||
cam, created = ITSGeoAsset.objects.update_or_create(
|
||||
code=cdata['code'],
|
||||
defaults={
|
||||
'name_fr': cdata['name_fr'],
|
||||
'name_nl': cdata['name_nl'],
|
||||
'status': 'active',
|
||||
'validation_status': 'validated',
|
||||
'inspection_status': 'compliant',
|
||||
'category': cat_cctv,
|
||||
'model': model_camera,
|
||||
'location': loc_schuman,
|
||||
'geom': geom_pt,
|
||||
'extra_data': c_extra,
|
||||
'brand': 'Genetec / MANBRU',
|
||||
}
|
||||
)
|
||||
camera_objs[cdata['code']] = cam
|
||||
if created:
|
||||
created_cameras += 1
|
||||
else:
|
||||
updated_cameras += 1
|
||||
|
||||
self.stdout.write(self.style.SUCCESS(
|
||||
f"[OK] Cameras CCTV : {created_cameras} creees, {updated_cameras} mises a jour."
|
||||
))
|
||||
|
||||
# G) Liaisons ManyToMany via ITSBollardSystemAsset
|
||||
links_count = 0
|
||||
for cdata in cameras_data:
|
||||
cam_obj = camera_objs[cdata['code']]
|
||||
for bcode in cdata['target_systems']:
|
||||
if bcode in bollard_system_objs:
|
||||
b_obj = bollard_system_objs[bcode]
|
||||
link, created = ITSBollardSystemAsset.objects.update_or_create(
|
||||
bollard_system=b_obj,
|
||||
asset=cam_obj,
|
||||
defaults={
|
||||
'role': ITSBollardSystemAsset.AssetRole.CAMERA_CCTV,
|
||||
'comment': f"Vue CCTV {cdata['name_fr']} vers {bcode}",
|
||||
}
|
||||
)
|
||||
links_count += 1
|
||||
|
||||
self.stdout.write(self.style.SUCCESS(
|
||||
f"[OK] Associations Cameras <-> Systemes de bornes : {links_count} associations actives."
|
||||
))
|
||||
|
||||
self.stdout.write(self.style.SUCCESS("[SUCCES] Deploiement des assets Schuman termine avec succes !"))
|
||||
|
||||
def export_geojson(self, bollards_data, cameras_data, output_path):
|
||||
"""
|
||||
Exporte les données en un FeatureCollection GeoJSON (WGS84).
|
||||
"""
|
||||
from pyproj import Transformer
|
||||
t = Transformer.from_crs("EPSG:3812", "EPSG:4326", always_xy=True)
|
||||
|
||||
features = []
|
||||
|
||||
# Bollards (LineString)
|
||||
for b in bollards_data:
|
||||
c1 = t.transform(b['coords_3812'][0][0], b['coords_3812'][0][1])
|
||||
c2 = t.transform(b['coords_3812'][1][0], b['coords_3812'][1][1])
|
||||
features.append({
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[round(c1[0], 7), round(c1[1], 7)],
|
||||
[round(c2[0], 7), round(c2[1], 7)]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": b["code"],
|
||||
"name_fr": b["name_fr"],
|
||||
"name_nl": b["name_nl"],
|
||||
"direction": b["direction"],
|
||||
"width_m": b["width"],
|
||||
"plots_count": b["plots_count"],
|
||||
"description": b["description"],
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
})
|
||||
|
||||
# Caméras (Point)
|
||||
for c in cameras_data:
|
||||
pt = t.transform(c['coords_3812'][0], c['coords_3812'][1])
|
||||
features.append({
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [round(pt[0], 7), round(pt[1], 7)]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSGeoAsset (CCTV Camera)",
|
||||
"code": c["code"],
|
||||
"name_fr": c["name_fr"],
|
||||
"name_nl": c["name_nl"],
|
||||
"target_bollards": c["target_systems"],
|
||||
"description": c["description"],
|
||||
"network": "MANBRU",
|
||||
"vms": "Genetec"
|
||||
}
|
||||
})
|
||||
|
||||
geojson = {
|
||||
"type": "FeatureCollection",
|
||||
"name": "Schuman_Bollards_and_CCTV",
|
||||
"crs": {
|
||||
"type": "name",
|
||||
"properties": {"name": "urn:ogc:def:crs:OGC:1.3:CRS84"}
|
||||
},
|
||||
"features": features
|
||||
}
|
||||
|
||||
with open(output_path, 'w', encoding='utf-8') as f:
|
||||
json.dump(geojson, f, indent=2, ensure_ascii=False)
|
||||
|
||||
self.stdout.write(self.style.SUCCESS(f"[OK] Fichier GeoJSON exporte avec succes : {output_path}"))
|
||||
511
loko/common/fixtures/schuman_bollards_assets.geojson
Normal file
511
loko/common/fixtures/schuman_bollards_assets.geojson
Normal file
|
|
@ -0,0 +1,511 @@
|
|||
{
|
||||
"type": "FeatureCollection",
|
||||
"name": "Schuman_Bollards_and_CCTV",
|
||||
"crs": {
|
||||
"type": "name",
|
||||
"properties": {
|
||||
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
|
||||
}
|
||||
},
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3857731,
|
||||
50.8418253
|
||||
],
|
||||
[
|
||||
4.3858158,
|
||||
50.8418703
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "WET_235",
|
||||
"name_fr": "Bornes Schuman - Korte Wetstraat n°235",
|
||||
"name_nl": "Verzinkbare palen Schuman - Korte Wetstraat nr. 235",
|
||||
"direction": "unidirectional",
|
||||
"width_m": 5.0,
|
||||
"plots_count": 2,
|
||||
"description": "Voie sud Korte Wetstraat face au n°235 en direction du Cinquantenaire",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3852976,
|
||||
50.8419558
|
||||
],
|
||||
[
|
||||
4.3853473,
|
||||
50.8420232
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "WET_SIAMU",
|
||||
"name_fr": "Bornes Schuman - Korte Wetstraat SIAMU",
|
||||
"name_nl": "Verzinkbare palen Schuman - Korte Wetstraat SIAMU",
|
||||
"direction": "bidirectional",
|
||||
"width_m": 7.5,
|
||||
"plots_count": 4,
|
||||
"description": "Voie nord Korte Wetstraat (accès prioritaire secours SIAMU)",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.384233,
|
||||
50.842401
|
||||
],
|
||||
[
|
||||
4.384233,
|
||||
50.8424549
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "EEAS_INT",
|
||||
"name_fr": "Bornes Schuman - EEAS Intérieur",
|
||||
"name_nl": "Verzinkbare palen Schuman - EED Binnen",
|
||||
"direction": "bidirectional",
|
||||
"width_m": 6.0,
|
||||
"plots_count": 2,
|
||||
"description": "Esplanade piétonne est, traverse intérieure près de la canopée",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3847299,
|
||||
50.8424009
|
||||
],
|
||||
[
|
||||
4.3847299,
|
||||
50.8424548
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "EEAS_EXT",
|
||||
"name_fr": "Bornes Schuman - EEAS Extérieur",
|
||||
"name_nl": "Verzinkbare palen Schuman - EED Buiten",
|
||||
"direction": "bidirectional",
|
||||
"width_m": 6.0,
|
||||
"plots_count": 2,
|
||||
"description": "Esplanade piétonne est, traverse extérieure face au bâtiment Capital / EEAS",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3820467,
|
||||
50.8428599
|
||||
],
|
||||
[
|
||||
4.3820041,
|
||||
50.8429318
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "BERL_EXT",
|
||||
"name_fr": "Bornes Schuman - Berlaymont Extérieur",
|
||||
"name_nl": "Verzinkbare palen Schuman - Berlaymont Buiten",
|
||||
"direction": "unidirectional",
|
||||
"width_m": 8.0,
|
||||
"plots_count": 4,
|
||||
"description": "Chaussée sortie Schuman vers Rue de la Loi direction centre (traverse extérieure)",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3823306,
|
||||
50.8428059
|
||||
],
|
||||
[
|
||||
4.3822881,
|
||||
50.8428778
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "BERL_INT",
|
||||
"name_fr": "Bornes Schuman - Berlaymont Intérieur",
|
||||
"name_nl": "Verzinkbare palen Schuman - Berlaymont Binnen",
|
||||
"direction": "unidirectional",
|
||||
"width_m": 8.0,
|
||||
"plots_count": 4,
|
||||
"description": "Chaussée sortie Schuman vers Rue de la Loi direction centre (traverse intérieure)",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3833383,
|
||||
50.8420686
|
||||
],
|
||||
[
|
||||
4.3833951,
|
||||
50.8420506
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "FROI_OUT",
|
||||
"name_fr": "Bornes Schuman - Froissart Sortie",
|
||||
"name_nl": "Verzinkbare palen Schuman - Froissart Uitrit",
|
||||
"direction": "unidirectional",
|
||||
"width_m": 4.5,
|
||||
"plots_count": 2,
|
||||
"description": "Voie de sortie du rond-point vers la Rue Froissart (voie ouest)",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3834164,
|
||||
50.8421045
|
||||
],
|
||||
[
|
||||
4.3834732,
|
||||
50.842082
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "FROI_IN",
|
||||
"name_fr": "Bornes Schuman - Froissart Entrée",
|
||||
"name_nl": "Verzinkbare palen Schuman - Froissart Inrit",
|
||||
"direction": "unidirectional",
|
||||
"width_m": 4.5,
|
||||
"plots_count": 2,
|
||||
"description": "Voie d'entrée dans le rond-point depuis la Rue Froissart (voie est)",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3841191,
|
||||
50.8418437
|
||||
],
|
||||
[
|
||||
4.3841759,
|
||||
50.8418571
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "OUD_OUT",
|
||||
"name_fr": "Bornes Schuman - Auderghem Sortie",
|
||||
"name_nl": "Verzinkbare palen Schuman - Oudergem Uitrit",
|
||||
"direction": "unidirectional",
|
||||
"width_m": 4.5,
|
||||
"plots_count": 2,
|
||||
"description": "Voie de sortie du rond-point vers l'Avenue d'Auderghem (voie ouest)",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3841972,
|
||||
50.8418598
|
||||
],
|
||||
[
|
||||
4.3842611,
|
||||
50.8418751
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "OUD_IN",
|
||||
"name_fr": "Bornes Schuman - Auderghem Entrée",
|
||||
"name_nl": "Verzinkbare palen Schuman - Oudergem Inrit",
|
||||
"direction": "unidirectional",
|
||||
"width_m": 4.5,
|
||||
"plots_count": 2,
|
||||
"description": "Voie d'entrée dans le rond-point depuis l'Avenue d'Auderghem (voie est)",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
4.3828984,
|
||||
50.8424372
|
||||
],
|
||||
[
|
||||
4.3829552,
|
||||
50.8424822
|
||||
]
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSBollardSystem",
|
||||
"code": "J_LIPS",
|
||||
"name_fr": "Bornes Schuman - Justus Lipsius",
|
||||
"name_nl": "Verzinkbare palen Schuman - Justus Lipsius",
|
||||
"direction": "bidirectional",
|
||||
"width_m": 5.5,
|
||||
"plots_count": 2,
|
||||
"description": "Esplanade piétonne ouest en face du bâtiment Justus Lipsius",
|
||||
"installer": "Lowist",
|
||||
"contract": "Beliris 2.1.1.2",
|
||||
"warranty_end": "2029-09-15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
4.38605,
|
||||
50.8418702
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSGeoAsset (CCTV Camera)",
|
||||
"code": "CAM-N23-BLIJDE-INKOMSTEN",
|
||||
"name_fr": "CCTV N23 - Blijde Inkomsten",
|
||||
"name_nl": "CCTV N23 - Blijde Inkomst",
|
||||
"target_bollards": [
|
||||
"WET_235",
|
||||
"WET_SIAMU"
|
||||
],
|
||||
"description": "Caméra CCTV carrefour N23 / Blijde Inkomst avec vue sur bollards WET_235 et WET_SIAMU",
|
||||
"network": "MANBRU",
|
||||
"vms": "Genetec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
4.384162,
|
||||
50.8423381
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSGeoAsset (CCTV Camera)",
|
||||
"code": "CAM-SCHUMAN-EEAS",
|
||||
"name_fr": "CCTV Schuman - EEAS",
|
||||
"name_nl": "CCTV Schuman - EED",
|
||||
"target_bollards": [
|
||||
"EEAS_INT",
|
||||
"EEAS_EXT"
|
||||
],
|
||||
"description": "Caméra CCTV esplanade est avec vue sur bollards EEAS_INT et EEAS_EXT",
|
||||
"network": "MANBRU",
|
||||
"vms": "Genetec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
4.3824584,
|
||||
50.842743
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSGeoAsset (CCTV Camera)",
|
||||
"code": "CAM-SCHUMAN-BERLAYMONT",
|
||||
"name_fr": "CCTV Schuman - Berlaymont",
|
||||
"name_nl": "CCTV Schuman - Berlaymont",
|
||||
"target_bollards": [
|
||||
"BERL_INT",
|
||||
"BERL_EXT"
|
||||
],
|
||||
"description": "Caméra CCTV nord-ouest avec vue sur bollards BERL_INT et BERL_EXT",
|
||||
"network": "MANBRU",
|
||||
"vms": "Genetec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
4.3828842,
|
||||
50.8424103
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSGeoAsset (CCTV Camera)",
|
||||
"code": "CAM-SCHUMAN-LIPSIUS",
|
||||
"name_fr": "CCTV Schuman - Lipsius",
|
||||
"name_nl": "CCTV Schuman - Lipsius",
|
||||
"target_bollards": [
|
||||
"J_LIPS"
|
||||
],
|
||||
"description": "Caméra CCTV ouest avec vue sur bollards J_LIPS (Justus Lipsius)",
|
||||
"network": "MANBRU",
|
||||
"vms": "Genetec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
4.383523,
|
||||
50.8421854
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSGeoAsset (CCTV Camera)",
|
||||
"code": "CAM-SCHUMAN-FROISSART",
|
||||
"name_fr": "CCTV Schuman - Froissart",
|
||||
"name_nl": "CCTV Schuman - Froissart",
|
||||
"target_bollards": [
|
||||
"FROI_IN",
|
||||
"FROI_OUT"
|
||||
],
|
||||
"description": "Caméra CCTV sud-ouest avec vue sur bollards FROI_IN et FROI_OUT",
|
||||
"network": "MANBRU",
|
||||
"vms": "Genetec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
4.3841192,
|
||||
50.8421134
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSGeoAsset (CCTV Camera)",
|
||||
"code": "CAM-SCHUMAN-OUDERGEM",
|
||||
"name_fr": "CCTV Schuman - Oudergem",
|
||||
"name_nl": "CCTV Schuman - Oudergem",
|
||||
"target_bollards": [
|
||||
"OUD_IN",
|
||||
"OUD_OUT"
|
||||
],
|
||||
"description": "Caméra CCTV sud avec vue sur bollards OUD_IN et OUD_OUT",
|
||||
"network": "MANBRU",
|
||||
"vms": "Genetec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
4.3843041,
|
||||
50.8426527
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSGeoAsset (CCTV Camera)",
|
||||
"code": "CAM-SCHUMAN-KORTENBERG",
|
||||
"name_fr": "CCTV Schuman - Kortenberg",
|
||||
"name_nl": "CCTV Schuman - Kortenberg",
|
||||
"target_bollards": [],
|
||||
"description": "Caméra CCTV nord-est avec vue sur l'Avenue de Cortenbergh / Kortenberglaan",
|
||||
"network": "MANBRU",
|
||||
"vms": "Genetec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
4.3844459,
|
||||
50.8422481
|
||||
]
|
||||
},
|
||||
"properties": {
|
||||
"asset_type": "ITSGeoAsset (CCTV Camera)",
|
||||
"code": "CAM-SCHUMAN-KLEINE-WETSTRAAT",
|
||||
"name_fr": "CCTV Schuman - Kleine Wetstraat",
|
||||
"name_nl": "CCTV Schuman - Korte Wetstraat",
|
||||
"target_bollards": [
|
||||
"WET_SIAMU",
|
||||
"WET_235"
|
||||
],
|
||||
"description": "Caméra CCTV est avec vue sur la Korte Wetstraat vers l'est",
|
||||
"network": "MANBRU",
|
||||
"vms": "Genetec"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in a new issue