 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, postcode, source, geom)
-	SELECT	id, electrical_capacity, generation_type, generation_subtype, voltage_level, postcode, source, ST_TRANSFORM(geom,3035)
-	FROM	supply.ego_res_powerplant
+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)

/*
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


-- Check for sources
	SELECT	dea.source
	FROM 	model_draft.ego_supply_res_powerplant_2050 AS dea
	GROUP BY dea.source

-- Flag BNetzA
