[GRASS-user] v.patch -a: how to interpret message "Line -58728 already has area/isle -1611 to left"

I am trying to patch together a series of vector maps, using v.patch -a (apparently without -a, category values are not retained). These maps contain polygons that were extracted from the same base map (but in each map there are different polygons than in the others), treated with different intermediary steps, to then be all put back together in a new vector map.

However, for one of these maps, when I try to add it, I get:

WARNING: Line -58728 already has area/isle -1611 to left
ERROR: Unable to add isle (map closed, topo saved)

How should I interpret this message ?

Moritz

On Mon, Aug 20, 2018 at 5:42 PM, Moritz Lennert <mlennert@club.worldonline.be> wrote:

I am trying to patch together a series of vector maps, using v.patch -a (apparently without -a, category values are not retained). These maps contain polygons that were extracted from the same base map (but in each map there are different polygons than in the others), treated with different intermediary steps, to then be all put back together in a new vector map.

However, for one of these maps, when I try to add it, I get:

WARNING: Line -58728 already has area/isle -1611 to left
ERROR: Unable to add isle (map closed, topo saved)

How should I interpret this message ?

This is a problem with registering a new area. The warning is coming from
https://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/diglib/plus_area.c#L718
and the error is coming from
https://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/Vlib/build.c#L140

Try to patch without building topology, i.e. v.patch -b, then clean with
v.clean -c tool=bpol,break type=boundary

HTH,

Markus M

Moritz


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

On 20/08/18 22:09, Markus Metz wrote:

On Mon, Aug 20, 2018 at 5:42 PM, Moritz Lennert <mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>> wrote:
>
> I am trying to patch together a series of vector maps, using v.patch -a (apparently without -a, category values are not retained). These maps contain polygons that were extracted from the same base map (but in each map there are different polygons than in the others), treated with different intermediary steps, to then be all put back together in a new vector map.
>
> However, for one of these maps, when I try to add it, I get:
>
> WARNING: Line -58728 already has area/isle -1611 to left
> ERROR: Unable to add isle (map closed, topo saved)
>
> How should I interpret this message ?

This is a problem with registering a new area. The warning is coming from
https://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/diglib/plus_area.c#L718
and the error is coming from
https://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/Vlib/build.c#L140

Try to patch without building topology, i.e. v.patch -b, then clean with
v.clean -c tool=bpol,break type=boundary

Will this allow to also keep the attribute tables ?

Moritz

On Tue, Aug 21, 2018 at 9:43 AM, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 20/08/18 22:09, Markus Metz wrote:

On Mon, Aug 20, 2018 at 5:42 PM, Moritz Lennert <mlennert@club.worldonline.be mailto:[mlennert@club.worldonline.be](mailto:mlennert@club.worldonline.be)> wrote:

I am trying to patch together a series of vector maps, using v.patch -a (apparently without -a, category values are not retained). These maps contain polygons that were extracted from the same base map (but in each map there are different polygons than in the others), treated with different intermediary steps, to then be all put back together in a new vector map.

However, for one of these maps, when I try to add it, I get:

WARNING: Line -58728 already has area/isle -1611 to left
ERROR: Unable to add isle (map closed, topo saved)

How should I interpret this message ?

This is a problem with registering a new area. The warning is coming from
https://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/diglib/plus_area.c#L718
and the error is coming from
https://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/Vlib/build.c#L140

Try to patch without building topology, i.e. v.patch -b, then clean with
v.clean -c tool=bpol,break type=boundary

Will this allow to also keep the attribute tables ?

v.patch should keep attribute tables as long as you use the -e or -a flag. The suggested cleaning does not touch categories or attribute tables.

Markus M

On Tue, Aug 21, 2018 at 9:59 AM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

On Tue, Aug 21, 2018 at 9:43 AM, Moritz Lennert <mlennert@club.worldonline.be> wrote:

On 20/08/18 22:09, Markus Metz wrote:

On Mon, Aug 20, 2018 at 5:42 PM, Moritz Lennert <mlennert@club.worldonline.be mailto:[mlennert@club.worldonline.be](mailto:mlennert@club.worldonline.be)> wrote:

I am trying to patch together a series of vector maps, using v.patch -a (apparently without -a, category values are not retained). These maps contain polygons that were extracted from the same base map (but in each map there are different polygons than in the others), treated with different intermediary steps, to then be all put back together in a new vector map.

However, for one of these maps, when I try to add it, I get:

WARNING: Line -58728 already has area/isle -1611 to left
ERROR: Unable to add isle (map closed, topo saved)

I think I found the reason: topology must be reset when appending a vector to an existing vector. Can you please try the attached patch?

Markus M

How should I interpret this message ?

This is a problem with registering a new area. The warning is coming from
https://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/diglib/plus_area.c#L718
and the error is coming from
https://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/Vlib/build.c#L140

Try to patch without building topology, i.e. v.patch -b, then clean with
v.clean -c tool=bpol,break type=boundary

Will this allow to also keep the attribute tables ?

v.patch should keep attribute tables as long as you use the -e or -a flag. The suggested cleaning does not touch categories or attribute tables.

Markus M

(attachments)

v.patch.diff (622 Bytes)