[GRASS-user] v.edit break lines at coordinates

Johannes Radinger johannesradinger at gmail.com
Sat Mar 14 15:58:11 PDT 2020


Hi all,
FYI: I just issued a new ticket in github (
https://github.com/OSGeo/grass/issues/415) reporting that issue and
accompanied with some more information.
/Johannes

On Fri, Mar 13, 2020 at 11:53 AM Johannes Radinger <
johannesradinger at gmail.com> wrote:

> Hi GRASS users,
>
> maybe someone of you can explain me following problem (of understanding) I
> am facing:
> I want to break a single line into several. More specifically, I am using
> v.edit with the option break and two coordinate pairs to break a single
> line. I'd expect that breaking a single line at two points would result in
> three lines; However this results in 4 categories?!
>
> Here a small example using the NC dataset:
> #################################
> # Extract single line for testing
> v.extract --o input=streams at PERMANENT cats=92551 output=selected_stream
>
> # Break line at two point locations and clean (recommended after v.edit
> break)
> v.edit map=selected_stream tool=break threshold=30
> coords='635861,224469,635793,224553'
> v.clean --o input=selected_stream output=selected_stream2 tool=rmdupl
>
> # Add categories to layer 2 to check
> v.category --o input=selected_stream2 layer=2 output=selected_stream3
> option=add
> v.db.addtable map=selected_stream3 layer=2
> d.vect -c map=selected_stream3 at test4 layer=2 label_layer=2
> attribute_column=cat
> ####################################
>
> So the display shows three colors which makes sense as these would be the
> three lines that I'd expect from breaking a single line at two points. But
> there are four categories (that are also listed in the attribute table).
> Can anyone explain that to me, what I am doing wrong; or even better, what
> would you recommend to do if I want to break a line at two coordinates into
> three lines?
>
> Thank you for your help!
> Johannes
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20200314/a077c27f/attachment.html>


More information about the grass-user mailing list