Changeset 15155
- Timestamp:
- 05/29/13 16:28:09 (12 years ago)
- Location:
- issm/trunk-jpl/src/m/plot
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/googlemaps.m
r15149 r15155 26 26 xlim=getfieldvalue(options,'xlim',[min(md.mesh.x) max(md.mesh.x)]); 27 27 ylim=getfieldvalue(options,'ylim',[min(md.mesh.y) max(md.mesh.y)]); 28 [latlist lonlist]= xy2ll(... 29 [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],... 30 [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],... 31 +1,45,70); 28 if strcmpi(md.mesh.hemisphere,'n'), 29 [latlist lonlist]= xy2ll(... 30 [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],... 31 [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],... 32 +1,45,70); 33 elseif strcmpi(md.mesh.hemisphere,'s'), 34 [latlist lonlist]= xy2ll(... 35 [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],... 36 [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],... 37 -1,0,71); 38 else 39 error('field hemisphere should either be ''n'' or ''s'''); 40 end 32 41 33 42 %Image corners in lat/long … … 76 85 position = [num2str(latn) ',' num2str(lonn)]; 77 86 disp(['Google Earth tile: ' num2str(x) '/' num2str(cols-1) ' ' num2str(y) '/' num2str(rows-1) ' (center: ' position ')']); 87 %Google maps API 88 %http://developers.google.com/maps/documentation/staticmaps/ 78 89 params = [... 79 90 'center=' position ... … … 97 108 [gX gY]=meshgrid(ulx:ulx+size(final,2)-1,uly:-1:uly-size(final,1)+1); 98 109 [LAT LON]=pixelstolatlon(gX,gY, zoom); 99 [X Y]=ll2xy(LAT,LON,+1,45,70); 110 if strcmpi(md.mesh.hemisphere,'n'), 111 [X Y]=ll2xy(LAT,LON,+1,45,70); 112 elseif strcmpi(md.mesh.hemisphere,'s'), 113 [X Y]=ll2xy(LAT,LON,-1,0,71); 114 else 115 error('field hemisphere should either be ''n'' or ''s'''); 116 end 100 117 101 118 md.radaroverlay.pwr=final; -
issm/trunk-jpl/src/m/plot/plot_googlemaps.m
r15149 r15155 25 25 xlim=getfieldvalue(options,'xlim',[min(x) max(x)]); 26 26 ylim=getfieldvalue(options,'ylim',[min(y) max(y)]); 27 [latlist lonlist]= xy2ll(... 28 [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],... 29 [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],... 30 +1,45,70); 27 if strcmpi(md.mesh.hemisphere,'n'), 28 [latlist lonlist]= xy2ll(... 29 [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],... 30 [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],... 31 +1,45,70); 32 elseif strcmpi(md.mesh.hemisphere,'s'), 33 [latlist lonlist]= xy2ll(... 34 [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],... 35 [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],... 36 -1,0,71); 37 else 38 error('field hemisphere should either be ''n'' or ''s'''); 39 end 31 40 32 41 %Image corners in lat/long
Note:
See TracChangeset
for help on using the changeset viewer.