 
 -- Check for sources
 	SELECT	dea.source
-	FROM 	supply.ego_res_powerplant AS dea
+	FROM 	model_draft.ego_supply_res_powerplant_2050 AS dea
 	GROUP BY dea.source
 
 -- Flag BNetzA

			ST_CONTAINS(gd.geom,dea.geom)
		) AS t2
	WHERE  	t1.id = t2.id;

-- flag reset
UPDATE 	model_draft.ego_supply_rea_2050 AS dea
	SET	flag = NULL,

﻿/*
Skript to allocate decentralized renewable power plants (dea)
Methods base on technology and voltage level
Uses different lattice from setup_ego_wpa_per_grid_district.sql
