Changeset 22946


Ignore:
Timestamp:
07/13/18 15:27:33 (7 years ago)
Author:
Mathieu Morlighem
Message:

BUG: do not convert to exp if structure is an input

Location:
issm/trunk-jpl/src/m/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/modules/ContourToMesh.m

    r22940 r22946  
    2626
    2727%Some conversion of files:
    28 [path,name,ext]=fileparts(contourname);
    29 if strcmpi(ext,'.shp'),
    30         %read contour from shapefile:
    31         contour=shpread(contourname);
     28if ischar(contourname),
     29        [path,name,ext]=fileparts(contourname);
     30        if strcmpi(ext,'.shp'),
     31                %read contour from shapefile
     32                contourname=shpread(contourname);
    3233
    33         %write it to a temporary filename:
    34         contourname=[tempname '.exp'];
    35         expwrite(contour,contourname);
     34                %FIXME: I don't think we need to convert it to a file, ContourToMesh_matlab should be able to take a structure
     35                %write it to a temporary filename:
     36                %contourname=[tempname '.exp'];
     37                %expwrite(contour,contourname);
     38        end
    3639end
    3740
  • issm/trunk-jpl/src/m/modules/ContourToNodes.m

    r22940 r22946  
    2121        if strcmpi(ext,'.shp'),
    2222                %read contour from shapefile:
    23                 contour=shpread(contourname);
     23                contourname=shpread(contourname);
    2424
     25                %FIXME: I don't think we need to convert it to a file, ContourToMesh_matlab should be able to take a structure
    2526                %write it to a temporary filename:
    26                 contourname=tempname;
    27                 expwrite(contour,contourname);
     27                %contourname=[tempname '.exp'];
     28                %expwrite(contour,contourname);
    2829        end
    2930end
Note: See TracChangeset for help on using the changeset viewer.