[GRASS-user] Perpendicular projection of points onto line

Hi all
I’m thinking if there is a way to project a series of points into a line, but this projection must be in a direction perpendicular to the line.

Tks


Carlos Grohmann

Sent with Sparrow

Hi all
I’m thinking if there is a way to project a series of points into a line, but this projection must be in a direction perpendicular to the line.

One approach is a three step process:
1- Begin with v.distance from your points to the line. The ‘output’ parameter will be a line vector of the (perpendicular) connectors from the points to the line.
2- Next do v.patch to merge the connectors to the line.
3- And finally v.clean with tool=break error=connector_points. The ‘error’ parameter contains all those points where a new intersection had to be created after patching the connectors to the line vector.

(There is a chance that one connector will intersect the line exactly on a node, and then v.clean won’t find that point since it’s not an ‘error’. But that’s probably a very rare case.)

HTH,
Micha

···
-- 
Micha Silver
GIS Consultant, Arava Development Co.
[http://www.surfaces.co.il](http://www.surfaces.co.il)

Thanks Micha. I though of v.distance but I wasn’t sure if the connectors would be perpendicular


Carlos Grohmann

Sent with Sparrow

On Thursday, 10 de May de 2012 at 14:42, Micha Silver wrote:

On 05/10/2012 06:31 PM, Carlos Grohmann wrote:

Hi all
I’m thinking if there is a way to project a series of points into a line, but this projection must be in a direction perpendicular to the line.

One approach is a three step process:
1- Begin with v.distance from your points to the line. The ‘output’ parameter will be a line vector of the (perpendicular) connectors from the points to the line.
2- Next do v.patch to merge the connectors to the line.
3- And finally v.clean with tool=break error=connector_points. The ‘error’ parameter contains all those points where a new intersection had to be created after patching the connectors to the line vector.

(There is a chance that one connector will intersect the line exactly on a node, and then v.clean won’t find that point since it’s not an ‘error’. But that’s probably a very rare case.)

HTH,
Micha

Tks


Carlos Grohmann

Sent with Sparrow

This mail was received via Mail-SeCure System.

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)

This mail was received via Mail-SeCure System.

--  
Micha Silver
GIS Consultant, Arava Development Co.
[http://www.surfaces.co.il](http://www.surfaces.co.il)

Oops, of course that the shortest distance will be perpendicular. I should do one thing at a time… trying to code while in a field trip in the Amazon is not the best idea…


Carlos Grohmann

Sent with Sparrow

On Thursday, 10 de May de 2012 at 17:28, Carlos Grohmann wrote:

Thanks Micha. I though of v.distance but I wasn’t sure if the connectors would be perpendicular


Carlos Grohmann

Sent with Sparrow

On Thursday, 10 de May de 2012 at 14:42, Micha Silver wrote:

On 05/10/2012 06:31 PM, Carlos Grohmann wrote:

Hi all
I’m thinking if there is a way to project a series of points into a line, but this projection must be in a direction perpendicular to the line.

One approach is a three step process:
1- Begin with v.distance from your points to the line. The ‘output’ parameter will be a line vector of the (perpendicular) connectors from the points to the line.
2- Next do v.patch to merge the connectors to the line.
3- And finally v.clean with tool=break error=connector_points. The ‘error’ parameter contains all those points where a new intersection had to be created after patching the connectors to the line vector.

(There is a chance that one connector will intersect the line exactly on a node, and then v.clean won’t find that point since it’s not an ‘error’. But that’s probably a very rare case.)

HTH,
Micha

Tks


Carlos Grohmann

Sent with Sparrow

This mail was received via Mail-SeCure System.

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)

This mail was received via Mail-SeCure System.

--   
Micha Silver
GIS Consultant, Arava Development Co.
[http://www.surfaces.co.il](http://www.surfaces.co.il)

v.profile is designed to do exactly what You are looking for.

http://grass.osgeo.org/wiki/GRASS_AddOns#v.profile

Maris.

2012/5/10 Carlos Grohmann <carlos.grohmann@gmail.com>:

Hi all
I'm thinking if there is a way to project a series of points into a line,
but this projection must be in a direction perpendicular to the line.

Tks

--
Carlos Grohmann
Sent with Sparrow

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Maris,

many many thanks.

Carlos


Prof. Carlos Henrique Grohmann
Institute of Geosciences - Univ. of São Paulo, Brazil

  • Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com


Can’t stop the signal.

Sent with Sparrow

On Friday, 11 May 2012 at 03:55, Maris Nartiss wrote:

v.profile is designed to do exactly what You are looking for.

http://grass.osgeo.org/wiki/GRASS_AddOns#v.profile

Maris.

2012/5/10 Carlos Grohmann <carlos.grohmann@gmail.com>:

Hi all
I’m thinking if there is a way to project a series of points into a line,
but this projection must be in a direction perpendicular to the line.

Tks


Carlos Grohmann
Sent with Sparrow


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Professor Carlos,

Please take a look here: http://profmarcello.blogspot.com.br/2012/02/grass-snapping-points-to-lines.html

Regards,

Marcello Benigno B. de Barros Filho
Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
Doutorando em Tecnologia Ambiental e Recursos Hídricos - UFPE
http://profmarcello.blogspot.com
http://about.me/marcello.benigno

On 14/05/12 00:54, Marcello Benigno wrote:

Hi Professor Carlos,

Please take a look here:
http://profmarcello.blogspot.com.br/2012/02/grass-snapping-points-to-lines.html

Nice solution. You could probably simplify a bit more by using v.in.db instead of v.out.ascii/v.in.ascii.

Moritz