 			ST_AREA(dis.geom)/10000 AS area_ha,
 			COUNT(sub.geom)::integer AS subst_sum,
 			GeometryType(dis.geom) ::text AS geom_type
-		FROM	model_draft.ego_grid_mv_griddistrict_new AS dis,
+		FROM	model_draft.ego_grid_mv_griddistrict AS dis,
 			model_draft.ego_grid_hvmv_substation AS sub
 		WHERE  	dis.geom && sub.geom AND
 			ST_CONTAINS(dis.geom,sub.geom)
 		GROUP BY dis.subst_id
 		)AS t2
 	WHERE  	t1.subst_id = t2.subst_id;
+ */
+/* -- Clean Polygons and Snap to Grid
+UPDATE 	model_draft.ego_grid_mv_griddistrict AS t1
+	SET  	geom = t2.geom
+	FROM	(SELECT	dis.subst_id,
+			ST_SnapToGrid(ST_MULTI(ST_BUFFER(ST_BUFFER(dis.geom,0.1),-0.1)),1) ::geometry(MultiPolygon,3035) AS geom
+		FROM	model_draft.ego_grid_mv_griddistrict AS dis
+		)AS t2
+	WHERE  	t1.subst_id = t2.subst_id; */
 
 /* 
 -- Validate (geom)
-DROP VIEW IF EXISTS	model_draft.ego_grid_mv_griddistrict_new_error_geom_view CASCADE;
-CREATE VIEW		model_draft.ego_grid_mv_griddistrict_new_error_geom_view AS
+DROP VIEW IF EXISTS	model_draft.ego_grid_mv_griddistrict_error_geom_view CASCADE;
+CREATE VIEW		model_draft.ego_grid_mv_griddistrict_error_geom_view AS
 	SELECT	test.id,
 		test.error,
 		reason(ST_IsValidDetail(test.geom)) AS error_reason,

		GROUP BY dis.subst_id
		)AS t2
	WHERE  	t1.subst_id = t2.subst_id;

/* -- Clean Polygons and Snap to Grid
UPDATE 	model_draft.ego_grid_mv_griddistrict AS t1
	SET  	geom = t2.geom
	FROM	(SELECT	dis.subst_id,
			ST_SnapToGrid(ST_MULTI(ST_BUFFER(ST_BUFFER(dis.geom,0.1),-0.1)),1) ::geometry(MultiPolygon,3035) AS geom
		FROM	model_draft.ego_grid_mv_griddistrict AS dis
		)AS t2
	WHERE  	t1.subst_id = t2.subst_id; */

-- ego scenario log (version,io,schema_name,table_name,script_name,comment)
SELECT ego_scenario_log('v0.2.5','output','model_draft','ego_grid_mv_griddistrict','ego_dp_mv_griddistrict.sql',' ');

		SELECT	source.subst_id AS id,				-- PK
			ST_IsValid(source.geom) AS error,
			source.geom AS geom
		FROM	model_draft.ego_grid_mv_griddistrict AS source	-- Table
		) AS test
	WHERE	test.error = FALSE;

-- grant (oeuser)
GRANT ALL ON TABLE	model_draft.ego_grid_mv_griddistrict_error_geom_view TO oeuser WITH GRANT OPTION;
ALTER TABLE		model_draft.ego_grid_mv_griddistrict_error_geom_view OWNER TO oeuser;

-- Drop empty view   (OK!) -> 100ms =1
SELECT f_drop_view('{ego_grid_mv_griddistrict_error_geom_view}', 'model_draft'); 
*/

/* -- dump
DROP TABLE IF EXISTS	model_draft.ego_grid_mv_griddistrict_new_dump CASCADE;
CREATE TABLE         	model_draft.ego_grid_mv_griddistrict_new_dump (
	id		serial,
