[GRASS-user] problem with v.clean and intersection pts
Micha Silver
micha at arava.co.il
Fri May 15 03:29:35 EDT 2009
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
>
>
>
More information about the grass-user
mailing list