Changeset 24744


Ignore:
Timestamp:
04/27/20 12:10:28 (5 years ago)
Author:
Eric.Larour
Message:

CHG: better error output informatoin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/coordsystems/gdalinfo.m

    r22932 r24744  
    99        %first, get pixel size:
    1010        [s,r]=system(sprintf('gdalinfo %s | grep "Pixel Size"',imagename));
    11         if s, error('gdalinfo error message: could not run system command gdalinfo'); end
     11        if s, error('gdalinfo error message: could not run system command gdalinfo to find pixel size'); end
    1212        d=sscanf(r,'Pixel Size = (%g,%g)');
    1313        info.dx=abs(d(1)); info.dy=abs(d(2));
     
    1515        %get upper left:
    1616        [s,r]=system(sprintf('gdalinfo %s | grep "Upper Left"',imagename));
    17         if s, error('gdalinfo error message: could not run system command gdalinfo'); end
     17        if s, error('gdalinfo error message: could not run system command gdalinfo to find upper left'); end
    1818        d=sscanf(r,'Upper Left ( %g,%g) %s');
    1919        info.xmin=d(1);
     
    2222        %get lower right:
    2323        [s,r]=system(sprintf('gdalinfo %s | grep "Lower Right"',imagename));
    24         if s, error('gdalinfo error message: could not run system command gdalinfo'); end
     24        if s, error('gdalinfo error message: could not run system command gdalinfo to find lower right'); end
    2525        d=sscanf(r,'Lower Right ( %g,%g) %s');
    2626        info.xmax=d(1);
     
    2929        %Size:
    3030        [s,r]=system(sprintf('gdalinfo %s | grep "Size is"',imagename));
    31         if s, error('gdalinfo error message: could not run system command gdalinfo'); end
     31        if s, error('gdalinfo error message: could not run system command gdalinfo to find size'); end
    3232        d=sscanf(r,'Size is %g, %g');
    3333        info.nx=d(1);
Note: See TracChangeset for help on using the changeset viewer.