[postgis-users] st_split

franco base frenk.calza at gmail.com
Mon Oct 28 10:49:10 PDT 2013


Hi don't think to st_contains because

SELECT line,point, ST_Line_Locate_Point(geom_line, geom_point)

give this otput:

7646;11764;0.0983820617751394
7646;11769;0.962087766284734
7646;11762;0.231570267802357



2013/10/28 Rémi Cura <remi.cura at gmail.com>

> You may want to split not with point but with the projected point one line
> (use http://postgis.refractions.net/docs/ST_ClosestPoint.html)
> If it is not enough, you may want to translate all your geometries to
> reduce the number of digits in coordinates.
> Another possibility is to use ST_Snap to snap line to point (won't work
> the other way)
>
> Cheers,
> Rémi-C
>
>
> 2013/10/28 Nicolas Ribot <nicolas.ribot at gmail.com>
>
>> Hi,
>>
>> The points are not on the line, probably due to rounding errors.
>>
>> st_contains(line, point) returns false.
>>
>> Nicolas
>>
>> On 28 October 2013 18:07, franco base <frenk.calza at gmail.com> wrote:
>> > Hi.
>> > I have a set of linestring and point on linestring.
>> > I want cut the linestring on the point.
>> > I can have n points for one linestring,
>> > so I use ST_Split
>> > (insted of ST_Line_Interpolate_Point and ST_Line_Substring)
>> > but it doesn't work.
>> >
>> > line;geom_line;point;geom_point
>> >
>> 7646;"0102000020BB0B000006000000A4703D0A471F37412D211F04AF335341FAEDEBE0491F3741325530C2AE335341BD5296014F1F37418FC2F578AE3353414694F606521F3741D2DEE07BAE3353412D211F74541F37418FC2F578AE33534123B9FC675020374112143FF6BC335341";11764;"0101000020BB0B00005713362F611F37410D996234AF335341"
>> >
>> 7646;"0102000020BB0B000006000000A4703D0A471F37412D211F04AF335341FAEDEBE0491F3741325530C2AE335341BD5296014F1F37418FC2F578AE3353414694F606521F3741D2DEE07BAE3353412D211F74541F37418FC2F578AE33534123B9FC675020374112143FF6BC335341";11769;"0101000020BB0B00005EF0DD584620374139BF2762BC335341"
>> >
>> 7646;"0102000020BB0B000006000000A4703D0A471F37412D211F04AF335341FAEDEBE0491F3741325530C2AE335341BD5296014F1F37418FC2F578AE3353414694F606521F3741D2DEE07BAE3353412D211F74541F37418FC2F578AE33534123B9FC675020374112143FF6BC335341";11762;"0101000020BB0B0000A5CBC785841F374156A2A33CB1335341"
>> >
>> > ST_GeometryType(St_Split(geom_line, geom_point))
>> > give "ST_GeometryCollection"
>> >
>> > but
>> >
>> > (ST_Dump(ST_Split(geom_line, geom_point))).geom
>> >
>> > return only 3 linestring (one for record) and the geometry is egual to
>> > geom_line
>> >
>> >
>> > thanks.
>> >
>> > fb
>> >
>> > _______________________________________________
>> > postgis-users mailing list
>> > postgis-users at lists.osgeo.org
>> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20131028/59e33280/attachment.html>


More information about the postgis-users mailing list