Index: trunk/umn/alkis/alkis_muster_entw.map
===================================================================
--- trunk/umn/alkis/alkis_muster_entw.map	(revision 330)
+++ trunk/umn/alkis/alkis_muster_entw.map	(revision 335)
@@ -24,4 +24,5 @@
 # 2014-08-25 F.J. krz  StraÃennamen als P- und L-Variante, hinter "ap_pto_stra" neuer Layer "ap_lto_stra"
 # 2014-08-29 F.J. krz: Umstellung auf Version 0.8 - Datenbankname, Titel
+# 2014-09-15 F.J. krz: Filter fÃŒr Historische Objekte "WHERE endet IS NULL" in DATA fÃŒr Tabellen ax_*
 
 ###
@@ -75,10 +76,10 @@
 	FONTSET "fonts/fonts_alkis.fnt"
 	UNITS METERS
-	#CONFIG "MS_ERRORFILE" "/opt/gdi/log/umn.log" # Nur fuer Test
+	#CONFIG "MS_ERRORFILE" "/opt/gdi/log/umn.log"
 	#DEBUG 3
 	WEB
 		METADATA
 			wms_title "ALKIS_" # TEST-Kennung im Title
-			ows_abstract "ALKIS - Konverter PostNAS Version 0.8, Mapfile Entwicklungs-Version vom August 2014"
+			ows_abstract "ALKIS - Konverter PostNAS Version 0.8, Mapfile Entwicklungs-Version vom September 2014"
 			ows_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
 			ows_encoding "UTF-8"
@@ -446,5 +447,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_wohnbauflaeche) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_wohnbauflaeche WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -474,5 +475,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_industrieundgewerbeflaeche) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_industrieundgewerbeflaeche WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -503,5 +504,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry  FROM ax_halde) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_halde WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -529,5 +530,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_bergbaubetrieb) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_bergbaubetrieb WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -554,5 +555,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_tagebaugrubesteinbruch) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_tagebaugrubesteinbruch WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -581,5 +582,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_flaechegemischternutzung) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_flaechegemischternutzung WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -610,5 +611,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_flaechebesondererfunktionalerpraegung) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_flaechebesondererfunktionalerpraegung WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -637,5 +638,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_sportfreizeitunderholungsflaeche) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_sportfreizeitunderholungsflaeche WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -665,5 +666,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_friedhof) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_friedhof WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -694,5 +695,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_strassenverkehr) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_strassenverkehr WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -754,5 +755,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_weg) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_weg WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -781,5 +782,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_platz) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_platz WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -816,5 +817,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_bahnverkehr) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_bahnverkehr WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -844,5 +845,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_flugverkehr) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_flugverkehr WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -872,5 +873,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_schiffsverkehr) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_schiffsverkehr WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -900,5 +901,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, vegetationsmerkmal, wkb_geometry FROM ax_landwirtschaft) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, vegetationsmerkmal, wkb_geometry FROM ax_landwirtschaft WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -947,5 +948,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_wald) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_wald WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -973,5 +974,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_gehoelz) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_gehoelz WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -999,5 +1000,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_heide) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_heide WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1026,5 +1027,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_moor) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_moor WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1052,5 +1053,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_sumpf) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_sumpf WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1078,5 +1079,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_unlandvegetationsloseflaeche) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_unlandvegetationsloseflaeche WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1104,5 +1105,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_vegetationsmerkmal) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_vegetationsmerkmal WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1130,5 +1131,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_fliessgewaesser) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_fliessgewaesser WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1156,5 +1157,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_hafenbecken) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_hafenbecken WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1182,5 +1183,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_stehendesgewaesser) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_stehendesgewaesser WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1213,5 +1214,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_untergeordnetesgewaesser WHERE st_geometrytype(wkb_geometry) = 'ST_Polygon') as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_untergeordnetesgewaesser WHERE st_geometrytype(wkb_geometry) = 'ST_Polygon' AND endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1274,5 +1275,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_untergeordnetesgewaesser WHERE st_geometrytype(wkb_geometry) = 'ST_LineString') as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, funktion, wkb_geometry FROM ax_untergeordnetesgewaesser WHERE st_geometrytype(wkb_geometry) = 'ST_LineString' AND endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1462,5 +1463,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, gebaeudefunktion, lagezurerdoberflaeche, hochhaus, zustand, ax_datenerhebung, wkb_geometry FROM ax_gebaeude) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, gebaeudefunktion, lagezurerdoberflaeche, hochhaus, zustand, ax_datenerhebung, wkb_geometry FROM ax_gebaeude WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -1813,5 +1814,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, gebaeudefunktion, lagezurerdoberflaeche, hochhaus, zustand, ax_datenerhebung, wkb_geometry FROM ax_gebaeude) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, gebaeudefunktion, lagezurerdoberflaeche, hochhaus, zustand, ax_datenerhebung, wkb_geometry FROM ax_gebaeude WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2026,5 +2027,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauart, lagezurerdoberflaeche, wkb_geometry FROM ax_bauteil) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauart, lagezurerdoberflaeche, wkb_geometry FROM ax_bauteil WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2087,5 +2088,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, beschaffenheit, wkb_geometry FROM ax_besonderegebaeudelinie) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, beschaffenheit, wkb_geometry FROM ax_besonderegebaeudelinie WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2267,5 +2268,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkimverkehrsbereich) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkimverkehrsbereich WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2296,5 +2297,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkimverkehrsbereich) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkimverkehrsbereich WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2326,5 +2327,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkimgewaesserbereich) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkimgewaesserbereich WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2353,5 +2354,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkoderanlagefuerindustrieundgewerbe) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkoderanlagefuerindustrieundgewerbe WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	FILTER "st_geometrytype(wkb_geometry) = 'ST_Polygon'" # sonst Absturz Mapserver
 	METADATA
@@ -2392,5 +2393,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkoderanlagefuersportfreizeitunderholung) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_bauwerkoderanlagefuersportfreizeitunderholung WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2420,5 +2421,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_vorratsbehaelterspeicherbauwerk) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_vorratsbehaelterspeicherbauwerk WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2477,5 +2478,5 @@
 # 1750;"Denkmal, Denkstein, Standbild"
 
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_sonstigesbauwerkodersonstigeeinrichtung WHERE st_geometrytype(wkb_geometry) = 'ST_Polygon') as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_sonstigesbauwerkodersonstigeeinrichtung WHERE st_geometrytype(wkb_geometry) = 'ST_Polygon' AND endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	#ILTER "bauwerksfunktion in (1610,1781) AND st_geometrytype(wkb_geometry) = 'ST_Polygon'"
 	#FILTER "st_geometrytype(wkb_geometry) = 'ST_Polygon'" # sonst Absturz Mapserver
@@ -2529,5 +2530,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_sonstigesbauwerkodersonstigeeinrichtung WHERE st_geometrytype(wkb_geometry) = 'ST_LineString') as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_sonstigesbauwerkodersonstigeeinrichtung WHERE st_geometrytype(wkb_geometry) = 'ST_LineString' AND endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	#FILTER "st_geometrytype(wkb_geometry) = 'ST_LineString'" # sonst Absturz Mapserver
 	METADATA
@@ -2559,5 +2560,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, spannungsebene, wkb_geometry FROM ax_leitung) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, spannungsebene, wkb_geometry FROM ax_leitung WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2597,5 +2598,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, lagezurerdoberflaeche, wkb_geometry  FROM ax_transportanlage) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, lagezurerdoberflaeche, wkb_geometry FROM ax_transportanlage WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2642,5 +2643,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_turm) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, bauwerksfunktion, wkb_geometry FROM ax_turm WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2905,5 +2906,5 @@
 #	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 #	PROCESSING "CLOSE_CONNECTION=DEFER"
-#	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_grablochderbodenschaetzung) as foo using unique ogc_fid using SRID=25832"
+#	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_grablochderbodenschaetzung WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 #	METADATA
 #		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2933,5 +2934,5 @@
 #	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 #	PROCESSING "CLOSE_CONNECTION=DEFER"
-#	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_musterlandesmusterundvergleichsstueck) as foo using unique ogc_fid using SRID=25832"
+#	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_musterlandesmusterundvergleichsstueck WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 #	METADATA
 #		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -2962,7 +2963,7 @@
 	PROCESSING "CLOSE_CONNECTION=DEFER"
 	# mit Feldern fuer klassisches Template:
-	#  DATA "wkb_geometry from (SELECT ogc_fid, gml_id, flurstueckskennzeichen, amtlicheflaeche, wkb_geometry FROM ax_flurstueck) as foo using unique ogc_fid using SRID=25832"
+	#  DATA "wkb_geometry from (SELECT ogc_fid, gml_id, flurstueckskennzeichen, amtlicheflaeche, wkb_geometry FROM ax_flurstueck WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	# reduzierte Felder: nur 'gml_id' fuer Inlay, und geometry fuer Karte
-	DATA "wkb_geometry from (SELECT ogc_fid, gml_id, wkb_geometry FROM ax_flurstueck) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, gml_id, wkb_geometry FROM ax_flurstueck WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -3391,5 +3392,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, artderfestlegung, wkb_geometry FROM ax_klassifizierungnachstrassenrecht) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, artderfestlegung, wkb_geometry FROM ax_klassifizierungnachstrassenrecht WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -3433,5 +3434,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry  FROM ax_naturumweltoderbodenschutzrecht) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry  FROM ax_naturumweltoderbodenschutzrecht WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -3461,5 +3462,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry  FROM ax_anderefestlegungnachwasserrecht) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_anderefestlegungnachwasserrecht WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -3495,14 +3496,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-
-	# Tabelle (Standard-Template)
-	#DATA "wkb_geometry from (SELECT ogc_fid, gml_id, artderfestlegung, name, bezeichnung, stelle, wkb_geometry FROM ax_bauraumoderbodenordnungsrecht) as foo using unique ogc_fid using SRID=25832"
-
-	# Tabelle (Template mit Inlay, gkz als Parameter fuer DB-Zugriff uebergeben)
-	#DATA "wkb_geometry from (SELECT ogc_fid, gml_id, artderfestlegung, wkb_geometry, *gkz* as gkz FROM ax_bauraumoderbodenordnungsrecht) as foo using unique ogc_fid using SRID=25832"
-
-	# Tabelle (Template mit Inlay, gkz im Namen des Templat)
-	DATA "wkb_geometry from (SELECT ogc_fid, gml_id, artderfestlegung, wkb_geometry FROM ax_bauraumoderbodenordnungsrecht) as foo using unique ogc_fid using SRID=25832"
-
+	DATA "wkb_geometry from (SELECT ogc_fid, gml_id, artderfestlegung, wkb_geometry FROM ax_bauraumoderbodenordnungsrecht WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -3691,5 +3683,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_denkmalschutzrecht) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_denkmalschutzrecht WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -3717,5 +3709,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, artderfestlegung, wkb_geometry FROM ax_sonstigesrecht) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, artderfestlegung, wkb_geometry FROM ax_sonstigesrecht WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -3793,5 +3785,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_punktortag) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_punktortag WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
@@ -3822,5 +3814,5 @@
 	CONNECTION "host=10.0.100.73 dbname=alkis08*gkz* user=ms6 port=5432"
 	PROCESSING "CLOSE_CONNECTION=DEFER"
-	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_punktortau) as foo using unique ogc_fid using SRID=25832"
+	DATA "wkb_geometry from (SELECT ogc_fid, wkb_geometry FROM ax_punktortau WHERE endet IS NULL) as foo using unique ogc_fid using SRID=25832"
 	METADATA
 		wms_srs "EPSG:25832 EPSG:31467 EPSG:4326 EPSG:54004"
