[GRASS-dev] v.segment - creating points functionality in pygrass?

Helmut Kudrnovsky hellik at web.de
Mon Oct 10 12:47:11 PDT 2016


hi devs,

in the docs I've found some hints [1] how to create a segment along a line:


segment(start, end)[source]

    Create line segment. using the Vect_line_segment C function.
    Parameters:	

        start (float) – distance from the begining of the line where the
segment start
        end (float) – distance from the begining of the line where the
segment end

    ::

        # x (1, 1) # | # |- # | # x——–x (1, 0) # (0, 0) ^

        >>> line = Line([(0, 0), (1, 0), (1, 1)])
        >>> line.segment(0.5, 1.5)         
        Line([Point(0.500000, 0.000000),
              Point(1.000000, 0.000000),
              Point(1.000000, 0.500000)])

is there something similar pygrass fns to create segment points along a line
like in v.segment [2]?

[1]
https://grass.osgeo.org/grass70/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Line.segment
[2] https://grass.osgeo.org/grass73/manuals/v.segment.html



-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/v-segment-creating-points-functionality-in-pygrass-tp5290094.html
Sent from the Grass - Dev mailing list archive at Nabble.com.


More information about the grass-dev mailing list