Index: /issm/trunk-jpl/src/m/coordsystems/gdaltransform.m
===================================================================
--- /issm/trunk-jpl/src/m/coordsystems/gdaltransform.m	(revision 20127)
+++ /issm/trunk-jpl/src/m/coordsystems/gdaltransform.m	(revision 20128)
@@ -3,9 +3,18 @@
 %
 %   Usage:
-%      [x,y] = gdaltransform(x1,y1,'EPSG:3184','EPSG:3411')
+%      [x,y] = gdaltransform(x1,y1,epsg_in, epsg_out);
 %
+%   Example: 
+%      [x,y] = gdaltransform(md.mesh.lat,md.mesh.long,'EPSG:3184','EPSG:3411'); 
 %
+%   For reference: 
+%       EPSG: 4326 (lat,long)
+%       EPSG: 3411  (greenland, +proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs)
+%       EPSG: 3031 (antarctica, +proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs)
 
-	fid=fopen('.rand1234.txt','w');
+	%give ourselves a unique temporary directory: 
+	temproot=tempname; mkdir(temproot);
+
+	fid=fopen([temproot '/.rand1234.txt'],'w');
 	for i=1:length(x),
 		fprintf(fid,'%g %g\n',x(i),y(i));
@@ -13,7 +22,6 @@
 	fclose(fid);
 
-	[s,r]=system(['gdaltransform -s_srs ',proj_in,' -t_srs ',proj_out,'  < .rand1234.txt > .rand1235.txt']);
-
-	A=textread('.rand1235.txt');
+	[s,r]=system(['gdaltransform -s_srs ',proj_in,' -t_srs ',proj_out,'  < ' temproot '/.rand1234.txt > ' temproot '/.rand1235.txt']);
+	A=textread([temproot '/.rand1235.txt']);
 	xout=A(:,1);
 	yout=A(:,2);
