File tree Expand file tree Collapse file tree 6 files changed +35
-17
lines changed
airflow/include/sql/sparte
public_data/models/urbanisme Expand file tree Collapse file tree 6 files changed +35
-17
lines changed Original file line number Diff line number Diff line change 1+ {% macro standardize_friche_type(friche_type) %}
2+ CASE
3+ WHEN {{ friche_type }} = ' friche cultuelle' THEN ' friche culturelle'
4+ ELSE {{ friche_type }}
5+ END
6+ {% endmacro %}
Original file line number Diff line number Diff line change 1+ {% macro standardize_friche_zonage_environnemental(friche_zonage_environnemental) %}
2+ CASE
3+ WHEN {{ friche_zonage_environnemental }} = ' proximite_zone (reserves_naturelles)' THEN ' Proche d' ' une réserve naturelle'
4+ WHEN {{ friche_zonage_environnemental }} = ' reserve_naturelle' THEN ' Réserve naturelle'
5+ WHEN {{ friche_zonage_environnemental }} = ' natura_2000' THEN ' Natura 2000'
6+ WHEN {{ friche_zonage_environnemental }} = ' hors zone' THEN ' Hors zone'
7+ WHEN {{ friche_zonage_environnemental }} = ' znieff' THEN ' ZNIEFF'
8+ WHEN {{ friche_zonage_environnemental }} = ' proximite_zone (znieff)' THEN ' Proche d' ' une ZNIEFF'
9+ WHEN {{ friche_zonage_environnemental }} = ' proximite_zone (natura_2000)' THEN ' Proche d' ' une zone Natura 2000'
10+ ELSE {{ friche_zonage_environnemental }}
11+ END
12+ {% endmacro %}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ with without_surface as (
1212SELECT
1313 site_id,
1414 site_nom,
15- site_type as friche_type,
15+ {{ standardize_friche_type( ' site_type' ) }} as friche_type,
1616 site_adresse,
1717 site_identif_date,
1818 site_actu_date,
8282 monuhisto,
8383 monuhisto500,
8484 emprise_sol_bati,
85- zonage_enviro as friche_zonage_environnemental,
85+ {{ standardize_friche_zonage_environnemental( ' zonage_enviro' ) }} as friche_zonage_environnemental,
8686 site_statut as friche_statut,
8787 long,
8888 lat,
Original file line number Diff line number Diff line change @@ -37,13 +37,13 @@ models:
3737 - not_null
3838 - accepted_values :
3939 values : [
40- ' proximite_zone (reserves_naturelles) ' ,
41- ' reserve_naturelle ' ,
42- ' natura_2000 ' ,
43- ' hors zone' ,
44- ' znieff ' ,
45- ' proximite_zone (znieff) ' ,
46- ' proximite_zone (natura_2000) '
40+ " proche d''une réserve naturelle " ,
41+ " réserve naturelle " ,
42+ " natura 2000 " ,
43+ " hors zone" ,
44+ " ZNIEFF " ,
45+ " proche d''une ZNIEFF " ,
46+ " proche d''une zone Natura 2000 "
4747 ]
4848 - name : friche_type_zone
4949 data_tests :
@@ -69,7 +69,7 @@ models:
6969 ' autre' ,
7070 ' mixte' ,
7171 ' friche enseignement' ,
72- ' friche cultuelle ' , # TODO : faire retour à Cartofriches
72+ ' friche culturelle ' ,
7373 ' inconnu' ,
7474 ' friche portuaire' ,
7575 ' friche carrière ou mine' ,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class FricheTypeChoices(models.TextChoices):
1616 AUTRE = ("autre" ,)
1717 MIXTE = ("mixte" ,)
1818 FRICHE_ENSEIGNEMENT = "friche enseignement"
19- FRICHE_CULTURELLE = "friche cultuelle "
19+ FRICHE_CULTURELLE = "friche culturelle "
2020 INCONNU = "inconnu"
2121 FRICHE_PORTUAIRE = "friche portuaire"
2222 FRICHE_CARRIERE_MINE = "friche carrière ou mine"
Original file line number Diff line number Diff line change 99
1010class LandFricheZonageEnvironnementale (BaseLandFriche ):
1111 class ZonageEnvironnementalChoices (models .TextChoices ):
12- PROXIMITE_ZONE_RESERVE_NATURELLE = "proximite_zone (reserves_naturelles) "
13- RESERVE_NATURELLE = "reserve_naturelle "
14- NATURA_2000 = "natura_2000 "
12+ PROXIMITE_ZONE_RESERVE_NATURELLE = "proche d'une réserve naturelle "
13+ RESERVE_NATURELLE = "réserve naturelle "
14+ NATURA_2000 = "natura 2000 "
1515 HORS_ZONE = "hors zone"
16- ZNIEFF = "znieff "
17- PROXIMITE_ZONE_ZNIEFF = "proximite_zone (znieff) "
18- PROXIMITE_ZONE_NATURA_2000 = "proximite_zone (natura_2000) "
16+ ZNIEFF = "ZNIEFF "
17+ PROXIMITE_ZONE_ZNIEFF = "proche d'une ZNIEFF "
18+ PROXIMITE_ZONE_NATURA_2000 = "proche d'une zone Natura 2000 "
1919
2020 friche_zonage_environnemental = models .CharField (choices = ZonageEnvironnementalChoices .choices )
2121
You can’t perform that action at this time.
0 commit comments