Changeset 20070


Ignore:
Timestamp:
02/03/16 15:21:37 (9 years ago)
Author:
Mathieu Morlighem
Message:

CHG: more general lat/long inputs

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/googlemaps.m

    r18600 r20070  
    4040                        [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],...
    4141                        -1,0,71);
     42        elseif md.mesh.epsg==26906, %UTM 6V Columbia Glacier Alaska
     43                [latlist lonlist]= utm2ll(...
     44                        [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],...
     45                        [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],...
     46                        6);
     47        elseif numel(md.mesh.lat)==numel(md.mesh.x),
     48                latlist = md.mesh.lat; %That might work?
     49                lonlist = md.mesh.long;
    4250        else
    43                 error('EPSG code not supported yet');
     51                error('EPSG code not supported yet, and no lat long found in md.mesh');
    4452        end
    4553
  • issm/trunk-jpl/src/m/plot/plot_googlemaps.m

    r18558 r20070  
    2525        xlim=getfieldvalue(options,'xlim',[min(x) max(x)]);
    2626        ylim=getfieldvalue(options,'ylim',[min(y) max(y)]);
    27         if md.mesh.epsg==3413,
     27        if md.mesh.epsg==3413, %UPS Greenland
    2828                [latlist lonlist]= xy2ll(...
    2929                        [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],...
    3030                        [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],...
    3131                        +1,45,70);
    32         elseif md.mesh.epsg==3031,
     32        elseif md.mesh.epsg==3031, %UPS Antarctica
    3333                [latlist lonlist]= xy2ll(...
    3434                        [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],...
    3535                        [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],...
    3636                        -1,0,71);
    37         else
     37        elseif md.mesh.epsg==26906, %UTM 6V Columbia Glacier Alaska
     38                [latlist lonlist]= utm2ll(...
     39                        [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],...
     40                        [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],...
     41                        6);
     42        elseif numel(md.mesh.lat)==numel(md.mesh.x),
    3843                latlist = md.mesh.lat; %That might work?
    3944                lonlist = md.mesh.long;
    40                 error('EPSG code not supported yet');
     45        else
     46                error('EPSG code not supported yet, and no lat long found in md.mesh');
    4147        end
    4248
Note: See TracChangeset for help on using the changeset viewer.