On Tue, Aug 21, 2018 at 9:59 AM, Markus Metz <[email protected]>
wrote:
>
>
>
> On Tue, Aug 21, 2018 at 9:43 AM, Moritz Lennert <
[email protected]> wrote:
> >
> > On 20/08/18 22:09, Markus Metz wrote:
> >>
> >>
> >>
> >> On Mon, Aug 20, 2018 at 5:42 PM, Moritz Lennert <
[email protected] <mailto:[email protected]>> 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
Index: main.c
===================================================================
--- main.c (revision 72867)
+++ main.c (working copy)
@@ -305,8 +305,7 @@
}
if (append->answer) {
- if (no_topo->answer)
- Vect_set_open_level(1);
+ Vect_set_open_level(1);
if (Vect_open_update(&OutMap, out_name, G_mapset()) < 0)
G_fatal_error(_("Unable to open vector map <%s>"), out_name);
@@ -455,8 +454,6 @@
Vect_set_person(&OutMap, G_whoami());
if (!no_topo->answer) {
- if (append->answer)
- Vect_build_partial(&OutMap, GV_BUILD_NONE);
Vect_build(&OutMap);
}
Vect_close(&OutMap);
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user