 			ST_CONTAINS(gd.geom,dea.geom)
 		) AS t2
 	WHERE  	t1.id = t2.id;
-
+-- Hier weiter --
 -- flag reset
 UPDATE 	model_draft.ego_supply_rea_2050 AS dea
 	SET	flag = NULL,


*/

-- number of grid_district -> 3606
	SELECT	COUNT(*)
	FROM	 model_draft.ego_grid_mv_griddistrict;


SELECT ego_scenario_log('v0.2.3','input','supply','ego_res_powerplant','ego_rea_2050_setup.sql',' ');

-- insert DEA, with no geom excluded
INSERT INTO model_draft.ego_supply_rea_2050 (id, electrical_capacity, generation_type, generation_subtype, voltage_level, source, geom)
	SELECT	id, electrical_capacity, generation_type, generation_subtype, voltage_level, source, ST_TRANSFORM(geom,3035)
	FROM	model_draft.ego_supply_res_powerplant_2050
	WHERE	geom IS NOT NULL;

-- index GIST (geom)
