[GRASS-user] v.patch eats my large polygons

Robert Nuske rsn.mailinglists at gmail.com
Thu Dec 20 02:13:22 PST 2018


Hi Markus,

>  > 38 vector maps (polygon) cover separate parts of my study area. A few
>  > share a boundary with their neighbor, most do not. To further work with
>  > all polygons from all sub plots, I want to merge all sub plots into one
>  > vector map. I do NOT need the polygons to get dissolved (disected &
>  > rebuild) at the boundary of two sub plots.
>  >
>  > Large (area, number of vertices and number of islands) polygons, which
>  > touch another large polygon at the common border of two sub plots are
>  > not in the patched vector map.
>  >
>  >
>  > What I did:
>  > v.patch in=gaps_1,gaps_2 out=gaps_merged
>  >
>  > What did not help was the -b flag. Lot's of boundaries but no areas 
> anymore.
> 
>  From the manual:
> Boundaries may need to be cleaned with /v.clean tool=break,rmdupl,rmsa/ 
> repeatedly until the /rmsa/ tool (Remove small angles at nodes) no 
> longer modifies any boundaries. If vector topology is still not clean, 
> boundaries may also need to be snapped with /v.clean 
> tool=snap,break,rmdupl/.

Thanks for the pointer.
Shame on me for not reading the manual closely.

I just read what v.patch --help gave me. The results of v.patch looked 
so wrong that I suspected a human error or software bug. I never ever 
considered this to be expected behavior.


> v.clean on the patched vector should restore your polygons.
Using now v.out.ogr -au to merge the many vector maps into one
but will look into this cure for v.patch eating border crossing polygons.


> We could add the cleaning step to v.patch (a new enhancement ticket 
> could be created).
That would be awesome.


Thanks
   robert



More information about the grass-user mailing list