[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
Sun Dec 20 11:44:34 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 mlennert):
Replying to [comment:23 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.
I apologize if I was a bit rash in deciding to revert your changes and
apply Paul's. I should have waited for your reaction first. In my eyes,
Paul's solution was more consistent with the rest of the code in the
module, but I have no strong opinion on this, and so, if you think that it
would be better to reimplement your solution, I can do that.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2820#comment:24>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list