Index: branches/czw_branch/20170908/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- branches/czw_branch/20170908/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 40128)
+++ branches/czw_branch/20170908/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 40483)
@@ -1664,7 +1664,45 @@
     my ($pointsList, $pointsListName) = tempfile ("/tmp/pointsList.XXXX", UNLINK => !$save_temps);
     my $npoints = 0;
+    ## MEH hack -- 
+    my $pi=3.14159265359;
+    my $tra=0.0;
+    my $tdec=0.0;
+    ##
     foreach my $row (@$rowList) {
         print $pointsList "$npoints $row->{CENTER_X} $row->{CENTER_Y}\n";
-        $npoints++;
+	#$npoints++;
+        ## MEH hack -- add width, height corners -- chip gap problem and need to add more points to try
+        ## -- need to adjust RA for DEC and check 0/360, 90 boundary (dont assume coord to image lookup will do it)
+        if ( ($row->{OPTION_MASK} & $PSTAMP_MULTI_OVERLAP_IMAGE) && !($row->{COORD_MASK} & $PSTAMP_RANGE_IN_PIXELS) ){
+            foreach my $f (-1.0, 1.0, -1.5, 1.5, -2.0, 2.0, -2.5, 2.5) {
+            	## +/-ra +/-dec corner
+            	#printf $pointsList "$npoints %f %f\n", $row->{CENTER_X}+$row->{WIDTH}/2.0/3600.0, $row->{CENTER_Y}+$row->{HEIGHT}/2.0/3600.0;
+	    	$tra = $row->{CENTER_X}+$row->{WIDTH}/$f/2.0/3600.0/cos($row->{CENTER_Y}/180.0*$pi);
+	    	$tdec = $row->{CENTER_Y}+$row->{HEIGHT}/$f/2.0/3600.0;
+            	$tra = ($tra>360.0) ? $tra-360.0 : $tra;
+            	$tdec = ($tdec>90.0) ? 90.0-($tdec-90.0) : $tdec;
+            	printf $pointsList "$npoints %f %f\n",$tra,$tdec;
+            	## +/-ra -/+dec corner 
+            	$tra = $row->{CENTER_X}+$row->{WIDTH}/$f/2.0/3600.0/cos($row->{CENTER_Y}/180.0*$pi);
+           	$tdec = $row->{CENTER_Y}-$row->{HEIGHT}/$f/2.0/3600.0;
+            	$tra = ($tra>360.0) ? $tra-360.0 : $tra;
+           	$tdec = ($tdec>90.0) ? 90.0-($tdec-90.0) : $tdec;
+           	printf $pointsList "$npoints %f %f\n",$tra,$tdec;
+	    	## -/+ra side 
+            	$tra = $row->{CENTER_X}-$row->{WIDTH}/$f/2.0/3600.0/cos($row->{CENTER_Y}/180.0*$pi);
+            	$tdec = $row->{CENTER_Y};
+            	$tra = ($tra>360.0) ? $tra-360.0 : $tra;
+            	$tdec = ($tdec>90.0) ? 90.0-($tdec-90.0) : $tdec;
+            	printf $pointsList "$npoints %f %f\n",$tra,$tdec;
+            	## -/+dec side 
+            	$tra = $row->{CENTER_X};
+            	$tdec = $row->{CENTER_Y}-$row->{HEIGHT}/$f/2.0/3600.0;
+            	$tra = ($tra>360.0) ? $tra-360.0 : $tra;
+                $tdec = ($tdec>90.0) ? 90.0-($tdec-90.0) : $tdec;
+                printf $pointsList "$npoints %f %f\n",$tra,$tdec;
+            }
+        }
+	####
+	$npoints++;
         # this gets overwitten if an overlapping image is found
         $row->{error_code} = $PSTAMP_NO_OVERLAP;
@@ -1725,5 +1763,8 @@
                     $ref = $components{$component} = [];
                 }
-                push @$ref, $ptnum;
+		#push @$ref, $ptnum;
+                ## MEH hack -- only push ptnum if not already, so check if ptnum in list 
+		push(@$ref, $ptnum) unless grep{$_ == $ptnum} @$ref;
+		##
                 my $row = $rowList->[$ptnum];
                 # this row found a match
Index: branches/czw_branch/20170908/PS-IPP-PStamp/lib/PS/IPP/PStamp/RequestFile.pm
===================================================================
--- branches/czw_branch/20170908/PS-IPP-PStamp/lib/PS/IPP/PStamp/RequestFile.pm	(revision 40128)
+++ branches/czw_branch/20170908/PS-IPP-PStamp/lib/PS/IPP/PStamp/RequestFile.pm	(revision 40483)
@@ -35,4 +35,5 @@
                     $PSTAMP_SELECT_UNCONV
                     $PSTAMP_RESTORE_BACKGROUND
+		    $PSTAMP_MULTI_OVERLAP_IMAGE
                     $PSTAMP_USE_IMFILE_ID
                     $PSTAMP_NO_WAIT_FOR_UPDATE
@@ -81,6 +82,6 @@
 our $PSTAMP_SELECT_UNCONV       = 2048;
 our $PSTAMP_RESTORE_BACKGROUND  = 4096;
-# unused 8192
-
+# MEH -- previously unused 8192
+our $PSTAMP_MULTI_OVERLAP_IMAGE  = 8192; 
 our $PSTAMP_USE_IMFILE_ID      = 16384;
 our $PSTAMP_NO_WAIT_FOR_UPDATE = 32768;
