On 15 March 2012 13:32, Pedro Costa <pedrocostaa...@sapo.pt> wrote: > I tried with the function of example, removing only the part "AND NOT > ST_Intersects(ST_Boundary(..." > because I want the line also be cut ifintersected. > > After I did so: > > create table teste9 as > SELECT upgis_cutlineatpoints(passeios.the_geom, > rebaixamentos_peoes.the_geom, 50 ) > FROM passeios CROSS JOIN rebaixamentos_peoes > > > But did not result simply created thousands of lines of overlapping lines > that already existed in table 'passeios'. > > Can anybody help me to resolve this? >
Hi, You could try to cut the lines by yourself: • Creates lines from points near to lines • Group these lines by line id (one multiobject by line to cut) • Difference these lines with the input lines, explode the result to see elementary linestrings: (here, query finds points closer to 150 units from the lines). with cutters as ( select l.id, st_collect(st_makeline(p1.geometry, p2.geometry)) as geom from points p1, points p2, lines l where p1.id <> p2.id and st_dwithin(p1.geometry, l.geometry, 150) and st_dwithin(p2.geometry, l.geometry, 150) and st_dwithin(p1.geometry, p2.geometry, 300) group by l.id ) select distinct l.id, (st_dump(st_difference(l.geometry, c.geom))).geom from cutters c, lines l where st_intersects(l.geometry, c.geom); Nicolas
<<attachment: Screen shot 2012-03-16 at 4.45.05 PM.png>>
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users