Changeset 26958


Ignore:
Timestamp:
04/15/22 12:30:25 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: switching to CoordTransform to avoid EPSG problems

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

Legend:

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

    r26474 r26958  
    4040end
    4141
     42%Move to CoordTransform now...
     43if exist('CoordTransform_matlab')==3
     44        disp('Calling CoordTransform instead, make sure to change your MATLAB script');
     45        if sgn==+1
     46                assert(delta==45); assert(slat ==70);
     47                [x y]=CoordTransform(lat,lon,'EPSG:4326','EPSG:3413');
     48                return;
     49        else
     50                assert(delta==0); assert(slat ==71);
     51                [x y]=CoordTransform(lat,lon,'EPSG:4326','EPSG:3031');
     52                return;
     53        end
     54end
     55
    4256% Conversion constant from degrees to radians
    4357cde  = 57.29577951;
  • issm/trunk-jpl/src/m/coordsystems/xy2ll.m

    r24254 r26958  
    3434        help xy2ll
    3535        error('bad usage');
     36end
     37
     38%Move to CoordTransform now...
     39if exist('CoordTransform_matlab')==3
     40        disp('Calling CoordTransform instead, make sure to change your MATLAB script');
     41        if sgn==+1
     42                assert(delta==45); assert(slat ==70);
     43                [lat lon]=CoordTransform(x, y,'EPSG:3413','EPSG:4326');
     44                return;
     45        else
     46                assert(delta==0); assert(slat ==71);
     47                [lat lon]=CoordTransform(x, y,'EPSG:3031','EPSG:4326');
     48                return;
     49        end
    3650end
    3751
Note: See TracChangeset for help on using the changeset viewer.