[gdal-dev] GDAL_GRID Linear: Segmentation Fault

Ian Reese ireese at linz.govt.nz
Thu Jun 14 17:15:22 PDT 2018


Hi Gdal,

I am trying to do a linear interpolation using gdal_grid and I am getting a segmentation fault with output grid cell sizes smaller than 8m.

gdal_grid -zfield "depth" -a linear:nodata=-32768 -outsize 526 754 -of GTiff -l inshape inshape.shp outtif.tif --config GDAL_NUM_THREADS ALL_CPUS
Grid data type is "Float64"
Grid size = (526 754).
Corner coordinates = (1671133.229795 5329097.839821)-(1675355.467899 5323053.902837).
Grid cell size = (8.011837 8.005215).
Source point count = 8363817.
Algorithm name: "linear".
Options are "radius=-1.000000:nodata=-32768.000000"

0...10...20...30...40...50...60...70...80..Segmentation fault (core dumped)

If I change the number of input points (use a much smaller area) things seem to work out OK.

Grid cell size = (6.282705 6.842535).
Source point count = 749329

So, I suspect there is a limitation to the number of points I can use for gdal_grid linear interpolation.  Is there a way I can increase the number of input points?  Or should I break up the region, interpolate smaller areas, and merge them back together in the end.  I have a large area with a large number of dense points (8 million points at 1m resolution).  I am trying to avoid breaking it into as few smaller regions as possible to avoid artifacts at the edges when stitching it back together.

I'd really like to use the linear interpolation if possible since it has nice smooth results and is much faster than IDW with smoothing.

Cheers,

Ian

________________________________

This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180615/96e0ca4c/attachment.html>


More information about the gdal-dev mailing list