[GRASS-dev] Re: [GRASS GIS] #36: v.generalize Assertion failed.
Daniel Bundala
bundala at gmail.com
Sun Feb 10 03:37:18 EST 2008
Hello,
Finally, I had some time to look at it carefully. It seems to me that
the problem is the same as the one I mentioned earlier. I made a patch
some time ago, but for some obscure reasons, it did not propagate to
the SVN. I think that the patch should fix it as it is the only
difference between the version in SVN and on my computer.
Daniel
PS: I am not a big expert on CVS/SVN so the patch may be little out of date.....
Index: smoothing.c
===================================================================
RCS file: /home/grass/grassrepository/grass6/vector/v.generalize/smoothing.c,v
retrieving revision 1.2
diff -u -r1.2 smoothing.c
--- smoothing.c 3 Nov 2007 13:10:57 -0000 1.2
+++ smoothing.c 16 Dec 2007 18:35:00 -0000
@@ -258,7 +258,12 @@
void refine_tangent(POINT * p)
{
double l = point_dist2(*p);
- point_scalar(*p, (double)1.0 / sqrt(sqrt(sqrt(l))), p);
+ if (l < 1e-12) {
+ point_scalar(*p, 0.0, p);
+ }
+ else {
+ point_scalar(*p, (double)1.0 / sqrt(sqrt(sqrt(l))), p);
+ }
return;
}
@@ -281,7 +286,7 @@
/* line is too short */
if (n <= 2) {
- return 1;
+ return n;
}
/* convert degrees=>radians */
On Feb 5, 2008 5:49 PM, GRASS GIS <trac at osgeo.org> wrote:
> #36: v.generalize Assertion failed.
> ----------------------+-----------------------------------------------------
> Reporter: marisn | Owner: grass-dev at lists.osgeo.org
> Type: defect | Status: new
> Priority: major | Milestone: 6.4.0
> Component: default | Version: svn-trunk
> Resolution: | Keywords:
> ----------------------+-----------------------------------------------------
> Comment (by martinl):
>
> > On my machine (Debian GNU/Linux, 32bit, grass-svn) I get the same error
> >
> {{{
> > Registering lines: v.generalize: index.c:157: RTreeInsertRect: Assertion
> `r->boundary[i] <= r->boundary[3+i]' failed.
> }}}
>
> sorry, I forgot to add debug output
>
> {{{
> D3/5: Register node 391690.000000,392030.000000
> D3/5: dig_find_node()
> D3/5: node = 0
> D3/5: dig_add_node(): n_nodes = 11, alloc_nodes = 1000
> D3/5: dig_spidx_add_node(): node = 12, x,y,z = 391690.000000,
> 392030.000000, 0.000000
> D3/5: new node = 12, n_nodes = 12, alloc_nodes = 1000
> D3/5: Add new node: 12
> D3/5: dig_node_add_line(): node = 12 line = -12
> D3/5: dig_node_alloc_line(): add = 1
> D5/5: dig_line_degenerate()
> D3/5: angle = nan
> D3/5: dig_node_add_line(): line -12 added position 1 n_lines: 1 angle nan
> D3/5: dig_spidx_add_line(): line = 12
> v.generalize: index.c:157: RTreeInsertRect: Assertion `r->boundary[i] <=
> r->boundary[3+i]' failed.
> Aborted
> }}}
>
> --
> Ticket URL: <http://trac.osgeo.org/grass/ticket/36#comment:4>
>
> GRASS GIS <http://grass.osgeo.org>
> GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
More information about the grass-dev
mailing list