[postgis-users] Fwd: cut lines with points
Pedro Costa
pedrocostaarma at sapo.pt
Thu Mar 15 05:32:41 PDT 2012
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?
thanks
Em 14-03-2012 23:58, Stephen Woodbridge escreveu:
> You might want to look at the book: "PostGIS In Action" pg 225 has a
> function to cut a linestring at point junctions.
>
> Basically, you want to take your two points and construction a line like:
>
> select astext(setsrid(makeline(pnt1, pnt2), 4326));
>
> then get a collection of pieces of myline after we subtract your new
> line from it:
>
> select astext(st_difference(myline, setsrid(makeline(pnt1, pnt2),
> 4326)));
>
> This assumes your data is int SRID:4326, change as appropriate.
>
> I have not tried this but give it a try and see how it works.
>
> -Steve W
>
> On 3/14/2012 4:59 PM, Pedro Costa wrote:
>> I forget the image...
>>
>>
>>
>> -------- Mensagem Original --------
>> Assunto: cut lines with points
>> Data: Wed, 14 Mar 2012 20:59:14 +0000
>> De: Pedro Costa <pedrocostaarma at sapo.pt>
>> <mailto:pedrocostaarma at sapo.pt>
>> Para: postgis-users at postgis.refractions.net
>> <mailto:postgis-users at postgis.refractions.net>
>>
>>
>>
>> Hello to all,
>>
>> This is my first mail to this list.
>> I have to do one thing and i need help for solving that fastly.
>> I have points and lines and I intend to cut the lines based on points.
>> Does anyone have any idea how to fix this quickly?
>>
>> Attached is a picture to illustrate the problem.
>>
>> thank you
>>
>> Pedro
>>
>>
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list