Index: /issm/trunk-jpl/src/m/plot/googlemaps.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/googlemaps.m	(revision 15171)
+++ /issm/trunk-jpl/src/m/plot/googlemaps.m	(revision 15172)
@@ -114,5 +114,5 @@
 end
 
-%Write image, create geotiff and reproject from mercator to local projection
+%Write image
 imwrite(final,'temp.png','png')
 [ulmx ulmy]=ll2mercator(ullat,ullon);
@@ -120,8 +120,26 @@
 
 %Create Geotiff for Mercator projection 
-system(['gdal_translate -of Gtiff -co "tfw=yes"  -a_ullr '...
+[status,result] = system(['gdal_translate -of Gtiff -co "tfw=yes"  -a_ullr '...
 	num2str(ulmx,'%15.8f') ' ' num2str(ulmy,'%15.8f') ' ' num2str(lrmx,'%15.8f') ' ' num2str(lrmy,'%15.8f')...
 	' -a_srs "' EPSGgoogle '" "temp.png" "temp.tiff"']);
 delete('temp.png');
+
+%If not gdal, exit
+if status~=0,
+	disp('googlemaps info: gdal not found or not working properly, 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
 
 %reproject from mercator (EPSG:3785) to UPS Ant (EPSG:3031)
Index: /issm/trunk-jpl/src/m/plot/plot_googlemaps.m
===================================================================
--- /issm/trunk-jpl/src/m/plot/plot_googlemaps.m	(revision 15171)
+++ /issm/trunk-jpl/src/m/plot/plot_googlemaps.m	(revision 15172)
@@ -63,5 +63,6 @@
 			data,xmin,ymax,xspacing,yspacing,nlines,ncols,NaN);
 else
-	[X Y] = meshgrid(md.radaroverlay.x,md.radaroverlay.y);
+	X = md.radaroverlay.x;
+	Y = md.radaroverlay.y;
 	data_grid=InterpFromMeshToMesh2d(md.mesh.elements,md.mesh.x,md.mesh.y,data,X(:),Y(:),'default',NaN); data_grid=reshape(data_grid,size(X));
 	x_m=X(1,:); y_m=Y(:,1);
