[GRASS-user] problem with v.clean and intersection pts

Hi everyone,
Thanks in advance.
I'm trying to extract intersection points. I have a shoreline I extracted
using r.contour and many lines that cross the shoreline that are the output
of v.distance.
I want the intersection points so I'm patching the shoreline and crossbars
and then using v.clean tool=break err=intersections. V.clean only gives me
one intersection which is where the shoreline reaches the edge of the
region, none in the actual intersections.
Now I'll give some extra information in case it helps:
------------------------------------------------------------------------------------
The workflow that I'm using is:
#digitize line roughly parallel to shoreline
v.digit map=ShorelineMeasLine -n bgcmd="d.rast R_slope; d.vect
R_maximum_036m; d.vect R_minimum_036m" --o
v.to.points -vi input=ShorelineMeasLine out=ShorelineMeasPts dmax=50
type=line --o
#move vector line to the other side of shoreline
v.digit map=ShorelineMeasLine -n bgcmd="d.rast R_slope; d.vect
R_maximum_036m; d.vect R_minimum_036m"
#make the crossbars
v.distance -p from=ShorelineMeasPts to=ShorelineMeasLine from_type=point
to_type=line from_layer=2 upload=dist column=1 output=ShorelineMeasPerpLines
--o
v.patch input=R_20080327_75m,ShorelineMeasPerpLines
output=R_20080327_75m_WPerps --o
#find intersections
v.clean input=R_20080327_75m_WPerps output=R_20080327_75m_WPerps_break
error=R_20080327_75m_Pts tool=break --o
-----------------------------------------------------------------------------------------------
I don't know if this helps, but if I query one of the crossbars (v.distance
output), I get:
East: 930243.068465
North: 209846.058091

Map: ShorelineMeasPerpLines
Mapset: rodanthe
Type: Line
Line: 85
Length: 215.661245
----------------------------------------------------------------------------------------------
And if I query the shoreline, I get:
East: 930135.548755
North: 209954.759336

Map: R_20080327_75m
Mapset: rodanthe
Type: Line
Line: 1
Length: 10750.507559
Line height: 0.750000
Layer: 1
Category: 1

Driver: dbf
Database: /home/eric/obx/rodanthe/dbf/
Table: R_20080327_75m
Key column: cat
cat : 1
level : 0.75
------------------------------------------------------------------------------------------------

I hope I was clear and gave enough information.
Thanks a lot,
Eric

--
View this message in context: http://n2.nabble.com/problem-with-v.clean-and-intersection-pts-tp2887675p2887675.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hello Eric:

hardinej wrote:

Hi everyone,
Thanks in advance.
I'm trying to extract intersection points. I have a shoreline I extracted
using r.contour and many lines that cross the shoreline that are the output
of v.distance.
I want the intersection points so I'm patching the shoreline and crossbars
and then using v.clean tool=break err=intersections. V.clean only gives me
one intersection which is where the shoreline reaches the edge of the
region, none in the actual intersections.
  

I've used the "v.patch; v.clean tool=break" trick to find all the points where a stream network crosses a hiway. I even documented [1] the process.

I'm not too clear on what you're trying to accomplish with the v.to.points, then v.distance. Maybe I'm missing something. In any case I can think of only one thing that might be tripping you up in the steps below: perhaps you're creating a topologically clean line vector *before* the v.patch; v.clean steps. In that case v.clean will not find any intersections, since there are no "errors". From the commands below, it doesn't seem to be the case, but I can't see any other reason you're not getting points in the intersections point vector R_20080327_75mPts (assuming the two line vectors R_20080327_75m,ShorelineMeasPerpLines do indeed cross ...)

[1] http://grass.osgeo.org/wiki/Creating_watersheds

Regards,
Micha

Now I'll give some extra information in case it helps:
------------------------------------------------------------------------------------
The workflow that I'm using is:
#digitize line roughly parallel to shoreline
v.digit map=ShorelineMeasLine -n bgcmd="d.rast R_slope; d.vect
R_maximum_036m; d.vect R_minimum_036m" --o
v.to.points -vi input=ShorelineMeasLine out=ShorelineMeasPts dmax=50
type=line --o
#move vector line to the other side of shoreline
v.digit map=ShorelineMeasLine -n bgcmd="d.rast R_slope; d.vect
R_maximum_036m; d.vect R_minimum_036m"
#make the crossbars
v.distance -p from=ShorelineMeasPts to=ShorelineMeasLine from_type=point
to_type=line from_layer=2 upload=dist column=1 output=ShorelineMeasPerpLines
--o
v.patch input=R_20080327_75m,ShorelineMeasPerpLines
output=R_20080327_75m_WPerps --o
#find intersections
v.clean input=R_20080327_75m_WPerps output=R_20080327_75m_WPerps_break
error=R_20080327_75m_Pts tool=break --o
-----------------------------------------------------------------------------------------------
I don't know if this helps, but if I query one of the crossbars (v.distance
output), I get:
East: 930243.068465
North: 209846.058091

Map: ShorelineMeasPerpLines Mapset: rodanthe
Type: Line
Line: 85
Length: 215.661245
----------------------------------------------------------------------------------------------
And if I query the shoreline, I get:
East: 930135.548755
North: 209954.759336

Map: R_20080327_75m Mapset: rodanthe
Type: Line
Line: 1
Length: 10750.507559
Line height: 0.750000
Layer: 1
Category: 1

Driver: dbf
Database: /home/eric/obx/rodanthe/dbf/
Table: R_20080327_75m
Key column: cat
cat : 1
level : 0.75
------------------------------------------------------------------------------------------------

I hope I was clear and gave enough information.
Thanks a lot,
Eric

Hey thanks a lot. you were right. I should have omitted the first couple of
lines. They were to make a bunch of parallel transects across the shoreline.
I should have used v.segment but I was having problems so I just did that.
But anyway, I ran v.build on the transects and and then the v.clean trick
worked.
Thanks again,
Eric
--
View this message in context: http://n2.nabble.com/problem-with-v.clean-and-intersection-pts-tp2887675p2908835.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hello,
if You are working with transects, You may take a look at v.profile
add-on [1]. It will print distance from line start point to any point
on line or line intersection. It's really useful tool for GIS data
conversation to chart friendly data.

Maris.
1. http://svn.osgeo.org/grass/grass-addons/vector/v.profile/

2009/5/15 hardinej <hardinej@gmail.com>:

Hey thanks a lot. you were right. I should have omitted the first couple of
lines. They were to make a bunch of parallel transects across the shoreline.
I should have used v.segment but I was having problems so I just did that.
But anyway, I ran v.build on the transects and and then the v.clean trick
worked.
Thanks again,
Eric
--
View this message in context: http://n2.nabble.com/problem-with-v.clean-and-intersection-pts-tp2887675p2908835.html
Sent from the Grass - Users mailing list archive at Nabble.com.

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