From: Sandro Santilli Date: Mon, 28 Feb 2011 18:14:24 +0000 (+0000) Subject: Use left_face/right_face when looking for face ring's edges. I've seen some areal... X-Git-Tag: 2.0.0alpha1~1928 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70b953e2b6a6a6d9180921b429392fded981fea8;p=postgis Use left_face/right_face when looking for face ring's edges. I've seen some areal TopoGeometries dumped in 1:76 of the time [RT-SIGTA] git-svn-id: http://svn.osgeo.org/postgis/trunk@6873 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/topology/sql/gml.sql b/topology/sql/gml.sql index d6784cdab..83a458001 100644 --- a/topology/sql/gml.sql +++ b/topology/sql/gml.sql @@ -210,10 +210,11 @@ BEGIN || quote_literal(bounds::text) || ', ST_Line_Interpolate_Point(e.geom, 0.2)) as pos FROM ' || quote_ident(toponame) - || '.edge e WHERE ST_Covers(' + || '.edge e WHERE ( e.left_face = ' || face_id + || ' OR e.right_face = ' || face_id + || ') AND ST_Covers(' || quote_literal(bounds::text) || ', e.geom) ORDER BY pos' - -- TODO: add left_face/right_face to the conditional, to reduce load LOOP gml = gml || '<' || nsprefix || 'directedEdge';