Index: /issm/trunk-jpl/src/m/plot/googlemaps.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/googlemaps.m	(revision 15174)
+++ /issm/trunk-jpl/src/m/plot/googlemaps.m	(revision 15175)
@@ -144,6 +144,25 @@
 
 %reproject from mercator (EPSG:3785) to UPS Ant (EPSG:3031)
-system(['gdalwarp  -s_srs ' EPSGgoogle ' -t_srs ' EPSGlocal ' temp.tiff temp2.tiff']);
+[status,result] = system(['gdalwarp  -s_srs ' EPSGgoogle ' -t_srs ' EPSGlocal ' temp.tiff temp2.tiff']);
+disp(result);result(1:5); %required otherwise strncmp does not work...
 delete('temp.tiff','temp.tfw');
+
+%If previous command failed, exit
+if strncmp(result,'ERROR',5),
+	disp('googlemaps info: gdal not working properly (missing proj.4 library?), the Google image will not be transformed');
+	[gX gY]=meshgrid(ulx:ulx+size(final,2)-1,uly:-1:uly-size(final,1)+1);
+	[LAT LON]=pixelstolatlon(gX,gY, zoom);
+	if strcmpi(md.mesh.hemisphere,'n'),
+		[X Y]=ll2xy(LAT,LON,+1,45,70);
+	elseif strcmpi(md.mesh.hemisphere,'s'),
+		[X Y]=ll2xy(LAT,LON,-1,0,71);
+	else
+		error('field hemisphere should either be ''n'' or ''s''');
+	end
+	md.radaroverlay.pwr=final;
+	md.radaroverlay.x=X;
+	md.radaroverlay.y=Y;
+	return
+end
 
 %Put everything in model
