Index: /issm/trunk-jpl/src/m/coordsystems/gdaltransform.m
===================================================================
--- /issm/trunk-jpl/src/m/coordsystems/gdaltransform.m	(revision 22414)
+++ /issm/trunk-jpl/src/m/coordsystems/gdaltransform.m	(revision 22415)
@@ -22,16 +22,21 @@
 %      To get proj.4 string from EPSG, use gdalsrsinfo. Example:    gdalsrsinfo "EPSG:4326" | grep "PROJ.4"
 
-	%give ourselves a unique temporary directory: 
-	temproot=tempname; mkdir(temproot);
+	%give ourselves unique file names
+	filename_in  = tempname();
+	filename_out = tempname();
 
-	fid=fopen([temproot '/.rand1234.txt'],'w');
+	fid=fopen(filename_in,'w');
 	fprintf(fid,'%8g %8g\n',[x(:) y(:)]');
 	fclose(fid);
 
-	[s,r]=system(['gdaltransform -s_srs ',proj_in,' -t_srs ',proj_out,'  < ' temproot '/.rand1234.txt > ' temproot '/.rand1235.txt']);
+	[s,r]=system(['gdaltransform -s_srs ',proj_in,' -t_srs ',proj_out,'  < ' filename_in ' > ' filename_out]);
 	if s~=0 | ~isempty(deblank(r)),
 		error(r);
 	end
-	A=load([temproot '/.rand1235.txt']);
+	A=load(filename_out);
 	xout=A(:,1); xout=reshape(xout,size(x));
 	yout=A(:,2); yout=reshape(yout,size(y));
+
+	%clean up
+	delete(filename_in);
+	delete(filename_out);
