Changeset 15172
- Timestamp:
- 05/30/13 11:33:15 (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
r15160 r15172 114 114 end 115 115 116 %Write image , create geotiff and reproject from mercator to local projection116 %Write image 117 117 imwrite(final,'temp.png','png') 118 118 [ulmx ulmy]=ll2mercator(ullat,ullon); … … 120 120 121 121 %Create Geotiff for Mercator projection 122 system(['gdal_translate -of Gtiff -co "tfw=yes" -a_ullr '...122 [status,result] = system(['gdal_translate -of Gtiff -co "tfw=yes" -a_ullr '... 123 123 num2str(ulmx,'%15.8f') ' ' num2str(ulmy,'%15.8f') ' ' num2str(lrmx,'%15.8f') ' ' num2str(lrmy,'%15.8f')... 124 124 ' -a_srs "' EPSGgoogle '" "temp.png" "temp.tiff"']); 125 125 delete('temp.png'); 126 127 %If not gdal, exit 128 if status~=0, 129 disp('googlemaps info: gdal not found or not working properly, the Google image will not be transformed'); 130 [gX gY]=meshgrid(ulx:ulx+size(final,2)-1,uly:-1:uly-size(final,1)+1); 131 [LAT LON]=pixelstolatlon(gX,gY, zoom); 132 if strcmpi(md.mesh.hemisphere,'n'), 133 [X Y]=ll2xy(LAT,LON,+1,45,70); 134 elseif strcmpi(md.mesh.hemisphere,'s'), 135 [X Y]=ll2xy(LAT,LON,-1,0,71); 136 else 137 error('field hemisphere should either be ''n'' or ''s'''); 138 end 139 md.radaroverlay.pwr=final; 140 md.radaroverlay.x=X; 141 md.radaroverlay.y=Y; 142 return 143 end 126 144 127 145 %reproject from mercator (EPSG:3785) to UPS Ant (EPSG:3031) -
issm/trunk-jpl/src/m/plot/plot_googlemaps.m
r15169 r15172 63 63 data,xmin,ymax,xspacing,yspacing,nlines,ncols,NaN); 64 64 else 65 [X Y] = meshgrid(md.radaroverlay.x,md.radaroverlay.y); 65 X = md.radaroverlay.x; 66 Y = md.radaroverlay.y; 66 67 data_grid=InterpFromMeshToMesh2d(md.mesh.elements,md.mesh.x,md.mesh.y,data,X(:),Y(:),'default',NaN); data_grid=reshape(data_grid,size(X)); 67 68 x_m=X(1,:); y_m=Y(:,1);
Note:
See TracChangeset
for help on using the changeset viewer.