Ignore:
Timestamp:
01/05/18 14:45:40 (7 years ago)
Author:
seroussi
Message:

NEW: added scaling_factor option for polar stereographic projections in ll2xy and xy2ll

File:
1 edited

Legend:

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

    r21041 r22339  
    1 function [lat,lon] = xy2ll(x,y,sgn,central_meridian,standard_parallel)
     1function [lat,lon,scale_factor] = xy2ll(x,y,sgn,central_meridian,standard_parallel)
    22%XY2LL - converts xy to lat long
    33%
     
    55%   latitude and longitude Stereographic (X,Y) coordinates for the polar
    66%   regions.
     7%   Optional scale factor provides the scaling factor needed to correct projection error
     8%   in areas and volumes
    79%   Author: Michael P. Schodlok, December 2003 (map2xy.m)
    810%
    911%   Usage:
    1012%      [lat,lon] = xy2ll(x,y,sgn);
     13%      [lat,lon,scale_factor] = xy2ll(x,y,sgn);
    1114%      [lat,lon] = xy2ll(x,y,sgn,central_meridian,standard_parallel);
    1215%
     
    2932        end
    3033else
     34        help xy2ll
     35        error('bad usage');
     36end
     37
     38if nargout~=3 & nargout~=2,
    3139        help xy2ll
    3240        error('bad usage');
     
    7179lat = lat * 180. / pi;
    7280lon = lon - delta;
     81if nargout==3,
     82        m=((1+sin(abs(slat)*pi/180))*ones(length(lat),1)./(1+sin(abs(lat)*pi/180)));
     83        scale_factor=(1./m).^2;
     84end
Note: See TracChangeset for help on using the changeset viewer.