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

Dear GRASS-Users,

after an abstinence period I started again to use GRASS 7.4 on Ubuntu 18.04 and am now facing v.patch eating my large polygons.

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.

To illustrate my problem, an image (https://imgur.com/4n3le65) with two sub plots (left an right) with a common border at the smallest part. All colored area are polygons. The islands are white. The orange polygons are the results of v.patch. The light gray and dark gray polygon are missing in the resulting v.patch-map.

Did anyone experience similar behavior before and know of a cure?

Thanks
   Robert

On Tue, Dec 18, 2018 at 2:14 PM Robert Nuske <rsn.mailinglists@gmail.com> wrote:

Dear GRASS-Users,

after an abstinence period I started again to use GRASS 7.4 on Ubuntu
18.04 and am now facing v.patch eating my large polygons.

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.

v.clean on the patched vector should restore your polygons.

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

HTH,

Markus M

To illustrate my problem, an image (https://imgur.com/4n3le65) with two
sub plots (left an right) with a common border at the smallest part. All
colored area are polygons. The islands are white. The orange polygons
are the results of v.patch. The light gray and dark gray polygon are
missing in the resulting v.patch-map.

Did anyone experience similar behavior before and know of a cure?

Thanks
Robert


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

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