Skip to content

v.fixed.segmentpoints

segment points along a vector line with fixed distances

v.fixed.segmentpoints vector=name cat=integer dir=name prefix=prefix [distance=integer] [--verbose] [--quiet] [--qq] [--ui]

Example:

v.fixed.segmentpoints vector=name cat=integer dir=name prefix=prefix

grass.script.run_command("v.fixed.segmentpoints", vector, cat, dir, prefix, distance=100, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("v.fixed.segmentpoints", vector="name", cat=integer, dir="name", prefix="prefix")

Parameters

vector=name [required]
    Name of input vector map
    Or data source for direct OGR access
cat=integer [required]
    Category of a vector line
dir=name [required]
    Directory where the output will be found
prefix=prefix [required]
    output prefix (must start with a letter)
distance=integer
    fixed distance between segment points
    Default: 100
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

vector : str, required
    Name of input vector map
    Or data source for direct OGR access
    Used as: input, vector, name
cat : int, required
    Category of a vector line
    Used as: input, cats
dir : str, required
    Directory where the output will be found
    Used as: input, dir, name
prefix : str, required
    output prefix (must start with a letter)
    Used as: prefix
distance : int, optional
    fixed distance between segment points
    Used as: integer
    Default: 100
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

v.fixed.segmentpoints creates segment points along a vector line with fixed distances by using the v.segment module. A category of one line has to be given. Start and end point of the line will be considered. The distance option is limited to an integer number. As a prefix (starting with a letter) has to be given, resulting vectors are prefix_singleline and prefix_segmentpoints, resulting external files are prefix_segmentpoints and prefix_segmentpoints.csv.

The next to last point may be closer to the last point as the given distance. Distance information for every point is added to the vector attribute table. The attribute is then exported as CSV file. The category (cat) of the input line is stored in the column cat_line of the prefix_segmentpoints attribute table.

EXAMPLE

  # NC sample data set
  v.fixed.segmentpoints vector=streams@PERMANENT cat=40102 dir=C:\tmp distance=25

DEPENDENCIES

  • v.segment

SEE ALSO

v.segment

AUTHOR

Helmut Kudrnovsky

SOURCE CODE

Available at: v.fixed.segmentpoints source code (history)
Latest change: Friday Feb 21 10:10:05 2025 in commit 7d78fe3