[GRASS-dev] [GRASS GIS] #373: v.generalize: hermite corrupts data

#373: v.generalize: hermite corrupts data
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Vector | Version: svn-develbranch6
Keywords: | Platform: All
      Cpu: All |
----------------------+-----------------------------------------------------
1. import the attached shapefile

2. run v.generalize method=hermite on it

The resulting vector map renders fine in GRASS, but makes QGIS crash and
say:

{{{
qgsgrass.cpp: 374: (error_routine) error_routine (fatal = 1): BUG
(Vect_build_sidx_from_topo): node does not exist
}}}

After re-building topology the map renders fine in QGIS too. Topology dump
of the 2 maps differ like this:

Before topology re-build:

{{{
---------- TOPOLOGY DUMP ----------
N,S,E,W,T,B: 36.999861, 35.889244, -6.178626, -7.133487, 0.000000,
0.000000
Nodes (2 nodes, alive + dead ):
node = 1, n_lines = 2, xy = -7.000139, 36.999861
   line = -1, type = 4, angle = -1.781112
   line = 1, type = 4, angle = -0.417989
node = 2, n_lines = 1, xy = -6.662233, 36.459010
   line = 2, type = 8, angle = -9.000000
Lines (2 lines, alive + dead ):
line = 1, type = 4, offset = 14 n1 = 1, n2 = 1, left/area = -1, right = 1
N,S,E,W,T,B: 36.999861, 35.889244, -6.178626, -7.133487, 0.000000,
0.000000
line = 2, type = 8, offset = 316 n1 = 2, n2 = 2, left/area = 1, right = 0
N,S,E,W,T,B: 36.459010, 36.459010, -6.662233, -6.662233, 0.000000,
0.000000
Areas (1 areas, alive + dead ):
area = 1, n_lines = 1, n_isles = 0 centroid = 2
N,S,E,W,T,B: 36.999861, 35.889244, -6.178626, -7.133487, 0.000000,
0.000000
   line = 1
Islands (1 islands, alive + dead ):
isle = 1, n_lines = 1 area = 0
N,S,E,W,T,B: 36.999861, 35.889244, -6.178626, -7.133487, 0.000000,
0.000000
   line = -1
}}}

After topology re-build:

{{{
---------- TOPOLOGY DUMP ----------
N,S,E,W,T,B: 36.999861, 35.889244, -6.178626, -7.133487, 0.000000,
0.000000
Nodes (7 nodes, alive + dead ):
node = 1, n_lines = 2, xy = -7.000139, 36.999861
   line = -1, type = 4, angle = -1.781112
   line = 1, type = 4, angle = -0.417989
node = 7, n_lines = 1, xy = -6.662233, 36.459010
   line = 7, type = 8, angle = -9.000000
Lines (7 lines, alive + dead ):
line = 1, type = 4, offset = 14 n1 = 1, n2 = 1, left/area = -1, right = 1
N,S,E,W,T,B: 36.999861, 35.889244, -6.178626, -7.133487, 0.000000,
0.000000
line = 7, type = 8, offset = 316 n1 = 7, n2 = 7, left/area = 1, right = 0
N,S,E,W,T,B: 36.459010, 36.459010, -6.662233, -6.662233, 0.000000,
0.000000
Areas (1 areas, alive + dead ):
area = 1, n_lines = 1, n_isles = 0 centroid = 7
N,S,E,W,T,B: 36.999861, 35.889244, -6.178626, -7.133487, 0.000000,
0.000000
   line = 1
Islands (1 islands, alive + dead ):
isle = 1, n_lines = 1 area = 0
N,S,E,W,T,B: 36.999861, 35.889244, -6.178626, -7.133487, 0.000000,
0.000000
   line = -1
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/373&gt;
GRASS GIS <http://grass.osgeo.org>

#373: v.generalize: hermite corrupts data
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Vector | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by msieczka):

Same happens for:

{{{
v.generalize input=w007n36e output=w007n36e_boyle method=boyle
look_ahead=2 iterations=100
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/373#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#373: v.generalize: hermite, boyle corrupt data
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Vector | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by msieczka):

  * summary: v.generalize: hermite corrupts data => v.generalize: hermite,
              boyle corrupt data

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/373#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#373: v.generalize: hermite, boyle corrupt data
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Vector | Version: svn-develbranch6
Resolution: | Keywords: v.generalize
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by martinl):

  * keywords: => v.generalize

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/373#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#373: v.generalize: hermite, boyle corrupt data
--------------------------+-------------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Vector | Version: svn-develbranch6
Keywords: v.generalize | Platform: All
      Cpu: All |
--------------------------+-------------------------------------------------

Comment(by mmetz):

Fixed in 6.4.2. Close ticket?

Markus M

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/373#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#373: v.generalize: hermite, boyle corrupt data
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.3
Component: Vector | Version: svn-develbranch6
Resolution: fixed | Keywords: v.generalize
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by neteler):

  * status: new => closed
  * resolution: => fixed
  * milestone: 6.4.0 => 6.4.3

Comment:

Closing since fixed.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/373#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>