Changeset 15175
- Timestamp:
- 05/30/13 11:55:10 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/googlemaps.m
r15172 r15175 144 144 145 145 %reproject from mercator (EPSG:3785) to UPS Ant (EPSG:3031) 146 system(['gdalwarp -s_srs ' EPSGgoogle ' -t_srs ' EPSGlocal ' temp.tiff temp2.tiff']); 146 [status,result] = system(['gdalwarp -s_srs ' EPSGgoogle ' -t_srs ' EPSGlocal ' temp.tiff temp2.tiff']); 147 disp(result);result(1:5); %required otherwise strncmp does not work... 147 148 delete('temp.tiff','temp.tfw'); 149 150 %If previous command failed, exit 151 if strncmp(result,'ERROR',5), 152 disp('googlemaps info: gdal not working properly (missing proj.4 library?), the Google image will not be transformed'); 153 [gX gY]=meshgrid(ulx:ulx+size(final,2)-1,uly:-1:uly-size(final,1)+1); 154 [LAT LON]=pixelstolatlon(gX,gY, zoom); 155 if strcmpi(md.mesh.hemisphere,'n'), 156 [X Y]=ll2xy(LAT,LON,+1,45,70); 157 elseif strcmpi(md.mesh.hemisphere,'s'), 158 [X Y]=ll2xy(LAT,LON,-1,0,71); 159 else 160 error('field hemisphere should either be ''n'' or ''s'''); 161 end 162 md.radaroverlay.pwr=final; 163 md.radaroverlay.x=X; 164 md.radaroverlay.y=Y; 165 return 166 end 148 167 149 168 %Put everything in model
Note:
See TracChangeset
for help on using the changeset viewer.