Changeset 202
- Timestamp:
- 08/29/08 14:50:51 (3 months ago)
- Files:
-
- trunk/core/sql/routing_topology.sql (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/core/sql/routing_topology.sql
r177 r202 25 25 SELECT 26 26 27 ST_Distance(the_geom,ST_GeomFromText( AsText?(p), _srid)) AS d, id, the_geom27 Distance(the_geom,GeometryFromText( AsText(p), _srid)) AS d, id, the_geom 28 28 29 29 INTO _r FROM vertices_tmp WHERE 30 30 31 the_geom && ST_Expand(ST_GeomFromText(AsText?(p), _srid), tolerance ) AND ST_Distance(the_geom, ST_GeomFromText(AsText?(p), _srid)) < tolerance31 the_geom && Expand(GeometryFromText(AsText(p), _srid), tolerance ) AND Distance(the_geom, GeometryFromText(AsText(p), _srid)) < tolerance 32 32 33 33 ORDER BY d LIMIT 1; IF FOUND THEN … … 37 37 ELSE 38 38 39 INSERT INTO vertices_tmp(the_geom) VALUES (S T_SetSRID(p,_srid)); _id:=lastval();39 INSERT INTO vertices_tmp(the_geom) VALUES (SetSRID(p,_srid)); _id:=lastval(); 40 40 41 41 END IF; … … 72 72 EXECUTE 'CREATE TABLE vertices_tmp (id serial)'; 73 73 74 FOR _r IN EXECUTE 'SELECT srid FROM geometry_columns WHERE f_table_name=' || quote_ident(geom_table)||';' LOOP74 FOR _r IN EXECUTE 'SELECT srid FROM geometry_columns WHERE f_table_name='''|| quote_ident(geom_table)||''';' LOOP 75 75 srid := _r.srid; 76 76 END LOOP; … … 80 80 81 81 FOR _r IN EXECUTE 'SELECT ' || quote_ident(gid_cname) || ' AS id,' 82 || ' S T_StartPoint('|| quote_ident(geo_cname) ||') AS source,'83 || ' ST_EndPoint('|| quote_ident(geo_cname) ||') as target'82 || ' StartPoint('|| quote_ident(geo_cname) ||') AS source,' 83 || ' EndPoint('|| quote_ident(geo_cname) ||') as target' 84 84 || ' FROM ' || quote_ident(geom_table) 85 85 LOOP

