I am interested in using the v.transects GRASS command. I am however not yet proficient with using GRASS or python in QGIS environment so I would rather do it the old-fashioned way (i.e using the GUI).

When I open my geoprocessing toolbox in QGIS however I don't find it among the listed GRASS functionality. Why is this particular command missing? How can I add it? If not will I have to resort to doing this operation through a command line of some sort (prefer to avoid)

I did end up trying to open the layer in GRASS and running the following command:

v.transects --help

To which I got the following error:

'v.transects' is not recognized as an internal or external command, operable program or batch file.

I know the session environment is OK because when I try to run another command, such as v.buffer --help, I get valid output...

Does the v.transects command even exist? if not why does it appear in the documentation?


v.transects exists as an add-on (see: https://grass.osgeo.org/grass7/manuals/addons/), so needs to be installed using the command g.extension extension=v.transects in the GRASS GIS console.

If you can't use the console command in QGIS, it's not too hard to use the command in standalone GRASS GIS 7.4.x. The vector layer was loaded in using File > Import Vector Data > Simplified vector import with reprojection. Then after typing v.transects input=busroute6@PERMANENT output=bus_transects transect_spacing=100 --overwrite into the console it produced:


| improve this answer | |
  • a follow-up question. Is it possible to control the width of the transecting rectangles for type=area? I'm trying to use these transect to cut a background buffer similar to gis.stackexchange.com/questions/130949/…. It seems that one way to do it is to make thin rectangles and difference the background buffer – user32882 Jul 26 '18 at 6:33
  • 1
    @user32882 I'm not sure you can do this with v.transects itself (from looking at the script svn.osgeo.org/grass/grass-addons/grass7/vector/v.transects/…), but could you not export the transects from GRASS and load them into QGIS to control the width directly with Layer Properties > Style > Width? – Sam Comber Jul 26 '18 at 8:09

I would argue that v.transects is the backend for any "points along lines" tool.

| improve this answer | |
  • I would argue the opposite. Creating lines perpendicular to a polyline at a given interval is more complicated than simply adding points at a particular interval. In addition to locating the intersecting points of said polyline, you also need to calculate local perpendicularity to the polyline. So yeah, with a transect tool I can easily find the points at which each perpendicular line transects. With a point along line tool good luck drawing the perpendicular lines at each intersection. – user32882 Jul 25 '18 at 9:44
  • Point taken. In that case I am not able to help you out, sorry. – Erik Jul 25 '18 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.