!!=====================================================================================
!! Kanton Zürich 
!! Baudirektion Kanton Zürich
!! Amt für Raumentwicklung
!! Abteilung Geoinformation
!! Stampfenbachstrasse 12
!! 8090 Zürich
!!
!! www.geoportal.zh.ch
!!
!! Geobasisdatensatz Nr. 74-ZH   Stand der Erschliessung
!!
!! Transfermodell
!!===================================================================================== 
!! Revision History
!!
!! 2024.01.18/gat Initialversion
!!===================================================================================== 

INTERLIS 2.3;

!!@ GeoLion="https://geolion.zh.ch/geodatensatz/show?nbid=3219"

MODEL Stand_der_Erschliessung_ZH_V1_LV95 (de)
   AT "http://models.geo.zh.ch" VERSION "2023-02-09"  =
   IMPORTS UNQUALIFIED INTERLIS;  
   IMPORTS UNQUALIFIED Basis_ZH_V1_LV95;

   DOMAIN

   TOPIC UbEs =

      DOMAIN

         !!@ comment="Topic Domains Ueberbauung und Erschliessung";
         UbEsABC =   	(B,
                         S,
                         FJ,
                         XJ,
                         TR);

         UbEsNBC =	1 .. 11;
										 
		 UbEsBCLAB =	(Ueberbaut,
						 Sofort_baureif,
						 Baureif_in_5_Jahren,
						 Laengerfristig_baureif,
						 Technischer_Rest);


      !!@ comment="====================================================================";      

      !!@ comment="Klasse Ueberbauung und Erchliessungs Stand";      
      CLASS UbEsStand = 

         !!@ comment="Gemeindenummer Bundesamt für Statistik (BFS)";      
         BFSNR                         : MANDATORY ZHBfsNummer;

         !!@ comment="Gemeindename";      
         GEMEINDE	                   : MANDATORY TEXT*80;

         !!@ comment="Alphanummerischer Code des Überbauungs- und Erschliessungsstand";
         ABC  						   : MANDATORY UbEsABC;

         !!@ comment="Nummerischer Code Überbauungs- und Erschliessungsstand";
         NBC       					   : MANDATORY UbEsNBC;

         !!@ comment="Bezeichnung des Überbauungs- und Erschliessungsstand";
         BCLAB       				   : MANDATORY UbEsBCLAB;

         !!@ comment="Jahresendstand";
         STAND                	       : MANDATORY ZHJahr;

         !!@ comment="Flaechengeometrie";
         Geometrie                     : MANDATORY ZHFlaeche2D;

		 !!@ comment="erlaubte Kombinationen von ABC, NBC und BCLAB";
		 MANDATORY CONSTRAINT ( (ABC == #B AND NBC == 1 AND BCLAB == #Ueberbaut) OR
					(ABC == #S AND NBC == 2 AND BCLAB == #Sofort_baureif) OR
					(ABC == #FJ AND NBC == 3 AND BCLAB == #Baureif_in_5_Jahren) OR
					(ABC == #XJ AND NBC == 4 AND BCLAB == #Laengerfristig_baureif) OR
					(ABC == #TR AND NBC == 11 AND BCLAB == #Technischer_Rest) );
					
      END UbEsStand;

   END UbEs;

END Stand_der_Erschliessung_ZH_V1_LV95.

