Changeset 27912


Ignore:
Timestamp:
09/20/23 09:56:10 (18 months ago)
Author:
Mathieu Morlighem
Message:

CHG: added fill holes option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/modeldata/interpFromGeotiff.m

    r26701 r27912  
    1 function dataout = interpFromGeotiff(geotiffname,X,Y,nanValue),
     1function dataout = interpFromGeotiff(geotiffname,X,Y,nanValue,fillholes)
     2%INTERPFROMGEOTIFF - interpolate field in geotiff onto list of points
     3%
     4%   Usage:
     5%      dataout = interpFromGeotiff(geotiffname,X,Y,nanValue,fillholes)
     6%      dataout = interpFromGeotiff(geotiffname,X,Y);
     7
    28
    39if nargin < 4
    410        nanValue = 10^30;
     11        fillholes = false;
     12end
     13if nargin < 5
     14        fillholes = false;
    515end
    616
     
    6474                data(find(data<=nanValue))=NaN;
    6575        end
    66 
     76        if fillholes
     77                disp('Filling holes');
     78                data = inpaint_nans(data);
     79                disp('done');
     80        end
    6781end
    6882
Note: See TracChangeset for help on using the changeset viewer.