[GRASS-dev] [GRASS GIS] #2820: v.surf.idw results seem seriously wrong and don't match r.surf.idw results

GRASS GIS trac at osgeo.org
Sat Dec 19 09:17:32 PST 2015


#2820: v.surf.idw results seem seriously wrong and don't match r.surf.idw results
---------------------+-------------------------------------------------
  Reporter:  lrntct  |      Owner:  grass-dev@…
      Type:  defect  |     Status:  new
  Priority:  normal  |  Milestone:  7.0.3
 Component:  Vector  |    Version:  7.0.1
Resolution:          |   Keywords:  v.surf.idw r.surf.idw interpolation
       CPU:  x86-64  |   Platform:  Linux
---------------------+-------------------------------------------------

Comment (by annakrat):

 Replying to [comment:22 mlennert]:

 > I agree with you in principle, although when you have a module written
 in one style, it might be a good idea to not mix too much with another, as
 that might actually confuse and cause less readability.

 Technically, both approaches (explicit passing of a pointer and using
 static variable) were used in that function, so it's mixing it already.

 >
 > And in this particular case, I do find the static declaration within the
 function more easily understandable and readable than the pointer magic
 spread over all the code.
 >
 I spent quite a bit of time on debugging this code and I disagree. I even
 think that the practice of using static variables caused this serious bug.
 I am usually not comfortable with using pointers but in this case, it's no
 magic, it's pretty standard case which is readable. And just because the
 diff is just one line, it doesn't mean it's neat. I don't plan to change
 anything now, but that's my opinion.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2820#comment:23>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list