Create line perpendicular to other line at specific point

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Create line perpendicular to other line at specific point

Johannes Radinger
Hi all,
I've vector lines representing rivers and a set of points. Now, I'd like to create short lines (e.g. 150 m) that are perpendicular to the river lines and cross at the coordinates of the points vector. This is basically to create transects similar to the tool v.transect. However v.transect creates the perpendicular lines at regular intervals and I'd like to create them only for the locations of the points on the river line. Is there any straight forward tool to accomplish this? I could retrieve the azimuth of the river lines at each point (using v.to.db), but how can I extrude a point into a line with a given length and azimuth? Any suggestions?

cheers,
Johannes

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: Create line perpendicular to other line at specific point

Micha Silver-2

I have a python script from some years ago that should prepare "station lines" perpendicular to stream reaches at regular intervals. If you're interested in trying, I'll gladly send it. I originally wrote the script to work in python 2, so if it's helpful, I should do the changes needed for python 3.


Regards, Micha 


On 08/11/2019 11:02, Johannes Radinger wrote:
Hi all,
I've vector lines representing rivers and a set of points. Now, I'd like to create short lines (e.g. 150 m) that are perpendicular to the river lines and cross at the coordinates of the points vector. This is basically to create transects similar to the tool v.transect. However v.transect creates the perpendicular lines at regular intervals and I'd like to create them only for the locations of the points on the river line. Is there any straight forward tool to accomplish this? I could retrieve the azimuth of the river lines at each point (using v.to.db), but how can I extrude a point into a line with a given length and azimuth? Any suggestions?

cheers,
Johannes

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
https://orcid.org/0000-0002-1128-1325

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: Create line perpendicular to other line at specific point

Markus Neteler
In reply to this post by Johannes Radinger
On Fri, Nov 8, 2019 at 10:02 AM Johannes Radinger
<[hidden email]> wrote:
>
> Hi all,
> I've vector lines representing rivers and a set of points. Now, I'd like to create short lines (e.g. 150 m) that are perpendicular to the river lines and cross at the coordinates of the points vector.

A similar (?) code is available in the v.civil addon:

https://grass.osgeo.org/grass7/manuals/addons/v.civil.html#transversal

Perhaps it could be separated out into a separe module?

Or, I see that Micha has some code to offer as well.

best,
Markus
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user