[Qgis-developer] split line at specified distance

Pedro VenĂ¢ncio pedrongvenancio at gmail.com
Wed Jan 25 13:32:28 PST 2017


This is, in fact, a long awaited feature. It is/was present in the Sextante
version used by gvSIG:

"""
Split lines with points layer

Description
  Parameters
   - Capa_de_lineas[Vector layer - Line]:
   - Points layer[Vector layer - Point]:
   - Tolerance[Numerical value]:
   - Method[Selection]:

  Outputs
   - Split lines[Vector layer - Line]:

Command line
Usage: runalg( "splitlineswithpoints",
                LINES[Vector Layer],
                POINTS[Vector Layer],
                TOLERANCE[Numerical Value],
                METHOD[Selection],
                RESULT[output vector layer],
              );
"""

but was never ported to QGIS Processing.

Is has, at least, two feature requests for that:
https://hub.qgis.org/issues/5040
https://hub.qgis.org/issues/9469

Giovanni, maybe you can update your feature request for a future version,
raising the priority.

Thanks!

Best regards,
Pedro VenĂ¢ncio






2017-01-25 9:32 GMT+00:00 Giovanni Manghi <giovanni.manghi at gmail.com>:

> Hi Pierluigi, buongiorno
>
> > I have some difficulties to figure out how to split line at specific
> distance from the beginning.
> > I need to split a single line into several lines at specific distances.
> >
> >
> > I'm able to get the point at specific distance using the intersection
> function of QgsGeometry but I'm in trouble on how to create the new
> geometry.
> > I looked at the split function but I'm not sure it could help me.
> >
> >
> > Do you have some code to share on how to split a line into several lines
> at specified distances?
>
> doing this operation the postgis/spatialite way is tricky because the
> st_split function won't work if you don't have a node/vertex where you
> need do the split. See for example this workflow
>
> https://mygisnotes.wordpress.com/2017/01/01/split-lines-
> with-points-the-postgis-way/
>
> I had to use it (does not means that is the best way) to solve a
> specific problem here. I used PostGIS because in QGIS/Processing do
> not seems there is yet any tool (not even in external providers? I
> maybe wrong, I just could not find any) that allow do this operation.
>
> cheers!
>
> -- Giovanni --
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170125/29bd6c2b/attachment.html>


More information about the Qgis-developer mailing list