[gdal-dev] Unexpected performance drop when using gdal.Grid() invdistnn vs. invdist
erin nagel
erin.nagel at gmail.com
Wed Aug 1 12:10:49 PDT 2018
Using python-bindings gdal.Grid() to interpolate scattered points to a
regular grid using CSV and VRT for over 700,000 points.
When testing invdist and invdistnn algorithms, invdistnn showed a decrease
in performance. According to https://trac.osgeo.org/gdal/ticket/6038,
invdistnn should have improved performance.
Python 3.6.4, GDAL version 2.2.2
*gdal.Grid()*
*Runtime*
invdist
6 min
invdistnn
45 min
Command Line, GDAL version 2.2.1
*gdal_grid*
*Runtime*
invdist
4 min
invdistnn
22 min
Python
ugrid_invdist = gdal.Grid('ugrid_ invdist.tiff', 'gomofs_u.vrt',
format='GTIFF', width=1248, height=861, algorithm="invdist:power=2.0:s
moothing=0.0:radius1=0.06:radius2=0.06:angle=0.0:max_points=4:min_points=2:nodata=0.0",
zfield="u")
ugrid_invdistnn = gdal.Grid('ugrid_ invdistnn.tiff', 'gomofs_u.vrt',
format='GTIFF', width=1248, height=861, algorithm="invdistnn:power=2.0
:smoothing=0.0:radius1=0.06:radius2=0.06:angle=0.0:max_points=4:min_points=2:nodata=0.0",
zfield="u")
Command Line
gdal_grid -zfield "u" -a invdist:power=2.0:smoothing=0.
0:radius1=0.06:radius2=0.06:angle=0.0:max_points=4:min_points=2:nodata=0.0
-zfield "u" -outsize 1248 861 -of GTiff gomofs_u.vrt ugrid_invdist.tiff
gdal_grid -zfield "u" -a invdistnn:power=2.0:smoothing=
0.0:radius1=0.06:radius2=0.06:angle=0.0:max_points=4:min_points=2:nodata=0.0
-zfield "u" -outsize 1248 861 -of GTiff gomofs_u.vrt ugrid_invdistnn.tiff
Any ideas on why the performance suffers with invdistnn vs. invdist as well
as Python vs. command-line?
Thank you
gomofs.csv
<https://drive.google.com/file/d/1PbT8mLKfC0TEwrCCKtZdAm9ibY4BI02y/view?usp=drive_web>
gomofs_u.vrt
<https://drive.google.com/file/d/1dsStgDkEAX6bN4oCs2777f2TdU-76bs7/view?usp=drive_web>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180801/3509dc90/attachment.html>
More information about the gdal-dev
mailing list