[GRASS-user] Measuring Distance Along a Line

   I have a map with a couple of transect lines that intersect points on a
separate map. I want to measure the distance from one end of each transect
line to the point which it overlays. While I thought there was a v. module
to do this, I'm not seeing it. If it's v.distance, I don't see how to apply
that module to measuring a distance along one line interactively.

   Clue stick needed.

Rich

On Wed, Jan 18, 2012 at 4:07 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

I have a map with a couple of transect lines that intersect points on a
separate map. I want to measure the distance from one end of each transect
line to the point which it overlays. While I thought there was a v. module
to do this, I’m not seeing it. If it’s v.distance, I don’t see how to apply
that module to measuring a distance along one line interactively.

Again, vectors are not my thing, but maybe you could include the end point into your vector and use v.to.db with option=length to get the distance along your line vector.

A raster solution to similar problems that you could maybe use somehow is to generate distance maps from target points, lines or areas and then extract the values of these maps through other vectors or using r.mapcalc.

I’ve used this solution in many different cases and it is very nice to see the distance maps. The procedure is described in the GRASS book as:

r.mapcalc area_one=1
r.cost -k in=area_one out=distance_to_something start_rast=something
r.mapcalc approx_distance_in_meters=dist_to_something * (ewres() + nsres()) / 2.)"

Hope it gives you some insights.

Marcello.

On Wed, 18 Jan 2012, Marcello Gorini wrote:

Again, vectors are not my thing, but maybe you could include the end point
into your vector and use v.to.db with option=length to get the distance
along your line vector.

Marcello,

   I don't want the endpoint, but the distance where it overlays a point from
a different map.

Hope it gives you some insights.

   Thank you.

Rich

On 01/18/2012 12:15 PM, Rich Shepard wrote:

On Wed, 18 Jan 2012, Marcello Gorini wrote:

Again, vectors are not my thing, but maybe you could include the end
point
into your vector and use v.to.db with option=length to get the distance
along your line vector.

Marcello,

  I don't want the endpoint, but the distance where it overlays a point
from
a different map.

Hope it gives you some insights.

  Thank you.

Rich

I'm not sure I get what you're trying to do, but distance along a line
would be in the v.net module.

Thanks,
Alex

On Wed, 18 Jan 2012, Alex Mandel wrote:

I'm not sure I get what you're trying to do, but distance along a line
would be in the v.net module.

Alex,

   When I read the v.net man page it suggested that it provided distances
from node-to-node on a network map. The profile map I created is separate
from the points map, and I'm looking for the distance to the point along the
line.

   However, it occurred to me that I can get this from the r.profile output
because the points are just above the stream channel so they'll be slightly
higher in elevation than the lowest point on the profile. That's good enough
for presentation purposes.

Thanks,

Rich

On 01/18/2012 12:32 PM, Rich Shepard wrote:

On Wed, 18 Jan 2012, Alex Mandel wrote:

I'm not sure I get what you're trying to do, but distance along a line
would be in the v.net module.

Alex,

  When I read the v.net man page it suggested that it provided distances
from node-to-node on a network map. The profile map I created is separate
from the points map, and I'm looking for the distance to the point along
the
line.

  However, it occurred to me that I can get this from the r.profile output
because the points are just above the stream channel so they'll be slightly
higher in elevation than the lowest point on the profile. That's good
enough
for presentation purposes.

Thanks,

Rich

I think I'd need to see a diagram to understand the setup better. There
is a v.patch tool that connects a point to the nearest location along
lines. After which you can measure the patch distance.

Glad you found something that works though.

Alex

Hello,
if You are interested to get similar functionality like r.profile does
for raster, there's a GRASS add-on v.profile, that allows to profile
vector point and line maps. Area support is not implemented.

Input for v.profile should be a map with a single transect line (or
single line should be selected with SQL) or Northing, Easting value
list representing line and a map with points/lines. Module output will
be a list of feature (point within specified tolerance, line crossing)
distance from the start of profile line + feature attribute data.

If You need some help, let me know.

Maris.

http://grass.osgeo.org/wiki/GRASS_AddOns#v.profile
http://trac.osgeo.org/grass/browser/grass-addons/grass6/vector/v.profile

2012/1/18 Rich Shepard <rshepard@appl-ecosys.com>:

I have a map with a couple of transect lines that intersect points on a
separate map. I want to measure the distance from one end of each transect
line to the point which it overlays. While I thought there was a v. module
to do this, I'm not seeing it. If it's v.distance, I don't see how to apply
that module to measuring a distance along one line interactively.

Clue stick needed.

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

On Fri, 20 Jan 2012, Maris Nartiss wrote:

if You are interested to get similar functionality like r.profile does for
raster, there's a GRASS add-on v.profile, that allows to profile vector
point and line maps. Area support is not implemented.

Maris,

   This is good to know.

Thank you,

Rich