]> granicus.if.org Git - postgis/commitdiff
Update load_topology.sql to properly set MBR field of faces.
authorSandro Santilli <strk@keybit.net>
Mon, 23 May 2011 11:30:44 +0000 (11:30 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 23 May 2011 11:30:44 +0000 (11:30 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7210 b70326c6-7e19-0410-871a-916f4a2858ee

topology/test/load_topology.sql.in
topology/test/regress/st_addedgenewfaces_expected

index 4a7d315bd2efadaeb50207023cbab761b1fc8400..866f8a9418b8e4c4f69da5b086e96bb9c2d7a999 100644 (file)
@@ -193,5 +193,8 @@ INSERT INTO city_data.edge VALUES(26, 20, 20, 26, -26, 9, 1,
 -- UPDATE Edge id sequence
 SELECT setval('city_data.edge_data_edge_id_seq', 26);
 
+-- Set face minimum bounding rectangle
+UPDATE city_data.face set mbr = ST_SetSRID( ( select st_extent(geom) from city_data.edge where left_face = face_id or right_face = face_id ), @SRID@ ) where face_id != 0;
+
 END;
 
index 6402df8c4f3ca0e4201e9ef38dd32bfea1584111..a53f10928f3cdc9d508bb23d8d590e9fd1cb1e0b 100644 (file)
@@ -85,8 +85,8 @@ T18|E43|-44|44|33|0
 F3,F4|{3:10,3:11,3:23,3:24,3:25}
 F5,N4|{1:4,3:12,3:13}
 F0|
-F1|
-F9|
+F1|POLYGON((3 30,3 38,16 38,16 30,3 30))
+F9|POLYGON((4 31,4 34,7 34,7 31,4 31))
 F10|POLYGON((21 14,21 22,35 22,35 14,21 14))
 F11|POLYGON((21 14,21 22,35 22,35 14,21 14))
 F12|POLYGON((35 14,35 22,47 22,47 14,35 14))