[GRASS-dev] Re: [GRASS GIS] #1088: r.fillnulls: support other
interpolation methods
GRASS GIS
trac at osgeo.org
Thu Feb 16 03:30:33 EST 2012
#1088: r.fillnulls: support other interpolation methods
-------------------------+--------------------------------------------------
Reporter: kyngchaos | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4.3
Component: Raster | Version: svn-develbranch6
Keywords: r.fillnulls | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
Comment(by mmetz):
Replying to [comment:23 glynn]:
> Replying to [comment:14 mmetz]:
>
> > PS: I fixed r.buffer in trunk, it could now be used (again) by
r.fillnulls instead of r.grow.
> What was the problem?
metric=geodesic does not return squared distances, and for other metrics
the distances as returned by r.grow.distance were in map units, not
meters, but r.buffer requires meter as unit.
> Because the fix is needlessly inefficient. The efficient way to compare
Euclidean distance against a fixed value is "distance!^2 < limit!^2"
rather than "sqrt(distance!^2) < limit". Calculating Euclidean distance
invariably involves calculating distance-squared as an intermediate value;
if you only need the value for a comparison, squaring one value is faster
than taking the square root of the other.
Ok, r.buffer now (r50830) uses squared distance for metric=squared and
regular distance in meters for metric=geodesic.
Markus M
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1088#comment:24>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list